[FFmpeg-soc] [soc]: r2843 - aacenc/aacpsy.c

kostya subversion at mplayerhq.hu
Thu Jul 24 11:58:47 CEST 2008


Author: kostya
Date: Thu Jul 24 11:58:47 2008
New Revision: 2843

Log:
Make sure scalefactors stay in range

Modified:
   aacenc/aacpsy.c

Modified: aacenc/aacpsy.c
==============================================================================
--- aacenc/aacpsy.c	(original)
+++ aacenc/aacpsy.c	Thu Jul 24 11:58:47 2008
@@ -601,7 +601,7 @@ static void psy_3gpp_process(AACPsyConte
         }
         for(g = 0; g < apc->num_bands1024; g++){
             if(cpe->ch[ch].zeroes[0][g]) continue;
-            cpe->ch[ch].sf_idx[0][g] = SCALE_ONE_POS + cpe->ch[ch].sf_idx[0][g];
+            cpe->ch[ch].sf_idx[0][g] = av_clip(SCALE_ONE_POS + cpe->ch[ch].sf_idx[0][g], 0, SCALE_MAX_POS);
             if(!cpe->ch[ch].gain) cpe->ch[ch].gain = cpe->ch[ch].sf_idx[0][g];
         }
     }



More information about the FFmpeg-soc mailing list