diff options
author | Martin Vignali <martin.vignali@gmail.com> | 2017-11-21 08:34:20 +0100 |
---|---|---|
committer | Martin Vignali <martin.vignali@gmail.com> | 2017-11-21 09:00:42 +0100 |
commit | b5ebe38443542c4d6ca285026670512da482d8e5 (patch) | |
tree | b066a44b00eef45a925ba8434c7a0aee121a0a92 /libavcodec/x86/utvideodsp_init.c | |
parent | 48b7c45b0c6fa8f48eaa265f60bc672489ae97ee (diff) | |
download | ffmpeg-b5ebe38443542c4d6ca285026670512da482d8e5.tar.gz |
avcodec/utvideodsp : add avx2 version for the dsp
Diffstat (limited to 'libavcodec/x86/utvideodsp_init.c')
-rw-r--r-- | libavcodec/x86/utvideodsp_init.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavcodec/x86/utvideodsp_init.c b/libavcodec/x86/utvideodsp_init.c index f8b2a9b074..2b436c6c5c 100644 --- a/libavcodec/x86/utvideodsp_init.c +++ b/libavcodec/x86/utvideodsp_init.c @@ -28,9 +28,16 @@ void ff_restore_rgb_planes_sse2(uint8_t *src_r, uint8_t *src_g, uint8_t *src_b, ptrdiff_t linesize_r, ptrdiff_t linesize_g, ptrdiff_t linesize_b, int width, int height); +void ff_restore_rgb_planes_avx2(uint8_t *src_r, uint8_t *src_g, uint8_t *src_b, + ptrdiff_t linesize_r, ptrdiff_t linesize_g, + ptrdiff_t linesize_b, int width, int height); + void ff_restore_rgb_planes10_sse2(uint16_t *src_r, uint16_t *src_g, uint16_t *src_b, ptrdiff_t linesize_r, ptrdiff_t linesize_g, ptrdiff_t linesize_b, int width, int height); +void ff_restore_rgb_planes10_avx2(uint16_t *src_r, uint16_t *src_g, uint16_t *src_b, + ptrdiff_t linesize_r, ptrdiff_t linesize_g, + ptrdiff_t linesize_b, int width, int height); av_cold void ff_utvideodsp_init_x86(UTVideoDSPContext *c) { @@ -40,4 +47,8 @@ av_cold void ff_utvideodsp_init_x86(UTVideoDSPContext *c) c->restore_rgb_planes = ff_restore_rgb_planes_sse2; c->restore_rgb_planes10 = ff_restore_rgb_planes10_sse2; } + if (EXTERNAL_AVX2_FAST(cpu_flags)) { + c->restore_rgb_planes = ff_restore_rgb_planes_avx2; + c->restore_rgb_planes10 = ff_restore_rgb_planes10_avx2; + } } |