Lines Matching defs:avctx
38 AVCodecContext *avctx;
67 static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
70 Msvideo1EncContext * const c = avctx->priv_data;
81 if ((ret = ff_alloc_packet(avctx, pkt, avctx->width*avctx->height*9 + AV_INPUT_BUFFER_MIN_SIZE)) < 0)
86 c->prev = av_malloc(avctx->width * 3 * (avctx->height + 3));
87 prevptr = c->prev + avctx->width * 3 * (FFALIGN(avctx->height, 4) - 1);
88 src = (uint16_t*)(p->data[0] + p->linesize[0]*(FFALIGN(avctx->height, 4) - 1));
89 if(c->keyint >= avctx->keyint_min)
93 for(y = 0; y < avctx->height; y += 4){
94 for(x = 0; x < avctx->width; x += 4){
113 int t = prevptr[x*3 + i - j*3*avctx->width] - c->block[i + j*4*3];
214 prevptr[x*3 + i*3 + k - j*3*avctx->width] = c->avg[k];
221 prevptr[x*3 + i*3 + k - j*3*avctx->width] = c->codebook[c->output[i + j*4]*3 + k];
233 prevptr[x*3 + i*3 + k - j*3*avctx->width] = c->codebook2[(c->output2[remap[i+j*4]] + (i&2) + (j&2)*2)*3 + k];
244 prevptr -= avctx->width * 3 * 4;
269 static av_cold int encode_init(AVCodecContext *avctx)
271 Msvideo1EncContext * const c = avctx->priv_data;
273 c->avctx = avctx;
274 if (av_image_check_size(avctx->width, avctx->height, 0, avctx) < 0) {
277 if((avctx->width&3) || (avctx->height&3)){
278 av_log(avctx, AV_LOG_ERROR, "width and height must be multiples of 4\n");
282 avctx->bits_per_coded_sample = 16;
284 c->keyint = avctx->keyint_min;
295 static av_cold int encode_end(AVCodecContext *avctx)
297 Msvideo1EncContext * const c = avctx->priv_data;