mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-13 18:40:03 +01:00
qdm2: check and reset dithering index per channel
Checking per subband would have the index exceed the
dithering noise table size.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 744a11c996)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Conflicts:
libavcodec/qdm2.c
This commit is contained in:
@@ -784,8 +784,6 @@ static void synthfilt_build_sb_samples (QDM2Context *q, GetBitContext *gb, int l
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (sb = sb_min; sb < sb_max; sb++) {
|
for (sb = sb_min; sb < sb_max; sb++) {
|
||||||
FIX_NOISE_IDX(q->noise_idx);
|
|
||||||
|
|
||||||
channels = q->nb_channels;
|
channels = q->nb_channels;
|
||||||
|
|
||||||
if (q->nb_channels <= 1 || sb < 12)
|
if (q->nb_channels <= 1 || sb < 12)
|
||||||
@@ -809,6 +807,7 @@ static void synthfilt_build_sb_samples (QDM2Context *q, GetBitContext *gb, int l
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (ch = 0; ch < channels; ch++) {
|
for (ch = 0; ch < channels; ch++) {
|
||||||
|
FIX_NOISE_IDX(q->noise_idx);
|
||||||
zero_encoding = (BITS_LEFT(length,gb) >= 1) ? get_bits1(gb) : 0;
|
zero_encoding = (BITS_LEFT(length,gb) >= 1) ? get_bits1(gb) : 0;
|
||||||
type34_predictor = 0.0;
|
type34_predictor = 0.0;
|
||||||
type34_first = 1;
|
type34_first = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user