Lines Matching defs:avctx

296 static int decode_intra_block(AVCodecContext *avctx, int mode,
301 MV30Context *s = avctx->priv_data;
337 static int decode_inter_block(AVCodecContext *avctx, int mode,
404 static int decode_intra(AVCodecContext *avctx, GetBitContext *gb, AVFrame *frame)
406 MV30Context *s = avctx->priv_data;
425 for (int y = 0; y < avctx->height; y += 16) {
439 for (int x = 0; x < avctx->width; x += 16) {
450 ret = decode_intra_block(avctx, mode, &gbyte, s->intraq_tab[b >= 4],
463 static int decode_inter(AVCodecContext *avctx, GetBitContext *gb,
466 MV30Context *s = avctx->priv_data;
470 const int mask_size = ((avctx->height >> 4) * (avctx->width >> 4) * 2 + 7) / 8;
508 for (int y = 0; y < avctx->height; y += 16) {
531 for (int x = 0; x < avctx->width; x += 16) {
556 if (px < 0 || px > FFALIGN(avctx->width , 16) - 16 ||
557 py < 0 || py > FFALIGN(avctx->height, 16) - 16)
574 ret = decode_inter_block(avctx, mode, &gbyte, s->interq_tab[b >= 4],
587 ret = decode_intra_block(avctx, mode, &gbyte, s->intraq_tab[b >= 4],
604 static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
607 MV30Context *s = avctx->priv_data;
614 if ((ret = ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0)
630 ret = decode_intra(avctx, gb, frame);
638 av_log(avctx, AV_LOG_ERROR, "Missing reference frame.\n");
642 ret = decode_inter(avctx, gb, frame, s->prev_frame);
666 static av_cold int decode_init(AVCodecContext *avctx)
668 MV30Context *s = avctx->priv_data;
671 avctx->pix_fmt = AV_PIX_FMT_YUV420P;
672 avctx->color_range = AVCOL_RANGE_JPEG;
674 ff_blockdsp_init(&s->bdsp, avctx);
685 static void decode_flush(AVCodecContext *avctx)
687 MV30Context *s = avctx->priv_data;
692 static av_cold int decode_close(AVCodecContext *avctx)
694 MV30Context *s = avctx->priv_data;