Lines Matching refs:mb

460     IVIMbInfo   *mb, *ref_mb;
463 mb = tile->mbs;
485 mb->xpos = x;
486 mb->ypos = y;
487 mb->buf_offs = mb_offset;
494 mb->type = 1; /* empty macroblocks are always INTER */
495 mb->cbp = 0; /* all blocks are empty */
497 mb->q_delta = 0;
499 mb->q_delta = get_vlc2(&ctx->gb, ctx->mb_vlc.tab->table,
501 mb->q_delta = IVI_TOSIGNED(mb->q_delta);
504 mb->mv_x = mb->mv_y = 0; /* no motion vector coded */
508 mb->mv_x = ivi_scale_mv(ref_mb->mv_x, mv_scale);
509 mb->mv_y = ivi_scale_mv(ref_mb->mv_y, mv_scale);
511 mb->mv_x = ref_mb->mv_x;
512 mb->mv_y = ref_mb->mv_y;
517 mb->type = ref_mb->type; /* copy mb_type from corresponding reference mb */
519 mb->type = 0; /* mb_type is always INTRA for intra-frames */
521 mb->type = get_bits1(&ctx->gb);
525 mb->cbp = get_bits(&ctx->gb, blks_per_mb);
527 mb->q_delta = 0;
530 if (ref_mb) mb->q_delta = ref_mb->q_delta;
531 } else if (mb->cbp || (!band->plane && !band->band_num &&
533 mb->q_delta = get_vlc2(&ctx->gb, ctx->mb_vlc.tab->table,
535 mb->q_delta = IVI_TOSIGNED(mb->q_delta);
539 if (!mb->type) {
540 mb->mv_x = mb->mv_y = 0; /* there is no motion vector in intra-macroblocks */
545 mb->mv_x = ivi_scale_mv(ref_mb->mv_x, mv_scale);
546 mb->mv_y = ivi_scale_mv(ref_mb->mv_y, mv_scale);
548 mb->mv_x = ref_mb->mv_x;
549 mb->mv_y = ref_mb->mv_y;
559 mb->mv_x = mv_x;
560 mb->mv_y = mv_y;
566 if (mb->type)
567 if ( x + (mb->mv_x >>s) + (y+ (mb->mv_y >>s))*band->pitch < 0 ||
568 x + ((mb->mv_x+s)>>s) + band->mb_size - 1
569 + (y+band->mb_size - 1 +((mb->mv_y+s)>>s))*band->pitch > band->bufsize - 1) {
570 av_log(avctx, AV_LOG_ERROR, "motion vector %d %d outside reference\n", x*s + mb->mv_x, y*s + mb->mv_y);
574 mb++;