FFmpeg
Loading...
Searching...
No Matches
lzf.c File Reference

lzf decompression More...

#include "libavutil/mem.h"
#include "bytestream.h"
#include "defs.h"
#include "lzf.h"

Go to the source code of this file.

Macros

#define LZF_LITERAL_MAX   (1 << 5)
 
#define LZF_LONG_BACKREF   7 + 2
 

Functions

static int lzf_realloc (uint8_t **buf, size_t new_size, unsigned *allocated_size)
 
int ff_lzf_uncompress (GetByteContext *gb, uint8_t **buf, size_t *size, unsigned *allocated_size)
 Decompress LZF data into *buf, reallocating it as needed.
 

Detailed Description

lzf decompression

LZF is a fast compression/decompression algorithm that takes very little code space and working memory, ideal for real-time and block compression.

https://en.wikibooks.org/wiki/Data_Compression/Dictionary_compression#LZF

Definition in file lzf.c.

Macro Definition Documentation

◆ LZF_LITERAL_MAX

#define LZF_LITERAL_MAX   (1 << 5)

Definition at line 38 of file lzf.c.

Referenced by ff_lzf_uncompress().

◆ LZF_LONG_BACKREF

#define LZF_LONG_BACKREF   7 + 2

Definition at line 39 of file lzf.c.

Referenced by ff_lzf_uncompress().

Function Documentation

◆ lzf_realloc()

static int lzf_realloc ( uint8_t ** buf,
size_t new_size,
unsigned * allocated_size )
inlinestatic

Definition at line 42 of file lzf.c.

Referenced by ff_lzf_uncompress().

◆ ff_lzf_uncompress()

int ff_lzf_uncompress ( GetByteContext * gb,
uint8_t ** buf,
size_t * size,
unsigned * allocated_size )

Decompress LZF data into *buf, reallocating it as needed.

On success the output is followed by AV_INPUT_BUFFER_PADDING_SIZE zeroed bytes.

Definition at line 55 of file lzf.c.

Referenced by decode_frame(), and dxv_decompress_lzf().