diff mbox series

[FFmpeg-devel,4/4] lavf/vf_vpp_qsv: scale_mode can be applied to color conversion

Message ID 20221124091930.558046-4-haihao.xiang@intel.com
State New
Headers show
Series [FFmpeg-devel,1/4] lavfi/qsvvpp: change the output frame's width and height | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Xiang, Haihao Nov. 24, 2022, 9:19 a.m. UTC
From: Haihao Xiang <haihao.xiang@intel.com>

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
---
 libavfilter/vf_vpp_qsv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Soft Works Nov. 24, 2022, 6:47 p.m. UTC | #1
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> Xiang, Haihao
> Sent: Thursday, November 24, 2022 10:20 AM
> To: ffmpeg-devel@ffmpeg.org
> Cc: Haihao Xiang <haihao.xiang@intel.com>
> Subject: [FFmpeg-devel] [PATCH 4/4] lavf/vf_vpp_qsv: scale_mode can
> be applied to color conversion
> 
> From: Haihao Xiang <haihao.xiang@intel.com>
> 
> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
> ---
>  libavfilter/vf_vpp_qsv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c
> index 4a053f9145..17f2989245 100644
> --- a/libavfilter/vf_vpp_qsv.c
> +++ b/libavfilter/vf_vpp_qsv.c
> @@ -492,7 +492,7 @@ static int config_output(AVFilterLink *outlink)
>          }
>      }
> 
> -    if (inlink->w != outlink->w || inlink->h != outlink->h) {
> +    if (inlink->w != outlink->w || inlink->h != outlink->h ||
> in_format != vpp->out_format) {
>          if (QSV_RUNTIME_VERSION_ATLEAST(mfx_version, 1, 19)) {
>              memset(&vpp->scale_conf, 0, sizeof(mfxExtVPPScaling));
>              vpp->scale_conf.Header.BufferId    =
> MFX_EXTBUFF_VPP_SCALING;
> --

LGTM. But maybe the warning below should be adjusted, as it would
be confusing when it says scaling even though no scaling is
configured.

softworkz
Xiang, Haihao Nov. 25, 2022, 1:39 a.m. UTC | #2
On Thu, 2022-11-24 at 18:47 +0000, Soft Works wrote:
> > -----Original Message-----
> > From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> > Xiang, Haihao
> > Sent: Thursday, November 24, 2022 10:20 AM
> > To: ffmpeg-devel@ffmpeg.org
> > Cc: Haihao Xiang <haihao.xiang@intel.com>
> > Subject: [FFmpeg-devel] [PATCH 4/4] lavf/vf_vpp_qsv: scale_mode can
> > be applied to color conversion
> > 
> > From: Haihao Xiang <haihao.xiang@intel.com>
> > 
> > Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
> > ---
> >  libavfilter/vf_vpp_qsv.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c
> > index 4a053f9145..17f2989245 100644
> > --- a/libavfilter/vf_vpp_qsv.c
> > +++ b/libavfilter/vf_vpp_qsv.c
> > @@ -492,7 +492,7 @@ static int config_output(AVFilterLink *outlink)
> >          }
> >      }
> > 
> > -    if (inlink->w != outlink->w || inlink->h != outlink->h) {
> > +    if (inlink->w != outlink->w || inlink->h != outlink->h ||
> > in_format != vpp->out_format) {
> >          if (QSV_RUNTIME_VERSION_ATLEAST(mfx_version, 1, 19)) {
> >              memset(&vpp->scale_conf, 0, sizeof(mfxExtVPPScaling));
> >              vpp->scale_conf.Header.BufferId    =
> > MFX_EXTBUFF_VPP_SCALING;
> > --
> 
> LGTM. But maybe the warning below should be adjusted, as it would
> be confusing when it says scaling even though no scaling is
> configured.
> 

Thanks, I'll update the comment.

-Haihao
diff mbox series

Patch

diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c
index 4a053f9145..17f2989245 100644
--- a/libavfilter/vf_vpp_qsv.c
+++ b/libavfilter/vf_vpp_qsv.c
@@ -492,7 +492,7 @@  static int config_output(AVFilterLink *outlink)
         }
     }
 
-    if (inlink->w != outlink->w || inlink->h != outlink->h) {
+    if (inlink->w != outlink->w || inlink->h != outlink->h || in_format != vpp->out_format) {
         if (QSV_RUNTIME_VERSION_ATLEAST(mfx_version, 1, 19)) {
             memset(&vpp->scale_conf, 0, sizeof(mfxExtVPPScaling));
             vpp->scale_conf.Header.BufferId    = MFX_EXTBUFF_VPP_SCALING;