diff mpeg12.c @ 1025:1f9afd8b9131 libavcodec

GetBitContext.size is allways multiplied by 8 -> use size_in_bits to avoid useless *8 in a few inner loops
author michaelni
date Tue, 21 Jan 2003 17:34:12 +0000
parents 2d7c9f5738de
children e5a9dbf597d4
line wrap: on
line diff
--- a/mpeg12.c	Mon Jan 20 22:50:14 2003 +0000
+++ b/mpeg12.c	Tue Jan 21 17:34:12 2003 +0000
@@ -1467,7 +1467,7 @@
     MpegEncContext *s = &s1->mpeg_enc_ctx;
     int ref, f_code;
 
-    init_get_bits(&s->gb, buf, buf_size);
+    init_get_bits(&s->gb, buf, buf_size*8);
 
     ref = get_bits(&s->gb, 10); /* temporal ref */
     s->pict_type = get_bits(&s->gb, 3);
@@ -1619,7 +1619,7 @@
     MpegEncContext *s = &s1->mpeg_enc_ctx;
     int ext_type;
 
-    init_get_bits(&s->gb, buf, buf_size);
+    init_get_bits(&s->gb, buf, buf_size*8);
     
     ext_type = get_bits(&s->gb, 4);
     switch(ext_type) {
@@ -1684,7 +1684,7 @@
         }
     }
 
-    init_get_bits(&s->gb, buf, buf_size);
+    init_get_bits(&s->gb, buf, buf_size*8);
 
     s->qscale = get_qscale(s);
     /* extra slice info */
@@ -1793,7 +1793,7 @@
     int width, height, i, v, j;
     float aspect;
 
-    init_get_bits(&s->gb, buf, buf_size);
+    init_get_bits(&s->gb, buf, buf_size*8);
 
     width = get_bits(&s->gb, 12);
     height = get_bits(&s->gb, 12);