[libbluray-devel] bits: move seek functions to .c file
hpi1
git at videolan.org
Thu Apr 2 10:33:13 CEST 2015
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Thu Apr 2 11:25:16 2015 +0300| [44f9a66d54d8f62cb8a8dd9eca260917be7153c7] | committer: hpi1
bits: move seek functions to .c file
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=44f9a66d54d8f62cb8a8dd9eca260917be7153c7
---
src/util/bits.c | 13 ++++++++++++-
src/util/bits.h | 13 ++-----------
2 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/src/util/bits.c b/src/util/bits.c
index 01999ce..17dce21 100644
--- a/src/util/bits.c
+++ b/src/util/bits.c
@@ -25,7 +25,7 @@
#include "file/file.h"
#include "util/logging.h"
-#include <stdio.h>
+#include <stdio.h> // SEEK_*
/**
* \file
@@ -122,6 +122,17 @@ void bs_seek( BITSTREAM *bs, int64_t off, int whence)
}
}
+void bb_seek_byte( BITBUFFER *bb, int64_t off)
+{
+ bb_seek(bb, off << 3, SEEK_SET);
+}
+
+void bs_seek_byte( BITSTREAM *s, int64_t off)
+{
+ bs_seek(s, off << 3, SEEK_SET);
+}
+
+
uint32_t bb_read( BITBUFFER *bb, int i_count )
{
static const uint32_t i_mask[33] = {
diff --git a/src/util/bits.h b/src/util/bits.h
index e33c625..df8be8a 100644
--- a/src/util/bits.h
+++ b/src/util/bits.h
@@ -27,7 +27,6 @@
#include "file/filesystem.h" // BD_FILE_H
#include <stdint.h>
-#include <stdio.h> // SEEK_*
#include <stddef.h> // size_t
@@ -59,6 +58,8 @@ BD_PRIVATE void bb_init( BITBUFFER *bb, const uint8_t *p_data, size_t i_data );
BD_PRIVATE void bs_init( BITSTREAM *bs, BD_FILE_H *fp );
BD_PRIVATE void bb_seek( BITBUFFER *bb, int64_t off, int whence);
BD_PRIVATE void bs_seek( BITSTREAM *bs, int64_t off, int whence);
+BD_PRIVATE void bb_seek_byte( BITBUFFER *bb, int64_t off);
+BD_PRIVATE void bs_seek_byte( BITSTREAM *s, int64_t off);
BD_PRIVATE void bb_skip( BITBUFFER *bb, size_t i_count );
BD_PRIVATE void bs_skip( BITSTREAM *bs, size_t i_count ); /* note: i_count must be less than BF_BUF_SIZE */
BD_PRIVATE uint32_t bb_read( BITBUFFER *bb, int i_count );
@@ -95,16 +96,6 @@ static inline int64_t bs_avail( const BITSTREAM *bs )
return bs_end(bs) - bs_pos(bs);
}
-static inline void bb_seek_byte( BITBUFFER *bb, int64_t off)
-{
- bb_seek(bb, off << 3, SEEK_SET);
-}
-
-static inline void bs_seek_byte( BITSTREAM *s, int64_t off)
-{
- bs_seek(s, off << 3, SEEK_SET);
-}
-
static inline void bb_read_bytes( BITBUFFER *bb, uint8_t *buf, int i_count )
{
int ii;
More information about the libbluray-devel
mailing list