diff options
author | Frank Barchard <fbarchard@google.com> | 2020-12-25 12:29:44 -0800 |
---|---|---|
committer | Frank Barchard <fbarchard@chromium.org> | 2020-12-26 20:23:13 +0000 |
commit | 1d3f901aa016d42b5bc0148be2ef6c0fd56f3b81 (patch) | |
tree | 381aa593078a33a02b213618983605b50c62a4dc /source/scale_common.cc | |
parent | 058746415698c6e101442c2b3e95f50832281671 (diff) | |
download | libyuv-1d3f901aa016d42b5bc0148be2ef6c0fd56f3b81.tar.gz |
Scale bug fix with msan when scaling up in height and down in width with box filter.
runyuv3 Scale*Rotate_Box --libyuv_width=200 --libyuv_height=50
Bug: chromium:1158178, libyuv:875, b/176195584
Change-Id: Ic9a380179433bf3dffb951e7b5563491592d5aa5
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/2603877
Reviewed-by: Eugene Zemtsov <eugene@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Diffstat (limited to 'source/scale_common.cc')
-rw-r--r-- | source/scale_common.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/scale_common.cc b/source/scale_common.cc index fd4cbd03..81959925 100644 --- a/source/scale_common.cc +++ b/source/scale_common.cc @@ -1412,8 +1412,8 @@ enum FilterMode ScaleFilterReduce(int src_width, src_height = -src_height; } if (filtering == kFilterBox) { - // If scaling both axis to 0.5 or larger, switch from Box to Bilinear. - if (dst_width * 2 >= src_width && dst_height * 2 >= src_height) { + // If scaling either axis to 0.5 or larger, switch from Box to Bilinear. + if (dst_width * 2 >= src_width || dst_height * 2 >= src_height) { filtering = kFilterBilinear; } } |