Commit e4fbbbce authored by Henrik Gramner's avatar Henrik Gramner Committed by Jean-Baptiste Kempf

Add blend AVX2 asm

parent 8676fda3
This diff is collapsed.
......@@ -54,6 +54,7 @@ decl_avg_fn(dav1d_avg_avx2);
decl_w_avg_fn(dav1d_w_avg_avx2);
decl_mask_fn(dav1d_mask_avx2);
decl_w_mask_fn(dav1d_w_mask_420_avx2);
decl_blend_fn(dav1d_blend_avx2);
decl_warp8x8_fn(dav1d_warp_affine_8x8_avx2);
decl_warp8x8t_fn(dav1d_warp_affine_8x8t_avx2);
......@@ -96,6 +97,7 @@ void bitfn(dav1d_mc_dsp_init_x86)(Dav1dMCDSPContext *const c) {
c->w_avg = dav1d_w_avg_avx2;
c->mask = dav1d_mask_avx2;
c->w_mask[2] = dav1d_w_mask_420_avx2;
c->blend = dav1d_blend_avx2;
c->warp8x8 = dav1d_warp_affine_8x8_avx2;
c->warp8x8t = dav1d_warp_affine_8x8t_avx2;
......
......@@ -237,12 +237,12 @@ static void check_w_mask(Dav1dMCDSPContext *const c) {
}
static void check_blend(Dav1dMCDSPContext *const c) {
ALIGN_STK_32(pixel, tmp, 128 * 128,);
ALIGN_STK_32(pixel, c_dst, 128 * 128,);
ALIGN_STK_32(pixel, a_dst, 128 * 128,);
ALIGN_STK_32(uint8_t, mask, 128 * 128,);
ALIGN_STK_32(pixel, tmp, 128 * 32,);
ALIGN_STK_32(pixel, c_dst, 128 * 32,);
ALIGN_STK_32(pixel, a_dst, 128 * 32,);
ALIGN_STK_32(uint8_t, mask, 128 * 32,);
for (int i = 0; i < 128 * 128; i++) {
for (int i = 0; i < 128 * 32; i++) {
tmp[i] = rand() & ((1 << BITDEPTH) - 1);
mask[i] = rand() % 65;
}
......@@ -252,9 +252,11 @@ static void check_blend(Dav1dMCDSPContext *const c) {
for (int w = 2; w <= 128; w <<= 1) {
const ptrdiff_t dst_stride = w * sizeof(pixel);
const int h_min = (w == 128) ? 4 : 2;
const int h_max = (w > 32) ? 32 : (w == 2) ? 64 : 128;
for (int ms = 0; ms <= w; ms += ms ? w - 1 : 1)
if (check_func(c->blend, "blend_w%d_ms%d_%dbpc", w, ms, BITDEPTH))
for (int h = imax(w / 8, 2); h <= imin(w * 8, 128); h <<= 1) {
for (int h = h_min; h <= h_max; h <<= 1) {
for (int i = 0; i < w * h; i++)
c_dst[i] = a_dst[i] = rand() & ((1 << BITDEPTH) - 1);
......
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