* [FFmpeg-devel] [PATCH v2] libavfilter/vf_overlay_qsv: Use format of first input to set output format for overlay_qsv
@ 2022-07-07 3:12 Wenbin Chen
2022-07-19 6:45 ` Xiang, Haihao
0 siblings, 1 reply; 2+ messages in thread
From: Wenbin Chen @ 2022-07-07 3:12 UTC (permalink / raw)
To: ffmpeg-devel
overlay_qsv hard coded to use nv12 as output format. Now use the format
of the first input to set output format.
For detailed information of supported format on different platform,
please see the "composition" rows in "Video Processing Features" at
below link:
https://www.intel.com/content/www/us/en/develop/documentation/media-capabilities-of-intel-hardware/top.html
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
---
libavfilter/vf_overlay_qsv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavfilter/vf_overlay_qsv.c b/libavfilter/vf_overlay_qsv.c
index 7e76b39aa9..d947a1faa1 100644
--- a/libavfilter/vf_overlay_qsv.c
+++ b/libavfilter/vf_overlay_qsv.c
@@ -276,6 +276,7 @@ static int config_output(AVFilterLink *outlink)
int ret;
av_log(ctx, AV_LOG_DEBUG, "Output is of %s.\n", av_get_pix_fmt_name(outlink->format));
+ vpp->qsv_param.out_sw_format = in0->format;
if ((in0->format == AV_PIX_FMT_QSV && in1->format != AV_PIX_FMT_QSV) ||
(in0->format != AV_PIX_FMT_QSV && in1->format == AV_PIX_FMT_QSV)) {
av_log(ctx, AV_LOG_ERROR, "Mixing hardware and software pixel formats is not supported.\n");
@@ -288,6 +289,7 @@ static int config_output(AVFilterLink *outlink)
av_log(ctx, AV_LOG_ERROR, "Inputs with different underlying QSV devices are forbidden.\n");
return AVERROR(EINVAL);
}
+ vpp->qsv_param.out_sw_format = hw_frame0->sw_format;
}
outlink->w = vpp->var_values[VAR_MW];
--
2.32.0
_______________________________________________
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".
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [FFmpeg-devel] [PATCH v2] libavfilter/vf_overlay_qsv: Use format of first input to set output format for overlay_qsv
2022-07-07 3:12 [FFmpeg-devel] [PATCH v2] libavfilter/vf_overlay_qsv: Use format of first input to set output format for overlay_qsv Wenbin Chen
@ 2022-07-19 6:45 ` Xiang, Haihao
0 siblings, 0 replies; 2+ messages in thread
From: Xiang, Haihao @ 2022-07-19 6:45 UTC (permalink / raw)
To: ffmpeg-devel
On Thu, 2022-07-07 at 11:12 +0800, Wenbin Chen wrote:
> overlay_qsv hard coded to use nv12 as output format. Now use the format
> of the first input to set output format.
>
> For detailed information of supported format on different platform,
> please see the "composition" rows in "Video Processing Features" at
> below link:
>
https://www.intel.com/content/www/us/en/develop/documentation/media-capabilities-of-intel-hardware/top.html
>
> Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
> ---
> libavfilter/vf_overlay_qsv.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/libavfilter/vf_overlay_qsv.c b/libavfilter/vf_overlay_qsv.c
> index 7e76b39aa9..d947a1faa1 100644
> --- a/libavfilter/vf_overlay_qsv.c
> +++ b/libavfilter/vf_overlay_qsv.c
> @@ -276,6 +276,7 @@ static int config_output(AVFilterLink *outlink)
> int ret;
>
> av_log(ctx, AV_LOG_DEBUG, "Output is of %s.\n",
> av_get_pix_fmt_name(outlink->format));
> + vpp->qsv_param.out_sw_format = in0->format;
> if ((in0->format == AV_PIX_FMT_QSV && in1->format != AV_PIX_FMT_QSV) ||
> (in0->format != AV_PIX_FMT_QSV && in1->format == AV_PIX_FMT_QSV)) {
> av_log(ctx, AV_LOG_ERROR, "Mixing hardware and software pixel formats
> is not supported.\n");
> @@ -288,6 +289,7 @@ static int config_output(AVFilterLink *outlink)
> av_log(ctx, AV_LOG_ERROR, "Inputs with different underlying QSV
> devices are forbidden.\n");
> return AVERROR(EINVAL);
> }
> + vpp->qsv_param.out_sw_format = hw_frame0->sw_format;
> }
>
> outlink->w = vpp->var_values[VAR_MW];
LGTM, will apply
Thanks
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".
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-19 6:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-07 3:12 [FFmpeg-devel] [PATCH v2] libavfilter/vf_overlay_qsv: Use format of first input to set output format for overlay_qsv Wenbin Chen
2022-07-19 6:45 ` Xiang, Haihao
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