aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vvc
diff options
context:
space:
mode:
authorFrank Plowman <post@frankplowman.com>2024-04-13 11:55:54 +0100
committerNuo Mi <nuomi2021@gmail.com>2024-04-15 21:06:13 +0800
commit993c231de0b1a7574c0951959314bb692646b93e (patch)
tree8a61da2483a37941f42666d6bc1d1a5b2cd52d76 /libavcodec/vvc
parent5e380bcdb13dd47ce9c358a4edb281f05fde3f24 (diff)
downloadffmpeg-993c231de0b1a7574c0951959314bb692646b93e.tar.gz
lavc/vvc: Increase size of ctb_size_y
sps_log2_ctu_size_minus5 is between 0 and 2, with 3 reserved for future use. The VVC decoder allows sps_log2_ctu_size_minus5 to be 3, and so ctb_size_y should be at least 16 bits to prevent overflows. An alternative patch would leave sps_log2_ctu_size_minus5 as 8 bits and disallow sps_log2_ctu_size_minus5 = 3. Signed-off-by: Frank Plowman <post@frankplowman.com>
Diffstat (limited to 'libavcodec/vvc')
-rw-r--r--libavcodec/vvc/ps.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vvc/ps.h b/libavcodec/vvc/ps.h
index 78f1687fef..6656a06320 100644
--- a/libavcodec/vvc/ps.h
+++ b/libavcodec/vvc/ps.h
@@ -69,7 +69,7 @@ typedef struct VVCSPS {
uint8_t bit_depth; ///< BitDepth
uint8_t qp_bd_offset; ///< QpBdOffset
uint8_t ctb_log2_size_y; ///< CtbLog2SizeY
- uint8_t ctb_size_y; ///< CtbSizeY
+ uint16_t ctb_size_y; ///< CtbSizeY
uint8_t min_cb_log2_size_y; ///< MinCbLog2SizeY
uint8_t min_cb_size_y; ///< MinCbSizeY
uint8_t max_tb_size_y; ///< MaxTbSizeY