LZW decoding routines.
More...
#include "avcodec.h"
#include "bytestream.h"
#include "lzw.h"
#include "libavutil/mem.h"
|
|
#define | LZW_MAXBITS 12 |
| |
|
#define | LZW_SIZTABLE (1<<LZW_MAXBITS) |
| |
LZW decoding routines.
- Author
- Fabrice Bellard
-
modified for use in TIFF by Konstantin Shishkov
§ ff_lzw_decode()
| int ff_lzw_decode |
( |
LZWState * |
p, |
|
|
uint8_t * |
buf, |
|
|
int |
len |
|
) |
| |
Decode given number of bytes NOTE: the algorithm here is inspired from the LZW GIF decoder written by Steven A.
Bennett in 1987.
- Parameters
-
| p | LZW context |
| buf | output buffer |
| len | number of bytes to decode |
- Returns
- number of bytes decoded
§ ff_lzw_decode_init()
| int ff_lzw_decode_init |
( |
LZWState * |
p, |
|
|
int |
csize, |
|
|
const uint8_t * |
buf, |
|
|
int |
buf_size, |
|
|
int |
mode |
|
) |
| |
Initialize LZW decoder.
- Parameters
-
| p | LZW context |
| csize | initial code size in bits |
| buf | input data |
| buf_size | input data size |
| mode | decoder working mode - either GIF or TIFF |