[FFmpeg-cvslog] vulkan/common: Add put_bytes_count

IndecisiveTurtle git at videolan.org
Thu Nov 28 03:03:21 EET 2024


ffmpeg | branch: master | IndecisiveTurtle <geoster3d at gmail.com> | Wed Nov 27 21:18:07 2024 +0200| [351fd8460a85d8f716248dcd2ba49737994a798d] | committer: Lynne

vulkan/common: Add put_bytes_count

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=351fd8460a85d8f716248dcd2ba49737994a798d
---

 libavcodec/vulkan/common.comp | 6 ++++++
 1 file changed, 6 insertions(+)

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



More information about the ffmpeg-cvslog mailing list