[FFmpeg-devel] [Patch] AAC encoder improvements

Michael Niedermayer michaelni at gmx.at
Sun May 5 19:31:07 CEST 2013


On Sun, May 05, 2013 at 02:01:12PM -0300, Claudio Freire wrote:
> On Sun, May 5, 2013 at 1:30 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Sat, May 04, 2013 at 10:54:25PM -0300, Claudio Freire wrote:
> >> 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).
> >
> > I thought it was enabled by default ...
> > setting it to auto shows a difference but i see no improvment from
> > the patch, PSNR worsens for most files i tried rather
> > Is that expected ?
> 
> Can I have a look at the samples you've tried?

see http://ffmpeg.org/~michael/psnr_loosing_audio/
i tried encoding at 64,128 and 256 kbps:
If someone has a link to a more standard and diverse set of
reference audio samples ...
also note above are just decoded mp3s not raw cd quality audio as
it should be, it was just intended as a quick check for the patch ...


-stddev: 4201.26 PSNR: 23.86 MAXDIFF:55201 bytes: 10580156/ 10584064
+stddev: 4252.98 PSNR: 23.76 MAXDIFF:55201 bytes: 10580156/ 10584064

-stddev: 1815.74 PSNR: 31.15 MAXDIFF:34136 bytes: 10584576/ 10584064
+stddev: 1874.21 PSNR: 30.87 MAXDIFF:37634 bytes: 10584576/ 10584064

-stddev: 2776.54 PSNR: 27.46 MAXDIFF:57966 bytes: 10580156/ 10584064
+stddev: 2787.54 PSNR: 27.42 MAXDIFF:59070 bytes: 10580156/ 10584064

-stddev: 1155.47 PSNR: 35.07 MAXDIFF:26382 bytes: 10584576/ 10584064
+stddev: 1181.16 PSNR: 34.88 MAXDIFF:25794 bytes: 10584576/ 10584064

-stddev: 1092.72 PSNR: 35.56 MAXDIFF:58082 bytes: 10580156/ 10584064
+stddev: 1115.38 PSNR: 35.38 MAXDIFF:56364 bytes: 10580156/ 10584064

-stddev:  444.00 PSNR: 43.38 MAXDIFF:21969 bytes: 10584576/ 10584064
+stddev:  467.76 PSNR: 42.93 MAXDIFF:22754 bytes: 10584576/ 10584064


> And how did you measure PSNR?

tests/tiny_psnr A B 2 -4096

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 2
"100% positive feedback" - "All either got their money back or didnt complain"
"Best seller ever, very honest" - "Seller refunded buyer after failed scam"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130505/ad669b88/attachment.asc>


More information about the ffmpeg-devel mailing list