Commit 6381f913 authored by Nathan Caldwell's avatar Nathan Caldwell Committed by Alex Converse

aacpsy: Replace an if with FFMAX in LAME windowing.

Signed-off-by: 's avatarAlex Converse <alex.converse@gmail.com>
parent 207bf44d
...@@ -823,8 +823,7 @@ static FFPsyWindowInfo psy_lame_window(FFPsyContext *ctx, ...@@ -823,8 +823,7 @@ static FFPsyWindowInfo psy_lame_window(FFPsyContext *ctx,
float const *const pfe = pf + AAC_BLOCK_SIZE_LONG / (AAC_NUM_BLOCKS_SHORT * PSY_LAME_NUM_SUBBLOCKS); float const *const pfe = pf + AAC_BLOCK_SIZE_LONG / (AAC_NUM_BLOCKS_SHORT * PSY_LAME_NUM_SUBBLOCKS);
float p = 1.0f; float p = 1.0f;
for (; pf < pfe; pf++) for (; pf < pfe; pf++)
if (p < fabsf(*pf)) p = FFMAX(p, fabsf(*pf));
p = fabsf(*pf);
pch->prev_energy_subshort[i] = energy_subshort[i + PSY_LAME_NUM_SUBBLOCKS] = p; pch->prev_energy_subshort[i] = energy_subshort[i + PSY_LAME_NUM_SUBBLOCKS] = p;
energy_short[1 + i / PSY_LAME_NUM_SUBBLOCKS] += p; energy_short[1 + i / PSY_LAME_NUM_SUBBLOCKS] += p;
/* NOTE: The indexes below are [i + 3 - 2] in the LAME source. /* NOTE: The indexes below are [i + 3 - 2] in the LAME source.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment