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

Lars Täuber lars.taeuber
Wed May 7 20:00:14 CEST 2008


On Sat, 3 May 2008 17:52:12 +0200 Michael Niedermayer <michaelni at gmx.at> wrote:

> > @@ -492,6 +498,18 @@
> >              *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;
> > +        }
> > +        n = buf_size / (avctx->channels * 2 * avctx->bits_per_sample / 8);
> > +        while (n--) {
> > +            for (c=0; c < 2*avctx->channels; c++)
> > +                *samples++ = bytestream_get_be16(&src);
> > +            src+= 
> 
> > +                  avctx->channels * (avctx->bits_per_sample-16) / 4;
> 
> that could be calculated outside of the loop.
> 
> and iam fine with the rest that i do maintain

Like this?

Regards
Lars
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pcm_dvd.patch
Type: text/x-diff
Size: 5405 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080507/d73b5d69/attachment.patch>



More information about the ffmpeg-devel mailing list