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

Benjamin Larsson banan
Fri Oct 12 15:22:34 CEST 2007

Ian Caulfield wrote:
> 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
> well.
> 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?

Atrac lossless uses the same principle. Atrac3(+) plus some residual 
coded stream.

> Extracting a two-channel downmix from a 5.1 stream is supported using
> avctx->request_channels
> Comments welcome :)
> Ian
Here's a comment, fucking awesome, great work!! Now there's no reason to 
code up complete DVD Audio support into mplayer and friends.


Benjamin Larsson

More information about the ffmpeg-devel mailing list