]> granicus.if.org Git - libvpx/commitdiff
Clean up writing YUV files for debug purpose.
authorJerome Jiang <jianj@google.com>
Mon, 14 Aug 2017 20:57:51 +0000 (13:57 -0700)
committerJerome Jiang <jianj@google.com>
Tue, 15 Aug 2017 17:44:03 +0000 (10:44 -0700)
Change legacy vp8/9_write_yuv_frame to vpx_write_yuv_files.
Delete some flags that can be enabled during build.

To enable writing denoised YUV, use the following command line:
CFLAGS='-DOUTPUT_YUV_DENOISED' ./configure
--enable-vp9-temporal-denoising

For skinmap, use CFLAGS='-DOUTPUT_YUV_SKINMAP'

Change-Id: I236974ac8b3cf279d20c4dc7f6162d8b480b6528

vp8/encoder/onyx_if.c
vp9/encoder/vp9_denoiser.c
vp9/encoder/vp9_encoder.c
vpx_dsp/skin_detection.h

index 042d33ed062a45ae1d516776710887822082086a..f68fa22af134652571facaf205745d353f207e85 100644 (file)
@@ -37,6 +37,7 @@
 #include "vp8/common/threading.h"
 #include "vpx_ports/system_state.h"
 #include "vpx_ports/vpx_timer.h"
+#include "vpx_util/vpx_write_yuv_frame.h"
 #if ARCH_ARM
 #include "vpx_ports/arm.h"
 #endif
@@ -3902,7 +3903,7 @@ static void encode_frame_to_data_rate(VP8_COMP *cpi, size_t *size,
 #endif
 
 #ifdef OUTPUT_YUV_SRC
-  vp8_write_yuv_frame(yuv_file, cpi->Source);
+  vpx_write_yuv_frame(yuv_file, cpi->Source);
 #endif
 
   do {
@@ -4483,7 +4484,7 @@ static void encode_frame_to_data_rate(VP8_COMP *cpi, size_t *size,
   update_reference_frames(cpi);
 
 #ifdef OUTPUT_YUV_DENOISED
-  vp8_write_yuv_frame(yuv_denoised_file,
+  vpx_write_yuv_frame(yuv_denoised_file,
                       &cpi->denoiser.yv12_running_avg[INTRA_FRAME]);
 #endif
 
@@ -4832,7 +4833,7 @@ static void encode_frame_to_data_rate(VP8_COMP *cpi, size_t *size,
 #endif
 
   /* DEBUG */
-  /* vp8_write_yuv_frame("encoder_recon.yuv", cm->frame_to_show); */
+  /* vpx_write_yuv_frame("encoder_recon.yuv", cm->frame_to_show); */
 }
 #if !CONFIG_REALTIME_ONLY
 static void Pass2Encode(VP8_COMP *cpi, size_t *size, unsigned char *dest,
index 3069f10e6fe3a7dc0698d8055190f57d9a45d2ba..5ecf15d2af04a5b7a5f3dbf8180d4d9ac84e0f0f 100644 (file)
@@ -21,8 +21,6 @@
 #include "vp9/encoder/vp9_denoiser.h"
 #include "vp9/encoder/vp9_encoder.h"
 
-// OUTPUT_YUV_DENOISED
-
 #ifdef OUTPUT_YUV_DENOISED
 static void make_grayscale(YV12_BUFFER_CONFIG *yuv);
 #endif
index 17fbe076324ec6f400131ffd6025756f2e7b5c7e..63e1a21d7681690500761fb0f656eb40cce91f80 100644 (file)
@@ -71,7 +71,6 @@
                                        // mv. Choose a very high value for
                                        // now so that HIGH_PRECISION is always
                                        // chosen.
-// #define OUTPUT_YUV_REC
 
 #define FRAME_SIZE_FACTOR 128  // empirical params for context model threshold
 #define FRAME_RATE_FACTOR 8
@@ -4396,8 +4395,8 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi, size_t *size,
 #if CONFIG_VP9_TEMPORAL_DENOISING
 #ifdef OUTPUT_YUV_DENOISED
   if (oxcf->noise_sensitivity > 0 && denoise_svc(cpi)) {
-    vp9_write_yuv_frame_420(&cpi->denoiser.running_avg_y[INTRA_FRAME],
-                            yuv_denoised_file);
+    vpx_write_yuv_frame(yuv_denoised_file,
+                        &cpi->denoiser.running_avg_y[INTRA_FRAME]);
   }
 #endif
 #endif
index 0f87bb5214603c2096acefa92b257defee6bdfcc..a2e99baf7e7ca6fa91a7335cd924f0c7f142413c 100644 (file)
@@ -15,8 +15,6 @@
 extern "C" {
 #endif
 
-// #define OUTPUT_YUV_SKINMAP
-
 int vpx_skin_pixel(const int y, const int cb, const int cr, int motion);
 
 #ifdef __cplusplus