diff options
author | Frank Barchard <fbarchard@chromium.org> | 2018-10-29 12:26:20 -0700 |
---|---|---|
committer | Frank Barchard <fbarchard@chromium.org> | 2018-10-29 19:41:53 +0000 |
commit | c2ae68114a600888e6a26d954da41cc5574825a8 (patch) | |
tree | 126f999267e144bd06bfef30441d5a82088a5f9a /source/convert_from.cc | |
parent | 97ea700d551cdd5ee30f48ceacfb714c33c8a0de (diff) | |
download | libyuv-c2ae68114a600888e6a26d954da41cc5574825a8.tar.gz |
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>
Diffstat (limited to 'source/convert_from.cc')
-rw-r--r-- | source/convert_from.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/convert_from.cc b/source/convert_from.cc index 706067bb..60140cb4 100644 --- a/source/convert_from.cc +++ b/source/convert_from.cc @@ -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; } } |