INPUT_FUNCS(ssse3);
INPUT_FUNCS(avx);
+#if ARCH_X86_64
+#define YUV2NV_DECL(fmt, opt) \
+void ff_yuv2 ## fmt ## cX_ ## opt(enum AVPixelFormat format, const uint8_t *dither, \
+ const int16_t *filter, int filterSize, \
+ const int16_t **u, const int16_t **v, \
+ uint8_t *dst, int dstWidth)
+
+YUV2NV_DECL(nv12, avx2);
+YUV2NV_DECL(nv21, avx2);
+#endif
+
av_cold void ff_sws_init_swscale_x86(SwsContext *c)
{
int cpu_flags = av_get_cpu_flags();
break;
}
}
+
+#if ARCH_X86_64
+ if (EXTERNAL_AVX2_FAST(cpu_flags)) {
+ switch (c->dstFormat) {
+ case AV_PIX_FMT_NV12:
+ case AV_PIX_FMT_NV24:
+ c->yuv2nv12cX = ff_yuv2nv12cX_avx2;
+ break;
+ case AV_PIX_FMT_NV21:
+ case AV_PIX_FMT_NV42:
+ c->yuv2nv12cX = ff_yuv2nv21cX_avx2;
+ break;
+ default:
+ break;
+ }
+ }
+#endif
}