1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-10-06 05:47:18 +02:00

avcodec/aom_film_grain: use av_zero_extend()

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer
2025-09-29 22:33:27 -03:00
parent 8e11e2cdb8
commit 776ee07990

View File

@@ -39,7 +39,7 @@ static inline int get_random_number(const int bits, unsigned *const state) {
unsigned bit = ((r >> 0) ^ (r >> 1) ^ (r >> 3) ^ (r >> 12)) & 1;
*state = (r >> 1) | (bit << 15);
return (*state >> (16 - bits)) & ((1 << bits) - 1);
return av_zero_extend(*state >> (16 - bits), bits);
}
static inline int round2(const int x, const uint64_t shift) {