Browse Source

avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for VP9 bilinear functions

Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n2.8
Shivraj Patil Michael Niedermayer 10 years ago
parent
commit
71aede3ced
3 changed files with 2157 additions and 0 deletions
  1. +2123
    -0
      libavcodec/mips/vp9_mc_msa.c
  2. +2
    -0
      libavcodec/mips/vp9dsp_init_mips.c
  3. +32
    -0
      libavcodec/mips/vp9dsp_mips.h

+ 2123
- 0
libavcodec/mips/vp9_mc_msa.c
File diff suppressed because it is too large
View File


+ 2
- 0
libavcodec/mips/vp9dsp_init_mips.c View File

@@ -105,6 +105,8 @@ static av_cold void vp9dsp_mc_init_msa(VP9DSPContext *dsp, int bpp)
#undef init_fpel

#define init_subpel1(idx1, idx2, idxh, idxv, sz, dir, type) \
dsp->mc[idx1][FILTER_BILINEAR ][idx2][idxh][idxv] = \
ff_##type##_bilin_##sz##dir##_msa; \
dsp->mc[idx1][FILTER_8TAP_SMOOTH ][idx2][idxh][idxv] = \
ff_##type##_8tap_smooth_##sz##dir##_msa; \
dsp->mc[idx1][FILTER_8TAP_REGULAR][idx2][idxh][idxv] = \


+ 32
- 0
libavcodec/mips/vp9dsp_mips.h View File

@@ -52,6 +52,31 @@ void ff_avg_8tap_##type##_##SIZE##hv_msa(uint8_t *dst, ptrdiff_t dststride, \
ptrdiff_t srcstride, \
int h, int mx, int my);

#define VP9_BILINEAR_MIPS_MSA_FUNC(SIZE) \
void ff_put_bilin_##SIZE##h_msa(uint8_t *dst, ptrdiff_t dststride, \
const uint8_t *src, ptrdiff_t srcstride, \
int h, int mx, int my); \
\
void ff_put_bilin_##SIZE##v_msa(uint8_t *dst, ptrdiff_t dststride, \
const uint8_t *src, ptrdiff_t srcstride, \
int h, int mx, int my); \
\
void ff_put_bilin_##SIZE##hv_msa(uint8_t *dst, ptrdiff_t dststride, \
const uint8_t *src, ptrdiff_t srcstride, \
int h, int mx, int my); \
\
void ff_avg_bilin_##SIZE##h_msa(uint8_t *dst, ptrdiff_t dststride, \
const uint8_t *src, ptrdiff_t srcstride, \
int h, int mx, int my); \
\
void ff_avg_bilin_##SIZE##v_msa(uint8_t *dst, ptrdiff_t dststride, \
const uint8_t *src, ptrdiff_t srcstride, \
int h, int mx, int my); \
\
void ff_avg_bilin_##SIZE##hv_msa(uint8_t *dst, ptrdiff_t dststride, \
const uint8_t *src, ptrdiff_t srcstride, \
int h, int mx, int my);

#define VP9_COPY_AVG_MIPS_MSA_FUNC(SIZE) \
void ff_copy##SIZE##_msa(uint8_t *dst, ptrdiff_t dststride, \
const uint8_t *src, ptrdiff_t srcstride, \
@@ -79,6 +104,12 @@ VP9_8TAP_MIPS_MSA_FUNC(16, smooth, FILTER_8TAP_SMOOTH);
VP9_8TAP_MIPS_MSA_FUNC(8, smooth, FILTER_8TAP_SMOOTH);
VP9_8TAP_MIPS_MSA_FUNC(4, smooth, FILTER_8TAP_SMOOTH);

VP9_BILINEAR_MIPS_MSA_FUNC(64);
VP9_BILINEAR_MIPS_MSA_FUNC(32);
VP9_BILINEAR_MIPS_MSA_FUNC(16);
VP9_BILINEAR_MIPS_MSA_FUNC(8);
VP9_BILINEAR_MIPS_MSA_FUNC(4);

VP9_COPY_AVG_MIPS_MSA_FUNC(64);
VP9_COPY_AVG_MIPS_MSA_FUNC(32);
VP9_COPY_AVG_MIPS_MSA_FUNC(16);
@@ -86,6 +117,7 @@ VP9_COPY_AVG_MIPS_MSA_FUNC(8);
VP9_COPY_AVG_MIPS_MSA_FUNC(4);

#undef VP9_8TAP_MIPS_MSA_FUNC
#undef VP9_BILINEAR_MIPS_MSA_FUNC
#undef VP9_COPY_AVG_MIPS_MSA_FUNC

void ff_loop_filter_h_4_8_msa(uint8_t *dst, ptrdiff_t stride, int32_t e,


Loading…
Cancel
Save