FFmpeg
vulkan_av1.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 "av1dec.h"
20 
21 #include "vulkan_decode.h"
22 
23 /* Maximum number of tiles specified by any defined level */
24 #define MAX_TILES 256
25 
26 const VkExtensionProperties ff_vk_dec_av1_ext = {
29 };
30 
31 typedef struct AV1VulkanDecodePicture {
33 
34  /* Workaround for a spec issue.
35  *Can be removed once no longer needed, and threading can be enabled. */
37 
40  const uint32_t *tile_offsets;
41 
42  /* Current picture */
46 
47  /* Picture refs */
50 
51  uint8_t frame_id_set;
52  uint8_t frame_id;
54 
55 static int vk_av1_fill_pict(AVCodecContext *avctx, const AV1Frame **ref_src,
56  VkVideoReferenceSlotInfoKHR *ref_slot, /* Main structure */
57  VkVideoPictureResourceInfoKHR *ref, /* Goes in ^ */
58  VkVideoDecodeAV1DpbSlotInfoMESA *vkav1_ref, /* Goes in ^ */
59  const AV1Frame *pic, int is_current, int has_grain,
60  int dpb_slot_index)
61 {
64  FFVulkanDecodePicture *vkpic = &hp->vp;
65 
66  int err = ff_vk_decode_prepare_frame(dec, pic->f, vkpic, is_current,
67  has_grain || dec->dedicated_dpb);
68  if (err < 0)
69  return err;
70 
71  *vkav1_ref = (VkVideoDecodeAV1DpbSlotInfoMESA) {
73  .frameIdx = hp->frame_id,
74  };
75 
76  for (unsigned i = 0; i < 7; i++) {
77  const int idx = pic->raw_frame_header->ref_frame_idx[i];
78  vkav1_ref->ref_order_hint[i] = pic->raw_frame_header->ref_order_hint[idx];
79  }
80 
82 
83  *ref = (VkVideoPictureResourceInfoKHR) {
84  .sType = VK_STRUCTURE_TYPE_VIDEO_PICTURE_RESOURCE_INFO_KHR,
85  .codedOffset = (VkOffset2D){ 0, 0 },
86  .codedExtent = (VkExtent2D){ pic->f->width, pic->f->height },
87  .baseArrayLayer = ((has_grain || dec->dedicated_dpb) && dec->layered_dpb) ?
88  dpb_slot_index : 0,
89  .imageViewBinding = vkpic->img_view_ref,
90  };
91 
92  *ref_slot = (VkVideoReferenceSlotInfoKHR) {
93  .sType = VK_STRUCTURE_TYPE_VIDEO_REFERENCE_SLOT_INFO_KHR,
94  .pNext = vkav1_ref,
95  .slotIndex = dpb_slot_index,
96  .pPictureResource = ref,
97  };
98 
99  if (ref_src)
100  *ref_src = pic;
101 
102  return 0;
103 }
104 
106 {
107  const AV1DecContext *s = avctx->priv_data;
110 
111  const AV1RawSequenceHeader *seq = s->raw_seq;
112 
113  StdVideoAV1MESASequenceHeader av1_sequence_header;
116  VkVideoSessionParametersCreateInfoKHR session_params_create;
117 
118  int err;
119 
120  av1_sequence_header = (StdVideoAV1MESASequenceHeader) {
123  .reduced_still_picture_header = seq->reduced_still_picture_header,
124  .use_128x128_superblock = seq->use_128x128_superblock,
125  .enable_filter_intra = seq->enable_filter_intra,
126  .enable_intra_edge_filter = seq->enable_intra_edge_filter,
127  .enable_interintra_compound = seq->enable_interintra_compound,
128  .enable_masked_compound = seq->enable_masked_compound,
129  .enable_warped_motion = seq->enable_warped_motion,
130  .enable_dual_filter = seq->enable_dual_filter,
131  .enable_order_hint = seq->enable_order_hint,
132  .enable_jnt_comp = seq->enable_jnt_comp,
133  .enable_ref_frame_mvs = seq->enable_ref_frame_mvs,
134  .frame_id_numbers_present_flag = seq->frame_id_numbers_present_flag,
135  .enable_superres = seq->enable_superres,
136  .enable_cdef = seq->enable_cdef,
137  .enable_restoration = seq->enable_restoration,
138  .film_grain_params_present = seq->film_grain_params_present,
139  .timing_info_present_flag = seq->timing_info_present_flag,
140  .initial_display_delay_present_flag = seq->initial_display_delay_present_flag,
141  },
142  .seq_profile = seq->seq_profile,
143  .frame_width_bits_minus_1 = seq->frame_width_bits_minus_1,
144  .frame_height_bits_minus_1 = seq->frame_height_bits_minus_1,
145  .max_frame_width_minus_1 = seq->max_frame_width_minus_1,
146  .max_frame_height_minus_1 = seq->max_frame_height_minus_1,
147  .delta_frame_id_length_minus_2 = seq->delta_frame_id_length_minus_2,
148  .additional_frame_id_length_minus_1 = seq->additional_frame_id_length_minus_1,
149  .order_hint_bits_minus_1 = seq->order_hint_bits_minus_1,
150  .timing_info = (StdVideoAV1MESATimingInfo) {
151  .flags = (StdVideoAV1MESATimingInfoFlags) {
152  .equal_picture_interval = seq->timing_info.equal_picture_interval,
153  },
154  .num_units_in_display_tick = seq->timing_info.num_units_in_display_tick,
155  .time_scale = seq->timing_info.time_scale,
156  .num_ticks_per_picture_minus_1 = seq->timing_info.num_ticks_per_picture_minus_1,
157  },
158  .color_config = (StdVideoAV1MESAColorConfig) {
160  .mono_chrome = seq->color_config.mono_chrome,
161  .color_range = seq->color_config.color_range,
162  .separate_uv_delta_q = seq->color_config.separate_uv_delta_q,
163  },
164  .bit_depth = seq->color_config.twelve_bit ? 12 :
165  seq->color_config.high_bitdepth ? 10 : 8,
166  .subsampling_x = seq->color_config.subsampling_x,
167  .subsampling_y = seq->color_config.subsampling_y,
168  },
169  };
170 
173  .sequence_header = &av1_sequence_header,
174  };
177  .pParametersAddInfo = &av1_params_info,
178  };
179  session_params_create = (VkVideoSessionParametersCreateInfoKHR) {
180  .sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR,
181  .pNext = &av1_params,
182  .videoSession = ctx->common.session,
183  .videoSessionParametersTemplate = VK_NULL_HANDLE,
184  };
185 
186  err = ff_vk_decode_create_params(buf, avctx, ctx, &session_params_create);
187  if (err < 0)
188  return err;
189 
190  av_log(avctx, AV_LOG_DEBUG, "Created frame parameters\n");
191 
192  return 0;
193 }
194 
196  av_unused const uint8_t *buffer,
197  av_unused uint32_t size)
198 {
199  int err;
200  int ref_count = 0;
201  AV1DecContext *s = avctx->priv_data;
202  const AV1Frame *pic = &s->cur_frame;
205  FFVulkanDecodePicture *vp = &ap->vp;
206 
207  const AV1RawFrameHeader *frame_header = s->raw_frame_header;
208  const AV1RawFilmGrainParams *film_grain = &s->cur_frame.film_grain;
209  const int apply_grain = !(avctx->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN) &&
210  film_grain->apply_grain;
211 
212  if (!dec->session_params) {
213  err = vk_av1_create_params(avctx, &dec->session_params);
214  if (err < 0)
215  return err;
216  }
217 
218  if (!ap->frame_id_set) {
219  unsigned slot_idx = 0;
220  for (unsigned i = 0; i < 32; i++) {
221  if (!(dec->frame_id_alloc_mask & (1 << i))) {
222  slot_idx = i;
223  break;
224  }
225  }
226  ap->frame_id = slot_idx;
227  ap->frame_id_set = 1;
228  dec->frame_id_alloc_mask |= (1 << slot_idx);
229  }
230 
231  /* Fill in references */
232  for (int i = 0; i < AV1_NUM_REF_FRAMES; i++) {
233  const AV1Frame *ref_frame = &s->ref[i];
234  if (s->ref[i].f->pict_type == AV_PICTURE_TYPE_NONE)
235  continue;
236 
237  err = vk_av1_fill_pict(avctx, &ap->ref_src[i], &vp->ref_slots[i],
238  &vp->refs[i], &ap->vkav1_refs[i],
239  ref_frame, 0, 0, i);
240  if (err < 0)
241  return err;
242 
243  ref_count++;
244  }
245 
246  err = vk_av1_fill_pict(avctx, NULL, &vp->ref_slot, &vp->ref,
247  &ap->vkav1_ref,
248  pic, 1, apply_grain, 8);
249  if (err < 0)
250  return err;
251 
252  ap->tile_list.nb_tiles = 0;
253  ap->tile_list.tile_list = ap->tiles;
254 
257  .frame_header = &ap->av1_frame_header,
258  .tile_list = &ap->tile_list,
259  };
260 
261  vp->decode_info = (VkVideoDecodeInfoKHR) {
262  .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_INFO_KHR,
263  .pNext = &ap->av1_pic_info,
264  .flags = 0x0,
265  .pSetupReferenceSlot = &vp->ref_slot,
266  .referenceSlotCount = ref_count,
267  .pReferenceSlots = vp->ref_slots,
268  .dstPictureResource = (VkVideoPictureResourceInfoKHR) {
269  .sType = VK_STRUCTURE_TYPE_VIDEO_PICTURE_RESOURCE_INFO_KHR,
270  .codedOffset = (VkOffset2D){ 0, 0 },
271  .codedExtent = (VkExtent2D){ pic->f->width, pic->f->height },
272  .baseArrayLayer = 0,
273  .imageViewBinding = vp->img_view_out,
274  },
275  };
276 
277  /* Setup frame header */
280  .error_resilient_mode = frame_header->error_resilient_mode,
281  .disable_cdf_update = frame_header->disable_cdf_update,
282  .use_superres = frame_header->use_superres,
283  .render_and_frame_size_different = frame_header->render_and_frame_size_different,
284  .allow_screen_content_tools = frame_header->allow_screen_content_tools,
285  .is_filter_switchable = frame_header->is_filter_switchable,
286  .force_integer_mv = frame_header->force_integer_mv,
287  .frame_size_override_flag = frame_header->frame_size_override_flag,
288  .buffer_removal_time_present_flag = frame_header->buffer_removal_time_present_flag,
289  .allow_intrabc = frame_header->allow_intrabc,
290  .frame_refs_short_signaling = frame_header->frame_refs_short_signaling,
291  .allow_high_precision_mv = frame_header->allow_high_precision_mv,
292  .is_motion_mode_switchable = frame_header->is_motion_mode_switchable,
293  .use_ref_frame_mvs = frame_header->use_ref_frame_mvs,
294  .disable_frame_end_update_cdf = frame_header->disable_frame_end_update_cdf,
295  .allow_warped_motion = frame_header->allow_warped_motion,
296  .reduced_tx_set = frame_header->reduced_tx_set,
297  .reference_select = frame_header->reference_select,
298  .skip_mode_present = frame_header->skip_mode_present,
299  .delta_q_present = frame_header->delta_q_present,
300  },
301  .frame_to_show_map_idx = frame_header->frame_to_show_map_idx,
302  .frame_presentation_time = frame_header->frame_presentation_time,
303  .display_frame_id = frame_header->display_frame_id,
304  .frame_type = frame_header->frame_type,
305  .current_frame_id = frame_header->current_frame_id,
306  .order_hint = frame_header->order_hint,
307  .primary_ref_frame = frame_header->primary_ref_frame,
308  .frame_width_minus_1 = frame_header->frame_width_minus_1,
309  .frame_height_minus_1 = frame_header->frame_height_minus_1,
310  .coded_denom = frame_header->coded_denom,
311  .render_width_minus_1 = frame_header->render_width_minus_1,
312  .render_height_minus_1 = frame_header->render_height_minus_1,
313  .refresh_frame_flags = frame_header->refresh_frame_flags,
314  .interpolation_filter = frame_header->interpolation_filter,
315  .tx_mode = frame_header->tx_mode,
316  .tiling = (StdVideoAV1MESATileInfo) {
318  .uniform_tile_spacing_flag = frame_header->uniform_tile_spacing_flag,
319  },
320  .tile_cols = frame_header->tile_cols,
321  .tile_rows = frame_header->tile_rows,
322  .context_update_tile_id = frame_header->context_update_tile_id,
323  .tile_size_bytes_minus1 = frame_header->tile_size_bytes_minus1,
324  },
325  .quantization = (StdVideoAV1MESAQuantization) {
326  .flags.using_qmatrix = frame_header->using_qmatrix,
327  .base_q_idx = frame_header->base_q_idx,
328  .delta_q_y_dc = frame_header->delta_q_y_dc,
329  .diff_uv_delta = frame_header->diff_uv_delta,
330  .delta_q_u_dc = frame_header->delta_q_u_dc,
331  .delta_q_u_ac = frame_header->delta_q_u_ac,
332  .delta_q_v_dc = frame_header->delta_q_v_dc,
333  .delta_q_v_ac = frame_header->delta_q_v_ac,
334  .qm_y = frame_header->qm_y,
335  .qm_u = frame_header->qm_u,
336  .qm_v = frame_header->qm_v,
337  },
338  .delta_q = (StdVideoAV1MESADeltaQ) {
340  .delta_lf_present = frame_header->delta_lf_present,
341  .delta_lf_multi = frame_header->delta_lf_multi,
342  },
343  .delta_q_res = frame_header->delta_q_res,
344  .delta_lf_res = frame_header->delta_lf_res,
345  },
346  .loop_filter = (StdVideoAV1MESALoopFilter) {
348  .delta_enabled = frame_header->loop_filter_delta_enabled,
349  .delta_update = frame_header->loop_filter_delta_update,
350  },
351  .level = {
352  frame_header->loop_filter_level[0], frame_header->loop_filter_level[1],
353  frame_header->loop_filter_level[2], frame_header->loop_filter_level[3],
354  },
355  .sharpness = frame_header->loop_filter_sharpness,
356  .mode_deltas = {
357  frame_header->loop_filter_mode_deltas[0], frame_header->loop_filter_mode_deltas[1],
358  },
359  },
360  .cdef = (StdVideoAV1MESACDEF) {
361  .damping_minus_3 = frame_header->cdef_damping_minus_3,
362  .bits = frame_header->cdef_bits,
363  },
365  .lr_unit_shift = frame_header->lr_unit_shift,
366  .lr_uv_shift = frame_header->lr_uv_shift,
367  .lr_type = { frame_header->lr_type[0], frame_header->lr_type[1], frame_header->lr_type[2] },
368  },
369  .segmentation = (StdVideoAV1MESASegmentation) {
371  .enabled = frame_header->segmentation_enabled,
372  .update_map = frame_header->segmentation_update_map,
373  .temporal_update = frame_header->segmentation_temporal_update,
374  .update_data = frame_header->segmentation_update_data,
375  },
376  },
377  .film_grain = (StdVideoAV1MESAFilmGrainParameters) {
379  .apply_grain = apply_grain,
380  .chroma_scaling_from_luma = film_grain->chroma_scaling_from_luma,
381  .overlap_flag = film_grain->overlap_flag,
382  .clip_to_restricted_range = film_grain->clip_to_restricted_range,
383  },
384  .grain_scaling_minus_8 = film_grain->grain_scaling_minus_8,
385  .ar_coeff_lag = film_grain->ar_coeff_lag,
386  .ar_coeff_shift_minus_6 = film_grain->ar_coeff_shift_minus_6,
387  .grain_scale_shift = film_grain->grain_scale_shift,
388  .grain_seed = film_grain->grain_seed,
389  .num_y_points = film_grain->num_y_points,
390  .num_cb_points = film_grain->num_cb_points,
391  .num_cr_points = film_grain->num_cr_points,
392  .cb_mult = film_grain->cb_mult,
393  .cb_luma_mult = film_grain->cb_luma_mult,
394  .cb_offset = film_grain->cb_offset,
395  .cr_mult = film_grain->cr_mult,
396  .cr_luma_mult = film_grain->cr_luma_mult,
397  .cr_offset = film_grain->cr_offset,
398  },
399  };
400 
401  for (int i = 0; i < 64; i++) {
402  ap->av1_frame_header.tiling.width_in_sbs_minus_1[i] = frame_header->width_in_sbs_minus_1[i];
403  ap->av1_frame_header.tiling.height_in_sbs_minus_1[i] = frame_header->height_in_sbs_minus_1[i];
404  ap->av1_frame_header.tiling.tile_start_col_sb[i] = frame_header->tile_start_col_sb[i];
405  ap->av1_frame_header.tiling.tile_start_row_sb[i] = frame_header->tile_start_row_sb[i];
406  }
407 
408  for (int i = 0; i < 8; i++) {
410  for (int j = 0; j < 8; j++) {
411  ap->av1_frame_header.segmentation.feature_enabled_bits[i] |= (frame_header->feature_enabled[i][j] << j);
412  ap->av1_frame_header.segmentation.feature_data[i][j] = frame_header->feature_value[i][j];
413  }
414 
415  ap->av1_frame_header.loop_filter.ref_deltas[i] = frame_header->loop_filter_ref_deltas[i];
416 
417  ap->av1_frame_header.cdef.y_pri_strength[i] = frame_header->cdef_y_pri_strength[i];
418  ap->av1_frame_header.cdef.y_sec_strength[i] = frame_header->cdef_y_sec_strength[i];
419  ap->av1_frame_header.cdef.uv_pri_strength[i] = frame_header->cdef_uv_pri_strength[i];
420  ap->av1_frame_header.cdef.uv_sec_strength[i] = frame_header->cdef_uv_sec_strength[i];
421 
422  ap->av1_frame_header.ref_order_hint[i] = frame_header->ref_order_hint[i];
425  .gm_invalid = s->cur_frame.gm_invalid[i],
426  },
427  .gm_type = s->cur_frame.gm_type[i],
428  .gm_params = {
429  s->cur_frame.gm_params[i][0], s->cur_frame.gm_params[i][1],
430  s->cur_frame.gm_params[i][2], s->cur_frame.gm_params[i][3],
431  s->cur_frame.gm_params[i][4], s->cur_frame.gm_params[i][5],
432  },
433  };
434  }
435 
436  for (int i = 0; i < 7; i++) {
437  ap->av1_frame_header.ref_frame_idx[i] = frame_header->ref_frame_idx[i];
438  ap->av1_frame_header.delta_frame_id_minus1[i] = frame_header->delta_frame_id_minus1[i];
439  }
440 
441  ap->av1_pic_info.skip_mode_frame_idx[0] = s->cur_frame.skip_mode_frame_idx[0];
442  ap->av1_pic_info.skip_mode_frame_idx[1] = s->cur_frame.skip_mode_frame_idx[1];
443 
444  if (apply_grain) {
445  for (int i = 0; i < 14; i++) {
448  }
449 
450  for (int i = 0; i < 10; i++) {
455  }
456 
457  for (int i = 0; i < 24; i++) {
461  }
462 
465  }
466 
467  /* Workaround for a spec issue. */
468  ap->dec = dec;
469 
470  return 0;
471 }
472 
474  const uint8_t *data,
475  uint32_t size)
476 {
477  int err;
478  const AV1DecContext *s = avctx->priv_data;
479  AV1VulkanDecodePicture *ap = s->cur_frame.hwaccel_picture_private;
480  FFVulkanDecodePicture *vp = &ap->vp;
481 
482  for (int i = s->tg_start; i <= s->tg_end; i++) {
484  .size = s->tile_group_info[i].tile_size,
485  .offset = s->tile_group_info[i].tile_offset,
486  .row = s->tile_group_info[i].tile_row,
487  .column = s->tile_group_info[i].tile_column,
488  .tg_start = s->tg_start,
489  .tg_end = s->tg_end,
490  };
491 
492  err = ff_vk_decode_add_slice(avctx, vp,
493  data + s->tile_group_info[i].tile_offset,
494  s->tile_group_info[i].tile_size, 0,
495  &ap->tile_list.nb_tiles,
496  &ap->tile_offsets);
497  if (err < 0)
498  return err;
499 
500  ap->tiles[ap->tile_list.nb_tiles - 1].offset = ap->tile_offsets[ap->tile_list.nb_tiles - 1];
501  }
502 
503  return 0;
504 }
505 
507 {
508  const AV1DecContext *s = avctx->priv_data;
510  const AV1Frame *pic = &s->cur_frame;
512  FFVulkanDecodePicture *vp = &ap->vp;
514  AVFrame *rav[AV1_NUM_REF_FRAMES] = { 0 };
515 
516  if (!ap->tile_list.nb_tiles)
517  return 0;
518 
519  if (!dec->session_params) {
520  int err = vk_av1_create_params(avctx, &dec->session_params);
521  if (err < 0)
522  return err;
523  }
524 
525  for (int i = 0; i < vp->decode_info.referenceSlotCount; i++) {
526  const AV1Frame *rp = ap->ref_src[i];
528 
529  rvp[i] = &rhp->vp;
530  rav[i] = ap->ref_src[i]->f;
531  }
532 
533  av_log(avctx, AV_LOG_VERBOSE, "Decoding frame, %"SIZE_SPECIFIER" bytes, %i tiles\n",
534  vp->slices_size, ap->tile_list.nb_tiles);
535 
536  return ff_vk_decode_frame(avctx, pic->f, vp, rav, rvp);
537 }
538 
540 {
541  AVHWDeviceContext *hwctx = _hwctx.nc;
543 
544  /* Workaround for a spec issue. */
545  if (ap->frame_id_set)
546  ap->dec->frame_id_alloc_mask &= ~(1 << ap->frame_id);
547 
548  /* Free frame resources, this also destroys the session parameters. */
549  ff_vk_decode_free_frame(hwctx, &ap->vp);
550 }
551 
553  .p.name = "av1_vulkan",
554  .p.type = AVMEDIA_TYPE_VIDEO,
555  .p.id = AV_CODEC_ID_AV1,
556  .p.pix_fmt = AV_PIX_FMT_VULKAN,
557  .start_frame = &vk_av1_start_frame,
558  .decode_slice = &vk_av1_decode_slice,
559  .end_frame = &vk_av1_end_frame,
560  .free_frame_priv = &vk_av1_free_frame_priv,
561  .frame_priv_data_size = sizeof(AV1VulkanDecodePicture),
564  .decode_params = &ff_vk_params_invalidate,
567  .frame_params = &ff_vk_frame_params,
568  .priv_data_size = sizeof(FFVulkanDecodeContext),
569 
570  /* NOTE: Threading is intentionally disabled here. Due to the design of Vulkan,
571  * where frames are opaque to users, and mostly opaque for driver developers,
572  * there's an issue with current hardware accelerator implementations of AV1,
573  * where they require an internal index. With regular hwaccel APIs, this index
574  * is given to users as an opaque handle directly. With Vulkan, due to increased
575  * flexibility, this index cannot be present anywhere.
576  * The current implementation tracks the index for the driver and submits it
577  * as necessary information. Due to needing to modify the decoding context,
578  * which is not thread-safe, on frame free, threading is disabled.
579  * In the future, once this is fixed in the spec, the workarounds may be removed
580  * and threading enabled. */
581  .caps_internal = HWACCEL_CAP_ASYNC_SAFE,
582 };
VkVideoDecodeAV1DpbSlotInfoMESA::ref_order_hint
uint8_t ref_order_hint[7]
Definition: vulkan_video_codec_av1std_mesa.h:357
ff_av1_vulkan_hwaccel
const FFHWAccel ff_av1_vulkan_hwaccel
Definition: vulkan_av1.c:552
AV1RawTimingInfo::num_units_in_display_tick
uint32_t num_units_in_display_tick
Definition: cbs_av1.h:59
AV1RawTimingInfo::time_scale
uint32_t time_scale
Definition: cbs_av1.h:60
StdVideoAV1MESATileInfo::tile_start_col_sb
uint8_t tile_start_col_sb[64]
Definition: vulkan_video_codec_av1std_mesa.h:132
StdVideoAV1MESATile::offset
uint32_t offset
Definition: vulkan_video_codec_av1std_mesa.h:337
FFVulkanDecodePicture::slices_size
size_t slices_size
Definition: vulkan_decode.h:99
StdVideoAV1MESATileInfo::height_in_sbs_minus_1
uint8_t height_in_sbs_minus_1[64]
Definition: vulkan_video_codec_av1std_mesa.h:135
AV1RawFilmGrainParams::clip_to_restricted_range
uint8_t clip_to_restricted_range
Definition: cbs_av1.h:162
AV1RawFilmGrainParams::grain_seed
uint16_t grain_seed
Definition: cbs_av1.h:135
AV1RawSequenceHeader::timing_info_present_flag
uint8_t timing_info_present_flag
Definition: cbs_av1.h:78
AV1VulkanDecodePicture::tile_list
StdVideoAV1MESATileList tile_list
Definition: vulkan_av1.c:39
AV1RawSequenceHeader
Definition: cbs_av1.h:73
StdVideoAV1MESAFrameHeader::ref_frame_idx
int8_t ref_frame_idx[7]
Definition: vulkan_video_codec_av1std_mesa.h:246
StdVideoAV1MESALoopFilter::ref_deltas
int8_t ref_deltas[8]
Definition: vulkan_video_codec_av1std_mesa.h:200
AV1RawColorConfig::color_range
uint8_t color_range
Definition: cbs_av1.h:51
VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_ADD_INFO_MESA
#define VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_ADD_INFO_MESA
Definition: vulkan_video_codec_av1std_mesa.h:394
VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_DPB_SLOT_INFO_MESA
#define VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_DPB_SLOT_INFO_MESA
Definition: vulkan_video_codec_av1std_mesa.h:395
VkVideoDecodeAV1DpbSlotInfoMESA::sType
VkStructureType sType
Definition: vulkan_video_codec_av1std_mesa.h:354
FFVulkanDecodeContext::shared_ctx
FFVulkanDecodeShared * shared_ctx
Definition: vulkan_decode.h:57
AV1VulkanDecodePicture::av1_pic_info
VkVideoDecodeAV1PictureInfoMESA av1_pic_info
Definition: vulkan_av1.c:45
MAX_TILES
#define MAX_TILES
Definition: vulkan_av1.c:24
StdVideoAV1MESATimingInfo
Definition: vulkan_video_codec_av1std_mesa.h:271
AV1RawFilmGrainParams::point_cb_value
uint8_t point_cb_value[10]
Definition: cbs_av1.h:143
AV1RawFilmGrainParams::apply_grain
uint8_t apply_grain
Definition: cbs_av1.h:134
StdVideoAV1MESAGlobalMotionFlags
Definition: vulkan_video_codec_av1std_mesa.h:108
StdVideoAV1MESAFrameHeader::segmentation
StdVideoAV1MESASegmentation segmentation
Definition: vulkan_video_codec_av1std_mesa.h:254
av_unused
#define av_unused
Definition: attributes.h:131
FFHWAccel::p
AVHWAccel p
The public AVHWAccel.
Definition: hwaccel_internal.h:38
StdVideoAV1MESATileInfo
Definition: vulkan_video_codec_av1std_mesa.h:128
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:340
StdVideoAV1MESASequenceHeaderFlags::still_picture
uint8_t still_picture
Definition: vulkan_video_codec_av1std_mesa.h:292
AVFrame::width
int width
Definition: frame.h:412
AV1RawFilmGrainParams::point_y_value
uint8_t point_y_value[14]
Definition: cbs_av1.h:139
StdVideoAV1MESATile
Definition: vulkan_video_codec_av1std_mesa.h:331
AV1Frame::raw_frame_header
AV1RawFrameHeader * raw_frame_header
Definition: av1dec.h:41
data
const char data[16]
Definition: mxf.c:148
AV1RawFrameHeader::disable_frame_end_update_cdf
uint8_t disable_frame_end_update_cdf
Definition: cbs_av1.h:213
AV1RawSequenceHeader::timing_info
AV1RawTimingInfo timing_info
Definition: cbs_av1.h:83
FFVulkanDecodeContext::frame_id_alloc_mask
uint32_t frame_id_alloc_mask
Definition: vulkan_decode.h:64
vk_av1_start_frame
static int vk_av1_start_frame(AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size)
Definition: vulkan_av1.c:195
AV_LOG_VERBOSE
#define AV_LOG_VERBOSE
Detailed information.
Definition: log.h:196
AV1RawSequenceHeader::frame_id_numbers_present_flag
uint8_t frame_id_numbers_present_flag
Definition: cbs_av1.h:101
StdVideoAV1MESATile::size
uint32_t size
Definition: vulkan_video_codec_av1std_mesa.h:336
VkVideoDecodeAV1DpbSlotInfoMESA
Definition: vulkan_video_codec_av1std_mesa.h:353
FFRefStructOpaque
RefStruct is an API for creating reference-counted objects with minimal overhead.
Definition: refstruct.h:58
vk_av1_create_params
static int vk_av1_create_params(AVCodecContext *avctx, AVBufferRef **buf)
Definition: vulkan_av1.c:105
VkVideoDecodeAV1SessionParametersCreateInfoMESA
Definition: vulkan_video_codec_av1std_mesa.h:367
StdVideoAV1MESASegmentation::feature_data
int16_t feature_data[8][8]
Definition: vulkan_video_codec_av1std_mesa.h:188
FFVulkanDecodeContext
Definition: vulkan_decode.h:56
StdVideoAV1MESAFilmGrainParameters
Definition: vulkan_video_codec_av1std_mesa.h:77
AV_PIX_FMT_VULKAN
@ AV_PIX_FMT_VULKAN
Vulkan hardware images.
Definition: pixfmt.h:383
ff_vk_decode_prepare_frame
int ff_vk_decode_prepare_frame(FFVulkanDecodeContext *dec, AVFrame *pic, FFVulkanDecodePicture *vkpic, int is_current, int alloc_dpb)
Prepare a frame, creates the image view, and sets up the dpb fields.
Definition: vulkan_decode.c:185
AV1RawSequenceHeader::seq_profile
uint8_t seq_profile
Definition: cbs_av1.h:74
StdVideoAV1MESAQuantization
Definition: vulkan_video_codec_av1std_mesa.h:144
FFVulkanDecodePicture::ref
VkVideoPictureResourceInfoKHR ref
Definition: vulkan_decode.h:87
AV1RawColorConfig::subsampling_y
uint8_t subsampling_y
Definition: cbs_av1.h:53
AV1RawColorConfig::separate_uv_delta_q
uint8_t separate_uv_delta_q
Definition: cbs_av1.h:55
AV1VulkanDecodePicture::vkav1_refs
VkVideoDecodeAV1DpbSlotInfoMESA vkav1_refs[AV1_NUM_REF_FRAMES]
Definition: vulkan_av1.c:49
FFVulkanDecodeContext::session_params
AVBufferRef * session_params
Definition: vulkan_decode.h:58
AV1RawFilmGrainParams::cr_mult
uint8_t cr_mult
Definition: cbs_av1.h:158
AV1RawFilmGrainParams::chroma_scaling_from_luma
uint8_t chroma_scaling_from_luma
Definition: cbs_av1.h:141
AV1RawFilmGrainParams::ar_coeffs_cr_plus_128
uint8_t ar_coeffs_cr_plus_128[25]
Definition: cbs_av1.h:152
AV1RawSequenceHeader::film_grain_params_present
uint8_t film_grain_params_present
Definition: cbs_av1.h:130
FFHWAccel
Definition: hwaccel_internal.h:34
AV1RawSequenceHeader::enable_ref_frame_mvs
uint8_t enable_ref_frame_mvs
Definition: cbs_av1.h:115
AV1RawSequenceHeader::enable_filter_intra
uint8_t enable_filter_intra
Definition: cbs_av1.h:106
AV1_NUM_REF_FRAMES
@ AV1_NUM_REF_FRAMES
Definition: av1.h:83
AV1RawFilmGrainParams::point_cr_scaling
uint8_t point_cr_scaling[10]
Definition: cbs_av1.h:147
vk_av1_end_frame
static int vk_av1_end_frame(AVCodecContext *avctx)
Definition: vulkan_av1.c:506
StdVideoAV1MESATileList
Definition: vulkan_video_codec_av1std_mesa.h:340
StdVideoAV1MESALoopFilterFlags
Definition: vulkan_video_codec_av1std_mesa.h:191
AV1RawSequenceHeader::delta_frame_id_length_minus_2
uint8_t delta_frame_id_length_minus_2
Definition: cbs_av1.h:102
AV1RawFilmGrainParams::ar_coeff_shift_minus_6
uint8_t ar_coeff_shift_minus_6
Definition: cbs_av1.h:153
AV1RawFilmGrainParams::num_y_points
uint8_t num_y_points
Definition: cbs_av1.h:138
ff_vk_decode_frame
int ff_vk_decode_frame(AVCodecContext *avctx, AVFrame *pic, FFVulkanDecodePicture *vp, AVFrame *rpic[], FFVulkanDecodePicture *rvkp[])
Decode a frame.
Definition: vulkan_decode.c:341
FFVulkanDecodeShared
Definition: vulkan_decode.h:37
VkVideoDecodeAV1SessionParametersAddInfoMESA::sType
VkStructureType sType
Definition: vulkan_video_codec_av1std_mesa.h:362
AV1RawFilmGrainParams::num_cb_points
uint8_t num_cb_points
Definition: cbs_av1.h:142
AVHWDeviceContext
This struct aggregates all the (hardware/vendor-specific) "high-level" state, i.e.
Definition: hwcontext.h:62
AV1RawFilmGrainParams::cb_luma_mult
uint8_t cb_luma_mult
Definition: cbs_av1.h:156
AV1Frame
Definition: av1dec.h:35
AV1RawFilmGrainParams::overlap_flag
uint8_t overlap_flag
Definition: cbs_av1.h:161
StdVideoAV1MESASequenceHeaderFlags
Definition: vulkan_video_codec_av1std_mesa.h:291
FFVulkanDecodePicture::img_view_out
VkImageView img_view_out
Definition: vulkan_decode.h:78
AV1RawSequenceHeader::enable_masked_compound
uint8_t enable_masked_compound
Definition: cbs_av1.h:109
VkVideoDecodeAV1SessionParametersCreateInfoMESA::sType
VkStructureType sType
Definition: vulkan_video_codec_av1std_mesa.h:368
AV1RawFilmGrainParams::grain_scaling_minus_8
uint8_t grain_scaling_minus_8
Definition: cbs_av1.h:148
FFVulkanDecodePicture::refs
VkVideoPictureResourceInfoKHR refs[36]
Definition: vulkan_decode.h:91
s
#define s(width, name)
Definition: cbs_vp9.c:198
FFVulkanDecodePicture
Definition: vulkan_decode.h:74
VkVideoDecodeAV1PictureInfoMESA::sType
VkStructureType sType
Definition: vulkan_video_codec_av1std_mesa.h:346
ff_vk_decode_create_params
int ff_vk_decode_create_params(AVBufferRef **par_ref, void *logctx, FFVulkanDecodeShared *ctx, const VkVideoSessionParametersCreateInfoKHR *session_params_create)
Create VkVideoSessionParametersKHR wrapped in an AVBufferRef.
Definition: vulkan_decode.c:1071
VkVideoDecodeAV1DpbSlotInfoMESA::disable_frame_end_update_cdf
uint8_t disable_frame_end_update_cdf
Definition: vulkan_video_codec_av1std_mesa.h:358
StdVideoAV1MESAFrameHeader::ref_order_hint
uint8_t ref_order_hint[8]
Definition: vulkan_video_codec_av1std_mesa.h:245
StdVideoAV1MESATileList::tile_list
StdVideoAV1MESATile * tile_list
Definition: vulkan_video_codec_av1std_mesa.h:341
AV_LOG_DEBUG
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
Definition: log.h:201
ctx
AVFormatContext * ctx
Definition: movenc.c:48
av1dec.h
VkVideoDecodeAV1PictureInfoMESA
Definition: vulkan_video_codec_av1std_mesa.h:345
if
if(ret)
Definition: filter_design.txt:179
HWACCEL_CAP_ASYNC_SAFE
#define HWACCEL_CAP_ASYNC_SAFE
Header providing the internals of AVHWAccel.
Definition: hwaccel_internal.h:31
FFVulkanDecodePicture::img_view_ref
VkImageView img_view_ref
Definition: vulkan_decode.h:77
NULL
#define NULL
Definition: coverity.c:32
AV1RawFilmGrainParams::cb_mult
uint8_t cb_mult
Definition: cbs_av1.h:155
AV_CODEC_ID_AV1
@ AV_CODEC_ID_AV1
Definition: codec_id.h:283
AV1RawFrameHeader
Definition: cbs_av1.h:165
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:571
StdVideoAV1MESAColorConfig
Definition: vulkan_video_codec_av1std_mesa.h:284
VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PICTURE_INFO_MESA
#define VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PICTURE_INFO_MESA
Definition: vulkan_video_codec_av1std_mesa.h:392
AVCodecContext::internal
struct AVCodecInternal * internal
Private context used for internal data.
Definition: avcodec.h:480
StdVideoAV1MESAFilmGrainParameters::point_y_value
uint8_t point_y_value[14]
Definition: vulkan_video_codec_av1std_mesa.h:86
ff_vk_decode_uninit
int ff_vk_decode_uninit(AVCodecContext *avctx)
Free decoder.
Definition: vulkan_decode.c:1100
flush
void(* flush)(AVBSFContext *ctx)
Definition: dts2pts.c:367
StdVideoAV1MESAColorConfigFlags
Definition: vulkan_video_codec_av1std_mesa.h:278
AV1RawSequenceHeader::enable_jnt_comp
uint8_t enable_jnt_comp
Definition: cbs_av1.h:114
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:1014
StdVideoAV1MESATimingInfoFlags
Definition: vulkan_video_codec_av1std_mesa.h:267
StdVideoAV1MESAFilmGrainParameters::point_cb_scaling
uint8_t point_cb_scaling[10]
Definition: vulkan_video_codec_av1std_mesa.h:91
StdVideoAV1MESASequenceHeader
Definition: vulkan_video_codec_av1std_mesa.h:313
StdVideoAV1MESAFilmGrainParameters::ar_coeffs_cb_plus_128
int8_t ar_coeffs_cb_plus_128[25]
Definition: vulkan_video_codec_av1std_mesa.h:98
AV1RawSequenceHeader::max_frame_height_minus_1
uint16_t max_frame_height_minus_1
Definition: cbs_av1.h:99
AV1RawFrameHeader::ref_frame_idx
int8_t ref_frame_idx[AV1_REFS_PER_FRAME]
Definition: cbs_av1.h:204
AV1RawFilmGrainParams::point_cr_value
uint8_t point_cr_value[10]
Definition: cbs_av1.h:146
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:365
StdVideoAV1MESAFrameHeader::flags
StdVideoAV1MESAFrameHeaderFlags flags
Definition: vulkan_video_codec_av1std_mesa.h:229
AV1RawFilmGrainParams::cb_offset
uint16_t cb_offset
Definition: cbs_av1.h:157
AV1RawTimingInfo::num_ticks_per_picture_minus_1
uint32_t num_ticks_per_picture_minus_1
Definition: cbs_av1.h:63
AVCodecInternal::hwaccel_priv_data
void * hwaccel_priv_data
hwaccel-specific private data
Definition: internal.h:121
StdVideoAV1MESAFrameHeaderFlags::error_resilient_mode
uint8_t error_resilient_mode
Definition: vulkan_video_codec_av1std_mesa.h:205
StdVideoAV1MESAFilmGrainParameters::point_cr_scaling
uint8_t point_cr_scaling[10]
Definition: vulkan_video_codec_av1std_mesa.h:95
StdVideoAV1MESASegmentation::feature_enabled_bits
uint8_t feature_enabled_bits[8]
Definition: vulkan_video_codec_av1std_mesa.h:187
size
int size
Definition: twinvq_data.h:10344
AV1DecContext
Definition: av1dec.h:64
AV1RawSequenceHeader::use_128x128_superblock
uint8_t use_128x128_superblock
Definition: cbs_av1.h:105
AV1RawSequenceHeader::frame_height_bits_minus_1
uint8_t frame_height_bits_minus_1
Definition: cbs_av1.h:97
FFRefStructOpaque::nc
void * nc
Definition: refstruct.h:59
StdVideoAV1MESATileInfoFlags
Definition: vulkan_video_codec_av1std_mesa.h:124
StdVideoAV1MESAFrameHeader::delta_frame_id_minus1
uint32_t delta_frame_id_minus1[7]
Definition: vulkan_video_codec_av1std_mesa.h:247
AV_PICTURE_TYPE_NONE
@ AV_PICTURE_TYPE_NONE
Undefined.
Definition: avutil.h:278
StdVideoAV1MESAFilmGrainFlags
Definition: vulkan_video_codec_av1std_mesa.h:70
ref_frame
static int ref_frame(VVCFrame *dst, const VVCFrame *src)
Definition: vvcdec.c:552
AV1RawSequenceHeader::still_picture
uint8_t still_picture
Definition: cbs_av1.h:75
AV1Frame::f
AVFrame * f
Definition: av1dec.h:36
StdVideoAV1MESAGlobalMotionFlags::gm_invalid
uint8_t gm_invalid
Definition: vulkan_video_codec_av1std_mesa.h:109
AV1RawSequenceHeader::initial_display_delay_present_flag
uint8_t initial_display_delay_present_flag
Definition: cbs_av1.h:80
VkVideoDecodeAV1SessionParametersAddInfoMESA
Definition: vulkan_video_codec_av1std_mesa.h:361
AV1RawFilmGrainParams::grain_scale_shift
uint8_t grain_scale_shift
Definition: cbs_av1.h:154
StdVideoAV1MESASegmentationFlags
Definition: vulkan_video_codec_av1std_mesa.h:178
AV1RawSequenceHeader::enable_interintra_compound
uint8_t enable_interintra_compound
Definition: cbs_av1.h:108
StdVideoAV1MESAFrameHeaderFlags
Definition: vulkan_video_codec_av1std_mesa.h:204
StdVideoAV1MESASegmentation
Definition: vulkan_video_codec_av1std_mesa.h:185
StdVideoAV1MESACDEF
Definition: vulkan_video_codec_av1std_mesa.h:158
AVHWAccel::name
const char * name
Name of the hardware accelerated codec.
Definition: avcodec.h:2139
StdVideoAV1MESALoopFilter
Definition: vulkan_video_codec_av1std_mesa.h:196
uninit
static void uninit(AVBSFContext *ctx)
Definition: pcm_rechunk.c:68
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:255
AV1RawSequenceHeader::enable_dual_filter
uint8_t enable_dual_filter
Definition: cbs_av1.h:111
StdVideoAV1MESAFrameHeader
Definition: vulkan_video_codec_av1std_mesa.h:228
AV1RawSequenceHeader::enable_superres
uint8_t enable_superres
Definition: cbs_av1.h:124
AV1Frame::hwaccel_picture_private
void * hwaccel_picture_private
RefStruct reference.
Definition: av1dec.h:38
StdVideoAV1MESAFilmGrainParameters::ar_coeffs_y_plus_128
int8_t ar_coeffs_y_plus_128[24]
Definition: vulkan_video_codec_av1std_mesa.h:97
StdVideoAV1MESAFilmGrainParameters::point_y_scaling
uint8_t point_y_scaling[14]
Definition: vulkan_video_codec_av1std_mesa.h:87
AV1RawTimingInfo::equal_picture_interval
uint8_t equal_picture_interval
Definition: cbs_av1.h:62
StdVideoAV1MESAFrameHeader::cdef
StdVideoAV1MESACDEF cdef
Definition: vulkan_video_codec_av1std_mesa.h:257
AV1RawSequenceHeader::enable_intra_edge_filter
uint8_t enable_intra_edge_filter
Definition: cbs_av1.h:107
FFVulkanDecodePicture::ref_slot
VkVideoReferenceSlotInfoKHR ref_slot
Definition: vulkan_decode.h:88
AV1RawSequenceHeader::max_frame_width_minus_1
uint16_t max_frame_width_minus_1
Definition: cbs_av1.h:98
AV1RawSequenceHeader::color_config
AV1RawColorConfig color_config
Definition: cbs_av1.h:128
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. If there are inter-frame dependencies
FFVulkanDecodePicture::ref_slots
VkVideoReferenceSlotInfoKHR ref_slots[36]
Definition: vulkan_decode.h:92
AV1RawSequenceHeader::enable_order_hint
uint8_t enable_order_hint
Definition: cbs_av1.h:113
AV1RawFrameHeader::ref_order_hint
uint8_t ref_order_hint[AV1_NUM_REF_FRAMES]
Definition: cbs_av1.h:200
StdVideoAV1MESACDEF::y_sec_strength
uint8_t y_sec_strength[8]
Definition: vulkan_video_codec_av1std_mesa.h:162
ff_vk_decode_flush
void ff_vk_decode_flush(AVCodecContext *avctx)
Flush decoder.
Definition: vulkan_decode.c:311
AV1RawColorConfig::subsampling_x
uint8_t subsampling_x
Definition: cbs_av1.h:52
AV1VulkanDecodePicture::vkav1_ref
VkVideoDecodeAV1DpbSlotInfoMESA vkav1_ref
Definition: vulkan_av1.c:43
StdVideoAV1MESAFilmGrainParameters::ar_coeffs_cr_plus_128
int8_t ar_coeffs_cr_plus_128[25]
Definition: vulkan_video_codec_av1std_mesa.h:99
StdVideoAV1MESAFilmGrainParameters::point_cb_value
uint8_t point_cb_value[10]
Definition: vulkan_video_codec_av1std_mesa.h:90
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:249
AV1RawColorConfig::high_bitdepth
uint8_t high_bitdepth
Definition: cbs_av1.h:42
AV1RawFilmGrainParams::cr_luma_mult
uint8_t cr_luma_mult
Definition: cbs_av1.h:159
AV1VulkanDecodePicture::ref_src
const AV1Frame * ref_src[AV1_NUM_REF_FRAMES]
Definition: vulkan_av1.c:48
StdVideoAV1MESADeltaQFlags
Definition: vulkan_video_codec_av1std_mesa.h:167
SIZE_SPECIFIER
#define SIZE_SPECIFIER
Definition: internal.h:141
AV1RawSequenceHeader::frame_width_bits_minus_1
uint8_t frame_width_bits_minus_1
Definition: cbs_av1.h:96
AV1RawSequenceHeader::enable_warped_motion
uint8_t enable_warped_motion
Definition: cbs_av1.h:110
StdVideoAV1MESAGlobalMotion
Definition: vulkan_video_codec_av1std_mesa.h:112
AVCodecContext
main external API structure.
Definition: avcodec.h:445
AVFrame::height
int height
Definition: frame.h:412
FFVulkanDecodeContext::dedicated_dpb
int dedicated_dpb
Definition: vulkan_decode.h:61
StdVideoAV1MESAFilmGrainParameters::point_cr_value
uint8_t point_cr_value[10]
Definition: vulkan_video_codec_av1std_mesa.h:94
frame_header
Definition: truemotion1.c:88
StdVideoAV1MESACDEF::uv_pri_strength
uint8_t uv_pri_strength[8]
Definition: vulkan_video_codec_av1std_mesa.h:163
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
VkVideoDecodeAV1PictureInfoMESA::skip_mode_frame_idx
uint8_t skip_mode_frame_idx[2]
Definition: vulkan_video_codec_av1std_mesa.h:350
AV1RawFilmGrainParams::ar_coeff_lag
uint8_t ar_coeff_lag
Definition: cbs_av1.h:149
StdVideoAV1MESATileInfo::tile_start_row_sb
uint8_t tile_start_row_sb[64]
Definition: vulkan_video_codec_av1std_mesa.h:133
AV1RawColorConfig::mono_chrome
uint8_t mono_chrome
Definition: cbs_av1.h:44
ref
static int ref[MAX_W *MAX_W]
Definition: jpeg2000dwt.c:112
StdVideoAV1MESAFrameHeader::loop_filter
StdVideoAV1MESALoopFilter loop_filter
Definition: vulkan_video_codec_av1std_mesa.h:256
AV1VulkanDecodePicture::tile_offsets
const uint32_t * tile_offsets
Definition: vulkan_av1.c:40
AVCodecContext::export_side_data
int export_side_data
Bit set of AV_CODEC_EXPORT_DATA_* flags, which affects the kind of metadata exported in frame,...
Definition: avcodec.h:2061
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:119
AV1RawFilmGrainParams::ar_coeffs_cb_plus_128
uint8_t ar_coeffs_cb_plus_128[25]
Definition: cbs_av1.h:151
VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_SPEC_VERSION
#define VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_SPEC_VERSION
Definition: vulkan_video_codec_av1std_mesa.h:33
StdVideoAV1MESADeltaQ
Definition: vulkan_video_codec_av1std_mesa.h:172
AV1RawFilmGrainParams::ar_coeffs_y_plus_128
uint8_t ar_coeffs_y_plus_128[24]
Definition: cbs_av1.h:150
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:78
AV1RawSequenceHeader::order_hint_bits_minus_1
uint8_t order_hint_bits_minus_1
Definition: cbs_av1.h:122
AV1RawFilmGrainParams::cr_offset
uint16_t cr_offset
Definition: cbs_av1.h:160
StdVideoAV1MESACDEF::uv_sec_strength
uint8_t uv_sec_strength[8]
Definition: vulkan_video_codec_av1std_mesa.h:164
AV1RawFilmGrainParams::point_y_scaling
uint8_t point_y_scaling[14]
Definition: cbs_av1.h:140
StdVideoAV1MESATileList::nb_tiles
uint32_t nb_tiles
Definition: vulkan_video_codec_av1std_mesa.h:342
StdVideoAV1MESATileInfo::width_in_sbs_minus_1
uint8_t width_in_sbs_minus_1[64]
Definition: vulkan_video_codec_av1std_mesa.h:134
StdVideoAV1MESAFrameHeader::film_grain
StdVideoAV1MESAFilmGrainParameters film_grain
Definition: vulkan_video_codec_av1std_mesa.h:260
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
StdVideoAV1MESALoopRestoration
Definition: vulkan_video_codec_av1std_mesa.h:118
StdVideoAV1MESASequenceHeader::flags
StdVideoAV1MESASequenceHeaderFlags flags
Definition: vulkan_video_codec_av1std_mesa.h:314
AVBufferRef
A reference to a data buffer.
Definition: buffer.h:82
AV1RawFilmGrainParams::point_cb_scaling
uint8_t point_cb_scaling[10]
Definition: cbs_av1.h:144
frame_header::flags
uint8_t flags
Definition: truemotion1.c:98
ff_vk_dec_av1_ext
const VkExtensionProperties ff_vk_dec_av1_ext
Definition: vulkan_av1.c:26
AV1RawSequenceHeader::enable_restoration
uint8_t enable_restoration
Definition: cbs_av1.h:126
vulkan_decode.h
StdVideoAV1MESACDEF::y_pri_strength
uint8_t y_pri_strength[8]
Definition: vulkan_video_codec_av1std_mesa.h:161
AV1RawColorConfig::twelve_bit
uint8_t twelve_bit
Definition: cbs_av1.h:43
AV1VulkanDecodePicture::vp
FFVulkanDecodePicture vp
Definition: vulkan_av1.c:32
VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_CREATE_INFO_MESA
#define VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_CREATE_INFO_MESA
Definition: vulkan_video_codec_av1std_mesa.h:393
AVCodecContext::priv_data
void * priv_data
Definition: avcodec.h:472
FFVulkanDecodeContext::layered_dpb
int layered_dpb
Definition: vulkan_decode.h:62
AV1RawSequenceHeader::additional_frame_id_length_minus_1
uint8_t additional_frame_id_length_minus_1
Definition: cbs_av1.h:103
AV1RawSequenceHeader::enable_cdef
uint8_t enable_cdef
Definition: cbs_av1.h:125
StdVideoAV1MESAFrameHeader::tiling
StdVideoAV1MESATileInfo tiling
Definition: vulkan_video_codec_av1std_mesa.h:252
AV1RawSequenceHeader::reduced_still_picture_header
uint8_t reduced_still_picture_header
Definition: cbs_av1.h:76
AV1RawFilmGrainParams
Definition: cbs_av1.h:133
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:1115
FFVulkanDecodePicture::decode_info
VkVideoDecodeInfoKHR decode_info
Definition: vulkan_decode.h:95
AV1VulkanDecodePicture
Definition: vulkan_av1.c:31
AV1VulkanDecodePicture::frame_id
uint8_t frame_id
Definition: vulkan_av1.c:52
AV1VulkanDecodePicture::dec
FFVulkanDecodeContext * dec
Definition: vulkan_av1.c:36
AV1VulkanDecodePicture::frame_id_set
uint8_t frame_id_set
Definition: vulkan_av1.c:51
VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_EXTENSION_NAME
#define VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_EXTENSION_NAME
Definition: vulkan_video_codec_av1std_mesa.h:34
AV1RawFilmGrainParams::num_cr_points
uint8_t num_cr_points
Definition: cbs_av1.h:145
vk_av1_decode_slice
static int vk_av1_decode_slice(AVCodecContext *avctx, const uint8_t *data, uint32_t size)
Definition: vulkan_av1.c:473
AV_CODEC_EXPORT_DATA_FILM_GRAIN
#define AV_CODEC_EXPORT_DATA_FILM_GRAIN
Decoding only.
Definition: avcodec.h:420
StdVideoAV1MESAFrameHeader::global_motion
StdVideoAV1MESAGlobalMotion global_motion[8]
Definition: vulkan_video_codec_av1std_mesa.h:259
vk_av1_free_frame_priv
static void vk_av1_free_frame_priv(FFRefStructOpaque _hwctx, void *data)
Definition: vulkan_av1.c:539
StdVideoAV1MESAGlobalMotion::flags
StdVideoAV1MESAGlobalMotionFlags flags
Definition: vulkan_video_codec_av1std_mesa.h:113
vk_av1_fill_pict
static int vk_av1_fill_pict(AVCodecContext *avctx, const AV1Frame **ref_src, VkVideoReferenceSlotInfoKHR *ref_slot, VkVideoPictureResourceInfoKHR *ref, VkVideoDecodeAV1DpbSlotInfoMESA *vkav1_ref, const AV1Frame *pic, int is_current, int has_grain, int dpb_slot_index)
Definition: vulkan_av1.c:55
AV1VulkanDecodePicture::tiles
StdVideoAV1MESATile tiles[MAX_TILES]
Definition: vulkan_av1.c:38
AV1VulkanDecodePicture::av1_frame_header
StdVideoAV1MESAFrameHeader av1_frame_header
Definition: vulkan_av1.c:44