Skip to content
Snippets Groups Projects
Commit 330e2067 authored by Luca Barbato's avatar Luca Barbato
Browse files

x86: Use the decl and init macros for put_8tap and prep_8tap

parent f966172f
No related branches found
No related tags found
1 merge request!1755Factor out the 8tap decl and init macros
Pipeline #532809 passed with stages
in 47 minutes and 42 seconds
......@@ -41,26 +41,11 @@
#define init_mct_scaled_fn(type, name, suffix) \
c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
decl_fn(mc, dav1d_put_8tap_regular);
decl_fn(mc, dav1d_put_8tap_regular_smooth);
decl_fn(mc, dav1d_put_8tap_regular_sharp);
decl_fn(mc, dav1d_put_8tap_smooth);
decl_fn(mc, dav1d_put_8tap_smooth_regular);
decl_fn(mc, dav1d_put_8tap_smooth_sharp);
decl_fn(mc, dav1d_put_8tap_sharp);
decl_fn(mc, dav1d_put_8tap_sharp_regular);
decl_fn(mc, dav1d_put_8tap_sharp_smooth);
decl_fn(mc, dav1d_put_bilin);
decl_8tap_fns(ssse3);
decl_8tap_fns(avx2);
decl_8tap_fns(avx512icl);
decl_fn(mct, dav1d_prep_8tap_regular);
decl_fn(mct, dav1d_prep_8tap_regular_smooth);
decl_fn(mct, dav1d_prep_8tap_regular_sharp);
decl_fn(mct, dav1d_prep_8tap_smooth);
decl_fn(mct, dav1d_prep_8tap_smooth_regular);
decl_fn(mct, dav1d_prep_8tap_smooth_sharp);
decl_fn(mct, dav1d_prep_8tap_sharp);
decl_fn(mct, dav1d_prep_8tap_sharp_regular);
decl_fn(mct, dav1d_prep_8tap_sharp_smooth);
decl_fn(mc, dav1d_put_bilin);
decl_fn(mct, dav1d_prep_bilin);
decl_fn(mc_scaled, dav1d_put_8tap_scaled_regular);
......@@ -110,26 +95,9 @@ static ALWAYS_INLINE void mc_dsp_init_x86(Dav1dMCDSPContext *const c) {
if(!(flags & DAV1D_X86_CPU_FLAG_SSSE3))
return;
init_mc_fn(FILTER_2D_8TAP_REGULAR, 8tap_regular, ssse3);
init_mc_fn(FILTER_2D_8TAP_REGULAR_SMOOTH, 8tap_regular_smooth, ssse3);
init_mc_fn(FILTER_2D_8TAP_REGULAR_SHARP, 8tap_regular_sharp, ssse3);
init_mc_fn(FILTER_2D_8TAP_SMOOTH_REGULAR, 8tap_smooth_regular, ssse3);
init_mc_fn(FILTER_2D_8TAP_SMOOTH, 8tap_smooth, ssse3);
init_mc_fn(FILTER_2D_8TAP_SMOOTH_SHARP, 8tap_smooth_sharp, ssse3);
init_mc_fn(FILTER_2D_8TAP_SHARP_REGULAR, 8tap_sharp_regular, ssse3);
init_mc_fn(FILTER_2D_8TAP_SHARP_SMOOTH, 8tap_sharp_smooth, ssse3);
init_mc_fn(FILTER_2D_8TAP_SHARP, 8tap_sharp, ssse3);
init_mc_fn(FILTER_2D_BILINEAR, bilin, ssse3);
init_8tap_fns(ssse3);
init_mct_fn(FILTER_2D_8TAP_REGULAR, 8tap_regular, ssse3);
init_mct_fn(FILTER_2D_8TAP_REGULAR_SMOOTH, 8tap_regular_smooth, ssse3);
init_mct_fn(FILTER_2D_8TAP_REGULAR_SHARP, 8tap_regular_sharp, ssse3);
init_mct_fn(FILTER_2D_8TAP_SMOOTH_REGULAR, 8tap_smooth_regular, ssse3);
init_mct_fn(FILTER_2D_8TAP_SMOOTH, 8tap_smooth, ssse3);
init_mct_fn(FILTER_2D_8TAP_SMOOTH_SHARP, 8tap_smooth_sharp, ssse3);
init_mct_fn(FILTER_2D_8TAP_SHARP_REGULAR, 8tap_sharp_regular, ssse3);
init_mct_fn(FILTER_2D_8TAP_SHARP_SMOOTH, 8tap_sharp_smooth, ssse3);
init_mct_fn(FILTER_2D_8TAP_SHARP, 8tap_sharp, ssse3);
init_mc_fn(FILTER_2D_BILINEAR, bilin, ssse3);
init_mct_fn(FILTER_2D_BILINEAR, bilin, ssse3);
init_mc_scaled_fn(FILTER_2D_8TAP_REGULAR, 8tap_scaled_regular, ssse3);
......@@ -180,27 +148,10 @@ static ALWAYS_INLINE void mc_dsp_init_x86(Dav1dMCDSPContext *const c) {
if (!(flags & DAV1D_X86_CPU_FLAG_AVX2))
return;
init_mc_fn(FILTER_2D_8TAP_REGULAR, 8tap_regular, avx2);
init_mc_fn(FILTER_2D_8TAP_REGULAR_SMOOTH, 8tap_regular_smooth, avx2);
init_mc_fn(FILTER_2D_8TAP_REGULAR_SHARP, 8tap_regular_sharp, avx2);
init_mc_fn(FILTER_2D_8TAP_SMOOTH_REGULAR, 8tap_smooth_regular, avx2);
init_mc_fn(FILTER_2D_8TAP_SMOOTH, 8tap_smooth, avx2);
init_mc_fn(FILTER_2D_8TAP_SMOOTH_SHARP, 8tap_smooth_sharp, avx2);
init_mc_fn(FILTER_2D_8TAP_SHARP_REGULAR, 8tap_sharp_regular, avx2);
init_mc_fn(FILTER_2D_8TAP_SHARP_SMOOTH, 8tap_sharp_smooth, avx2);
init_mc_fn(FILTER_2D_8TAP_SHARP, 8tap_sharp, avx2);
init_mc_fn(FILTER_2D_BILINEAR, bilin, avx2);
init_8tap_fns(avx2);
init_mct_fn(FILTER_2D_8TAP_REGULAR, 8tap_regular, avx2);
init_mct_fn(FILTER_2D_8TAP_REGULAR_SMOOTH, 8tap_regular_smooth, avx2);
init_mct_fn(FILTER_2D_8TAP_REGULAR_SHARP, 8tap_regular_sharp, avx2);
init_mct_fn(FILTER_2D_8TAP_SMOOTH_REGULAR, 8tap_smooth_regular, avx2);
init_mct_fn(FILTER_2D_8TAP_SMOOTH, 8tap_smooth, avx2);
init_mct_fn(FILTER_2D_8TAP_SMOOTH_SHARP, 8tap_smooth_sharp, avx2);
init_mct_fn(FILTER_2D_8TAP_SHARP_REGULAR, 8tap_sharp_regular, avx2);
init_mct_fn(FILTER_2D_8TAP_SHARP_SMOOTH, 8tap_sharp_smooth, avx2);
init_mct_fn(FILTER_2D_8TAP_SHARP, 8tap_sharp, avx2);
init_mct_fn(FILTER_2D_BILINEAR, bilin, avx2);
init_mc_fn(FILTER_2D_BILINEAR, bilin, avx2);
init_mct_fn(FILTER_2D_BILINEAR, bilin, avx2);
init_mc_scaled_fn(FILTER_2D_8TAP_REGULAR, 8tap_scaled_regular, avx2);
init_mc_scaled_fn(FILTER_2D_8TAP_REGULAR_SMOOTH, 8tap_scaled_regular_smooth, avx2);
......@@ -241,26 +192,9 @@ static ALWAYS_INLINE void mc_dsp_init_x86(Dav1dMCDSPContext *const c) {
if (!(flags & DAV1D_X86_CPU_FLAG_AVX512ICL))
return;
init_mc_fn (FILTER_2D_8TAP_REGULAR, 8tap_regular, avx512icl);
init_mc_fn (FILTER_2D_8TAP_REGULAR_SMOOTH, 8tap_regular_smooth, avx512icl);
init_mc_fn (FILTER_2D_8TAP_REGULAR_SHARP, 8tap_regular_sharp, avx512icl);
init_mc_fn (FILTER_2D_8TAP_SMOOTH_REGULAR, 8tap_smooth_regular, avx512icl);
init_mc_fn (FILTER_2D_8TAP_SMOOTH, 8tap_smooth, avx512icl);
init_mc_fn (FILTER_2D_8TAP_SMOOTH_SHARP, 8tap_smooth_sharp, avx512icl);
init_mc_fn (FILTER_2D_8TAP_SHARP_REGULAR, 8tap_sharp_regular, avx512icl);
init_mc_fn (FILTER_2D_8TAP_SHARP_SMOOTH, 8tap_sharp_smooth, avx512icl);
init_mc_fn (FILTER_2D_8TAP_SHARP, 8tap_sharp, avx512icl);
init_mc_fn (FILTER_2D_BILINEAR, bilin, avx512icl);
init_8tap_fns(avx512icl);
init_mct_fn(FILTER_2D_8TAP_REGULAR, 8tap_regular, avx512icl);
init_mct_fn(FILTER_2D_8TAP_REGULAR_SMOOTH, 8tap_regular_smooth, avx512icl);
init_mct_fn(FILTER_2D_8TAP_REGULAR_SHARP, 8tap_regular_sharp, avx512icl);
init_mct_fn(FILTER_2D_8TAP_SMOOTH_REGULAR, 8tap_smooth_regular, avx512icl);
init_mct_fn(FILTER_2D_8TAP_SMOOTH, 8tap_smooth, avx512icl);
init_mct_fn(FILTER_2D_8TAP_SMOOTH_SHARP, 8tap_smooth_sharp, avx512icl);
init_mct_fn(FILTER_2D_8TAP_SHARP_REGULAR, 8tap_sharp_regular, avx512icl);
init_mct_fn(FILTER_2D_8TAP_SHARP_SMOOTH, 8tap_sharp_smooth, avx512icl);
init_mct_fn(FILTER_2D_8TAP_SHARP, 8tap_sharp, avx512icl);
init_mc_fn (FILTER_2D_BILINEAR, bilin, avx512icl);
init_mct_fn(FILTER_2D_BILINEAR, bilin, avx512icl);
c->avg = BF(dav1d_avg, avx512icl);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment