Lines Matching defs:avctx
39 static av_cold int dfa_decode_init(AVCodecContext *avctx)
41 DfaContext *s = avctx->priv_data;
43 avctx->pix_fmt = AV_PIX_FMT_PAL8;
45 if (!avctx->width || !avctx->height || FFMAX(avctx->width, avctx->height) >= (1<<16))
48 av_assert0(av_image_check_size(avctx->width, avctx->height, 0, avctx) >= 0);
50 s->frame_buf = av_mallocz(avctx->width * avctx->height);
340 static int dfa_decode_frame(AVCodecContext *avctx, AVFrame *frame,
343 DfaContext *s = avctx->priv_data;
350 int version = avctx->extradata_size==2 ? AV_RL16(avctx->extradata) : 0;
352 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
372 if (decoder[chunk_type - 2](&gb, s->frame_buf, avctx->width, avctx->height)) {
373 av_log(avctx, AV_LOG_ERROR, "Error decoding %s chunk\n",
378 av_log(avctx, AV_LOG_WARNING,
388 for (i = 0; i < avctx->height; i++) {
390 const uint8_t *buf1 = buf + (i&3)*(avctx->width/4) + (i/4)*avctx->width;
391 int stride = (avctx->height/4)*avctx->width;
392 for(j = 0; j < avctx->width/4; j++) {
399 for(; j < avctx->width; j++) {
405 av_image_copy_plane(dst, frame->linesize[0], buf, avctx->width,
406 avctx->width, avctx->height);
415 static av_cold int dfa_decode_end(AVCodecContext *avctx)
417 DfaContext *s = avctx->priv_data;