43 #define LUT8_PART(plane, v) \
44 AV_LE2NE64C(UINT64_C(0x0000000)<<32 | v) << plane, \
45 AV_LE2NE64C(UINT64_C(0x1000000)<<32 | v) << plane, \
46 AV_LE2NE64C(UINT64_C(0x0010000)<<32 | v) << plane, \
47 AV_LE2NE64C(UINT64_C(0x1010000)<<32 | v) << plane, \
48 AV_LE2NE64C(UINT64_C(0x0000100)<<32 | v) << plane, \
49 AV_LE2NE64C(UINT64_C(0x1000100)<<32 | v) << plane, \
50 AV_LE2NE64C(UINT64_C(0x0010100)<<32 | v) << plane, \
51 AV_LE2NE64C(UINT64_C(0x1010100)<<32 | v) << plane, \
52 AV_LE2NE64C(UINT64_C(0x0000001)<<32 | v) << plane, \
53 AV_LE2NE64C(UINT64_C(0x1000001)<<32 | v) << plane, \
54 AV_LE2NE64C(UINT64_C(0x0010001)<<32 | v) << plane, \
55 AV_LE2NE64C(UINT64_C(0x1010001)<<32 | v) << plane, \
56 AV_LE2NE64C(UINT64_C(0x0000101)<<32 | v) << plane, \
57 AV_LE2NE64C(UINT64_C(0x1000101)<<32 | v) << plane, \
58 AV_LE2NE64C(UINT64_C(0x0010101)<<32 | v) << plane, \
59 AV_LE2NE64C(UINT64_C(0x1010101)<<32 | v) << plane
61 #define LUT8(plane) { \
62 LUT8_PART(plane, 0x0000000), \
63 LUT8_PART(plane, 0x1000000), \
64 LUT8_PART(plane, 0x0010000), \
65 LUT8_PART(plane, 0x1010000), \
66 LUT8_PART(plane, 0x0000100), \
67 LUT8_PART(plane, 0x1000100), \
68 LUT8_PART(plane, 0x0010100), \
69 LUT8_PART(plane, 0x1010100), \
70 LUT8_PART(plane, 0x0000001), \
71 LUT8_PART(plane, 0x1000001), \
72 LUT8_PART(plane, 0x0010001), \
73 LUT8_PART(plane, 0x1010001), \
74 LUT8_PART(plane, 0x0000101), \
75 LUT8_PART(plane, 0x1000101), \
76 LUT8_PART(plane, 0x0010101), \
77 LUT8_PART(plane, 0x1010101), \
86 #define LUT32(plane) { \
88 0, 0, 0, 1 << plane, \
89 0, 0, 1 << plane, 0, \
90 0, 0, 1 << plane, 1 << plane, \
91 0, 1 << plane, 0, 0, \
92 0, 1 << plane, 0, 1 << plane, \
93 0, 1 << plane, 1 << plane, 0, \
94 0, 1 << plane, 1 << plane, 1 << plane, \
95 1 << plane, 0, 0, 0, \
96 1 << plane, 0, 0, 1 << plane, \
97 1 << plane, 0, 1 << plane, 0, \
98 1 << plane, 0, 1 << plane, 1 << plane, \
99 1 << plane, 1 << plane, 0, 0, \
100 1 << plane, 1 << plane, 0, 1 << plane, \
101 1 << plane, 1 << plane, 1 << plane, 0, \
102 1 << plane, 1 << plane, 1 << plane, 1 << plane, \
119 return x << 16 | x << 8 | x;
138 for (i = 0; i < count; i++)
143 for (i = 0; i < count; i++)
199 uint64_t v =
AV_RN64A(dst) | lut[*buf++];
202 }
while (--buf_size);
216 unsigned mask = (*buf >> 2) & ~3;
217 dst[0] |= lut[mask++];
218 dst[1] |= lut[mask++];
219 dst[2] |= lut[mask++];
221 mask = (*buf++ << 2) & 0x3F;
222 dst[4] |= lut[mask++];
223 dst[5] |= lut[mask++];
224 dst[6] |= lut[mask++];
227 }
while (--buf_size);
242 const uint8_t *
const buf_start = buf;
244 for (x = 0; x < dst_size && buf < buf_end;) {
246 const int8_t value = *buf++;
249 memcpy(dst + x, buf,
FFMIN3(length, dst_size - x, buf_end - buf));
251 }
else if (value > -128) {
253 memset(dst + x, *buf++,
FFMIN(length, dst_size - x));
259 return buf - buf_start;
263 void *
data,
int *got_frame,
268 int buf_size = avpkt->
size;
269 const uint8_t *buf_end = buf + buf_size;
284 for (y = 0; y < avctx->
height; y++) {
286 memset(row, 0, avctx->
width);
294 for (y = 0; y < avctx->
height; y++) {
296 memset(row, 0, avctx->
width << 2);
306 for (y = 0; y < avctx->
height && buf < buf_end; y++) {
308 memcpy(row, buf,
FFMIN(avctx->
width, buf_end - buf));
322 void *
data,
int *got_frame,
327 int buf_size = avpkt->
size;
328 const uint8_t *buf_end = buf + buf_size;
343 for (y = 0; y < avctx->
height; y++) {
345 memset(row, 0, avctx->
width);
352 for (y = 0; y < avctx->
height; y++) {
354 memset(row, 0, avctx->
width << 2);
362 for (y = 0; y < avctx->
height; y++) {
389 .
name =
"iff_byterun1",