[Ffmpeg-devel] [PATCH] Allow disabling some AltiVec-optimized codecs

Diego Biurrun diego
Wed Nov 22 10:20:13 CET 2006


On Tue, Nov 21, 2006 at 10:50:17PM +0100, Aurelien Jacobs wrote:
> On Tue, 21 Nov 2006 22:39:14 +0100
> Diego Biurrun <diego at biurrun.de> wrote:
> 
> > Here is a patch that allows conditionally compiling some of the AltiVec
> > optimizations depending on the codec in question being enabled or not.
> > 
> > I'm not sure if the best way to do this is through #ifdef or the new
> > ENABLE definitions, here is a patch that uses the latter.
> 
> Depends on what your eyes prefer...
> In this case the latter is nice IMO.

I'll go for this way and commit the (modified) patch then.

> > --- libavcodec/ppc/dsputil_ppc.c	(revision 7148)
> > +++ libavcodec/ppc/dsputil_ppc.c	(working copy)
> > @@ -274,14 +274,14 @@
> >  
> >          dsputil_init_altivec(c, avctx);
> > -        snow_init_altivec(c, avctx);
> > -        vc1dsp_init_altivec(c, avctx);
> > +        if(ENABLE_SNOW_DECODER) snow_init_altivec(c, avctx);
> > +        if(ENABLE_VC1_DECODER) vc1dsp_init_altivec(c, avctx);
> 
> Shouldn't it be
> +        if (ENABLE_VC1_DECODER || ENABLE_WMV3_DECODER)
> +            vc1dsp_init_altivec(c, avctx);
> ??

Probably :)

> > --- libavcodec/Makefile	(revision 7149)
> > +++ libavcodec/Makefile	(working copy)
> > @@ -388,11 +388,14 @@
> >  
> > +ifeq ($(TARGET_ALTIVEC),yes)
> > +OBJS-$(CONFIG_H264_DECODER)            += ppc/h264_altivec.o
> > +OBJS-$(CONFIG_SNOW_DECODER)            += ppc/snow_altivec.o
> > +OBJS-$(CONFIG_VC1_DECODER)             += ppc/vc1dsp_altivec.o
> 
> + OBJS-$(CONFIG_WMV3_DECODER)             += ppc/vc1dsp_altivec.o
> 
> ??

Probably as well :)

Diego




More information about the ffmpeg-devel mailing list