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 "libavutil/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  FFVulkanShader *shd, 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  FFVulkanShader *shd_list[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  FFVulkanShader *shd,
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:176
AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:71
out
FILE * out
Definition: movenc.c:55
ff_vk_filter_config_output
int ff_vk_filter_config_output(AVFilterLink *outlink)
Definition: vulkan_filter.c:209
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:389
tmp
static uint8_t tmp[11]
Definition: aes_ctr.c:28
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:25
s
#define s(width, name)
Definition: cbs_vp9.c:198
FFVulkanContext
Definition: vulkan.h:268
ff_vk_filter_process_2pass
int ff_vk_filter_process_2pass(FFVulkanContext *vkctx, FFVkExecPool *e, FFVulkanShader *shd_list[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:312
height
#define height
Definition: dsp.h:85
vulkan.h
ff_vk_filter_process_Nin
int ff_vk_filter_process_Nin(FFVulkanContext *vkctx, FFVkExecPool *e, FFVulkanShader *shd, 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:401
FFVulkanShader
Definition: vulkan.h:184
ff_vk_filter_process_simple
int ff_vk_filter_process_simple(FFVulkanContext *vkctx, FFVkExecPool *e, FFVulkanShader *shd, 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:242
FFVkExecPool
Definition: vulkan.h:246
avfilter.h
AVFilterContext
An instance of a filter.
Definition: avfilter.h:457
AVBufferRef
A reference to a data buffer.
Definition: buffer.h:82
width
#define width
Definition: dsp.h:85
ff_vk_filter_init
int ff_vk_filter_init(AVFilterContext *avctx)
General lavfi IO functions.
Definition: vulkan_filter.c:233