Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Xiang, Haihao" <haihao.xiang-at-intel.com@ffmpeg.org>
To: "ffmpeg-devel@ffmpeg.org" <ffmpeg-devel@ffmpeg.org>
Cc: "Xu, Guangxin" <guangxin.xu@intel.com>,
	"Wang, Fei W" <fei.w.wang@intel.com>
Subject: Re: [FFmpeg-devel] [PATCH v3 1/4] lavc/hevc_refs: fix dpb logical for IRAP
Date: Wed, 27 Jul 2022 05:35:51 +0000
Message-ID: <5f70eb72c97b5dc1a09949bcf74841b00df7c007.camel@intel.com> (raw)
In-Reply-To: <8020b05e3e101471d4c307552ade97b4594243cc.camel@intel.com>

On Mon, 2022-07-25 at 05:22 +0000, Xiang, Haihao wrote:
> On Mon, 2022-07-18 at 09:09 +0000, Xiang, Haihao wrote:
> > On Fri, 2022-07-15 at 13:06 +0800, Fei Wang wrote:
> > > From: Xu Guangxin <guangxin.xu@intel.com>
> > > 
> > > According to C.5.2.2, item 2. When we got an IRAP, and the
> > > NoOutputOfPriorPicsFlag = 0, we need bump all outputable frames.
> > > 
> > > Tested-by: Fei Wang <fei.w.wang@intel.com>
> > > Signed-off-by: Xu Guangxin <guangxin.xu@intel.com>
> > > ---
> > > update:
> > > 1. clean and replace 0xff with HEVC_SEQUENCE_COUNTER_MASK
> > > 
> > >  libavcodec/hevc_refs.c | 23 +++++++++++++----------
> > >  1 file changed, 13 insertions(+), 10 deletions(-)
> > > 
> > > diff --git a/libavcodec/hevc_refs.c b/libavcodec/hevc_refs.c
> > > index 6a70c817b0..2b0468d6c4 100644
> > > --- a/libavcodec/hevc_refs.c
> > > +++ b/libavcodec/hevc_refs.c
> > > @@ -175,21 +175,24 @@ int ff_hevc_set_new_ref(HEVCContext *s, AVFrame
> > > **frame,
> > > int poc)
> > >  
> > >  int ff_hevc_output_frame(HEVCContext *s, AVFrame *out, int flush)
> > >  {
> > > +    if (IS_IRAP(s) && s->no_rasl_output_flag == 1) {
> > > +        const static int mask = HEVC_FRAME_FLAG_BUMPING |
> > > HEVC_FRAME_FLAG_OUTPUT;
> > > +        for (int i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) {
> > > +            HEVCFrame *frame = &s->DPB[i];
> > > +            if ((frame->flags & mask) == HEVC_FRAME_FLAG_OUTPUT &&
> > > +                frame->sequence != s->seq_decode) {
> > > +                if (s->sh.no_output_of_prior_pics_flag == 1)
> > > +                    ff_hevc_unref_frame(s, frame,
> > > HEVC_FRAME_FLAG_OUTPUT);
> > > +                else
> > > +                    frame->flags |= HEVC_FRAME_FLAG_BUMPING;
> > > +            }
> > > +        }
> > > +    }
> > >      do {
> > >          int nb_output = 0;
> > >          int min_poc   = INT_MAX;
> > >          int i, min_idx, ret;
> > >  
> > > -        if (s->sh.no_output_of_prior_pics_flag == 1 && s-
> > > > no_rasl_output_flag 
> > > 
> > > == 1) {
> > > -            for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) {
> > > -                HEVCFrame *frame = &s->DPB[i];
> > > -                if (!(frame->flags & HEVC_FRAME_FLAG_BUMPING) && frame-
> > > >poc
> > > != s->poc &&
> > > -                        frame->sequence == s->seq_output) {
> > > -                    ff_hevc_unref_frame(s, frame,
> > > HEVC_FRAME_FLAG_OUTPUT);
> > > -                }
> > > -            }
> > > -        }
> > > -
> > >          for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) {
> > >              HEVCFrame *frame = &s->DPB[i];
> > >              if ((frame->flags & HEVC_FRAME_FLAG_OUTPUT) &&
> > 
> > Patchset LGTM. 
> > 
> 
> The patchset works well for me. Are there any more comments here ? If not,
> I'll
> apply this patchset in a few days.
> 

Applied, thx

-Haihao


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

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

      reply	other threads:[~2022-07-27  9:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-15  5:06 Fei Wang
2022-07-15  5:06 ` [FFmpeg-devel] [PATCH v3 2/4] lavc/hevcdec: do not let missing ref frames invovled in dpb process Fei Wang
2022-07-15  5:06 ` [FFmpeg-devel] [PATCH v3 3/4] lavc/hevc_refs: exclude current frame from long term refs Fei Wang
2022-07-15  5:06 ` [FFmpeg-devel] [PATCH v3 4/4] lavc/hevcdec: respect the value of no_output_of_prior_pics_flag Fei Wang
2022-07-18  9:09 ` [FFmpeg-devel] [PATCH v3 1/4] lavc/hevc_refs: fix dpb logical for IRAP Xiang, Haihao
2022-07-25  5:22   ` Xiang, Haihao
2022-07-27  5:35     ` Xiang, Haihao [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5f70eb72c97b5dc1a09949bcf74841b00df7c007.camel@intel.com \
    --to=haihao.xiang-at-intel.com@ffmpeg.org \
    --cc=fei.w.wang@intel.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    --cc=guangxin.xu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git