[FFmpeg-cvslog] avcodec/vvcdec: fix uninitialized last element of xxx_bd and ctb_to_xxx_bd arrays

Frank Plowman git at videolan.org
Tue Apr 2 15:59:23 EEST 2024


ffmpeg | branch: master | Frank Plowman <post at frankplowman.com> | Wed Mar 27 21:01:00 2024 +0800| [9c845e90872ff3cc2a72ccf06c90ee6a3577b70e] | committer: Nuo Mi

avcodec/vvcdec: fix uninitialized last element of xxx_bd and ctb_to_xxx_bd arrays

see "6.5.1 CTB raster scanning, tile scanning, and subpicture scanning processes"

Co-authored-by: Nuo Mi <nuomi2021 at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9c845e90872ff3cc2a72ccf06c90ee6a3577b70e
---

 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 270e1c1535..d50822024f 100644
--- a/libavcodec/vvc/vvc_ps.c
+++ b/libavcodec/vvc/vvc_ps.c
@@ -292,6 +292,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;
@@ -299,6 +300,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;
 }
 



More information about the ffmpeg-cvslog mailing list