diff options
author | Martin Vignali <martin.vignali@gmail.com> | 2017-10-02 01:29:32 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-10-03 19:47:37 -0300 |
commit | cbbec68847ed3485900e83ec231871f71bb97d0d (patch) | |
tree | e720235468b4ae41c4e7dd1c2011d28a40a99b99 /libavcodec/x86/blockdsp_init.c | |
parent | 4590d073ccdc7c3ce0384d5b1fba56b3f6673535 (diff) | |
download | ffmpeg-cbbec68847ed3485900e83ec231871f71bb97d0d.tar.gz |
libavcodec/blockdsp : add AVX version
Also modify the required alignment, to 32 instead of 16
for several codecs
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/x86/blockdsp_init.c')
-rw-r--r-- | libavcodec/x86/blockdsp_init.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/x86/blockdsp_init.c b/libavcodec/x86/blockdsp_init.c index afd25e1cbb..8b01a447cd 100644 --- a/libavcodec/x86/blockdsp_init.c +++ b/libavcodec/x86/blockdsp_init.c @@ -28,8 +28,10 @@ void ff_clear_block_mmx(int16_t *block); void ff_clear_block_sse(int16_t *block); +void ff_clear_block_avx(int16_t *block); void ff_clear_blocks_mmx(int16_t *blocks); void ff_clear_blocks_sse(int16_t *blocks); +void ff_clear_blocks_avx(int16_t *blocks); av_cold void ff_blockdsp_init_x86(BlockDSPContext *c, AVCodecContext *avctx) @@ -50,5 +52,9 @@ av_cold void ff_blockdsp_init_x86(BlockDSPContext *c, c->clear_block = ff_clear_block_sse; c->clear_blocks = ff_clear_blocks_sse; } + if (EXTERNAL_AVX_FAST(cpu_flags)) { + c->clear_block = ff_clear_block_avx; + c->clear_blocks = ff_clear_blocks_avx; + } #endif /* HAVE_X86ASM */ } |