This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new b899f7e8b5 lavc/vvc: Fix num_entry_points derivation when using RPR
b899f7e8b5 is described below
commit b899f7e8b51ab7c2d468968ca1059a78760a4bd2
Author: Frank Plowman <[email protected]>
AuthorDate: Sat Jun 6 10:13:23 2026 +0100
Commit: frankplow <[email protected]>
CommitDate: Wed Jun 10 14:02:29 2026 +0000
lavc/vvc: Fix num_entry_points derivation when using RPR
Context:
1. In the case sps_subpic_info_present=0, there is a single subpicture
which includes the entire picture.
2. When sps_subpic_info_present=0, we might be using Reference Picture
Resampling (RPR), in which picture sizes might differ in the PPS,
rather than in the SPS.
Because of 2., we can't rely on the sequence-level variables
sps_subpic_width_minus1 and sps_subpic_height_minus1 to derive the
picture-level variable num_entry_points, as the picture might have a
different size to the picture used when deriving those sequence-level
variables.
---
libavcodec/cbs_h266_syntax_template.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/libavcodec/cbs_h266_syntax_template.c
b/libavcodec/cbs_h266_syntax_template.c
index 6016644eb8..eda724bcaa 100644
--- a/libavcodec/cbs_h266_syntax_template.c
+++ b/libavcodec/cbs_h266_syntax_template.c
@@ -3457,7 +3457,17 @@ static int FUNC(slice_header) (CodedBitstreamContext
*ctx, RWContext *rw,
}
if (pps->pps_single_slice_per_subpic_flag) {
- const int width_in_ctus =
sps->sps_subpic_width_minus1[slice_idx] + 1;
+ int width_in_ctus, height_in_ctus;
+ if (sps->sps_subpic_info_present_flag) {
+ width_in_ctus = sps->sps_subpic_width_minus1[slice_idx] +
1;
+ height_in_ctus = sps->sps_subpic_height_minus1[slice_idx]
+ 1;
+ } else {
+ const int log2_ctb_size = sps->sps_log2_ctu_size_minus5 +
5;
+ const int ctb_size = 1 << log2_ctb_size;
+ width_in_ctus = (pps->pps_pic_width_in_luma_samples +
ctb_size - 1) >> log2_ctb_size;
+ height_in_ctus = (pps->pps_pic_height_in_luma_samples +
ctb_size - 1) >> log2_ctb_size;
+ }
+
const int subpic_l = sps->sps_subpic_ctu_top_left_x[slice_idx];
const int subpic_r = subpic_l + width_in_ctus;
@@ -3472,9 +3482,8 @@ static int FUNC(slice_header) (CodedBitstreamContext
*ctx, RWContext *rw,
}
if (entropy_sync) {
- height = sps->sps_subpic_height_minus1[slice_idx] + 1;
+ height = height_in_ctus;
} else {
- const int height_in_ctus =
sps->sps_subpic_height_minus1[slice_idx] + 1;
const int subpic_t =
sps->sps_subpic_ctu_top_left_y[slice_idx];
const int subpic_b = subpic_t + height_in_ctus;
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]