[FFmpeg-devel] [PATCH] Handle all ADPCM codecs in av_get_bits_per_sample

Michael Niedermayer michaelni
Wed Jan 6 21:14:34 CET 2010


On Wed, Jan 06, 2010 at 01:13:16AM +0100, Stefano Sabatini wrote:
> 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.

iam ok with moving the enum over

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The educated differ from the uneducated as much as the living from the
dead. -- Aristotle 
-------------- 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/20100106/5c0a7950/attachment.pgp>



More information about the ffmpeg-devel mailing list