Lines Matching defs:avctx
193 static int decompress_texture_thread(AVCodecContext *avctx, void *arg,
196 DXVContext *ctx = avctx->priv_data;
199 int w_block = avctx->coded_width / ctx->texture_block_w;
200 int h_block = avctx->coded_height / ctx->texture_block_h;
230 w_block = (avctx->coded_width / 2) / ctx->ctexture_block_w;
231 h_block = (avctx->coded_height / 2) / ctx->ctexture_block_h;
274 av_log(avctx, AV_LOG_ERROR, "idx %d > %d\n", idx, pos); \
281 av_log(avctx, AV_LOG_ERROR, "idx %d > %d\n", idx, pos); \
288 static int dxv_decompress_dxt1(AVCodecContext *avctx)
290 DXVContext *ctx = avctx->priv_data;
833 static int dxv_decompress_ycg6(AVCodecContext *avctx)
835 DXVContext *ctx = avctx->priv_data;
849 static int dxv_decompress_yg10(AVCodecContext *avctx)
851 DXVContext *ctx = avctx->priv_data;
866 static int dxv_decompress_dxt5(AVCodecContext *avctx)
868 DXVContext *ctx = avctx->priv_data;
1023 static int dxv_decompress_lzf(AVCodecContext *avctx)
1025 DXVContext *ctx = avctx->priv_data;
1029 static int dxv_decompress_raw(AVCodecContext *avctx)
1031 DXVContext *ctx = avctx->priv_data;
1041 static int dxv_decode(AVCodecContext *avctx, AVFrame *frame,
1044 DXVContext *ctx = avctx->priv_data;
1046 int (*decompress_tex)(AVCodecContext *avctx);
1058 avctx->pix_fmt = AV_PIX_FMT_RGBA;
1059 avctx->colorspace = AVCOL_SPC_RGB;
1092 ctx->ctex_size = avctx->coded_width * avctx->coded_height / 4;
1097 avctx->pix_fmt = AV_PIX_FMT_YUV420P;
1098 avctx->colorspace = AVCOL_SPC_YCOCG;
1109 ctx->ctex_size = avctx->coded_width * avctx->coded_height / 4;
1114 avctx->pix_fmt = AV_PIX_FMT_YUVA420P;
1115 avctx->colorspace = AVCOL_SPC_YCOCG;
1142 av_log(avctx, AV_LOG_ERROR, "Unsupported header (0x%08"PRIX32")\n.", tag);
1149 ctx->slice_count = av_clip(avctx->thread_count, 1,
1150 avctx->coded_height / FFMAX(ctx->texture_block_h,
1168 av_log(avctx, AV_LOG_DEBUG,
1173 av_log(avctx, AV_LOG_ERROR,
1179 ctx->tex_size = avctx->coded_width * avctx->coded_height * 4 / ctx->tex_rat;
1187 ctx->op_size[0] = avctx->coded_width * avctx->coded_height / 16;
1188 ctx->op_size[1] = avctx->coded_width * avctx->coded_height / 32;
1189 ctx->op_size[2] = avctx->coded_width * avctx->coded_height / 32;
1190 ctx->op_size[3] = avctx->coded_width * avctx->coded_height / 16;
1203 ret = decompress_tex(avctx);
1207 int w_block = avctx->coded_width / ctx->texture_block_w;
1208 int h_block = avctx->coded_height / ctx->texture_block_h;
1213 ret = ff_thread_get_buffer(avctx, frame, 0);
1218 avctx->execute2(avctx, decompress_texture_thread,
1229 static int dxv_init(AVCodecContext *avctx)
1231 DXVContext *ctx = avctx->priv_data;
1232 int ret = av_image_check_size(avctx->width, avctx->height, 0, avctx);
1235 av_log(avctx, AV_LOG_ERROR, "Invalid image size %dx%d.\n",
1236 avctx->width, avctx->height);
1241 avctx->coded_width = FFALIGN(avctx->width, 16);
1242 avctx->coded_height = FFALIGN(avctx->height, 16);
1249 static int dxv_close(AVCodecContext *avctx)
1251 DXVContext *ctx = avctx->priv_data;