summaryrefslogtreecommitdiffstats
path: root/libavcodec/aaccoder.c
diff options
context:
space:
mode:
authorRostislav Pehlivanov <atomnuker@gmail.com>2015-08-21 18:36:09 +0100
committerRostislav Pehlivanov <atomnuker@gmail.com>2015-08-21 18:36:09 +0100
commite6c9f3a166adb46855ae5ae3e3757a69f9b1c972 (patch)
tree341397e3a66b5ce7b163030b2b7f16805b65ba2f /libavcodec/aaccoder.c
parent32be264cea542b4dc721b10092bf1dfe511a28ee (diff)
downloadffmpeg-streaming-e6c9f3a166adb46855ae5ae3e3757a69f9b1c972.zip
ffmpeg-streaming-e6c9f3a166adb46855ae5ae3e3757a69f9b1c972.tar.gz
aacenc: reset special bands in the main frame encoding function
This commit moves the resetting of special bands (above RESERVED_BT) to the main frame encoding function rather than the way it was done previously in their corresponding search_for_... functions. The reason why special bands need to be reset is that while normal bands get chosen for every frame by the coder (twoloop by default) the coders do not touch any special sfbs and will therefore make them persist throughout the file. If we zero them out any bands left unmarked will be chosen by the second part of the coder (the trellis function in aaccoder.c). Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Diffstat (limited to 'libavcodec/aaccoder.c')
-rw-r--r--libavcodec/aaccoder.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c
index 24ea48e..88a78ea 100644
--- a/libavcodec/aaccoder.c
+++ b/libavcodec/aaccoder.c
@@ -1081,11 +1081,6 @@ static void search_for_pns(AACEncContext *s, AVCodecContext *avctx, SingleChanne
const float spread_threshold = NOISE_SPREAD_THRESHOLD*(lambda/120.f);
const float thr_mult = NOISE_LAMBDA_NUMERATOR/lambda;
- /* Coders !twoloop don't reset the band_types */
- for (w = 0; w < 128; w++)
- if (sce->band_type[w] == NOISE_BT)
- sce->band_type[w] = 0;
-
for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) {
start = 0;
for (g = 0; g < sce->ics.num_swb; g++) {
OpenPOWER on IntegriCloud