[FFmpeg-cvslog] lavfi/vf_vpp_qsv: add has_passthrough flag in VPPContext
Haihao Xiang
git at videolan.org
Tue Jan 17 08:14:00 EET 2023
ffmpeg | branch: master | Haihao Xiang <haihao.xiang at intel.com> | Mon Jan 9 15:12:07 2023 +0800| [dc5369144b824ee6d14086b06759b291a8213646] | committer: Haihao Xiang
lavfi/vf_vpp_qsv: add has_passthrough flag in VPPContext
QSV filters may set this flag in preinit callback to turn on / off pass
through mode
This is in preparation for reusing the code for other QSV filters. E.g.
scale_qsv filter doesn't support pass through mode.
Signed-off-by: Haihao Xiang <haihao.xiang at intel.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dc5369144b824ee6d14086b06759b291a8213646
---
libavfilter/vf_vpp_qsv.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c
index 2a7b06fa33..b04307b644 100644
--- a/libavfilter/vf_vpp_qsv.c
+++ b/libavfilter/vf_vpp_qsv.c
@@ -102,6 +102,7 @@ typedef struct VPPContext{
int async_depth;
int eof;
+ int has_passthrough; /* apply pass through mode if possible */
} VPPContext;
static const AVOption options[] = {
@@ -269,6 +270,8 @@ static av_cold int vpp_preinit(AVFilterContext *ctx)
vpp->contrast = 1.0;
vpp->transpose = -1;
+ vpp->has_passthrough = 1;
+
return 0;
}
@@ -552,7 +555,8 @@ static int config_output(AVFilterLink *outlink)
if (vpp->use_frc || vpp->use_crop || vpp->deinterlace || vpp->denoise ||
vpp->detail || vpp->procamp || vpp->rotate || vpp->hflip ||
- inlink->w != outlink->w || inlink->h != outlink->h || in_format != vpp->out_format)
+ inlink->w != outlink->w || inlink->h != outlink->h || in_format != vpp->out_format ||
+ !vpp->has_passthrough)
return ff_qsvvpp_create(ctx, &vpp->qsv, ¶m);
else {
av_log(ctx, AV_LOG_VERBOSE, "qsv vpp pass through mode.\n");
More information about the ffmpeg-cvslog
mailing list