Go to the documentation of this file.
25 VkSpecializationInfo *sl,
36 for (
int i = 0;
i <
f->quant_table_count;
i++) {
37 if (
f->quant_tables[
i][3][127] ||
f->quant_tables[
i][4][127]) {
60 for (uint32_t
i = 0;
i < 256;
i++) {
62 for (
int j = 0; j < 8; j++)
63 c = (
c << 1) ^ (0x04C11DB7 & (((
int32_t)
c) >> 31));
70 for (
int i = 1;
i < 256;
i++) {
71 buf[256 +
i] =
f->state_transition[
i];
72 buf[256 -
i] = 256 - (int)
f->state_transition[
i];
81 size_t buf_len = 256*
sizeof(uint32_t) +
90 VK_BUFFER_USAGE_STORAGE_BUFFER_BIT |
91 VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT,
92 VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT |
93 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT));
100 memcpy(buf_mapped + 256*
sizeof(uint32_t) + 512*
sizeof(uint8_t),
101 f->quant_tables,
sizeof(
f->quant_tables));
int ff_vk_create_buf(FFVulkanContext *s, FFVkBuffer *buf, size_t size, void *pNext, void *alloc_pNext, VkBufferUsageFlags usage, VkMemoryPropertyFlagBits flags)
AVPixelFormat
Pixel format.
@ AV_PIX_FMT_YA8
8 bits gray, 8 bits alpha
static void set_crc_tab(uint32_t *buf)
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
static int ff_vk_map_buffer(FFVulkanContext *s, FFVkBuffer *buf, uint8_t **mem, int invalidate)
#define MAX_QUANT_TABLE_SIZE
#define SPEC_LIST_ADD(name, idx, val_bits, val)
int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt)
static void set_rc_state_tab(FFV1Context *f, uint8_t *buf)
int ff_ffv1_vk_init_consts(FFVulkanContext *s, FFVkBuffer *vkb, FFV1Context *f)
uint8_t nb_components
The number of components each pixel has, (1-4)
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
int ff_vk_mt_is_np_rgb(enum AVPixelFormat pix_fmt)
Returns 1 if pixfmt is a usable RGB format.
void ff_ffv1_vk_set_common_sl(AVCodecContext *avctx, FFV1Context *f, VkSpecializationInfo *sl, enum AVPixelFormat sw_format)
#define i(width, name, range_min, range_max)
static int ff_vk_unmap_buffer(FFVulkanContext *s, FFVkBuffer *buf, int flush)
#define MAX_CONTEXT_INPUTS
main external API structure.
#define AV_PIX_FMT_FLAG_PLANAR
At least one pixel component is not in the first data plane.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...