changeset 24:08265a63313e libavcodec

added MJPEG decoder + comments
author glantau
date Mon, 06 Aug 2001 00:47:03 +0000
parents 1e131bc21101
children 2f603eb2f23d
files avcodec.h common.c utils.c
diffstat 3 files changed, 24 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/avcodec.h	Mon Aug 06 00:44:48 2001 +0000
+++ b/avcodec.h	Mon Aug 06 00:47:03 2001 +0000
@@ -111,6 +111,7 @@
 extern AVCodec mpeg_decoder;
 extern AVCodec h263i_decoder;
 extern AVCodec rv10_decoder;
+extern AVCodec mjpeg_decoder;
 
 /* dummy raw codecs */
 extern AVCodec pcm_codec;
--- a/common.c	Mon Aug 06 00:44:48 2001 +0000
+++ b/common.c	Mon Aug 06 00:47:03 2001 +0000
@@ -121,7 +121,7 @@
     s->bit_buf=0;
 }
 
-/* for jpeg : espace 0xff with 0x00 after it */
+/* for jpeg : escape 0xff with 0x00 after it */
 void jput_bits(PutBitContext *s, int n, unsigned int value)
 {
     unsigned int bit_buf, b;
@@ -401,7 +401,27 @@
 }
 
 
-/* wrap and size allow to handle most types of storage.  */
+/* Build VLC decoding tables suitable for use with get_vlc().
+
+   'nb_bits' set thee decoding table size (2^nb_bits) entries. The
+   bigger it is, the faster is the decoding. But it should not be too
+   big to save memory and L1 cache. '9' is a good compromise.
+   
+   'nb_codes' : number of vlcs codes
+
+   'bits' : table which gives the size (in bits) of each vlc code.
+
+   'codes' : table which gives the bit pattern of of each vlc code.
+
+   'xxx_wrap' : give the number of bytes between each entry of the
+   'bits' or 'codes' tables.
+
+   'xxx_size' : gives the number of bytes of each entry of the 'bits'
+   or 'codes' tables.
+
+   'wrap' and 'size' allows to use any memory configuration and types
+   (byte/word/long) to store the 'bits' and 'codes' tables.  
+*/
 int init_vlc(VLC *vlc, int nb_bits, int nb_codes,
              const void *bits, int bits_wrap, int bits_size,
              const void *codes, int codes_wrap, int codes_size)
--- a/utils.c	Mon Aug 06 00:44:48 2001 +0000
+++ b/utils.c	Mon Aug 06 00:47:03 2001 +0000
@@ -267,6 +267,7 @@
     register_avcodec(&mpeg_decoder);
     register_avcodec(&h263i_decoder);
     register_avcodec(&rv10_decoder);
+    register_avcodec(&mjpeg_decoder);
 #ifdef CONFIG_MPGLIB
     register_avcodec(&mp3_decoder);
 #endif