[FFmpeg-devel] [PATCH] Add SAMPLE_FMT_S24 audioconverter

pross at xvid.org pross
Mon Aug 4 15:40:08 CEST 2008


On Mon, Aug 04, 2008 at 08:29:10AM +0100, Ian Caulfield wrote:
> 2008/8/4 madshi <dear at madshi.net>
> >
> > Michael Niedermayer schrieb:
> >  > Iam against this patch.
> >  > The code that stores 24bit PCM in int32_t should shift it
> >  > left appropriately so it is SAMPLE_FMT_S32.

Delete/deprecate SAMPLE_FMT_S24?
And curiously, why was SAMPLE_FMT_U8 chosen over Signed 8-bit?

> > But in that case the information that the audio data is only
> > 24bit and not 32bit is lost, isn't it? Sometimes it's useful
> > to know that only 24bit of the audio information are filled
> > with useful data.
> >
> 
> There is a field in the codec context indicating the number of bits
> per sample - I think the MLP decoder is the only audio decoder that
> uses it though. The advantage of this field is that it can indicate
> e.g. 18- or 20-bit audio, not just 8,16, 24, 32.

Perhaps the AVCodecContext->bits_per_sample field should become
mandatory for SAMPLE_FMT_S32.

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- 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/20080804/61ee569f/attachment.pgp>



More information about the ffmpeg-devel mailing list