diff options
author | Boyuan Yang <byang@debian.org> | 2023-11-27 22:46:32 -0500 |
---|---|---|
committer | Boyuan Yang <byang@debian.org> | 2023-11-27 22:46:32 -0500 |
commit | 7fee0fd1b17b4f963fa1db74c3a5fcc3ff142e0d (patch) | |
tree | 4ed468528001d8e80e3be09413ae927ca2ac05ce /src/dsp/arm/film_grain_neon.cc | |
parent | 0d1e75e423265689dd49c7d6023d8bba70ca4d05 (diff) | |
parent | 19564cb4f77660cdb2f980ca619d4b979b9fe342 (diff) | |
download | libgav1-7fee0fd1b17b4f963fa1db74c3a5fcc3ff142e0d.tar.gz libgav1-7fee0fd1b17b4f963fa1db74c3a5fcc3ff142e0d.tar.bz2 libgav1-7fee0fd1b17b4f963fa1db74c3a5fcc3ff142e0d.zip |
Update upstream source from tag 'upstream/0.19.0'
Update to upstream version '0.19.0'
with Debian dir a4233a4a247b06e8d6e36d07d059f03582d97721
Diffstat (limited to 'src/dsp/arm/film_grain_neon.cc')
-rw-r--r-- | src/dsp/arm/film_grain_neon.cc | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/dsp/arm/film_grain_neon.cc b/src/dsp/arm/film_grain_neon.cc index 76e1151..cde887c 100644 --- a/src/dsp/arm/film_grain_neon.cc +++ b/src/dsp/arm/film_grain_neon.cc @@ -682,26 +682,14 @@ inline int16x8_t Clip3(const int16x8_t value, const int16x8_t low, template <int bitdepth, typename Pixel> inline int16x8_t GetScalingFactors(const int16_t scaling_lut[], - const Pixel* source) { + const Pixel* source, + const int valid_range = 8) { int16_t start_vals[8]; static_assert(bitdepth <= kBitdepth10, "NEON Film Grain is not yet implemented for 12bpp."); #if LIBGAV1_MSAN - memset(start_vals, 0, sizeof(start_vals)); + if (valid_range < 8) memset(start_vals, 0, sizeof(start_vals)); #endif - for (int i = 0; i < 8; ++i) { - assert(source[i] < (kScalingLookupTableSize << (bitdepth - kBitdepth8))); - start_vals[i] = scaling_lut[source[i]]; - } - return vld1q_s16(start_vals); -} - -template <int bitdepth, typename Pixel> -inline int16x8_t GetScalingFactors(const int16_t scaling_lut[], - const Pixel* source, const int valid_range) { - int16_t start_vals[8]; - static_assert(bitdepth <= kBitdepth10, - "NEON Film Grain is not yet implemented for 12bpp."); for (int i = 0; i < valid_range; ++i) { assert(source[i] < (kScalingLookupTableSize << (bitdepth - kBitdepth8))); start_vals[i] = scaling_lut[source[i]]; |