28 #define BITSTREAM_READER_LE
40 const unsigned char *src_end,
41 unsigned char *dst,
int dst_size)
49 for (i = 0, sz = 0; i < 64 && sz < dst_size; i++) {
53 sz +=
FFABS(code_table[i]);
58 for (i = 0; i < 64 && dst_size > 0; i++) {
62 if (src_end - src < 1)
64 memset(dst, *src++,
FFMIN(len, dst_size));
66 if (src_end - src < len)
68 memcpy(dst, src,
FFMIN(len, dst_size));
78 const unsigned char *
src,
79 const unsigned char *src_end,
85 unsigned char block[8 * 8];
87 if (src_end - src < 1)
94 for (b = 0; b < 8; b++) {
95 memcpy(dst, &block[b * 8], 8);
101 for (i = 0; i < 8; i++) {
102 for (b = 0; b < 8; b++)
112 if (src_end - src < len + 8 * bits)
117 for (b = 0; b < 8; b++) {
118 for (i = 0; i < 8; i++)
119 dst[i] = color_table[
get_bits(&gb, bits)];
128 const unsigned char *
src,
129 const unsigned char *src_end,
134 if (src_end - src < 8 * 8)
137 for (i = 0; i < 8; i++) {
147 const unsigned char *
src,
148 const unsigned char *src_end,
154 if (src_end - src < 2)
157 offset = ((pos >> 3) & 7) * seq->
frame->
linesize[0] + (pos & 7);
159 }
while (!(pos & 0x80));
166 const unsigned char *data_end = data + data_size;
176 palette = (uint32_t *)seq->
frame->
data[1];
177 if (data_end - data < 256 * 3)
179 for (i = 0; i < 256; i++) {
180 for (j = 0; j < 3; j++, data++)
181 c[j] = (*data << 2) | (*data >> 4);
182 palette[i] = 0xFF
U << 24 |
AV_RB24(c);
188 if (data_end - data < 128)
191 for (y = 0; y < 128; y += 8)
192 for (x = 0; x < 256; x += 8) {
228 void *
data,
int *got_frame,
232 int buf_size = avpkt->
size;
260 .
name =
"tiertexseqvideo",