Lines Matching refs:mb
604 IVIMbInfo *mb;
612 /* number of blocks per mb */
626 for (mbn = 0, mb = tile->mbs; mbn < tile->num_MBs; mb++, mbn++) {
627 is_intra = !mb->type;
628 cbp = mb->cbp;
629 buf_offs = mb->buf_offs;
631 quant = band->glob_quant + mb->q_delta;
642 mv_x = mb->mv_x;
643 mv_y = mb->mv_y;
644 mv_x2 = mb->b_mv_x;
645 mv_y2 = mb->b_mv_y;
654 if (mb->type == 2)
656 if (mb->type != 2 && mb->type != 3)
658 if (mb->type) {
661 dmv_x = mb->mv_x >> band->is_halfpel;
662 dmv_y = mb->mv_y >> band->is_halfpel;
663 cx = mb->mv_x & band->is_halfpel;
664 cy = mb->mv_y & band->is_halfpel;
666 if (mb->xpos + dmv_x < 0 ||
667 mb->xpos + dmv_x + band->mb_size + cx > band->pitch ||
668 mb->ypos + dmv_y < 0 ||
669 mb->ypos + dmv_y + band->mb_size + cy > band->aheight) {
673 if (mb->type == 2 || mb->type == 3) {
676 dmv_x = mb->b_mv_x >> band->is_halfpel;
677 dmv_y = mb->b_mv_y >> band->is_halfpel;
678 cx = mb->b_mv_x & band->is_halfpel;
679 cy = mb->b_mv_y & band->is_halfpel;
681 if (mb->xpos + dmv_x < 0 ||
682 mb->xpos + dmv_x + band->mb_size + cx > band->pitch ||
683 mb->ypos + dmv_y < 0 ||
684 mb->ypos + dmv_y + band->mb_size + cy > band->aheight) {
753 IVIMbInfo *mb, *ref_mb;
771 mb = tile->mbs;
780 mb->xpos = x;
781 mb->ypos = y;
782 mb->buf_offs = mb_offset;
784 mb->type = 1; /* set the macroblocks type = INTER */
785 mb->cbp = 0; /* all blocks are empty */
788 mb->q_delta = band->glob_quant;
789 mb->mv_x = 0;
790 mb->mv_y = 0;
795 mb->q_delta = ref_mb->q_delta;
800 mb->mv_x = ivi_scale_mv(ref_mb->mv_x, mv_scale);
801 mb->mv_y = ivi_scale_mv(ref_mb->mv_y, mv_scale);
803 mb->mv_x = ref_mb->mv_x;
804 mb->mv_y = ref_mb->mv_y;
806 need_mc |= mb->mv_x || mb->mv_y; /* tracking non-zero motion vectors */
810 dmv_x = mb->mv_x >> is_halfpel;
811 dmv_y = mb->mv_y >> is_halfpel;
812 cx = mb->mv_x & is_halfpel;
813 cy = mb->mv_y & is_halfpel;
815 if ( mb->xpos + dmv_x < 0
816 || mb->xpos + dmv_x + mb_size + cx > pitch
817 || mb->ypos + dmv_y < 0
818 || mb->ypos + dmv_y + mb_size + cy > band->aheight) {
827 mb++;
834 num_blocks = (mb_size != band->blk_size) ? 4 : 1; /* number of blocks per mb */
838 for (mbn = 0, mb = tile->mbs; mbn < tile->num_MBs; mb++, mbn++) {
839 mv_x = mb->mv_x;
840 mv_y = mb->mv_y;
851 offs = mb->buf_offs + band->blk_size * ((blk & 1) + !!(blk & 2) * pitch);