diff options
author | IndecisiveTurtle <geoster3d@gmail.com> | 2024-11-27 21:18:07 +0200 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2024-11-28 10:03:01 +0900 |
commit | 351fd8460a85d8f716248dcd2ba49737994a798d (patch) | |
tree | b6a4f0aa652503e9e398029f07c3c5ee3f4495c6 /libavcodec | |
parent | e3ac63b213dedb69412aa53f473d48d4b069ca59 (diff) | |
download | ffmpeg-351fd8460a85d8f716248dcd2ba49737994a798d.tar.gz |
vulkan/common: Add put_bytes_count
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/vulkan/common.comp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/vulkan/common.comp b/libavcodec/vulkan/common.comp index e0874d304f..7572bfb4fa 100644 --- a/libavcodec/vulkan/common.comp +++ b/libavcodec/vulkan/common.comp @@ -172,3 +172,9 @@ uint64_t put_bits_count(in PutBitContext pb) { return (pb.buf - pb.buf_start)*8 + BUF_BITS - pb.bit_left; } + +uint32_t put_bytes_count(in PutBitContext pb) +{ + uint64_t num_bytes = (pb.buf - pb.buf_start) + ((BUF_BITS - pb.bit_left) >> 3); + return uint32_t(num_bytes); +} |