[FFmpeg-devel] [PATCH 3/3] vulkan/common: Add put_bytes_count
IndecisiveTurtle
geoster3d at gmail.com
Wed Nov 27 21:18:07 EET 2024
---
libavcodec/vulkan/common.comp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/vulkan/common.comp b/libavcodec/vulkan/common.comp
index e0874d304f..799aa86f64 100644
--- a/libavcodec/vulkan/common.comp
+++ b/libavcodec/vulkan/common.comp
@@ -172,3 +172,8 @@ uint64_t put_bits_count(in PutBitContext pb)
{
return (pb.buf - pb.buf_start)*8 + BUF_BITS - pb.bit_left;
}
+
+int32_t put_bytes_count(in PutBitContext pb) {
+ uint64_t num_bytes = (pb.buf - pb.buf_start) + ((BUF_BITS - pb.bit_left) >> 3);
+ return int32_t(num_bytes);
+}
\ No newline at end of file
--
2.47.1
More information about the ffmpeg-devel
mailing list