83 n = (chunk_id & 0x04) ? 4 : 6;
87 for (i=0; i < 256; i++) {
88 if ((chunk_id & 0x01) && !(mask >>= 1)) {
97 if (!(chunk_id & 0x01) || (flag & mask)) {
102 codebook[i].
y0 = *data++;
103 codebook[i].
y1 = *data++;
104 codebook[i].
y2 = *data++;
105 codebook[i].
y3 = *data++;
106 codebook[i].
u = 128 + *data++;
107 codebook[i].
v = 128 + *data++;
113 codebook[i].
y0 = *data++;
114 codebook[i].
y1 = *data++;
115 codebook[i].
y2 = *data++;
116 codebook[i].
y3 = *data++;
138 for (y=strip->
y1; y < strip->y2; y+=4) {
149 for (x=strip->
x1; x < strip->x2; x+=4) {
150 if ((chunk_id & 0x01) && !(mask >>= 1)) {
151 if ((data + 4) > eod)
159 if (!(chunk_id & 0x01) || (flag & mask)) {
160 if (!(chunk_id & 0x02) && !(mask >>= 1)) {
161 if ((data + 4) > eod)
169 if ((chunk_id & 0x02) || (~flag & mask)) {
210 }
else if (flag & mask) {
211 if ((data + 4) > eod)
257 iy[0] += 4; iy[1] += 4;
258 iy[2] += 4; iy[3] += 4;
259 iu[0] += 2; iu[1] += 2;
260 iv[0] += 2; iv[1] += 2;
271 int chunk_id, chunk_size;
276 strip->
x1 >= strip->
x2 || strip->
y1 >= strip->
y2)
279 while ((data + 4) <= eod) {
281 chunk_size =
AV_RB24 (&data[1]) - 4;
286 chunk_size = ((data + chunk_size) > eod) ? (eod -
data) : chunk_size;
322 int i, result, strip_size, frame_flags, num_strips;
324 int encoded_buf_size;
329 frame_flags = s->
data[0];
335 if (!encoded_buf_size) {
339 if (encoded_buf_size != s->
size && (s->
size % encoded_buf_size) != 0) {
347 (s->
data[10] == 0xFE) &&
348 (s->
data[11] == 0x00) &&
349 (s->
data[12] == 0x00) &&
350 (s->
data[13] == 0x06) &&
351 (s->
data[14] == 0x00) &&
352 (s->
data[15] == 0x00))
366 for (i=0; i < num_strips; i++) {
367 if ((s->
data + 12) > eod)
383 strip_size = ((s->
data + strip_size) > eod) ? (eod - s->
data) : strip_size;
385 if ((i > 0) && !(frame_flags & 0x01)) {
397 s->
data += strip_size;
428 void *
data,
int *got_frame,
432 int ret = 0, buf_size = avpkt->
size;