Lines Matching defs:avctx

117 static av_cold int escape130_decode_init(AVCodecContext *avctx)
119 Escape130Context *s = avctx->priv_data;
120 avctx->pix_fmt = AV_PIX_FMT_YUV420P;
122 if ((avctx->width & 1) || (avctx->height & 1)) {
123 av_log(avctx, AV_LOG_ERROR,
128 s->old_y_avg = av_malloc(avctx->width * avctx->height / 4);
129 s->buf1 = av_malloc(avctx->width * avctx->height * 3 / 2);
130 s->buf2 = av_malloc(avctx->width * avctx->height * 3 / 2);
132 av_log(avctx, AV_LOG_ERROR, "Could not allocate buffer.\n");
136 s->linesize[0] = avctx->width;
138 s->linesize[2] = avctx->width / 2;
141 s->new_u = s->new_y + avctx->width * avctx->height;
142 s->new_v = s->new_u + avctx->width * avctx->height / 4;
144 s->old_u = s->old_y + avctx->width * avctx->height;
145 s->old_v = s->old_u + avctx->width * avctx->height / 4;
146 memset(s->old_y, 0, avctx->width * avctx->height);
147 memset(s->old_u, 0x10, avctx->width * avctx->height / 4);
148 memset(s->old_v, 0x10, avctx->width * avctx->height / 4);
153 static av_cold int escape130_decode_close(AVCodecContext *avctx)
155 Escape130Context *s = avctx->priv_data;
190 static int escape130_decode_frame(AVCodecContext *avctx, AVFrame *pic,
194 Escape130Context *s = avctx->priv_data;
203 unsigned total_blocks = avctx->width * avctx->height / 4,
211 av_log(avctx, AV_LOG_ERROR, "Insufficient frame data\n");
215 if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
241 av_log(avctx, AV_LOG_ERROR, "Error decoding skip value\n");
300 if (block_x * 2 == avctx->width) {
302 old_y += old_y_stride * 2 - avctx->width;
303 old_cb += old_cb_stride - avctx->width / 2;
304 old_cr += old_cr_stride - avctx->width / 2;
305 new_y += new_y_stride * 2 - avctx->width;
306 new_cb += new_cb_stride - avctx->width / 2;
307 new_cr += new_cr_stride - avctx->width / 2;
319 for (j = 0; j < avctx->height; j++) {
320 for (i = 0; i < avctx->width; i++)
325 for (j = 0; j < avctx->height / 2; j++) {
326 for (i = 0; i < avctx->width / 2; i++) {
336 ff_dlog(avctx, "Frame data: provided %d bytes, used %d bytes\n",