Go to the documentation of this file.
33 s->hwctx =
s->device->hwctx;
60 if (!
inlink->hw_frames_ctx) {
62 "hardware frames context on the input.\n");
82 s->hwctx->nb_enabled_dev_extensions);
88 vk->GetPhysicalDeviceProperties(
s->hwctx->phys_dev, &
s->props);
89 vk->GetPhysicalDeviceMemoryProperties(
s->hwctx->phys_dev, &
s->mprops);
97 if (!
s->output_height)
111 if (!
s->device_ref) {
127 outlink->
w =
s->output_width;
128 outlink->
h =
s->output_height;
143 if (!
s->device_ref) {
156 if (!output_frames_ref) {
164 output_frames->
width =
s->output_width;
165 output_frames->
height =
s->output_height;
170 "frames: %d.\n", err);
175 outlink->
w =
s->output_width;
176 outlink->
h =
s->output_height;
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
uint8_t * data
The data buffer.
enum AVPixelFormat format
The pixel format identifying the underlying HW surface type.
The exact code depends on how similar the blocks are and how related they are to the and needs to apply these operations to the correct inlink or outlink if there are several Macros are available to factor that when no extra processing is inlink
int av_hwframe_ctx_init(AVBufferRef *ref)
Finalize the context before use.
int ff_vk_filter_init(AVFilterContext *avctx)
General lavfi IO functions.
AVBufferRef * av_hwframe_ctx_alloc(AVBufferRef *device_ref_in)
Allocate an AVHWFramesContext tied to a given device context.
AVBufferRef * hw_device_ctx
For filters which will create hardware frames, sets the device the filter should create them in.
AVBufferRef * av_buffer_ref(const AVBufferRef *buf)
Create a new reference to an AVBuffer.
int width
The allocated dimensions of the frames in this pool.
A link between two filters.
@ AV_PIX_FMT_VULKAN
Vulkan hardware images.
void * priv
private data for use by the filter
if it could not because there are no more frames
This struct aggregates all the (hardware/vendor-specific) "high-level" state, i.e.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static int ff_vk_load_functions(AVHWDeviceContext *ctx, FFVulkanFunctions *vk, uint64_t extensions_mask, int has_inst, int has_dev)
Function loader.
static int vulkan_filter_set_device(AVFilterContext *avctx, AVBufferRef *device)
enum AVPixelFormat sw_format
The pixel format identifying the actual data layout of the hardware frames.
void av_buffer_unref(AVBufferRef **buf)
Free a given reference and automatically free the buffer if there are no more references to it.
int ff_vk_filter_config_output_inplace(AVFilterLink *outlink)
AVBufferRef * device_ref
A reference to the parent AVHWDeviceContext.
AVFilterLink ** inputs
array of pointers to input links
int ff_vk_filter_config_output(AVFilterLink *outlink)
AVFilterContext * src
source filter
int w
agreed upon image width
AVBufferRef * hw_frames_ctx
For hwaccel pixel formats, this should be a reference to the AVHWFramesContext describing the frames.
This struct describes a set or pool of "hardware" frames (i.e.
int h
agreed upon image height
int ff_vk_filter_config_input(AVFilterLink *inlink)
A reference to a data buffer.
static uint64_t ff_vk_extensions_to_mask(const char *const *extensions, int nb_extensions)
static int vulkan_filter_set_frames(AVFilterContext *avctx, AVBufferRef *frames)