[FFmpeg-soc] [soc]: r2968 - aacenc/aacpsy.c
kostya
subversion at mplayerhq.hu
Fri Aug 1 11:58:17 CEST 2008
Author: kostya
Date: Fri Aug 1 11:58:17 2008
New Revision: 2968
Log:
Handle ABR better
Modified:
aacenc/aacpsy.c
Modified: aacenc/aacpsy.c
==============================================================================
--- aacenc/aacpsy.c (original)
+++ aacenc/aacpsy.c Fri Aug 1 11:58:17 2008
@@ -703,10 +703,10 @@ static void psy_3gpp_process(AACPsyConte
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 * chans;
}else{
- bits_avail = pctx->avg_bits;
+ pe_target = pctx->avg_bits / apc->avctx->channels * chans;
}
- pe_target = 1.18f * bits_avail / apc->avctx->channels * chans;
for(i = 0; i < 2; i++){
float t0, pe, r, a0 = 0.0f, pe0 = 0.0f, b0 = 0.0f;
for(ch = 0; ch < chans; ch++){
More information about the FFmpeg-soc
mailing list