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

Ian Caulfield ian.caulfield
Sat Nov 24 17:27:29 CET 2007


On Nov 23, 2007 7:27 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
>
> [...]
> > +        for (p = 0; p < 4; p++)
> > +            parity_bits ^= buf[p];
> > +        for (i = 0; i < mp->num_substreams; i++) {
> > +            parity_bits ^= buf[p];
> > +            parity_bits ^= buf[p+1];
> > +
> > +            if (buf[p] & 0x80) {
> > +                parity_bits ^= buf[p+2];
> > +                parity_bits ^= buf[p+3];
> > +                p += 2;
> > +            }
> > +            p += 2;
>
> for(i = -1; i < mp->num_substreams; i++) {
>    parity_bits ^= buf[p++];
>    parity_bits ^= buf[p++];
>    if (i<0 || buf[p-2] & 0x80) {
>        parity_bits ^= buf[p++];
>        parity_bits ^= buf[p++];
>    }
> }
>

Changed

> [...]
> > +#ifdef CONFIG_AUDIO_NONSHORT
> > +        avctx->bits_per_sample = mh.group1_bits;
> > +        if (avctx->bits_per_sample > 16)
> > +//            avctx->sample_fmt = SAMPLE_FMT_S32;
> > +#endif
> > +        avctx->sample_rate = mh.group1_samplerate;
>
> this is broken if the ifdef is true

Not sure how that line ended up commented. Fixed.

MLP parser patch for committal attached.

Ian
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mlp_parse.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071124/232e5e38/attachment.asc>



More information about the ffmpeg-devel mailing list