Lines Matching refs:avctx
54 AVCodecContext *avctx;
71 static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
72 LclEncContext *c = avctx->priv_data;
82 if(avctx->pix_fmt != PIX_FMT_BGR24){
83 av_log(avctx, AV_LOG_ERROR, "Format not supported!\n");
89 av_log(avctx, AV_LOG_ERROR, "Deflate reset error: %d\n", zret);
95 for(i = avctx->height - 1; i >= 0; i--) {
97 c->zstream.avail_in = avctx->width*3;
100 av_log(avctx, AV_LOG_ERROR, "Deflate error: %d\n", zret);
106 av_log(avctx, AV_LOG_ERROR, "Deflate error: %d\n", zret);
118 static av_cold int encode_init(AVCodecContext *avctx)
120 LclEncContext *c = avctx->priv_data;
123 c->avctx= avctx;
125 assert(avctx->width && avctx->height);
127 avctx->extradata= av_mallocz(8);
128 avctx->coded_frame= &c->pic;
134 avctx->bits_per_coded_sample= 24;
136 avctx->extradata[0]= 4;
137 avctx->extradata[1]= 0;
138 avctx->extradata[2]= 0;
139 avctx->extradata[3]= 0;
140 avctx->extradata[4]= c->imgtype;
141 avctx->extradata[5]= c->compression;
142 avctx->extradata[6]= c->flags;
143 avctx->extradata[7]= CODEC_ZLIB;
144 c->avctx->extradata_size= 8;
151 av_log(avctx, AV_LOG_ERROR, "Deflate init error: %d\n", zret);
163 static av_cold int encode_end(AVCodecContext *avctx)
165 LclEncContext *c = avctx->priv_data;
167 av_freep(&avctx->extradata);