[FFmpeg-devel] [PATCH/RFC] avcodec/aacdec: default to non-wide 7.1 in non-strict mode

Michael Niedermayer michaelni at gmx.at
Tue Dec 17 23:51:38 CET 2013


On Tue, Dec 17, 2013 at 11:04:31PM +0200, Anssi Hannula wrote:
> AAC specification has 7.1(wide) as a default layout for 8-channel
> streams (channel config 7). However, at least Nero AAC encoder encodes
> non-wide 7.1 streams using the default channel config 7, mapping the
> side channels of the original audio stream to the second
> AAC_CHANNEL_FRONT pair in the AAC stream. Similarly, e.g. FAAD decodes
> the second AAC_CHANNEL_FRONT pair as side channels, therefore decoding
> the incorrect streams as if they were correct (and as the encoder
> intended).
> 
> FFmpeg currently decodes such files by-the-spec, i.e. after decoding the
> original front pair will be in AV_CH_FRONT_x_OF_CENTER and the original
> side pair will be in AV_CH_FRONT_x.
> 
> As actual intended 7.1(wide) streams are very rare while misencoded 7.1
> files actually exist in the wild, default to assuming a 7.1 layout was
> intended unless in strict mode.
> 
> Fixes playback of e.g. 8_Channel_ID.m4a in samples.
> 
> Signed-off-by: Anssi Hannula <anssi.hannula at iki.fi>
> ---
> 
> In my opinion this is something we should do, since I didn't find any
> AAC 7.1(wide) files in-the-wild that weren't actually misencoded 7.1
> streams, and since they are unfortunately "correctly" decoded by FAAD
> (and therefore e.g. VLC). Also, most non-wide AAC 7.1 files in the wild
> seem to be misencoded like this instead of correctly encoded with a
> custom channel config (due to the free Nero AAC encoder I guess).
> 
> Of course, there are downsides to this patch:
> - spec-conforming 7.1(wide) will have their wide channels incorrectly
>   decoded as side channels (though I did not find any such file with a
>   quick look), and
> - more people will think their incorrect AAC7.1 files are actually fine
>   (though they already seem fine in e.g. VLC).
> 
> Some user reports of the issue:
> http://trac.xbmc.org/ticket/13758
> https://trac.ffmpeg.org/ticket/2153
> 
> WDYT?

if there are no objections ill apply this

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- 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/20131217/c1124649/attachment.asc>


More information about the ffmpeg-devel mailing list