Lines Matching defs:avctx

313 static av_cold int libopenjpeg_decode_init(AVCodecContext *avctx)
315 LibOpenJPEGContext *ctx = avctx->priv_data;
321 static int libopenjpeg_decode_frame(AVCodecContext *avctx, AVFrame *picture,
326 LibOpenJPEGContext *ctx = avctx->priv_data;
353 av_log(avctx, AV_LOG_ERROR, "Error initializing decoder.\n");
358 if (!opj_set_error_handler(dec, error_callback, avctx) ||
359 !opj_set_warning_handler(dec, warning_callback, avctx) ||
360 !opj_set_info_handler(dec, info_callback, avctx)) {
361 av_log(avctx, AV_LOG_ERROR, "Error setting decoder handlers.\n");
367 ctx->dec_params.cp_reduce = avctx->lowres;
375 av_log(avctx, AV_LOG_ERROR,
390 av_log(avctx, AV_LOG_ERROR, "Error decoding codestream header.\n");
398 ret = ff_set_dimensions(avctx, width, height);
402 if (avctx->pix_fmt != AV_PIX_FMT_NONE)
403 if (!libopenjpeg_matches_pix_fmt(image, avctx->pix_fmt))
404 avctx->pix_fmt = AV_PIX_FMT_NONE;
406 if (avctx->pix_fmt == AV_PIX_FMT_NONE)
407 avctx->pix_fmt = libopenjpeg_guess_pix_fmt(image);
409 if (avctx->pix_fmt == AV_PIX_FMT_NONE) {
410 av_log(avctx, AV_LOG_ERROR, "Unable to determine pixel format.\n");
415 if (image->comps[i].prec > avctx->bits_per_raw_sample)
416 avctx->bits_per_raw_sample = image->comps[i].prec;
418 if ((ret = ff_thread_get_buffer(avctx, picture, 0)) < 0)
424 av_log(avctx, AV_LOG_ERROR, "Error decoding codestream.\n");
431 av_log(avctx, AV_LOG_ERROR,
438 desc = av_pix_fmt_desc_get(avctx->pix_fmt);
440 ispacked = libopenjpeg_ispacked(avctx->pix_fmt);
470 avpriv_report_missing_feature(avctx, "Pixel size %d", pixel_size);