Author: kostya
Date: Tue Jul  1 18:42:53 2008
New Revision: 2642

Log:
Threshold correction should be performed two times

Modified:
   aacenc/aacpsy.c

Modified: aacenc/aacpsy.c
==============================================================================
--- aacenc/aacpsy.c     (original)
+++ aacenc/aacpsy.c     Tue Jul  1 18:42:53 2008
@@ -420,6 +420,7 @@ static void psy_3gpp_process(AACPsyConte
     for(ch = 0; ch < apc->avctx->channels; ch++){
         float t0, pe, r;
         if(pctx->b[ch] == 0.0f) continue;
+        for(i = 0; i < 2; i++){
         pe = pctx->a[ch] - pctx->b[ch] * 4.0f * 
log2(pow(pctx->thr[ch]/cpe->ch[ch].ics.num_swb, 0.25));
         t0 = pow(2.0, (pctx->a[ch] - pe)        / (4.0 * pctx->b[ch]));
         r  = pow(2.0, (pctx->a[ch] - pe_target) / (4.0 * pctx->b[ch])) - t0;
@@ -427,6 +428,7 @@ static void psy_3gpp_process(AACPsyConte
         //add correction factor to thresholds
         for(g = 0; g < apc->num_bands1024; g++)
             pctx->band[ch][g].thr = modify_thr(pctx->band[ch][g].thr, r);
+        }
     }
 
     //determine scalefactors - 5.6.2
_______________________________________________
FFmpeg-soc mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc

Reply via email to