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

Lars Täuber lars.taeuber
Thu Apr 17 22:13:40 CEST 2008


On Thu, 17 Apr 2008 22:49:08 +0200 Michael Niedermayer <michaelni at gmx.at> wrote:
> On Thu, Apr 17, 2008 at 09:10:07PM +0100, M?ns Rullg?rd wrote:
> > > +                for (c=0; c < avctx->channels*2; c++)
> > > +                    *samples++ = audio24[c] >> 8;
> > 
> > What's the point in saving 24 bits per sample to a temporary buffer,
> > only to discard the low 8 bits later?  Also, properly rounding the
> > values to 16 bits (rather than truncating) might be preferable.
> 
> truncation is ok, the 0.5 DC error is not something a physically existing
> object could hear.
> 
> also trivial rounding like (x+128)>>8 has a problem, namely
> 0xFFFFFF+128 = 0x100007F
> and >>8 = 0x10000

Resubmitting with truncation.

Good night.
Lars
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pcm_dvd.Makefile.diff
Type: text/x-diff
Size: 606 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080417/31b24d56/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pcm_dvd.mpeg.diff
Type: text/x-diff
Size: 1471 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080417/31b24d56/attachment-0001.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pcm_dvd.pcm.diff
Type: text/x-diff
Size: 2588 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080417/31b24d56/attachment-0002.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sanity_check.pcm.diff
Type: text/x-diff
Size: 1127 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080417/31b24d56/attachment-0003.diff>



More information about the ffmpeg-devel mailing list