diff options
author | Lynne <dev@lynne.ee> | 2025-05-01 19:45:08 +0200 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2025-05-20 19:53:01 +0900 |
commit | bd41838b60660f2313f4822fa8899b657949d52e (patch) | |
tree | 317e755e720438c5dea3476ffe3b874b76adaf7c /libavcodec/vulkan_ffv1.c | |
parent | 52595025c5aab5986b39ea9276c959ea6f801b78 (diff) | |
download | ffmpeg-bd41838b60660f2313f4822fa8899b657949d52e.tar.gz |
ffv1enc_vulkan: switch to 2-line cache, unify prediction code
Diffstat (limited to 'libavcodec/vulkan_ffv1.c')
-rw-r--r-- | libavcodec/vulkan_ffv1.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/vulkan_ffv1.c b/libavcodec/vulkan_ffv1.c index cbde2f319a..efbf5fa953 100644 --- a/libavcodec/vulkan_ffv1.c +++ b/libavcodec/vulkan_ffv1.c @@ -26,6 +26,8 @@ #include "libavutil/vulkan_spirv.h" #include "libavutil/mem.h" +#define RGB_LINECACHE 2 + extern const char *ff_source_common_comp; extern const char *ff_source_rangecoder_comp; extern const char *ff_source_ffv1_vlc_comp; @@ -610,6 +612,7 @@ static void define_shared_code(FFVulkanShader *shd, int use32bit) GLSLC(0, #define DECODE ); + av_bprintf(&shd->src, "#define RGB_LINECACHE %i\n" ,RGB_LINECACHE); av_bprintf(&shd->src, "#define CONTEXT_SIZE %i\n" ,CONTEXT_SIZE); av_bprintf(&shd->src, "#define MAX_QUANT_TABLE_MASK 0x%x\n" ,MAX_QUANT_TABLE_MASK); @@ -936,7 +939,7 @@ static int init_indirect(AVCodecContext *avctx, FFVulkanContext *s, frames_ctx->format = AV_PIX_FMT_VULKAN; frames_ctx->sw_format = sw_format; frames_ctx->width = s->frames->width; - frames_ctx->height = f->num_v_slices*2; + frames_ctx->height = f->num_v_slices*RGB_LINECACHE; vk_frames = frames_ctx->hwctx; vk_frames->tiling = VK_IMAGE_TILING_OPTIMAL; |