Lines Matching defs:avctx
59 static int cdtoons_render_sprite(AVCodecContext *avctx, const uint8_t *data,
63 CDToonsContext *c = avctx->priv_data;
70 if (dst_x + width > avctx->width)
71 width = avctx->width - dst_x;
72 if (dst_y + height > avctx->height)
73 height = avctx->height - dst_y;
154 static int cdtoons_decode_frame(AVCodecContext *avctx, AVFrame *rframe,
157 CDToonsContext *c = avctx->priv_data;
173 if ((ret = ff_reget_buffer(avctx, c->frame, 0)) < 0)
208 av_log(avctx, AV_LOG_ERROR,
213 av_log(avctx, AV_LOG_ERROR,
221 av_log(avctx, AV_LOG_ERROR,
248 av_log(avctx, AV_LOG_WARNING, "Ran (seriously) out of data for embedded sprites.\n");
256 av_log(avctx, AV_LOG_WARNING, "Ran (seriously) out of data for Diff frame.\n");
266 av_log(avctx, AV_LOG_WARNING, "Ran (seriously) out of data for Diff frame header.\n");
277 av_log(avctx, AV_LOG_WARNING, "Ran (seriously) out of data for Diff frame data.\n");
280 if (cdtoons_render_sprite(avctx, buf + 4, diff_size - 8,
282 av_log(avctx, AV_LOG_WARNING, "Ran beyond end of sprite while rendering.\n");
290 av_log(avctx, AV_LOG_WARNING, "Ran out of data for ignored entry (size %X, %d left).\n", size, (int)(eod - buf));
310 av_log(avctx, AV_LOG_WARNING, "Ran (seriously) out of data when rendering.\n");
323 c->frame->linesize[0] * avctx->height);
329 av_log(avctx, AV_LOG_ERROR,
337 av_log(avctx, AV_LOG_WARNING, "Sprite %d is missing.\n", sprite_id);
341 av_log(avctx, AV_LOG_ERROR, "Sprite %d is too small.\n", sprite_id);
348 if (cdtoons_render_sprite(avctx, block_data,
351 av_log(avctx, AV_LOG_WARNING, "Ran beyond end of sprite while rendering.\n");
357 av_log(avctx, AV_LOG_ERROR,
363 av_log(avctx, AV_LOG_WARNING,
368 av_log(avctx, AV_LOG_ERROR,
410 static av_cold int cdtoons_decode_init(AVCodecContext *avctx)
412 CDToonsContext *c = avctx->priv_data;
414 avctx->pix_fmt = AV_PIX_FMT_PAL8;
423 static void cdtoons_flush(AVCodecContext *avctx)
425 CDToonsContext *c = avctx->priv_data;
432 static av_cold int cdtoons_decode_end(AVCodecContext *avctx)
434 CDToonsContext *c = avctx->priv_data;