FFmpeg
vulkan_prores.c
Go to the documentation of this file.
1 /*
2  * This file is part of FFmpeg.
3  *
4  * FFmpeg is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * FFmpeg is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with FFmpeg; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 #include "proresdec.h"
20 #include "vulkan_decode.h"
21 #include "hwaccel_internal.h"
22 #include "libavutil/mem.h"
23 #include "libavutil/vulkan.h"
24 #include "libavutil/vulkan_spirv.h"
25 
26 extern const char *ff_source_common_comp;
27 extern const char *ff_source_prores_reset_comp;
28 extern const char *ff_source_prores_vld_comp;
29 extern const char *ff_source_prores_idct_comp;
30 
33  .queue_flags = VK_QUEUE_COMPUTE_BIT,
34 };
35 
36 typedef struct ProresVulkanDecodePicture {
38 
40 
41  uint32_t bitstream_start;
42  uint32_t bitstream_size;
43  uint32_t slice_num;
44 
47 
48 typedef struct ProresVulkanDecodeContext {
52 
55 
56 typedef struct ProresVkParameters {
57  VkDeviceAddress slice_data;
58  uint32_t bitstream_size;
59 
60  uint16_t width;
61  uint16_t height;
62  uint16_t mb_width;
63  uint16_t mb_height;
64  uint16_t slice_width;
65  uint16_t slice_height;
67  uint8_t log2_chroma_w;
68  uint8_t depth;
69  uint8_t alpha_info;
70  uint8_t bottom_field;
71 
72  uint8_t qmat_luma [64];
73  uint8_t qmat_chroma[64];
75 
77  const AVBufferRef *buffer_ref,
78  av_unused const uint8_t *buffer,
79  av_unused uint32_t size)
80 {
81  ProresContext *pr = avctx->priv_data;
84  ProresVulkanDecodeContext *pv = ctx->sd_ctx;
86  FFVulkanDecodePicture *vp = &pp->vp;
87 
88  int err;
89 
90  pp->slice_offsets_sz = (pr->slice_count + 1) * sizeof(uint32_t);
91  pp->mb_params_sz = pr->mb_width * pr->mb_height * sizeof(uint8_t);
92 
93  /* Host map the input slices data if supported */
94  if (!vp->slices_buf && ctx->s.extensions & FF_VK_EXT_EXTERNAL_HOST_MEMORY)
95  RET(ff_vk_host_map_buffer(&ctx->s, &vp->slices_buf, buffer_ref->data,
96  buffer_ref,
97  VK_BUFFER_USAGE_STORAGE_BUFFER_BIT |
98  VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT));
99 
100  /* Allocate slice offsets buffer */
102  &pp->metadata_buf,
103  VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
105  VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT |
106  VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT));
107 
108  /* Prepare frame to be used */
109  RET(ff_vk_decode_prepare_frame_sdr(dec, pr->frame, vp, 1,
110  FF_VK_REP_NATIVE, 0));
111 
112  pp->slice_num = 0;
113  pp->bitstream_start = pp->bitstream_size = 0;
114 
115 fail:
116  return err;
117 }
118 
120  const uint8_t *data,
121  uint32_t size)
122 {
123  ProresContext *pr = avctx->priv_data;
125  FFVulkanDecodePicture *vp = &pp->vp;
126 
127  FFVkBuffer *slice_offset = (FFVkBuffer *)pp->metadata_buf->data;
128  FFVkBuffer *slices_buf = vp->slices_buf ? (FFVkBuffer *)vp->slices_buf->data : NULL;
129 
130  /* Skip picture header */
131  if (slices_buf && slices_buf->host_ref && !pp->slice_num)
132  pp->bitstream_size = data - slices_buf->mapped_mem;
133 
134  AV_WN32(slice_offset->mapped_mem + (pp->slice_num + 0) * sizeof(uint32_t),
135  pp->bitstream_size);
136  AV_WN32(slice_offset->mapped_mem + (pp->slice_num + 1) * sizeof(uint32_t),
137  pp->bitstream_size += size);
138 
139  if (!slices_buf || !slices_buf->host_ref) {
140  int err = ff_vk_decode_add_slice(avctx, vp, data, size, 0,
141  &pp->slice_num, NULL);
142  if (err < 0)
143  return err;
144  } else {
145  pp->slice_num++;
146  }
147 
148  return 0;
149 }
150 
152 {
153  ProresContext *pr = avctx->priv_data;
156  FFVulkanFunctions *vk = &ctx->s.vkfn;
157  ProresVulkanDecodeContext *pv = ctx->sd_ctx;
159  FFVulkanDecodePicture *vp = &pp->vp;
160 
162  FFVkBuffer *slice_data, *metadata;
163  VkImageMemoryBarrier2 img_bar[AV_NUM_DATA_POINTERS];
164  VkBufferMemoryBarrier2 buf_bar[2];
165  int nb_img_bar = 0, nb_buf_bar = 0, err;
166  const AVPixFmtDescriptor *pix_desc;
167 
168  if (!pp->slice_num)
169  return 0;
170 
171  pix_desc = av_pix_fmt_desc_get(avctx->sw_pix_fmt);
172  if (!pix_desc)
173  return AVERROR(EINVAL);
174 
175  slice_data = (FFVkBuffer *)vp->slices_buf->data;
177 
178  pd = (ProresVkParameters) {
179  .slice_data = slice_data->address,
180  .bitstream_size = pp->bitstream_size,
181 
182  .width = avctx->width,
183  .height = avctx->height,
184  .mb_width = pr->mb_width,
185  .mb_height = pr->mb_height,
186  .slice_width = pr->slice_count / pr->mb_height,
187  .slice_height = pr->mb_height,
188  .log2_slice_width = av_log2(pr->slice_mb_width),
189  .log2_chroma_w = pix_desc->log2_chroma_w,
190  .depth = avctx->bits_per_raw_sample,
191  .alpha_info = pr->alpha_info,
192  .bottom_field = pr->first_field ^ (pr->frame_type == 1),
193  };
194 
195  memcpy(pd.qmat_luma, pr->qmat_luma, sizeof(pd.qmat_luma ));
196  memcpy(pd.qmat_chroma, pr->qmat_chroma, sizeof(pd.qmat_chroma));
197 
198  FFVkExecContext *exec = ff_vk_exec_get(&ctx->s, &ctx->exec_pool);
199  RET(ff_vk_exec_start(&ctx->s, exec));
200 
201  /* Prepare deps */
202  RET(ff_vk_exec_add_dep_frame(&ctx->s, exec, pr->frame,
203  VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT,
204  VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT));
205 
206  RET(ff_vk_exec_mirror_sem_value(&ctx->s, exec, &vp->sem, &vp->sem_value,
207  pr->frame));
208 
209  /* Transfer ownership to the exec context */
210  RET(ff_vk_exec_add_dep_buf(&ctx->s, exec, &vp->slices_buf, 1, 0));
211  vp->slices_buf = NULL;
212  RET(ff_vk_exec_add_dep_buf(&ctx->s, exec, &pp->metadata_buf, 1, 0));
213  pp->metadata_buf = NULL;
214 
215  /* Input barrier */
216  ff_vk_frame_barrier(&ctx->s, exec, pr->frame, img_bar, &nb_img_bar,
217  VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT,
218  VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT,
219  VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT,
220  VK_IMAGE_LAYOUT_GENERAL,
221  VK_QUEUE_FAMILY_IGNORED);
222 
223  buf_bar[nb_buf_bar++] = (VkBufferMemoryBarrier2) {
224  .sType = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2,
225  .srcStageMask = metadata->stage,
226  .dstStageMask = VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT,
227  .srcAccessMask = metadata->access,
228  .dstAccessMask = VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT,
229  .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED,
230  .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED,
231  .buffer = metadata->buf,
232  .offset = pp->slice_offsets_sz,
233  .size = pp->mb_params_sz,
234  };
235  metadata->stage = buf_bar[0].dstStageMask;
236  metadata->access = buf_bar[0].dstAccessMask;
237 
238  vk->CmdPipelineBarrier2(exec->buf, &(VkDependencyInfo) {
239  .sType = VK_STRUCTURE_TYPE_DEPENDENCY_INFO,
240  .pBufferMemoryBarriers = buf_bar,
241  .bufferMemoryBarrierCount = nb_buf_bar,
242  .pImageMemoryBarriers = img_bar,
243  .imageMemoryBarrierCount = nb_img_bar,
244  });
245  nb_img_bar = nb_buf_bar = 0;
246 
247  /* Reset */
248  ff_vk_shader_update_img_array(&ctx->s, exec, &pv->reset,
249  pr->frame, vp->view.out,
250  0, 0,
251  VK_IMAGE_LAYOUT_GENERAL,
252  VK_NULL_HANDLE);
253 
254  ff_vk_exec_bind_shader(&ctx->s, exec, &pv->reset);
255  ff_vk_shader_update_push_const(&ctx->s, exec, &pv->reset,
256  VK_SHADER_STAGE_COMPUTE_BIT,
257  0, sizeof(pd), &pd);
258 
259  vk->CmdDispatch(exec->buf, pr->mb_width << 1, pr->mb_height << 1, 1);
260 
261  /* Input frame barrier after reset */
262  ff_vk_frame_barrier(&ctx->s, exec, pr->frame, img_bar, &nb_img_bar,
263  VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT,
264  VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT,
265  VK_ACCESS_SHADER_WRITE_BIT,
266  VK_IMAGE_LAYOUT_GENERAL,
267  VK_QUEUE_FAMILY_IGNORED);
268 
269  vk->CmdPipelineBarrier2(exec->buf, &(VkDependencyInfo) {
270  .sType = VK_STRUCTURE_TYPE_DEPENDENCY_INFO,
271  .pBufferMemoryBarriers = buf_bar,
272  .bufferMemoryBarrierCount = nb_buf_bar,
273  .pImageMemoryBarriers = img_bar,
274  .imageMemoryBarrierCount = nb_img_bar,
275  });
276  nb_img_bar = nb_buf_bar = 0;
277 
278  /* Entropy decode */
279  ff_vk_shader_update_desc_buffer(&ctx->s, exec, &pv->vld,
280  0, 0, 0,
281  metadata, 0,
282  pp->slice_offsets_sz,
283  VK_FORMAT_UNDEFINED);
284  ff_vk_shader_update_desc_buffer(&ctx->s, exec, &pv->vld,
285  0, 1, 0,
287  pp->mb_params_sz,
288  VK_FORMAT_UNDEFINED);
289  ff_vk_shader_update_img_array(&ctx->s, exec, &pv->vld,
290  pr->frame, vp->view.out,
291  0, 2,
292  VK_IMAGE_LAYOUT_GENERAL,
293  VK_NULL_HANDLE);
294 
295  ff_vk_exec_bind_shader(&ctx->s, exec, &pv->vld);
296  ff_vk_shader_update_push_const(&ctx->s, exec, &pv->vld,
297  VK_SHADER_STAGE_COMPUTE_BIT,
298  0, sizeof(pd), &pd);
299 
300  vk->CmdDispatch(exec->buf, AV_CEIL_RSHIFT(pr->slice_count / pr->mb_height, 3), AV_CEIL_RSHIFT(pr->mb_height, 3),
301  3 + !!pr->alpha_info);
302 
303  /* Synchronize vld and idct shaders */
304  ff_vk_frame_barrier(&ctx->s, exec, pr->frame, img_bar, &nb_img_bar,
305  VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT,
306  VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT,
307  VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT,
308  VK_IMAGE_LAYOUT_GENERAL,
309  VK_QUEUE_FAMILY_IGNORED);
310 
311  buf_bar[nb_buf_bar++] = (VkBufferMemoryBarrier2) {
312  .sType = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2,
313  .srcStageMask = metadata->stage,
314  .dstStageMask = VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT,
315  .srcAccessMask = metadata->access,
316  .dstAccessMask = VK_ACCESS_2_SHADER_STORAGE_READ_BIT,
317  .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED,
318  .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED,
319  .buffer = metadata->buf,
320  .offset = pp->slice_offsets_sz,
321  .size = pp->mb_params_sz,
322  };
323  metadata->stage = buf_bar[0].dstStageMask;
324  metadata->access = buf_bar[0].dstAccessMask;
325 
326  vk->CmdPipelineBarrier2(exec->buf, &(VkDependencyInfo) {
327  .sType = VK_STRUCTURE_TYPE_DEPENDENCY_INFO,
328  .pBufferMemoryBarriers = buf_bar,
329  .bufferMemoryBarrierCount = nb_buf_bar,
330  .pImageMemoryBarriers = img_bar,
331  .imageMemoryBarrierCount = nb_img_bar,
332  });
333  nb_img_bar = nb_buf_bar = 0;
334 
335  /* Inverse transform */
336  ff_vk_shader_update_desc_buffer(&ctx->s, exec, &pv->idct,
337  0, 0, 0,
339  pp->mb_params_sz,
340  VK_FORMAT_UNDEFINED);
341  ff_vk_shader_update_img_array(&ctx->s, exec, &pv->idct,
342  pr->frame, vp->view.out,
343  0, 1,
344  VK_IMAGE_LAYOUT_GENERAL,
345  VK_NULL_HANDLE);
346 
347  ff_vk_exec_bind_shader(&ctx->s, exec, &pv->idct);
348  ff_vk_shader_update_push_const(&ctx->s, exec, &pv->idct,
349  VK_SHADER_STAGE_COMPUTE_BIT,
350  0, sizeof(pd), &pd);
351 
352  vk->CmdDispatch(exec->buf, AV_CEIL_RSHIFT(pr->mb_width, 1), pr->mb_height, 3);
353 
354  RET(ff_vk_exec_submit(&ctx->s, exec));
355 
356 fail:
357  return err;
358 }
359 
361 {
362  GLSLC(0, layout(push_constant, scalar) uniform pushConstants { );
363  GLSLC(1, u8buf slice_data; );
364  GLSLC(1, uint bitstream_size; );
365  GLSLC(0, );
366  GLSLC(1, uint16_t width; );
367  GLSLC(1, uint16_t height; );
368  GLSLC(1, uint16_t mb_width; );
369  GLSLC(1, uint16_t mb_height; );
370  GLSLC(1, uint16_t slice_width; );
371  GLSLC(1, uint16_t slice_height; );
372  GLSLC(1, uint8_t log2_slice_width; );
373  GLSLC(1, uint8_t log2_chroma_w; );
374  GLSLC(1, uint8_t depth; );
375  GLSLC(1, uint8_t alpha_info; );
376  GLSLC(1, uint8_t bottom_field; );
377  GLSLC(0, );
378  GLSLC(1, uint8_t qmat_luma [8*8]; );
379  GLSLC(1, uint8_t qmat_chroma[8*8]; );
380  GLSLC(0, }; );
381 
382  return ff_vk_shader_add_push_const(shd, 0, sizeof(ProresVkParameters),
383  VK_SHADER_STAGE_COMPUTE_BIT);
384 }
385 
387  FFVkExecPool *pool, FFVkSPIRVCompiler *spv,
388  FFVulkanShader *shd, const char *name, const char *entrypoint,
389  FFVulkanDescriptorSetBinding *descs, int num_descs,
390  const char *source, int local_size, int interlaced)
391 {
392  uint8_t *spv_data;
393  size_t spv_len;
394  void *spv_opaque = NULL;
395  int err;
396 
397  RET(ff_vk_shader_init(s, shd, name,
398  VK_SHADER_STAGE_COMPUTE_BIT,
399  (const char *[]) { "GL_EXT_buffer_reference",
400  "GL_EXT_buffer_reference2" }, 2,
401  local_size >> 16 & 0xff, local_size >> 8 & 0xff, local_size >> 0 & 0xff,
402  0));
403 
404  av_bprintf(&shd->src, "#define GET_BITS_SMEM\n");
405 
406  if (interlaced)
407  av_bprintf(&shd->src, "#define INTERLACED\n");
408 
409  /* Common code */
411 
412  /* Push constants layout */
413  RET(add_push_data(shd));
414 
415  RET(ff_vk_shader_add_descriptor_set(s, shd, descs, num_descs, 0, 0));
416 
417  /* Main code */
418  GLSLD(source);
419 
420  RET(spv->compile_shader(s, spv, shd, &spv_data, &spv_len, entrypoint,
421  &spv_opaque));
422  RET(ff_vk_shader_link(s, shd, spv_data, spv_len, entrypoint));
423 
424  RET(ff_vk_shader_register_exec(s, pool, shd));
425 
426 fail:
427  if (spv_opaque)
428  spv->free_shader(spv, &spv_opaque);
429 
430  return 0;
431 }
432 
434 {
435  ProresVulkanDecodeContext *pv = ctx->sd_ctx;
436 
437  ff_vk_shader_free(&ctx->s, &pv->reset);
438  ff_vk_shader_free(&ctx->s, &pv->vld);
439  ff_vk_shader_free(&ctx->s, &pv->idct);
440 
442 
443  av_freep(&pv);
444 }
445 
447 {
450  ProresContext *pr = avctx->priv_data;
451 
452  AVHWFramesContext *out_frames_ctx;
454  FFVkSPIRVCompiler *spv;
456  int max_num_mbs, err;
457 
458  max_num_mbs = (avctx->coded_width >> 4) * (avctx->coded_height >> 4);
459 
460  spv = ff_vk_spirv_init();
461  if (!spv) {
462  av_log(avctx, AV_LOG_ERROR, "Unable to initialize SPIR-V compiler!\n");
463  return AVERROR_EXTERNAL;
464  }
465 
466  err = ff_vk_decode_init(avctx);
467  if (err < 0)
468  return err;
469  ctx = dec->shared_ctx;
470 
471  pv = ctx->sd_ctx = av_mallocz(sizeof(*pv));
472  if (!pv) {
473  err = AVERROR(ENOMEM);
474  goto fail;
475  }
476 
477  out_frames_ctx = (AVHWFramesContext *)avctx->hw_frames_ctx->data;
478 
479  ctx->sd_ctx_free = vk_decode_prores_uninit;
480 
481  desc_set = (FFVulkanDescriptorSetBinding []) {
482  {
483  .name = "dst",
484  .type = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE,
485  .dimensions = 2,
486  .mem_layout = ff_vk_shader_rep_fmt(out_frames_ctx->sw_format,
488  .mem_quali = "writeonly",
489  .elems = av_pix_fmt_count_planes(out_frames_ctx->sw_format),
490  .stages = VK_SHADER_STAGE_COMPUTE_BIT,
491  },
492  };
493  RET(init_shader(avctx, &ctx->s, &ctx->exec_pool, spv, &pv->reset,
494  "prores_dec_reset", "main", desc_set, 1,
495  ff_source_prores_reset_comp, 0x080801, pr->frame_type != 0));
496 
497  desc_set = (FFVulkanDescriptorSetBinding []) {
498  {
499  .name = "slice_offsets_buf",
500  .type = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
501  .stages = VK_SHADER_STAGE_COMPUTE_BIT,
502  .mem_quali = "readonly",
503  .buf_content = "uint32_t slice_offsets",
504  .buf_elems = max_num_mbs + 1,
505  },
506  {
507  .name = "quant_idx_buf",
508  .type = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
509  .stages = VK_SHADER_STAGE_COMPUTE_BIT,
510  .mem_quali = "writeonly",
511  .buf_content = "uint8_t quant_idx",
512  .buf_elems = max_num_mbs,
513  },
514  {
515  .name = "dst",
516  .type = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE,
517  .dimensions = 2,
518  .mem_layout = ff_vk_shader_rep_fmt(out_frames_ctx->sw_format,
520  .mem_quali = "writeonly",
521  .elems = av_pix_fmt_count_planes(out_frames_ctx->sw_format),
522  .stages = VK_SHADER_STAGE_COMPUTE_BIT,
523  },
524  };
525  RET(init_shader(avctx, &ctx->s, &ctx->exec_pool, spv, &pv->vld,
526  "prores_dec_vld", "main", desc_set, 3,
527  ff_source_prores_vld_comp, 0x080801, pr->frame_type != 0));
528 
529  desc_set = (FFVulkanDescriptorSetBinding []) {
530  {
531  .name = "quant_idx_buf",
532  .type = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
533  .stages = VK_SHADER_STAGE_COMPUTE_BIT,
534  .mem_quali = "readonly",
535  .buf_content = "uint8_t quant_idx",
536  .buf_elems = max_num_mbs,
537  },
538  {
539  .name = "dst",
540  .type = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE,
541  .dimensions = 2,
542  .mem_layout = ff_vk_shader_rep_fmt(out_frames_ctx->sw_format,
544  .elems = av_pix_fmt_count_planes(out_frames_ctx->sw_format),
545  .stages = VK_SHADER_STAGE_COMPUTE_BIT,
546  },
547  };
548  RET(init_shader(avctx, &ctx->s, &ctx->exec_pool, spv, &pv->idct,
549  "prores_dec_idct", "main", desc_set, 2,
550  ff_source_prores_idct_comp, 0x200201, pr->frame_type != 0));
551 
552  err = 0;
553 
554 fail:
555  spv->uninit(&spv);
556 
557  return err;
558 }
559 
561 {
562  AVHWDeviceContext *dev_ctx = _hwctx.nc;
564 
565  ff_vk_decode_free_frame(dev_ctx, &pp->vp);
566 
568 }
569 
571  .p.name = "prores_vulkan",
572  .p.type = AVMEDIA_TYPE_VIDEO,
573  .p.id = AV_CODEC_ID_PRORES,
574  .p.pix_fmt = AV_PIX_FMT_VULKAN,
575  .start_frame = &vk_prores_start_frame,
576  .decode_slice = &vk_prores_decode_slice,
577  .end_frame = &vk_prores_end_frame,
578  .free_frame_priv = &vk_prores_free_frame_priv,
579  .frame_priv_data_size = sizeof(ProresVulkanDecodePicture),
582  .decode_params = &ff_vk_params_invalidate,
585  .frame_params = &ff_vk_frame_params,
586  .priv_data_size = sizeof(FFVulkanDecodeContext),
588 };
name
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
Definition: writing_filters.txt:88
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
ProresVkParameters::bottom_field
uint8_t bottom_field
Definition: vulkan_prores.c:70
ProresVkParameters::qmat_luma
uint8_t qmat_luma[64]
Definition: vulkan_prores.c:72
ff_vk_shader_free
void ff_vk_shader_free(FFVulkanContext *s, FFVulkanShader *shd)
Free a shader.
Definition: vulkan.c:2961
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:2093
AVBufferPool
The buffer pool.
Definition: buffer_internal.h:88
ff_vk_decode_prepare_frame_sdr
int ff_vk_decode_prepare_frame_sdr(FFVulkanDecodeContext *dec, AVFrame *pic, FFVulkanDecodePicture *vkpic, int is_current, enum FFVkShaderRepFormat rep_fmt, int alloc_dpb)
Software-defined decoder version of ff_vk_decode_prepare_frame.
Definition: vulkan_decode.c:247
ProresContext::hwaccel_picture_private
void * hwaccel_picture_private
Definition: proresdec.h:47
av_pix_fmt_desc_get
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
Definition: pixdesc.c:3456
AVBufferRef::data
uint8_t * data
The data buffer.
Definition: buffer.h:90
FFVulkanDecodeContext::shared_ctx
FFVulkanDecodeShared * shared_ctx
Definition: vulkan_decode.h:57
RET
#define RET(x)
Definition: vulkan.h:66
ProresVulkanDecodePicture::slice_num
uint32_t slice_num
Definition: vulkan_prores.c:43
AVRefStructOpaque
RefStruct is an API for creating reference-counted objects with minimal overhead.
Definition: refstruct.h:58
ProresVkParameters::bitstream_size
uint32_t bitstream_size
Definition: vulkan_prores.c:58
AVRefStructOpaque::nc
void * nc
Definition: refstruct.h:59
av_unused
#define av_unused
Definition: attributes.h:151
FFHWAccel::p
AVHWAccel p
The public AVHWAccel.
Definition: hwaccel_internal.h:38
vk_prores_free_frame_priv
static void vk_prores_free_frame_priv(AVRefStructOpaque _hwctx, void *data)
Definition: vulkan_prores.c:560
ProresVkParameters::log2_slice_width
uint8_t log2_slice_width
Definition: vulkan_prores.c:66
FFVulkanShader::src
AVBPrint src
Definition: vulkan.h:195
data
const char data[16]
Definition: mxf.c:149
FFVulkanDecodeDescriptor::codec_id
enum AVCodecID codec_id
Definition: vulkan_decode.h:30
ProresContext
Definition: proresdec.h:43
vk_prores_end_frame
static int vk_prores_end_frame(AVCodecContext *avctx)
Definition: vulkan_prores.c:151
ProresVkParameters
Definition: vulkan_prores.c:56
ProresVulkanDecodeContext::vld
FFVulkanShader vld
Definition: vulkan_prores.c:50
ff_source_prores_vld_comp
const char * ff_source_prores_vld_comp
FFVkBuffer::address
VkDeviceAddress address
Definition: vulkan.h:92
ff_vk_exec_get
FFVkExecContext * ff_vk_exec_get(FFVulkanContext *s, FFVkExecPool *pool)
Retrieve an execution pool.
Definition: vulkan.c:547
FF_VK_REP_NATIVE
@ FF_VK_REP_NATIVE
Definition: vulkan.h:406
FFVkSPIRVCompiler::uninit
void(* uninit)(struct FFVkSPIRVCompiler **ctx)
Definition: vulkan_spirv.h:32
FFVulkanDecodeContext
Definition: vulkan_decode.h:56
ProresContext::slice_count
int slice_count
number of slices in the current picture
Definition: proresdec.h:52
ProresVkParameters::alpha_info
uint8_t alpha_info
Definition: vulkan_prores.c:69
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:779
ProresContext::slice_mb_width
unsigned slice_mb_width
maximum width of a slice in mb
Definition: proresdec.h:55
ProresVkParameters::slice_height
uint16_t slice_height
Definition: vulkan_prores.c:65
av_pix_fmt_count_planes
int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt)
Definition: pixdesc.c:3496
FFHWAccel
Definition: hwaccel_internal.h:34
fail
#define fail()
Definition: checkasm.h:210
FFVulkanDecodePicture::sem_value
uint64_t sem_value
Definition: vulkan_decode.h:87
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:2838
ProresVulkanDecodePicture::bitstream_start
uint32_t bitstream_start
Definition: vulkan_prores.c:41
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:2050
HWACCEL_CAP_THREAD_SAFE
#define HWACCEL_CAP_THREAD_SAFE
Definition: hwaccel_internal.h:32
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:2601
proresdec.h
ff_vk_host_map_buffer
int ff_vk_host_map_buffer(FFVulkanContext *s, AVBufferRef **dst, uint8_t *src_data, const AVBufferRef *src_buf, VkBufferUsageFlags usage)
Maps a system RAM buffer into a Vulkan buffer.
Definition: vulkan.c:1392
ff_vk_shader_add_descriptor_set
int ff_vk_shader_add_descriptor_set(FFVulkanContext *s, FFVulkanShader *shd, FFVulkanDescriptorSetBinding *desc, int nb, int singular, int print_to_shader_only)
Add descriptor to a shader.
Definition: vulkan.c:2465
ProresVulkanDecodePicture
Definition: vulkan_prores.c:36
AVCodecContext::coded_height
int coded_height
Definition: avcodec.h:607
FFVulkanDecodeShared
Definition: vulkan_decode.h:38
ProresVulkanDecodeContext
Definition: vulkan_prores.c:48
AVHWDeviceContext
This struct aggregates all the (hardware/vendor-specific) "high-level" state, i.e.
Definition: hwcontext.h:63
GLSLC
#define GLSLC(N, S)
Definition: vulkan.h:43
ProresContext::first_field
int first_field
Definition: proresdec.h:60
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:210
vk_prores_start_frame
static int vk_prores_start_frame(AVCodecContext *avctx, const AVBufferRef *buffer_ref, av_unused const uint8_t *buffer, av_unused uint32_t size)
Definition: vulkan_prores.c:76
s
#define s(width, name)
Definition: cbs_vp9.c:198
FFVulkanDecodePicture
Definition: vulkan_decode.h:75
ff_source_prores_reset_comp
const char * ff_source_prores_reset_comp
ff_vk_exec_mirror_sem_value
int ff_vk_exec_mirror_sem_value(FFVulkanContext *s, FFVkExecContext *e, VkSemaphore *dst, uint64_t *dst_val, AVFrame *f)
Definition: vulkan.c:878
ProresVulkanDecodeContext::idct
FFVulkanShader idct
Definition: vulkan_prores.c:51
AV_CEIL_RSHIFT
#define AV_CEIL_RSHIFT(a, b)
Definition: common.h:60
FFVulkanDecodePicture::view
struct FFVulkanDecodePicture::@326 view
ProresContext::qmat_luma
uint8_t qmat_luma[64]
Definition: proresdec.h:49
ProresVkParameters::width
uint16_t width
Definition: vulkan_prores.c:60
ProresVkParameters::height
uint16_t height
Definition: vulkan_prores.c:61
vk_prores_decode_slice
static int vk_prores_decode_slice(AVCodecContext *avctx, const uint8_t *data, uint32_t size)
Definition: vulkan_prores.c:119
AVCodecContext::bits_per_raw_sample
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
Definition: avcodec.h:1553
ctx
AVFormatContext * ctx
Definition: movenc.c:49
ff_vk_exec_add_dep_buf
int ff_vk_exec_add_dep_buf(FFVulkanContext *s, FFVkExecContext *e, AVBufferRef **deps, int nb_deps, int ref)
Execution dependency management.
Definition: vulkan.c:619
GLSLD
#define GLSLD(D)
Definition: vulkan.h:58
AVPixFmtDescriptor::log2_chroma_w
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
Definition: pixdesc.h:80
av_mallocz
#define av_mallocz(s)
Definition: tableprint_vlc.h:31
vk_decode_prores_init
static int vk_decode_prores_init(AVCodecContext *avctx)
Definition: vulkan_prores.c:446
HWACCEL_CAP_ASYNC_SAFE
#define HWACCEL_CAP_ASYNC_SAFE
Header providing the internals of AVHWAccel.
Definition: hwaccel_internal.h:31
ff_vk_shader_rep_fmt
const char * ff_vk_shader_rep_fmt(enum AVPixelFormat pix_fmt, enum FFVkShaderRepFormat rep_fmt)
Definition: vulkan.c:1626
ProresVulkanDecodePicture::mb_params_sz
uint32_t mb_params_sz
Definition: vulkan_prores.c:45
metadata
Stream codec metadata
Definition: ogg-flac-chained-meta.txt:2
NULL
#define NULL
Definition: coverity.c:32
AVHWFramesContext::sw_format
enum AVPixelFormat sw_format
The pixel format identifying the actual data layout of the hardware frames.
Definition: hwcontext.h:213
av_buffer_unref
void av_buffer_unref(AVBufferRef **buf)
Free a given reference and automatically free the buffer if there are no more references to it.
Definition: buffer.c:139
hwaccel_internal.h
ff_vk_decode_free_frame
void ff_vk_decode_free_frame(AVHWDeviceContext *dev_ctx, FFVulkanDecodePicture *vp)
Free a frame and its state.
Definition: vulkan_decode.c:617
ProresVkParameters::mb_width
uint16_t mb_width
Definition: vulkan_prores.c:62
AVCodecContext::internal
struct AVCodecInternal * internal
Private context used for internal data.
Definition: avcodec.h:466
av_buffer_pool_uninit
void av_buffer_pool_uninit(AVBufferPool **ppool)
Mark the pool as being available for freeing.
Definition: buffer.c:328
ff_vk_decode_uninit
int ff_vk_decode_uninit(AVCodecContext *avctx)
Free decoder.
Definition: vulkan_decode.c:1215
flush
void(* flush)(AVBSFContext *ctx)
Definition: dts2pts.c:552
ProresVulkanDecodePicture::bitstream_size
uint32_t bitstream_size
Definition: vulkan_prores.c:42
FFVkBuffer::mapped_mem
uint8_t * mapped_mem
Definition: vulkan.h:100
FFVulkanContext
Definition: vulkan.h:274
ff_vk_frame_params
int ff_vk_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)
Initialize hw_frames_ctx with the parameters needed to decode the stream using the parameters from av...
Definition: vulkan_decode.c:1089
source
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a source
Definition: filter_design.txt:256
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:550
ff_vk_shader_update_push_const
void ff_vk_shader_update_push_const(FFVulkanContext *s, FFVkExecContext *e, FFVulkanShader *shd, VkShaderStageFlagBits stage, int offset, size_t size, void *src)
Update push constant in a shader.
Definition: vulkan.c:2917
FFVulkanDescriptorSetBinding
Definition: vulkan.h:74
height
#define height
Definition: dsp.h:89
ProresVulkanDecodePicture::slice_offsets_sz
uint32_t slice_offsets_sz
Definition: vulkan_prores.c:45
AV_WN32
#define AV_WN32(p, v)
Definition: intreadwrite.h:372
AVCodecInternal::hwaccel_priv_data
void * hwaccel_priv_data
hwaccel-specific private data
Definition: internal.h:130
vulkan.h
size
int size
Definition: twinvq_data.h:10344
AV_NUM_DATA_POINTERS
#define AV_NUM_DATA_POINTERS
Definition: frame.h:428
FFVulkanShader
Definition: vulkan.h:190
FFVkSPIRVCompiler::compile_shader
int(* compile_shader)(FFVulkanContext *s, struct FFVkSPIRVCompiler *ctx, FFVulkanShader *shd, uint8_t **data, size_t *size, const char *entrypoint, void **opaque)
Definition: vulkan_spirv.h:28
AVERROR_EXTERNAL
#define AVERROR_EXTERNAL
Generic error in an external library.
Definition: error.h:59
FFVkExecContext
Definition: vulkan.h:111
ff_vk_shader_update_desc_buffer
int ff_vk_shader_update_desc_buffer(FFVulkanContext *s, FFVkExecContext *e, FFVulkanShader *shd, int set, int bind, int elem, FFVkBuffer *buf, VkDeviceSize offset, VkDeviceSize len, VkFormat fmt)
Update a descriptor in a buffer with a buffer.
Definition: vulkan.c:2851
FFVulkanDescriptorSetBinding::name
const char * name
Definition: vulkan.h:75
ProresVkParameters::log2_chroma_w
uint8_t log2_chroma_w
Definition: vulkan_prores.c:67
ff_prores_vulkan_hwaccel
const FFHWAccel ff_prores_vulkan_hwaccel
Definition: vulkan_prores.c:570
FFVkSPIRVCompiler
Definition: vulkan_spirv.h:26
AVHWAccel::name
const char * name
Name of the hardware accelerated codec.
Definition: avcodec.h:1949
layout
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 layout
Definition: filter_design.txt:18
ProresContext::mb_width
unsigned mb_width
width of the current picture in mb
Definition: proresdec.h:53
FF_VK_EXT_EXTERNAL_HOST_MEMORY
#define FF_VK_EXT_EXTERNAL_HOST_MEMORY
Definition: vulkan_functions.h:36
interlaced
uint8_t interlaced
Definition: mxfenc.c:2334
uninit
static void uninit(AVBSFContext *ctx)
Definition: pcm_rechunk.c:68
FFVulkanDecodePicture::out
VkImageView out[AV_NUM_DATA_POINTERS]
Definition: vulkan_decode.h:80
ProresVkParameters::depth
uint8_t depth
Definition: vulkan_prores.c:68
ff_vk_exec_start
int ff_vk_exec_start(FFVulkanContext *s, FFVkExecContext *e)
Start/submit/wait an execution.
Definition: vulkan.c:559
ff_vk_shader_link
int ff_vk_shader_link(FFVulkanContext *s, FFVulkanShader *shd, uint8_t *spirv, size_t spirv_len, const char *entrypoint)
Link a shader into an executable.
Definition: vulkan.c:2390
FFVulkanDecodePicture::sem
VkSemaphore sem
Definition: vulkan_decode.h:86
vulkan_spirv.h
AVCodecContext::height
int height
Definition: avcodec.h:592
FFVkSPIRVCompiler::free_shader
void(* free_shader)(struct FFVkSPIRVCompiler *ctx, void **opaque)
Definition: vulkan_spirv.h:31
ff_vk_exec_bind_shader
void ff_vk_exec_bind_shader(FFVulkanContext *s, FFVkExecContext *e, FFVulkanShader *shd)
Bind a shader.
Definition: vulkan.c:2927
AVCodecContext::hw_frames_ctx
AVBufferRef * hw_frames_ctx
A reference to the AVHWFramesContext describing the input (for encoding) or output (decoding) frames.
Definition: avcodec.h:1453
AVHWFramesContext
This struct describes a set or pool of "hardware" frames (i.e.
Definition: hwcontext.h:118
ff_vk_decode_flush
void ff_vk_decode_flush(AVCodecContext *avctx)
Flush decoder.
Definition: vulkan_decode.c:375
ff_source_common_comp
const char * ff_source_common_comp
ff_vk_dec_prores_desc
const FFVulkanDecodeDescriptor ff_vk_dec_prores_desc
Definition: vulkan_prores.c:31
FFVkExecPool
Definition: vulkan.h:252
ff_vk_decode_add_slice
int ff_vk_decode_add_slice(AVCodecContext *avctx, FFVulkanDecodePicture *vp, const uint8_t *data, size_t size, int add_startcode, uint32_t *nb_slices, const uint32_t **offsets)
Add slice data to frame.
Definition: vulkan_decode.c:294
ProresVulkanDecodeContext::reset
FFVulkanShader reset
Definition: vulkan_prores.c:49
av_bprintf
void av_bprintf(AVBPrint *buf, const char *fmt,...)
Definition: bprint.c:122
ff_vk_shader_add_push_const
int ff_vk_shader_add_push_const(FFVulkanShader *shd, int offset, int size, VkShaderStageFlagBits stage)
Add/update push constants for execution.
Definition: vulkan.c:1490
FFVkExecContext::buf
VkCommandBuffer buf
Definition: vulkan.h:122
ProresContext::frame_type
int frame_type
0 = progressive, 1 = tff, 2 = bff
Definition: proresdec.h:48
AVCodecContext
main external API structure.
Definition: avcodec.h:431
ProresContext::qmat_chroma
uint8_t qmat_chroma[64]
Definition: proresdec.h:50
add_push_data
static int add_push_data(FFVulkanShader *shd)
Definition: vulkan_prores.c:360
buffer
the frame and frame reference mechanism is intended to as much as expensive copies of that data while still allowing the filters to produce correct results The data is stored in buffers represented by AVFrame structures Several references can point to the same frame buffer
Definition: filter_design.txt:49
update_thread_context
the pkt_dts and pkt_pts fields in AVFrame will work as usual Restrictions on codec whose streams don t reset across will not work because their bitstreams cannot be decoded in parallel *The contents of buffers must not be read before as well as code calling up to before the decode process starts Call have update_thread_context() run it in the next thread. Add AV_CODEC_CAP_FRAME_THREADS to the codec capabilities. There will be very little speed gain at this point but it should work. Use ff_thread_get_buffer()(or ff_progress_frame_get_buffer() in case you have inter-frame dependencies and use the ProgressFrame API) to allocate frame buffers. Call ff_progress_frame_report() after some part of the current picture has decoded. A good place to put this is where draw_horiz_band() is called - add this if it isn 't called anywhere
ProresVkParameters::slice_width
uint16_t slice_width
Definition: vulkan_prores.c:64
FFVulkanDecodeDescriptor
Definition: vulkan_decode.h:29
ff_vk_params_invalidate
int ff_vk_params_invalidate(AVCodecContext *avctx, int t, const uint8_t *b, uint32_t s)
Removes current session parameters to recreate them.
Definition: vulkan_decode.c:152
ProresVulkanDecodePicture::metadata_buf
AVBufferRef * metadata_buf
Definition: vulkan_prores.c:39
ff_vk_update_thread_context
int ff_vk_update_thread_context(AVCodecContext *dst, const AVCodecContext *src)
Synchronize the contexts between 2 threads.
Definition: vulkan_decode.c:134
AVCodecContext::coded_width
int coded_width
Bitstream width / height, may be different from width/height e.g.
Definition: avcodec.h:607
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:200
ProresVkParameters::mb_height
uint16_t mb_height
Definition: vulkan_prores.c:63
FFVulkanDecodePicture::slices_buf
AVBufferRef * slices_buf
Definition: vulkan_decode.h:101
mem.h
AVBufferRef
A reference to a data buffer.
Definition: buffer.h:82
ProresVulkanDecodePicture::vp
FFVulkanDecodePicture vp
Definition: vulkan_prores.c:37
ff_source_prores_idct_comp
const char * ff_source_prores_idct_comp
ProresVulkanDecodeContext::metadata_pool
AVBufferPool * metadata_pool
Definition: vulkan_prores.c:53
AVPixFmtDescriptor
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
Definition: pixdesc.h:69
vulkan_decode.h
ProresVkParameters::qmat_chroma
uint8_t qmat_chroma[64]
Definition: vulkan_prores.c:73
AVCodecContext::priv_data
void * priv_data
Definition: avcodec.h:458
ProresVkParameters::slice_data
VkDeviceAddress slice_data
Definition: vulkan_prores.c:57
av_freep
#define av_freep(p)
Definition: tableprint_vlc.h:35
FFVkBuffer
Definition: vulkan.h:87
AVCodecContext::width
int width
picture width / height.
Definition: avcodec.h:592
ff_vk_exec_submit
int ff_vk_exec_submit(FFVulkanContext *s, FFVkExecContext *e)
Definition: vulkan.c:904
av_log
#define av_log(a,...)
Definition: tableprint_vlc.h:27
ff_vk_decode_init
int ff_vk_decode_init(AVCodecContext *avctx)
Initialize decoder.
Definition: vulkan_decode.c:1267
ProresContext::frame
AVFrame * frame
Definition: proresdec.h:46
AVCodecContext::sw_pix_fmt
enum AVPixelFormat sw_pix_fmt
Nominal unaccelerated pixel format, see AV_PIX_FMT_xxx.
Definition: avcodec.h:638
width
#define width
Definition: dsp.h:89
init_shader
static int init_shader(AVCodecContext *avctx, FFVulkanContext *s, FFVkExecPool *pool, FFVkSPIRVCompiler *spv, FFVulkanShader *shd, const char *name, const char *entrypoint, FFVulkanDescriptorSetBinding *descs, int num_descs, const char *source, int local_size, int interlaced)
Definition: vulkan_prores.c:386
av_log2
int av_log2(unsigned v)
Definition: intmath.c:26
FFVulkanFunctions
Definition: vulkan_functions.h:277
vk_decode_prores_uninit
static void vk_decode_prores_uninit(FFVulkanDecodeShared *ctx)
Definition: vulkan_prores.c:433
ff_vk_get_pooled_buffer
int ff_vk_get_pooled_buffer(FFVulkanContext *ctx, AVBufferPool **buf_pool, AVBufferRef **buf, VkBufferUsageFlags usage, void *create_pNext, size_t size, VkMemoryPropertyFlagBits mem_props)
Initialize a pool and create AVBufferRefs containing FFVkBuffer.
Definition: vulkan.c:1285
ProresContext::alpha_info
int alpha_info
Definition: proresdec.h:61
AV_CODEC_ID_PRORES
@ AV_CODEC_ID_PRORES
Definition: codec_id.h:200
ProresContext::mb_height
unsigned mb_height
height of the current picture in mb
Definition: proresdec.h:54