Lines Matching refs:gb
32 static int64_t bytestream2_get_levarint(GetByteContext *gb)
39 tmp = bytestream2_get_byte(gb);
49 static int snappy_literal(GetByteContext *gb, uint8_t *p, int size, int val)
55 len += bytestream2_get_le32(gb);
58 len += bytestream2_get_le24(gb);
61 len += bytestream2_get_le16(gb);
64 len += bytestream2_get_byte(gb);
73 bytestream2_get_buffer(gb, p, len);
94 static int snappy_copy1(GetByteContext *gb, uint8_t *start, uint8_t *p,
98 unsigned int off = bytestream2_get_byte(gb) | (val & 0x38) << 5;
103 static int snappy_copy2(GetByteContext *gb, uint8_t *start, uint8_t *p,
107 unsigned int off = bytestream2_get_le16(gb);
112 static int snappy_copy4(GetByteContext *gb, uint8_t *start, uint8_t *p,
116 unsigned int off = bytestream2_get_le32(gb);
121 static int64_t decode_len(GetByteContext *gb)
123 int64_t len = bytestream2_get_levarint(gb);
131 int64_t ff_snappy_peek_uncompressed_length(GetByteContext *gb)
133 int pos = bytestream2_get_bytes_left(gb);
134 int64_t len = decode_len(gb);
136 bytestream2_seek(gb, -pos, SEEK_END);
141 int ff_snappy_uncompress(GetByteContext *gb, uint8_t *buf, int64_t *size)
143 int64_t len = decode_len(gb);
156 while (bytestream2_get_bytes_left(gb) > 0) {
157 uint8_t s = bytestream2_get_byte(gb);
162 ret = snappy_literal(gb, p, len, val);
165 ret = snappy_copy1(gb, buf, p, len, val);
168 ret = snappy_copy2(gb, buf, p, len, val);
171 ret = snappy_copy4(gb, buf, p, len, val);