FFmpeg
vulkan_filter.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Lynne
3  *
4  * This file is part of FFmpeg.
5  *
6  * FFmpeg is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * FFmpeg is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with FFmpeg; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #ifndef AVFILTER_VULKAN_FILTER_H
22 #define AVFILTER_VULKAN_FILTER_H
23 
24 #include "avfilter.h"
25 
26 #include "vulkan.h"
27 
28 /**
29  * General lavfi IO functions
30  */
34 
35 /**
36  * Can be called manually, if not using ff_vk_filter_config_output.
37  */
39  AVBufferRef *frames_ref,
40  int width, int height, enum AVPixelFormat sw_format);
41 
42 /**
43  * Submit a compute shader with a zero/one input and single out for execution.
44  */
46  FFVulkanPipeline *pl, AVFrame *out_f, AVFrame *in_f,
47  VkSampler sampler, void *push_src, size_t push_size);
48 
49 /**
50  * Submit a compute shader with a single in and single out with 2 stages.
51  */
53  FFVulkanPipeline *pls[2],
54  AVFrame *out, AVFrame *tmp, AVFrame *in,
55  VkSampler sampler, void *push_src, size_t push_size);
56 
57 /**
58  * Up to 16 inputs, one output
59  */
61  FFVulkanPipeline *pl,
62  AVFrame *out, AVFrame *in[], int nb_in,
63  VkSampler sampler, void *push_src, size_t push_size);
64 
65 #endif /* AVFILTER_VULKAN_FILTER_H */
ff_vk_filter_config_input
int ff_vk_filter_config_input(AVFilterLink *inlink)
Definition: vulkan_filter.c:166
AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:71
vulkan.h
out
FILE * out
Definition: movenc.c:54
ff_vk_filter_config_output
int ff_vk_filter_config_output(AVFilterLink *outlink)
Definition: vulkan_filter.c:198
inlink
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
Definition: filter_design.txt:212
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:344
tmp
static uint8_t tmp[11]
Definition: aes_ctr.c:28
ff_vk_filter_process_2pass
int ff_vk_filter_process_2pass(FFVulkanContext *vkctx, FFVkExecPool *e, FFVulkanPipeline *pls[2], AVFrame *out, AVFrame *tmp, AVFrame *in, VkSampler sampler, void *push_src, size_t push_size)
Submit a compute shader with a single in and single out with 2 stages.
Definition: vulkan_filter.c:298
ff_vk_filter_init_context
int ff_vk_filter_init_context(AVFilterContext *avctx, FFVulkanContext *s, AVBufferRef *frames_ref, int width, int height, enum AVPixelFormat sw_format)
Can be called manually, if not using ff_vk_filter_config_output.
Definition: vulkan_filter.c:24
width
#define width
s
#define s(width, name)
Definition: cbs_vp9.c:198
FFVulkanContext
Definition: vulkan.h:228
FFVulkanPipeline
Definition: vulkan.h:131
ff_vk_filter_process_simple
int ff_vk_filter_process_simple(FFVulkanContext *vkctx, FFVkExecPool *e, FFVulkanPipeline *pl, AVFrame *out_f, AVFrame *in_f, VkSampler sampler, void *push_src, size_t push_size)
Submit a compute shader with a zero/one input and single out for execution.
Definition: vulkan_filter.c:230
height
#define height
FFVkExecPool
Definition: vulkan.h:210
avfilter.h
AVFilterContext
An instance of a filter.
Definition: avfilter.h:407
AVBufferRef
A reference to a data buffer.
Definition: buffer.h:82
ff_vk_filter_process_Nin
int ff_vk_filter_process_Nin(FFVulkanContext *vkctx, FFVkExecPool *e, FFVulkanPipeline *pl, AVFrame *out, AVFrame *in[], int nb_in, VkSampler sampler, void *push_src, size_t push_size)
Up to 16 inputs, one output.
Definition: vulkan_filter.c:387
ff_vk_filter_init
int ff_vk_filter_init(AVFilterContext *avctx)
General lavfi IO functions.
Definition: vulkan_filter.c:221