mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-06 15:49:50 +08:00
ac3enc: clip coefficients after MDCT.
This ensures that any processing between the MDCT and exponent extraction will be using clipped coefficients.
This commit is contained in:
@ -104,6 +104,15 @@ static void scale_coefficients(AC3EncodeContext *s)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Clip MDCT coefficients to allowable range.
|
||||
*/
|
||||
static void clip_coefficients(DSPContext *dsp, int32_t *coef, unsigned int len)
|
||||
{
|
||||
dsp->vector_clip_int32(coef, coef, COEF_MIN, COEF_MAX, len);
|
||||
}
|
||||
|
||||
|
||||
static av_cold int ac3_fixed_encode_init(AVCodecContext *avctx)
|
||||
{
|
||||
AC3EncodeContext *s = avctx->priv_data;
|
||||
|
Reference in New Issue
Block a user