FFmpeg
vf_transpose_vulkan.c
Go to the documentation of this file.
1 /*
2  * copyright (c) 2021 Wu Jianhua <jianhua.wu@intel.com>
3  * Copyright (c) Lynne
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * FFmpeg is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with FFmpeg; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
22 #include "libavutil/random_seed.h"
23 #include "libavutil/opt.h"
24 #include "vulkan_filter.h"
25 #include "vulkan_spirv.h"
26 
27 #include "filters.h"
28 #include "transpose.h"
29 #include "video.h"
30 
31 typedef struct TransposeVulkanContext {
33 
39  VkSampler sampler;
40 
41  int dir;
44 
46 {
47  int err;
48  uint8_t *spv_data;
49  size_t spv_len;
50  void *spv_opaque = NULL;
51  TransposeVulkanContext *s = ctx->priv;
52  FFVulkanContext *vkctx = &s->vkctx;
53 
54  const int planes = av_pix_fmt_count_planes(s->vkctx.output_format);
55  FFVkSPIRVShader *shd = &s->shd;
56  FFVkSPIRVCompiler *spv;
58 
59  spv = ff_vk_spirv_init();
60  if (!spv) {
61  av_log(ctx, AV_LOG_ERROR, "Unable to initialize SPIR-V compiler!\n");
62  return AVERROR_EXTERNAL;
63  }
64 
65  ff_vk_qf_init(vkctx, &s->qf, VK_QUEUE_COMPUTE_BIT);
66  RET(ff_vk_exec_pool_init(vkctx, &s->qf, &s->e, s->qf.nb_queues*4, 0, 0, 0, NULL));
67  RET(ff_vk_init_sampler(vkctx, &s->sampler, 1, VK_FILTER_LINEAR));
68  RET(ff_vk_shader_init(&s->pl, &s->shd, "transpose_compute",
69  VK_SHADER_STAGE_COMPUTE_BIT, 0));
70 
71  ff_vk_shader_set_compute_sizes(&s->shd, 32, 1, 1);
72 
74  {
75  .name = "input_images",
76  .type = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
77  .dimensions = 2,
78  .elems = planes,
79  .stages = VK_SHADER_STAGE_COMPUTE_BIT,
80  .samplers = DUP_SAMPLER(s->sampler),
81  },
82  {
83  .name = "output_images",
84  .type = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE,
85  .mem_layout = ff_vk_shader_rep_fmt(s->vkctx.output_format),
86  .mem_quali = "writeonly",
87  .dimensions = 2,
88  .elems = planes,
89  .stages = VK_SHADER_STAGE_COMPUTE_BIT,
90  },
91  };
92 
93  RET(ff_vk_pipeline_descriptor_set_add(vkctx, &s->pl, shd, desc, 2, 0, 0));
94 
95  GLSLC(0, void main() );
96  GLSLC(0, { );
97  GLSLC(1, ivec2 size; );
98  GLSLC(1, ivec2 pos = ivec2(gl_GlobalInvocationID.xy); );
99  for (int i = 0; i < planes; i++) {
100  GLSLC(0, );
101  GLSLF(1, size = imageSize(output_images[%i]); ,i);
102  GLSLC(1, if (IS_WITHIN(pos, size)) { );
103  if (s->dir == TRANSPOSE_CCLOCK)
104  GLSLF(2, vec4 res = texture(input_images[%i], ivec2(size.y - pos.y, pos.x)); ,i);
105  else if (s->dir == TRANSPOSE_CLOCK_FLIP || s->dir == TRANSPOSE_CLOCK) {
106  GLSLF(2, vec4 res = texture(input_images[%i], ivec2(size.yx - pos.yx)); ,i);
107  if (s->dir == TRANSPOSE_CLOCK)
108  GLSLC(2, pos = ivec2(pos.x, size.y - pos.y); );
109  } else
110  GLSLF(2, vec4 res = texture(input_images[%i], pos.yx); ,i);
111  GLSLF(2, imageStore(output_images[%i], pos, res); ,i);
112  GLSLC(1, } );
113  }
114  GLSLC(0, } );
115 
116  RET(spv->compile_shader(spv, ctx, shd, &spv_data, &spv_len, "main",
117  &spv_opaque));
118  RET(ff_vk_shader_create(vkctx, shd, spv_data, spv_len, "main"));
119 
120  RET(ff_vk_init_compute_pipeline(vkctx, &s->pl, shd));
121  RET(ff_vk_exec_pipeline_register(vkctx, &s->e, &s->pl));
122 
123  s->initialized = 1;
124 
125 fail:
126  if (spv_opaque)
127  spv->free_shader(spv, &spv_opaque);
128  if (spv)
129  spv->uninit(&spv);
130 
131  return err;
132 }
133 
135 {
136  int err;
137  AVFrame *out = NULL;
138  AVFilterContext *ctx = inlink->dst;
139  TransposeVulkanContext *s = ctx->priv;
140  AVFilterLink *outlink = ctx->outputs[0];
141 
142  if (s->passthrough)
143  return ff_filter_frame(outlink, in);
144 
145  out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
146  if (!out) {
147  err = AVERROR(ENOMEM);
148  goto fail;
149  }
150 
151  if (!s->initialized)
152  RET(init_filter(ctx, in));
153 
154  RET(ff_vk_filter_process_simple(&s->vkctx, &s->e, &s->pl, out, in,
155  s->sampler, NULL, 0));
156 
158 
159  if (in->sample_aspect_ratio.num)
160  out->sample_aspect_ratio = in->sample_aspect_ratio;
161  else {
162  out->sample_aspect_ratio.num = in->sample_aspect_ratio.den;
163  out->sample_aspect_ratio.den = in->sample_aspect_ratio.num;
164  }
165 
166  av_frame_free(&in);
167 
168  return ff_filter_frame(outlink, out);
169 
170 fail:
171  av_frame_free(&in);
172  av_frame_free(&out);
173  return err;
174 }
175 
177 {
178  TransposeVulkanContext *s = avctx->priv;
179  FFVulkanContext *vkctx = &s->vkctx;
180  FFVulkanFunctions *vk = &vkctx->vkfn;
181 
182  ff_vk_exec_pool_free(vkctx, &s->e);
183  ff_vk_pipeline_free(vkctx, &s->pl);
184  ff_vk_shader_free(vkctx, &s->shd);
185 
186  if (s->sampler)
187  vk->DestroySampler(vkctx->hwctx->act_dev, s->sampler,
188  vkctx->hwctx->alloc);
189 
190  ff_vk_uninit(&s->vkctx);
191 
192  s->initialized = 0;
193 }
194 
195 static int config_props_output(AVFilterLink *outlink)
196 {
197  FilterLink *outl = ff_filter_link(outlink);
198  AVFilterContext *avctx = outlink->src;
199  TransposeVulkanContext *s = avctx->priv;
200  FFVulkanContext *vkctx = &s->vkctx;
201  AVFilterLink *inlink = avctx->inputs[0];
203 
204  if ((inlink->w >= inlink->h && s->passthrough == TRANSPOSE_PT_TYPE_LANDSCAPE) ||
205  (inlink->w <= inlink->h && s->passthrough == TRANSPOSE_PT_TYPE_PORTRAIT)) {
206  av_log(avctx, AV_LOG_VERBOSE,
207  "w:%d h:%d -> w:%d h:%d (passthrough mode)\n",
208  inlink->w, inlink->h, inlink->w, inlink->h);
210  return outl->hw_frames_ctx ? 0 : AVERROR(ENOMEM);
211  } else {
212  s->passthrough = TRANSPOSE_PT_TYPE_NONE;
213  }
214 
215  vkctx->output_width = inlink->h;
216  vkctx->output_height = inlink->w;
217 
218  if (inlink->sample_aspect_ratio.num)
219  outlink->sample_aspect_ratio = av_div_q((AVRational) { 1, 1 },
220  inlink->sample_aspect_ratio);
221  else
222  outlink->sample_aspect_ratio = inlink->sample_aspect_ratio;
223 
224  return ff_vk_filter_config_output(outlink);
225 }
226 
227 #define OFFSET(x) offsetof(TransposeVulkanContext, x)
228 #define FLAGS (AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_VIDEO_PARAM)
229 
231  { "dir", "set transpose direction", OFFSET(dir), AV_OPT_TYPE_INT, { .i64 = TRANSPOSE_CCLOCK_FLIP }, 0, 7, FLAGS, .unit = "dir" },
232  { "cclock_flip", "rotate counter-clockwise with vertical flip", 0, AV_OPT_TYPE_CONST, { .i64 = TRANSPOSE_CCLOCK_FLIP }, .flags=FLAGS, .unit = "dir" },
233  { "clock", "rotate clockwise", 0, AV_OPT_TYPE_CONST, { .i64 = TRANSPOSE_CLOCK }, .flags=FLAGS, .unit = "dir" },
234  { "cclock", "rotate counter-clockwise", 0, AV_OPT_TYPE_CONST, { .i64 = TRANSPOSE_CCLOCK }, .flags=FLAGS, .unit = "dir" },
235  { "clock_flip", "rotate clockwise with vertical flip", 0, AV_OPT_TYPE_CONST, { .i64 = TRANSPOSE_CLOCK_FLIP }, .flags=FLAGS, .unit = "dir" },
236 
237  { "passthrough", "do not apply transposition if the input matches the specified geometry",
238  OFFSET(passthrough), AV_OPT_TYPE_INT, {.i64=TRANSPOSE_PT_TYPE_NONE}, 0, INT_MAX, FLAGS, .unit = "passthrough" },
239  { "none", "always apply transposition", 0, AV_OPT_TYPE_CONST, {.i64=TRANSPOSE_PT_TYPE_NONE}, INT_MIN, INT_MAX, FLAGS, .unit = "passthrough" },
240  { "portrait", "preserve portrait geometry", 0, AV_OPT_TYPE_CONST, {.i64=TRANSPOSE_PT_TYPE_PORTRAIT}, INT_MIN, INT_MAX, FLAGS, .unit = "passthrough" },
241  { "landscape", "preserve landscape geometry", 0, AV_OPT_TYPE_CONST, {.i64=TRANSPOSE_PT_TYPE_LANDSCAPE}, INT_MIN, INT_MAX, FLAGS, .unit = "passthrough" },
242 
243  { NULL }
244 };
245 
246 AVFILTER_DEFINE_CLASS(transpose_vulkan);
247 
249  {
250  .name = "default",
251  .type = AVMEDIA_TYPE_VIDEO,
252  .filter_frame = &filter_frame,
253  .config_props = &ff_vk_filter_config_input,
254  }
255 };
256 
258  {
259  .name = "default",
260  .type = AVMEDIA_TYPE_VIDEO,
261  .config_props = &config_props_output,
262  }
263 };
264 
266  .name = "transpose_vulkan",
267  .description = NULL_IF_CONFIG_SMALL("Transpose Vulkan Filter"),
268  .priv_size = sizeof(TransposeVulkanContext),
274  .priv_class = &transpose_vulkan_class,
275  .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
276  .flags = AVFILTER_FLAG_HWDEVICE,
277 };
ff_get_video_buffer
AVFrame * ff_get_video_buffer(AVFilterLink *link, int w, int h)
Request a picture buffer with a specific set of permissions.
Definition: video.c:116
ff_vk_pipeline_free
void ff_vk_pipeline_free(FFVulkanContext *s, FFVulkanPipeline *pl)
Definition: vulkan.c:1810
FFVulkanContext::output_height
int output_height
Definition: vulkan.h:269
AVERROR
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
opt.h
out
FILE * out
Definition: movenc.c:55
ff_filter_frame
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
Definition: avfilter.c:1023
av_div_q
AVRational av_div_q(AVRational b, AVRational c)
Divide one rational by another.
Definition: rational.c:88
transpose_vulkan_uninit
static av_cold void transpose_vulkan_uninit(AVFilterContext *avctx)
Definition: vf_transpose_vulkan.c:176
ff_vk_qf_init
int ff_vk_qf_init(FFVulkanContext *s, FFVkQueueFamilyCtx *qf, VkQueueFlagBits dev_family)
Chooses a QF and loads it into a context.
Definition: vulkan.c:228
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
av_frame_free
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
Definition: frame.c:161
TransposeVulkanContext::vkctx
FFVulkanContext vkctx
Definition: vf_transpose_vulkan.c:32
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: filters.h:262
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:380
ff_vk_filter_init
int ff_vk_filter_init(AVFilterContext *avctx)
General lavfi IO functions.
Definition: vulkan_filter.c:243
ff_vk_shader_create
int ff_vk_shader_create(FFVulkanContext *s, FFVkSPIRVShader *shd, uint8_t *spirv, size_t spirv_size, const char *entrypoint)
Definition: vulkan.c:1379
AVOption
AVOption.
Definition: opt.h:429
AV_LOG_VERBOSE
#define AV_LOG_VERBOSE
Detailed information.
Definition: log.h:196
TRANSPOSE_CLOCK_FLIP
@ TRANSPOSE_CLOCK_FLIP
Definition: transpose.h:34
ff_vk_uninit
void ff_vk_uninit(FFVulkanContext *s)
Frees main context.
Definition: vulkan.c:1839
FFVkSPIRVCompiler::uninit
void(* uninit)(struct FFVkSPIRVCompiler **ctx)
Definition: vulkan_spirv.h:33
av_buffer_ref
AVBufferRef * av_buffer_ref(const AVBufferRef *buf)
Create a new reference to an AVBuffer.
Definition: buffer.c:103
TransposeVulkanContext::initialized
int initialized
Definition: vf_transpose_vulkan.c:34
AVFilter::name
const char * name
Filter name.
Definition: avfilter.h:205
ff_vk_shader_set_compute_sizes
void ff_vk_shader_set_compute_sizes(FFVkSPIRVShader *shd, int x, int y, int z)
Definition: vulkan.c:1337
video.h
AV_PIX_FMT_VULKAN
@ AV_PIX_FMT_VULKAN
Vulkan hardware images.
Definition: pixfmt.h:379
TRANSPOSE_CCLOCK
@ TRANSPOSE_CCLOCK
Definition: transpose.h:33
av_pix_fmt_count_planes
int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt)
Definition: pixdesc.c:3005
transpose_vulkan_outputs
static const AVFilterPad transpose_vulkan_outputs[]
Definition: vf_transpose_vulkan.c:257
AVVulkanDeviceContext::alloc
const VkAllocationCallbacks * alloc
Custom memory allocator, else NULL.
Definition: hwcontext_vulkan.h:63
AVFilterContext::priv
void * priv
private data for use by the filter
Definition: avfilter.h:472
fail
#define fail()
Definition: checkasm.h:188
vulkan_filter.h
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_transpose_vulkan.c:134
OFFSET
#define OFFSET(x)
Definition: vf_transpose_vulkan.c:227
TransposeVulkanContext
Definition: vf_transpose_vulkan.c:31
AVRational::num
int num
Numerator.
Definition: rational.h:59
AVFilterPad
A filter pad used for either input or output.
Definition: filters.h:38
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:180
av_cold
#define av_cold
Definition: attributes.h:90
main
int main
Definition: dovi_rpuenc.c:37
FFVulkanContext::output_width
int output_width
Definition: vulkan.h:268
s
#define s(width, name)
Definition: cbs_vp9.c:198
TransposeVulkanContext::sampler
VkSampler sampler
Definition: vf_transpose_vulkan.c:39
TransposeVulkanContext::dir
int dir
Definition: vf_transpose_vulkan.c:41
filters.h
TransposeVulkanContext::qf
FFVkQueueFamilyCtx qf
Definition: vf_transpose_vulkan.c:37
ctx
AVFormatContext * ctx
Definition: movenc.c:49
FFVkSPIRVCompiler::compile_shader
int(* compile_shader)(struct FFVkSPIRVCompiler *ctx, void *avctx, struct FFVkSPIRVShader *shd, uint8_t **data, size_t *size, const char *entrypoint, void **opaque)
Definition: vulkan_spirv.h:29
ff_vk_exec_pool_free
void ff_vk_exec_pool_free(FFVulkanContext *s, FFVkExecPool *pool)
Definition: vulkan.c:238
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: filters.h:263
NULL
#define NULL
Definition: coverity.c:32
av_frame_copy_props
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
Definition: frame.c:712
AVRational
Rational number (pair of numerator and denominator).
Definition: rational.h:58
transpose_vulkan_options
static const AVOption transpose_vulkan_options[]
Definition: vf_transpose_vulkan.c:230
AVFilterContext::inputs
AVFilterLink ** inputs
array of pointers to input links
Definition: avfilter.h:465
ff_vk_filter_config_output
int ff_vk_filter_config_output(AVFilterLink *outlink)
Definition: vulkan_filter.c:219
TransposeVulkanContext::pl
FFVulkanPipeline pl
Definition: vf_transpose_vulkan.c:35
ff_vk_init_compute_pipeline
int ff_vk_init_compute_pipeline(FFVulkanContext *s, FFVulkanPipeline *pl, FFVkSPIRVShader *shd)
Definition: vulkan.c:1751
ff_vk_exec_pool_init
int ff_vk_exec_pool_init(FFVulkanContext *s, FFVkQueueFamilyCtx *qf, FFVkExecPool *pool, int nb_contexts, int nb_queries, VkQueryType query_type, int query_64bit, const void *query_create_pnext)
Allocates/frees an execution pool.
Definition: vulkan.c:278
FFVulkanContext
Definition: vulkan.h:229
ff_vf_transpose_vulkan
const AVFilter ff_vf_transpose_vulkan
Definition: vf_transpose_vulkan.c:265
FFVulkanPipeline
Definition: vulkan.h:132
ff_filter_link
static FilterLink * ff_filter_link(AVFilterLink *link)
Definition: filters.h:197
TransposeVulkanContext::e
FFVkExecPool e
Definition: vf_transpose_vulkan.c:36
FF_FILTER_FLAG_HWFRAME_AWARE
#define FF_FILTER_FLAG_HWFRAME_AWARE
The filter is aware of hardware frames, and any hardware frame context should not be automatically pr...
Definition: filters.h:206
config_props_output
static int config_props_output(AVFilterLink *outlink)
Definition: vf_transpose_vulkan.c:195
ff_vk_shader_init
int ff_vk_shader_init(FFVulkanPipeline *pl, FFVkSPIRVShader *shd, const char *name, VkShaderStageFlags stage, uint32_t required_subgroup_size)
Shader management.
Definition: vulkan.c:1311
planes
static const struct @452 planes[]
TRANSPOSE_PT_TYPE_PORTRAIT
@ TRANSPOSE_PT_TYPE_PORTRAIT
Definition: transpose.h:27
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:368
AVFILTER_DEFINE_CLASS
AVFILTER_DEFINE_CLASS(transpose_vulkan)
FFVulkanDescriptorSetBinding
Definition: vulkan.h:83
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:94
AVFILTER_FLAG_HWDEVICE
#define AVFILTER_FLAG_HWDEVICE
The filter can create hardware frames using AVFilterContext.hw_device_ctx.
Definition: avfilter.h:173
TRANSPOSE_PT_TYPE_NONE
@ TRANSPOSE_PT_TYPE_NONE
Definition: transpose.h:25
size
int size
Definition: twinvq_data.h:10344
FFVkQueueFamilyCtx
Definition: vulkan.h:110
AVERROR_EXTERNAL
#define AVERROR_EXTERNAL
Generic error in an external library.
Definition: error.h:59
TransposeVulkanContext::shd
FFVkSPIRVShader shd
Definition: vf_transpose_vulkan.c:38
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:252
FFVkSPIRVCompiler
Definition: vulkan_spirv.h:27
uninit
static void uninit(AVBSFContext *ctx)
Definition: pcm_rechunk.c:68
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:256
DUP_SAMPLER
#define DUP_SAMPLER(x)
Definition: vulkan.h:73
ff_vk_shader_rep_fmt
const char * ff_vk_shader_rep_fmt(enum AVPixelFormat pixfmt)
Returns the format to use for images in shaders.
Definition: vulkan.c:1171
TRANSPOSE_CLOCK
@ TRANSPOSE_CLOCK
Definition: transpose.h:32
vulkan_spirv.h
AVFilterPad::name
const char * name
Pad name.
Definition: filters.h:44
GLSLF
#define GLSLF(N, S,...)
Definition: vulkan.h:54
FFVkSPIRVCompiler::free_shader
void(* free_shader)(struct FFVkSPIRVCompiler *ctx, void **opaque)
Definition: vulkan_spirv.h:32
transpose_vulkan_inputs
static const AVFilterPad transpose_vulkan_inputs[]
Definition: vf_transpose_vulkan.c:248
AVFilter
Filter definition.
Definition: avfilter.h:201
ff_vk_pipeline_descriptor_set_add
int ff_vk_pipeline_descriptor_set_add(FFVulkanContext *s, FFVulkanPipeline *pl, FFVkSPIRVShader *shd, FFVulkanDescriptorSetBinding *desc, int nb, int singular, int print_to_shader_only)
Add descriptor to a pipeline.
Definition: vulkan.c:1429
FFVulkanContext::vkfn
FFVulkanFunctions vkfn
Definition: vulkan.h:233
FFVkExecPool
Definition: vulkan.h:211
pos
unsigned int pos
Definition: spdifenc.c:414
AVFrame::sample_aspect_ratio
AVRational sample_aspect_ratio
Sample aspect ratio for the video frame, 0/1 if unknown/unspecified.
Definition: frame.h:487
TRANSPOSE_CCLOCK_FLIP
@ TRANSPOSE_CCLOCK_FLIP
Definition: transpose.h:31
TransposeVulkanContext::passthrough
int passthrough
Definition: vf_transpose_vulkan.c:42
random_seed.h
FFVkSPIRVShader
Definition: vulkan.h:75
AVRational::den
int den
Denominator.
Definition: rational.h:60
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition: opt.h:259
init_filter
static av_cold int init_filter(AVFilterContext *ctx, AVFrame *in)
Definition: vf_transpose_vulkan.c:45
transpose.h
FLAGS
#define FLAGS
Definition: vf_transpose_vulkan.c:228
AVFilterContext
An instance of a filter.
Definition: avfilter.h:457
TRANSPOSE_PT_TYPE_LANDSCAPE
@ TRANSPOSE_PT_TYPE_LANDSCAPE
Definition: transpose.h:26
desc
const char * desc
Definition: libsvtav1.c:79
GLSLC
#define GLSLC(N, S)
Definition: vulkan.h:44
ff_vk_filter_config_input
int ff_vk_filter_config_input(AVFilterLink *inlink)
Definition: vulkan_filter.c:186
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
FFVulkanContext::hwctx
AVVulkanDeviceContext * hwctx
Definition: vulkan.h:257
AVVulkanDeviceContext::act_dev
VkDevice act_dev
Active device.
Definition: hwcontext_vulkan.h:84
ff_vk_init_sampler
int ff_vk_init_sampler(FFVulkanContext *s, VkSampler *sampler, int unnorm_coords, VkFilter filt)
Create a sampler.
Definition: vulkan.c:1126
ff_vk_exec_pipeline_register
int ff_vk_exec_pipeline_register(FFVulkanContext *s, FFVkExecPool *pool, FFVulkanPipeline *pl)
Register a pipeline with an exec pool.
Definition: vulkan.c:1543
av_log
#define av_log(a,...)
Definition: tableprint_vlc.h:27
ff_vk_shader_free
void ff_vk_shader_free(FFVulkanContext *s, FFVkSPIRVShader *shd)
Definition: vulkan.c:1370
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
Definition: opt.h:299
FILTER_SINGLE_PIXFMT
#define FILTER_SINGLE_PIXFMT(pix_fmt_)
Definition: filters.h:252
RET
#define RET(x)
Definition: vulkan.h:67
FFVulkanFunctions
Definition: vulkan_functions.h:249