shithub: libvpx

Download patch

ref: f215c641bb0e3245302fe60e6f98a4583da59c54
parent: f16b186b8ead1ff7ddac7d3d00b3bab2f829c946
parent: d24f4e49c104c2489bc1e6402370170e1762cddf
author: Dmitry Kovalev <dkovalev@google.com>
date: Fri Jan 3 06:47:57 EST 2014

Merge changes Ic0a2427a,I3addbf6d

* changes:
  Removing CONFIG_MD5.
  Using VP9_FRAME_MARKER instead of raw number.

--- a/configure
+++ b/configure
@@ -32,7 +32,6 @@
                                   supported by hardware [auto]
   ${toggle_codec_srcs}            in/exclude codec library source code
   ${toggle_debug_libs}            in/exclude debug version of libraries
-  ${toggle_md5}                   support for output of checksum data
   ${toggle_static_msvcrt}         use static MSVCRT (VS builds only)
   ${toggle_vp8}                   VP8 codec support
   ${toggle_vp9}                   VP9 codec support
@@ -184,7 +183,6 @@
 enable_feature static
 enable_feature optimizations
 enable_feature fast_unaligned #allow unaligned accesses, if supported by hw
-enable_feature md5
 enable_feature spatial_resampling
 enable_feature multithread
 enable_feature os_support
@@ -279,7 +277,6 @@
     mem_manager
     mem_tracker
     mem_checks
-    md5
 
     dequant_tokens
     dc_recon
@@ -336,7 +333,6 @@
     fast_unaligned
     codec_srcs
     debug_libs
-    md5
 
     dequant_tokens
     dc_recon
--- a/vp9/vp9_dx_iface.c
+++ b/vp9/vp9_dx_iface.c
@@ -160,7 +160,8 @@
     struct vp9_read_bit_buffer rb = { data, data + data_sz, 0, NULL, NULL };
     const int frame_marker = vp9_rb_read_literal(&rb, 2);
     const int version = vp9_rb_read_bit(&rb) | (vp9_rb_read_bit(&rb) << 1);
-    if (frame_marker != 0x2) return VPX_CODEC_UNSUP_BITSTREAM;
+    if (frame_marker != VP9_FRAME_MARKER)
+      return VPX_CODEC_UNSUP_BITSTREAM;
 #if CONFIG_NON420
     if (version > 1) return VPX_CODEC_UNSUP_BITSTREAM;
 #else
--- a/vpxdec.c
+++ b/vpxdec.c
@@ -29,9 +29,7 @@
 #include "vpx/vp8dx.h"
 #endif
 
-#if CONFIG_MD5
 #include "./md5_utils.h"
-#endif
 
 #include "./tools_common.h"
 #include "./webmdec.h"
@@ -95,17 +93,14 @@
     ARG_DEF(NULL, "frame-buffers-lru", 1, "Turn on/off frame buffer lru");
 
 
-#if CONFIG_MD5
 static const arg_def_t md5arg = ARG_DEF(NULL, "md5", 0,
                                         "Compute the MD5 sum of the decoded frame");
-#endif
+
 static const arg_def_t *all_args[] = {
   &codecarg, &use_yv12, &use_i420, &flipuvarg, &noblitarg,
   &progressarg, &limitarg, &skiparg, &postprocarg, &summaryarg, &outputfile,
   &threadsarg, &verbosearg, &scalearg, &fb_arg, &fb_lru_arg,
-#if CONFIG_MD5
   &md5arg,
-#endif
   &error_concealment,
   NULL
 };
@@ -236,11 +231,9 @@
   void *out = NULL;
 
   if (do_md5) {
-#if CONFIG_MD5
     MD5Context *md5_ctx = out = malloc(sizeof(MD5Context));
     (void)out_fn;
     MD5Init(md5_ctx);
-#endif
   } else {
     FILE *outfile = out = strcmp("-", out_fn) ? fopen(out_fn, "wb")
                           : set_binary_mode(stdout);
@@ -255,9 +248,7 @@
 
 void out_put(void *out, const uint8_t *buf, unsigned int len, int do_md5) {
   if (do_md5) {
-#if CONFIG_MD5
     MD5Update(out, buf, len);
-#endif
   } else {
     (void) fwrite(buf, 1, len, out);
   }
@@ -265,7 +256,6 @@
 
 void out_close(void *out, const char *out_fn, int do_md5) {
   if (do_md5) {
-#if CONFIG_MD5
     uint8_t md5[16];
     int i;
 
@@ -276,7 +266,6 @@
       printf("%02x", md5[i]);
 
     printf("  %s\n", out_fn);
-#endif
   } else {
     fclose(out);
   }