int old_mtype, mvd, mv_diff_x, mv_diff_y, i, cbp;
int mvd, mv_diff_x, mv_diff_y, i, cbp;
void ff_h261_encode_mb(MpegEncContext * s,         DCTELEM block[6][64],         int motion_x, int motion_y){    H261Context * h = (H261Context *)s;    int old_mtype, mvd, mv_diff_x, mv_diff_y, i, cbp;    cbp = 63; // avoid warning    mvd = 0;     h->current_mba++;    old_mtype = h->mtype;    h->mtype = 0;     if (!s->mb_intra){        /* compute cbp */        cbp= get_cbp(s, block);           /* mvd indicates if this block is motion compensated */        if(((motion_x >> 1) - h->current_mv_x != 0) || ((motion_y >> 1 ) - h->current_mv_y) != 0){            mvd = 1;        }        else if((motion_x >> 1 == 0) && (motion_y >> 1 == 0)){            mvd = 0;        }        else            mvd = 1;        if((cbp | mvd | s->dquant ) == 0) {            /* skip macroblock */            s->skip_count++;            h->current_mv_x=0;            h->current_mv_y=0;            return;        }    }    /* MB is not skipped, encode MBA */    put_bits(&s->pb, h261_mba_bits[(h->current_mba-h->previous_mba)-1], h261_mba_code[(h->current_mba-h->previous_mba)-1]);     /* calculate MTYPE */    if(!s->mb_intra){        h->mtype+=2;    if(mvd == 1){           h->mtype+=2;        if(cbp!=0)            h->mtype+=1;        if(s->loop_filter)            h->mtype+=3;        }    }    if(s->dquant)         h->mtype++;    put_bits(&s->pb, h261_mtype_bits[h->mtype], h261_mtype_code[h->mtype]);     h->mtype = h261_mtype_map[h->mtype];     if(IS_QUANT(h->mtype)){        ff_set_qscale(s,s->qscale+s->dquant);        put_bits(&s->pb, 5, s->qscale);    }     if(IS_16X16(h->mtype)){        mv_diff_x = (motion_x >> 1) - h->current_mv_x;        mv_diff_y = (motion_y >> 1) - h->current_mv_y;        h->current_mv_x = (motion_x >> 1);        h->current_mv_y = (motion_y >> 1);        h261_encode_motion(h,mv_diff_x);        h261_encode_motion(h,mv_diff_y);    }     h->previous_mba = h->current_mba;     if(HAS_CBP(h->mtype)){        put_bits(&s->pb,h261_cbp_tab[cbp-1][1],h261_cbp_tab[cbp-1][0]);     }    for(i=0; i<6; i++) {        /* encode each block */        h261_encode_block(h, block[i], i);    }    if ( ( h->current_mba == 11 ) || ( h->current_mba == 22 ) || ( h->current_mba == 33 ) || ( !IS_16X16 ( h->mtype ) )){        h->current_mv_x=0;        h->current_mv_y=0;    }}