FFmpeg
ops.c
Go to the documentation of this file.
1 /**
2  * Copyright (C) 2026 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 #include "../ops_internal.h"
22 #include "../swscale_internal.h"
23 #include "libavutil/mem.h"
24 #include "ops.h"
25 
27 {
29  FFVulkanOpsCtx *s = c->hw_priv;
30  if (!s)
31  return;
32 
33 #if CONFIG_LIBSHADERC || CONFIG_LIBGLSLANG
34  if (s->spvc)
35  s->spvc->uninit(&s->spvc);
36 #endif
37  ff_vk_exec_pool_free(&s->vkctx, &s->e);
38  ff_vk_uninit(&s->vkctx);
39  av_freep(&c->hw_priv);
40 }
41 
43 {
44  int err;
46 
47  if (!c->hw_priv) {
48  c->hw_priv = av_mallocz(sizeof(FFVulkanOpsCtx));
49  if (!c->hw_priv)
50  return AVERROR(ENOMEM);
51  }
52 
53  FFVulkanOpsCtx *s = c->hw_priv;
54  if (s->vkctx.device_ref && s->vkctx.device_ref->data != dev_ref->data) {
55  /* Reinitialize with new context */
56  ff_vk_exec_pool_free(&s->vkctx, &s->e);
57  ff_vk_uninit(&s->vkctx);
58  } else if (s->vkctx.device_ref && s->vkctx.device_ref->data == dev_ref->data) {
59  return 0;
60  }
61 
62  err = ff_vk_init(&s->vkctx, sws, dev_ref, NULL);
63  if (err < 0)
64  return err;
65 
66  s->qf = ff_vk_qf_find(&s->vkctx, VK_QUEUE_COMPUTE_BIT, 0);
67  if (!s->qf) {
68  av_log(sws, AV_LOG_ERROR, "Device has no compute queues\n");
69  return AVERROR(ENOTSUP);
70  }
71 
72  err = ff_vk_exec_pool_init(&s->vkctx, s->qf, &s->e, 1,
73  0, 0, 0, NULL);
74  if (err < 0)
75  return err;
76 
77 #if CONFIG_LIBSHADERC || CONFIG_LIBGLSLANG
78  if (!s->spvc) {
79  s->spvc = ff_vk_spirv_init();
80  if (!s->spvc)
81  return AVERROR(ENOMEM);
82  }
83 #endif
84 
85  return 0;
86 }
87 
88 typedef struct VulkanPriv {
93 } VulkanPriv;
94 
95 static void process(const SwsOpExec *exec, const void *priv,
96  int x_start, int y_start, int x_end, int y_end)
97 {
98  VulkanPriv *p = (VulkanPriv *)priv;
99  FFVkExecContext *ec = ff_vk_exec_get(&p->s->vkctx, &p->s->e);
100  FFVulkanFunctions *vk = &p->s->vkctx.vkfn;
101  ff_vk_exec_start(&p->s->vkctx, ec);
102 
103  AVFrame *src_f = (AVFrame *) exec->in_frame->avframe;
104  AVFrame *dst_f = (AVFrame *) exec->out_frame->avframe;
105  ff_vk_exec_add_dep_frame(&p->s->vkctx, ec, src_f,
106  VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT,
107  VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT);
108  ff_vk_exec_add_dep_frame(&p->s->vkctx, ec, dst_f,
109  VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT,
110  VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT);
111 
112  VkImageView src_views[AV_NUM_DATA_POINTERS];
113  VkImageView dst_views[AV_NUM_DATA_POINTERS];
114  ff_vk_create_imageviews(&p->s->vkctx, ec, src_views, src_f, p->src_rep);
115  ff_vk_create_imageviews(&p->s->vkctx, ec, dst_views, dst_f, p->dst_rep);
116 
117  ff_vk_shader_update_img_array(&p->s->vkctx, ec, &p->shd, src_f, src_views,
118  0, 0, VK_IMAGE_LAYOUT_GENERAL, VK_NULL_HANDLE);
119  ff_vk_shader_update_img_array(&p->s->vkctx, ec, &p->shd, dst_f, dst_views,
120  0, 1, VK_IMAGE_LAYOUT_GENERAL, VK_NULL_HANDLE);
121 
122  int nb_img_bar = 0;
123  VkImageMemoryBarrier2 img_bar[8];
124  ff_vk_frame_barrier(&p->s->vkctx, ec, src_f, img_bar, &nb_img_bar,
125  VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT,
126  VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT,
127  VK_ACCESS_SHADER_READ_BIT,
128  VK_IMAGE_LAYOUT_GENERAL,
129  VK_QUEUE_FAMILY_IGNORED);
130  ff_vk_frame_barrier(&p->s->vkctx, ec, dst_f, img_bar, &nb_img_bar,
131  VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT,
132  VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT,
133  VK_ACCESS_SHADER_WRITE_BIT,
134  VK_IMAGE_LAYOUT_GENERAL,
135  VK_QUEUE_FAMILY_IGNORED);
136  vk->CmdPipelineBarrier2(ec->buf, &(VkDependencyInfo) {
137  .sType = VK_STRUCTURE_TYPE_DEPENDENCY_INFO,
138  .pImageMemoryBarriers = img_bar,
139  .imageMemoryBarrierCount = nb_img_bar,
140  });
141 
142  ff_vk_exec_bind_shader(&p->s->vkctx, ec, &p->shd);
143 
144  vk->CmdDispatch(ec->buf,
145  FFALIGN(src_f->width, p->shd.lg_size[0])/p->shd.lg_size[0],
146  FFALIGN(src_f->height, p->shd.lg_size[1])/p->shd.lg_size[1],
147  1);
148 
149  ff_vk_exec_submit(&p->s->vkctx, ec);
150  ff_vk_exec_wait(&p->s->vkctx, ec);
151 }
152 
153 static void free_fn(void *priv)
154 {
155  VulkanPriv *p = priv;
156  ff_vk_shader_free(&p->s->vkctx, &p->shd);
157  av_free(priv);
158 }
159 
160 #if CONFIG_LIBSHADERC || CONFIG_LIBGLSLANG
161 static int add_ops_glsl(VulkanPriv *p, FFVulkanOpsCtx *s,
162  SwsOpList *ops, FFVulkanShader *shd)
163 {
164  int err;
165  uint8_t *spv_data;
166  size_t spv_len;
167  void *spv_opaque = NULL;
168 
169  /* Interlaced formats are not currently supported */
170  if (ops->src.interlaced || ops->dst.interlaced)
171  return AVERROR(ENOTSUP);
172 
173  err = ff_vk_shader_init(&s->vkctx, shd, "sws_pass",
174  VK_SHADER_STAGE_COMPUTE_BIT,
175  NULL, 0, 32, 32, 1, 0);
176  if (err < 0)
177  return err;
178 
179  int nb_desc = 0;
180  FFVulkanDescriptorSetBinding buf_desc[8];
181 
182  for (int n = 0; n < ops->num_ops; n++) {
183  const SwsOp *op = &ops->ops[n];
184  /* Set initial type */
185  if (op->op == SWS_OP_READ || op->op == SWS_OP_WRITE ||
186  op->op == SWS_OP_CLEAR) {
187  if (op->rw.frac)
188  return AVERROR(ENOTSUP);
189  }
190  if (op->op == SWS_OP_READ || op->op == SWS_OP_WRITE) {
191  const char *img_type = op->type == SWS_PIXEL_F32 ? "rgba32f" :
192  op->type == SWS_PIXEL_U32 ? "rgba32ui" :
193  op->type == SWS_PIXEL_U16 ? "rgba16ui" :
194  "rgba8ui";
195  buf_desc[nb_desc++] = (FFVulkanDescriptorSetBinding) {
196  .name = op->op == SWS_OP_WRITE ? "dst_img" : "src_img",
197  .type = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE,
198  .mem_layout = img_type,
199  .mem_quali = op->op == SWS_OP_WRITE ? "writeonly" : "readonly",
200  .dimensions = 2,
201  .elems = (op->rw.packed ? 1 : op->rw.elems),
202  .stages = VK_SHADER_STAGE_COMPUTE_BIT,
203  };
204  if (op->op == SWS_OP_READ)
205  p->src_rep = op->type == SWS_PIXEL_F32 ? FF_VK_REP_FLOAT :
207  else
208  p->dst_rep = op->type == SWS_PIXEL_F32 ? FF_VK_REP_FLOAT :
210  }
211  }
212 
213  ff_vk_shader_add_descriptor_set(&s->vkctx, shd, buf_desc, nb_desc, 0, 0);
214 
215  GLSLC(0, void main() );
216  GLSLC(0, { );
217  GLSLC(1, ivec2 pos = ivec2(gl_GlobalInvocationID.xy); );
218  GLSLC(1, ivec2 size = imageSize(src_img[0]); );
219  GLSLC(1, if (any(greaterThanEqual(pos, size))) );
220  GLSLC(2, return; );
221  GLSLC(0, );
222  GLSLC(1, u8vec4 u8; );
223  GLSLC(1, u16vec4 u16; );
224  GLSLC(1, u32vec4 u32; );
225  GLSLC(1, f32vec4 f32; );
226  GLSLC(0, );
227 
228  const char *type_name = ff_sws_pixel_type_name(ops->ops[0].type);
229  for (int n = 0; n < ops->num_ops; n++) {
230  const SwsOp *op = &ops->ops[n];
231  const char *type_v = op->type == SWS_PIXEL_F32 ? "f32vec4" :
232  op->type == SWS_PIXEL_U32 ? "u32vec4" :
233  op->type == SWS_PIXEL_U16 ? "u16vec4" : "u8vec4";
234  const char *type_s = op->type == SWS_PIXEL_F32 ? "float" :
235  op->type == SWS_PIXEL_U32 ? "uint32_t" :
236  op->type == SWS_PIXEL_U16 ? "uint16_t" : "uint8_t";
237  switch (op->op) {
238  case SWS_OP_READ: {
239  if (op->rw.packed) {
240  GLSLF(1, %s = %s(imageLoad(src_img[0], pos)); ,
241  type_name, type_v);
242  } else {
243  for (int i = 0; i < (op->rw.packed ? 1 : op->rw.elems); i++)
244  GLSLF(1, %s.%c = %s(imageLoad(src_img[%i], pos)[0]); ,
245  type_name, "xyzw"[i], type_s, i);
246  }
247  break;
248  }
249  case SWS_OP_WRITE: {
250  if (op->rw.packed) {
251  GLSLF(1, imageStore(dst_img[0], pos, %s(%s)); ,
252  type_v, type_name);
253  } else {
254  for (int i = 0; i < (op->rw.packed ? 1 : op->rw.elems); i++)
255  GLSLF(1, imageStore(dst_img[%i], pos, %s(%s[%i])); ,
256  i, type_v, type_name, i);
257  }
258  break;
259  }
260  case SWS_OP_SWIZZLE: {
261  av_bprintf(&shd->src, " %s = %s.", type_name, type_name);
262  for (int i = 0; i < 4; i++)
263  av_bprintf(&shd->src, "%c", "xyzw"[op->swizzle.in[i]]);
264  av_bprintf(&shd->src, ";\n");
265  break;
266  }
267  case SWS_OP_CLEAR: {
268  for (int i = 0; i < 4; i++) {
269  if (!op->c.q4[i].den)
270  continue;
271  av_bprintf(&shd->src, " %s.%c = %s(%i/%i%s);\n", type_name,
272  "xyzw"[i], type_s, op->c.q4[i].num, op->c.q4[i].den,
273  op->type == SWS_PIXEL_F32 ? ".0f" : "");
274  }
275  break;
276  }
277  default:
278  return AVERROR(ENOTSUP);
279  }
280  }
281 
282  GLSLC(0, } );
283 
284  err = s->spvc->compile_shader(&s->vkctx, s->spvc, shd,
285  &spv_data, &spv_len, "main",
286  &spv_opaque);
287  if (err < 0)
288  return err;
289 
290  err = ff_vk_shader_link(&s->vkctx, shd, spv_data, spv_len, "main");
291 
292  if (spv_opaque)
293  s->spvc->free_shader(s->spvc, &spv_opaque);
294 
295  if (err < 0)
296  return err;
297 
298  return 0;
299 }
300 #endif
301 
303 {
304  int err;
306  FFVulkanOpsCtx *s = c->hw_priv;
307  if (!s)
308  return AVERROR(ENOTSUP);
309 
310  VulkanPriv p = {
311  .s = s,
312  };
313 
314 #if CONFIG_LIBSHADERC || CONFIG_LIBGLSLANG
315  {
316  err = add_ops_glsl(&p, s, ops, &p.shd);
317  if (err < 0)
318  return err;
319  }
320 #else
321  return AVERROR(ENOTSUP);
322 #endif
323 
324  err = ff_vk_shader_register_exec(&s->vkctx, &s->e, &p.shd);
325  if (err < 0)
326  return err;
327 
328  *out = (SwsCompiledOp) {
329  .slice_align = 0,
330  .block_size = 1,
331  .func = process,
332  .priv = av_memdup(&p, sizeof(p)),
333  .free = free_fn,
334  };
335  return 0;
336 }
337 
339  .name = "vulkan",
340  .compile = compile,
341  .hw_format = AV_PIX_FMT_VULKAN,
342 };
SWS_OP_READ
@ SWS_OP_READ
Definition: ops.h:47
SWS_PIXEL_U16
@ SWS_PIXEL_U16
Definition: ops.h:33
FFVulkanOpsCtx
Copyright (C) 2026 Lynne.
Definition: ops.h:31
SWS_OP_SWIZZLE
@ SWS_OP_SWIZZLE
Definition: ops.h:50
VulkanPriv::src_rep
enum FFVkShaderRepFormat src_rep
Definition: ops.c:91
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
ff_vk_shader_free
void ff_vk_shader_free(FFVulkanContext *s, FFVulkanShader *shd)
Free a shader.
Definition: vulkan.c:2791
ff_vk_shader_init
int ff_vk_shader_init(FFVulkanContext *s, FFVulkanShader *shd, const char *name, VkPipelineStageFlags stage, const char *extensions[], int nb_extensions, int lg_x, int lg_y, int lg_z, uint32_t required_subgroup_size)
Initialize a shader object, with a specific set of extensions, type+bind, local group size,...
Definition: vulkan.c:2103
out
static FILE * out
Definition: movenc.c:55
SwsFormat::interlaced
int interlaced
Definition: format.h:79
AVBufferRef::data
uint8_t * data
The data buffer.
Definition: buffer.h:90
SWS_OP_CLEAR
@ SWS_OP_CLEAR
Definition: ops.h:59
ff_vk_exec_pool_init
int ff_vk_exec_pool_init(FFVulkanContext *s, AVVulkanDeviceQueueFamily *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:357
process
static void process(const SwsOpExec *exec, const void *priv, int x_start, int y_start, int x_end, int y_end)
Definition: ops.c:95
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:427
backend_vulkan
const SwsOpBackend backend_vulkan
Definition: ops.c:338
AVFrame::width
int width
Definition: frame.h:499
FFVulkanShader::src
AVBPrint src
Definition: vulkan.h:234
VulkanPriv::s
FFVulkanOpsCtx * s
Definition: ops.c:89
ff_vk_init
int ff_vk_init(FFVulkanContext *s, void *log_parent, AVBufferRef *device_ref, AVBufferRef *frames_ref)
Initializes the AVClass, in case this context is not used as the main user's context.
Definition: vulkan.c:2829
ff_vk_exec_get
FFVkExecContext * ff_vk_exec_get(FFVulkanContext *s, FFVkExecPool *pool)
Retrieve an execution pool.
Definition: vulkan.c:548
SWS_PIXEL_U32
@ SWS_PIXEL_U32
Definition: ops.h:34
ff_vk_uninit
void ff_vk_uninit(FFVulkanContext *s)
Frees main context.
Definition: vulkan.c:2817
ff_vk_exec_bind_shader
void ff_vk_exec_bind_shader(FFVulkanContext *s, FFVkExecContext *e, const FFVulkanShader *shd)
Bind a shader.
Definition: vulkan.c:2768
SwsOpBackend::name
const char * name
Definition: ops_internal.h:120
AV_PIX_FMT_VULKAN
@ AV_PIX_FMT_VULKAN
Vulkan hardware images.
Definition: pixfmt.h:379
ff_vk_exec_add_dep_frame
int ff_vk_exec_add_dep_frame(FFVulkanContext *s, FFVkExecContext *e, AVFrame *f, VkPipelineStageFlagBits2 wait_stage, VkPipelineStageFlagBits2 signal_stage)
Definition: vulkan.c:780
FFVkShaderRepFormat
FFVkShaderRepFormat
Returns the format to use for images in shaders.
Definition: vulkan.h:447
av_memdup
void * av_memdup(const void *p, size_t size)
Duplicate a buffer with av_malloc().
Definition: mem.c:304
compile
static int compile(SwsContext *sws, SwsOpList *ops, SwsCompiledOp *out)
Definition: ops.c:302
SWS_PIXEL_F32
@ SWS_PIXEL_F32
Definition: ops.h:35
SwsOpList::num_ops
int num_ops
Definition: ops.h:224
ff_vk_shader_update_img_array
void ff_vk_shader_update_img_array(FFVulkanContext *s, FFVkExecContext *e, FFVulkanShader *shd, AVFrame *f, VkImageView *views, int set, int binding, VkImageLayout layout, VkSampler sampler)
Update a descriptor in a buffer with an image array.
Definition: vulkan.c:2719
ff_vk_frame_barrier
void ff_vk_frame_barrier(FFVulkanContext *s, FFVkExecContext *e, AVFrame *pic, VkImageMemoryBarrier2 *bar, int *nb_bar, VkPipelineStageFlags2 src_stage, VkPipelineStageFlags2 dst_stage, VkAccessFlagBits2 new_access, VkImageLayout new_layout, uint32_t new_qf)
Definition: vulkan.c:2031
ff_vk_shader_register_exec
int ff_vk_shader_register_exec(FFVulkanContext *s, FFVkExecPool *pool, FFVulkanShader *shd)
Register a shader with an exec pool.
Definition: vulkan.c:2584
GLSLC
#define GLSLC(N, S)
Definition: vulkan.h:45
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:210
main
int main
Definition: dovi_rpuenc.c:38
ff_sws_vk_init
int ff_sws_vk_init(SwsContext *sws, AVBufferRef *dev_ref)
Definition: ops.c:42
s
#define s(width, name)
Definition: cbs_vp9.c:198
op
static int op(uint8_t **dst, const uint8_t *dst_end, GetByteContext *gb, int pixel, int count, int *x, int width, int linesize)
Perform decode operation.
Definition: anm.c:76
ops.h
SwsOpExec::out_frame
const SwsFrame * out_frame
Definition: ops_internal.h:85
ff_vk_exec_wait
void ff_vk_exec_wait(FFVulkanContext *s, FFVkExecContext *e)
Definition: vulkan.c:553
FF_VK_REP_FLOAT
@ FF_VK_REP_FLOAT
Definition: vulkan.h:451
ff_vk_exec_pool_free
void ff_vk_exec_pool_free(FFVulkanContext *s, FFVkExecPool *pool)
Definition: vulkan.c:299
av_mallocz
#define av_mallocz(s)
Definition: tableprint_vlc.h:31
ff_sws_vk_uninit
void ff_sws_vk_uninit(SwsContext *sws)
Copyright (C) 2026 Lynne.
Definition: ops.c:26
SwsOpBackend
Definition: ops_internal.h:119
SwsOpExec
Global execution context for all compiled functions.
Definition: ops_internal.h:60
NULL
#define NULL
Definition: coverity.c:32
ff_vk_shader_link
int ff_vk_shader_link(FFVulkanContext *s, FFVulkanShader *shd, const char *spirv, size_t spirv_len, const char *entrypoint)
Link a shader into an executable.
Definition: vulkan.c:2357
c
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
Definition: undefined.txt:32
FFVulkanDescriptorSetBinding
Definition: vulkan.h:112
i
#define i(width, name, range_min, range_max)
Definition: cbs_h264.c:63
SwsOp::type
SwsPixelType type
Definition: ops.h:188
size
int size
Definition: twinvq_data.h:10344
AV_NUM_DATA_POINTERS
#define AV_NUM_DATA_POINTERS
Definition: frame.h:428
VulkanPriv::dst_rep
enum FFVkShaderRepFormat dst_rep
Definition: ops.c:92
SwsOpList::src
SwsFormat src
Definition: ops.h:227
FFVulkanShader
Definition: vulkan.h:225
SWS_OP_WRITE
@ SWS_OP_WRITE
Definition: ops.h:48
FFVkExecContext
Definition: vulkan.h:145
FFVulkanDescriptorSetBinding::name
const char * name
Definition: vulkan.h:113
sws
static SwsContext * sws[3]
Definition: swscale.c:73
ff_vk_exec_start
int ff_vk_exec_start(FFVulkanContext *s, FFVkExecContext *e)
Start/submit/wait an execution.
Definition: vulkan.c:560
FF_VK_REP_UINT
@ FF_VK_REP_UINT
Definition: vulkan.h:455
SwsOpList::ops
SwsOp * ops
Definition: ops.h:223
VulkanPriv
Definition: ops.c:88
SwsFrame::avframe
const AVFrame * avframe
Pointer to the original AVFrame, if there is a 1:1 correspondence.
Definition: format.h:202
SwsOp
Definition: ops.h:186
SwsOpExec::in_frame
const SwsFrame * in_frame
Definition: ops_internal.h:84
SwsInternal
Definition: swscale_internal.h:334
ff_vk_create_imageviews
int ff_vk_create_imageviews(FFVulkanContext *s, FFVkExecContext *e, VkImageView views[AV_NUM_DATA_POINTERS], AVFrame *f, enum FFVkShaderRepFormat rep_fmt)
Create an imageview and add it as a dependency to an execution.
Definition: vulkan.c:1948
SwsOpList::dst
SwsFormat dst
Definition: ops.h:227
SwsCompiledOp
Definition: ops_internal.h:105
pos
unsigned int pos
Definition: spdifenc.c:414
av_bprintf
void av_bprintf(AVBPrint *buf, const char *fmt,...)
Definition: bprint.c:122
ff_vk_qf_find
AVVulkanDeviceQueueFamily * ff_vk_qf_find(FFVulkanContext *s, VkQueueFlagBits dev_family, VkVideoCodecOperationFlagBitsKHR vid_ops)
Chooses an appropriate QF.
Definition: vulkan.c:286
FFVkExecContext::buf
VkCommandBuffer buf
Definition: vulkan.h:156
AVFrame::height
int height
Definition: frame.h:499
ff_vk_shader_add_descriptor_set
int ff_vk_shader_add_descriptor_set(FFVulkanContext *s, FFVulkanShader *shd, const FFVulkanDescriptorSetBinding *desc, int nb, int singular, int print_to_shader_only)
Add descriptor to a shader.
Definition: vulkan.c:2484
GLSLF
#define GLSLF(N, S,...)
Definition: vulkan.h:55
ff_sws_pixel_type_name
const char * ff_sws_pixel_type_name(SwsPixelType type)
Definition: ops.c:54
VulkanPriv::shd
FFVulkanShader shd
Definition: ops.c:90
Windows::Graphics::DirectX::Direct3D11::p
IDirect3DDxgiInterfaceAccess _COM_Outptr_ void ** p
Definition: vsrc_gfxcapture_winrt.hpp:53
free_fn
static void free_fn(void *priv)
Definition: ops.c:153
mem.h
AVBufferRef
A reference to a data buffer.
Definition: buffer.h:82
av_free
#define av_free(p)
Definition: tableprint_vlc.h:34
FFALIGN
#define FFALIGN(x, a)
Definition: macros.h:78
av_freep
#define av_freep(p)
Definition: tableprint_vlc.h:35
ff_vk_exec_submit
int ff_vk_exec_submit(FFVulkanContext *s, FFVkExecContext *e)
Definition: vulkan.c:905
av_log
#define av_log(a,...)
Definition: tableprint_vlc.h:27
sws_internal
static SwsInternal * sws_internal(const SwsContext *sws)
Definition: swscale_internal.h:78
SwsOpList
Helper struct for representing a list of operations.
Definition: ops.h:222
SwsContext
Main external API structure.
Definition: swscale.h:191
FFVulkanFunctions
Definition: vulkan_functions.h:274