aboutsummaryrefslogtreecommitdiff
path: root/src/film_grain.h
diff options
context:
space:
mode:
authorBoyuan Yang <byang@debian.org>2022-07-14 15:56:59 -0400
committerBoyuan Yang <byang@debian.org>2022-07-14 15:56:59 -0400
commit1a2e17bd28a068714658551c8c355171ce15dfa0 (patch)
treedb9e739007016850ee355365874a20b07034ef2c /src/film_grain.h
parenta08da9600832caf817125edee2c3206fe24cd5cb (diff)
parentd4dbf19f6b0181ee78034bfe4caf189d1c016998 (diff)
downloadlibgav1-1a2e17bd28a068714658551c8c355171ce15dfa0.tar.gz
libgav1-1a2e17bd28a068714658551c8c355171ce15dfa0.tar.bz2
libgav1-1a2e17bd28a068714658551c8c355171ce15dfa0.zip
Update upstream source from tag 'upstream/0.18.0'
Update to upstream version '0.18.0' with Debian dir a69c1f7f3e7109393a3f9f5f1a2e7a5c3d3eda9f
Diffstat (limited to 'src/film_grain.h')
-rw-r--r--src/film_grain.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/film_grain.h b/src/film_grain.h
index f2c1e93..bda8458 100644
--- a/src/film_grain.h
+++ b/src/film_grain.h
@@ -104,7 +104,9 @@ class FilmGrain {
using Pixel =
typename std::conditional<bitdepth == 8, uint8_t, uint16_t>::type;
static constexpr int kScalingLutLength =
- (kScalingLookupTableSize + kScalingLookupTablePadding) << (bitdepth - 8);
+ (bitdepth == 10)
+ ? (kScalingLookupTableSize + kScalingLookupTablePadding) << 2
+ : kScalingLookupTableSize + kScalingLookupTablePadding;
bool Init();