[Mplayer-cvslog] CVS: main/libvo jpeg_enc.c,1.11,1.12

Rik Snel CVS rik at mplayerhq.hu
Wed Nov 6 16:20:05 CET 2002


Update of /cvsroot/mplayer/main/libvo
In directory mail:/var/tmp.root/cvs-serv9170

Modified Files:
	jpeg_enc.c 
Log Message:
libavcodec sync (no LIBAVCODEC_BUILD change; no backwards compatibility)

Index: jpeg_enc.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/jpeg_enc.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- jpeg_enc.c	24 Oct 2002 21:27:50 -0000	1.11
+++ jpeg_enc.c	6 Nov 2002 15:19:45 -0000	1.12
@@ -130,7 +130,7 @@
     int mant, nbits;
 
     if (val == 0) {
-        jput_bits(&s->pb, huff_size[0], huff_code[0]);
+        put_bits(&s->pb, huff_size[0], huff_code[0]);
     } else {
         mant = val;
         if (val < 0) {
@@ -145,9 +145,9 @@
             nbits++;
         }
             
-        jput_bits(&s->pb, huff_size[nbits], huff_code[nbits]);
+        put_bits(&s->pb, huff_size[nbits], huff_code[nbits]);
         
-        jput_bits(&s->pb, nbits, mant & ((1 << nbits) - 1));
+        put_bits(&s->pb, nbits, mant & ((1 << nbits) - 1));
     }
 }
 
@@ -185,7 +185,7 @@
             run++;
         } else {
             while (run >= 16) {
-                jput_bits(&s->pb, huff_size_ac[0xf0], huff_code_ac[0xf0]);
+                put_bits(&s->pb, huff_size_ac[0xf0], huff_code_ac[0xf0]);
                 run -= 16;
             }
             mant = val;
@@ -202,16 +202,16 @@
             }
             code = (run << 4) | nbits;
 
-            jput_bits(&s->pb, huff_size_ac[code], huff_code_ac[code]);
+            put_bits(&s->pb, huff_size_ac[code], huff_code_ac[code]);
         
-            jput_bits(&s->pb, nbits, mant & ((1 << nbits) - 1));
+            put_bits(&s->pb, nbits, mant & ((1 << nbits) - 1));
             run = 0;
         }
     }
 
     /* output EOB only if not already 64 values */
     if (last_index < 63 || run != 0)
-        jput_bits(&s->pb, huff_size_ac[0], huff_code_ac[0]);
+        put_bits(&s->pb, huff_size_ac[0], huff_code_ac[0]);
 }
 
 static inline void clip_coeffs(MpegEncContext *s, DCTELEM *block, int last_index)
@@ -244,14 +244,14 @@
 	encode_block(j->s, j->s->block[1], 1);
 	if (j->bw) {
 		/* U */
-		jput_bits(&j->s->pb, m->huff_size_dc_chrominance[0],
+		put_bits(&j->s->pb, m->huff_size_dc_chrominance[0],
 				m->huff_code_dc_chrominance[0]);
-		jput_bits(&j->s->pb, m->huff_size_ac_chrominance[0],
+		put_bits(&j->s->pb, m->huff_size_ac_chrominance[0],
 				m->huff_code_ac_chrominance[0]);
 		/* V */
-		jput_bits(&j->s->pb, m->huff_size_dc_chrominance[0],
+		put_bits(&j->s->pb, m->huff_size_dc_chrominance[0],
 				m->huff_code_dc_chrominance[0]);
-		jput_bits(&j->s->pb, m->huff_size_ac_chrominance[0],
+		put_bits(&j->s->pb, m->huff_size_ac_chrominance[0],
 				m->huff_code_ac_chrominance[0]);
     	} else {
 		/* we trick encode_block here so that it uses
@@ -381,6 +381,8 @@
 	init_put_bits(&j->s->pb, bufr, 1024*256, NULL, NULL);
 
 	mjpeg_picture_header(j->s);
+
+	j->s->header_bits = get_bit_count(&j->s->pb);
 
 	j->s->last_dc[0] = 128; 
 	j->s->last_dc[1] = 128; 




More information about the MPlayer-cvslog mailing list