History

avcodec/vvc_parser: move avctx->has_b_frames initialization to dec

From Jun Zhao <mypopydev@gmail.com>: > Should we relocate this to the decoder? Other codecs typically set this > parameter in the decoder.

Wu Jianhua committed 2 years ago

Commit ae1a9cf1 parent 80af1952 files · +1 −3Browse files

Unified · Split

2 files
  1. libavcodec/vvc/dec.c +1 −0
  2. libavcodec/vvc_parser.c +0 −3
libavcodec/vvc/dec.c+1−0
@@ -781,6 +781,7 @@ static void export_frame_params(VVCContext *s, const VVCFrameContext *fc) · 780 unmodified lines
781781 c->coded_height = pps->height;
782782 c->width = pps->width - ((pps->r->pps_conf_win_left_offset + pps->r->pps_conf_win_right_offset) << sps->hshift[CHROMA]);
783783 c->height = pps->height - ((pps->r->pps_conf_win_top_offset + pps->r->pps_conf_win_bottom_offset) << sps->vshift[CHROMA]);
784+ c->has_b_frames = sps->r->sps_dpb_params.dpb_max_num_reorder_pics[sps->r->sps_max_sublayers_minus1];
784785 }
785786
786787 static int frame_setup(VVCFrameContext *fc, VVCContext *s)
libavcodec/vvc_parser.c+0−3
@@ -185,9 +185,6 @@ static void set_parser_ctx(AVCodecParserContext *s, AVCodecContext *avctx, · 184 unmodified lines
185185 avctx->color_range =
186186 sps->vui.vui_full_range_flag ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG;
187187
188− avctx->has_b_frames =
189− sps->sps_dpb_params.dpb_max_num_reorder_pics[sps->sps_max_sublayers_minus1];
190−
191188 if (sps->sps_ptl_dpb_hrd_params_present_flag &&
192189 sps->sps_timing_hrd_params_present_flag) {
193190 uint32_t num = sps->sps_general_timing_hrd_parameters.num_units_in_tick;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t