From f204a9a482d36949286f8ca687019df3b92d175a Mon Sep 17 00:00:00 2001 From: Tim Kopp Date: Fri, 30 May 2014 08:46:08 -0700 Subject: [PATCH] Fixed OUTPUT_YUV_SRC behavior for VP8 By enabling the OUTPUT_YUV_SRC compiler flag, the encoder will write the raw input to bd.yuv. The functionality was mostly implemented, but in its previous state did not compile. Change-Id: Ia331ad0f4c6e6f9f51e8d42cd33ba8cc146b3dbf --- vp8/encoder/onyx_if.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c index e95e44fd5..762b7e345 100644 --- a/vp8/encoder/onyx_if.c +++ b/vp8/encoder/onyx_if.c @@ -2611,9 +2611,8 @@ int vp8_update_entropy(VP8_COMP *cpi, int update) #if OUTPUT_YUV_SRC -void vp8_write_yuv_frame(const char *name, YV12_BUFFER_CONFIG *s) +void vp8_write_yuv_frame(FILE *yuv_file, YV12_BUFFER_CONFIG *s) { - FILE *yuv_file = fopen(name, "ab"); unsigned char *src = s->y_buffer; int h = s->y_height; @@ -2643,12 +2642,9 @@ void vp8_write_yuv_frame(const char *name, YV12_BUFFER_CONFIG *s) src += s->uv_stride; } while (--h); - - fclose(yuv_file); } #endif - static void scale_and_extend_source(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi) { VP8_COMMON *cm = &cpi->common; @@ -3895,7 +3891,7 @@ static void encode_frame_to_data_rate #endif #ifdef OUTPUT_YUV_SRC - vp8_write_yuv_frame(cpi->Source); + vp8_write_yuv_frame(yuv_file, cpi->Source); #endif do