[FFmpeg-soc] [soc]: r2174 - aac/aac.c

superdump subversion at mplayerhq.hu
Wed May 21 14:16:57 CEST 2008


Author: superdump
Date: Wed May 21 14:16:56 2008
New Revision: 2174

Log:
Check TNS is present before calling tns_filter_tool rather than checking inside
the function


Modified:
   aac/aac.c

Modified: aac/aac.c
==============================================================================
--- aac/aac.c	(original)
+++ aac/aac.c	Wed May 21 14:16:56 2008
@@ -1645,7 +1645,6 @@ static void tns_filter_tool(AACContext *
     int bottom, top, order, start, end, size, inc;
     float tmp;
     float lpc[TNS_MAX_ORDER + 1], b[2 * TNS_MAX_ORDER];
-    if (!tns->present) return;
 
     for (w = 0; w < ics->num_windows; w++) {
         bottom = ics->num_swb;
@@ -1708,7 +1707,7 @@ static void tns_filter_tool(AACContext *
 }
 
 static void tns_trans(AACContext * ac, sce_struct * sce) {
-    tns_filter_tool(ac, 1, sce, sce->coeffs);
+    if(sce->tns->present) tns_filter_tool(ac, 1, sce, sce->coeffs);
 }
 
 #ifdef AAC_LTP
@@ -1758,7 +1757,7 @@ static void ltp_trans(AACContext * ac, s
             x_est[i] = (float)sce->ltp_state[i + 2 * 1024 - ltp->lag] * ltp->coef;
 
         window_ltp_tool(ac, sce, x_est, X_est);
-        tns_filter_tool(ac, 0, sce, X_est);
+        if(sce->tns->present) tns_filter_tool(ac, 0, sce, X_est);
 
         for (sfb = 0; sfb < FFMIN(sce->ics.max_sfb, MAX_LTP_LONG_SFB); sfb++)
             if (ltp->used[sfb])



More information about the FFmpeg-soc mailing list