libavcodec/lzw.c File Reference

LZW decoding routines. More...

#include "avcodec.h"
#include "lzw.h"

Go to the source code of this file.

Data Structures

struct  LZWState

Defines

#define LZW_MAXBITS   12
#define LZW_SIZTABLE   (1<<LZW_MAXBITS)

Functions

static int lzw_get_code (struct LZWState *s)
const uint8_t * ff_lzw_cur_ptr (LZWState *p)
void ff_lzw_decode_tail (LZWState *p)
av_cold void ff_lzw_decode_open (LZWState **p)
av_cold void ff_lzw_decode_close (LZWState **p)
int ff_lzw_decode_init (LZWState *p, int csize, const uint8_t *buf, int buf_size, int mode)
 Initialize LZW decoder.
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.

Variables

static const uint16_t mask [17]


Detailed Description

LZW decoding routines.

Author:
Fabrice Bellard Modified for use in TIFF by Konstantin Shishkov

Definition in file lzw.c.


Define Documentation

#define LZW_MAXBITS   12

Definition at line 33 of file lzw.c.

Referenced by ff_lzw_decode(), ff_lzw_decode_init(), and ff_lzw_encode_init().

#define LZW_SIZTABLE   (1<<LZW_MAXBITS)

Definition at line 34 of file lzw.c.


Function Documentation

const uint8_t* ff_lzw_cur_ptr ( LZWState p  ) 

Definition at line 94 of file lzw.c.

Referenced by gif_read_image().

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:
s LZW context
buf output buffer
len number of bytes to decode
Returns:
number of bytes decoded

Definition at line 169 of file lzw.c.

Referenced by gif_read_image(), and tiff_unpack_strip().

av_cold void ff_lzw_decode_close ( LZWState **  p  ) 

Definition at line 117 of file lzw.c.

Referenced by gif_decode_close(), and tiff_end().

int ff_lzw_decode_init ( LZWState p,
int  csize,
const uint8_t *  buf,
int  buf_size,
int  mode 
)

Initialize LZW decoder.

Parameters:
s LZW context
csize initial code size in bits
buf input data
buf_size input data size
mode decoder working mode - either GIF or TIFF

Definition at line 130 of file lzw.c.

Referenced by gif_read_image(), and tiff_unpack_strip().

av_cold void ff_lzw_decode_open ( LZWState **  p  ) 

Definition at line 112 of file lzw.c.

Referenced by gif_decode_init(), and tiff_init().

void ff_lzw_decode_tail ( LZWState p  ) 

Definition at line 99 of file lzw.c.

Referenced by gif_read_image().

static int lzw_get_code ( struct LZWState s  )  [static]

Definition at line 68 of file lzw.c.

Referenced by ff_lzw_decode().


Variable Documentation

const uint16_t mask[17] [static]


Generated on Fri Oct 26 02:36:52 2012 for FFmpeg by  doxygen 1.5.8