shithub: libvpx

Download patch

ref: 854e41f0571d8f6eb4cbc448ccabb021b0b886d7
parent: 1761a6b55a0138ad12e3d9e7a5bfc415a7f6b538
author: John Koleszar <jkoleszar@google.com>
date: Tue Nov 13 10:20:40 EST 2012

Don't write recon.yuv by default

CONFIG_DEBUG was turning on some code to dump the reconstructed frame
to a buffer from within the decoder. Move this code to a more specific
debugging define.

Change-Id: I3ca9ea634bdbd186f2470bd644d3695ee0ab3037

--- a/vp9/decoder/onyxd_if.c
+++ b/vp9/decoder/onyxd_if.c
@@ -35,7 +35,8 @@
 static int get_free_fb(VP9_COMMON *cm);
 static void ref_cnt_fb(int *buf, int *idx, int new_idx);
 
-#if CONFIG_DEBUG
+#define WRITE_RECON_BUFFER 0
+#if WRITE_RECON_BUFFER == 1
 static void recon_write_yuv_frame(char *name, YV12_BUFFER_CONFIG *s) {
   FILE *yuv_file = fopen((char *)name, "ab");
   unsigned char *src = s->y_buffer;
@@ -65,8 +66,7 @@
   fclose(yuv_file);
 }
 #endif
-#define WRITE_RECON_BUFFER 0
-#if WRITE_RECON_BUFFER
+#if WRITE_RECON_BUFFER == 2
 void write_dx_frame_to_file(YV12_BUFFER_CONFIG *frame, int this_frame) {
 
   // write the frame
@@ -413,7 +413,7 @@
       return -1;
     }
 
-#if WRITE_RECON_BUFFER
+#if WRITE_RECON_BUFFER == 2
     if (cm->show_frame)
       write_dx_frame_to_file(cm->frame_to_show,
                              cm->current_video_frame);
@@ -429,7 +429,7 @@
     vp8_yv12_extend_frame_borders(cm->frame_to_show);
   }
 
-#if CONFIG_DEBUG
+#if WRITE_RECON_BUFFER == 1
   if (cm->show_frame)
     recon_write_yuv_frame("recon.yuv", cm->frame_to_show);
 #endif