Lines Matching refs:avctx
31 static av_cold int encode_init(AVCodecContext *avctx)
33 if (avctx->width > 65535 || avctx->height > 65535) {
34 av_log(avctx, AV_LOG_ERROR,
35 "Unsupported resolution %dx%d.\n", avctx->width, avctx->height);
36 av_log(avctx, AV_LOG_ERROR, "SGI does not support resolutions above 65535x65535\n");
40 avctx->coded_frame = av_frame_alloc();
41 if (!avctx->coded_frame)
47 static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
57 avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
58 avctx->coded_frame->key_frame = 1;
60 width = avctx->width;
61 height = avctx->height;
66 switch (avctx->pix_fmt) {
82 avctx->coder_type = FF_CODER_TYPE_RAW;
91 avctx->coder_type = FF_CODER_TYPE_RAW;
100 avctx->coder_type = FF_CODER_TYPE_RAW;
112 if (avctx->coder_type == FF_CODER_TYPE_RAW)
117 if ((ret = ff_alloc_packet2(avctx, pkt, bytes_per_channel * length)) < 0)
124 bytestream_put_byte(&buf, avctx->coder_type != FF_CODER_TYPE_RAW); /* RLE 1 - VERBATIM 0*/
146 if (avctx->coder_type != FF_CODER_TYPE_RAW) {
209 static av_cold int encode_close(AVCodecContext *avctx)
211 av_frame_free(&avctx->coded_frame);