Skip to content

Commit

Permalink
avcodec/vvc_parser: move avctx->has_b_frames initialization to dec
Browse files Browse the repository at this point in the history
From Jun Zhao <[email protected]>:
> Should we relocate this to the decoder? Other codecs typically set this
> parameter in the decoder.

Signed-off-by: Wu Jianhua <[email protected]>
  • Loading branch information
QSXW committed Aug 8, 2024
1 parent d2a25dc commit fd5a4ec
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 1 addition & 0 deletions libavcodec/vvc/dec.c
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,7 @@ static void export_frame_params(VVCContext *s, const VVCFrameContext *fc)
c->coded_height = pps->height;
c->width = pps->width - ((pps->r->pps_conf_win_left_offset + pps->r->pps_conf_win_right_offset) << sps->hshift[CHROMA]);
c->height = pps->height - ((pps->r->pps_conf_win_top_offset + pps->r->pps_conf_win_bottom_offset) << sps->vshift[CHROMA]);
c->has_b_frames = sps->r->sps_dpb_params.dpb_max_num_reorder_pics[sps->r->sps_max_sublayers_minus1];
}

static int frame_setup(VVCFrameContext *fc, VVCContext *s)
Expand Down
3 changes: 0 additions & 3 deletions libavcodec/vvc_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,6 @@ static void set_parser_ctx(AVCodecParserContext *s, AVCodecContext *avctx,
avctx->color_range =
sps->vui.vui_full_range_flag ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG;

avctx->has_b_frames =
sps->sps_dpb_params.dpb_max_num_reorder_pics[sps->sps_max_sublayers_minus1];

if (sps->sps_ptl_dpb_hrd_params_present_flag &&
sps->sps_timing_hrd_params_present_flag) {
uint32_t num = sps->sps_general_timing_hrd_parameters.num_units_in_tick;
Expand Down

0 comments on commit fd5a4ec

Please sign in to comment.