comparison ivi_common.h @ 11246:b75449aaea3e libavcodec

Macroblock and block Huffman code sets are to be used by both Indeo 4 and Indeo 5, so make them global and move their initialization to the common place as well. And fix static VLC initialization, as ff_ivi_create_huff_from_desc() used old way to do so.
author kostya
date Mon, 22 Feb 2010 13:51:32 +0000
parents 0b2618b091df
children 06e2ff1295bd
comparison
equal deleted inserted replaced
11245:1e9ff636c3db 11246:b75449aaea3e
43 typedef struct { 43 typedef struct {
44 int32_t num_rows; 44 int32_t num_rows;
45 uint8_t xbits[16]; 45 uint8_t xbits[16];
46 } IVIHuffDesc; 46 } IVIHuffDesc;
47 47
48 extern const IVIHuffDesc ff_ivi_mb_huff_desc[8]; ///< static macroblock huffman tables 48 extern VLC ff_ivi_mb_vlc_tabs [8]; ///< static macroblock Huffman tables
49 extern const IVIHuffDesc ff_ivi_blk_huff_desc[8]; ///< static block huffman tables 49 extern VLC ff_ivi_blk_vlc_tabs[8]; ///< static block Huffman tables
50 50
51 51
52 /** 52 /**
53 * run-value (RLE) table descriptor 53 * run-value (RLE) table descriptor
54 */ 54 */
201 * @return result code: 0 - OK, -1 = error (invalid codebook descriptor) 201 * @return result code: 0 - OK, -1 = error (invalid codebook descriptor)
202 */ 202 */
203 int ff_ivi_create_huff_from_desc(const IVIHuffDesc *cb, VLC *vlc, int flag); 203 int ff_ivi_create_huff_from_desc(const IVIHuffDesc *cb, VLC *vlc, int flag);
204 204
205 /** 205 /**
206 * Initializes static codes used for macroblock and block decoding.
207 */
208 void ff_ivi_init_static_vlc();
209
210 /**
206 * Decodes a huffman codebook descriptor from the bitstream. 211 * Decodes a huffman codebook descriptor from the bitstream.
207 * 212 *
208 * @param gb [in,out] the GetBit context 213 * @param gb [in,out] the GetBit context
209 * @param desc [out] ptr to descriptor to be filled with data 214 * @param desc [out] ptr to descriptor to be filled with data
210 * @return selector indicating huffman table: 215 * @return selector indicating huffman table: