From 18f91105162a6ebe7a46ee1c81e9ab67ca97a02b Mon Sep 17 00:00:00 2001 From: Wan-Teh Chang Date: Thu, 14 Apr 2022 15:19:40 -0700 Subject: [PATCH] Avoid AVX instructions in ScaleRowUp2_Linear_SSSE3 The "vpackuswb %%xmm2,%%xmm0,%%xmm0" and "vmovdqu %%xmm0,(%1)" instructions in ScaleRowUp2_Linear_SSSE3() are AVX instructions. They cause an illegal instruction exception on CPUs that do not support AVX. Bug: libyuv:927 Bug: chromium:1312551 Change-Id: I87b2aaf041e7d185e7e8fb07172d4f37482e9d08 Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/3585881 Reviewed-by: Mirko Bonadei Reviewed-by: Frank Barchard Commit-Queue: Wan-Teh Chang --- README.chromium | 2 +- include/libyuv/version.h | 2 +- source/scale_gcc.cc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.chromium b/README.chromium index 2f21be9b7..a96f05296 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 1818 +Version: 1819 License: BSD License File: LICENSE diff --git a/include/libyuv/version.h b/include/libyuv/version.h index 3e43a64c4..475804369 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 1818 +#define LIBYUV_VERSION 1819 #endif // INCLUDE_LIBYUV_VERSION_H_ diff --git a/source/scale_gcc.cc b/source/scale_gcc.cc index 279c5e402..0ac65f351 100644 --- a/source/scale_gcc.cc +++ b/source/scale_gcc.cc @@ -1283,8 +1283,8 @@ void ScaleRowUp2_Linear_SSSE3(const uint8_t* src_ptr, "paddw %%xmm4,%%xmm2 \n" // 3*near+far+2 (hi) "psrlw $2,%%xmm0 \n" // 3/4*near+1/4*far (lo) "psrlw $2,%%xmm2 \n" // 3/4*near+1/4*far (hi) - "vpackuswb %%xmm2,%%xmm0,%%xmm0 \n" - "vmovdqu %%xmm0,(%1) \n" + "packuswb %%xmm2,%%xmm0 \n" + "movdqu %%xmm0,(%1) \n" "lea 0x8(%0),%0 \n" "lea 0x10(%1),%1 \n" // 8 sample to 16 sample