diff mbox

[FFmpeg-devel] ffmpeg/qsv: fix QSV-accelerated transcode performance drop issue

Message ID 3ae0d191-793b-8bfb-ea76-98cacd63b2af@gmail.com
State Accepted
Commit 46bfc1562f187e3c04ea1b9baa1a1d0580530485
Headers show

Commit Message

Jun Zhao Aug. 11, 2016, 7:59 a.m. UTC
From cafa70e97ce48b65e2a4a99782f6ce3557fef755 Mon Sep 17 00:00:00 2001
From: Jun Zhao <mypopydev@gmail.com>
Date: Thu, 11 Aug 2016 15:34:01 +0800
Subject: [PATCH] ffmpeg/qsv: fix QSV-accelerated transcode performance drop
 issue.

the merge commit 1b04ea1 "avconv: create simple filtergraphs earlier"
will init the filtergraphs earlier, then init the QSV transcode can't
suppose the nb_filters's value, else lead to the QSV transcode performance
drop.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
---
 ffmpeg_qsv.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Jun Zhao Aug. 15, 2016, 1:24 a.m. UTC | #1
ping?

On 2016/8/11 15:59, Jun Zhao wrote:
Michael Niedermayer Aug. 15, 2016, 1:42 a.m. UTC | #2
On Mon, Aug 15, 2016 at 09:24:42AM +0800, Jun Zhao wrote:
> ping?

ccing maintainer, so he doesnt miss that ping


[...]
Ivan Uskov Aug. 16, 2016, 8:45 a.m. UTC | #3
Hello Jun,

Thursday, August 11, 2016, 10:59:51 AM, you wrote:

> From cafa70e97ce48b65e2a4a99782f6ce3557fef755 Mon Sep 17 00:00:00 2001
> From: Jun Zhao <mypopydev@gmail.com>
> Date: Thu, 11 Aug 2016 15:34:01 +0800
> Subject: [PATCH] ffmpeg/qsv: fix QSV-accelerated transcode performance drop
>  issue.

> the merge commit 1b04ea1 "avconv: create simple filtergraphs earlier"
> will init the filtergraphs earlier, then init the QSV transcode can't
> suppose the nb_filters's value, else lead to the QSV transcode performance
> drop.

> Signed-off-by: Jun Zhao <mypopydev@gmail.com>
> ---
>  ffmpeg_qsv.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

> diff --git a/ffmpeg_qsv.c b/ffmpeg_qsv.c
> index 95a2351..acc54dd 100644
> --- a/ffmpeg_qsv.c
> +++ b/ffmpeg_qsv.c
> @@ -210,8 +210,7 @@ int qsv_transcode_init(OutputStream *ost)
>  
>      /* check if the decoder supports QSV and the output only goes to this stream */
>      ist = input_streams[ost->source_index];
-    if (ist->nb_filters || ist->hwaccel_id != HWACCEL_QSV ||
-        !ist->dec || !ist->dec->pix_fmts)
+    if (ist->hwaccel_id != HWACCEL_QSV || !ist->dec || !ist->dec->pix_fmts)
>          return 0;
>      for (pix_fmt = ist->dec->pix_fmts; *pix_fmt != AV_PIX_FMT_NONE; pix_fmt++)
>          if (*pix_fmt == AV_PIX_FMT_QSV)
Thank, makes sense.
LGTM.
Michael Niedermayer Aug. 16, 2016, 3:12 p.m. UTC | #4
On Tue, Aug 16, 2016 at 11:45:52AM +0300, Ivan Uskov wrote:
> 
> Hello Jun,
> 
> Thursday, August 11, 2016, 10:59:51 AM, you wrote:
> 
> > From cafa70e97ce48b65e2a4a99782f6ce3557fef755 Mon Sep 17 00:00:00 2001
> > From: Jun Zhao <mypopydev@gmail.com>
> > Date: Thu, 11 Aug 2016 15:34:01 +0800
> > Subject: [PATCH] ffmpeg/qsv: fix QSV-accelerated transcode performance drop
> >  issue.
> 
> > the merge commit 1b04ea1 "avconv: create simple filtergraphs earlier"
> > will init the filtergraphs earlier, then init the QSV transcode can't
> > suppose the nb_filters's value, else lead to the QSV transcode performance
> > drop.
> 
> > Signed-off-by: Jun Zhao <mypopydev@gmail.com>
> > ---
> >  ffmpeg_qsv.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> > diff --git a/ffmpeg_qsv.c b/ffmpeg_qsv.c
> > index 95a2351..acc54dd 100644
> > --- a/ffmpeg_qsv.c
> > +++ b/ffmpeg_qsv.c
> > @@ -210,8 +210,7 @@ int qsv_transcode_init(OutputStream *ost)
> >  
> >      /* check if the decoder supports QSV and the output only goes to this stream */
> >      ist = input_streams[ost->source_index];
> -    if (ist->nb_filters || ist->hwaccel_id != HWACCEL_QSV ||
> -        !ist->dec || !ist->dec->pix_fmts)
> +    if (ist->hwaccel_id != HWACCEL_QSV || !ist->dec || !ist->dec->pix_fmts)
> >          return 0;
> >      for (pix_fmt = ist->dec->pix_fmts; *pix_fmt != AV_PIX_FMT_NONE; pix_fmt++)
> >          if (*pix_fmt == AV_PIX_FMT_QSV)
> Thank, makes sense.
> LGTM.

applied

thanks

[...]
diff mbox

Patch

diff --git a/ffmpeg_qsv.c b/ffmpeg_qsv.c
index 95a2351..acc54dd 100644
--- a/ffmpeg_qsv.c
+++ b/ffmpeg_qsv.c
@@ -210,8 +210,7 @@  int qsv_transcode_init(OutputStream *ost)
 
     /* check if the decoder supports QSV and the output only goes to this stream */
     ist = input_streams[ost->source_index];
-    if (ist->nb_filters || ist->hwaccel_id != HWACCEL_QSV ||
-        !ist->dec || !ist->dec->pix_fmts)
+    if (ist->hwaccel_id != HWACCEL_QSV || !ist->dec || !ist->dec->pix_fmts)
         return 0;
     for (pix_fmt = ist->dec->pix_fmts; *pix_fmt != AV_PIX_FMT_NONE; pix_fmt++)
         if (*pix_fmt == AV_PIX_FMT_QSV)