On Wed, May 1, 2013 at 4:26 AM, Claudio Freire <klaussfre...@gmail.com> wrote: >> But still, not perfect... I gave it 256k, and it produced 140k. Lots >> of room for improvement still, but I thought I'd share this bit. I'll >> keep looking. > > > Aaand mostly finally in aaccoder.c:713, search_for_quantizers_twoloop > ignores lambda, so there's no effective rate control. > > > Replacing > > int destbits = avctx->bit_rate * 1024.0 / avctx->sample_rate / > avctx->channels; > > with > > int destbits = avctx->bit_rate * 1024.0 / avctx->sample_rate / > avctx->channels * lambda; > > Results in general bliss. Will check the other search methods.
Ok... I had to forfeit my right to sleep, but here it is. Managed to make both the fast and 2loop methods work reasonably well (albeit I don't know why anyone would use fast, because it's not faster. I assume it's an experiment?). I don't have access to AAC standards, though, since they're paywalled (at least the ones I found), so most of the changes were done blind, assuming from what I know of audio codecs, and by trial and error. In particular, fast has some magic numbers there that I got from trial and error, and nothing more... profound. In any case, attached it is, git diff.
aac_bit_alloc.patch
Description: Binary data
_______________________________________________ Libav-user mailing list Libav-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user