[FFmpeg-devel] [PATCH 2/2] avcodec/cbs_h265: fix valid range of column_{width, height}_minus1 in H265RawPPS

James Almer jamrial at gmail.com
Thu Jun 20 20:45:25 EEST 2019


The spec states they are in units of CTBs.

Signed-off-by: James Almer <jamrial at gmail.com>
---
 libavcodec/cbs_h265_syntax_template.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/cbs_h265_syntax_template.c b/libavcodec/cbs_h265_syntax_template.c
index d2a20ddb35..571c9d3544 100644
--- a/libavcodec/cbs_h265_syntax_template.c
+++ b/libavcodec/cbs_h265_syntax_template.c
@@ -1059,9 +1059,9 @@ static int FUNC(pps)(CodedBitstreamContext *ctx, RWContext *rw,
         flag(uniform_spacing_flag);
         if (!current->uniform_spacing_flag) {
             for (i = 0; i < current->num_tile_columns_minus1; i++)
-                ues(column_width_minus1[i], 0, sps->pic_width_in_luma_samples,  1, i);
+                ues(column_width_minus1[i], 0, pic_width_in_ctbs_y - 2,  1, i);
             for (i = 0; i < current->num_tile_rows_minus1; i++)
-                ues(row_height_minus1[i],   0, sps->pic_height_in_luma_samples, 1, i);
+                ues(row_height_minus1[i],   0, pic_height_in_ctbs_y - 2, 1, i);
         }
         flag(loop_filter_across_tiles_enabled_flag);
     } else {
-- 
2.22.0



More information about the ffmpeg-devel mailing list