UVScale fix for vertical-only scaling

Bug: b/228841445
Change-Id: I0342856e1bfcea69851d718459d66926bb170219
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/3595240
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Miguel Casas-Sanchez <mcasas@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
This commit is contained in:
Frank Barchard 2022-04-19 18:08:03 -07:00 committed by libyuv LUCI CQ
parent 3c0f408607
commit d62ee21e66
6 changed files with 7 additions and 7 deletions

View File

@ -1,6 +1,6 @@
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 1821
Version: 1822
License: BSD
License File: LICENSE

View File

@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_
#define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 1821
#define LIBYUV_VERSION 1822
#endif // INCLUDE_LIBYUV_VERSION_H_

View File

@ -1919,7 +1919,7 @@ void ScalePlane(const uint8_t* src,
int dy = FixedDiv(src_height, dst_height);
// Arbitrary scale vertically, but unscaled horizontally.
ScalePlaneVertical(src_height, dst_width, dst_height, src_stride,
dst_stride, src, dst, 0, 0, dy, 1, filtering);
dst_stride, src, dst, 0, 0, dy, /*bpp=*/1, filtering);
return;
}
if (dst_width <= Abs(src_width) && dst_height <= src_height) {
@ -2013,7 +2013,7 @@ void ScalePlane_16(const uint16_t* src,
int dy = FixedDiv(src_height, dst_height);
// Arbitrary scale vertically, but unscaled horizontally.
ScalePlaneVertical_16(src_height, dst_width, dst_height, src_stride,
dst_stride, src, dst, 0, 0, dy, 1, filtering);
dst_stride, src, dst, 0, 0, dy, /*bpp=*/1, filtering);
return;
}
if (dst_width <= Abs(src_width) && dst_height <= src_height) {

View File

@ -1017,7 +1017,7 @@ static void ScaleARGB(const uint8_t* src,
if (dx == 0x10000 && (x & 0xffff) == 0) {
// Arbitrary scale vertically, but unscaled horizontally.
ScalePlaneVertical(src_height, clip_width, clip_height, src_stride,
dst_stride, src, dst, x, y, dy, 4, filtering);
dst_stride, src, dst, x, y, dy, /*bpp=*/4, filtering);
return;
}
if (filtering && dy < 65536) {

View File

@ -1465,7 +1465,7 @@ void ScalePlaneVertical(int src_height,
int x,
int y,
int dy,
int bpp,
int bpp, // bytes per pixel. 4 for ARGB.
enum FilterMode filtering) {
// TODO(fbarchard): Allow higher bpp.
int dst_width_bytes = dst_width * bpp;

View File

@ -1032,7 +1032,7 @@ static void ScaleUV(const uint8_t* src,
if (dx == 0x10000 && (x & 0xffff) == 0) {
// Arbitrary scale vertically, but unscaled horizontally.
ScalePlaneVertical(src_height, clip_width, clip_height, src_stride,
dst_stride, src, dst, x, y, dy, 4, filtering);
dst_stride, src, dst, x, y, dy, /*bpp=*/2, filtering);
return;
}
if (filtering && (dst_width + 1) / 2 == src_width) {