diff options
author | Boyuan Yang <byang@debian.org> | 2023-11-27 22:46:29 -0500 |
---|---|---|
committer | Boyuan Yang <byang@debian.org> | 2023-11-27 22:46:29 -0500 |
commit | 19564cb4f77660cdb2f980ca619d4b979b9fe342 (patch) | |
tree | ff97ccd1471553f1e861c8ea747faa45a023e119 /src/dsp/x86/loop_restoration_sse4.cc | |
parent | d4dbf19f6b0181ee78034bfe4caf189d1c016998 (diff) | |
download | libgav1-19564cb4f77660cdb2f980ca619d4b979b9fe342.tar.gz libgav1-19564cb4f77660cdb2f980ca619d4b979b9fe342.tar.bz2 libgav1-19564cb4f77660cdb2f980ca619d4b979b9fe342.zip |
New upstream version 0.19.0
Diffstat (limited to 'src/dsp/x86/loop_restoration_sse4.cc')
-rw-r--r-- | src/dsp/x86/loop_restoration_sse4.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/dsp/x86/loop_restoration_sse4.cc b/src/dsp/x86/loop_restoration_sse4.cc index b4df072..8c24c39 100644 --- a/src/dsp/x86/loop_restoration_sse4.cc +++ b/src/dsp/x86/loop_restoration_sse4.cc @@ -1222,7 +1222,14 @@ inline void LookupIntermediate(const __m128i sum, const __m128i index, // general-purpose register to process. Faster than using _mm_extract_epi8(). uint8_t temp[8]; StoreLo8(temp, idx); - *ma = _mm_insert_epi8(*ma, kSgrMaLookup[temp[0]], offset + 0); + // offset == 0 is assumed to be the first call to this function. The value is + // mov'd to avoid -Wuninitialized warnings under gcc. mov should at least + // equivalent if not faster than pinsrb. + if (offset == 0) { + *ma = _mm_cvtsi32_si128(kSgrMaLookup[temp[0]]); + } else { + *ma = _mm_insert_epi8(*ma, kSgrMaLookup[temp[0]], offset + 0); + } *ma = _mm_insert_epi8(*ma, kSgrMaLookup[temp[1]], offset + 1); *ma = _mm_insert_epi8(*ma, kSgrMaLookup[temp[2]], offset + 2); *ma = _mm_insert_epi8(*ma, kSgrMaLookup[temp[3]], offset + 3); |