[FFmpeg-devel] [PATCH] Handle all ADPCM codecs in av_get_bits_per_sample
Stefano Sabatini
stefano.sabatini-lala
Wed Jan 6 01:13:16 CET 2010
On date Wednesday 2010-01-06 00:16:44 +0100, Michael Niedermayer encoded:
> On Tue, Jan 05, 2010 at 01:21:53PM -0500, Daniel Verkamp wrote:
> > This patch partially fixes issue 1205 and eliminates special-case
> > handling of ADPCM acodecs in libavformat/riff.c.
> >
> > Thanks,
> > -- Daniel Verkamp
>
> > libavcodec/utils.c | 5 +++++
> > libavformat/riff.c | 2 --
> > 2 files changed, 5 insertions(+), 2 deletions(-)
> > 0747d0e35a2b9a34ffa1874465735d58c9684d1e 0001-Handle-all-ADPCM-codecs-in-av_get_bits_per_sample.patch
> > From 02c07cb8fc4fe40e66764882db4aef42f64ad6da Mon Sep 17 00:00:00 2001
> > From: Daniel Verkamp <daniel at drv.nu>
> > Date: Tue, 5 Jan 2010 13:19:16 -0500
> > Subject: [PATCH] Handle all ADPCM codecs in av_get_bits_per_sample
> >
> > Some ADPCM codecs were special-cased in riff.c;
> > move them to generic code.
> > ---
> > libavcodec/utils.c | 5 +++++
> > libavformat/riff.c | 2 --
> > 2 files changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/libavcodec/utils.c b/libavcodec/utils.c
> > index 99c97c1..6e914b9 100644
> > --- a/libavcodec/utils.c
> > +++ b/libavcodec/utils.c
> > @@ -963,6 +963,11 @@ int av_get_bits_per_sample(enum CodecID codec_id){
> > return 3;
> > case CODEC_ID_ADPCM_SBPRO_4:
> > case CODEC_ID_ADPCM_CT:
> > + case CODEC_ID_ADPCM_IMA_WAV:
> > + case CODEC_ID_ADPCM_MS:
> > + case CODEC_ID_ADPCM_G726:
> > + case CODEC_ID_ADPCM_YAMAHA:
> > + case CODEC_ID_ADPCM_SWF:
> > return 4;
>
> some of these are not fixed 4 bit
What about to do something similar to pixfmt/pixdesc
(samplefmt/sampledesc?) for audio sample formats?
And BTW, I think we should move all the sample definition stuff to
lavu at the next lavc bump, this is going to be required by lavfi when
we'll start to integrate audio support.
Regards.
--
FFmpeg = Forgiving & Furious Mastering Patchable Erratic Game
More information about the ffmpeg-devel
mailing list