[FFmpeg-devel] [RFC] LPCM 24 bits support

Michael Niedermayer michaelni
Wed May 7 23:47:10 CEST 2008


On Wed, May 07, 2008 at 10:31:04PM +0200, Lars T?uber wrote:
> On Wed, 7 May 2008 21:19:14 +0200 Michael Niedermayer <michaelni at gmx.at> wrote:
> 
> > > @@ -492,6 +498,20 @@ static int pcm_decode_frame(AVCodecConte
> > >              *samples++ = s->table[*src++];
> > >          }
> > >          break;
> > > +    case CODEC_ID_PCM_DVD:
> > > +        if(avctx->bits_per_sample != 20 && avctx->bits_per_sample != 24) {
> > > +            av_log(avctx, AV_LOG_ERROR, "PCM DVD unsupported sample depth\n");
> > > +            return -1;
> > > +        } else {
> > > +            uint8_t jump = avctx->channels * (avctx->bits_per_sample-16) / 4;
> > 
> > int please
> 
> Ok. As you like.
> But could you explain the reason? I'm still learning.

We do not need it to be exactly 8 bits. It also doesnt safe any space.
Besides thers no ptr += uint8_t instruction on x86, i suspect this is
the same with most other architectures as well.

the parts for which iam maintainer look ok

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

Many things microsoft did are stupid, but not doing something just because
microsoft did it is even more stupid. If everything ms did were stupid they
would be bankrupt already.
-------------- 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/20080507/21824f3b/attachment.pgp>



More information about the ffmpeg-devel mailing list