aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWu Jianhua <toqsxw@outlook.com>2024-08-11 04:33:02 +0800
committerNuo Mi <nuomi2021@gmail.com>2024-08-15 20:50:24 +0800
commitae1a9cfd52c72e6d2703275b258cb2ded86a519d (patch)
tree489e619c7a89a04b03535b7f569d8986dd8defbf
parent80af195804fdef9ccd5a48251fc366d28bceb437 (diff)
downloadffmpeg-ae1a9cfd52c72e6d2703275b258cb2ded86a519d.tar.gz
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. Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
-rw-r--r--libavcodec/vvc/dec.c1
-rw-r--r--libavcodec/vvc_parser.c3
2 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/vvc/dec.c b/libavcodec/vvc/dec.c
index d34713296d..2c80f0c461 100644
--- a/libavcodec/vvc/dec.c
+++ b/libavcodec/vvc/dec.c
@@ -781,6 +781,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)
diff --git a/libavcodec/vvc_parser.c b/libavcodec/vvc_parser.c
index 5373875aae..8d32d66573 100644
--- a/libavcodec/vvc_parser.c
+++ b/libavcodec/vvc_parser.c
@@ -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;