[FFmpeg-devel] [PATCH 4/4] mxfdec: Consider QuantizationBits between 17 and 24 to be pcm_s24*

Michael Niedermayer michaelni at gmx.at
Tue Sep 27 15:03:54 CEST 2011


On Tue, Sep 27, 2011 at 02:33:55AM -0700, Baptiste Coudurier wrote:
> Hi Thomas,
> 
> On 9/27/11 2:14 AM, Tomas Härdin wrote:
> > It's not pretty, but it works. I have no idea how one is supposed to
> > handle shifted PCM in MXF - there's no pretty field like for
> > PixelLayout.
> > 
> > /Tomas
> > 
> > 
> > 0004-mxfdec-Consider-QuantizationBits-between-17-and-24-t.patch
> > 
> > 
> > From aedba3f931864420853a3bc13071e9633eefffdb Mon Sep 17 00:00:00 2001
> > From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= <tomas.hardin at codemill.se>
> > Date: Wed, 25 May 2011 17:20:08 +0200
> > Subject: [PATCH 4/4] mxfdec: Consider QuantizationBits between 17 and 24 to be pcm_s24*
> > 
> > This fixes playback of BRD38772509.mxf
> > ---
> >  libavformat/mxfdec.c |    4 ++--
> >  1 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
> > index a534188..e0c6a12 100644
> > --- a/libavformat/mxfdec.c
> > +++ b/libavformat/mxfdec.c
> > @@ -1191,12 +1191,12 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
> >              st->codec->sample_rate = descriptor->sample_rate.num / descriptor->sample_rate.den;
> >              /* TODO: implement CODEC_ID_RAWAUDIO */
> >              if (st->codec->codec_id == CODEC_ID_PCM_S16LE) {
> > -                if (descriptor->bits_per_sample == 24)
> > +                if (descriptor->bits_per_sample > 16 && descriptor->bits_per_sample <= 24)
> >                      st->codec->codec_id = CODEC_ID_PCM_S24LE;
> >                  else if (descriptor->bits_per_sample == 32)
> >                      st->codec->codec_id = CODEC_ID_PCM_S32LE;
> >              } else if (st->codec->codec_id == CODEC_ID_PCM_S16BE) {
> > -                if (descriptor->bits_per_sample == 24)
> > +                if (descriptor->bits_per_sample > 16 && descriptor->bits_per_sample <= 24)
> >                      st->codec->codec_id = CODEC_ID_PCM_S24BE;
> >                  else if (descriptor->bits_per_sample == 32)
> >                      st->codec->codec_id = CODEC_ID_PCM_S32BE;
> > 
> 
> Looks ok to me.

applied, thanks

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

If a bugfix only changes things apparently unrelated to the bug with no
further explanation, that is a good sign that the bugfix is wrong.
-------------- 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/20110927/7e3bafaf/attachment.asc>


More information about the ffmpeg-devel mailing list