shithub: libvpx

Download patch

ref: fee146e60b1143a2434ff3695083155618240645
parent: 1799f2f81dc0da5359139ff4375fbe29772f0e37
author: Ronald S. Bultje <[email protected]>
date: Mon Oct 12 12:35:32 EDT 2015

vp10: don't write tile size marker bit if CONFIG_MISC_FIXES=0.

Change-Id: I41b13b8767e30da391c2c4da9a729ca7292b16b9

--- a/vp10/encoder/bitstream.c
+++ b/vp10/encoder/bitstream.c
@@ -1348,14 +1348,19 @@
 #endif
 
 void vp10_pack_bitstream(VP10_COMP *const cpi, uint8_t *dest, size_t *size) {
-  VP10_COMMON *const cm = &cpi->common;
   uint8_t *data = dest;
   size_t first_part_size, uncompressed_hdr_size;
   struct vpx_write_bit_buffer wb = {data, 0};
   struct vpx_write_bit_buffer saved_wb;
   unsigned int max_tile, data_sz;
+#if CONFIG_MISC_FIXES
+  VP10_COMMON *const cm = &cpi->common;
   const int n_log2_tiles = cm->log2_tile_rows + cm->log2_tile_cols;
   const int have_tiles = n_log2_tiles > 0;
+#else
+  const int have_tiles = 0;  // we have tiles, but we don't want to write a
+                             // tile size marker in the header
+#endif
 
   write_uncompressed_header(cpi, &wb);
   saved_wb = wb;