summaryrefslogtreecommitdiffstats
path: root/libavcodec/aacpsy.c
diff options
context:
space:
mode:
authorClaudio Freire <klaussfreire@gmail.com>2016-04-05 23:13:44 -0300
committerClaudio Freire <klaussfreire@gmail.com>2016-04-05 23:13:44 -0300
commit8005b6de4f88c9e3739a3a4ceda4288804788df9 (patch)
tree62d70a122a4def1bd351ef00a4e7336ee3ba5337 /libavcodec/aacpsy.c
parent2c697c650ca7dec27df63984c128beee30aa13b4 (diff)
downloadffmpeg-streaming-8005b6de4f88c9e3739a3a4ceda4288804788df9.zip
ffmpeg-streaming-8005b6de4f88c9e3739a3a4ceda4288804788df9.tar.gz
AAC encoder: fix valgrind errors
Move wi.clipping computation outside of psy_lame_window, LFE channels don't even call that, and make the LFE path also initialize window_type[1] which is needed by analyze_channel
Diffstat (limited to 'libavcodec/aacpsy.c')
-rw-r--r--libavcodec/aacpsy.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/libavcodec/aacpsy.c b/libavcodec/aacpsy.c
index 7453f2d..6dbec3c 100644
--- a/libavcodec/aacpsy.c
+++ b/libavcodec/aacpsy.c
@@ -975,21 +975,6 @@ static FFPsyWindowInfo psy_lame_window(FFPsyContext *ctx, const float *audio,
lame_apply_block_type(pch, &wi, uselongblock);
- /* Calculate input sample maximums and evaluate clipping risk */
- if (audio) {
- for (i = 0; i < AAC_NUM_BLOCKS_SHORT; i++) {
- const float *wbuf = audio + i * AAC_BLOCK_SIZE_SHORT;
- float max = 0;
- int j;
- for (j = 0; j < AAC_BLOCK_SIZE_SHORT; j++)
- max = FFMAX(max, fabsf(wbuf[j]));
- clippings[i] = max;
- }
- } else {
- for (i = 0; i < 8; i++)
- clippings[i] = 0;
- }
-
wi.window_type[1] = prev_type;
if (wi.window_type[0] != EIGHT_SHORT_SEQUENCE) {
float clipping = 0.0f;
OpenPOWER on IntegriCloud