mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-12-04 13:54:05 +00:00
Fix array sizes to prevent ASAN errors (large block interpolation).
This commit is contained in:
parent
50ca269a13
commit
9e40f435cb
|
@ -43,13 +43,13 @@
|
||||||
#include "kvazaar.h"
|
#include "kvazaar.h"
|
||||||
#include "search_inter.h"
|
#include "search_inter.h"
|
||||||
|
|
||||||
// AVX2 implementation of horizontal filter reads and
|
// AVX2 implementation of horizontal filter reads and
|
||||||
// writes two rows for luma and four for chroma at a time.
|
// writes two rows for luma and four for chroma at a time.
|
||||||
// Extra vertical padding is added to prevent segfaults.
|
// Extra vertical padding is added to prevent segfaults.
|
||||||
// Horizontal padding is not needed even if one extra byte
|
// Needs one extra byte for input buffer to prevent ASAN
|
||||||
// is read because kvz_image_alloc adds enough padding.
|
// error because AVX2 reads one extra byte in the end.
|
||||||
#define KVZ_IPOL_MAX_INPUT_SIZE_LUMA_SIMD ((KVZ_EXT_BLOCK_W_LUMA + 1) * KVZ_EXT_BLOCK_W_LUMA)
|
#define KVZ_IPOL_MAX_INPUT_SIZE_LUMA_SIMD ((KVZ_EXT_BLOCK_W_LUMA + 1) * KVZ_EXT_BLOCK_W_LUMA + 1)
|
||||||
#define KVZ_IPOL_MAX_INPUT_SIZE_CHROMA_SIMD ((KVZ_EXT_BLOCK_W_CHROMA + 3) * KVZ_EXT_BLOCK_W_CHROMA)
|
#define KVZ_IPOL_MAX_INPUT_SIZE_CHROMA_SIMD ((KVZ_EXT_BLOCK_W_CHROMA + 3) * KVZ_EXT_BLOCK_W_CHROMA + 1)
|
||||||
#define KVZ_IPOL_MAX_IM_SIZE_LUMA_SIMD ((KVZ_EXT_BLOCK_W_LUMA + 1) * LCU_WIDTH)
|
#define KVZ_IPOL_MAX_IM_SIZE_LUMA_SIMD ((KVZ_EXT_BLOCK_W_LUMA + 1) * LCU_WIDTH)
|
||||||
#define KVZ_IPOL_MAX_IM_SIZE_CHROMA_SIMD ((KVZ_EXT_BLOCK_W_CHROMA + 3) * LCU_WIDTH_C)
|
#define KVZ_IPOL_MAX_IM_SIZE_CHROMA_SIMD ((KVZ_EXT_BLOCK_W_CHROMA + 3) * LCU_WIDTH_C)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue