From e906ba9fe9df1cdc32307dbb1dcb1223d41bfd56 Mon Sep 17 00:00:00 2001 From: Frank Barchard Date: Fri, 17 Jun 2022 04:33:18 -0700 Subject: [PATCH] InterpolateRow_Any test if fraction is 0 and dont memcpy 2nd row. Bug: b/228605787 Change-Id: Ia8912e4c1599401320ee82882a2593e78bf56582 Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/3708833 Reviewed-by: Wan-Teh Chang Commit-Queue: Frank Barchard --- README.chromium | 2 +- include/libyuv/version.h | 2 +- source/row_any.cc | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.chromium b/README.chromium index 8461a1218..cf0aef02c 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 1828 +Version: 1829 License: BSD License File: LICENSE diff --git a/include/libyuv/version.h b/include/libyuv/version.h index 8f09ccd2b..dadcea516 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 1828 +#define LIBYUV_VERSION 1829 #endif // INCLUDE_LIBYUV_VERSION_H_ diff --git a/source/row_any.cc b/source/row_any.cc index 3e95b2df4..17a7cddea 100644 --- a/source/row_any.cc +++ b/source/row_any.cc @@ -1636,7 +1636,10 @@ ANY11C(UYVYToARGBRow_Any_LSX, UYVYToARGBRow_LSX, 1, 4, 4, 7) ANY_SIMD(dst_ptr, src_ptr, src_stride, n, source_y_fraction); \ } \ memcpy(temp, src_ptr + n * SBPP, r * SBPP * sizeof(T)); \ - memcpy(temp + 64, src_ptr + src_stride + n * SBPP, r * SBPP * sizeof(T)); \ + if (source_y_fraction) { \ + memcpy(temp + 64, src_ptr + src_stride + n * SBPP, \ + r * SBPP * sizeof(T)); \ + } \ ANY_SIMD(temp + 128, temp, 64, MASK + 1, source_y_fraction); \ memcpy(dst_ptr + n * BPP, temp + 128, r * BPP * sizeof(T)); \ }