mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/cbs_h266: H266RawSliceHeader, expose curr_subpic_idx
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
fa81de4af0
commit
09f783692e
@ -832,6 +832,7 @@ typedef struct H266RawSliceHeader {
|
||||
uint32_t sh_entry_point_offset_minus1[VVC_MAX_ENTRY_POINTS];
|
||||
|
||||
// derived values
|
||||
uint16_t curr_subpic_idx; ///< CurrSubpicIdx
|
||||
uint32_t num_entry_points; ///< NumEntryPoints
|
||||
uint8_t num_ref_idx_active[2]; ///< NumRefIdxActive[]
|
||||
|
||||
|
@ -3008,7 +3008,6 @@ static int FUNC(slice_header) (CodedBitstreamContext *ctx, RWContext *rw,
|
||||
const H266RefPicLists *ref_pic_lists;
|
||||
int err, i;
|
||||
uint8_t nal_unit_type, qp_bd_offset;
|
||||
uint16_t curr_subpic_idx;
|
||||
uint16_t num_slices_in_subpic;
|
||||
|
||||
HEADER("Slice Header");
|
||||
@ -3046,7 +3045,7 @@ static int FUNC(slice_header) (CodedBitstreamContext *ctx, RWContext *rw,
|
||||
ub(sps->sps_subpic_id_len_minus1 + 1, sh_subpic_id);
|
||||
for (i = 0; i <= sps->sps_num_subpics_minus1; i++) {
|
||||
if (pps->sub_pic_id_val[i] == current->sh_subpic_id) {
|
||||
curr_subpic_idx = i;
|
||||
current->curr_subpic_idx = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -3055,10 +3054,10 @@ static int FUNC(slice_header) (CodedBitstreamContext *ctx, RWContext *rw,
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
} else {
|
||||
curr_subpic_idx = 0;
|
||||
current->curr_subpic_idx = 0;
|
||||
}
|
||||
|
||||
num_slices_in_subpic = pps->num_slices_in_subpic[curr_subpic_idx];
|
||||
num_slices_in_subpic = pps->num_slices_in_subpic[current->curr_subpic_idx];
|
||||
|
||||
if ((pps->pps_rect_slice_flag && num_slices_in_subpic > 1) ||
|
||||
(!pps->pps_rect_slice_flag && pps->num_tiles_in_pic > 1)) {
|
||||
@ -3375,7 +3374,7 @@ static int FUNC(slice_header) (CodedBitstreamContext *ctx, RWContext *rw,
|
||||
if (pps->pps_rect_slice_flag) {
|
||||
int width_in_tiles;
|
||||
int slice_idx = current->sh_slice_address;
|
||||
for (i = 0; i < curr_subpic_idx; i++) {
|
||||
for (i = 0; i < current->curr_subpic_idx; i++) {
|
||||
slice_idx += pps->num_slices_in_subpic[i];
|
||||
}
|
||||
width_in_tiles =
|
||||
|
Loading…
Reference in New Issue
Block a user