diff options
author | James Almer <[email protected]> | 2025-09-29 22:33:38 -0300 |
---|---|---|
committer | James Almer <[email protected]> | 2025-10-01 01:26:19 +0000 |
commit | 7ce3a1449637fda17a2e3ce6623ea3b23b5127d8 (patch) | |
tree | 5b4c2641014ba4e5903ad8bb82c9f0429fc77eaf | |
parent | 776ee0799017e3c926cfbaa47aab6ba412babf48 (diff) |
avcodec/apv_entropy: use av_zero_extend()
Signed-off-by: James Almer <[email protected]>
-rw-r--r-- | libavcodec/apv_entropy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/apv_entropy.c b/libavcodec/apv_entropy.c index 1cab88d547..30f31a14ff 100644 --- a/libavcodec/apv_entropy.c +++ b/libavcodec/apv_entropy.c @@ -288,7 +288,7 @@ int ff_apv_entropy_decode_block(int16_t *restrict coeff, // Extract the low bits. low_bit_count = leading_zeroes; low_bit_shift = 16 - (1 + 2 * leading_zeroes); - low_bits = (bits >> low_bit_shift) & ((1 << low_bit_count) - 1); + low_bits = av_zero_extend(bits >> low_bit_shift, low_bit_count); // Construct run code. run = 2 + ((1 << leading_zeroes) - 1) + low_bits; // Skip over the bits just used. @@ -460,7 +460,7 @@ int ff_apv_entropy_decode_block(int16_t *restrict coeff, // Extract the low bits. low_bit_count = leading_zeroes + k_run; low_bit_shift = 16 - (1 + 2 * leading_zeroes + k_run); - low_bits = (bits >> low_bit_shift) & ((1 << low_bit_count) - 1); + low_bits = av_zero_extend(bits >> low_bit_shift, low_bit_count); // Construct run code. run = (2 << k_run) + ((1 << leading_zeroes) - 1) * (1 << k_run) + |