Commit Graph

9 Commits

Author SHA1 Message Date
yuanhecai 82278e8749
avutil/la: Add function performance testing
This patch supports the use of the "checkasm --bench" testing feature
on loongarch platform.

Change-Id: I42790388d057c9ade0dfa38a19d9c1fd44ca0bc3
Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-05-25 21:05:21 +02:00
Shiyou Yin b09f31af1b avutil: [LA] use getauxval to do runtime check.
Replace cpucfg with getauxval to avoid crash in case of
some processor capabilities are not supportted by kernel used.

Reviewed-by: Steven Liu <liuqi05@kuaishou.com>
2023-02-27 11:26:42 +08:00
Andreas Rheinhardt e402bd65b1 Revert "avcodec/loongarch/h264chroma, vc1dsp_lasx: Add wrapper for __lasx_xvldx"
This reverts commit 2c8dc7e953.
The loongarch headers have been fixed, so that this wrapper
is no longer necessary.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-14 14:09:26 +02:00
Andreas Rheinhardt 1234df7501 Revert "avcodec/loongarch: Add wrapper for __lsx_vldx"
This reverts commit 6c9a60ada4.
The loongarch headers have been fixed, so that this workaround
is no longer necessary.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-14 14:09:26 +02:00
Andreas Rheinhardt 2c8dc7e953 avcodec/loongarch/h264chroma, vc1dsp_lasx: Add wrapper for __lasx_xvldx
__lasx_xvldx does not accept a pointer to const (in fact,
no function in lasxintrin.h does so), although it is not allowed
to modify the pointed-to buffer. Therefore this commit adds a wrapper
for it in order to constify the H264Chroma API in a later commit.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-05 02:59:58 +02:00
Andreas Rheinhardt 6c9a60ada4 avcodec/loongarch: Add wrapper for __lsx_vldx
__lsx_vldx does not accept a pointer to const (in fact,
no function in lsxintrin.h does so), although it is not allowed
to modify the pointed-to buffer. Therefore this commit adds a wrapper
for it in order to constify the HEVC DSP functions in a later commit.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-05 02:53:35 +02:00
Hao Chen 5b812acdea avutil: [loongarch] Update loongson_intrinsics.h to v1.1.0
The loongson_intrinsics.h file is updated from v1.0.3 version
to v1.1.0. Some spelling mistakes are fixed and new functions are added.

Signed-off-by: Hao Chen <chenhao@loongson.cn>
Reviewed-by: 殷时友 <yinshiyou-hf@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-03-01 23:53:40 +01:00
Shiyou Yin 6038a9eb92 avcodec: [loongarch] Optimize h264_chroma_mc with LASX.
./ffmpeg -i ../1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -y /dev/null -an
before:170
after :183

Change-Id: I42ff23cc2dc7c32bd1b7e4274da9d9ec87065f20
Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn>
Reviewed-by: guxiwei <guxiwei-hf@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-12-15 18:37:40 +01:00
Shiyou Yin 9a840ffa17 avutil: [loongarch] Add support for loongarch SIMD.
LSX and LASX is loongarch SIMD extention.
They are enabled by default if compiler support it, and can be disabled
with '--disable-lsx' '--disable-lasx'.

Change-Id: Ie2608ea61dbd9b7fffadbf0ec2348bad6c124476
Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn>
Reviewed-by: guxiwei <guxiwei-hf@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-12-15 18:37:40 +01:00