diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-08-02 00:56:53 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-08-05 02:53:35 +0200 |
commit | 6c9a60ada4256cf5c388d8dc48860e24c15396c0 (patch) | |
tree | cab957ed745bee60f67b45ef3ad0c1a315cb5494 /libavutil/loongarch/loongson_intrinsics.h | |
parent | 101e154c2860abe4a8dcb7e54b2bc903adfd87b6 (diff) |
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>
Diffstat (limited to 'libavutil/loongarch/loongson_intrinsics.h')
-rw-r--r-- | libavutil/loongarch/loongson_intrinsics.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavutil/loongarch/loongson_intrinsics.h b/libavutil/loongarch/loongson_intrinsics.h index eb256863c8..e7911d3ebc 100644 --- a/libavutil/loongarch/loongson_intrinsics.h +++ b/libavutil/loongarch/loongson_intrinsics.h @@ -89,6 +89,11 @@ #ifdef __loongarch_sx #include <lsxintrin.h> + +/* __lsx_vldx() from lsxintrin.h does not accept a const void*; + * remove the following once it does. */ +#define LSX_VLDX(cptr, stride) __lsx_vldx((void*)(cptr), (stride)) + /* * ============================================================================= * Description : Dot product & addition of byte vector elements |