mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-08 01:36:47 +08:00
Fix for AVX2 crash in I420ToRGB24
I422ToRGB24 is implemented as a C wrapper for Intel, calling I422ToARGB and ARGBToRGB24. The ARGBToRGB24 for AVX2 requires 32 pixels. This CL increases the width alignment required to use I422ToRGB24_AVX2 TBR=rrwinterton0gmail.com Bug: libyuv:822, b:118386049 Change-Id: I4454f4eece33fbd5f593655f577c9ef5c00d1f63 Tested: locally tested with app that crashed using this function. Reviewed-on: https://chromium-review.googlesource.com/c/1299931 Reviewed-by: Frank Barchard <fbarchard@chromium.org> Commit-Queue: Frank Barchard <fbarchard@chromium.org>
This commit is contained in:
parent
97ea700d55
commit
c2ae68114a
@ -284,9 +284,8 @@ extern "C" {
|
||||
(defined(CLANG_HAS_AVX2) || defined(GCC_HAS_AVX2))
|
||||
#define HAS_ABGRTOAR30ROW_AVX2
|
||||
#define HAS_ARGBTOAR30ROW_AVX2
|
||||
// Fix AVX2 b:118386049 segfault
|
||||
//#define HAS_ARGBTORAWROW_AVX2
|
||||
//#define HAS_ARGBTORGB24ROW_AVX2
|
||||
#define HAS_ARGBTORAWROW_AVX2
|
||||
#define HAS_ARGBTORGB24ROW_AVX2
|
||||
#define HAS_CONVERT16TO8ROW_AVX2
|
||||
#define HAS_CONVERT8TO16ROW_AVX2
|
||||
#define HAS_I210TOAR30ROW_AVX2
|
||||
@ -304,8 +303,7 @@ extern "C" {
|
||||
#if !defined(LIBYUV_DISABLE_X86) && \
|
||||
(defined(__x86_64__) || (defined(__i386__) && !defined(_MSC_VER))) && \
|
||||
(defined(CLANG_HAS_AVX512))
|
||||
// Fix AVX2 b:118386049 segfault
|
||||
//#define HAS_ARGBTORGB24ROW_AVX512VBMI
|
||||
#define HAS_ARGBTORGB24ROW_AVX512VBMI
|
||||
#endif
|
||||
|
||||
// The following are available on Neon platforms:
|
||||
|
||||
@ -11,6 +11,6 @@
|
||||
#ifndef INCLUDE_LIBYUV_VERSION_H_
|
||||
#define INCLUDE_LIBYUV_VERSION_H_
|
||||
|
||||
#define LIBYUV_VERSION 1722
|
||||
#define LIBYUV_VERSION 1723
|
||||
|
||||
#endif // INCLUDE_LIBYUV_VERSION_H_
|
||||
|
||||
@ -670,7 +670,7 @@ static int I420ToRGB24Matrix(const uint8_t* src_y,
|
||||
#if defined(HAS_I422TORGB24ROW_SSSE3)
|
||||
if (TestCpuFlag(kCpuHasSSSE3)) {
|
||||
I422ToRGB24Row = I422ToRGB24Row_Any_SSSE3;
|
||||
if (IS_ALIGNED(width, 8)) {
|
||||
if (IS_ALIGNED(width, 16)) {
|
||||
I422ToRGB24Row = I422ToRGB24Row_SSSE3;
|
||||
}
|
||||
}
|
||||
@ -678,7 +678,7 @@ static int I420ToRGB24Matrix(const uint8_t* src_y,
|
||||
#if defined(HAS_I422TORGB24ROW_AVX2)
|
||||
if (TestCpuFlag(kCpuHasAVX2)) {
|
||||
I422ToRGB24Row = I422ToRGB24Row_Any_AVX2;
|
||||
if (IS_ALIGNED(width, 16)) {
|
||||
if (IS_ALIGNED(width, 32)) {
|
||||
I422ToRGB24Row = I422ToRGB24Row_AVX2;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user