1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-29 22:00:58 +02:00

vulkan/common: Add put_bytes_count

This commit is contained in:
IndecisiveTurtle 2024-11-27 21:18:07 +02:00 committed by Lynne
parent e3ac63b213
commit 351fd8460a

View File

@ -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);
}