summaryrefslogtreecommitdiffstats
path: root/liba52/bitstream.c
diff options
context:
space:
mode:
authormichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-17 21:53:49 +0000
committermichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-17 21:53:49 +0000
commit0b64a4a64a493602844d0ec7d9f80fe7fe6a3372 (patch)
treec1f67d8e6b27ae83a91e83810f29fa6b16cf1eaf /liba52/bitstream.c
parent61c3a3af34e6c58e6af70394e4190015901e9d84 (diff)
downloadmpv-0b64a4a64a493602844d0ec7d9f80fe7fe6a3372.tar.bz2
mpv-0b64a4a64a493602844d0ec7d9f80fe7fe6a3372.tar.xz
faster (and simpler) bitstream reader (in C)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3571 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'liba52/bitstream.c')
-rw-r--r--liba52/bitstream.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/liba52/bitstream.c b/liba52/bitstream.c
index 0a48cab2c4..9c01de8ff7 100644
--- a/liba52/bitstream.c
+++ b/liba52/bitstream.c
@@ -31,7 +31,12 @@
#define BUFFER_SIZE 4096
+#ifdef ALT_BITSTREAM_READER
+int indx=0;
+uint32_t * buffer_start;
+#else
static uint32_t * buffer_start;
+#endif
uint32_t bits_left;
uint32_t current_word;
@@ -43,6 +48,9 @@ void bitstream_set_ptr (uint8_t * buf)
align = (int)buf & 3;
buffer_start = (uint32_t *) (buf - align);
bits_left = 0;
+#ifdef ALT_BITSTREAM_READER
+ indx=0;
+#endif
bitstream_get (align * 8);
}