shithub: libvpx

Download patch

ref: 01016ff9a60bbf3c2f742661138db08ee6801a4f
parent: 9f39ab66dd6b4d0f515be733553ff28f420b0238
author: John Koleszar <jkoleszar@google.com>
date: Wed Jun 12 06:09:56 EDT 2013

Fix chroma output when scaling

The encode-side scaling was not indexing through the image correctly
for the chroma planes, causing a green checkerboard-like output in
the unit test.

Change-Id: I9abbd73615404cd6699588be3e64dcf59005bc14

--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -2146,7 +2146,7 @@
         const int dst_stride = dst_strides[i];
         uint8_t *src = srcs[i] + y / factor * in_h / out_h * src_stride +
                                  x / factor * in_w / out_w;
-        uint8_t *dst = dsts[i] + y * dst_stride + x;
+        uint8_t *dst = dsts[i] + y / factor * dst_stride + x / factor;
 
         vp9_convolve8(src, src_stride, dst, dst_stride,
                       vp9_sub_pel_filters_8[x_q4 & 0xf], 16 * in_w / out_w,