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

avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for VP9 idct 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 d50ab820
......@@ -44,7 +44,8 @@ MSA-OBJS-$(CONFIG_HEVC_DECODER) += mips/hevcdsp_msa.o \
mips/hevc_lpf_sao_msa.o \
mips/hevcpred_msa.o
MSA-OBJS-$(CONFIG_VP9_DECODER) += mips/vp9_mc_msa.o \
mips/vp9_lpf_msa.o
mips/vp9_lpf_msa.o \
mips/vp9_idct_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,29 @@
#include "vp9dsp_mips.h"
#if HAVE_MSA
static av_cold void vp9dsp_itxfm_init_msa(VP9DSPContext *dsp, int bpp)
{
if (bpp == 8) {
#define init_itxfm(tx, sz) \
dsp->itxfm_add[tx][DCT_DCT] = ff_idct_idct_##sz##_add_msa; \
dsp->itxfm_add[tx][DCT_ADST] = ff_iadst_idct_##sz##_add_msa; \
dsp->itxfm_add[tx][ADST_DCT] = ff_idct_iadst_##sz##_add_msa; \
dsp->itxfm_add[tx][ADST_ADST] = ff_iadst_iadst_##sz##_add_msa \
#define init_idct(tx, nm) \
dsp->itxfm_add[tx][DCT_DCT] = \
dsp->itxfm_add[tx][ADST_DCT] = \
dsp->itxfm_add[tx][DCT_ADST] = \
dsp->itxfm_add[tx][ADST_ADST] = nm##_add_msa
init_itxfm(TX_4X4, 4x4);
init_itxfm(TX_8X8, 8x8);
init_itxfm(TX_16X16, 16x16);
init_idct(TX_32X32, ff_idct_idct_32x32);
#undef init_itxfm
#undef init_idct
}
}
static av_cold void vp9dsp_mc_init_msa(VP9DSPContext *dsp, int bpp)
{
......@@ -106,6 +129,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_itxfm_init_msa(dsp, bpp);
vp9dsp_mc_init_msa(dsp, bpp);
vp9dsp_loopfilter_init_msa(dsp, bpp);
}
......
......@@ -120,5 +120,33 @@ void ff_loop_filter_v_48_16_msa(uint8_t *dst, ptrdiff_t stride, int32_t e,
int32_t i, int32_t h);
void ff_loop_filter_v_84_16_msa(uint8_t *dst, ptrdiff_t stride, int32_t e,
int32_t i, int32_t h);
void ff_idct_idct_4x4_add_msa(uint8_t *dst, ptrdiff_t stride,
int16_t *block, int eob);
void ff_idct_idct_8x8_add_msa(uint8_t *dst, ptrdiff_t stride,
int16_t *block, int eob);
void ff_idct_idct_16x16_add_msa(uint8_t *dst, ptrdiff_t stride,
int16_t *block, int eob);
void ff_idct_idct_32x32_add_msa(uint8_t *dst, ptrdiff_t stride,
int16_t *block, int eob);
void ff_iadst_iadst_4x4_add_msa(uint8_t *dst, ptrdiff_t stride,
int16_t *block, int eob);
void ff_iadst_iadst_8x8_add_msa(uint8_t *dst, ptrdiff_t stride,
int16_t *block, int eob);
void ff_iadst_iadst_16x16_add_msa(uint8_t *dst, ptrdiff_t stride,
int16_t *block, int eob);
void ff_iadst_idct_4x4_add_msa(uint8_t *dst, ptrdiff_t stride,
int16_t *block, int eob);
void ff_iadst_idct_8x8_add_msa(uint8_t *dst, ptrdiff_t stride,
int16_t *block, int eob);
void ff_iadst_idct_16x16_add_msa(uint8_t *dst, ptrdiff_t stride,
int16_t *block, int eob);
void ff_idct_iadst_4x4_add_msa(uint8_t *pu8Dest, ptrdiff_t stride,
int16_t *block, int eob);
void ff_idct_iadst_8x8_add_msa(uint8_t *pu8Dest, ptrdiff_t stride,
int16_t *block, int eob);
void ff_idct_iadst_16x16_add_msa(uint8_t *pu8Dest, ptrdiff_t stride,
int16_t *block, int eob);
void ff_iwht_iwht_4x4_add_msa(uint8_t *dst, ptrdiff_t stride,
int16_t *block, int eob);
#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