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

Benjamin Larsson banan
Sun Apr 4 23:03:26 CEST 2010


Jean-Yves Avenard wrote:
> 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.

What we have is waveformatex order. I did not look at the patch. But if
the output matches the native channel order then the code does what it
should do. The patch has a unneeded hunk in there though.

> 
> 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.

Not true. Look how the native decoder maps channel layouts. But maybe we
shouldn't care to much as the faad decoder might be deprecated soon. The
 most significant feature is Parametric stereo. I'd say we commit
something like this while we wait for the native decoder to get PS support.

MvH
Benjamin Larsson



More information about the ffmpeg-devel mailing list