summaryrefslogtreecommitdiffstats
path: root/libavcodec/mips/hevcdsp_mips.h
diff options
context:
space:
mode:
authorShiyou Yin <yinshiyou-hf@loongson.cn>2019-01-18 14:42:20 +0800
committerMichael Niedermayer <michael@niedermayer.cc>2019-01-20 00:44:02 +0100
commit32421602dfb18c58a9563b748c199955fc158abc (patch)
treea1dcf860769dd3cd137c782a5786129a8ac2128e /libavcodec/mips/hevcdsp_mips.h
parent32fb83e4318845a7f44f7bed02d5963b9e81804e (diff)
downloadffmpeg-streaming-32421602dfb18c58a9563b748c199955fc158abc.zip
ffmpeg-streaming-32421602dfb18c58a9563b748c199955fc158abc.tar.gz
avcodec/mips: [loongson] optimize put_hevc_pel_bi_pixels_8 with mmi.
Optimize put_hevc_pel_bi_pixels_8 with mmi in the case width=8/16/24/32/48/64. This optimization improved HEVC decoding performance 2%(1.77x to 1.81x, tested on loongson 3A3000). Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/mips/hevcdsp_mips.h')
-rw-r--r--libavcodec/mips/hevcdsp_mips.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/libavcodec/mips/hevcdsp_mips.h b/libavcodec/mips/hevcdsp_mips.h
index 1573d1c..ff9401c 100644
--- a/libavcodec/mips/hevcdsp_mips.h
+++ b/libavcodec/mips/hevcdsp_mips.h
@@ -479,4 +479,23 @@ void ff_hevc_addblk_32x32_msa(uint8_t *dst, int16_t *pi16Coeffs,
ptrdiff_t stride);
void ff_hevc_idct_luma_4x4_msa(int16_t *pi16Coeffs);
+/* Loongson optimization */
+#define L_BI_MC(PEL, DIR, WIDTH, TYPE) \
+void ff_hevc_put_hevc_##PEL##_bi_##DIR##WIDTH##_8_##TYPE(uint8_t *dst, \
+ ptrdiff_t dst_stride, \
+ uint8_t *src, \
+ ptrdiff_t src_stride, \
+ int16_t *src_16bit, \
+ int height, \
+ intptr_t mx, \
+ intptr_t my, \
+ int width)
+
+L_BI_MC(pel, pixels, 8, mmi);
+L_BI_MC(pel, pixels, 16, mmi);
+L_BI_MC(pel, pixels, 24, mmi);
+L_BI_MC(pel, pixels, 32, mmi);
+L_BI_MC(pel, pixels, 48, mmi);
+L_BI_MC(pel, pixels, 64, mmi);
+#undef L_BI_MC
#endif // #ifndef AVCODEC_MIPS_HEVCDSP_MIPS_H
OpenPOWER on IntegriCloud