Lines Matching defs:avctx
36 AVCodecContext *avctx;
85 static av_cold int yop_decode_close(AVCodecContext *avctx)
87 YopDecContext *s = avctx->priv_data;
94 static av_cold int yop_decode_init(AVCodecContext *avctx)
96 YopDecContext *s = avctx->priv_data;
97 s->avctx = avctx;
99 if (avctx->width & 1 || avctx->height & 1 ||
100 av_image_check_size(avctx->width, avctx->height, 0, avctx) < 0) {
101 av_log(avctx, AV_LOG_ERROR, "YOP has invalid dimensions\n");
105 if (avctx->extradata_size < 3) {
106 av_log(avctx, AV_LOG_ERROR, "Missing or incomplete extradata.\n");
110 avctx->pix_fmt = AV_PIX_FMT_PAL8;
112 s->num_pal_colors = avctx->extradata[0];
113 s->first_color[0] = avctx->extradata[1];
114 s->first_color[1] = avctx->extradata[2];
118 av_log(avctx, AV_LOG_ERROR,
138 av_log(s->avctx, AV_LOG_ERROR, "Packet too small.\n");
164 av_log(s->avctx, AV_LOG_ERROR, "File probably corrupt\n");
194 static int yop_decode_frame(AVCodecContext *avctx, AVFrame *rframe,
197 YopDecContext *s = avctx->priv_data;
204 av_log(avctx, AV_LOG_ERROR, "Packet too small.\n");
208 if ((ret = ff_reget_buffer(avctx, frame, 0)) < 0)
211 if (!avctx->frame_number)
222 av_log(avctx, AV_LOG_ERROR, "frame is too odd %d\n", is_odd_frame);
238 for (y = 0; y < avctx->height; y += 2) {
239 for (x = 0; x < avctx->width; x += 2) {
241 av_log(avctx, AV_LOG_ERROR, "Packet too small.\n");