Lines Matching refs:data
29 * @see For more information on the quirky data inside Sega FILM/CPK files, visit:
61 const unsigned char *data;
75 int chunk_id, int size, const uint8_t *data)
77 const uint8_t *eod = (data + size);
88 if ((data + 4) > eod)
91 flag = AV_RB32 (data);
92 data += 4;
97 if ((data + n) > eod)
101 codebook[i].y0 = *data++;
102 codebook[i].y1 = *data++;
103 codebook[i].y2 = *data++;
104 codebook[i].y3 = *data++;
105 codebook[i].u = 128 + *data++;
106 codebook[i].v = 128 + *data++;
112 codebook[i].y0 = *data++;
113 codebook[i].y1 = *data++;
114 codebook[i].y2 = *data++;
115 codebook[i].y3 = *data++;
124 int chunk_id, int size, const uint8_t *data)
126 const uint8_t *eod = (data + size);
150 if ((data + 4) > eod)
153 flag = AV_RB32 (data);
154 data += 4;
160 if ((data + 4) > eod)
163 flag = AV_RB32 (data);
164 data += 4;
169 if (data >= eod)
172 codebook = &strip->v1_codebook[*data++];
173 s->frame.data[0][iy[0] + 0] = codebook->y0;
174 s->frame.data[0][iy[0] + 1] = codebook->y0;
175 s->frame.data[0][iy[1] + 0] = codebook->y0;
176 s->frame.data[0][iy[1] + 1] = codebook->y0;
178 s->frame.data[1][iu[0]] = codebook->u;
179 s->frame.data[2][iv[0]] = codebook->v;
182 s->frame.data[0][iy[0] + 2] = codebook->y1;
183 s->frame.data[0][iy[0] + 3] = codebook->y1;
184 s->frame.data[0][iy[1] + 2] = codebook->y1;
185 s->frame.data[0][iy[1] + 3] = codebook->y1;
187 s->frame.data[1][iu[0] + 1] = codebook->u;
188 s->frame.data[2][iv[0] + 1] = codebook->v;
191 s->frame.data[0][iy[2] + 0] = codebook->y2;
192 s->frame.data[0][iy[2] + 1] = codebook->y2;
193 s->frame.data[0][iy[3] + 0] = codebook->y2;
194 s->frame.data[0][iy[3] + 1] = codebook->y2;
196 s->frame.data[1][iu[1]] = codebook->u;
197 s->frame.data[2][iv[1]] = codebook->v;
200 s->frame.data[0][iy[2] + 2] = codebook->y3;
201 s->frame.data[0][iy[2] + 3] = codebook->y3;
202 s->frame.data[0][iy[3] + 2] = codebook->y3;
203 s->frame.data[0][iy[3] + 3] = codebook->y3;
205 s->frame.data[1][iu[1] + 1] = codebook->u;
206 s->frame.data[2][iv[1] + 1] = codebook->v;
210 if ((data + 4) > eod)
213 codebook = &strip->v4_codebook[*data++];
214 s->frame.data[0][iy[0] + 0] = codebook->y0;
215 s->frame.data[0][iy[0] + 1] = codebook->y1;
216 s->frame.data[0][iy[1] + 0] = codebook->y2;
217 s->frame.data[0][iy[1] + 1] = codebook->y3;
219 s->frame.data[1][iu[0]] = codebook->u;
220 s->frame.data[2][iv[0]] = codebook->v;
223 codebook = &strip->v4_codebook[*data++];
224 s->frame.data[0][iy[0] + 2] = codebook->y0;
225 s->frame.data[0][iy[0] + 3] = codebook->y1;
226 s->frame.data[0][iy[1] + 2] = codebook->y2;
227 s->frame.data[0][iy[1] + 3] = codebook->y3;
229 s->frame.data[1][iu[0] + 1] = codebook->u;
230 s->frame.data[2][iv[0] + 1] = codebook->v;
233 codebook = &strip->v4_codebook[*data++];
234 s->frame.data[0][iy[2] + 0] = codebook->y0;
235 s->frame.data[0][iy[2] + 1] = codebook->y1;
236 s->frame.data[0][iy[3] + 0] = codebook->y2;
237 s->frame.data[0][iy[3] + 1] = codebook->y3;
239 s->frame.data[1][iu[1]] = codebook->u;
240 s->frame.data[2][iv[1]] = codebook->v;
243 codebook = &strip->v4_codebook[*data++];
244 s->frame.data[0][iy[2] + 2] = codebook->y0;
245 s->frame.data[0][iy[2] + 3] = codebook->y1;
246 s->frame.data[0][iy[3] + 2] = codebook->y2;
247 s->frame.data[0][iy[3] + 3] = codebook->y3;
249 s->frame.data[1][iu[1] + 1] = codebook->u;
250 s->frame.data[2][iv[1] + 1] = codebook->v;
267 cvid_strip *strip, const uint8_t *data, int size)
269 const uint8_t *eod = (data + size);
278 while ((data + 4) <= eod) {
279 chunk_id = data[0];
280 chunk_size = AV_RB24 (&data[1]) - 4;
284 data += 4;
285 chunk_size = ((data + chunk_size) > eod) ? (eod - data) : chunk_size;
294 chunk_size, data);
302 chunk_size, data);
309 chunk_size, data);
312 data += chunk_size;
320 const uint8_t *eod = (s->data + s->size);
328 frame_flags = s->data[0];
329 num_strips = AV_RB16 (&s->data[8]);
330 encoded_buf_size = AV_RB24(&s->data[1]);
332 /* if this is the first frame, check for deviant Sega FILM data */
340 * by the container file, this data likely comes from a Sega FILM/CPK file.
346 (s->data[10] == 0xFE) &&
347 (s->data[11] == 0x00) &&
348 (s->data[12] == 0x00) &&
349 (s->data[13] == 0x06) &&
350 (s->data[14] == 0x00) &&
351 (s->data[15] == 0x00))
359 s->data += 10 + s->sega_film_skip_bytes;
364 if ((s->data + 12) > eod)
367 s->strips[i].id = s->data[0];
370 s->strips[i].y2 = y0 + AV_RB16 (&s->data[8]);
373 strip_size = AV_RB24 (&s->data[1]) - 12;
376 s->data += 12;
377 strip_size = ((s->data + strip_size) > eod) ? (eod - s->data) : strip_size;
386 result = cinepak_decode_strip (s, &s->strips[i], s->data, strip_size);
391 s->data += strip_size;
406 // check for paletted data
415 s->frame.data[0] = NULL;
421 void *data, int *data_size,
424 const uint8_t *buf = avpkt->data;
428 s->data = buf;
450 memcpy (s->frame.data[1], s->pal, AVPALETTE_SIZE);
453 *(AVFrame*)data = s->frame;
463 if (s->frame.data[0])