[FFmpeg-cvslog] r12284 - trunk/libavcodec/ac3dec.c

Rich Felker dalias
Sun Mar 2 01:43:55 CET 2008


On Sat, Mar 01, 2008 at 07:30:13PM -0500, Justin Ruggles wrote:
> Rich Felker wrote:
> > On Sat, Mar 01, 2008 at 09:30:11AM -0500, Justin Ruggles wrote:
> >> So obviously the biggest area for improvement is in the downmixing.
> >> Today, I am planning on trying to move the conversion to int16 to before
> >> downmixing and doing the downmix in fixed-point.  I'm not sure if it
> >> will be faster though until I test it out.
> > 
> > Does the downmix take place before or after IMDCT? It should take
> > place before so that the unnecessary DCT steps are skipped.
> 
> The downmix is currently after the IMDCT.  The problem with downmixing
> before the IMDCT is that it only works if all channels within the block
> use the same transform length.  There are ways to convert between the
> 512-point and 256-point coefficients, but I have not delved into the
> math on this.

Well it's definitely worthwhile. Performance without pre-IMDCT downmix
will always be significantly worse than with pre-IMDCT downmix,
regardless of what other optimizations you do.

> Another solution could be to check if all the block switch flags are the
> same for all channels, and order the downmix and IMDCT accordingly.
> I'll try it.

This is a cheap solution for the time being, but really, aside from
scaling issues, the transformation between 256- and 512-point should
just involve appending a lot of zero coefficients. AFAIK MPlayer's
liba52 does the pre-IMDCT downmix and I don't see any reason why it
should be difficult.

Rich




More information about the ffmpeg-cvslog mailing list