ref: e254969df2632954395a2d4b02996a4fef1fa288
parent: f1a300acc4e2af7f4407492a59a7063e6d2ad37d
author: Jerome Jiang <jianj@google.com>
date: Wed May 31 11:56:29 EDT 2017
Fix corruption in skin map debugging output yuv. For both vp8 and vp9. BUG=webm:1437 Change-Id: Ifd06f68a876ade91cc2cc27c574c4641b77cce28
--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -2488,7 +2488,7 @@
defined(OUTPUT_YUV_SKINMAP)
void vp8_write_yuv_frame(FILE *yuv_file, YV12_BUFFER_CONFIG *s) {
unsigned char *src = s->y_buffer;
- int h = s->y_height;
+ int h = s->y_crop_height;
do {
fwrite(src, s->y_width, 1, yuv_file);
@@ -2496,7 +2496,7 @@
} while (--h);
src = s->u_buffer;
- h = s->uv_height;
+ h = s->uv_crop_height;
do {
fwrite(src, s->uv_width, 1, yuv_file);
@@ -2504,7 +2504,7 @@
} while (--h);
src = s->v_buffer;
- h = s->uv_height;
+ h = s->uv_crop_height;
do {
fwrite(src, s->uv_width, 1, yuv_file);
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -2588,7 +2588,7 @@
// denoising we will have to modify this.
void vp9_write_yuv_frame_420(YV12_BUFFER_CONFIG *s, FILE *f) {
uint8_t *src = s->y_buffer;
- int h = s->y_height;
+ int h = s->y_crop_height;
do {
fwrite(src, s->y_width, 1, f);
@@ -2596,7 +2596,7 @@
} while (--h);
src = s->u_buffer;
- h = s->uv_height;
+ h = s->uv_crop_height;
do {
fwrite(src, s->uv_width, 1, f);
@@ -2604,7 +2604,7 @@
} while (--h);
src = s->v_buffer;
- h = s->uv_height;
+ h = s->uv_crop_height;
do {
fwrite(src, s->uv_width, 1, f);