aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mips/vp3dsp_init_mips.c
diff options
context:
space:
mode:
authorgxw <guxiwei-hf@loongson.cn>2019-02-12 18:55:48 +0800
committerMichael Niedermayer <michael@niedermayer.cc>2019-02-16 19:56:57 +0100
commit1466dc140d49d70ce07e03a5aebb21725166045a (patch)
treefdab494d21f9d578b04dc68e42a8bcbb88f8d8a8 /libavcodec/mips/vp3dsp_init_mips.c
parent1f686d023b95219db933394a7704ad9aa5f01cbb (diff)
downloadffmpeg-1466dc140d49d70ce07e03a5aebb21725166045a.tar.gz
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: Shiyou Yin <yinshiyou-hf@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/mips/vp3dsp_init_mips.c')
-rw-r--r--libavcodec/mips/vp3dsp_init_mips.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libavcodec/mips/vp3dsp_init_mips.c b/libavcodec/mips/vp3dsp_init_mips.c
index d72e8ece71..e183db35b6 100644
--- a/libavcodec/mips/vp3dsp_init_mips.c
+++ b/libavcodec/mips/vp3dsp_init_mips.c
@@ -38,8 +38,22 @@ static av_cold void vp3dsp_init_msa(VP3DSPContext *c, int flags)
}
#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)
{
+#if HAVE_MMI
+ vp3dsp_init_mmi(c, flags);
+#endif /* HAVE_MMI */
#if HAVE_MSA
vp3dsp_init_msa(c, flags);
#endif /* HAVE_MSA */