[FFmpeg-cvslog] aacpsy: Replace an if with FFMAX in LAME windowing.

Nathan Caldwell git at videolan.org
Tue Jan 24 03:04:44 CET 2012


ffmpeg | branch: master | Nathan Caldwell <saintdev at gmail.com> | Sat Jan  7 14:21:35 2012 -0700| [6381f913d19d78513bab06fad7c50548975475a3] | committer: Alex Converse

aacpsy: Replace an if with FFMAX in LAME windowing.

Signed-off-by: Alex Converse <alex.converse at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6381f913d19d78513bab06fad7c50548975475a3
---

 libavcodec/aacpsy.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/libavcodec/aacpsy.c b/libavcodec/aacpsy.c
index 04feea3..577d8fb 100644
--- a/libavcodec/aacpsy.c
+++ b/libavcodec/aacpsy.c
@@ -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 p = 1.0f;
             for (; pf < pfe; pf++)
-                if (p < fabsf(*pf))
-                    p = fabsf(*pf);
+                p = FFMAX(p, fabsf(*pf));
             pch->prev_energy_subshort[i] = energy_subshort[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.



More information about the ffmpeg-cvslog mailing list