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

kostya subversion at mplayerhq.hu
Thu Jul 3 12:48:34 CEST 2008


Author: kostya
Date: Thu Jul  3 12:48:33 2008
New Revision: 2668

Log:
Do not use too many bits at once

Modified:
   aacenc/aacpsy.c

Modified: aacenc/aacpsy.c
==============================================================================
--- aacenc/aacpsy.c	(original)
+++ aacenc/aacpsy.c	Thu Jul  3 12:48:33 2008
@@ -463,6 +463,7 @@ static void psy_3gpp_process(AACPsyConte
     //TODO: add more that first step estimation
     pctx->reservoir += pctx->avg_bits - apc->avctx->frame_bits;
     bits_avail = pctx->avg_bits + pctx->reservoir;
+    bits_avail = FFMIN(bits_avail, pctx->avg_bits * 1.5);
     pe_target = 1.18f * bits_avail / apc->avctx->channels / 1024.0f;
     for(ch = 0; ch < apc->avctx->channels; ch++){
         float t0, pe, r;



More information about the FFmpeg-soc mailing list