Lines Matching defs:avctx

39 static av_cold int vbn_init(AVCodecContext *avctx)
41 VBNContext *ctx = avctx->priv_data;
46 static int decompress(AVCodecContext *avctx, GetByteContext *gb,
52 av_log(avctx, AV_LOG_ERROR, "Unsupported VBN compression: 0x%08x\n", compression);
56 static int vbn_decode_frame(AVCodecContext *avctx,
60 VBNContext *ctx = avctx->priv_data;
70 av_log(avctx, AV_LOG_ERROR, "VBN header truncated\n");
77 av_log(avctx, AV_LOG_ERROR, "Invalid VBN header\n");
94 av_log(avctx, AV_LOG_ERROR, "Truncated packet\n");
99 av_log(avctx, AV_LOG_ERROR, "Unsupported pixel format: 0x%08x\n", pix_fmt);
103 ret = ff_set_dimensions(avctx, width, height);
109 avctx->pix_fmt = AV_PIX_FMT_RGB24;
110 linesize = avctx->width * 3;
112 avctx->pix_fmt = AV_PIX_FMT_RGBA;
113 linesize = avctx->width * 4;
115 av_log(avctx, AV_LOG_ERROR, "Unsupported number of components: %d\n", components);
119 if (avctx->width % TEXTURE_BLOCK_W || avctx->height % TEXTURE_BLOCK_H) {
120 av_log(avctx, AV_LOG_ERROR, "DXTx compression only supports 4 pixel aligned resolutions\n");
124 avctx->pix_fmt = AV_PIX_FMT_RGBA;
128 linesize = avctx->coded_width / 2;
132 linesize = avctx->coded_width;
135 av_log(avctx, AV_LOG_ERROR, "Unsupported VBN format: 0x%02x\n", format);
139 image_len = decompress(avctx, gb, compression, &image_buf);
143 if (image_len < linesize * avctx->coded_height) {
144 av_log(avctx, AV_LOG_ERROR, "Insufficent data\n");
149 ret = ff_get_buffer(avctx, frame, 0);
160 ctx->dec.slice_count = av_clip(avctx->thread_count, 1, avctx->coded_height / TEXTURE_BLOCK_H);
165 avctx->execute2(avctx, ff_texturedsp_decompress_thread, &ctx->dec, NULL, ctx->dec.slice_count);