Commit 630c8ed1 authored by Frank Barchard's avatar Frank Barchard Committed by Commit Bot

Fix for ScaleDownBy4_Linear_16

The unittest compares the results of 8 and 16 bit scaling
and expects them to be the same.  This CL makes the 16 bit
scaling filter logic match.

Bug: libyuv:749
Test: LibYUVScaleTest.DISABLED_ScaleDownBy4_Linear_16
Change-Id: Ifb3ca4d770ef38f9f16abe9b9aeb843b779bf371
Reviewed-on: https://chromium-review.googlesource.com/772370Reviewed-by: 's avatarWeiyong Yao <braveyao@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@google.com>
parent 3cf056f8
......@@ -1700,7 +1700,7 @@ void ScalePlane_16(const uint16* src,
CopyPlane_16(src, src_stride, dst, dst_stride, dst_width, dst_height);
return;
}
if (dst_width == src_width) {
if (dst_width == src_width && filtering != kFilterBox) {
int dy = FixedDiv(src_height, dst_height);
// Arbitrary scale vertically, but unscaled vertically.
ScalePlaneVertical_16(src_height, dst_width, dst_height, src_stride,
......@@ -1729,7 +1729,7 @@ void ScalePlane_16(const uint16* src,
return;
}
if (4 * dst_width == src_width && 4 * dst_height == src_height &&
filtering != kFilterBilinear) {
(filtering == kFilterBox || filtering == kFilterNone)) {
// optimized, 1/4
ScalePlaneDown4_16(src_width, src_height, dst_width, dst_height,
src_stride, dst_stride, src, dst, filtering);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment