[FFmpeg-cvslog] aacenc_tns: do not limit the filter size

Rostislav Pehlivanov git at videolan.org
Sat Aug 29 23:07:09 CEST 2015


ffmpeg | branch: master | Rostislav Pehlivanov <atomnuker at gmail.com> | Sat Aug 29 21:59:38 2015 +0100| [21bfeec27f933e18e7aac52ec025831353f47430] | committer: Rostislav Pehlivanov

aacenc_tns: do not limit the filter size

This was copied from the decoder, but is unneeded for the encoder.
tns_max_bands is unused and set to zero which zeroed out start, end
and size and thus no filter was actually applied.

Signed-off-by: Rostislav Pehlivanov <atomnuker at gmail.com>

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

 libavcodec/aacenc_tns.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/libavcodec/aacenc_tns.c b/libavcodec/aacenc_tns.c
index cf75b8a..d4d10e6 100644
--- a/libavcodec/aacenc_tns.c
+++ b/libavcodec/aacenc_tns.c
@@ -119,7 +119,6 @@ static void process_tns_coeffs(TemporalNoiseShaping *tns, double *coef_raw,
 /* Apply TNS filter */
 void ff_aac_apply_tns(SingleChannelElement *sce)
 {
-    const int mmm = FFMIN(sce->ics.tns_max_bands, sce->ics.max_sfb);
     float *coef = sce->pcoeffs;
     TemporalNoiseShaping *tns = &sce->tns;
     int w, filt, m, i;
@@ -136,8 +135,8 @@ void ff_aac_apply_tns(SingleChannelElement *sce)
             if (!order)
                 continue;
 
-            start = sce->ics.swb_offset[FFMIN(bottom, mmm)];
-            end   = sce->ics.swb_offset[FFMIN(   top, mmm)];
+            start = sce->ics.swb_offset[bottom];
+            end   = sce->ics.swb_offset[top];
             if ((size = end - start) <= 0)
                 continue;
             if (tns->direction[w][filt]) {



More information about the ffmpeg-cvslog mailing list