Lines Matching defs:avctx
44 AVCodecContext *avctx;
172 static int fic_decode_slice(AVCodecContext *avctx, void *tdata)
174 FICContext *ctx = avctx->priv_data;
216 static void fic_draw_cursor(AVCodecContext *avctx, int cur_x, int cur_y)
218 FICContext *ctx = avctx->priv_data;
251 for (i = 0; i < FFMIN(32, avctx->height - cur_y) - 1; i += 2) {
252 int lsize = FFMIN(32, avctx->width - cur_x);
270 static int fic_decode_frame(AVCodecContext *avctx, AVFrame *rframe,
273 FICContext *ctx = avctx->priv_data;
283 if ((ret = ff_reget_buffer(avctx, ctx->frame, 0)) < 0)
288 av_log(avctx, AV_LOG_ERROR, "Frame data is too small.\n");
294 av_log(avctx, AV_LOG_WARNING, "Invalid FIC Header.\n");
299 av_log(avctx, AV_LOG_WARNING, "Initial frame is skipped\n");
307 av_log(avctx, AV_LOG_ERROR, "Zero slices found.\n");
317 av_log(avctx, AV_LOG_ERROR,
327 av_log(avctx, AV_LOG_WARNING,
335 if (!skip_cursor && (cur_x > avctx->width || cur_y > avctx->height)) {
336 av_log(avctx, AV_LOG_DEBUG,
343 av_log(avctx, AV_LOG_WARNING,
362 av_log(avctx, AV_LOG_ERROR, "Not enough frame data to decode.\n");
370 av_log(avctx, AV_LOG_ERROR, "Could not allocate slice data.\n");
387 slice_h = FFALIGN(avctx->height - ctx->slice_h * (nslices - 1), 16);
405 if ((ret = avctx->execute(avctx, fic_decode_slice, ctx->slice_data,
421 av_log(avctx, AV_LOG_ERROR, "Could not clone frame buffer.\n");
426 if ((ret = ff_reget_buffer(avctx, ctx->final_frame, 0)) < 0) {
427 av_log(avctx, AV_LOG_ERROR, "Could not make frame writable.\n");
434 fic_draw_cursor(avctx, cur_x, cur_y);
445 static av_cold int fic_decode_close(AVCodecContext *avctx)
447 FICContext *ctx = avctx->priv_data;
456 static av_cold int fic_decode_init(AVCodecContext *avctx)
458 FICContext *ctx = avctx->priv_data;
461 ctx->avctx = avctx;
462 ctx->aligned_width = FFALIGN(avctx->width, 16);
463 ctx->aligned_height = FFALIGN(avctx->height, 16);
465 avctx->pix_fmt = AV_PIX_FMT_YUV420P;
466 avctx->bits_per_raw_sample = 8;