diff options
Diffstat (limited to 'libavcodec/mips/vp9dsp_init_mips.c')
-rw-r--r-- | libavcodec/mips/vp9dsp_init_mips.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/libavcodec/mips/vp9dsp_init_mips.c b/libavcodec/mips/vp9dsp_init_mips.c index c8a48908af..5990fa6952 100644 --- a/libavcodec/mips/vp9dsp_init_mips.c +++ b/libavcodec/mips/vp9dsp_init_mips.c @@ -168,8 +168,50 @@ static av_cold void vp9dsp_init_msa(VP9DSPContext *dsp, int bpp) } #endif // #if HAVE_MSA +#if HAVE_MMI +static av_cold void vp9dsp_mc_init_mmi(VP9DSPContext *dsp) +{ +#define init_subpel1(idx1, idx2, idxh, idxv, sz, dir, type) \ + dsp->mc[idx1][FILTER_8TAP_SMOOTH ][idx2][idxh][idxv] = \ + ff_##type##_8tap_smooth_##sz##dir##_mmi; \ + dsp->mc[idx1][FILTER_8TAP_REGULAR][idx2][idxh][idxv] = \ + ff_##type##_8tap_regular_##sz##dir##_mmi; \ + dsp->mc[idx1][FILTER_8TAP_SHARP ][idx2][idxh][idxv] = \ + ff_##type##_8tap_sharp_##sz##dir##_mmi; + +#define init_subpel2(idx, idxh, idxv, dir, type) \ + init_subpel1(0, idx, idxh, idxv, 64, dir, type); \ + init_subpel1(1, idx, idxh, idxv, 32, dir, type); \ + init_subpel1(2, idx, idxh, idxv, 16, dir, type); \ + init_subpel1(3, idx, idxh, idxv, 8, dir, type); \ + init_subpel1(4, idx, idxh, idxv, 4, dir, type) + +#define init_subpel3(idx, type) \ + init_subpel2(idx, 1, 1, hv, type); \ + init_subpel2(idx, 0, 1, v, type); \ + init_subpel2(idx, 1, 0, h, type) + + init_subpel3(0, put); + init_subpel3(1, avg); + +#undef init_subpel1 +#undef init_subpel2 +#undef init_subpel3 +} + +static av_cold void vp9dsp_init_mmi(VP9DSPContext *dsp, int bpp) +{ + if (bpp == 8) { + vp9dsp_mc_init_mmi(dsp); + } +} +#endif // #if HAVE_MMI + av_cold void ff_vp9dsp_init_mips(VP9DSPContext *dsp, int bpp) { +#if HAVE_MMI + vp9dsp_init_mmi(dsp, bpp); +#endif // #if HAVE_MMI #if HAVE_MSA vp9dsp_init_msa(dsp, bpp); #endif // #if HAVE_MSA |