diff options
author | Lynne <dev@lynne.ee> | 2024-11-19 08:55:17 +0100 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2024-11-20 05:23:05 +0100 |
commit | eb536d97a0271cf5cbeae74533258f01c241bc5f (patch) | |
tree | d1b89df9d89101527d2395be110b2c6aa85e8016 /libavcodec/vulkan | |
parent | 69cbda5770d2fb0d7f11de3a7ba0fea16c6b65b4 (diff) | |
download | ffmpeg-eb536d97a0271cf5cbeae74533258f01c241bc5f.tar.gz |
ffv1enc_vulkan: support buffers larger than 4GiB
Unlike the software FFv1 encoder, none of our buffers are allocated by
FFmpeg, which supports at most 4GiB large allocations.
For really large sizes, the maximum size of the buffer can exceed 4GiB,
which the software encoder optimistically tries to allocate as 4GiB
in the hopes that the encoder will compress to under that amount.
We can just let Vulkan allocate us a larger buffer, and switch to
64-bit offsets.
Diffstat (limited to 'libavcodec/vulkan')
-rw-r--r-- | libavcodec/vulkan/ffv1_enc_common.comp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vulkan/ffv1_enc_common.comp b/libavcodec/vulkan/ffv1_enc_common.comp index 759882f5c9..62c0624b0e 100644 --- a/libavcodec/vulkan/ffv1_enc_common.comp +++ b/libavcodec/vulkan/ffv1_enc_common.comp @@ -97,5 +97,5 @@ void finalize_slice(inout SliceContext sc, const uint slice_idx) } slice_results[slice_idx*2 + 0] = enc_len; - slice_results[slice_idx*2 + 1] = uint32_t(uint64_t(bs) - uint64_t(out_data)); + slice_results[slice_idx*2 + 1] = uint64_t(bs) - uint64_t(out_data); } |