On Sun, Jul 15, 2012 at 07:02:37AM -0700, Ronald S. Bultje wrote:
> On Sun, Jul 15, 2012 at 5:26 AM, Diego Biurrun <[email protected]> wrote:
> > Skip the optimizations if the compiler does not support inline Assembly.
> >
> > --- a/libswscale/rgb2rgb.c
> > +++ b/libswscale/rgb2rgb.c
> > @@ -128,7 +128,7 @@ void (*yuyvtoyuv422)(uint8_t *ydst, uint8_t *udst, 
> > uint8_t *vdst,
> >  void sws_rgb2rgb_init(void)
> >  {
> >      rgb2rgb_init_c();
> > -    if (HAVE_MMX)
> > +    if (HAVE_MMX && HAVE_INLINE_ASM)
> >          rgb2rgb_init_x86();
> >  }
> >
> > --- a/libswscale/x86/Makefile
> > +++ b/libswscale/x86/Makefile
> > @@ -1,7 +1,8 @@
> >
> > -MMX-OBJS                        += x86/rgb2rgb.o                        \
> > -                                   x86/swscale_mmx.o                    \
> > +MMX-OBJS                        += x86/swscale_mmx.o                    \
> > +
> > +MMX-OBJS-$(HAVE_INLINE_ASM)     += x86/rgb2rgb.o                        \
> >                                     x86/yuv2rgb_mmx.o                    \
> 
> I've recommended this approach before, but it was (as approach, not as
> patch) rejected altogether:
> 
> http://lists.libav.org/pipermail/libav-devel/2012-June/029509.html
> 
> (I do actually believe that this approach is better, which is why I
> sent that in first, so please continue advocating it.)

That patch for many reasons and is quite different from the one I
am proposing.

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

Reply via email to