diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2011-02-10 22:12:16 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-02-11 02:54:10 +0100 |
commit | 943dc942659c61b273ba219d5891af6e7510c8b3 (patch) | |
tree | bd7fb04973d28e9978e1e5ecb5834d63b1238409 | |
parent | 95234e051bbde20bb580fd8e7b1c8dc54773d332 (diff) | |
download | ffmpeg-943dc942659c61b273ba219d5891af6e7510c8b3.tar.gz |
ac3enc: Remove unneeded clipping of shift amount.
s->windowed_samples will always have a range of [-32767,32767] due to the
window function, so the return value from log2_tab() will always be in the
range [0,14].
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 626264b11b5406c0c78c4056cabb63cb650e9bf2)
-rw-r--r-- | libavcodec/ac3enc_fixed.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/libavcodec/ac3enc_fixed.c b/libavcodec/ac3enc_fixed.c index ff400b8aaf..0db41dff2d 100644 --- a/libavcodec/ac3enc_fixed.c +++ b/libavcodec/ac3enc_fixed.c @@ -309,7 +309,6 @@ static void lshift_tab(int16_t *tab, int n, unsigned int lshift) static int normalize_samples(AC3EncodeContext *s) { int v = 14 - log2_tab(s->windowed_samples, AC3_WINDOW_SIZE); - v = FFMAX(0, v); lshift_tab(s->windowed_samples, AC3_WINDOW_SIZE, v); return v - 9; } |