Lines Matching defs:cin
92 CinVideoContext *cin = avctx->priv_data;
95 cin->avctx = avctx;
98 cin->frame.data[0] = NULL;
100 cin->bitmap_size = avctx->width * avctx->height;
102 cin->bitmap_table[i] = av_mallocz(cin->bitmap_size);
103 if (!cin->bitmap_table[i])
207 CinVideoContext *cin = avctx->priv_data;
224 cin->palette[i] = bytestream_get_le24(&buf);
229 cin->palette[buf[0]] = AV_RL24(buf+1);
239 cin->bitmap_table[CIN_CUR_BMP], cin->bitmap_size);
243 cin->bitmap_table[CIN_CUR_BMP], cin->bitmap_size);
244 cin_apply_delta_data(cin->bitmap_table[CIN_PRE_BMP],
245 cin->bitmap_table[CIN_CUR_BMP], cin->bitmap_size);
249 cin->bitmap_table[CIN_INT_BMP], cin->bitmap_size);
250 cin_decode_rle(cin->bitmap_table[CIN_INT_BMP], bitmap_frame_size,
251 cin->bitmap_table[CIN_CUR_BMP], cin->bitmap_size);
255 cin->bitmap_table[CIN_INT_BMP], cin->bitmap_size);
256 cin_decode_rle(cin->bitmap_table[CIN_INT_BMP], bitmap_frame_size,
257 cin->bitmap_table[CIN_CUR_BMP], cin->bitmap_size);
258 cin_apply_delta_data(cin->bitmap_table[CIN_PRE_BMP],
259 cin->bitmap_table[CIN_CUR_BMP], cin->bitmap_size);
263 cin->bitmap_table[CIN_CUR_BMP], cin->bitmap_size);
267 cin->bitmap_table[CIN_CUR_BMP],
268 cin->bitmap_size);
274 cin->bitmap_table[CIN_CUR_BMP],
275 cin->bitmap_size);
278 cin_apply_delta_data(cin->bitmap_table[CIN_PRE_BMP],
279 cin->bitmap_table[CIN_CUR_BMP], cin->bitmap_size);
283 cin->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE;
284 if (avctx->reget_buffer(avctx, &cin->frame)) {
285 av_log(cin->avctx, AV_LOG_ERROR, "delphinecinvideo: reget_buffer() failed to allocate a frame\n");
289 memcpy(cin->frame.data[1], cin->palette, sizeof(cin->palette));
290 cin->frame.palette_has_changed = 1;
291 for (y = 0; y < cin->avctx->height; ++y)
292 memcpy(cin->frame.data[0] + (cin->avctx->height - 1 - y) * cin->frame.linesize[0],
293 cin->bitmap_table[CIN_CUR_BMP] + y * cin->avctx->width,
294 cin->avctx->width);
296 FFSWAP(uint8_t *, cin->bitmap_table[CIN_CUR_BMP], cin->bitmap_table[CIN_PRE_BMP]);
299 *(AVFrame *)data = cin->frame;
306 CinVideoContext *cin = avctx->priv_data;
309 if (cin->frame.data[0])
310 avctx->release_buffer(avctx, &cin->frame);
313 av_free(cin->bitmap_table[i]);
320 CinAudioContext *cin = avctx->priv_data;
327 cin->initial_decode_frame = 1;
328 cin->delta = 0;
331 avcodec_get_frame_defaults(&cin->frame);
332 avctx->coded_frame = &cin->frame;
341 CinAudioContext *cin = avctx->priv_data;
347 cin->frame.nb_samples = avpkt->size - cin->initial_decode_frame;
348 if ((ret = avctx->get_buffer(avctx, &cin->frame)) < 0) {
352 samples = (int16_t *)cin->frame.data[0];
354 delta = cin->delta;
355 if (cin->initial_decode_frame) {
356 cin->initial_decode_frame = 0;
366 cin->delta = delta;
369 *(AVFrame *)data = cin->frame;