Re: [FFmpeg-devel] [PATCH 3/4] lavc/vvc_parser: Fixed the has_b_frames setting

2024-04-21 Thread Nuo Mi
On Sun, Apr 21, 2024 at 10:51 AM myp...@gmail.com  wrote:

> On Sat, Apr 20, 2024 at 11:50 AM Nuo Mi  wrote:
> >
> > On Fri, Apr 19, 2024 at 9:55 PM Jun Zhao  wrote:
> >
> > > From: Jun Zhao 
> > >
> > > 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 
> > > ---
> > >  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];
> > >
> > Should we relocate this to the decoder? Other codecs typically set this
> > parameter in the decoder.
> >
> I think the part that needs to be refactored is like the 264/265
> decoder, but before the refactoring, we need to fix the issue first.
>
OK, tracked with https://github.com/ffvvc/FFmpeg/issues/217 in case we
forget it

> > thank you
> >
> > >
> > >  if (sps->sps_ptl_dpb_hrd_params_present_flag &&
> > >  sps->sps_timing_hrd_params_present_flag) {
> > > --
> > > 2.25.1
> > >
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH 3/4] lavc/vvc_parser: Fixed the has_b_frames setting

2024-04-20 Thread myp...@gmail.com
On Sat, Apr 20, 2024 at 11:50 AM Nuo Mi  wrote:
>
> On Fri, Apr 19, 2024 at 9:55 PM Jun Zhao  wrote:
>
> > From: Jun Zhao 
> >
> > 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 
> > ---
> >  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];
> >
> Should we relocate this to the decoder? Other codecs typically set this
> parameter in the decoder.
>
I think the part that needs to be refactored is like the 264/265
decoder, but before the refactoring, we need to fix the issue first.
> thank you
>
> >
> >  if (sps->sps_ptl_dpb_hrd_params_present_flag &&
> >  sps->sps_timing_hrd_params_present_flag) {
> > --
> > 2.25.1
> >
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH 3/4] lavc/vvc_parser: Fixed the has_b_frames setting

2024-04-19 Thread Nuo Mi
On Fri, Apr 19, 2024 at 9:55 PM Jun Zhao  wrote:

> From: Jun Zhao 
>
> 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 
> ---
>  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];
>
Should we relocate this to the decoder? Other codecs typically set this
parameter in the decoder.

thank you

>
>  if (sps->sps_ptl_dpb_hrd_params_present_flag &&
>  sps->sps_timing_hrd_params_present_flag) {
> --
> 2.25.1
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-devel] [PATCH 3/4] lavc/vvc_parser: Fixed the has_b_frames setting

2024-04-19 Thread Jun Zhao
From: Jun Zhao 

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 
---
 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) {
-- 
2.25.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".