static av_cold int avs_decode_init(AVCodecContext * avctx)
{
+ AvsContext *s = avctx->priv_data;
avctx->pix_fmt = AV_PIX_FMT_PAL8;
avcodec_set_dimensions(avctx, 318, 198);
+ avcodec_get_frame_defaults(&s->picture);
return 0;
}
{
BethsoftvidContext *vid = avctx->priv_data;
avctx->pix_fmt = AV_PIX_FMT_PAL8;
+ avcodec_get_frame_defaults(&vid->frame);
return 0;
}
static av_cold int decode_init(AVCodecContext *avctx)
{
+ C93DecoderContext *s = avctx->priv_data;
avctx->pix_fmt = AV_PIX_FMT_PAL8;
+ avcodec_get_frame_defaults(&s->pictures[0]);
+ avcodec_get_frame_defaults(&s->pictures[1]);
return 0;
}
avctx->pix_fmt = AV_PIX_FMT_PAL8;
}
- s->frame.data[0] = NULL;
+ avcodec_get_frame_defaults(&s->frame);
return 0;
}
cin->avctx = avctx;
avctx->pix_fmt = AV_PIX_FMT_PAL8;
- cin->frame.data[0] = NULL;
+ avcodec_get_frame_defaults(&cin->frame);
cin->bitmap_size = avctx->width * avctx->height;
for (i = 0; i < 3; ++i) {
s->idct_put[1] = ff_simple_idct248_put; // FIXME: need to add it to DSP
memcpy(s->dv_zigzag[1], ff_zigzag248_direct, 64);
+ avcodec_get_frame_defaults(&s->picture);
avctx->coded_frame = &s->picture;
s->avctx = avctx;
avctx->chroma_sample_location = AVCHROMA_LOC_TOPLEFT;
return 1;
}
avctx->pix_fmt = AV_PIX_FMT_BGR24;
- s->frame.data[0] = NULL;
+ avcodec_get_frame_defaults(&s->frame);
return 0;
}
return AVERROR_INVALIDDATA;
}
- s->frame.data[0] = NULL;
+ avcodec_get_frame_defaults(&s->frame);
s->new_palette = 0;
return 0;
s->avctx = avctx;
s->tmpbuf = NULL;
+ avcodec_get_frame_defaults(&s->frame);
+
ff_dsputil_init(&s->dsp, avctx);
return 0;
if (!s->planebuf)
return AVERROR(ENOMEM);
+ avcodec_get_frame_defaults(&s->frame);
+
return 0;
}
avctx->pix_fmt= AV_PIX_FMT_YUV410P;
+ avcodec_get_frame_defaults(&ic->picture);
+
ir2_vlc.table = vlc_tables;
ir2_vlc.table_allocated = 1 << CODE_VLC_BITS;
#ifdef BITSTREAM_READER_LE
avctx->pix_fmt = AV_PIX_FMT_PAL8;
+ avcodec_get_frame_defaults(&s->frame);
+
return 0;
}
mp->vpt = av_mallocz(avctx->height * sizeof(YuvPixel));
mp->hpt = av_mallocz(h4 * w4 / 16 * sizeof(YuvPixel));
avctx->pix_fmt = AV_PIX_FMT_RGB555;
+ avcodec_get_frame_defaults(&mp->frame);
return 0;
}
return AVERROR_INVALIDDATA;
}
- s->frame.data[0] = NULL;
+ avcodec_get_frame_defaults(&s->frame);
return 0;
}
avctx->pix_fmt = AV_PIX_FMT_RGB555;
}
- s->frame.data[0] = NULL;
+ avcodec_get_frame_defaults(&s->frame);
return 0;
}
avctx->pix_fmt= AV_PIX_FMT_PAL8;
a->refdata = av_malloc(avctx->width * avctx->height);
+ avcodec_get_frame_defaults(&a->pic);
+
return 0;
}
return AVERROR_INVALIDDATA;
}
- s->frame.data[0] = NULL;
+ avcodec_get_frame_defaults(&s->frame);
return 0;
}
s->avctx = avctx;
avctx->pix_fmt = AV_PIX_FMT_RGB555;
- s->frame.data[0] = NULL;
+ avcodec_get_frame_defaults(&s->frame);
return 0;
}
c->avctx = avctx;
avctx->pix_fmt = AV_PIX_FMT_PAL8;
-
+ avcodec_get_frame_defaults(&c->pic);
/* decode huffman trees from extradata */
if(avctx->extradata_size < 16){
s->avctx = avctx;
avctx->pix_fmt = AV_PIX_FMT_PAL8;
- s->frame.data[0] = NULL;
+ avcodec_get_frame_defaults(&s->frame);
return 0;
}
seq->avctx = avctx;
avctx->pix_fmt = AV_PIX_FMT_PAL8;
- seq->frame.data[0] = NULL;
+ avcodec_get_frame_defaults(&seq->frame);
return 0;
}
// else
// avctx->pix_fmt = AV_PIX_FMT_RGB555;
- s->frame.data[0] = NULL;
+ avcodec_get_frame_defaults(&s->frame);
/* there is a vertical predictor for each pixel in a line; each vertical
* predictor is 0 to start with */
}
l->avctx = avctx;
- l->pic.data[0] = NULL;
+ avcodec_get_frame_defaults(&l->pic);
avctx->pix_fmt = AV_PIX_FMT_BGR24;
ff_dsputil_init(&l->dsp, avctx);
avctx->pix_fmt = AV_PIX_FMT_YUV410P;
avctx->coded_frame = &s->frame;
s->ulti_codebook = ulti_codebook;
+ avcodec_get_frame_defaults(&s->frame);
return 0;
}
return AVERROR_INVALIDDATA;
}
+ avcodec_get_frame_defaults(&c->pic);
+
return 0;
}