[FFmpeg-cvslog] lavfi: add a flag for filters able to work with hw_device_ctx
Anton Khirnov
git at videolan.org
Fri Mar 24 11:25:06 EET 2023
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Wed Mar 15 18:57:36 2023 +0100| [632c34993195f716e9fa575af3de80d07fd50991] | committer: Anton Khirnov
lavfi: add a flag for filters able to work with hw_device_ctx
This way the caller can set it just on the filters that can make use of
it.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=632c34993195f716e9fa575af3de80d07fd50991
---
doc/APIchanges | 3 +++
libavfilter/avfilter.h | 9 +++++++++
libavfilter/stack_internal.c | 4 ++--
libavfilter/version.h | 2 +-
libavfilter/vf_avgblur_opencl.c | 1 +
libavfilter/vf_avgblur_vulkan.c | 1 +
libavfilter/vf_blend_vulkan.c | 1 +
libavfilter/vf_chromaber_vulkan.c | 1 +
libavfilter/vf_colorkey_opencl.c | 3 ++-
libavfilter/vf_convolution_opencl.c | 4 ++++
libavfilter/vf_deshake_opencl.c | 3 ++-
libavfilter/vf_flip_vulkan.c | 1 +
libavfilter/vf_gblur_vulkan.c | 1 +
libavfilter/vf_libplacebo.c | 1 +
libavfilter/vf_neighbor_opencl.c | 1 +
libavfilter/vf_nlmeans_opencl.c | 1 +
libavfilter/vf_overlay_opencl.c | 1 +
libavfilter/vf_overlay_qsv.c | 1 +
libavfilter/vf_overlay_vulkan.c | 1 +
libavfilter/vf_pad_opencl.c | 3 ++-
libavfilter/vf_program_opencl.c | 4 +++-
libavfilter/vf_remap_opencl.c | 1 +
libavfilter/vf_scale_vulkan.c | 1 +
libavfilter/vf_stack_qsv.c | 6 +++---
libavfilter/vf_stack_vaapi.c | 6 +++---
libavfilter/vf_tonemap_opencl.c | 1 +
libavfilter/vf_transpose_opencl.c | 1 +
libavfilter/vf_transpose_vulkan.c | 1 +
libavfilter/vf_unsharp_opencl.c | 1 +
libavfilter/vf_vpp_qsv.c | 1 +
libavfilter/vf_xfade_opencl.c | 1 +
libavfilter/vsrc_ddagrab.c | 1 +
32 files changed, 55 insertions(+), 13 deletions(-)
diff --git a/doc/APIchanges b/doc/APIchanges
index 931c172b78..29ddaa31bd 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -2,6 +2,9 @@ The last version increases of all libraries were on 2023-02-09
API changes, most recent first:
+2023-03-xx - xxxxxxxxxx - lavfi 9.5.100 - avfilter.h
+ Add AVFILTER_FLAG_HWDEVICE.
+
2023-03-21 - xxxxxxxxxx - lavu 58.5.100 - hdr_dynamic_metadata.h
Add av_dynamic_hdr_plus_from_t35() and av_dynamic_hdr_plus_to_t35()
functions to convert between raw T.35 payloads containing dynamic
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index d0d4584468..d69381aed4 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -131,6 +131,11 @@ enum AVMediaType avfilter_pad_get_type(const AVFilterPad *pads, int pad_idx);
* received by the filter on one of its inputs.
*/
#define AVFILTER_FLAG_METADATA_ONLY (1 << 3)
+
+/**
+ * The filter can create hardware frames using AVFilterContext.hw_device_ctx.
+ */
+#define AVFILTER_FLAG_HWDEVICE (1 << 4)
/**
* Some filters support a generic "enable" expression option that can be used
* to enable or disable a filter in the timeline. Filters supporting this
@@ -444,6 +449,10 @@ struct AVFilterContext {
* in particular, a filter which consumes or processes hardware frames will
* instead use the hw_frames_ctx field in AVFilterLink to carry the
* hardware context information.
+ *
+ * May be set by the caller on filters flagged with AVFILTER_FLAG_HWDEVICE
+ * before initializing the filter with avfilter_init_str() or
+ * avfilter_init_dict().
*/
AVBufferRef *hw_device_ctx;
diff --git a/libavfilter/stack_internal.c b/libavfilter/stack_internal.c
index 0697ebdd12..1ee20d66cf 100644
--- a/libavfilter/stack_internal.c
+++ b/libavfilter/stack_internal.c
@@ -333,7 +333,7 @@ static const AVFilterPad stack_outputs[] = {
{ NULL } \
}
-#define DEFINE_STACK_FILTER(category, api, capi) \
+#define DEFINE_STACK_FILTER(category, api, capi, filter_flags) \
static const AVClass category##_##api##_class = { \
.class_name = #category "_" #api, \
.item_name = av_default_item_name, \
@@ -351,5 +351,5 @@ static const AVFilterPad stack_outputs[] = {
FILTER_QUERY_FUNC(api##_stack_query_formats), \
FILTER_OUTPUTS(stack_outputs), \
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, \
- .flags = AVFILTER_FLAG_DYNAMIC_INPUTS, \
+ .flags = AVFILTER_FLAG_DYNAMIC_INPUTS | filter_flags, \
}
diff --git a/libavfilter/version.h b/libavfilter/version.h
index 4d8f28e512..523a7fe0a6 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -31,7 +31,7 @@
#include "version_major.h"
-#define LIBAVFILTER_VERSION_MINOR 4
+#define LIBAVFILTER_VERSION_MINOR 5
#define LIBAVFILTER_VERSION_MICRO 100
diff --git a/libavfilter/vf_avgblur_opencl.c b/libavfilter/vf_avgblur_opencl.c
index 7c0578b694..68f3a63249 100644
--- a/libavfilter/vf_avgblur_opencl.c
+++ b/libavfilter/vf_avgblur_opencl.c
@@ -390,6 +390,7 @@ const AVFilter ff_vf_boxblur_opencl = {
FILTER_OUTPUTS(avgblur_opencl_outputs),
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL),
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
+ .flags = AVFILTER_FLAG_HWDEVICE,
};
#endif /* CONFIG_BOXBLUR_OPENCL_FILTER */
diff --git a/libavfilter/vf_avgblur_vulkan.c b/libavfilter/vf_avgblur_vulkan.c
index d118ce802c..6a54d158ce 100644
--- a/libavfilter/vf_avgblur_vulkan.c
+++ b/libavfilter/vf_avgblur_vulkan.c
@@ -418,4 +418,5 @@ const AVFilter ff_vf_avgblur_vulkan = {
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VULKAN),
.priv_class = &avgblur_vulkan_class,
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
+ .flags = AVFILTER_FLAG_HWDEVICE,
};
diff --git a/libavfilter/vf_blend_vulkan.c b/libavfilter/vf_blend_vulkan.c
index fcc21cbc8d..4cee688a22 100644
--- a/libavfilter/vf_blend_vulkan.c
+++ b/libavfilter/vf_blend_vulkan.c
@@ -500,5 +500,6 @@ const AVFilter ff_vf_blend_vulkan = {
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VULKAN),
.priv_class = &blend_vulkan_class,
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
+ .flags = AVFILTER_FLAG_HWDEVICE,
.process_command = &process_command,
};
diff --git a/libavfilter/vf_chromaber_vulkan.c b/libavfilter/vf_chromaber_vulkan.c
index b9423e417e..62b99cc4d9 100644
--- a/libavfilter/vf_chromaber_vulkan.c
+++ b/libavfilter/vf_chromaber_vulkan.c
@@ -349,4 +349,5 @@ const AVFilter ff_vf_chromaber_vulkan = {
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VULKAN),
.priv_class = &chromaber_vulkan_class,
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
+ .flags = AVFILTER_FLAG_HWDEVICE,
};
diff --git a/libavfilter/vf_colorkey_opencl.c b/libavfilter/vf_colorkey_opencl.c
index 84be1999a8..2b019b290c 100644
--- a/libavfilter/vf_colorkey_opencl.c
+++ b/libavfilter/vf_colorkey_opencl.c
@@ -238,5 +238,6 @@ const AVFilter ff_vf_colorkey_opencl = {
FILTER_INPUTS(colorkey_opencl_inputs),
FILTER_OUTPUTS(colorkey_opencl_outputs),
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL),
- .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE
+ .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
+ .flags = AVFILTER_FLAG_HWDEVICE,
};
diff --git a/libavfilter/vf_convolution_opencl.c b/libavfilter/vf_convolution_opencl.c
index de3d38b553..bf721a7416 100644
--- a/libavfilter/vf_convolution_opencl.c
+++ b/libavfilter/vf_convolution_opencl.c
@@ -373,6 +373,7 @@ const AVFilter ff_vf_convolution_opencl = {
FILTER_OUTPUTS(convolution_opencl_outputs),
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL),
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
+ .flags = AVFILTER_FLAG_HWDEVICE,
};
#endif /* CONFIG_CONVOLUTION_OPENCL_FILTER */
@@ -399,6 +400,7 @@ const AVFilter ff_vf_sobel_opencl = {
FILTER_OUTPUTS(convolution_opencl_outputs),
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL),
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
+ .flags = AVFILTER_FLAG_HWDEVICE,
};
#endif /* CONFIG_SOBEL_OPENCL_FILTER */
@@ -425,6 +427,7 @@ const AVFilter ff_vf_prewitt_opencl = {
FILTER_OUTPUTS(convolution_opencl_outputs),
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL),
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
+ .flags = AVFILTER_FLAG_HWDEVICE,
};
#endif /* CONFIG_PREWITT_OPENCL_FILTER */
@@ -451,6 +454,7 @@ const AVFilter ff_vf_roberts_opencl = {
FILTER_OUTPUTS(convolution_opencl_outputs),
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL),
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
+ .flags = AVFILTER_FLAG_HWDEVICE,
};
#endif /* CONFIG_ROBERTS_OPENCL_FILTER */
diff --git a/libavfilter/vf_deshake_opencl.c b/libavfilter/vf_deshake_opencl.c
index d488da7fa0..e670a4cc23 100644
--- a/libavfilter/vf_deshake_opencl.c
+++ b/libavfilter/vf_deshake_opencl.c
@@ -2169,5 +2169,6 @@ const AVFilter ff_vf_deshake_opencl = {
FILTER_INPUTS(deshake_opencl_inputs),
FILTER_OUTPUTS(deshake_opencl_outputs),
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL),
- .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE
+ .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
+ .flags = AVFILTER_FLAG_HWDEVICE,
};
diff --git a/libavfilter/vf_flip_vulkan.c b/libavfilter/vf_flip_vulkan.c
index 0223786ef1..6868e39ee6 100644
--- a/libavfilter/vf_flip_vulkan.c
+++ b/libavfilter/vf_flip_vulkan.c
@@ -366,4 +366,5 @@ const AVFilter ff_vf_flip_vulkan = {
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VULKAN),
.priv_class = &flip_vulkan_class,
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
+ .flags = AVFILTER_FLAG_HWDEVICE,
};
diff --git a/libavfilter/vf_gblur_vulkan.c b/libavfilter/vf_gblur_vulkan.c
index d61f3c778c..e6ffc8c073 100644
--- a/libavfilter/vf_gblur_vulkan.c
+++ b/libavfilter/vf_gblur_vulkan.c
@@ -503,4 +503,5 @@ const AVFilter ff_vf_gblur_vulkan = {
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VULKAN),
.priv_class = &gblur_vulkan_class,
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
+ .flags = AVFILTER_FLAG_HWDEVICE,
};
diff --git a/libavfilter/vf_libplacebo.c b/libavfilter/vf_libplacebo.c
index 757dc519e9..ba852de08d 100644
--- a/libavfilter/vf_libplacebo.c
+++ b/libavfilter/vf_libplacebo.c
@@ -893,4 +893,5 @@ const AVFilter ff_vf_libplacebo = {
FILTER_QUERY_FUNC(libplacebo_query_format),
.priv_class = &libplacebo_class,
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
+ .flags = AVFILTER_FLAG_HWDEVICE,
};
diff --git a/libavfilter/vf_neighbor_opencl.c b/libavfilter/vf_neighbor_opencl.c
index 3b83cee3da..d2d93cd240 100644
--- a/libavfilter/vf_neighbor_opencl.c
+++ b/libavfilter/vf_neighbor_opencl.c
@@ -312,6 +312,7 @@ const AVFilter ff_vf_dilation_opencl = {
FILTER_OUTPUTS(neighbor_opencl_outputs),
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL),
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
+ .flags = AVFILTER_FLAG_HWDEVICE,
};
#endif /* CONFIG_DILATION_OPENCL_FILTER */
diff --git a/libavfilter/vf_nlmeans_opencl.c b/libavfilter/vf_nlmeans_opencl.c
index c0ac8bf95d..ca3ec45d7a 100644
--- a/libavfilter/vf_nlmeans_opencl.c
+++ b/libavfilter/vf_nlmeans_opencl.c
@@ -438,4 +438,5 @@ const AVFilter ff_vf_nlmeans_opencl = {
FILTER_OUTPUTS(nlmeans_opencl_outputs),
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL),
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
+ .flags = AVFILTER_FLAG_HWDEVICE,
};
diff --git a/libavfilter/vf_overlay_opencl.c b/libavfilter/vf_overlay_opencl.c
index 1e3ad903e1..38a3fc8795 100644
--- a/libavfilter/vf_overlay_opencl.c
+++ b/libavfilter/vf_overlay_opencl.c
@@ -322,4 +322,5 @@ const AVFilter ff_vf_overlay_opencl = {
FILTER_OUTPUTS(overlay_opencl_outputs),
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL),
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
+ .flags = AVFILTER_FLAG_HWDEVICE,
};
diff --git a/libavfilter/vf_overlay_qsv.c b/libavfilter/vf_overlay_qsv.c
index 5bec7dd414..edc7f79c86 100644
--- a/libavfilter/vf_overlay_qsv.c
+++ b/libavfilter/vf_overlay_qsv.c
@@ -429,4 +429,5 @@ const AVFilter ff_vf_overlay_qsv = {
FILTER_QUERY_FUNC(overlay_qsv_query_formats),
.priv_class = &overlay_qsv_class,
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
+ .flags = AVFILTER_FLAG_HWDEVICE,
};
diff --git a/libavfilter/vf_overlay_vulkan.c b/libavfilter/vf_overlay_vulkan.c
index e87ee83000..6db7baddfd 100644
--- a/libavfilter/vf_overlay_vulkan.c
+++ b/libavfilter/vf_overlay_vulkan.c
@@ -494,4 +494,5 @@ const AVFilter ff_vf_overlay_vulkan = {
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VULKAN),
.priv_class = &overlay_vulkan_class,
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
+ .flags = AVFILTER_FLAG_HWDEVICE,
};
diff --git a/libavfilter/vf_pad_opencl.c b/libavfilter/vf_pad_opencl.c
index 728e850f72..d6b71765ee 100644
--- a/libavfilter/vf_pad_opencl.c
+++ b/libavfilter/vf_pad_opencl.c
@@ -391,5 +391,6 @@ const AVFilter ff_vf_pad_opencl = {
FILTER_INPUTS(pad_opencl_inputs),
FILTER_OUTPUTS(pad_opencl_outputs),
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL),
- .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE
+ .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
+ .flags = AVFILTER_FLAG_HWDEVICE,
};
diff --git a/libavfilter/vf_program_opencl.c b/libavfilter/vf_program_opencl.c
index 55c1e6547c..8a4881b38e 100644
--- a/libavfilter/vf_program_opencl.c
+++ b/libavfilter/vf_program_opencl.c
@@ -362,7 +362,8 @@ const AVFilter ff_vf_program_opencl = {
.description = NULL_IF_CONFIG_SMALL("Filter video using an OpenCL program"),
.priv_size = sizeof(ProgramOpenCLContext),
.priv_class = &program_opencl_class,
- .flags = AVFILTER_FLAG_DYNAMIC_INPUTS,
+ .flags = AVFILTER_FLAG_DYNAMIC_INPUTS |
+ AVFILTER_FLAG_HWDEVICE,
.preinit = &program_opencl_framesync_preinit,
.init = &program_opencl_init,
.uninit = &program_opencl_uninit,
@@ -421,6 +422,7 @@ const AVFilter ff_vsrc_openclsrc = {
FILTER_OUTPUTS(openclsrc_outputs),
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL),
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
+ .flags = AVFILTER_FLAG_HWDEVICE,
};
#endif
diff --git a/libavfilter/vf_remap_opencl.c b/libavfilter/vf_remap_opencl.c
index f3f84bde64..eeb1eb5d69 100644
--- a/libavfilter/vf_remap_opencl.c
+++ b/libavfilter/vf_remap_opencl.c
@@ -351,4 +351,5 @@ const AVFilter ff_vf_remap_opencl = {
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL),
.priv_class = &remap_opencl_class,
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
+ .flags = AVFILTER_FLAG_HWDEVICE,
};
diff --git a/libavfilter/vf_scale_vulkan.c b/libavfilter/vf_scale_vulkan.c
index c140420896..3b09f0dcc1 100644
--- a/libavfilter/vf_scale_vulkan.c
+++ b/libavfilter/vf_scale_vulkan.c
@@ -531,4 +531,5 @@ const AVFilter ff_vf_scale_vulkan = {
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VULKAN),
.priv_class = &scale_vulkan_class,
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
+ .flags = AVFILTER_FLAG_HWDEVICE,
};
diff --git a/libavfilter/vf_stack_qsv.c b/libavfilter/vf_stack_qsv.c
index 9eb0748bd6..3e6aefe44b 100644
--- a/libavfilter/vf_stack_qsv.c
+++ b/libavfilter/vf_stack_qsv.c
@@ -235,20 +235,20 @@ static int qsv_stack_query_formats(AVFilterContext *ctx)
#if CONFIG_HSTACK_QSV_FILTER
DEFINE_HSTACK_OPTIONS(qsv);
-DEFINE_STACK_FILTER(hstack, qsv, "Quick Sync Video");
+DEFINE_STACK_FILTER(hstack, qsv, "Quick Sync Video", AVFILTER_FLAG_HWDEVICE);
#endif
#if CONFIG_VSTACK_QSV_FILTER
DEFINE_VSTACK_OPTIONS(qsv);
-DEFINE_STACK_FILTER(vstack, qsv, "Quick Sync Video");
+DEFINE_STACK_FILTER(vstack, qsv, "Quick Sync Video", AVFILTER_FLAG_HWDEVICE);
#endif
#if CONFIG_XSTACK_QSV_FILTER
DEFINE_XSTACK_OPTIONS(qsv);
-DEFINE_STACK_FILTER(xstack, qsv, "Quick Sync Video");
+DEFINE_STACK_FILTER(xstack, qsv, "Quick Sync Video", AVFILTER_FLAG_HWDEVICE);
#endif
diff --git a/libavfilter/vf_stack_vaapi.c b/libavfilter/vf_stack_vaapi.c
index 26dbe3f7aa..8e9471e6d7 100644
--- a/libavfilter/vf_stack_vaapi.c
+++ b/libavfilter/vf_stack_vaapi.c
@@ -234,20 +234,20 @@ static int vaapi_stack_query_formats(AVFilterContext *avctx)
#if CONFIG_HSTACK_VAAPI_FILTER
DEFINE_HSTACK_OPTIONS(vaapi);
-DEFINE_STACK_FILTER(hstack, vaapi, "VA-API");
+DEFINE_STACK_FILTER(hstack, vaapi, "VA-API", 0);
#endif
#if CONFIG_VSTACK_VAAPI_FILTER
DEFINE_VSTACK_OPTIONS(vaapi);
-DEFINE_STACK_FILTER(vstack, vaapi, "VA-API");
+DEFINE_STACK_FILTER(vstack, vaapi, "VA-API", 0);
#endif
#if CONFIG_XSTACK_VAAPI_FILTER
DEFINE_XSTACK_OPTIONS(vaapi);
-DEFINE_STACK_FILTER(xstack, vaapi, "VA-API");
+DEFINE_STACK_FILTER(xstack, vaapi, "VA-API", 0);
#endif
diff --git a/libavfilter/vf_tonemap_opencl.c b/libavfilter/vf_tonemap_opencl.c
index f6ebb694a8..883eb04342 100644
--- a/libavfilter/vf_tonemap_opencl.c
+++ b/libavfilter/vf_tonemap_opencl.c
@@ -547,4 +547,5 @@ const AVFilter ff_vf_tonemap_opencl = {
FILTER_OUTPUTS(tonemap_opencl_outputs),
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL),
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
+ .flags = AVFILTER_FLAG_HWDEVICE,
};
diff --git a/libavfilter/vf_transpose_opencl.c b/libavfilter/vf_transpose_opencl.c
index c6e8bd2f53..56d34d193b 100644
--- a/libavfilter/vf_transpose_opencl.c
+++ b/libavfilter/vf_transpose_opencl.c
@@ -281,4 +281,5 @@ const AVFilter ff_vf_transpose_opencl = {
FILTER_OUTPUTS(transpose_opencl_outputs),
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL),
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
+ .flags = AVFILTER_FLAG_HWDEVICE,
};
diff --git a/libavfilter/vf_transpose_vulkan.c b/libavfilter/vf_transpose_vulkan.c
index 30d052e08c..3b2ce4fb69 100644
--- a/libavfilter/vf_transpose_vulkan.c
+++ b/libavfilter/vf_transpose_vulkan.c
@@ -343,4 +343,5 @@ const AVFilter ff_vf_transpose_vulkan = {
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VULKAN),
.priv_class = &transpose_vulkan_class,
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
+ .flags = AVFILTER_FLAG_HWDEVICE,
};
diff --git a/libavfilter/vf_unsharp_opencl.c b/libavfilter/vf_unsharp_opencl.c
index 53e310de09..2c3ac14050 100644
--- a/libavfilter/vf_unsharp_opencl.c
+++ b/libavfilter/vf_unsharp_opencl.c
@@ -407,4 +407,5 @@ const AVFilter ff_vf_unsharp_opencl = {
FILTER_OUTPUTS(unsharp_opencl_outputs),
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL),
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
+ .flags = AVFILTER_FLAG_HWDEVICE,
};
diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c
index b4dd7a4191..76f0bc3df1 100644
--- a/libavfilter/vf_vpp_qsv.c
+++ b/libavfilter/vf_vpp_qsv.c
@@ -649,6 +649,7 @@ const AVFilter ff_vf_##sn##_qsv = { \
fmts, \
.activate = activate, \
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, \
+ .flags = AVFILTER_FLAG_HWDEVICE, \
};
#if CONFIG_VPP_QSV_FILTER
diff --git a/libavfilter/vf_xfade_opencl.c b/libavfilter/vf_xfade_opencl.c
index cca4980e01..415cf7ac35 100644
--- a/libavfilter/vf_xfade_opencl.c
+++ b/libavfilter/vf_xfade_opencl.c
@@ -433,4 +433,5 @@ const AVFilter ff_vf_xfade_opencl = {
FILTER_OUTPUTS(xfade_opencl_outputs),
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL),
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
+ .flags = AVFILTER_FLAG_HWDEVICE,
};
diff --git a/libavfilter/vsrc_ddagrab.c b/libavfilter/vsrc_ddagrab.c
index 00c72187ea..042842104f 100644
--- a/libavfilter/vsrc_ddagrab.c
+++ b/libavfilter/vsrc_ddagrab.c
@@ -1056,4 +1056,5 @@ const AVFilter ff_vsrc_ddagrab = {
FILTER_OUTPUTS(ddagrab_outputs),
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_D3D11),
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
+ .flags = AVFILTER_FLAG_HWDEVICE,
};
More information about the ffmpeg-cvslog
mailing list