FFmpeg
Data Structures | Functions
vulkan_decode.h File Reference
#include "codec_id.h"
#include "decode.h"
#include "hwaccel_internal.h"
#include "internal.h"
#include "vulkan_video.h"

Go to the source code of this file.

Data Structures

 
 
 
 

Functions

  Initialize decoder. More...
 
  Synchronize the contexts between 2 threads. More...
 
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 avctx. More...
 
int  ff_vk_params_invalidate (AVCodecContext *avctx, int t, const uint8_t *b, uint32_t s)
  Removes current session parameters to recreate them. More...
 
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. More...
 
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. More...
 
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. More...
 
  Decode a frame. More...
 
  Free a frame and its state. More...
 
int  ff_vk_get_decode_buffer (FFVulkanDecodeContext *ctx, AVBufferRef **buf, void *create_pNext, size_t size)
  Get an FFVkBuffer suitable for decoding from. More...
 
int  ff_vk_decode_create_params (AVBufferRef **par_ref, void *logctx, FFVulkanDecodeShared *ctx, const VkVideoSessionParametersCreateInfoKHR *session_params_create)
  Create VkVideoSessionParametersKHR wrapped in an AVBufferRef. More...
 
  Flush decoder. More...
 
  Free decoder. More...
 

Function Documentation

ff_vk_decode_init()

int ff_vk_decode_init ( AVCodecContextavctx )

Initialize decoder.

Definition at line 1251 of file vulkan_decode.c.

Referenced by vk_decode_ffv1_init(), vk_decode_prores_init(), and vk_decode_prores_raw_init().

ff_vk_update_thread_context()

int ff_vk_update_thread_context ( AVCodecContextdst,
const AVCodecContextsrc 
)

Synchronize the contexts between 2 threads.

Definition at line 127 of file vulkan_decode.c.

ff_vk_frame_params()

int ff_vk_frame_params ( AVCodecContextavctx,
AVBufferRefhw_frames_ctx 
)

Initialize hw_frames_ctx with the parameters needed to decode the stream using the parameters from avctx.

NOTE: if avctx->internal->hwaccel_priv_data exists, will partially initialize the context.

Definition at line 1082 of file vulkan_decode.c.

ff_vk_params_invalidate()

int ff_vk_params_invalidate ( AVCodecContextavctx,
int  t,
const uint8_t *  b,
uint32_t  s 
)

Removes current session parameters to recreate them.

Definition at line 145 of file vulkan_decode.c.

ff_vk_decode_prepare_frame()

int ff_vk_decode_prepare_frame ( FFVulkanDecodeContextdec,
AVFramepic,
int  is_current,
int  alloc_dpb 
)

Prepare a frame, creates the image view, and sets up the dpb fields.

Definition at line 183 of file vulkan_decode.c.

Referenced by vk_av1_fill_pict(), vk_h264_fill_pict(), vk_hevc_fill_pict(), and vk_vp9_fill_pict().

ff_vk_decode_prepare_frame_sdr()

int ff_vk_decode_prepare_frame_sdr ( FFVulkanDecodeContextdec,
AVFramepic,
int  is_current,
enum FFVkShaderRepFormat  rep_fmt,
int  alloc_dpb 
)

Software-defined decoder version of ff_vk_decode_prepare_frame.

Definition at line 240 of file vulkan_decode.c.

Referenced by vk_ffv1_start_frame(), vk_prores_raw_start_frame(), and vk_prores_start_frame().

ff_vk_decode_add_slice()

int ff_vk_decode_add_slice ( AVCodecContextavctx,
const uint8_t *  data,
size_t  size,
int  add_startcode,
uint32_t *  nb_slices,
const uint32_t **  offsets 
)

Add slice data to frame.

Definition at line 287 of file vulkan_decode.c.

Referenced by vk_av1_decode_slice(), vk_ffv1_decode_slice(), vk_h264_decode_slice(), vk_hevc_decode_slice(), vk_prores_decode_slice(), vk_prores_raw_decode_slice(), and vk_vp9_decode_slice().

ff_vk_decode_frame()

int ff_vk_decode_frame ( AVCodecContextavctx,
AVFramepic,
AVFramerpic[],
FFVulkanDecodePicturervkp[] 
)

Decode a frame.

Definition at line 404 of file vulkan_decode.c.

Referenced by vk_av1_end_frame(), vk_h264_end_frame(), vk_hevc_end_frame(), and vk_vp9_end_frame().

ff_vk_decode_free_frame()

void ff_vk_decode_free_frame ( AVHWDeviceContextdev_ctx,
)

Free a frame and its state.

Definition at line 610 of file vulkan_decode.c.

Referenced by vk_av1_free_frame_priv(), vk_ffv1_free_frame_priv(), vk_h264_free_frame_priv(), vk_hevc_free_frame_priv(), vk_prores_free_frame_priv(), vk_prores_raw_free_frame_priv(), and vk_vp9_free_frame_priv().

ff_vk_get_decode_buffer()

int ff_vk_get_decode_buffer ( FFVulkanDecodeContextctx,
AVBufferRef **  buf,
void *  create_pNext,
size_t  size 
)

Get an FFVkBuffer suitable for decoding from.

ff_vk_decode_create_params()

int ff_vk_decode_create_params ( AVBufferRef **  par_ref,
void *  logctx,
const VkVideoSessionParametersCreateInfoKHR *  session_params_create 
)

Create VkVideoSessionParametersKHR wrapped in an AVBufferRef.

Definition at line 1170 of file vulkan_decode.c.

Referenced by vk_av1_create_params(), vk_h264_create_params(), and vk_hevc_create_params().

ff_vk_decode_flush()

void ff_vk_decode_flush ( AVCodecContextavctx )

Flush decoder.

Definition at line 368 of file vulkan_decode.c.

Referenced by ff_vk_decode_init().

ff_vk_decode_uninit()

int ff_vk_decode_uninit ( AVCodecContextavctx )

Free decoder.

Definition at line 1199 of file vulkan_decode.c.

Referenced by ff_vk_decode_init().


Generated on Tue Nov 18 2025 19:24:03 for FFmpeg by   doxygen 1.8.17

AltStyle によって変換されたページ (->オリジナル) /