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

Jean-Yves Avenard jyavenard
Sun Apr 4 16:04:38 CEST 2010


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.

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

Let me know if there is any issues with this.

Cheers
Jean-Yves
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libfaad-smpte.patch
Type: application/octet-stream
Size: 3784 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100405/af848a02/attachment.obj>



More information about the ffmpeg-devel mailing list