Merge commit 'a519583991c38d38503ab08357716513facc5725'
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 29 Aug 2013 12:38:51 +0000 (14:38 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 29 Aug 2013 12:42:34 +0000 (14:42 +0200)
* commit 'a519583991c38d38503ab08357716513facc5725':
  swscale: x86: Hide arch-specific initialization details

Conflicts:
libswscale/x86/Makefile
libswscale/x86/swscale.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libswscale/rgb2rgb.c
libswscale/swscale.c
libswscale/swscale_internal.h
libswscale/x86/Makefile
libswscale/x86/swscale.c
libswscale/x86/swscale_template.c
libswscale/x86/yuv2rgb.c
libswscale/yuv2rgb.c

Simple merge
Simple merge
@@@ -851,26 -754,6 +851,26 @@@ void ff_sws_init_output_funcs(SwsContex
                                yuv2packedX_fn *yuv2packedX,
                                yuv2anyX_fn *yuv2anyX);
  void ff_sws_init_swScale_altivec(SwsContext *c);
- void ff_sws_init_swScale_mmx(SwsContext *c);
+ void ff_sws_init_swscale_x86(SwsContext *c);
  
 +static inline void fillPlane16(uint8_t *plane, int stride, int width, int height, int y,
 +                               int alpha, int bits, const int big_endian)
 +{
 +    int i, j;
 +    uint8_t *ptr = plane + stride * y;
 +    int v = alpha ? 0xFFFF>>(15-bits) : (1<<bits);
 +    for (i = 0; i < height; i++) {
 +#define FILL(wfunc) \
 +        for (j = 0; j < width; j++) {\
 +            wfunc(ptr+2*j, v);\
 +        }
 +        if (big_endian) {
 +            FILL(AV_WB16);
 +        } else {
 +            FILL(AV_WL16);
 +        }
 +        ptr += stride;
 +    }
 +}
 +
  #endif /* SWSCALE_SWSCALE_INTERNAL_H */
@@@ -1,8 -1,4 +1,6 @@@
- OBJS-$(CONFIG_XMM_CLOBBER_TEST) += x86/w64xmmtest.o
- MMX-OBJS                        += x86/rgb2rgb.o                        \
 +$(SUBDIR)x86/swscale_mmx.o: CFLAGS += $(NOREDZONE_FLAGS)
 +
+ OBJS                            += x86/rgb2rgb.o                        \
                                     x86/swscale.o                        \
                                     x86/yuv2rgb.o                        \
  
@@@ -381,18 -306,14 +381,18 @@@ av_cold void ff_sws_init_swscale_x86(Sw
  {
      int cpu_flags = av_get_cpu_flags();
  
- #if HAVE_INLINE_ASM
+ #if HAVE_MMX_INLINE
      if (cpu_flags & AV_CPU_FLAG_MMX)
-         sws_init_swScale_MMX(c);
+         sws_init_swscale_MMX(c);
+ #endif
  #if HAVE_MMXEXT_INLINE
      if (cpu_flags & AV_CPU_FLAG_MMXEXT)
-         sws_init_swScale_MMXEXT(c);
+         sws_init_swscale_MMXEXT(c);
 +    if (cpu_flags & AV_CPU_FLAG_SSE3){
 +        if(c->use_mmx_vfilter && !(c->flags & SWS_ACCURATE_RND))
 +            c->yuv2planeX = yuv2yuvX_sse3;
 +    }
  #endif
- #endif /* HAVE_INLINE_ASM */
  
  #define ASSIGN_SCALE_FUNC2(hscalefn, filtersize, opt1, opt2) do { \
      if (c->srcBpc == 8) { \
Simple merge
@@@ -68,11 -69,15 +68,11 @@@ DECLARE_ASM_CONST(8, uint64_t, pb_07) 
  
  #endif /* HAVE_INLINE_ASM */
  
- av_cold SwsFunc ff_yuv2rgb_init_mmx(SwsContext *c)
+ av_cold SwsFunc ff_yuv2rgb_init_x86(SwsContext *c)
  {
- #if HAVE_INLINE_ASM
+ #if HAVE_MMX_INLINE
      int cpu_flags = av_get_cpu_flags();
  
 -    if (c->srcFormat != AV_PIX_FMT_YUV420P &&
 -        c->srcFormat != AV_PIX_FMT_YUVA420P)
 -        return NULL;
 -
  #if HAVE_MMXEXT_INLINE
      if (cpu_flags & AV_CPU_FLAG_MMXEXT) {
          switch (c->dstFormat) {
Simple merge