shithub: libvpx

Download patch

ref: 3c85c532bb768c11d36d5fe4a3b5e3f980185a2c
parent: 9f41a8b0aaca8380a566b02c82d1a377da42ae33
parent: fa3e530bcac03bf5dfc4aea381336a50eea23f23
author: John Koleszar <jkoleszar@google.com>
date: Thu Sep 22 07:18:00 EDT 2011

Merge changes Ie650e9b8,I2427e494

* changes:
  vpxenc: get version string programatically
  Install missing default_coef_probs.h

--- a/vp8/vp8_common.mk
+++ b/vp8/vp8_common.mk
@@ -19,6 +19,7 @@
 VP8_COMMON_SRCS-yes += common/blockd.c
 VP8_COMMON_SRCS-yes += common/coefupdateprobs.h
 VP8_COMMON_SRCS-yes += common/debugmodes.c
+VP8_COMMON_SRCS-yes += common/default_coef_probs.h
 VP8_COMMON_SRCS-yes += common/entropy.c
 VP8_COMMON_SRCS-yes += common/entropymode.c
 VP8_COMMON_SRCS-yes += common/entropymv.c
--- a/vpxenc.c
+++ b/vpxenc.c
@@ -32,7 +32,6 @@
 #include <fcntl.h>
 #include <unistd.h>
 #endif
-#include "vpx_version.h"
 #include "vpx/vp8cx.h"
 #include "vpx_ports/mem_ops.h"
 #include "vpx_ports/vpx_timer.h"
@@ -624,7 +623,19 @@
         //segment info
         EbmlLoc startInfo;
         uint64_t frame_time;
+        char version_string[64];
 
+        /* Assemble version string */
+        if(ebml->debug)
+            strcpy(version_string, "vpxenc");
+        else
+        {
+            strcpy(version_string, "vpxenc ");
+            strncat(version_string,
+                    vpx_codec_version_str(),
+                    sizeof(version_string) - 1 - strlen(version_string));
+        }
+
         frame_time = (uint64_t)1000 * ebml->framerate.den
                      / ebml->framerate.num;
         ebml->segment_info_pos = ftello(ebml->stream);
@@ -632,10 +643,8 @@
         Ebml_SerializeUnsigned(ebml, TimecodeScale, 1000000);
         Ebml_SerializeFloat(ebml, Segment_Duration,
                             ebml->last_pts_ms + frame_time);
-        Ebml_SerializeString(ebml, 0x4D80,
-            ebml->debug ? "vpxenc" : "vpxenc" VERSION_STRING);
-        Ebml_SerializeString(ebml, 0x5741,
-            ebml->debug ? "vpxenc" : "vpxenc" VERSION_STRING);
+        Ebml_SerializeString(ebml, 0x4D80, version_string);
+        Ebml_SerializeString(ebml, 0x5741, version_string);
         Ebml_EndSubElement(ebml, &startInfo);
     }
 }
--