Lines Matching defs:avctx
380 static int decode_slice_thread(AVCodecContext *avctx, void *arg,
383 HQXContext *ctx = avctx->priv_data;
390 av_log(avctx, AV_LOG_ERROR, "Invalid slice size %d.\n", ctx->data_size);
403 static int hqx_decode_frame(AVCodecContext *avctx, AVFrame *frame,
406 HQXContext *ctx = avctx->priv_data;
413 av_log(avctx, AV_LOG_ERROR, "Frame is too small %d.\n", avpkt->size);
421 av_log(avctx, AV_LOG_ERROR,
426 ff_canopus_parse_info_tag(avctx, src + 8, info_offset);
438 av_log(avctx, AV_LOG_ERROR, "Frame too small.\n");
443 av_log(avctx, AV_LOG_ERROR, "Not an HQX frame.\n");
455 av_log(avctx, AV_LOG_ERROR, "Invalid DC precision %d.\n", ctx->dcb);
458 ret = av_image_check_size(ctx->width, ctx->height, 0, avctx);
460 av_log(avctx, AV_LOG_ERROR, "Invalid stored dimensions %dx%d.\n",
465 avctx->coded_width = FFALIGN(ctx->width, 16);
466 avctx->coded_height = FFALIGN(ctx->height, 16);
467 avctx->width = ctx->width;
468 avctx->height = ctx->height;
469 avctx->bits_per_raw_sample = 10;
475 if (avctx->coded_width / 16 * (avctx->coded_height / 16) *
476 (100 - avctx->discard_damaged_percentage) / 100 > 4LL * avpkt->size)
481 avctx->pix_fmt = AV_PIX_FMT_YUV422P16;
485 avctx->pix_fmt = AV_PIX_FMT_YUV444P16;
489 avctx->pix_fmt = AV_PIX_FMT_YUVA422P16;
493 avctx->pix_fmt = AV_PIX_FMT_YUVA444P16;
497 av_log(avctx, AV_LOG_ERROR, "Invalid format: %d.\n", ctx->format);
501 ret = ff_thread_get_buffer(avctx, frame, 0);
505 avctx->execute2(avctx, decode_slice_thread, NULL, NULL, 16);
515 static av_cold int hqx_decode_close(AVCodecContext *avctx)
518 HQXContext *ctx = avctx->priv_data;
528 static av_cold int hqx_decode_init(AVCodecContext *avctx)
530 HQXContext *ctx = avctx->priv_data;