Lines Matching refs:avctx
30 static av_cold int ptx_init(AVCodecContext *avctx) {
31 PTXContext *s = avctx->priv_data;
34 avctx->coded_frame= &s->picture;
39 static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
43 PTXContext * const s = avctx->priv_data;
57 av_log_ask_for_sample(avctx, "Image format is not RGB15.\n");
61 avctx->pix_fmt = PIX_FMT_RGB555;
66 av_log_ask_for_sample(avctx, "offset != 0x2c\n");
71 avctx->release_buffer(avctx, p);
73 if (av_image_check_size(w, h, 0, avctx))
75 if (w != avctx->width || h != avctx->height)
76 avcodec_set_dimensions(avctx, w, h);
77 if (avctx->get_buffer(avctx, p) < 0) {
78 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
103 av_log(avctx, AV_LOG_WARNING, "incomplete packet\n");
110 static av_cold int ptx_end(AVCodecContext *avctx) {
111 PTXContext *s = avctx->priv_data;
114 avctx->release_buffer(avctx, &s->picture);