diff options
author | Martin Vignali <martin.vignali@gmail.com> | 2017-10-01 21:37:15 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-10-01 17:35:30 -0300 |
commit | ac5908b13f16cbda396730c35f5f3125ca24577a (patch) | |
tree | 01f49a554ed8199b7aaa5d095c859796c6c10c18 /libavcodec/x86/exrdsp_init.c | |
parent | 59924d5eb11646f82f70c206be8a867468f102b9 (diff) | |
download | ffmpeg-ac5908b13f16cbda396730c35f5f3125ca24577a.tar.gz |
libavcodec/exr : add x86 SIMD for predictor
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/x86/exrdsp_init.c')
-rw-r--r-- | libavcodec/x86/exrdsp_init.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libavcodec/x86/exrdsp_init.c b/libavcodec/x86/exrdsp_init.c index 5669be3d97..63b3480d8f 100644 --- a/libavcodec/x86/exrdsp_init.c +++ b/libavcodec/x86/exrdsp_init.c @@ -26,6 +26,12 @@ void ff_reorder_pixels_sse2(uint8_t *dst, const uint8_t *src, ptrdiff_t size); void ff_reorder_pixels_avx2(uint8_t *dst, const uint8_t *src, ptrdiff_t size); +void ff_predictor_ssse3(uint8_t *src, ptrdiff_t size); + +void ff_predictor_avx(uint8_t *src, ptrdiff_t size); + +void ff_predictor_avx2(uint8_t *src, ptrdiff_t size); + av_cold void ff_exrdsp_init_x86(ExrDSPContext *dsp) { int cpu_flags = av_get_cpu_flags(); @@ -33,7 +39,14 @@ av_cold void ff_exrdsp_init_x86(ExrDSPContext *dsp) if (EXTERNAL_SSE2(cpu_flags)) { dsp->reorder_pixels = ff_reorder_pixels_sse2; } + if (EXTERNAL_SSSE3(cpu_flags)) { + dsp->predictor = ff_predictor_ssse3; + } + if (EXTERNAL_AVX(cpu_flags)) { + dsp->predictor = ff_predictor_avx; + } if (EXTERNAL_AVX2_FAST(cpu_flags)) { dsp->reorder_pixels = ff_reorder_pixels_avx2; + dsp->predictor = ff_predictor_avx2; } } |