[FFmpeg-devel] [PATCH] MLP/TrueHD decoder

Ian Caulfield ian.caulfield
Fri Oct 12 14:29:46 CEST 2007

Hi all,

I've been working for a while on reverse engineering the MLP audio
stream format, and writing my own decoder. I've finally got to a point
where I have something ready for review. I'm going to try to get the
documentation I've produced on the format up on the multimediawiki as

I've attached the code as two patches - the first adds a parser, the
second the actual decoder.

Current caveats:

 - The decoder is limited by a #define to a maximum of six channels. I
imagine that 7.1 streams will be more-or-less a case of changing the
#defines, but I'd like to see a sample stream first to check.
 - Surround files are output with the channels in codec order (L, R,
C, LFE, Ls, Rs for 5.1). There was some discussion on the list earlier
on adding this kind of code to libavcodec instead of individual
codecs, so I've left out reordering code for now.
 - Funky MLP stuff, like having some channels at 96KHz and some at
48KHz isn't supported
 - Blu-Ray TrueHD streams aren't supported. Apparently these consist
of an AC3 base layer, plus a TrueHD layer with residual data or
somesuch in. Anyone have any samples?

Extracting a two-channel downmix from a 5.1 stream is supported using

Comments welcome :)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mlp_parse.patch
Type: text/x-diff
Size: 12604 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071012/863859a1/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mlpdec.patch
Type: text/x-diff
Size: 39592 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071012/863859a1/attachment-0001.patch>

More information about the ffmpeg-devel mailing list