[Mplayer-cvslog] CVS: main/liba52 bitstream.h,1.2,1.3 parse.c,1.2,1.3

Michael Niedermayer michael at mplayer.dev.hu
Tue Jan 8 15:49:20 CET 2002


Update of /cvsroot/mplayer/main/liba52
In directory mplayer:/var/tmp.root/cvs-serv20820

Modified Files:
	bitstream.h parse.c 
Log Message:
bitstream_skip() instead of bitstream_get() if possible


Index: bitstream.h
===================================================================
RCS file: /cvsroot/mplayer/main/liba52/bitstream.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- bitstream.h	17 Dec 2001 21:53:49 -0000	1.2
+++ bitstream.h	8 Jan 2002 14:49:17 -0000	1.3
@@ -86,6 +86,15 @@
 #endif
 }
 
+static inline void bitstream_skip(int num_bits)
+{
+#ifdef ALT_BITSTREAM_READER
+	indx+= num_bits;
+#else
+	bitstream_get(num_bits);
+#endif
+}
+
 static inline int32_t 
 bitstream_get_2(uint32_t num_bits)
 {

Index: parse.c
===================================================================
RCS file: /cvsroot/mplayer/main/liba52/parse.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- parse.c	30 Dec 2001 21:53:56 -0000	1.2
+++ parse.c	8 Jan 2002 14:49:17 -0000	1.3
@@ -155,28 +155,28 @@
 
     chaninfo = !acmod;
     do {
-	bitstream_get (5);	/* dialnorm */
+	bitstream_skip (5);	/* dialnorm */
 	if (bitstream_get (1))	/* compre */
-	    bitstream_get (8);	/* compr */
+	    bitstream_skip (8);	/* compr */
 	if (bitstream_get (1))	/* langcode */
-	    bitstream_get (8);	/* langcod */
+	    bitstream_skip (8);	/* langcod */
 	if (bitstream_get (1))	/* audprodie */
-	    bitstream_get (7);	/* mixlevel + roomtyp */
+	    bitstream_skip (7);	/* mixlevel + roomtyp */
     } while (chaninfo--);
 
-    bitstream_get (2);		/* copyrightb + origbs */
+    bitstream_skip (2);		/* copyrightb + origbs */
 
     if (bitstream_get (1))	/* timecod1e */
-	bitstream_get (14);	/* timecod1 */
+	bitstream_skip (14);	/* timecod1 */
     if (bitstream_get (1))	/* timecod2e */
-	bitstream_get (14);	/* timecod2 */
+	bitstream_skip (14);	/* timecod2 */
 
     if (bitstream_get (1)) {	/* addbsie */
 	int addbsil;
 
 	addbsil = bitstream_get (6);
 	do {
-	    bitstream_get (8);	/* addbsi */
+	    bitstream_skip (8);	/* addbsi */
 	} while (addbsil--);
     }
 
@@ -732,7 +732,7 @@
     if (bitstream_get (1)) {	/* skiple */
 	i = bitstream_get (9);	/* skipl */
 	while (i--)
-	    bitstream_get (8);
+	    bitstream_skip (8);
     }
 
     if (state->output & A52_LFE)




More information about the MPlayer-cvslog mailing list