#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] |
Definition in file lzw.c.
#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().
const uint8_t* ff_lzw_cur_ptr | ( | LZWState * | p | ) |
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.
s | LZW context | |
buf | output buffer | |
len | number of bytes to decode |
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 | ) |
int ff_lzw_decode_init | ( | LZWState * | p, | |
int | csize, | |||
const uint8_t * | buf, | |||
int | buf_size, | |||
int | mode | |||
) |
Initialize LZW decoder.
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 | ) |
void ff_lzw_decode_tail | ( | LZWState * | p | ) |
static int lzw_get_code | ( | struct LZWState * | s | ) | [static] |
const uint16_t mask[17] [static] |
Initial value:
{ 0x0000, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F, 0x007F, 0x00FF, 0x01FF, 0x03FF, 0x07FF, 0x0FFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF }
Definition at line 36 of file lzw.c.
Referenced by ac3_parametric_bit_allocation(), avg_pixels16_l2_altivec(), bit_alloc(), bit_alloc_masking(), check_input_motion(), cinepak_decode_codebook(), cinepak_decode_vectors(), cmp_direct_inline(), compute_bit_allocation(), decode_13(), decode_init(), decode_residual(), decode_residual_block(), diff_pixels_mvi(), escape124_decode_frame(), ff_acelp_fc_pulse_per_track(), ff_decode_10_pulses_35bits(), ff_er_add_slice(), ff_get_mb_score(), ff_h264_check_intra4x4_pred_mode(), ff_lsb2full(), ff_lzw_decode(), ff_lzw_decode_init(), filter_channel(), get_cabac_bypass_sign(), h264_deblock_mask(), init_cavlc_level_tab(), ljpeg_decode_rgb_scan(), mpc8_decode_frame(), mpc8_get_mask(), mszh_decomp(), png_get_interlaced_row(), png_put_interlaced_row(), pp_get_mode_by_name_and_quality(), pred_spatial_direct_motion(), put_pixels16_l2_altivec(), put_swf_line_edge(), put_swf_rect(), read_dct_coeffs(), read_line(), read_residue(), rematrix_channels(), rv34_decode_cbp(), rv34_pred_mv_b(), tmv_decode_frame(), ulti_pattern(), unaligned_load(), vector_fmul_add_altivec(), vertClassify_altivec(), vp56_mc(), and x8_get_ac_rlf().