aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ac3dsp.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-05-02 03:37:36 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-05-02 03:45:58 +0200
commitc3f5b8112573245fc5056a49477749df4ed1d0ea (patch)
treed55921b265eca41f50c2dac5b317844d7ad7170d /libavcodec/ac3dsp.c
parent3862ebba23cc9a76a004edd4c12d0b853a0426cd (diff)
parentad1862d64ae28251e2740e437bbc639492a374a0 (diff)
downloadffmpeg-c3f5b8112573245fc5056a49477749df4ed1d0ea.tar.gz
Merge remote branch 'qatar/master'
* qatar/master: ALPHA: Replace sized int_fast integer types with plain int/unsigned. Duplicate DPX image encoder Duplicate DPX decoder: read sample aspect ratio Duplciate DPX decoder: add buffer size checks. ac3enc: clip large coefficient values and negative exponents rather than using av_assert2(). ac3enc: do not store a bandwidth code for each channel. ac3enc: remove bandwidth reduction as fallback for bit allocation failure. ac3enc: merge compute_exp_strategy_ch() into compute_exp_strategy() ac3enc: return error if frame+exponent bits are too large instead of using av_assert2(). ac3enc: differentiate between current block and reference block in bit_alloc() ac3enc: simplify exponent_init() by calculating exponent_group_tab[] based on exponent group sizes. ac3enc: simplify stereo rematrixing decision options Include both URLs: Update URL to fate samples Conflicts: Changelog doc/fate.txt libavcodec/ac3enc.c libavcodec/dpxenc.c libavcodec/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ac3dsp.c')
-rw-r--r--libavcodec/ac3dsp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/ac3dsp.c b/libavcodec/ac3dsp.c
index 0b5b501a27..4ec0f2a19c 100644
--- a/libavcodec/ac3dsp.c
+++ b/libavcodec/ac3dsp.c
@@ -164,8 +164,10 @@ static void ac3_extract_exponents_c(uint8_t *exp, int32_t *coef, int nb_coefs)
if (e >= 24) {
e = 24;
coef[i] = 0;
+ } else if (e < 0) {
+ e = 0;
+ coef[i] = av_clip(coef[i], -16777215, 16777215);
}
- av_assert2(e >= 0);
}
exp[i] = e;
}