[FFmpeg-devel] [PATCH v4 1/7] avcodec/la: add LSX optimization for h264 idct.

Michael Niedermayer michael at niedermayer.cc
Thu May 25 00:28:09 EEST 2023


On Wed, May 24, 2023 at 03:48:27PM +0800, Hao Chen wrote:
> From: Shiyou Yin <yinshiyou-hf at loongson.cn>
> 
> loongson_asm.S is LoongArch asm optimization helper.
> Add functions:
>   ff_h264_idct_add_8_lsx
>   ff_h264_idct8_add_8_lsx
>   ff_h264_idct_dc_add_8_lsx
>   ff_h264_idct8_dc_add_8_lsx
>   ff_h264_idct_add16_8_lsx
>   ff_h264_idct8_add4_8_lsx
>   ff_h264_idct_add8_8_lsx
>   ff_h264_idct_add8_422_8_lsx
>   ff_h264_idct_add16_intra_8_lsx
>   ff_h264_luma_dc_dequant_idct_8_lsx
> Replaced function(LSX is sufficient for these functions):
>   ff_h264_idct_add_lasx
>   ff_h264_idct4x4_addblk_dc_lasx
>   ff_h264_idct_add16_lasx
>   ff_h264_idct8_add4_lasx
>   ff_h264_idct_add8_lasx
>   ff_h264_idct_add8_422_lasx
>   ff_h264_idct_add16_intra_lasx
>   ff_h264_deq_idct_luma_dc_lasx
> Renamed functions:
>   ff_h264_idct8_addblk_lasx ==> ff_h264_idct8_add_8_lasx
>   ff_h264_idct8_dc_addblk_lasx ==> ff_h264_idct8_dc_add_8_lasx
> 
> ./configure --disable-lasx
> ffmpeg -i 1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -y /dev/null -an
> before: 155fps
> after:  161fps
> ---
>  libavcodec/loongarch/Makefile                 |   3 +-
>  libavcodec/loongarch/h264_deblock_lasx.c      |   2 +-
>  libavcodec/loongarch/h264dsp_init_loongarch.c |  39 +-
>  libavcodec/loongarch/h264dsp_lasx.c           |   2 +-
>  .../{h264dsp_lasx.h => h264dsp_loongarch.h}   |  60 +-
>  libavcodec/loongarch/h264idct.S               | 658 ++++++++++++
>  libavcodec/loongarch/h264idct_lasx.c          | 498 ---------
>  libavcodec/loongarch/h264idct_loongarch.c     | 184 ++++
>  libavcodec/loongarch/loongson_asm.S           | 945 ++++++++++++++++++
>  9 files changed, 1848 insertions(+), 543 deletions(-)
>  rename libavcodec/loongarch/{h264dsp_lasx.h => h264dsp_loongarch.h} (68%)
>  create mode 100644 libavcodec/loongarch/h264idct.S
>  delete mode 100644 libavcodec/loongarch/h264idct_lasx.c
>  create mode 100644 libavcodec/loongarch/h264idct_loongarch.c
>  create mode 100644 libavcodec/loongarch/loongson_asm.S

Applying: avcodec/la: add LSX optimization for h264 idct.
.git/rebase-apply/patch:1431: tab in indent.
	} else if (nnz) {
warning: 1 line adds whitespace errors.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If the United States is serious about tackling the national security threats 
related to an insecure 5G network, it needs to rethink the extent to which it
values corporate profits and government espionage over security.-Bruce Schneier
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20230524/715ecec8/attachment.sig>


More information about the ffmpeg-devel mailing list