[FFmpeg-devel] [PATCH] new av_audio_resample
Michael Niedermayer
michaelni
Thu Jun 18 13:05:14 CEST 2009
On Sun, Jun 14, 2009 at 04:59:52PM -0700, Baptiste Coudurier wrote:
> Michael Niedermayer wrote:
> > On Thu, Jun 11, 2009 at 03:14:21PM -0700, Baptiste Coudurier wrote:
> >> On 6/11/2009 2:58 PM, Michael Niedermayer wrote:
> >>> On Thu, Jun 11, 2009 at 01:41:59AM -0700, Baptiste Coudurier wrote:
> >>>> Hi guys,
> >>>>
> >>>> I propose to introduce av_audio_resample to add output_size as parameter
> >>>> since currently using audio_resample there is no way to know the size of
> >>>> the output buffer.
> >>> I hoped we could one day drop resample.c in favor of resample2.c
> >>> currently resample.c lacking a av prefix is not officially part of the public
> >>> API your patch would change that
> >>>
> >>> and i belive the API of resample.c is not fit for export, the output_size
> >>> is surely needed but thats not the only thing, using short types is clearly
> >>> not correct given the code supports other types, lack of planar audio support
> >>> in the API also is not good.
> >> Yes you are right.
> >>
> >> Nobody is inclined to clean it up and reimplement.
> >> Now we have buggy code causing crashes.
> >
> > you are right as well
> >
> > what about adding a 2 at the end instead of a av_ at the begin of the new
> > function name? that would make me a lot happier with the patch
>
> Well, no problem for me, but we added av_audio_resample before :/
> if this is meant to be private maybe we should remove it from avcodec.h
> and keeping it private, no ?
maybe ...
i really have no strong oppinon on this it just feels all a little like
random hacking with no clear view of the goal.
Maybe we should sit down and think of a ideal (fast&simple) audio resample
and convert API (like swscale or imgconvert) and then implement that with
the pieces we have already but keep these pieces private
we also could keep things seperated from a users point of view, like
channel number changing/mixing, sample type convertion, resampling
but this would be harder to use for the user as she would have to deal
with buffering and all the stuff between ...
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- 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/20090618/eb71a28f/attachment.pgp>
More information about the ffmpeg-devel
mailing list