[FFmpeg-devel] [RFC] lavc/ffmpeg sample_fmt implementation

pross at xvid.org pross
Thu Jul 31 16:02:12 CEST 2008


On Wed, Jul 30, 2008 at 10:09:02PM +0200, Michael Niedermayer wrote:
> On Mon, Jul 28, 2008 at 10:23:29PM +1000, pross at xvid.org wrote:
> > On Sun, Jul 27, 2008 at 11:00:05PM +0200, Michael Niedermayer wrote:
> > > On Sun, Jul 27, 2008 at 06:17:48PM +1000, pross at xvid.org wrote:
> > > > On Sat, Jul 26, 2008 at 01:08:09AM +1000, pross at xvid.org wrote:
> > > > > Hi.
> > > > > 
> > > > > This patch adds sample_fmt conversion support to lavc (and ffmpeg).
> > > > 
> > > > Round two patches enclosed.
> > > > 
> > 
> > Round three.
> > 

> > Index: libavcodec/Makefile
> > ===================================================================
> > --- libavcodec/Makefile	(revision 14454)
> > +++ libavcodec/Makefile	(working copy)
> > @@ -21,7 +21,7 @@
> >         utils.o \
> >  
> >  
> > -HEADERS = avcodec.h opt.h
> > +HEADERS = avcodec.h opt.h audioconvert.h
> 
> this is not ok, yet
> Id like to wait with making the API public as much as possible to avoid
> ending up with API breakage issues if we decide that we have to change
> something. [that is it should all be working and have been tested before]

Rgr that.

Related matter: When codecs output/input sample formats other than
SAMPLE_FMT_S16, existing apps that expect the avcodec_decode_audio2() and
avcodec_encode_audio() functions to handle shorts ints will break.

> > +/**
> > + * Free audio sample format converter context
> > + */
> > +void av_audio_convert_free(AVAudioConvert *ctx);
> > +
> > +/**
> > + * Convert between audio sample formats
> > + * @param[in] out array of output buffers for each channel. set to NULL to ignore processing of the given channel.
> 
> > + * @param[in] out_stride distance between consecutive input samples (measured in samples)
> 
> Iam not sure if bytes would not be better ...

Bytes would provide consistency with swscaler. I'll run with that.

-- 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/20080801/645bff00/attachment.pgp>



More information about the ffmpeg-devel mailing list