[FFmpeg-devel] [Patch] AAC encoder improvements

Claudio Freire klaussfreire at gmail.com
Sun May 5 03:54:25 CEST 2013


On Sat, May 4, 2013 at 10:31 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
>> >>              adjust_frame_information(cpe, chans);
>> >> +            if (cpe->ms_mode) {
>> >> +                /* Re-evaluate psy model and quantization selection based on
>> >> +                   MS-transformed channels */
>> >> +                s->psy.model->analyze(&s->psy, start_ch, coeffs, wi);
>> >> +                for (ch = 0; ch < chans; ch++) {
>> >> +                    s->cur_channel = start_ch * 2 + ch;
>> >> +                    s->coder->search_for_quantizers(avctx, s, &cpe->ch[ch], s->lambda);
>> >> +                }
>> >> +            }
>> >
>> > shouldnt this and the previous hunks be in seperate patches or is
>> > there some dependance ?
>>
>> Well, they're related, as they both pertain to joint stereo, but
>> there's no hard dependency between them, that's true. I did begin with
>> the first hunk, feeling that those artifacts were due to bad choices,
>> and it's not enough on its own. The really important hunk is the
>> second, re-doing quantization.
>
> how can it be tested ?
> there doesnt seem to be a difference in the output with the second
> hunk applied

I imagine you enabled joint stereo? (-stereo_mode auto in ffmpeg)
Without it, the code doesn't do anything. And, of course, stereo input
that can benefit from it (any real track with vocals should).


> Also how can i test the improvment the first hunk produces ?

It's subtle. There's a test clip in lame's test sample set,
castanets[0], that shows some subtle improvement from it.

> can you resubmit the patch without the unrelated changes ?

Attached.

[0] http://lame.sourceforge.net/download/samples/castanets.wv
[0] http://lame.sourceforge.net/download/samples/spahm.wv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-aac-twoloop-quant.patch
Type: application/octet-stream
Size: 2892 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130504/e45bb3a3/attachment.obj>


More information about the ffmpeg-devel mailing list