summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_onyx_if.c
diff options
context:
space:
mode:
authorJohn Koleszar <jkoleszar@google.com>2013-05-08 16:19:56 -0700
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2013-05-09 20:14:35 -0700
commit6dab4d205e5c3cb51fc104109359a41f9c1b9111 (patch)
tree9d422431ba1b7d8bc7c4b8f72bcefa944d120b86 /vp9/encoder/vp9_onyx_if.c
parentbeae501e96c47e7546919484314b28a0abcf4eb8 (diff)
downloadlibvpx-6dab4d205e5c3cb51fc104109359a41f9c1b9111.tar
libvpx-6dab4d205e5c3cb51fc104109359a41f9c1b9111.tar.gz
libvpx-6dab4d205e5c3cb51fc104109359a41f9c1b9111.tar.bz2
libvpx-6dab4d205e5c3cb51fc104109359a41f9c1b9111.zip
Fix 4:2:0 assumptions in debug plane output
Fixes some debugging code to be able to write out frames with chroma other than 4:2:0. Change-Id: I5ee3d29e584db1f52d2de344db249e927eff10b7
Diffstat (limited to 'vp9/encoder/vp9_onyx_if.c')
-rw-r--r--vp9/encoder/vp9_onyx_if.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c
index 58f8fdb6f..e55f5551f 100644
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -1941,8 +1941,8 @@ static void generate_psnr_packet(VP9_COMP *cpi) {
pkt.data.psnr.samples[0] = width * height;
pkt.data.psnr.samples[1] = width * height;
- width = (width + 1) / 2;
- height = (height + 1) / 2;
+ width = orig->uv_width;
+ height = orig->uv_height;
sse = calc_plane_error(orig->u_buffer, orig->uv_stride,
recon->u_buffer, recon->uv_stride,
@@ -2096,7 +2096,7 @@ void vp9_write_yuv_rec_frame(VP9_COMMON *cm) {
} while (--h);
src = s->u_buffer;
- h = (cm->height + 1) / 2;
+ h = s->uv_height;
do {
fwrite(src, s->uv_width, 1, yuv_rec_file);
@@ -2104,7 +2104,7 @@ void vp9_write_yuv_rec_frame(VP9_COMMON *cm) {
} while (--h);
src = s->v_buffer;
- h = (cm->height + 1) / 2;
+ h = s->uv_height;
do {
fwrite(src, s->uv_width, 1, yuv_rec_file);