On Wed, 23 Jul 2014 13:20:22 +0200, Diego Biurrun <[email protected]> wrote:
> On Wed, Jul 23, 2014 at 12:56:54PM +0200, Anton Khirnov wrote:
> > 
> > On Tue, 22 Jul 2014 15:55:24 -0700, Diego Biurrun <[email protected]> wrote:
> > > This allows unconditionally including the public header and cleaning up
> > > some duplicated declarations. It also allows cleanly eliminating
> > > redefined typedefs for fft-related context structs.
> > > ---
> > > 
> > > This is the cleanest solution to the redefined typedefs that I found.
> > > All headers work standalone now and some silly duplication is eliminated.
> > > 
> > > It modifies a public header, so some version bump might be necessary,
> > > maybe also some prefixing of defines.
> > > 
> > >  libavcodec/avfft.h | 12 ++++++++++++
> > >  libavcodec/dct.h   |  1 +
> > >  libavcodec/fft.h   | 13 +++----------
> > >  3 files changed, 16 insertions(+), 10 deletions(-)
> > > 
> > > diff --git a/libavcodec/avfft.h b/libavcodec/avfft.h
> > > index e2e727d..86821e7 100644
> > > --- a/libavcodec/avfft.h
> > > +++ b/libavcodec/avfft.h
> > > @@ -32,8 +32,20 @@
> > >   * @{
> > >   */
> > >  
> > > +#ifndef FFT_FLOAT
> > > +#define FFT_FLOAT 1
> > > +#endif
> > > +
> > > +#if FFT_FLOAT
> > 
> > I don't like this.
> > Putting such ugliness into public headers to fix some _internal_ problem is 
> > EVIL
> 
> After staring at those headers for a considerable amount of time this
> is the cleanest I could come up with.  It also makes the headers more
> straightforward, so I consider this a net gain.
> 

IMO, it's better to have more ugliness internally, than let it leak to the
outside.

I have not investigated what you're solving in detail yet, but cannot you
achieve what you're trying to do by using an internal wrapper header around
avfft.h?

-- 
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to