diff options
author | Kieran Kunhya <kieran@kunhya.com> | 2011-10-09 16:20:48 +0100 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-10-22 10:35:14 -0700 |
commit | 7fbbf9529397756a31850fe37036f026f34f80fc (patch) | |
tree | 152cae6ebdf3271cd8f971acc9bc21010259c0e5 /libswscale/x86/swscale_mmx.c | |
parent | 109f62e8f89d25ec16026e4076b5407fc07c00e7 (diff) | |
download | ffmpeg-7fbbf9529397756a31850fe37036f026f34f80fc.tar.gz |
yuv2planeX10 SIMD
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libswscale/x86/swscale_mmx.c')
-rw-r--r-- | libswscale/x86/swscale_mmx.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libswscale/x86/swscale_mmx.c b/libswscale/x86/swscale_mmx.c index dd7aea1492..3c0632dca5 100644 --- a/libswscale/x86/swscale_mmx.c +++ b/libswscale/x86/swscale_mmx.c @@ -211,6 +211,14 @@ SCALE_FUNCS_SSE(sse2); SCALE_FUNCS_SSE(ssse3); SCALE_FUNCS_SSE(sse4); +extern void ff_yuv2planeX10_sse4(const int16_t *filter, int filterSize, + const int16_t **src, uint8_t *dest, int dstW, + const uint8_t *dither, int offset); + +extern void ff_yuv2planeX10_avx(const int16_t *filter, int filterSize, + const int16_t **src, uint8_t *dest, int dstW, + const uint8_t *dither, int offset); + void ff_sws_init_swScale_mmx(SwsContext *c) { int cpu_flags = av_get_cpu_flags(); @@ -270,6 +278,13 @@ void ff_sws_init_swScale_mmx(SwsContext *c) /* Xto15 don't need special sse4 functions */ ASSIGN_SSE_SCALE_FUNC(c->hyScale, c->hLumFilterSize, sse4, ssse3); ASSIGN_SSE_SCALE_FUNC(c->hcScale, c->hChrFilterSize, sse4, ssse3); + if (c->dstBpc == 10 && !isBE(c->dstFormat)) + c->yuv2planeX = ff_yuv2planeX10_sse4; + } + + if (cpu_flags & AV_CPU_FLAG_AVX) { + if (c->dstBpc == 10 && !isBE(c->dstFormat)) + c->yuv2planeX = ff_yuv2planeX10_avx; } #endif } |