FFmpeg
Loading...
Searching...
No Matches
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, uint32_t wgc_z,
48 void *push_src, size_t push_size);
49
50/**
51 * Submit a compute shader with a single in and single out with 2 stages.
52 */
54 FFVulkanShader *shd_list[2],
56 VkSampler sampler, uint32_t wgc_z,
57 void *push_src, size_t push_size);
58
59/**
60 * Up to 16 inputs, one output
61 */
63 FFVulkanShader *shd,
64 AVFrame *out, AVFrame *in[], int nb_in,
65 VkSampler sampler, uint32_t wgc_z,
66 void *push_src, size_t push_size);
67
68#endif /* AVFILTER_VULKAN_FILTER_H */
Main libavfilter public API header.
#define s(width, name)
Definition cbs_vp9.c:198
AVPixelFormat
Pixel format.
Definition pixfmt.h:71
A reference to a data buffer.
Definition buffer.h:82
An instance of a filter.
Definition avfilter.h:273
This structure describes decoded (raw) audio or video data.
Definition frame.h:472
static uint8_t tmp[40]
Definition aes_ctr.c:52
static FILE * out
Definition movenc.c:55
#define height
Definition dsp.h:89
#define width
Definition dsp.h:89
int ff_vk_filter_process_2pass(FFVulkanContext *vkctx, FFVkExecPool *e, FFVulkanShader *shd_list[2], AVFrame *out, AVFrame *tmp, AVFrame *in, VkSampler sampler, uint32_t wgc_z, void *push_src, size_t push_size)
Submit a compute shader with a single in and single out with 2 stages.
int ff_vk_filter_config_input(AVFilterLink *inlink)
int ff_vk_filter_config_output(AVFilterLink *outlink)
int ff_vk_filter_process_Nin(FFVulkanContext *vkctx, FFVkExecPool *e, FFVulkanShader *shd, AVFrame *out, AVFrame *in[], int nb_in, VkSampler sampler, uint32_t wgc_z, void *push_src, size_t push_size)
Up to 16 inputs, one output.
int ff_vk_filter_process_simple(FFVulkanContext *vkctx, FFVkExecPool *e, FFVulkanShader *shd, AVFrame *out_f, AVFrame *in_f, VkSampler sampler, uint32_t wgc_z, void *push_src, size_t push_size)
Submit a compute shader with a zero/one input and single out for execution.
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.
int ff_vk_filter_init(AVFilterContext *avctx)
General lavfi IO functions.