comparison lzw.h @ 10634:e15eb76d9e47 libavcodec

use lzw compression in gif encoder
author bcoudurier
date Thu, 03 Dec 2009 19:17:39 +0000
parents 0dce4fe6e6f3
children 2938c3bc34c7
comparison
equal deleted inserted replaced
10633:66242b8fbd32 10634:e15eb76d9e47
30 #ifndef AVCODEC_LZW_H 30 #ifndef AVCODEC_LZW_H
31 #define AVCODEC_LZW_H 31 #define AVCODEC_LZW_H
32 32
33 #include "get_bits.h" 33 #include "get_bits.h"
34 34
35 struct PutBitContext;
36
35 enum FF_LZW_MODES{ 37 enum FF_LZW_MODES{
36 FF_LZW_GIF, 38 FF_LZW_GIF,
37 FF_LZW_TIFF 39 FF_LZW_TIFF
38 }; 40 };
39 41
50 52
51 /** LZW encode state */ 53 /** LZW encode state */
52 struct LZWEncodeState; 54 struct LZWEncodeState;
53 extern const int ff_lzw_encode_state_size; 55 extern const int ff_lzw_encode_state_size;
54 56
55 void ff_lzw_encode_init(struct LZWEncodeState * s, uint8_t * outbuf, int outsize, int maxbits); 57 void ff_lzw_encode_init(struct LZWEncodeState *s, uint8_t *outbuf, int outsize,
58 int maxbits, enum FF_LZW_MODES mode,
59 void (*lzw_put_bits)(struct PutBitContext *, int, unsigned int));
56 int ff_lzw_encode(struct LZWEncodeState * s, const uint8_t * inbuf, int insize); 60 int ff_lzw_encode(struct LZWEncodeState * s, const uint8_t * inbuf, int insize);
57 int ff_lzw_encode_flush(struct LZWEncodeState * s); 61 int ff_lzw_encode_flush(struct LZWEncodeState *s,
62 void (*lzw_flush_put_bits)(struct PutBitContext *));
58 63
59 #endif /* AVCODEC_LZW_H */ 64 #endif /* AVCODEC_LZW_H */