diff options
author | Shiyou Yin <yinshiyou-hf@loongson.cn> | 2019-01-21 18:10:24 +0800 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-01-22 00:46:36 +0100 |
commit | 6d1916481137a9608d95fc3aa8f3d874b7aaea3c (patch) | |
tree | 04914f3e1ea9a920e5d1d262c063e4502fa1b663 /libavcodec/mips/hevcdsp_mips.h | |
parent | 8133921ad2d80b8b2fe4e0bf6e0abd40afe3e235 (diff) | |
download | ffmpeg-6d1916481137a9608d95fc3aa8f3d874b7aaea3c.tar.gz |
avcodec/mips: [loongson] optimize put_hevc_qpel_hv_8 with mmi.
Optimize put_hevc_qpel_hv_8 with mmi in the case width=4/8/12/16/24/32/48/64.
This optimization improved HEVC decoding performance 11%(1.81x to 2.01x, 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.h | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/libavcodec/mips/hevcdsp_mips.h b/libavcodec/mips/hevcdsp_mips.h index ff9401c2ca..2351c9b7c3 100644 --- a/libavcodec/mips/hevcdsp_mips.h +++ b/libavcodec/mips/hevcdsp_mips.h @@ -480,16 +480,33 @@ void ff_hevc_addblk_32x32_msa(uint8_t *dst, int16_t *pi16Coeffs, 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) +#define L_MC(PEL, DIR, WIDTH, TYPE) \ +void ff_hevc_put_hevc_##PEL##_##DIR##WIDTH##_8_##TYPE(int16_t *dst, \ + uint8_t *src, \ + ptrdiff_t src_stride, \ + int height, \ + intptr_t mx, \ + intptr_t my, \ + int width) +L_MC(qpel, hv, 4, mmi); +L_MC(qpel, hv, 8, mmi); +L_MC(qpel, hv, 12, mmi); +L_MC(qpel, hv, 16, mmi); +L_MC(qpel, hv, 24, mmi); +L_MC(qpel, hv, 32, mmi); +L_MC(qpel, hv, 48, mmi); +L_MC(qpel, hv, 64, mmi); + +#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); |