Commit e21b090b authored by Shivraj Patil's avatar Shivraj Patil Committed by Michael Niedermayer

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

Signed-off-by: 's avatarShivraj Patil <shivraj.patil@imgtec.com>
Reviewed-by: 's avatar"Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 0c0cd34f
......@@ -45,7 +45,8 @@ MSA-OBJS-$(CONFIG_HEVC_DECODER) += mips/hevcdsp_msa.o \
mips/hevcpred_msa.o
MSA-OBJS-$(CONFIG_VP9_DECODER) += mips/vp9_mc_msa.o \
mips/vp9_lpf_msa.o \
mips/vp9_idct_msa.o
mips/vp9_idct_msa.o \
mips/vp9_intra_msa.o
MSA-OBJS-$(CONFIG_H264DSP) += mips/h264dsp_msa.o \
mips/h264idct_msa.o
MSA-OBJS-$(CONFIG_H264QPEL) += mips/h264qpel_msa.o
......
This diff is collapsed.
......@@ -24,6 +24,36 @@
#include "vp9dsp_mips.h"
#if HAVE_MSA
static av_cold void vp9dsp_intrapred_init_msa(VP9DSPContext *dsp, int bpp)
{
if (bpp == 8) {
#define init_intra_pred_msa(tx, sz) \
dsp->intra_pred[tx][VERT_PRED] = ff_vert_##sz##_msa; \
dsp->intra_pred[tx][HOR_PRED] = ff_hor_##sz##_msa; \
dsp->intra_pred[tx][DC_PRED] = ff_dc_##sz##_msa; \
dsp->intra_pred[tx][LEFT_DC_PRED] = ff_dc_left_##sz##_msa; \
dsp->intra_pred[tx][TOP_DC_PRED] = ff_dc_top_##sz##_msa; \
dsp->intra_pred[tx][DC_128_PRED] = ff_dc_128_##sz##_msa; \
dsp->intra_pred[tx][DC_127_PRED] = ff_dc_127_##sz##_msa; \
dsp->intra_pred[tx][DC_129_PRED] = ff_dc_129_##sz##_msa; \
dsp->intra_pred[tx][TM_VP8_PRED] = ff_tm_##sz##_msa; \
init_intra_pred_msa(TX_16X16, 16x16);
init_intra_pred_msa(TX_32X32, 32x32);
#undef init_intra_pred_msa
#define init_intra_pred_msa(tx, sz) \
dsp->intra_pred[tx][DC_PRED] = ff_dc_##sz##_msa; \
dsp->intra_pred[tx][LEFT_DC_PRED] = ff_dc_left_##sz##_msa; \
dsp->intra_pred[tx][TOP_DC_PRED] = ff_dc_top_##sz##_msa; \
dsp->intra_pred[tx][TM_VP8_PRED] = ff_tm_##sz##_msa; \
init_intra_pred_msa(TX_4X4, 4x4);
init_intra_pred_msa(TX_8X8, 8x8);
#undef init_intra_pred_msa
}
}
static av_cold void vp9dsp_itxfm_init_msa(VP9DSPContext *dsp, int bpp)
{
if (bpp == 8) {
......@@ -129,6 +159,7 @@ static av_cold void vp9dsp_loopfilter_init_msa(VP9DSPContext *dsp, int bpp)
static av_cold void vp9dsp_init_msa(VP9DSPContext *dsp, int bpp)
{
vp9dsp_intrapred_init_msa(dsp, bpp);
vp9dsp_itxfm_init_msa(dsp, bpp);
vp9dsp_mc_init_msa(dsp, bpp);
vp9dsp_loopfilter_init_msa(dsp, bpp);
......
......@@ -149,4 +149,57 @@ void ff_idct_iadst_16x16_add_msa(uint8_t *pu8Dest, ptrdiff_t stride,
void ff_iwht_iwht_4x4_add_msa(uint8_t *dst, ptrdiff_t stride,
int16_t *block, int eob);
void ff_vert_16x16_msa(uint8_t *dst, ptrdiff_t stride, const uint8_t *left,
const uint8_t *top);
void ff_vert_32x32_msa(uint8_t *dst, ptrdiff_t stride, const uint8_t *left,
const uint8_t *top);
void ff_hor_16x16_msa(uint8_t *dst, ptrdiff_t stride, const uint8_t *left,
const uint8_t *top);
void ff_hor_32x32_msa(uint8_t *dst, ptrdiff_t stride, const uint8_t *left,
const uint8_t *top);
void ff_dc_4x4_msa(uint8_t *dst, ptrdiff_t stride, const uint8_t *left,
const uint8_t *top);
void ff_dc_8x8_msa(uint8_t *dst, ptrdiff_t stride, const uint8_t *left,
const uint8_t *top);
void ff_dc_16x16_msa(uint8_t *dst, ptrdiff_t stride, const uint8_t *left,
const uint8_t *top);
void ff_dc_32x32_msa(uint8_t *dst, ptrdiff_t stride, const uint8_t *left,
const uint8_t *top);
void ff_dc_left_4x4_msa(uint8_t *dst, ptrdiff_t stride, const uint8_t *left,
const uint8_t *top);
void ff_dc_left_8x8_msa(uint8_t *dst, ptrdiff_t stride, const uint8_t *left,
const uint8_t *top);
void ff_dc_left_16x16_msa(uint8_t *dst, ptrdiff_t stride,
const uint8_t *left, const uint8_t *top);
void ff_dc_left_32x32_msa(uint8_t *dst, ptrdiff_t stride,
const uint8_t *left, const uint8_t *top);
void ff_dc_top_4x4_msa(uint8_t *dst, ptrdiff_t stride, const uint8_t *left,
const uint8_t *top);
void ff_dc_top_8x8_msa(uint8_t *dst, ptrdiff_t stride, const uint8_t *left,
const uint8_t *top);
void ff_dc_top_16x16_msa(uint8_t *dst, ptrdiff_t stride,
const uint8_t *left, const uint8_t *top);
void ff_dc_top_32x32_msa(uint8_t *dst, ptrdiff_t stride,
const uint8_t *left, const uint8_t *top);
void ff_dc_128_16x16_msa(uint8_t *dst, ptrdiff_t stride,
const uint8_t *left, const uint8_t *top);
void ff_dc_128_32x32_msa(uint8_t *dst, ptrdiff_t stride,
const uint8_t *left, const uint8_t *top);
void ff_dc_127_16x16_msa(uint8_t *dst, ptrdiff_t stride,
const uint8_t *left, const uint8_t *top);
void ff_dc_127_32x32_msa(uint8_t *dst, ptrdiff_t stride,
const uint8_t *left, const uint8_t *top);
void ff_dc_129_16x16_msa(uint8_t *dst, ptrdiff_t stride,
const uint8_t *left, const uint8_t *top);
void ff_dc_129_32x32_msa(uint8_t *dst, ptrdiff_t stride,
const uint8_t *left, const uint8_t *top);
void ff_tm_4x4_msa(uint8_t *dst, ptrdiff_t stride, const uint8_t *left,
const uint8_t *top);
void ff_tm_8x8_msa(uint8_t *dst, ptrdiff_t stride, const uint8_t *left,
const uint8_t *top);
void ff_tm_16x16_msa(uint8_t *dst, ptrdiff_t stride, const uint8_t *left,
const uint8_t *top);
void ff_tm_32x32_msa(uint8_t *dst, ptrdiff_t stride, const uint8_t *left,
const uint8_t *top);
#endif // #ifndef AVCODEC_MIPS_VP9DSP_MIPS_H
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