The branch, master has been updated
via 5511641365b83afa6449ae0b89d01b78556d941d (commit)
via 7ce3a1449637fda17a2e3ce6623ea3b23b5127d8 (commit)
via 776ee0799017e3c926cfbaa47aab6ba412babf48 (commit)
from 8e11e2cdb82299e7f0b6d8884bf2bc65c1c3f5e8 (commit)
- Log -----------------------------------------------------------------
commit 5511641365b83afa6449ae0b89d01b78556d941d
Author: James Almer <[email protected]>
AuthorDate: Mon Sep 29 22:33:49 2025 -0300
Commit: James Almer <[email protected]>
CommitDate: Wed Oct 1 01:26:19 2025 +0000
avcodec/atrac9dec: use av_zero_extend()
Signed-off-by: James Almer <[email protected]>
diff --git a/libavcodec/atrac9dec.c b/libavcodec/atrac9dec.c
index 0748d671f1..3c18ae8b42 100644
--- a/libavcodec/atrac9dec.c
+++ b/libavcodec/atrac9dec.c
@@ -285,7 +285,7 @@ static inline int read_scalefactors(ATRAC9Context *s,
ATRAC9BlockData *b,
for (int i = 1; i < b->band_ext_q_unit; i++) {
int val = c->scalefactors[i - 1] + get_vlc2(gb, tab,
ATRAC9_SF_VLC_BITS, 1);
- c->scalefactors[i] = val & ((1 << len) - 1);
+ c->scalefactors[i] = av_zero_extend(val, len);
}
for (int i = 0; i < b->band_ext_q_unit; i++)
@@ -339,7 +339,7 @@ static inline int read_scalefactors(ATRAC9Context *s,
ATRAC9BlockData *b,
for (int i = 1; i < unit_cnt; i++) {
int val = c->scalefactors[i - 1] + get_vlc2(gb, tab,
ATRAC9_SF_VLC_BITS, 1);
- c->scalefactors[i] = val & ((1 << len) - 1);
+ c->scalefactors[i] = av_zero_extend(val, len);
}
for (int i = 0; i < unit_cnt; i++)
commit 7ce3a1449637fda17a2e3ce6623ea3b23b5127d8
Author: James Almer <[email protected]>
AuthorDate: Mon Sep 29 22:33:38 2025 -0300
Commit: James Almer <[email protected]>
CommitDate: Wed Oct 1 01:26:19 2025 +0000
avcodec/apv_entropy: use av_zero_extend()
Signed-off-by: James Almer <[email protected]>
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) +
commit 776ee0799017e3c926cfbaa47aab6ba412babf48
Author: James Almer <[email protected]>
AuthorDate: Mon Sep 29 22:33:27 2025 -0300
Commit: James Almer <[email protected]>
CommitDate: Wed Oct 1 01:26:19 2025 +0000
avcodec/aom_film_grain: use av_zero_extend()
Signed-off-by: James Almer <[email protected]>
diff --git a/libavcodec/aom_film_grain.c b/libavcodec/aom_film_grain.c
index bd9647afe9..a5b692562d 100644
--- a/libavcodec/aom_film_grain.c
+++ b/libavcodec/aom_film_grain.c
@@ -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) {
-----------------------------------------------------------------------
Summary of changes:
libavcodec/aom_film_grain.c | 2 +-
libavcodec/apv_entropy.c | 4 ++--
libavcodec/atrac9dec.c | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
hooks/post-receive
--
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]