else return 2;
static int decode_cabac_mb_type( H264Context *h ) {    MpegEncContext * const s = &h->s;    if( h->slice_type == I_TYPE ) {        const int mb_xy= s->mb_x + s->mb_y*s->mb_stride;        int ctx = 0;        int mb_type;        if( s->mb_x > 0 && !IS_INTRA4x4( s->current_picture.mb_type[mb_xy-1] ) )            ctx++;        if( s->mb_y > 0 && !IS_INTRA4x4( s->current_picture.mb_type[mb_xy-s->mb_stride] ) )            ctx++;        if( get_cabac( &h->cabac, &h->cabac_state[3+ctx] ) == 0 )            return 0;   /* I4x4 */        if( get_cabac_terminate( &h->cabac ) )            return 25;  /* PCM */        mb_type = 1;    /* I16x16 */        if( get_cabac( &h->cabac, &h->cabac_state[3+3] ) )            mb_type += 12;  /* cbp_luma != 0 */        if( get_cabac( &h->cabac, &h->cabac_state[3+4] ) ) {            if( get_cabac( &h->cabac, &h->cabac_state[3+5] ) )                mb_type += 4 * 2;   /* cbp_chroma == 2 */            else                mb_type += 4 * 1;   /* cbp_chroma == 1 */        }        if( get_cabac( &h->cabac, &h->cabac_state[3+6] ) )            mb_type += 2;        if( get_cabac( &h->cabac, &h->cabac_state[3+7] ) )            mb_type += 1;        return mb_type;    } else if( h->slice_type == P_TYPE ) {        if( get_cabac( &h->cabac, &h->cabac_state[14] ) == 0 ) {            /* P-type */            if( get_cabac( &h->cabac, &h->cabac_state[15] ) == 0 ) {                if( get_cabac( &h->cabac, &h->cabac_state[16] ) == 0 )                    return 0; /* P_L0_D16x16; */                else                    return 3; /* P_8x8; */            } else {                if( get_cabac( &h->cabac, &h->cabac_state[17] ) == 0 )                    return 1; /* P_L0_D16x8; */                else                    return 2; /* P_L0_D8x16; */            }        } else {            int mb_type;            /* I-type */            if( get_cabac( &h->cabac, &h->cabac_state[17] ) == 0 )                return 5+0; /* I_4x4 */            if( get_cabac_terminate( &h->cabac ) )                return 5+25; /*I_PCM */            mb_type = 5+1;    /* I16x16 */            if( get_cabac( &h->cabac, &h->cabac_state[17+1] ) )                mb_type += 12;  /* cbp_luma != 0 */            if( get_cabac( &h->cabac, &h->cabac_state[17+2] ) ) {                if( get_cabac( &h->cabac, &h->cabac_state[17+2] ) )                    mb_type += 4 * 2;   /* cbp_chroma == 2 */                else                    mb_type += 4 * 1;   /* cbp_chroma == 1 */            }            if( get_cabac( &h->cabac, &h->cabac_state[17+3] ) )                mb_type += 2;            if( get_cabac( &h->cabac, &h->cabac_state[17+3] ) )                mb_type += 1;            return mb_type;        }    } else {        /* TODO do others frames types */        return -1;    }}