• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

libavcodec/lzw.h

Go to the documentation of this file.
00001 /*
00002  * LZW decoder
00003  * Copyright (c) 2003 Fabrice Bellard
00004  * Copyright (c) 2006 Konstantin Shishkov
00005  *
00006  * This file is part of FFmpeg.
00007  *
00008  * FFmpeg is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public
00010  * License as published by the Free Software Foundation; either
00011  * version 2.1 of the License, or (at your option) any later version.
00012  *
00013  * FFmpeg is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with FFmpeg; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
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 /* clients should not know what LZWState is */
00043 typedef void LZWState;
00044 
00045 /* first two functions de/allocate memory for LZWState */
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 /* AVCODEC_LZW_H */

Generated on Fri Sep 16 2011 17:17:39 for FFmpeg by  doxygen 1.7.1