diff options
author | Shiyou Yin <yinshiyou-hf@loongson.cn> | 2019-01-18 14:42:20 +0800 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-01-20 00:44:02 +0100 |
commit | 32421602dfb18c58a9563b748c199955fc158abc (patch) | |
tree | a1dcf860769dd3cd137c782a5786129a8ac2128e /libavcodec/mips/hevcdsp_mips.h | |
parent | 32fb83e4318845a7f44f7bed02d5963b9e81804e (diff) | |
download | ffmpeg-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.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libavcodec/mips/hevcdsp_mips.h b/libavcodec/mips/hevcdsp_mips.h index 1573d1cc9d..ff9401c2ca 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 |