Lines Matching defs:avctx
59 AVCodecContext *avctx;
153 av_log(c->avctx, AV_LOG_ERROR, "Used %"PTRDIFF_SPECIFIER" of %i bytes\n",
229 av_log(c->avctx, AV_LOG_ERROR, "Used %"PTRDIFF_SPECIFIER" of %i bytes\n",
314 av_log(c->avctx, AV_LOG_ERROR, "Used %"PTRDIFF_SPECIFIER" of %i bytes\n",
391 av_log(c->avctx, AV_LOG_ERROR, "Used %"PTRDIFF_SPECIFIER" of %i bytes\n",
413 static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
418 ZmbvContext * const c = avctx->priv_data;
444 av_log(avctx, AV_LOG_DEBUG,
448 avpriv_request_sample(avctx, "Version %i.%i", hi_ver, lo_ver);
452 avpriv_request_sample(avctx, "Block size %ix%i", c->bw, c->bh);
456 avpriv_request_sample(avctx, "Compression type %i", c->comp);
464 avctx->pix_fmt = AV_PIX_FMT_PAL8;
472 avctx->pix_fmt = AV_PIX_FMT_RGB555LE;
474 avctx->pix_fmt = AV_PIX_FMT_RGB565LE;
481 avctx->pix_fmt = AV_PIX_FMT_BGR24;
488 avctx->pix_fmt = AV_PIX_FMT_BGR0;
493 avpriv_request_sample(avctx, "Format %i", c->fmt);
499 av_log(avctx, AV_LOG_ERROR, "Inflate reset error: %d\n", zret);
504 c->cur = av_realloc_f(c->cur, avctx->width * avctx->height, (c->bpp / 8));
505 c->prev = av_realloc_f(c->prev, avctx->width * avctx->height, (c->bpp / 8));
514 memset(c->cur, 0, avctx->width * avctx->height * (c->bpp / 8));
515 memset(c->prev, 0, avctx->width * avctx->height * (c->bpp / 8));
519 expected_size = avctx->width * avctx->height * (c->bpp / 8);
523 if (avctx->pix_fmt == AV_PIX_FMT_PAL8 &&
528 av_log(avctx, AV_LOG_ERROR, "Error! Got no format or no keyframe!\n");
534 av_log(avctx, AV_LOG_ERROR, "Buffer too small\n");
549 av_log(avctx, AV_LOG_ERROR, "inflate error %d\n", zret);
556 av_log(avctx, AV_LOG_ERROR, "decompressed size %d is incorrect, expected %d\n", c->decomp_len, expected_size);
559 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
596 av_log(avctx, AV_LOG_ERROR, "Cannot handle format %i\n", c->fmt);
606 static av_cold int decode_init(AVCodecContext *avctx)
608 ZmbvContext * const c = avctx->priv_data;
610 c->avctx = avctx;
612 c->width = avctx->width;
613 c->height = avctx->height;
615 c->bpp = avctx->bits_per_coded_sample;
617 if ((avctx->width + 255ULL) * (avctx->height + 64ULL) > FFMIN(avctx->max_pixels, INT_MAX / 4) ) {
618 av_log(avctx, AV_LOG_ERROR, "Internal buffer (decomp_size) larger than max_pixels or too large\n");
622 c->decomp_size = (avctx->width + 255) * 4 * (avctx->height + 64);
627 av_log(avctx, AV_LOG_ERROR,
632 return ff_inflate_init(&c->zstream, avctx);
635 static av_cold int decode_end(AVCodecContext *avctx)
637 ZmbvContext * const c = avctx->priv_data;