if(h->sps.mb_aff && s->mb_skip_run==0 && (s->mb_y&1)==0){ h->mb_field_decoding_flag= get_bits1(&s->gb); } if(h->mb_field_decoding_flag) mb_type|= MB_TYPE_INTERLACED;
static void decode_mb_skip(H264Context *h){    MpegEncContext * const s = &h->s;    const int mb_xy= s->mb_x + s->mb_y*s->mb_stride;    int mb_type;        memset(h->non_zero_count[mb_xy], 0, 16);    memset(h->non_zero_count_cache + 8, 0, 8*5); //FIXME ugly, remove pfui    if( h->slice_type == B_TYPE )    {        // just for fill_caches. pred_direct_motion will set the real mb_type        mb_type= MB_TYPE_16x16|MB_TYPE_P0L0|MB_TYPE_P0L1|MB_TYPE_DIRECT2|MB_TYPE_SKIP;        //FIXME mbaff        fill_caches(h, mb_type, 0); //FIXME check what is needed and what not ...        pred_direct_motion(h, &mb_type);        if(h->pps.cabac){            fill_rectangle(h->mvd_cache[0][scan8[0]], 4, 4, 8, 0, 4);            fill_rectangle(h->mvd_cache[1][scan8[0]], 4, 4, 8, 0, 4);        }    }    else    {        int mx, my;        mb_type= MB_TYPE_16x16|MB_TYPE_P0L0|MB_TYPE_P1L0|MB_TYPE_SKIP;        if(h->sps.mb_aff && s->mb_skip_run==0 && (s->mb_y&1)==0){            h->mb_field_decoding_flag= get_bits1(&s->gb);        }        if(h->mb_field_decoding_flag)            mb_type|= MB_TYPE_INTERLACED;                fill_caches(h, mb_type, 0); //FIXME check what is needed and what not ...        pred_pskip_motion(h, &mx, &my);        fill_rectangle(&h->ref_cache[0][scan8[0]], 4, 4, 8, 0, 1);        fill_rectangle(  h->mv_cache[0][scan8[0]], 4, 4, 8, pack16to32(mx,my), 4);        if(h->pps.cabac)            fill_rectangle(h->mvd_cache[0][scan8[0]], 4, 4, 8, 0, 4);    }    write_back_motion(h, mb_type);    s->current_picture.mb_type[mb_xy]= mb_type|MB_TYPE_SKIP;    s->current_picture.qscale_table[mb_xy]= s->qscale;    h->slice_table[ mb_xy ]= h->slice_num;    h->prev_mb_skiped= 1;}