Lines Matching refs:avctx
152 static int decode_frame(AVCodecContext *avctx,
156 SgiState *s = avctx->priv_data;
165 av_log(avctx, AV_LOG_ERROR, "buf_size too small (%d)\n", avpkt->size);
171 av_log(avctx, AV_LOG_ERROR, "bad magic number\n");
183 av_log(avctx, AV_LOG_ERROR, "wrong channel number\n");
189 av_log(avctx, AV_LOG_ERROR, "wrong dimension number\n");
194 avctx->pix_fmt = s->bytes_per_channel == 2 ? PIX_FMT_GRAY16BE : PIX_FMT_GRAY8;
196 avctx->pix_fmt = s->bytes_per_channel == 2 ? PIX_FMT_RGB48BE : PIX_FMT_RGB24;
198 avctx->pix_fmt = PIX_FMT_RGBA;
200 av_log(avctx, AV_LOG_ERROR, "wrong picture format\n");
204 if (av_image_check_size(s->width, s->height, 0, avctx))
206 avcodec_set_dimensions(avctx, s->width, s->height);
209 avctx->release_buffer(avctx, p);
212 if (avctx->get_buffer(avctx, p) < 0) {
213 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed.\n");
242 static av_cold int sgi_init(AVCodecContext *avctx){
243 SgiState *s = avctx->priv_data;
246 avctx->coded_frame = &s->picture;
251 static av_cold int sgi_end(AVCodecContext *avctx)
253 SgiState * const s = avctx->priv_data;
256 avctx->release_buffer(avctx, &s->picture);