Commit 1466dc14 authored by gxw's avatar gxw Committed by Michael Niedermayer

avcodec/mips: [loongson] optimize theora decoding with mmi.

Optimize theora decoding with mmi in functions:
1. ff_vp3_idct_add_mmi
2. ff_vp3_idct_put_mmi
3. ff_vp3_idct_dc_add_mmi
4. ff_put_no_rnd_pixels_l2_mmi

Theora decoding speed improved about 32%(from 88fps to 116fps, Tested on loongson 3A3000).
Reviewed-by: 's avatarShiyou Yin <yinshiyou-hf@loongson.cn>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 1f686d02
...@@ -87,3 +87,4 @@ MMI-OBJS-$(CONFIG_HPELDSP) += mips/hpeldsp_mmi.o ...@@ -87,3 +87,4 @@ MMI-OBJS-$(CONFIG_HPELDSP) += mips/hpeldsp_mmi.o
MMI-OBJS-$(CONFIG_VC1_DECODER) += mips/vc1dsp_mmi.o MMI-OBJS-$(CONFIG_VC1_DECODER) += mips/vc1dsp_mmi.o
MMI-OBJS-$(CONFIG_WMV2DSP) += mips/wmv2dsp_mmi.o MMI-OBJS-$(CONFIG_WMV2DSP) += mips/wmv2dsp_mmi.o
MMI-OBJS-$(CONFIG_HEVC_DECODER) += mips/hevcdsp_mmi.o MMI-OBJS-$(CONFIG_HEVC_DECODER) += mips/hevcdsp_mmi.o
MMI-OBJS-$(CONFIG_VP3DSP) += mips/vp3dsp_idct_mmi.o
This diff is collapsed.
...@@ -38,8 +38,22 @@ static av_cold void vp3dsp_init_msa(VP3DSPContext *c, int flags) ...@@ -38,8 +38,22 @@ static av_cold void vp3dsp_init_msa(VP3DSPContext *c, int flags)
} }
#endif /* HAVE_MSA */ #endif /* HAVE_MSA */
#if HAVE_MMI
static av_cold void vp3dsp_init_mmi(VP3DSPContext *c, int flags)
{
c->put_no_rnd_pixels_l2 = ff_put_no_rnd_pixels_l2_mmi;
c->idct_add = ff_vp3_idct_add_mmi;
c->idct_put = ff_vp3_idct_put_mmi;
c->idct_dc_add = ff_vp3_idct_dc_add_mmi;
}
#endif /* HAVE_MMI */
av_cold void ff_vp3dsp_init_mips(VP3DSPContext *c, int flags) av_cold void ff_vp3dsp_init_mips(VP3DSPContext *c, int flags)
{ {
#if HAVE_MMI
vp3dsp_init_mmi(c, flags);
#endif /* HAVE_MMI */
#if HAVE_MSA #if HAVE_MSA
vp3dsp_init_msa(c, flags); vp3dsp_init_msa(c, flags);
#endif /* HAVE_MSA */ #endif /* HAVE_MSA */
......
...@@ -34,4 +34,10 @@ void ff_put_no_rnd_pixels_l2_msa(uint8_t *dst, const uint8_t *src1, ...@@ -34,4 +34,10 @@ void ff_put_no_rnd_pixels_l2_msa(uint8_t *dst, const uint8_t *src1,
void ff_vp3_h_loop_filter_msa(uint8_t *first_pixel, ptrdiff_t stride, void ff_vp3_h_loop_filter_msa(uint8_t *first_pixel, ptrdiff_t stride,
int *bounding_values); int *bounding_values);
void ff_vp3_idct_add_mmi(uint8_t *dest, ptrdiff_t line_size, int16_t *block);
void ff_vp3_idct_put_mmi(uint8_t *dest, ptrdiff_t line_size, int16_t *block);
void ff_vp3_idct_dc_add_mmi(uint8_t *dest, ptrdiff_t line_size, int16_t *block);
void ff_put_no_rnd_pixels_l2_mmi(uint8_t *dst, const uint8_t *src1,
const uint8_t *src2, ptrdiff_t stride, int h);
#endif /* #ifndef AVCODEC_MIPS_VP3DSP_MIPS_H */ #endif /* #ifndef AVCODEC_MIPS_VP3DSP_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