00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00030 #ifndef AVCODEC_LZW_H
00031 #define AVCODEC_LZW_H
00032 
00033 #include <stdint.h>
00034 
00035 struct PutBitContext;
00036 
00037 enum FF_LZW_MODES{
00038     FF_LZW_GIF,
00039     FF_LZW_TIFF
00040 };
00041 
00042 
00043 typedef void LZWState;
00044 
00045 
00046 void ff_lzw_decode_open(LZWState **p);
00047 void ff_lzw_decode_close(LZWState **p);
00048 int ff_lzw_decode_init(LZWState *s, int csize, const uint8_t *buf, int buf_size, int mode);
00049 int ff_lzw_decode(LZWState *s, uint8_t *buf, int len);
00050 const uint8_t* ff_lzw_cur_ptr(LZWState *lzw);
00051 void ff_lzw_decode_tail(LZWState *lzw);
00052 
00054 struct LZWEncodeState;
00055 extern const int ff_lzw_encode_state_size;
00056 
00057 void ff_lzw_encode_init(struct LZWEncodeState *s, uint8_t *outbuf, int outsize,
00058                         int maxbits, enum FF_LZW_MODES mode,
00059                         void (*lzw_put_bits)(struct PutBitContext *, int, unsigned int));
00060 int ff_lzw_encode(struct LZWEncodeState * s, const uint8_t * inbuf, int insize);
00061 int ff_lzw_encode_flush(struct LZWEncodeState *s,
00062                         void (*lzw_flush_put_bits)(struct PutBitContext *));
00063 
00064 #endif