30 #define OUTBUF_PADDED 1
31 #define INBUF_PADDED 1
53 #define GETB(c) (*(c).in++)
55 #define GETB(c) get_byte(&(c))
87 if (cnt > c->
in_end - src) {
95 #if defined(INBUF_PADDED) && defined(OUTBUF_PADDED)
102 memcpy(dst, src, cnt);
139 if (!*outlen || !*inlen) {
166 back = (
GETB(c) << 3) + ((x >> 2) & 7) + 1;
170 back = (
GETB(c) << 6) + (x >> 2) + 1;
173 back = (1 << 14) + ((x & 8) << 11);
175 back += (
GETB(c) << 6) + (x >> 2);
176 if (back == (1 << 14)) {
189 back = (1 << 11) + (
GETB(c) << 2) + (x >> 2) + 1;
192 back = (
GETB(c) << 2) + (x >> 2) + 1;
#define AV_LZO_ERROR
a non-specific error in the compressed bitstream
static int get_len(LZOContext *c, int x, int mask)
Decodes a length value in the coding used by lzo.
#define AV_LZO_OUTPUT_FULL
decoded data did not fit into output buffer
static void copy(LZOContext *c, int cnt)
Copies bytes from input to output buffer with checking.
static const uint16_t mask[17]
struct LZOContext LZOContext
static void copy_backptr(LZOContext *c, int back, int cnt)
Copies previously decoded bytes to current position.
int av_lzo1x_decode(void *out, int *outlen, const void *in, int *inlen)
Decodes LZO 1x compressed data.
#define AV_LZO_INPUT_DEPLETED
end of the input buffer reached before decoding finished
common internal and external API header
void av_memcpy_backptr(uint8_t *dst, int back, int cnt)
deliberately overlapping memcpy implementation
#define AV_LZO_INVALID_BACKPTR
a reference to previously decoded data was wrong
static int get_byte(LZOContext *c)
Reads one byte from the input buffer, avoiding an overrun.