diff options
author | gxw <guxiwei-hf@loongson.cn> | 2019-10-21 15:56:47 +0800 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-10-30 18:09:00 +0100 |
commit | 648b422e171d5eab18f6c6fd346e4050d717b936 (patch) | |
tree | 838a0d9c88253b2f5c436e49d6b750fb17cd175e /libavcodec/mips/vc1dsp_mips.h | |
parent | af70c94c63cc0ccf6a8078e87c81d061b8765889 (diff) | |
download | ffmpeg-648b422e171d5eab18f6c6fd346e4050d717b936.tar.gz |
avcodec/mips: msa optimizations for vc1dsp
Performance of WMV3 decoding has speed up from 3.66x to 5.23x tested on 3A4000.
Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/mips/vc1dsp_mips.h')
-rw-r--r-- | libavcodec/mips/vc1dsp_mips.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libavcodec/mips/vc1dsp_mips.h b/libavcodec/mips/vc1dsp_mips.h index ad7d46e539..5897daea8c 100644 --- a/libavcodec/mips/vc1dsp_mips.h +++ b/libavcodec/mips/vc1dsp_mips.h @@ -191,4 +191,27 @@ void ff_avg_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */, uint8_t *src /* align 1 */, ptrdiff_t stride, int h, int x, int y); +void ff_vc1_inv_trans_8x8_msa(int16_t block[64]); +void ff_vc1_inv_trans_8x4_msa(uint8_t *dest, ptrdiff_t linesize, int16_t *block); +void ff_vc1_inv_trans_4x8_msa(uint8_t *dest, ptrdiff_t linesize, int16_t *block); + +#define FF_PUT_VC1_MSPEL_MC_MSA(hmode, vmode) \ +void ff_put_vc1_mspel_mc ## hmode ## vmode ## _msa(uint8_t *dst, \ + const uint8_t *src, \ + ptrdiff_t stride, int rnd); \ +void ff_put_vc1_mspel_mc ## hmode ## vmode ## _16_msa(uint8_t *dst, \ + const uint8_t *src, \ + ptrdiff_t stride, int rnd); + +FF_PUT_VC1_MSPEL_MC_MSA(1, 1); +FF_PUT_VC1_MSPEL_MC_MSA(1, 2); +FF_PUT_VC1_MSPEL_MC_MSA(1, 3); + +FF_PUT_VC1_MSPEL_MC_MSA(2, 1); +FF_PUT_VC1_MSPEL_MC_MSA(2, 2); +FF_PUT_VC1_MSPEL_MC_MSA(2, 3); + +FF_PUT_VC1_MSPEL_MC_MSA(3, 1); +FF_PUT_VC1_MSPEL_MC_MSA(3, 2); +FF_PUT_VC1_MSPEL_MC_MSA(3, 3); #endif /* AVCODEC_MIPS_VC1DSP_MIPS_H */ |