[FFmpeg-devel] PATCH: 5.1 AAC SMPTE channel order with libfaad

Måns Rullgård mans
Sun Apr 4 23:26:06 CEST 2010

Jean-Yves Avenard <jyavenard at gmail.com> writes:

> Hi
> Now that ffmpeg has moved all its decoder to use SMPTE channel order
> (great by the way); that leaves a remaining problem when using the
> external libfaad...
> The patch attached re-order the channels when 5.1 audio is decoded to
> SMPTE order.
> It also fixed an issue with 24 bits audio, 24 bits audio in libfaad is
> encoded just like what ffmpeg does ; on a 32 bits unsigned integer ;
> and as such a sample takes 4 bytes, not 3.
> I'm new at providing patches for ffmpeg ; I tried to respect the
> coding standard you guys use. I exploded the main loop for speed
> reasons.

This kind of code doesn't belong in individual codecs.

> I made the assumptions that a 6 channels stream must be 5.1
> (left/right/center/LFE/surround left/surround right); which would be
> true in 99.99% of the cases I assume, furthermore other speakers
> configuration wouldn't be supported by ffmpeg anyway, and as such,
> impossible to convert properly.
> Looking at how rarely libfaad has been updated ; I'm assuming that
> there is little interest for libfaad ; but unfortunately libfaad is
> required in many cases as it handles more format than ffmpeg's own
> decoder. In particular, MythTV for debian/ubuntu is compiled by
> default with --enable-libfaad

The libfaad wrapper should be dropped in the near future (when PS is
implemented).  Time spent on it now is likely wasted.

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list