Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-07-02 05:07:06 +0400
committerMichael Niedermayer <michaelni@gmx.at>2011-07-02 05:24:32 +0400
commit3074f03a074de3aab79639d261cbd0ccc265b5b4 (patch)
tree9710041e852ee69f6de6ef6e6333af82f6ca5931 /libavcodec/ac3dsp.c
parent392acaedcb052fa64386d5d0aea4931386f72d64 (diff)
parent23ce6e72123a40895baaeefeb27c7c18748bd67e (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: get_bits: remove x86 inline asm in A32 bitstream reader doc: Remove outdated information about our issue tracker avidec: Factor out the sync fucntionality. fate-aac: Expand coverage. ac3dsp: add x86-optimized versions of ac3dsp.extract_exponents(). ac3dsp: simplify extract_exponents() now that it does not need to do clipping. ac3enc: clip coefficients after MDCT. ac3enc: add int32_t array clipping function to DSPUtil, including x86 versions. swscale: for >8bit scaling, read in native bit-depth. matroskadec: matroska_read_seek after after EBML_STOP leads to failure. doxygen: fix usage of @file directive in libavutil/{dict,file}.h doxygen: Help doxygen parser to understand the DECLARE_ALIGNED and offsetof macros Conflicts: doc/issue_tracker.txt libavformat/avidec.c libavutil/dict.h libswscale/swscale.c libswscale/utils.c tests/ref/lavfi/pixfmts_scale Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ac3dsp.c')
-rw-r--r--libavcodec/ac3dsp.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/libavcodec/ac3dsp.c b/libavcodec/ac3dsp.c
index 619addc3d5..96bd123e6f 100644
--- a/libavcodec/ac3dsp.c
+++ b/libavcodec/ac3dsp.c
@@ -164,21 +164,8 @@ static void ac3_extract_exponents_c(uint8_t *exp, int32_t *coef, int nb_coefs)
int i;
for (i = 0; i < nb_coefs; i++) {
- int e;
int v = abs(coef[i]);
- if (v == 0)
- e = 24;
- else {
- e = 23 - av_log2(v);
- if (e >= 24) {
- e = 24;
- coef[i] = 0;
- } else if (e < 0) {
- e = 0;
- coef[i] = av_clip(coef[i], -16777215, 16777215);
- }
- }
- exp[i] = e;
+ exp[i] = v ? 23 - av_log2(v) : 24;
}
}