shithub: libvpx

Download patch

ref: 89d66cbb203990b19a27b0f09753f479400e1c25
parent: 153805ffab249f55f4461a5aada281d212db03ba
parent: 3fae3283e6037a0b20f5e32402ba8e50d7ef859e
author: John Koleszar <jkoleszar@google.com>
date: Fri Mar 4 19:05:05 EST 2011

Merge remote branch 'internal/upstream' into HEAD

--- a/.mailmap
+++ b/.mailmap
@@ -1,2 +1,4 @@
 Adrian Grange <agrange@google.com>
 Johann Koenig <johannkoenig@google.com>
+Tero Rintaluoma <teror@google.com> <tero.rintaluoma@on2.com>
+Tom Finegan <tomfinegan@google.com>
--- a/AUTHORS
+++ b/AUTHORS
@@ -4,13 +4,18 @@
 Aaron Watry <awatry@gmail.com>
 Adrian Grange <agrange@google.com>
 Alex Converse <alex.converse@gmail.com>
+Andoni Morales Alastruey <ylatuya@gmail.com>
 Andres Mejia <mcitadel@gmail.com>
+Attila Nagy <attilanagy@google.com>
 Fabio Pedretti <fabio.ped@libero.it>
 Frank Galligan <fgalligan@google.com>
 Fredrik Söderquist <fs@opera.com>
 Fritz Koenig <frkoenig@google.com>
+Gaute Strokkenes <gaute.strokkenes@broadcom.com>
 Giuseppe Scrivano <gscrivano@gnu.org>
 Guillermo Ballester Valor <gbvalor@gmail.com>
+Henrik Lundin <hlundin@google.com>
+James Berry <jamesberry@google.com>
 James Zern <jzern@google.com>
 Jan Kratochvil <jan.kratochvil@redhat.com>
 Jeff Muizelaar <jmuizelaar@mozilla.com>
@@ -23,10 +28,14 @@
 Makoto Kato <makoto.kt@gmail.com>
 Martin Ettl <ettl.martin78@googlemail.com>
 Michael Kohler <michaelkohler@live.com>
+Mikhal Shemer <mikhal@google.com>
+Pascal Massimino <pascal.massimino@gmail.com>
+Patrik Westin <patrik.westin@gmail.com>
 Paul Wilkins <paulwilkins@google.com>
 Pavol Rusnak <stick@gk2.sk>
 Philip Jägenstedt <philipj@opera.com>
 Scott LaVarnway <slavarnway@google.com>
+Tero Rintaluoma <teror@google.com>
 Timothy B. Terriberry <tterribe@xiph.org>
 Tom Finegan <tomfinegan@google.com>
 Yaowu Xu <yaowu@google.com>
--- a/build/make/configure.sh
+++ b/build/make/configure.sh
@@ -867,7 +867,7 @@
                 setup_gnu_toolchain
                 add_cflags -use-msasm -use-asm
                 add_ldflags -i-static
-                enabled x86_64 && add_cflags -ipo -no-prec-div -static -xSSE3 -axSSE3
+                enabled x86_64 && add_cflags -ipo -no-prec-div -static -xSSE2 -axSSE2
                 enabled x86_64 && AR=xiar
                 case ${tune_cpu} in
                     atom*)
--- a/build/make/gen_msvs_proj.sh
+++ b/build/make/gen_msvs_proj.sh
@@ -32,7 +32,7 @@
     --name=project_name         Name of the project (required)
     --proj-guid=GUID            GUID to use for the project
     --module-def=filename       File containing export definitions (for DLLs)
-    --ver=version               Version (7,8) of visual studio to generate for
+    --ver=version               Version (7,8,9) of visual studio to generate for
     -Ipath/to/include           Additional include directories
     -DFLAG[=value]              Preprocessor macros to define
     -Lpath/to/lib               Additional library search paths
@@ -132,7 +132,7 @@
     open_tag Filter \
         Name=$name \
         Filter=$pats \
-        UniqueIdentifier=`generate_uuid`
+        UniqueIdentifier=`generate_uuid` \
 
     file_list_sz=${#file_list[@]}
     for i in ${!file_list[@]}; do
@@ -145,31 +145,21 @@
                 if [ "$pat" == "asm" ] && $asm_use_custom_step; then
                     for plat in "${platforms[@]}"; do
                         for cfg in Debug Release; do
-                            open_tag  FileConfiguration \
-                            Name="${cfg}|${plat}"
+                            open_tag FileConfiguration \
+                                Name="${cfg}|${plat}" \
+
                             tag Tool \
                                 Name="VCCustomBuildTool" \
                                 Description="Assembling \$(InputFileName)" \
-                                CommandLine="$(eval echo \$asm_${cfg}_cmdline)"\
-                                Outputs="\$(InputName).obj"
+                                CommandLine="$(eval echo \$asm_${cfg}_cmdline)" \
+                                Outputs="\$(InputName).obj" \
+
                             close_tag FileConfiguration
                         done
                     done
                 fi
 
-                if [ "${f##*.}" == "cpp" ]; then
-                    for plat in "${platforms[@]}"; do
-                        for cfg in Debug Release; do
-                        open_tag FileConfiguration \
-                            Name="${cfg}|${plat}"
-                        tag Tool \
-                            Name="VCCLCompilerTool" \
-                            CompileAs="2"
-                        close_tag FileConfiguration
-                        done
-                    done
-                fi
-                close_tag  File
+                close_tag File
 
                 break
             fi
@@ -185,57 +175,61 @@
 for opt in "$@"; do
     optval="${opt#*=}"
     case "$opt" in
-    --help|-h) show_help
-    ;;
-    --target=*) target="${optval}"
-    ;;
-    --out=*) outfile="$optval"
-    ;;
-    --name=*) name="${optval}"
-    ;;
-    --proj-guid=*) guid="${optval}"
-    ;;
-    --module-def=*)
-        link_opts="${link_opts} ModuleDefinitionFile=${optval}"
-    ;;
-    --exe) proj_kind="exe"
-    ;;
-    --lib) proj_kind="lib"
-    ;;
-    --static-crt) use_static_runtime=true
-    ;;
-    --ver=*) vs_ver="$optval"
-             case $optval in
-             [789])
-             ;;
-             *) die Unrecognized Visual Studio Version in $opt
-             ;;
-             esac
-    ;;
-    -I*) opt="${opt%/}"
-         incs="${incs}${incs:+;}&quot;${opt##-I}&quot;"
-         yasmincs="${yasmincs} ${opt}"
-    ;;
-    -D*) defines="${defines}${defines:+;}${opt##-D}"
-    ;;
-    -L*) # fudge . to $(OutDir)
-         if [ "${opt##-L}" == "." ]; then
-             libdirs="${libdirs}${libdirs:+;}&quot;\$(OutDir)&quot;"
-         else
-             # Also try directories for this platform/configuration
-             libdirs="${libdirs}${libdirs:+;}&quot;${opt##-L}&quot;"
-             libdirs="${libdirs}${libdirs:+;}&quot;${opt##-L}/\$(PlatformName)/\$(ConfigurationName)&quot;"
-             libdirs="${libdirs}${libdirs:+;}&quot;${opt##-L}/\$(PlatformName)&quot;"
-         fi
-    ;;
-    -l*) libs="${libs}${libs:+ }${opt##-l}.lib"
-    ;;
-    -*) die_unknown $opt
-    ;;
-    *) file_list[${#file_list[@]}]="$opt"
-       case "$opt" in
-       *.asm) uses_asm=true;;
-       esac
+        --help|-h) show_help
+        ;;
+        --target=*) target="${optval}"
+        ;;
+        --out=*) outfile="$optval"
+        ;;
+        --name=*) name="${optval}"
+        ;;
+        --proj-guid=*) guid="${optval}"
+        ;;
+        --module-def=*) link_opts="${link_opts} ModuleDefinitionFile=${optval}"
+        ;;
+        --exe) proj_kind="exe"
+        ;;
+        --lib) proj_kind="lib"
+        ;;
+        --static-crt) use_static_runtime=true
+        ;;
+        --ver=*)
+            vs_ver="$optval"
+            case "$optval" in
+                [789])
+                ;;
+                *) die Unrecognized Visual Studio Version in $opt
+                ;;
+            esac
+        ;;
+        -I*)
+            opt="${opt%/}"
+            incs="${incs}${incs:+;}&quot;${opt##-I}&quot;"
+            yasmincs="${yasmincs} ${opt}"
+        ;;
+        -D*) defines="${defines}${defines:+;}${opt##-D}"
+        ;;
+        -L*) # fudge . to $(OutDir)
+            if [ "${opt##-L}" == "." ]; then
+                libdirs="${libdirs}${libdirs:+;}&quot;\$(OutDir)&quot;"
+            else
+                 # Also try directories for this platform/configuration
+                 libdirs="${libdirs}${libdirs:+;}&quot;${opt##-L}&quot;"
+                 libdirs="${libdirs}${libdirs:+;}&quot;${opt##-L}/\$(PlatformName)/\$(ConfigurationName)&quot;"
+                 libdirs="${libdirs}${libdirs:+;}&quot;${opt##-L}/\$(PlatformName)&quot;"
+            fi
+        ;;
+        -l*) libs="${libs}${libs:+ }${opt##-l}.lib"
+        ;;
+        -*) die_unknown $opt
+        ;;
+        *)
+            file_list[${#file_list[@]}]="$opt"
+            case "$opt" in
+                 *.asm) uses_asm=true
+                 ;;
+            esac
+        ;;
     esac
 done
 outfile=${outfile:-/dev/stdout}
@@ -278,8 +272,7 @@
 
 # List Keyword for this target
 case "$target" in
-    x86*)
-        keyword="ManagedCProj"
+    x86*) keyword="ManagedCProj"
     ;;
     *) die "Unsupported target $target!"
 esac
@@ -296,32 +289,33 @@
         asm_Release_cmdline="yasm -Xvc -f \$(PlatformName) ${yasmincs} &quot;\$(InputPath)&quot;"
     ;;
     *) die "Unsupported target $target!"
+    ;;
 esac
 
 generate_vcproj() {
     case "$proj_kind" in
-    exe) vs_ConfigurationType=1
-    ;;
-    *)   vs_ConfigurationType=4
-    ;;
+        exe) vs_ConfigurationType=1
+        ;;
+        *)   vs_ConfigurationType=4
+        ;;
     esac
 
     echo "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>"
-    open_tag  VisualStudioProject \
-                  ProjectType="Visual C++" \
-                  Version="${vs_ver_id}" \
-                  Name="${name}" \
-                  ProjectGUID="{${guid}}" \
-                  RootNamespace="${name}" \
-                  Keyword="${keyword}"
+    open_tag VisualStudioProject \
+        ProjectType="Visual C++" \
+        Version="${vs_ver_id}" \
+        Name="${name}" \
+        ProjectGUID="{${guid}}" \
+        RootNamespace="${name}" \
+        Keyword="${keyword}" \
 
-    open_tag  Platforms
+    open_tag Platforms
     for plat in "${platforms[@]}"; do
-        tag   Platform Name="$plat"
+        tag Platform Name="$plat"
     done
     close_tag Platforms
 
-    open_tag  ToolFiles
+    open_tag ToolFiles
     case "$target" in
         x86*) $uses_asm && tag ToolFile RelativePath="$self_dirname/../x86-msvs/yasm.rules"
         ;;
@@ -328,29 +322,34 @@
     esac
     close_tag ToolFiles
 
-    open_tag  Configurations
+    open_tag Configurations
     for plat in "${platforms[@]}"; do
         plat_no_ws=`echo $plat | sed 's/[^A-Za-z0-9_]/_/g'`
-        open_tag  Configuration \
-                      Name="Debug|$plat" \
-                      OutputDirectory="\$(SolutionDir)$plat_no_ws/\$(ConfigurationName)" \
-                      IntermediateDirectory="$plat_no_ws/\$(ConfigurationName)/${name}" \
-                      ConfigurationType="$vs_ConfigurationType" \
-                      CharacterSet="1"
+        open_tag Configuration \
+            Name="Debug|$plat" \
+            OutputDirectory="\$(SolutionDir)$plat_no_ws/\$(ConfigurationName)" \
+            IntermediateDirectory="$plat_no_ws/\$(ConfigurationName)/${name}" \
+            ConfigurationType="$vs_ConfigurationType" \
+            CharacterSet="1" \
 
         case "$target" in
-            x86*) tag Tool \
-                Name="VCCLCompilerTool" \
-                Optimization="0" \
-                AdditionalIncludeDirectories="$incs" \
-                PreprocessorDefinitions="WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;$defines" \
-                RuntimeLibrary="$debug_runtime" \
-                UsePrecompiledHeader="0" \
-                WarningLevel="3" \
-                DebugInformationFormat="1" \
-                Detect64BitPortabilityProblems="true" \
+            x86*)
+                case "$name" in
+                    *)
+                        tag Tool \
+                            Name="VCCLCompilerTool" \
+                            Optimization="0" \
+                            AdditionalIncludeDirectories="$incs" \
+                            PreprocessorDefinitions="WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;$defines" \
+                            RuntimeLibrary="$debug_runtime" \
+                            UsePrecompiledHeader="0" \
+                            WarningLevel="3" \
+                            DebugInformationFormat="1" \
+                            Detect64BitPortabilityProblems="true" \
 
-                $uses_asm && tag Tool Name="YASM"  IncludePaths="$incs" Debug="1"
+                        $uses_asm && tag Tool Name="YASM"  IncludePaths="$incs" Debug="1"
+                    ;;
+                esac
             ;;
         esac
 
@@ -357,85 +356,109 @@
         case "$proj_kind" in
             exe)
                 case "$target" in
-                    x86*) tag Tool \
-                          Name="VCLinkerTool" \
-                          AdditionalDependencies="$debug_libs \$(NoInherit)" \
-                          AdditionalLibraryDirectories="$libdirs" \
-                          GenerateDebugInformation="true" \
-                          ProgramDatabaseFile="\$(OutDir)/${name}.pdb" \
-
+                    x86*)
+                        case "$name" in
+                            *)
+                                tag Tool \
+                                    Name="VCLinkerTool" \
+                                    AdditionalDependencies="$debug_libs \$(NoInherit)" \
+                                    AdditionalLibraryDirectories="$libdirs" \
+                                    GenerateDebugInformation="true" \
+                                    ProgramDatabaseFile="\$(OutDir)/${name}.pdb" \
+                            ;;
+                        esac
                     ;;
                  esac
             ;;
             lib)
                 case "$target" in
-                                *) tag Tool \
-                                    Name="VCLibrarianTool" \
-                                    OutputFile="\$(OutDir)/${name}${lib_sfx}d.lib" \
-                                ;;
+                    x86*)
+                        tag Tool \
+                            Name="VCLibrarianTool" \
+                            OutputFile="\$(OutDir)/${name}${lib_sfx}d.lib" \
+
+                    ;;
                 esac
             ;;
-            dll) tag Tool \
-                 Name="VCLinkerTool" \
-                AdditionalDependencies="\$(NoInherit)" \
-                LinkIncremental="2" \
-                GenerateDebugInformation="true" \
-                AssemblyDebug="1" \
-                TargetMachine="1" \
-                      $link_opts
+            dll)
+                tag Tool \
+                    Name="VCLinkerTool" \
+                    AdditionalDependencies="\$(NoInherit)" \
+                    LinkIncremental="2" \
+                    GenerateDebugInformation="true" \
+                    AssemblyDebug="1" \
+                    TargetMachine="1" \
+                    $link_opts \
+
+            ;;
         esac
 
         close_tag Configuration
 
-        open_tag  Configuration \
-                      Name="Release|$plat" \
-                      OutputDirectory="\$(SolutionDir)$plat_no_ws/\$(ConfigurationName)" \
-                      IntermediateDirectory="$plat_no_ws/\$(ConfigurationName)/${name}" \
-                      ConfigurationType="$vs_ConfigurationType" \
-                      CharacterSet="1" \
-                      WholeProgramOptimization="0"
+        open_tag Configuration \
+            Name="Release|$plat" \
+            OutputDirectory="\$(SolutionDir)$plat_no_ws/\$(ConfigurationName)" \
+            IntermediateDirectory="$plat_no_ws/\$(ConfigurationName)/${name}" \
+            ConfigurationType="$vs_ConfigurationType" \
+            CharacterSet="1" \
+            WholeProgramOptimization="0" \
 
-    case "$target" in
-        x86*) tag       Tool \
-                      Name="VCCLCompilerTool" \
-                      AdditionalIncludeDirectories="$incs" \
-                      PreprocessorDefinitions="WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;$defines" \
-                      RuntimeLibrary="$release_runtime" \
-                      UsePrecompiledHeader="0" \
-                      WarningLevel="3" \
-                      DebugInformationFormat="0" \
-                      Detect64BitPortabilityProblems="true"
+        case "$target" in
+            x86*)
+                case "$name" in
+                    *)
+                        tag Tool \
+                            Name="VCCLCompilerTool" \
+                            AdditionalIncludeDirectories="$incs" \
+                            PreprocessorDefinitions="WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;$defines" \
+                            RuntimeLibrary="$release_runtime" \
+                            UsePrecompiledHeader="0" \
+                            WarningLevel="3" \
+                            DebugInformationFormat="0" \
+                            Detect64BitPortabilityProblems="true" \
 
-                $uses_asm && tag Tool Name="YASM"  IncludePaths="$incs"
-                ;;
+                        $uses_asm && tag Tool Name="YASM"  IncludePaths="$incs"
+                    ;;
                 esac
+            ;;
+        esac
 
         case "$proj_kind" in
             exe)
                 case "$target" in
-                    x86*) tag Tool \
-                                  Name="VCLinkerTool" \
-                                  AdditionalDependencies="$libs \$(NoInherit)" \
-                                  AdditionalLibraryDirectories="$libdirs" \
+                    x86*)
+                        case "$name" in
+                            *)
+                                tag Tool \
+                                    Name="VCLinkerTool" \
+                                    AdditionalDependencies="$libs \$(NoInherit)" \
+                                    AdditionalLibraryDirectories="$libdirs" \
+
+                            ;;
+                        esac
                     ;;
                  esac
             ;;
-        lib)
+            lib)
                 case "$target" in
-                                *) tag Tool \
-                                    Name="VCLibrarianTool" \
-                                    OutputFile="\$(OutDir)/${name}${lib_sfx}.lib" \
-                                ;;
+                    x86*)
+                        tag Tool \
+                            Name="VCLibrarianTool" \
+                            OutputFile="\$(OutDir)/${name}${lib_sfx}.lib" \
+
+                    ;;
                 esac
-        ;;
-        dll) # note differences to debug version: LinkIncremental, AssemblyDebug
-             tag Tool \
-                      Name="VCLinkerTool" \
-                      AdditionalDependencies="\$(NoInherit)" \
-                      LinkIncremental="1" \
-                      GenerateDebugInformation="true" \
-                      TargetMachine="1" \
-                      $link_opts
+            ;;
+            dll) # note differences to debug version: LinkIncremental, AssemblyDebug
+                tag Tool \
+                    Name="VCLinkerTool" \
+                    AdditionalDependencies="\$(NoInherit)" \
+                    LinkIncremental="1" \
+                    GenerateDebugInformation="true" \
+                    TargetMachine="1" \
+                    $link_opts \
+
+            ;;
         esac
 
         close_tag Configuration
@@ -442,9 +465,9 @@
     done
     close_tag Configurations
 
-    open_tag  Files
-    generate_filter srcs   "Source Files"   "cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
-    generate_filter hdrs   "Header Files"   "h;hpp;hxx;hm;inl;inc;xsd"
+    open_tag Files
+    generate_filter srcs   "Source Files"   "c;def;odl;idl;hpj;bat;asm;asmx"
+    generate_filter hdrs   "Header Files"   "h;hm;inl;inc;xsd"
     generate_filter resrcs "Resource Files" "rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
     generate_filter resrcs "Build Files"    "mk"
     close_tag Files
--- a/examples/decoder_tmpl.c
+++ b/examples/decoder_tmpl.c
@@ -19,7 +19,7 @@
 #define VPX_CODEC_DISABLE_COMPAT 1
 #include "vpx/vpx_decoder.h"
 #include "vpx/vp8dx.h"
-#define interface (&vpx_codec_vp8_dx_algo)
+#define interface (vpx_codec_vp8_dx())
 @EXTRA_INCLUDES
 
 
--- a/examples/decoder_tmpl.txt
+++ b/examples/decoder_tmpl.txt
@@ -2,7 +2,7 @@
 #define VPX_CODEC_DISABLE_COMPAT 1
 #include "vpx/vpx_decoder.h"
 #include "vpx/vp8dx.h"
-#define interface (&vpx_codec_vp8_dx_algo)
+#define interface (vpx_codec_vp8_dx())
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DEC_INCLUDES
 
 
--- a/examples/encoder_tmpl.c
+++ b/examples/encoder_tmpl.c
@@ -19,7 +19,7 @@
 #define VPX_CODEC_DISABLE_COMPAT 1
 #include "vpx/vpx_encoder.h"
 #include "vpx/vp8cx.h"
-#define interface (&vpx_codec_vp8_cx_algo)
+#define interface (vpx_codec_vp8_cx())
 #define fourcc    0x30385056
 @EXTRA_INCLUDES
 
--- a/examples/encoder_tmpl.txt
+++ b/examples/encoder_tmpl.txt
@@ -2,7 +2,7 @@
 #define VPX_CODEC_DISABLE_COMPAT 1
 #include "vpx/vpx_encoder.h"
 #include "vpx/vp8cx.h"
-#define interface (&vpx_codec_vp8_cx_algo)
+#define interface (vpx_codec_vp8_cx())
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ENC_INCLUDES
 
 
--- a/examples/simple_decoder.txt
+++ b/examples/simple_decoder.txt
@@ -33,7 +33,7 @@
 ----------------------
 The decoder is initialized by the following code. This is an example for
 the VP8 decoder, but the code is analogous for all algorithms. Replace
-`&vpx_codec_vp8_dx_algo` with a pointer to the interface exposed by the
+`vpx_codec_vp8_dx()` with a pointer to the interface exposed by the
 algorithm you want to use. The `cfg` argument is left as NULL in this
 example, because we want the algorithm to determine the stream
 configuration (width/height) and allocate memory automatically. This
--- a/vp8/encoder/firstpass.c
+++ b/vp8/encoder/firstpass.c
@@ -2494,7 +2494,7 @@
     }
 
     // Calculate the number of bits that should be assigned to the kf group.
-    if ((cpi->bits_left > 0) && ((int)cpi->modified_error_left > 0))
+    if ((cpi->bits_left > 0) && (cpi->modified_error_left > 0.0))
     {
         // Max for a single normal frame (not key frame)
         int max_bits = frame_max_bits(cpi);
--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -5304,9 +5304,12 @@
         {
             long long nanosecs = cpi->source_end_time_stamp
                 - cpi->last_end_time_stamp_seen;
-            double this_fps = 10000000.000 / nanosecs;
 
-            vp8_new_frame_rate(cpi, (7 * cpi->oxcf.frame_rate + this_fps) / 8);
+            if (nanosecs > 0)
+            {
+              double this_fps = 10000000.000 / nanosecs;
+              vp8_new_frame_rate(cpi, (7 * cpi->oxcf.frame_rate + this_fps) / 8);
+            }
 
         }
 
--- a/vp8/vp8_cx_iface.c
+++ b/vp8/vp8_cx_iface.c
@@ -738,7 +738,7 @@
         if (++ctx->fixed_kf_cntr > ctx->cfg.kf_min_dist)
         {
             flags |= VPX_EFLAG_FORCE_KF;
-            ctx->fixed_kf_cntr = 0;
+            ctx->fixed_kf_cntr = 1;
         }
     }
 
--- a/vpx/vp8.h
+++ b/vpx/vp8.h
@@ -36,7 +36,7 @@
  *
  * The set of macros define the control functions of VP8 interface
  */
-enum vp8_dec_control_id
+enum vp8_com_control_id
 {
     VP8_SET_REFERENCE           = 1,    /**< pass in an external frame into decoder to be used as reference frame */
     VP8_COPY_REFERENCE          = 2,    /**< get a copy of reference frame from the decoder */
@@ -45,7 +45,8 @@
     VP8_SET_DBG_COLOR_MB_MODES  = 5,    /**< set which macro block modes to color */
     VP8_SET_DBG_COLOR_B_MODES   = 6,    /**< set which blocks modes to color */
     VP8_SET_DBG_DISPLAY_MV      = 7,    /**< set which motion vector modes to draw */
-    VP8_COMMON_CTRL_ID_MAX
+    VP8_COMMON_CTRL_ID_MAX,
+    VP8_DECODER_CTRL_ID_START   = 256,
 };
 
 /*!\brief post process flags
--- a/vpx/vp8cx.h
+++ b/vpx/vp8cx.h
@@ -24,13 +24,15 @@
 #define VP8CX_H
 #include "vpx/vpx_codec_impl_top.h"
 
-/*!\brief Algorithm interface for VP8
+/*!\name Algorithm interface for VP8
  *
  * This interface provides the capability to encode raw VP8 streams, as would
  * be found in AVI files.
+ * @{
  */
 extern vpx_codec_iface_t  vpx_codec_vp8_cx_algo;
 extern vpx_codec_iface_t* vpx_codec_vp8_cx(void);
+/*!@} - end algorithm interface member group*/
 
 
 #if CONFIG_EXPERIMENTAL
@@ -124,7 +126,10 @@
 
 /*!\brief VP8 encoder control functions
  *
- * The set of macros define the control functions of VP8 encoder interface
+ * This set of macros define the control functions available for the VP8
+ * encoder interface.
+ *
+ * \sa #vpx_codec_control
  */
 enum vp8e_enc_control_id
 {
@@ -134,7 +139,18 @@
     VP8E_SET_ROI_MAP,                /**< control function to pass an ROI map to encoder */
     VP8E_SET_ACTIVEMAP,              /**< control function to pass an Active map to encoder */
     VP8E_SET_SCALEMODE         = 11, /**< control function to set encoder scaling mode */
-    VP8E_SET_CPUUSED           = 13, /**< control function to set vp8 encoder cpuused  */
+    /*!\brief control function to set vp8 encoder cpuused
+     *
+     * Changes in this value influences, among others, the encoder's selection
+     * of motion estimation methods. Values greater than 0 will increase encoder
+     * speed at the expense of quality.
+     * The full set of adjustments can be found in
+     * onyx_if.c:vp8_set_speed_features().
+     * \todo List highlights of the changes at various levels.
+     *
+     * \note Valid range: -16..16 or {-16..-4, 4..16} w/CONFIG_REALTIME_ONLY
+     */
+    VP8E_SET_CPUUSED           = 13,
     VP8E_SET_ENABLEAUTOALTREF,       /**< control function to enable vp8 to automatic set and use altref frame */
     VP8E_SET_NOISE_SENSITIVITY,      /**< control function to set noise sensitivity */
     VP8E_SET_SHARPNESS,              /**< control function to set sharpness */
@@ -151,7 +167,13 @@
     VP8E_SET_ARNR_STRENGTH ,         /**< control function to set the filter strength for the arf */
     VP8E_SET_ARNR_TYPE     ,         /**< control function to set the type of filter to use for the arf*/
     VP8E_SET_TUNING,                 /**< control function to set visual tuning */
-    VP8E_SET_CQ_LEVEL,               /**< control function to set constrained quality level */
+    /*!\brief control function to set constrained quality level
+     *
+     * \attention For this value to be used vpx_codec_enc_cfg_t::g_usage must be
+     *            set to #VPX_CQ.
+     * \note Valid range: 0..63
+     */
+    VP8E_SET_CQ_LEVEL,
 };
 
 /*!\brief vpx 1-D scaling mode
--- a/vpx/vp8dx.h
+++ b/vpx/vp8dx.h
@@ -24,13 +24,15 @@
 #define VP8DX_H
 #include "vpx/vpx_codec_impl_top.h"
 
-/*!\brief Algorithm interface for VP8
+/*!\name Algorithm interface for VP8
  *
  * This interface provides the capability to decode raw VP8 streams, as would
  * be found in AVI files and other non-Flash uses.
+ * @{
  */
 extern vpx_codec_iface_t  vpx_codec_vp8_dx_algo;
 extern vpx_codec_iface_t* vpx_codec_vp8_dx(void);
+/*!@} - end algorithm interface member group*/
 
 /* Include controls common to both the encoder and decoder */
 #include "vp8.h"
@@ -38,21 +40,28 @@
 
 /*!\brief VP8 decoder control functions
  *
- * The set of macros define the control functions of VP8 decoder interface
+ * This set of macros define the control functions available for the VP8
+ * decoder interface.
+ *
+ * \sa #vpx_codec_control
  */
-enum vp8d_dec_control_id
+enum vp8_dec_control_id
 {
-    VP8_DECODER_CTRL_ID_START   = 256,
-    VP8D_GET_LAST_REF_UPDATES,              /**< control function to get info on which reference frames were updated
-                                            by the last decode */
-    VP8D_GET_FRAME_CORRUPTED,               /**< check if the indicated frame is corrupted */
+    /** control function to get info on which reference frames were updated
+     *  by the last decode
+     */
+    VP8D_GET_LAST_REF_UPDATES = VP8_DECODER_CTRL_ID_START,
+
+    /** check if the indicated frame is corrupted */
+    VP8D_GET_FRAME_CORRUPTED,
+
     VP8_DECODER_CTRL_ID_MAX
 } ;
 
 
-/*!\brief VP8 encoder control function parameter type
+/*!\brief VP8 decoder control function parameter type
  *
- * Defines the data types that VP8E control functions take. Note that
+ * Defines the data types that VP8D control functions take. Note that
  * additional common controls are defined in vp8.h
  *
  */