ref: f204a9a482d36949286f8ca687019df3b92d175a
parent: d009c2360e899c13690dae679787243481d56379
author: Tim Kopp <[email protected]>
date: Fri May 30 04:46:08 EDT 2014
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
--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -2611,9 +2611,8 @@
#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 @@
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 @@
#endif
#ifdef OUTPUT_YUV_SRC
- vp8_write_yuv_frame(cpi->Source);
+ vp8_write_yuv_frame(yuv_file, cpi->Source);
#endif
do