From ebd9e130f0418b0ba67369663b1850285406fedf Mon Sep 17 00:00:00 2001 From: Wan-Teh Chang Date: Fri, 25 Mar 2022 08:23:07 -0700 Subject: [PATCH] Fix bugs in I010AlphaToARGBMatrixBilinear() Add a missing increment of src_a and ARGBAttenuateRow() call. Bug: libyuv:922 Change-Id: I26e04e70c6a1a231cbe54b60c249f4c2e8af112a Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/3549976 Reviewed-by: Mirko Bonadei Commit-Queue: Wan-Teh Chang --- README.chromium | 2 +- include/libyuv/version.h | 2 +- source/convert_argb.cc | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.chromium b/README.chromium index 5b7b1eeb7..95800e810 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 1815 +Version: 1816 License: BSD License File: LICENSE diff --git a/include/libyuv/version.h b/include/libyuv/version.h index 0a5a12d19..426e7423e 100644 --- a/include/libyuv/version.h +++ b/include/libyuv/version.h @@ -11,6 +11,6 @@ #ifndef INCLUDE_LIBYUV_VERSION_H_ #define INCLUDE_LIBYUV_VERSION_H_ -#define LIBYUV_VERSION 1815 +#define LIBYUV_VERSION 1816 #endif // INCLUDE_LIBYUV_VERSION_H_ diff --git a/source/convert_argb.cc b/source/convert_argb.cc index beebe9b49..11cda0787 100644 --- a/source/convert_argb.cc +++ b/source/convert_argb.cc @@ -6443,6 +6443,7 @@ static int I010AlphaToARGBMatrixBilinear( } dst_argb += dst_stride_argb; src_y += src_stride_y; + src_a += src_stride_a; for (y = 0; y < height - 2; y += 2) { Scale2RowUp(src_u, src_stride_u, temp_u_1, kRowSize, width); @@ -6472,6 +6473,9 @@ static int I010AlphaToARGBMatrixBilinear( Scale2RowUp(src_v, 0, temp_v_1, kRowSize, width); I410AlphaToARGBRow(src_y, temp_u_1, temp_v_1, src_a, dst_argb, yuvconstants, width); + if (attenuate) { + ARGBAttenuateRow(dst_argb, dst_argb, width); + } } free_aligned_buffer_64(row);