[FFmpeg-devel] [PATCH] make pcm_dvd use the full bit depth
Michael Niedermayer
michaelni
Tue Aug 12 21:18:01 CEST 2008
On Tue, Aug 12, 2008 at 08:58:48PM +0200, Lars T?uber wrote:
> Hi Michael,
>
>
> On Tue, 12 Aug 2008 20:31:04 +0200 Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Tue, Aug 12, 2008 at 07:26:35PM +0200, Lars T?uber wrote:
> > > for (c=0; c < 2*avctx->channels; c++)
> > > + dst_int32_t[c] = bytestream_get_be16(&src);
> > > + for (c=0; c < avctx->channels; c++) {
> > > + *dst_int32_t++ = (*src &0xf0) << 8;
> > > + *dst_int32_t++ = (*src++ &0x0f) << 12;
> > > + }
> > > }
> >
> > for (c=0; c < 2*avctx->channels; c=2) {
> > dst_int32_t[c ] = (bytestream_get_be16(&src16)<<16) + ((*src &0xf0)<<8);
> > dst_int32_t[c+1] = (bytestream_get_be16(&src16)<<16) + ((*src++ &0x0f)<<12);
> > }
>
> besides the fact that my patch didn't work you seem to misinterpret the interleaving of PCM_DVD
> see: http://wiki.multimedia.cx/index.php?title=PCM#24-Bit_PCM
>
> The least significant [4|8] bits are after a the 16-bit values of all channels.
> Take a 6 channel pcm as example.
>
> And I don't understand the meaning of ?&src16?. Or is this just a typo?
i meant that src16 and src are 2 different pointers to avoid having to do
2 passes over the destination buffer
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I hate to see young programmers poisoned by the kind of thinking
Ulrich Drepper puts forward since it is simply too narrow -- Roman Shaposhnik
-------------- 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/20080812/1e9e5bed/attachment.pgp>
More information about the ffmpeg-devel
mailing list