Go to the documentation of this file.
32 for (
int i = 1;
i < 256;
i++) {
33 buf_mapped[256 +
i] =
f->state_transition[
i];
34 buf_mapped[256 -
i] = 256 - (int)
f->state_transition[
i];
49 size_t buf_len = 512*
sizeof(uint8_t);
54 VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT |
55 VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT,
56 VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT |
57 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT));
59 write_data(
s, vkb,
f);
85 VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT |
86 VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT,
87 VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT |
88 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT));
91 memcpy(buf_mapped,
f->quant_tables,
92 sizeof(
f->quant_tables));
105 uint32_t *buf_mapped;
106 size_t buf_len = 256*
sizeof(
int32_t);
111 VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT |
112 VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT,
113 VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT |
114 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT));
117 for (uint32_t
i = 0;
i < 256;
i++) {
118 uint32_t
c =
i << 24;
119 for (
int j = 0; j < 8; j++)
120 c = (
c << 1) ^ (0x04C11DB7 & (((
int32_t)
c) >> 31));
int ff_vk_create_buf(FFVulkanContext *s, FFVkBuffer *buf, size_t size, void *pNext, void *alloc_pNext, VkBufferUsageFlags usage, VkMemoryPropertyFlagBits flags)
int ff_ffv1_vk_init_quant_table_data(FFVulkanContext *s, FFVkBuffer *vkb, FFV1Context *f)
static int ff_vk_map_buffer(FFVulkanContext *s, FFVkBuffer *buf, uint8_t **mem, int invalidate)
#define MAX_QUANT_TABLE_SIZE
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_ffv1_vk_init_crc_table_data(FFVulkanContext *s, FFVkBuffer *vkb, FFV1Context *f)
static int init_state_transition_data(FFVulkanContext *s, FFVkBuffer *vkb, FFV1Context *f, int(*write_data)(FFVulkanContext *s, FFVkBuffer *vkb, FFV1Context *f))
#define i(width, name, range_min, range_max)
static int ff_vk_unmap_buffer(FFVulkanContext *s, FFVkBuffer *buf, int flush)
#define MAX_CONTEXT_INPUTS
int ff_ffv1_vk_init_state_transition_data(FFVulkanContext *s, FFVkBuffer *vkb, FFV1Context *f)
int ff_ffv1_vk_update_state_transition_data(FFVulkanContext *s, FFVkBuffer *vkb, FFV1Context *f)