Merge commit '7597e6efe492cb2449bb771054d64cc7fdf62ff5'
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 21 Jan 2014 21:03:28 +0000 (22:03 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 21 Jan 2014 21:03:28 +0000 (22:03 +0100)
* commit '7597e6efe492cb2449bb771054d64cc7fdf62ff5':
  swscale/x86/rgb2rgb: add support for AVX

Conflicts:
libswscale/x86/rgb2rgb_template.c

See: 4729b529e60fb99356a1d9e13793835af50b3e87
Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libswscale/x86/rgb2rgb_template.c

@@@ -1924,36 -1941,8 +1924,36 @@@ static void RENAME(interleaveBytes)(con
              ::: "memory"
              );
  }
- #endif /* !COMPILE_TEMPLATE_AMD3DNOW && !COMPILE_TEMPLATE_AVX*/
+ #endif /* !COMPILE_TEMPLATE_AMD3DNOW && !COMPILE_TEMPLATE_AVX */
  
 +#if !COMPILE_TEMPLATE_AVX || HAVE_AVX_EXTERNAL
 +#if !COMPILE_TEMPLATE_AMD3DNOW && (ARCH_X86_32 || COMPILE_TEMPLATE_SSE2) && COMPILE_TEMPLATE_MMXEXT == COMPILE_TEMPLATE_SSE2 && HAVE_YASM
 +void RENAME(ff_nv12ToUV)(uint8_t *dstU, uint8_t *dstV,
 +                                const uint8_t *unused0,
 +                                const uint8_t *src1,
 +                                const uint8_t *src2,
 +                                int w, uint32_t *unused);
 +static void RENAME(deinterleaveBytes)(const uint8_t *src, uint8_t *dst1, uint8_t *dst2,
 +                                      int width, int height, int srcStride,
 +                                      int dst1Stride, int dst2Stride)
 +{
 +    int h;
 +
 +    for (h=0; h < height; h++) {
 +        RENAME(ff_nv12ToUV)(dst1, dst2, NULL, src, NULL, width, NULL);
 +        src += srcStride;
 +        dst1 += dst1Stride;
 +        dst2 += dst2Stride;
 +    }
 +    __asm__(
 +            EMMS"       \n\t"
 +            SFENCE"     \n\t"
 +            ::: "memory"
 +            );
 +}
 +#endif /* !COMPILE_TEMPLATE_AMD3DNOW */
 +#endif /* !COMPILE_TEMPLATE_AVX || HAVE_AVX_EXTERNAL */
 +
  #if !COMPILE_TEMPLATE_SSE2
  #if !COMPILE_TEMPLATE_AMD3DNOW
  static inline void RENAME(vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,
@@@ -2524,10 -2511,5 +2524,10 @@@ static av_cold void RENAME(rgb2rgb_init
  
  #if !COMPILE_TEMPLATE_AMD3DNOW && !COMPILE_TEMPLATE_AVX
      interleaveBytes    = RENAME(interleaveBytes);
- #endif /* !COMPILE_TEMPLATE_AMD3DNOW  && !COMPILE_TEMPLATE_AVX*/
+ #endif /* !COMPILE_TEMPLATE_AMD3DNOW && !COMPILE_TEMPLATE_AVX */
 +#if !COMPILE_TEMPLATE_AVX || HAVE_AVX_EXTERNAL
 +#if !COMPILE_TEMPLATE_AMD3DNOW && (ARCH_X86_32 || COMPILE_TEMPLATE_SSE2) && COMPILE_TEMPLATE_MMXEXT == COMPILE_TEMPLATE_SSE2 && HAVE_YASM
 +    deinterleaveBytes  = RENAME(deinterleaveBytes);
 +#endif
 +#endif
  }