mirror of https://git.ffmpeg.org/ffmpeg.git
ac3dec: use get_sbits() instead of manually sign-extending
Signed-off-by: Mans Rullgard <mans@mansr.com>
This commit is contained in:
parent
84dda40762
commit
633ddb8519
|
@ -505,9 +505,9 @@ static void ac3_decode_transform_coeffs_ch(AC3DecodeContext *s, int ch_index, ma
|
|||
mantissa = b5_mantissas[get_bits(gbc, 4)];
|
||||
break;
|
||||
default: /* 6 to 15 */
|
||||
mantissa = get_bits(gbc, quantization_tab[bap]);
|
||||
/* Shift mantissa and sign-extend it. */
|
||||
mantissa = (mantissa << (32-quantization_tab[bap]))>>8;
|
||||
mantissa = get_sbits(gbc, quantization_tab[bap]);
|
||||
mantissa <<= 24 - quantization_tab[bap];
|
||||
break;
|
||||
}
|
||||
coeffs[freq] = mantissa >> exps[freq];
|
||||
|
|
Loading…
Reference in New Issue