mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
avcodec/siren: Factorize category 5 and 6 noise computation
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
1208872946
commit
e847cabb60
@ -625,7 +625,7 @@ static int decode_vector(SirenContext *s, int number_of_regions,
|
|||||||
|
|
||||||
coefs_ptr = coefs + (region * REGION_SIZE);
|
coefs_ptr = coefs + (region * REGION_SIZE);
|
||||||
|
|
||||||
if (category == 5) {
|
if (category == 5 || category == 6) {
|
||||||
i = 0;
|
i = 0;
|
||||||
for (j = 0; j < REGION_SIZE; j++) {
|
for (j = 0; j < REGION_SIZE; j++) {
|
||||||
if (*coefs_ptr != 0)
|
if (*coefs_ptr != 0)
|
||||||
@ -633,15 +633,10 @@ static int decode_vector(SirenContext *s, int number_of_regions,
|
|||||||
coefs_ptr++;
|
coefs_ptr++;
|
||||||
}
|
}
|
||||||
|
|
||||||
noise = decoder_standard_deviation[region] * noise_category5[i];
|
if (category == 5) {
|
||||||
} else if (category == 6) {
|
noise = decoder_standard_deviation[region] * noise_category5[i];
|
||||||
i = 0;
|
} else
|
||||||
for (j = 0; j < REGION_SIZE; j++) {
|
noise = decoder_standard_deviation[region] * noise_category6[i];
|
||||||
if (*coefs_ptr++ != 0)
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
|
|
||||||
noise = decoder_standard_deviation[region] * noise_category6[i];
|
|
||||||
} else if (category == 7) {
|
} else if (category == 7) {
|
||||||
noise = decoder_standard_deviation[region] * 0.70711f;
|
noise = decoder_standard_deviation[region] * 0.70711f;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user