[FFmpeg-cvslog] lavc/vvc_parser: Fixed the has_b_frames setting

Jun Zhao git at videolan.org
Sun Apr 21 16:08:34 EEST 2024


ffmpeg | branch: master | Jun Zhao <mypopydev at gmail.com> | Fri Apr 19 21:47:10 2024 +0800| [50b8666dc695b1d61ecc1ff2c4fbac2f466f0f65] | committer: Nuo Mi

lavc/vvc_parser: Fixed the has_b_frames setting

has_b_frames used in decoder for size of the frame reordering
buffer, setting this field from dpb_max_num_reorder_pics.

Signed-off-by: Jun Zhao <barryjzhao at tencent.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=50b8666dc695b1d61ecc1ff2c4fbac2f466f0f65
---

 libavcodec/vvc_parser.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/vvc_parser.c b/libavcodec/vvc_parser.c
index a0e10e1a7c..5373875aae 100644
--- a/libavcodec/vvc_parser.c
+++ b/libavcodec/vvc_parser.c
@@ -185,8 +185,8 @@ 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_max_sublayers_minus1 + 1) > 2 ? 2 :
-                           sps->sps_max_sublayers_minus1;
+    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) {



More information about the ffmpeg-cvslog mailing list