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

Michael Niedermayer michaelni
Sat Nov 24 22:04:37 CET 2007


On Sat, Nov 24, 2007 at 04:27:29PM +0000, Ian Caulfield wrote:
> 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.

looks ok

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

Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071124/f11aad4f/attachment.pgp>



More information about the ffmpeg-devel mailing list