[vlc-commits] vlc_bits.h: move in exp golomb bitstream decoding
Francois Cartegnie
git at videolan.org
Thu Dec 3 17:34:57 CET 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Dec 2 17:12:58 2015 +0100| [b6ddadea5c08be6d184518fc8a6384793e0f8bb6] | committer: Francois Cartegnie
vlc_bits.h: move in exp golomb bitstream decoding
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b6ddadea5c08be6d184518fc8a6384793e0f8bb6
---
include/vlc_bits.h | 19 +++++++++++++++++++
modules/demux/mpeg/mpeg_parser_helpers.h | 19 -------------------
modules/mux/mp4/mp4.c | 1 -
modules/packetizer/h264.c | 1 -
4 files changed, 19 insertions(+), 21 deletions(-)
diff --git a/include/vlc_bits.h b/include/vlc_bits.h
index 91bb0fc..d7a9689 100644
--- a/include/vlc_bits.h
+++ b/include/vlc_bits.h
@@ -208,4 +208,23 @@ static inline void bs_align_1( bs_t *s )
}
}
+/* Read unsigned Exp-Golomb code */
+static inline uint32_t bs_read_ue( bs_t * bs )
+{
+ int32_t i = 0;
+
+ while( bs_read1( bs ) == 0 && bs->p < bs->p_end && i < 32 )
+ i++;
+
+ return (1 << i) - 1 + bs_read( bs, i );
+}
+
+/* Read signed Exp-Golomb code */
+static inline int32_t bs_read_se( bs_t *s )
+{
+ int val = bs_read_ue( s );
+
+ return val&0x01 ? (val+1)/2 : -(val/2);
+}
+
#endif
diff --git a/modules/demux/mpeg/mpeg_parser_helpers.h b/modules/demux/mpeg/mpeg_parser_helpers.h
index 50c828b..e0ae3fb 100644
--- a/modules/demux/mpeg/mpeg_parser_helpers.h
+++ b/modules/demux/mpeg/mpeg_parser_helpers.h
@@ -51,25 +51,6 @@ static inline void hevc_skip_profile_tiers_level( bs_t * bs, int32_t max_sub_lay
}
}
-/* Read unsigned Exp-Golomb code */
-static inline uint32_t bs_read_ue( bs_t * bs )
-{
- int32_t i = 0;
-
- while( bs_read1( bs ) == 0 && bs->p < bs->p_end && i < 32 )
- i++;
-
- return (1 << i) - 1 + bs_read( bs, i );
-}
-
-/* Read signed Exp-Golomb code */
-static inline int32_t bs_read_se( bs_t *s )
-{
- int val = bs_read_ue( s );
-
- return val&0x01 ? (val+1)/2 : -(val/2);
-}
-
/* Discards emulation prevention three bytes */
static inline size_t nal_to_rbsp(const uint8_t * p_src, uint8_t * p_dst, size_t i_size)
{
diff --git a/modules/mux/mp4/mp4.c b/modules/mux/mp4/mp4.c
index b1b5acd..bcc2ac7 100644
--- a/modules/mux/mp4/mp4.c
+++ b/modules/mux/mp4/mp4.c
@@ -41,7 +41,6 @@
#include <vlc_iso_lang.h>
#include <vlc_meta.h>
-//#include "../demux/mpeg/mpeg_parser_helpers.h"
#include "../demux/mp4/libmp4.h"
#include "libmp4mux.h"
diff --git a/modules/packetizer/h264.c b/modules/packetizer/h264.c
index 3b8e339..0d616d1 100644
--- a/modules/packetizer/h264.c
+++ b/modules/packetizer/h264.c
@@ -43,7 +43,6 @@
#include "../codec/cc.h"
#include "h264_nal.h"
#include "packetizer_helper.h"
-#include "../demux/mpeg/mpeg_parser_helpers.h"
/*****************************************************************************
* Module descriptor
More information about the vlc-commits
mailing list