70 mask = bytestream2_get_be16u(gb);
71 v[0] = bytestream2_get_be16u(gb);
72 v[1] = bytestream2_get_be16u(gb);
73 if ((v[0] & 0x8000)) {
78 for (i = 2; i < 8; i++)
79 v[i] = bytestream2_get_be16u(gb);
81 v[2] = v[4] = v[6] = v[0];
82 v[3] = v[5] = v[7] = v[1];
85 #define PIX16(target, true, false) \
86 i = (mask & target) ? true : false; \
87 AV_WN16A(dst, (v[i] & 0x7C00) | (v[i] & 0x3E0) | (v[i] & 0x1F)); \
90 #define ROW16(row, a1, a0, b1, b0) \
91 dst = dst_start + (y + row) * linesize + x * 2; \
92 PIX16(1 << (row * 4), a1, a0) \
93 PIX16(1 << (row * 4 + 1), a1, a0) \
94 PIX16(1 << (row * 4 + 2), b1, b0) \
95 PIX16(1 << (row * 4 + 3), b1, b0)
100 ROW16(3, 4, 5, 6, 7);
117 for (j = 0; j < 4; j++)
118 for (i = 0; i < 4; i++)
119 AV_WN32A(dst + j * linesize + i * 4, pixel);
122 #define PIX32(target, true, false) \
123 AV_WN32A(dst, (mask & target) ? v[true] : v[false]); \
126 #define ROW32(row, a1, a0, b1, b0) \
127 dst = dst_start + (y + row) * linesize + x * 4; \
128 PIX32(1 << (row * 4), a1, a0) \
129 PIX32(1 << (row * 4 + 1), a1, a0) \
130 PIX32(1 << (row * 4 + 2), b1, b0) \
131 PIX32(1 << (row * 4 + 3), b1, b0)
134 ROW32(0, 1, 0, 3, 2); \
135 ROW32(1, 1, 0, 3, 2); \
136 ROW32(2, 5, 4, 7, 6); \
137 ROW32(3, 5, 4, 7, 6);
142 uint32_t
color[128],
v[8];
143 int w, h, nb_colors, i, x,
y, p0, p1,
mask;
148 w = bytestream2_get_be16u(gb);
149 h = bytestream2_get_be16u(gb);
150 if ((w & ~3) != width || (h & ~3) != height)
153 if (bytestream2_get_byteu(gb)) {
158 nb_colors = bytestream2_get_byteu(gb);
161 for (i = 0; i <
FFMIN(nb_colors, 128); i++)
162 color[i] = 0xFF000000 | bytestream2_get_be24u(gb);
167 dst_start += (height - 1) * linesize;
168 linesize = -linesize;
172 p0 = bytestream2_get_byteu(gb);
176 p0 = (p0 << 2) | (p0 >> 4);
177 set_4x4_block(dst_start + y * linesize + x * 4, linesize, 0xFF000000 | (p0 << 16) | (p0 << 8) | p0);
181 p0 = (p0 << 2) | (p0 >> 4);
184 g = bytestream2_get_byteu(gb);
185 r = bytestream2_get_byteu(gb);
186 set_4x4_block(dst_start + y * linesize + x * 4, linesize, 0xFF000000 | (r << 16) | (g << 8) | p0);
191 p1 = bytestream2_get_byteu(gb);
193 if ((p0 & 0x7F) == (p1 & 0x7F)) {
194 set_4x4_block(dst_start + y * linesize + x * 4, linesize, color[p0 & 0x7F]);
198 v[0] = v[2] = v[4] = v[6] = color[p0 & 0x7F];
199 v[1] = v[3] = v[5] = v[7] = color[p1 & 0x7F];
200 mask = bytestream2_get_le16u(gb);
206 v[0] = color[p0 & 0x7F];
207 v[1] = color[p1 & 0x7F];
208 for (i = 2; i < 8; i++)
209 v[i] = color[bytestream2_get_byteu(gb) & 0x7F];
210 mask = bytestream2_get_le16u(gb);
227 void *
data,
int *got_frame,
261 #if CONFIG_MVC1_DECODER
275 #if CONFIG_MVC2_DECODER