summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorLynne <dev@lynne.ee>2021-01-09 09:05:18 +0100
committerLynne <dev@lynne.ee>2021-01-14 01:44:17 +0100
commit784c08af3005390cb1d74add13b58edf1663cd40 (patch)
treed53f1df27f6540711721c56130dd048922910716 /libavcodec
parent2d85e6e7230406e33e61d903b9c29ab562e158bd (diff)
ac3enc: do not clip coefficients after transforms
In either encoder, its impossible for the coefficients to go past 25 bits right after the MDCT. Our MDCT is numerically stable. For the floating point encoder, in case a NaN is contained, lrintf() will raise a floating point exception during the conversion.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/ac3enc_template.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/libavcodec/ac3enc_template.c b/libavcodec/ac3enc_template.c
index de6eba71d8..4f1e181e0b 100644
--- a/libavcodec/ac3enc_template.c
+++ b/libavcodec/ac3enc_template.c
@@ -383,9 +383,6 @@ int AC3_NAME(encode_frame)(AVCodecContext *avctx, AVPacket *avpkt,
apply_mdct(s);
- clip_coefficients(&s->adsp, s->blocks[0].mdct_coef[1],
- AC3_MAX_COEFS * s->num_blocks * s->channels);
-
s->cpl_on = s->cpl_enabled;
ff_ac3_compute_coupling_strategy(s);