[FFmpeg-devel] [PATCH v2 04/16] avcodec/vvcdec: fix uninitialized last element of xxx_bd and ctb_to_xxx_bd arrays
Nuo Mi
nuomi2021 at gmail.com
Wed Mar 27 15:01:00 EET 2024
From: Frank Plowman <post at frankplowman.com>
see "6.5.1 CTB raster scanning, tile scanning, and subpicture scanning processes"
Co-authored-by: Nuo Mi <nuomi2021 at gmail.com>
---
libavcodec/vvc/vvc_ps.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/vvc/vvc_ps.c b/libavcodec/vvc/vvc_ps.c
index 7972803da6..3e7c0b4f5b 100644
--- a/libavcodec/vvc/vvc_ps.c
+++ b/libavcodec/vvc/vvc_ps.c
@@ -290,6 +290,7 @@ static int pps_bd(VVCPPS *pps)
for (int k = pps->col_bd[i]; k < j; k++)
pps->ctb_to_col_bd[k] = pps->col_bd[i];
}
+ pps->col_bd[r->num_tile_columns] = pps->ctb_to_col_bd[pps->ctb_width] = pps->ctb_width;
for (int i = 0, j = 0; i < r->num_tile_rows; i++) {
pps->row_bd[i] = j;
@@ -297,6 +298,8 @@ static int pps_bd(VVCPPS *pps)
for (int k = pps->row_bd[i]; k < j; k++)
pps->ctb_to_row_bd[k] = pps->row_bd[i];
}
+ pps->row_bd[r->num_tile_rows] = pps->ctb_to_row_bd[pps->ctb_height] = pps->ctb_height;
+
return 0;
}
--
2.25.1
More information about the ffmpeg-devel
mailing list