diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-02-18 19:11:39 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-02-21 01:06:10 +0100 |
commit | ef04737e189e25904b7ed06fc3cd7a19e05f27f0 (patch) | |
tree | 10453476014c4bf453add96f74f79f0350583306 /libavcodec/vvc/vvcdsp.h | |
parent | 1eafbc27e2d3824b2fd3123bd78c25bc60fed8ba (diff) | |
download | ffmpeg-ef04737e189e25904b7ed06fc3cd7a19e05f27f0.tar.gz |
avcodec/vvc/vvc_ps: Use union for luts to avoid unaligned accesses
These arrays are currently accessed via uint16_t* pointers
although nothing guarantees their alignment. Furthermore,
this is problematic wrt the effective-type rules.
Fix this by using a union of arrays of uint8_t and uint16_t.
Reviewed-by: Nuo Mi <nuomi2021@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/vvc/vvcdsp.h')
-rw-r--r-- | libavcodec/vvc/vvcdsp.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vvc/vvcdsp.h b/libavcodec/vvc/vvcdsp.h index 6f59e73654..f4fb3cb7d7 100644 --- a/libavcodec/vvc/vvcdsp.h +++ b/libavcodec/vvc/vvcdsp.h @@ -119,7 +119,7 @@ typedef struct VVCItxDSPContext { } VVCItxDSPContext; typedef struct VVCLMCSDSPContext { - void (*filter)(uint8_t *dst, ptrdiff_t dst_stride, int width, int height, const uint8_t *lut); + void (*filter)(uint8_t *dst, ptrdiff_t dst_stride, int width, int height, const void *lut); } VVCLMCSDSPContext; typedef struct VVCLFDSPContext { |