Go to the documentation of this file.
49 #define APV_DEFAULT_QMAT 16
50 #define APV_MAX_NUM_COMP 4
170 16, 16, 16, 16, 17, 18, 21, 24,
171 16, 16, 16, 16, 17, 19, 22, 25,
172 16, 16, 17, 18, 20, 22, 25, 29,
173 16, 16, 18, 21, 24, 27, 31, 36,
174 17, 17, 20, 24, 30, 35, 41, 47,
175 18, 19, 22, 27, 35, 44, 54, 65,
176 21, 22, 25, 31, 41, 54, 70, 88,
177 24, 25, 29, 36, 47, 65, 88, 115,
243 (uint32_t []) { 8, 4, 1 }, 0);
246 VK_SHADER_STAGE_COMPUTE_BIT);
250 .
name =
"coeffs_buf",
251 .type = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
252 .stages = VK_SHADER_STAGE_COMPUTE_BIT,
256 .type = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE,
257 .stages = VK_SHADER_STAGE_COMPUTE_BIT,
285 (uint32_t []) { wg, 1, 1 }, 0);
288 VK_SHADER_STAGE_COMPUTE_BIT);
292 .
name =
"coeffs_buf",
293 .type = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
294 .stages = VK_SHADER_STAGE_COMPUTE_BIT,
298 .type = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
299 .stages = VK_SHADER_STAGE_COMPUTE_BIT,
321 (uint32_t []) { 256, 1, 1 }, 0);
324 VK_SHADER_STAGE_COMPUTE_BIT);
329 .type = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
330 .stages = VK_SHADER_STAGE_COMPUTE_BIT,
374 int qp = (
c == 0 ||
c == 3) ? ev->
qp_y : ev->
qp_c;
376 int qp_shift = qp / 6;
387 for (
int i = 0;
i < 64;
i++)
402 VkBufferMemoryBarrier2 buf_bar[4];
412 VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
414 VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT));
422 VK_BUFFER_USAGE_STORAGE_BUFFER_BIT |
423 VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT,
425 VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT));
433 VK_BUFFER_USAGE_STORAGE_BUFFER_BIT |
434 VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT,
436 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
437 VK_MEMORY_PROPERTY_HOST_CACHED_BIT));
441 VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
443 VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT |
444 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
445 VK_MEMORY_PROPERTY_HOST_COHERENT_BIT));
456 VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT,
457 VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT));
462 img_bar, &nb_img_bar,
463 VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT,
464 VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT,
465 VK_ACCESS_SHADER_READ_BIT,
466 VK_IMAGE_LAYOUT_GENERAL,
467 VK_QUEUE_FAMILY_IGNORED);
469 vk->CmdPipelineBarrier2(exec->
buf, &(VkDependencyInfo) {
470 .sType = VK_STRUCTURE_TYPE_DEPENDENCY_INFO,
471 .pImageMemoryBarriers = img_bar,
472 .imageMemoryBarrierCount = nb_img_bar,
480 coeffs_buf, 0, coeffs_buf->
size,
481 VK_FORMAT_UNDEFINED);
485 VK_IMAGE_LAYOUT_GENERAL,
490 VK_SHADER_STAGE_COMPUTE_BIT,
493 vk->CmdDispatch(exec->
buf,
499 COMPUTE_SHADER_BIT, SHADER_WRITE_BIT,
NONE,
500 COMPUTE_SHADER_BIT, SHADER_READ_BIT,
NONE,
501 0, coeffs_buf->
size);
503 vk->CmdPipelineBarrier2(exec->
buf, &(VkDependencyInfo) {
504 .sType = VK_STRUCTURE_TYPE_DEPENDENCY_INFO,
505 .pBufferMemoryBarriers = buf_bar,
506 .bufferMemoryBarrierCount = nb_buf_bar,
519 uint32_t z_comps = (
p == 0) ? 1 : ev->
num_comp - 1;
529 .comp_base = (uint32_t)
p,
539 coeffs_buf, 0, coeffs_buf->
size,
540 VK_FORMAT_UNDEFINED);
542 sizes_buf, 0, sizes_buf->
size,
543 VK_FORMAT_UNDEFINED);
547 VK_SHADER_STAGE_COMPUTE_BIT,
556 if (!ev->headers_only) {
558 COMPUTE_SHADER_BIT, SHADER_WRITE_BIT,
NONE,
559 COMPUTE_SHADER_BIT, SHADER_READ_BIT,
NONE,
560 0, bytestream_buf->size);
562 COMPUTE_SHADER_BIT, SHADER_WRITE_BIT,
NONE,
563 COMPUTE_SHADER_BIT, SHADER_READ_BIT,
NONE,
565 vk->CmdPipelineBarrier2(exec->buf, &(VkDependencyInfo) {
566 .sType = VK_STRUCTURE_TYPE_DEPENDENCY_INFO,
567 .pBufferMemoryBarriers = buf_bar,
568 .bufferMemoryBarrierCount = nb_buf_bar,
573 .
sparse = bytestream_buf->address,
574 .compacted = compacted_buf->address,
575 .slot_size = (uint32_t)ev->slot_size,
580 sizes_buf, 0, sizes_buf->size,
581 VK_FORMAT_UNDEFINED);
584 VK_SHADER_STAGE_COMPUTE_BIT,
587 vk->CmdDispatch(exec->buf, ev->tile_count * ev->num_comp, 1, 1);
616 static uint8_t headers_only_tile;
621 if (!(compacted_buf->
flags & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT)) {
622 VkMappedMemoryRange
r = {
623 .sType = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE,
624 .memory = compacted_buf->
mem,
626 .size = VK_WHOLE_SIZE,
630 if (!(sizes_buf->flags & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT)) {
631 VkMappedMemoryRange
r = {
632 .sType = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE,
633 .memory = sizes_buf->mem,
635 .size = VK_WHOLE_SIZE,
639 sizes = (
const uint32_t *)sizes_buf->mapped_mem;
672 for (
int y = 0; y < 8; y++)
673 for (
int x = 0; x < 8; x++)
684 uint32_t comp_off = 0;
687 uint32_t total_tile_data = 0;
689 tile->tile_header.tile_header_size =
691 tile->tile_header.tile_index = t;
698 tile->tile_data[
c] = &headers_only_tile;
704 tile->tile_header.tile_data_size[
c] = sz;
705 tile->tile_header.tile_qp[
c] =
707 total_tile_data += sz;
709 tile->tile_header.reserved_zero_8bits = 0;
710 tile->tile_dummy_byte_size = 0;
714 tile->tile_header.tile_header_size + total_tile_data;
718 ff_cbs_fragment_reset(&ev->
au);
731 err = ff_cbs_write_packet(ev->
cbc,
pkt, &ev->
au);
835 ff_cbs_fragment_free(&ev->
au);
836 ff_cbs_close(&ev->
cbc);
900 "Tile size %dx%d MBs is below the spec minimum of %dx%d: "
901 "NON-CONFORMANT bitstream, most decoders will reject it.\n",
936 "Tile-component has too many transform blocks (%d > 1024).\n",
947 if (ev->
qp_y < 0 || ev->
qp_y > max_qp || ev->
qp_c < 0 || ev->
qp_c > max_qp) {
949 "QP out of range [0, %d]: qp_y=%d, qp_c=%d.\n",
967 "APV Vulkan encoder: %dx%d, %d tiles (%dx%d MBs each), "
968 "qp_y=%d qp_c=%d, coeffs=%zu KiB, bytestream=%zu KiB\n",
979 "APV_VULKAN_HEADERS_ONLY set: tiles will not be downloaded "
980 "or assembled; output packets contain headers only.\n");
983 "APV_VULKAN_SKIP_ENTROPY set: entropy dispatch skipped "
984 "(DCT-only benchmark mode).\n");
1041 #define OFFSET(x) offsetof(VulkanEncodeAPVContext, x)
1042 #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
1044 {
"qp",
"Quantization parameter (luma)",
OFFSET(qp_y),
1046 {
"qp_chroma",
"Chroma quantization parameter (0 = same as luma qp)",
OFFSET(qp_c),
1048 {
"qmatrix",
"Quantization matrix",
OFFSET(qmatrix),
1050 {
"flat",
"Uniform matrix, all 16 (APV spec default)", 0,
1052 {
"hevc",
"HEVC default intra scaling list (mild perceptual shaping)", 0,
1058 {
"tile_width",
"Tile width in macroblocks (0 = adaptive, auto-sized per frame)",
OFFSET(tile_w_mbs_opt),
1060 {
"tile_height",
"Tile height in macroblocks (0 = adaptive, auto-sized per frame)",
OFFSET(tile_h_mbs_opt),
1062 {
"async_depth",
"Internal parallelization depth",
OFFSET(async_depth),
1085 .
p.
name =
"apv_vulkan",
1103 .p.wrapper_name =
"vulkan",
uint8_t capture_time_distance
#define CODEC_PIXFMTS(...)
const unsigned char ff_seg_gather_comp_spv_data[]
#define AV_LOG_WARNING
Something somehow does not look correct.
AVPixelFormat
Pixel format.
const FFCodec ff_apv_vulkan_encoder
AVBufferRef * compacted_ref
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
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
static int init_compact_shader(AVCodecContext *avctx)
enum AVPixelFormat sw_format
static const AVOption vulkan_encode_apv_options[]
void ff_vk_shader_free(FFVulkanContext *s, FFVulkanShader *shd)
Free a shader.
const unsigned char ff_apv_encode_dct_comp_spv_data[]
FFVkExecContext * contexts
static const AVCodecHWConfigInternal *const vulkan_encode_apv_hw_configs[]
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
#define AVERROR_EOF
End of file.
uint8_t * data
The data buffer.
#define AV_CODEC_CAP_HARDWARE
Codec is backed by a hardware implementation.
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.
#define FF_CODEC_CAP_EOF_FLUSH
The encoder has AV_CODEC_CAP_DELAY set, but does not actually have delay - it only wants to be flushe...
CodedBitstreamContext * cbc
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
static int vulkan_encode_apv_receive_packet(AVCodecContext *avctx, AVPacket *pkt)
This structure describes decoded (raw) audio or video data.
AVVulkanDeviceQueueFamily * qf
@ APV_MIN_TILE_HEIGHT_IN_MBS
const static int level_scale[2][6]
Context structure for coded bitstream operations.
APVRawTile tile[APV_MAX_TILE_COUNT]
AVBufferPool * compacted_pool
static int profile_idc_from_pix_fmt(enum AVPixelFormat sw_fmt)
#define AV_LOG_VERBOSE
Detailed information.
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
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.
FFVkExecContext * ff_vk_exec_get(FFVulkanContext *s, FFVkExecPool *pool)
Retrieve an execution pool.
void ff_vk_uninit(FFVulkanContext *s)
Frees main context.
uint32_t tile_width_in_mbs
#define SPEC_LIST_ADD(name, idx, val_bits, val)
static const uint8_t apv_level_scale[6]
uint8_t tile_size_present_in_fh_flag
static int init_entropy_shader(AVCodecContext *avctx, int blocks_per_mb, FFVulkanShader *shd)
void ff_vk_exec_bind_shader(FFVulkanContext *s, FFVkExecContext *e, const FFVulkanShader *shd)
Bind a shader.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
@ AV_PIX_FMT_VULKAN
Vulkan hardware images.
int ff_vk_exec_add_dep_frame(FFVulkanContext *s, FFVkExecContext *e, AVFrame *f, VkPipelineStageFlagBits2 wait_stage, VkPipelineStageFlagBits2 signal_stage)
static int build_packet(AVCodecContext *avctx, FFVkExecContext *exec, AVPacket *pkt)
int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt)
#define AV_CODEC_FLAG_COPY_OPAQUE
AVCodec p
The public AVCodec.
const unsigned char ff_apv_encode_tiles_comp_spv_data[]
AVBufferRef * opaque_ref
AVBufferRef for free use by the API user.
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.
APVRawPBUHeader pbu_header
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)
int ff_vk_shader_register_exec(FFVulkanContext *s, FFVkExecPool *pool, FFVulkanShader *shd)
Register a shader with an exec pool.
int flags
AV_CODEC_FLAG_*.
#define AV_CODEC_CAP_ENCODER_FLUSH
This encoder can be flushed using avcodec_flush_buffers().
const unsigned int ff_apv_encode_tiles_comp_spv_len
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
#define AV_PIX_FMT_YUV444P10
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
APVRawFrameHeader frame_header
Coded bitstream fragment structure, combining one or more units.
static int submit_frame(AVCodecContext *avctx, FFVkExecContext *exec, AVFrame *frame)
void ff_vk_exec_wait(FFVulkanContext *s, FFVkExecContext *e)
#define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
This encoder can reorder user opaque values from input AVFrames and return them with corresponding ou...
uint32_t tile_height_in_mbs
#define AV_PIX_FMT_YUVA444P12
VkDeviceAddress compacted
int ff_vk_exec_add_dep_buf(FFVulkanContext *s, FFVkExecContext *e, AVBufferRef **deps, int nb_deps, int ref)
Execution dependency management.
void ff_vk_exec_pool_free(FFVulkanContext *s, FFVkExecPool *pool)
void * opaque
for some private data of the user
#define CODEC_LONG_NAME(str)
#define AV_PIX_FMT_GRAY10
float qf[APV_MAX_NUM_COMP]
#define LIBAVUTIL_VERSION_INT
Describe the class of an AVClass context structure.
static const int sizes[][2]
enum AVPixelFormat sw_format
The pixel format identifying the actual data layout of the hardware frames.
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
void av_buffer_unref(AVBufferRef **buf)
Free a given reference and automatically free the buffer if there are no more references to it.
#define FF_CODEC_RECEIVE_PACKET_CB(func)
const unsigned int ff_seg_gather_comp_spv_len
const char * av_default_item_name(void *ptr)
Return the context name.
static av_cold int vulkan_encode_apv_close(AVCodecContext *avctx)
void av_buffer_pool_uninit(AVBufferPool **ppool)
Mark the pool as being available for freeing.
uint8_t q_matrix[APV_MAX_NUM_COMP][APV_TR_SIZE][APV_TR_SIZE]
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.
#define SPEC_LIST_CREATE(name, max_length, max_size)
#define AV_PIX_FMT_YUV422P10
static const uint8_t apv_qmat_hevc_intra[64]
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
FFVulkanShader shd_entropy[2]
#define ff_vk_buf_barrier(dst, vkb, s_stage, s_access, s_access2, d_stage, d_access, d_access2, offs, bsz)
int(* init)(AVBSFContext *ctx)
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
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.
#define i(width, name, range_min, range_max)
#define AV_PIX_FMT_YUV422P12
#define AV_NUM_DATA_POINTERS
static const AVClass vulkan_encode_apv_class
#define AV_PIX_FMT_YUV444P12
static int apv_qmatrix_value(int qmatrix, int i)
uint8_t chroma_format_idc
static void build_dct_push_const(AVCodecContext *avctx)
AVBufferPool * bytestream_pool
VkMemoryPropertyFlagBits flags
AVBufferRef * frame_opaque_ref
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed.
#define AV_PIX_FMT_YUVA444P10
static int init_dct_shader(AVCodecContext *avctx)
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.
int flags
A combination of AV_PKT_FLAG values.
static double fact(double i)
#define HW_CONFIG_ENCODER_FRAMES(format, device_type_)
static const FFCodecDefault vulkan_encode_apv_defaults[]
int ff_vk_exec_start(FFVulkanContext *s, FFVkExecContext *e)
Start/submit/wait an execution.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
AVBufferPool * sizes_pool
void av_frame_unref(AVFrame *frame)
Unreference all the buffers referenced by frame and reset the frame fields.
const char * name
Name of the codec implementation.
void * av_calloc(size_t nmemb, size_t size)
AVBufferPool * coeffs_pool
AVBufferRef * hw_frames_ctx
A reference to the AVHWFramesContext describing the input (for encoding) or output (decoding) frames.
This struct describes a set or pool of "hardware" frames (i.e.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
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 it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
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.
static int FUNC() tile(CodedBitstreamContext *ctx, RWContext *rw, APVRawTile *current, int tile_idx, uint32_t tile_size)
int ff_vk_shader_add_push_const(FFVulkanShader *shd, int offset, int size, VkShaderStageFlagBits stage)
Add/update push constants for execution.
AVVulkanDeviceQueueFamily * ff_vk_qf_find(FFVulkanContext *s, VkQueueFlagBits dev_family, VkVideoCodecOperationFlagBitsKHR vid_ops)
Chooses an appropriate QF.
main external API structure.
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.
AVBufferRef * bytestream_ref
@ AV_OPT_TYPE_INT
Underlying C type is int.
#define AV_CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
IDirect3DDxgiInterfaceAccess _COM_Outptr_ void ** p
CodedBitstreamFragment au
AVVulkanDeviceContext * hwctx
int ff_encode_get_frame(AVCodecContext *avctx, AVFrame *frame)
Called by encoders to get the next frame for encoding.
A reference to a data buffer.
static av_cold int vulkan_encode_apv_init(AVCodecContext *avctx)
uint32_t tile_size[APV_MAX_TILE_COUNT]
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
VkDevice act_dev
Active device.
void ff_vk_exec_discard_deps(FFVulkanContext *s, FFVkExecContext *e)
This structure stores compressed data.
const unsigned int ff_apv_encode_dct_comp_spv_len
int width
picture width / height.
int ff_vk_exec_submit(FFVulkanContext *s, FFVkExecContext *e)
VkDeviceAddress bytestream
@ APV_MIN_TILE_WIDTH_IN_MBS
#define AV_PIX_FMT_GRAY12
VulkanEncodeAPVFrameData * exec_ctx_info
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
int ff_vk_shader_load(FFVulkanShader *shd, VkPipelineStageFlags stage, VkSpecializationInfo *spec, uint32_t wg_size[3], uint32_t required_subgroup_size)
Initialize a shader object.
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.
FFVulkanShader shd_compact
static int chroma_format_from_pix_fmt(enum AVPixelFormat sw_fmt)
const char * av_get_pix_fmt_name(enum AVPixelFormat pix_fmt)
Return the short name for a pixel format, NULL in case pix_fmt is unknown.