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: "Chen, Wenbin" <wenbin.chen@intel.com>
Subject: Re: [FFmpeg-devel] [PATCH V2] libavcodec/qsvdec.c: using queue count to unref frame
Date: Wed, 12 Jan 2022 03:01:22 +0000
Message-ID: <ac6818336952af778ba1b29c660e0e36843a3b16.camel@intel.com> (raw)
In-Reply-To: <05b6e2ada495b719c2d45fe9e1cd7d8aaa883558.camel@intel.com>

On Fri, 2021-03-12 at 06:21 +0000, Xiang, Haihao wrote:
> On Fri, 2021-03-12 at 10:44 +0800, wenbin.chen@intel.com wrote:
> > From: "Chen,Wenbin" <wenbin.chen@intel.com>
> > 
> > MSDK vc1 and av1 sometimes output frame into the same suface, but
> > ffmpeg-qsv assume the surface will be used only once, so it will
> > unref the frame when it receives the output surface. Now change
> > it to unref frame according to queue count.
> > 
> > Signed-off-by Wenbin Chen <wenbin.chen@intel.com>
> > ---
> >  libavcodec/qsvdec.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c
> > index 5f2e641373..3abd7bd4a2 100644
> > --- a/libavcodec/qsvdec.c
> > +++ b/libavcodec/qsvdec.c
> > @@ -513,7 +513,7 @@ static int qsv_decode(AVCodecContext *avctx, QSVContext
> > *q,
> >              return AVERROR_BUG;
> >          }
> >  
> > -        out_frame->queued = 1;
> > +        out_frame->queued += 1;
> >          av_fifo_generic_write(q->async_fifo, &out_frame, sizeof(out_frame),
> > NULL);
> >          av_fifo_generic_write(q->async_fifo,
> > &sync,      sizeof(sync),      NULL);
> >      } else {
> > @@ -526,7 +526,7 @@ static int qsv_decode(AVCodecContext *avctx, QSVContext
> > *q,
> >  
> >          av_fifo_generic_read(q->async_fifo, &out_frame, sizeof(out_frame),
> > NULL);
> >          av_fifo_generic_read(q->async_fifo,
> > &sync,      sizeof(sync),      NULL);
> > -        out_frame->queued = 0;
> > +        out_frame->queued -= 1;
> >  
> >          if (avctx->pix_fmt != AV_PIX_FMT_QSV) {
> >              do {
> 
> LGTM, thanks!

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-01-12  3:01 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <05b6e2ada495b719c2d45fe9e1cd7d8aaa883558.camel@intel.com>]

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=ac6818336952af778ba1b29c660e0e36843a3b16.camel@intel.com \
    --to=haihao.xiang-at-intel.com@ffmpeg.org \
    --cc=ffmpeg-devel@ffmpeg.org \
    --cc=wenbin.chen@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