Lines Matching defs:avctx

70     AVCodecContext *avctx;
225 static int copy_block(AVCodecContext *avctx, AVFrame *dst, AVFrame *src,
236 x + size > avctx->coded_width >> shift ||
237 y + size > avctx->coded_height >> shift ||
238 sx + size > avctx->coded_width >> shift ||
239 sy + size > avctx->coded_height >> shift)
261 static int copyadd_block(AVCodecContext *avctx, AVFrame *dst, AVFrame *src,
276 x + size > avctx->coded_width >> shift ||
277 y + size > avctx->coded_height >> shift ||
278 sx + size > avctx->coded_width >> shift ||
279 sy + size > avctx->coded_height >> shift)
418 static int tile_do_block(AVCodecContext *avctx, AVFrame *dst, AVFrame *src,
424 ret = copy_block(avctx, dst, src, plane, x, y, dx, dy, size);
426 ret = copyadd_block(avctx, dst, src, plane, x, y, dx, dy, size, bias);
432 static int restore_tree(AVCodecContext *avctx, AVFrame *dst, AVFrame *src,
443 ret = tile_do_block(avctx, dst, src, plane, x, y, mv.x, mv.y, size, tile->bias);
452 ret = restore_tree(avctx, dst, src, plane, x + xoff, y + yoff, hsize, tile->child[i], root_mv);
455 ret = tile_do_block(avctx, dst, src, plane, x + xoff, y + yoff, mv.x, mv.y, hsize, tile->bias);
502 static int clv_decode_frame(AVCodecContext *avctx, AVFrame *rframe,
507 CLVContext *c = avctx->priv_data;
514 if (avctx->codec_tag == MKTAG('C', 'L', 'V', '1')) {
526 av_log(avctx, AV_LOG_ERROR, "Packet too small\n");
530 if ((ret = ff_reget_buffer(avctx, c->pic, 0)) < 0)
564 if ((ret = ff_reget_buffer(avctx, c->pic, 0)) < 0)
591 ret = copy_block(avctx, c->pic, c->prev, plane, x, y, mx, my, size);
606 ret = restore_tree(avctx, c->pic, c->prev, 0, x, y, size, tile, mv);
620 ret = restore_tree(avctx, c->pic, c->prev, 1, x, y, size, tile, cmv);
627 ret = restore_tree(avctx, c->pic, c->prev, 2, x, y, size, tile, cmv);
649 av_log(c->avctx, AV_LOG_WARNING, "overread %d\n", -get_bits_left(&c->gb));
708 static av_cold int clv_decode_init(AVCodecContext *avctx)
711 CLVContext *const c = avctx->priv_data;
714 if (avctx->extradata_size == 110) {
715 c->tile_size = AV_RL32(&avctx->extradata[94]);
716 } else if (avctx->extradata_size == 150) {
717 c->tile_size = AV_RB32(&avctx->extradata[134]);
718 } else if (!avctx->extradata_size) {
721 av_log(avctx, AV_LOG_ERROR, "Unsupported extradata size: %d\n", avctx->extradata_size);
727 av_log(avctx, AV_LOG_ERROR, "Tile size: %d, is not power of 2 > 1 and < 2^31\n", c->tile_size);
731 avctx->pix_fmt = AV_PIX_FMT_YUV420P;
732 w = avctx->width;
733 h = avctx->height;
734 ret = ff_set_dimensions(avctx, FFALIGN(w, 1 << c->tile_shift), FFALIGN(h, 1 << c->tile_shift));
737 avctx->width = w;
738 avctx->height = h;
740 c->avctx = avctx;
741 c->mb_width = FFALIGN(avctx->width, 16) >> 4;
742 c->mb_height = FFALIGN(avctx->height, 16) >> 4;
751 ff_idctdsp_init(&c->idsp, avctx);
758 static av_cold int clv_decode_end(AVCodecContext *avctx)
760 CLVContext *const c = avctx->priv_data;