vp8 postproc: expand CONFIG_POSTPROC guard
authorJohann <johannkoenig@google.com>
Thu, 15 Sep 2016 22:59:42 +0000 (15:59 -0700)
committerJohann Koenig <johannkoenig@google.com>
Fri, 16 Sep 2016 03:52:19 +0000 (03:52 +0000)
postproc.c is overloaded and used for both postproc and internal stats.
If only --enable-internal-stats is specified there are issues with
non-existent struct members and unused functions.

Change-Id: I82367f1ffce659c3918c9f964dbce94a716fbb89

vp8/common/postproc.c

index c3d9265..1c4e042 100644 (file)
@@ -83,6 +83,7 @@ extern void vp8_blit_line(int x0, int x1, int y0, int y1, unsigned char *image,
                           const int pitch);
 /***********************************************************************************************************
  */
+#if CONFIG_POSTPROC
 static int q2mbl(int x) {
   if (x < 20) x = 20;
 
@@ -90,7 +91,6 @@ static int q2mbl(int x) {
   return x * x / 3;
 }
 
-#if CONFIG_POSTPROC
 static void vp8_de_mblock(YV12_BUFFER_CONFIG *post, int q) {
   vpx_mbpost_proc_across_ip(post->y_buffer, post->y_stride, post->y_height,
                             post->y_width, q2mbl(q));
@@ -154,7 +154,6 @@ void vp8_deblock(VP8_COMMON *cm, YV12_BUFFER_CONFIG *source,
     vp8_yv12_copy_frame(source, post);
   }
 }
-#endif
 
 void vp8_de_noise(VP8_COMMON *cm, YV12_BUFFER_CONFIG *source,
                   YV12_BUFFER_CONFIG *post, int q, int low_var_thresh, int flag,
@@ -189,6 +188,7 @@ void vp8_de_noise(VP8_COMMON *cm, YV12_BUFFER_CONFIG *source,
     }
   }
 }
+#endif  // CONFIG_POSTPROC
 
 /* Blend the macro block with a solid colored square.  Leave the
  * edges unblended to give distinction to macro blocks in areas