Commit da62128e authored by Martin Vignali's avatar Martin Vignali

libavcodec/lossless_videodsp : add add_bytes avx2 version

parent fbe91487
......@@ -29,7 +29,7 @@
#include "libavutil/cpu.h"
typedef struct LLVidDSPContext {
void (*add_bytes)(uint8_t *dst /* align 16 */, uint8_t *src /* align 16 */,
void (*add_bytes)(uint8_t *dst /* align 32 */, uint8_t *src /* align 32 */,
ptrdiff_t w);
void (*add_median_pred)(uint8_t *dst, const uint8_t *top,
const uint8_t *diff, ptrdiff_t w,
......
......@@ -217,6 +217,11 @@ ADD_BYTES
INIT_XMM sse2
ADD_BYTES
%if HAVE_AVX2_EXTERNAL
INIT_YMM avx2
ADD_BYTES
%endif
%macro ADD_HFYU_LEFT_LOOP_INT16 2 ; %1 = dst alignment (a/u), %2 = src alignment (a/u)
add wd, wd
add srcq, wq
......
......@@ -25,6 +25,7 @@
void ff_add_bytes_mmx(uint8_t *dst, uint8_t *src, ptrdiff_t w);
void ff_add_bytes_sse2(uint8_t *dst, uint8_t *src, ptrdiff_t w);
void ff_add_bytes_avx2(uint8_t *dst, uint8_t *src, ptrdiff_t w);
void ff_add_median_pred_mmxext(uint8_t *dst, const uint8_t *top,
const uint8_t *diff, ptrdiff_t w,
......@@ -115,4 +116,7 @@ void ff_llviddsp_init_x86(LLVidDSPContext *c)
if (EXTERNAL_SSE4(cpu_flags)) {
c->add_left_pred_int16 = ff_add_left_pred_int16_sse4;
}
if (EXTERNAL_AVX2_FAST(cpu_flags)) {
c->add_bytes = ff_add_bytes_avx2;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment