summaryrefslogtreecommitdiff
path: root/libavcodec/common.h
diff options
context:
space:
mode:
authorJuanjo <pulento@users.sourceforge.net>2001-11-03 00:49:53 +0000
committerJuanjo <pulento@users.sourceforge.net>2001-11-03 00:49:53 +0000
commit4949028f85dec72a5caf322757a6e6fd6ef711d3 (patch)
treeeb19917fca268793ef4f2e829619f78a3ec5b20c /libavcodec/common.h
parent162caf680fce1005d26dd563901f9c878c0326a3 (diff)
- Bug fix on inter MCBPC table for inter+q.
- H.263/H.263+ decoder now knows GOB start codes. - H.263/H.263+ decoder now returns the size of the stream on the first call. - Added show_bits() functions to see the buffer without loosing the bits. - TODO: H.263v1 UMV parsing is buggy. Originally committed as revision 204 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/common.h')
-rw-r--r--libavcodec/common.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/libavcodec/common.h b/libavcodec/common.h
index aafcf5f03b..2b1debac89 100644
--- a/libavcodec/common.h
+++ b/libavcodec/common.h
@@ -196,6 +196,7 @@ void init_get_bits(GetBitContext *s,
UINT8 *buffer, int buffer_size);
unsigned int get_bits_long(GetBitContext *s, int n);
+unsigned int show_bits_long(GetBitContext *s, int n);
static inline unsigned int get_bits(GetBitContext *s, int n){
if(s->bit_cnt>=n){
@@ -225,6 +226,19 @@ static inline unsigned int get_bits1(GetBitContext *s){
return get_bits_long(s,1);
}
+/* This function is identical to get_bits(), the only */
+/* diference is that it doesn't touch the buffer */
+/* it is usefull to see the buffer. */
+static inline unsigned int show_bits(GetBitContext *s, int n)
+{
+ if(s->bit_cnt>=n) {
+ /* most common case here */
+ unsigned int val = s->bit_buf >> (32 - n);
+ return val;
+ }
+ return show_bits_long(s,n);
+}
+
static inline void skip_bits(GetBitContext *s, int n){
if(s->bit_cnt>=n){
/* most common case here */