mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-09 14:14:39 +02:00
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>
This commit is contained in:
parent
d4582889ee
commit
626264b11b
@ -309,7 +309,6 @@ static void lshift_tab(int16_t *tab, int n, unsigned int lshift)
|
|||||||
static int normalize_samples(AC3EncodeContext *s)
|
static int normalize_samples(AC3EncodeContext *s)
|
||||||
{
|
{
|
||||||
int v = 14 - log2_tab(s->windowed_samples, AC3_WINDOW_SIZE);
|
int v = 14 - log2_tab(s->windowed_samples, AC3_WINDOW_SIZE);
|
||||||
v = FFMAX(0, v);
|
|
||||||
lshift_tab(s->windowed_samples, AC3_WINDOW_SIZE, v);
|
lshift_tab(s->windowed_samples, AC3_WINDOW_SIZE, v);
|
||||||
return v - 9;
|
return v - 9;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user