shithub: libvpx

Download patch

ref: b5164f55a016b32d15356f9db0dc181672a208b2
parent: 96797e43b4a1c00a00c39998ca56e2348b6e18ad
author: James Zern <[email protected]>
date: Tue Jul 19 16:45:28 EDT 2016

vp8: simplify a few #if's

bitstream.c: asserts are disabled when CONFIG_DEBUG is unset
vp8_dx_iface.c: split |s into 2 statements across #if bounds

Change-Id: I307d1e969134db5c9c0edd7690589b6b29116cbd

--- a/vp8/encoder/bitstream.c
+++ b/vp8/encoder/bitstream.c
@@ -568,14 +568,9 @@
 
               blockmode = cpi->mb.partition_info->bmi[j].mode;
               blockmv = cpi->mb.partition_info->bmi[j].mv;
-#if CONFIG_DEBUG
               while (j != L[++k]) {
-                if (k >= 16) assert(0);
+                assert(k < 16);
               }
-#else
-              while (j != L[++k])
-                ;
-#endif
               leftmv.as_int = left_block_mv(m, k);
               abovemv.as_int = above_block_mv(m, k, mis);
               mv_contz = vp8_mv_cont(&leftmv, &abovemv);
--- a/vp8/vp8_dx_iface.c
+++ b/vp8/vp8_dx_iface.c
@@ -473,17 +473,15 @@
     vp8_zero(flags);
 
     if (ctx->base.init_flags & VPX_CODEC_USE_POSTPROC) {
-      flags.post_proc_flag =
-          ctx->postproc_cfg.post_proc_flag
+      flags.post_proc_flag = ctx->postproc_cfg.post_proc_flag;
 #if CONFIG_POSTPROC_VISUALIZER
-
-          | ((ctx->dbg_color_ref_frame_flag != 0) ? VP8D_DEBUG_CLR_FRM_REF_BLKS
-                                                  : 0) |
+      flags.post_proc_flag |=
+          ((ctx->dbg_color_ref_frame_flag != 0) ? VP8D_DEBUG_CLR_FRM_REF_BLKS
+                                                : 0) |
           ((ctx->dbg_color_mb_modes_flag != 0) ? VP8D_DEBUG_CLR_BLK_MODES : 0) |
           ((ctx->dbg_color_b_modes_flag != 0) ? VP8D_DEBUG_CLR_BLK_MODES : 0) |
-          ((ctx->dbg_display_mv_flag != 0) ? VP8D_DEBUG_DRAW_MV : 0)
+          ((ctx->dbg_display_mv_flag != 0) ? VP8D_DEBUG_DRAW_MV : 0);
 #endif
-          ;
       flags.deblocking_level = ctx->postproc_cfg.deblocking_level;
       flags.noise_level = ctx->postproc_cfg.noise_level;
 #if CONFIG_POSTPROC_VISUALIZER