Revision ce5e49b0 libavcodec/h264_cabac.c

View differences:

libavcodec/h264_cabac.c
691 691
    const int8_t (*tab)[2];
692 692
    const int slice_qp = av_clip(s->qscale - 6*(h->sps.bit_depth_luma-8), 0, 51);
693 693

  
694
    if( h->slice_type_nos == FF_I_TYPE ) tab = cabac_context_init_I;
694
    if( h->slice_type_nos == AV_PICTURE_TYPE_I ) tab = cabac_context_init_I;
695 695
    else                                 tab = cabac_context_init_PB[h->cabac_init_idc];
696 696

  
697 697
    /* calculate pre-state */
......
779 779
    if( h->slice_table[mbb_xy] == h->slice_num && !IS_SKIP( s->current_picture.mb_type[mbb_xy] ))
780 780
        ctx++;
781 781

  
782
    if( h->slice_type_nos == FF_B_TYPE )
782
    if( h->slice_type_nos == AV_PICTURE_TYPE_B )
783 783
        ctx += 13;
784 784
    return get_cabac_noinline( &h->cabac, &h->cabac_state[11+ctx] );
785 785
}
......
888 888
    int ref  = 0;
889 889
    int ctx  = 0;
890 890

  
891
    if( h->slice_type_nos == FF_B_TYPE) {
891
    if( h->slice_type_nos == AV_PICTURE_TYPE_B) {
892 892
        if( refa > 0 && !(h->direct_cache[scan8[n] - 1]&(MB_TYPE_DIRECT2>>1)) )
893 893
            ctx++;
894 894
        if( refb > 0 && !(h->direct_cache[scan8[n] - 8]&(MB_TYPE_DIRECT2>>1)) )
......
1208 1208
    mb_xy = h->mb_xy = s->mb_x + s->mb_y*s->mb_stride;
1209 1209

  
1210 1210
    tprintf(s->avctx, "pic:%d mb:%d/%d\n", h->frame_num, s->mb_x, s->mb_y);
1211
    if( h->slice_type_nos != FF_I_TYPE ) {
1211
    if( h->slice_type_nos != AV_PICTURE_TYPE_I ) {
1212 1212
        int skip;
1213 1213
        /* a skipped mb needs the aff flag from the following mb */
1214 1214
        if( FRAME_MBAFF && (s->mb_y&1)==1 && h->prev_mb_skipped )
......
1244 1244

  
1245 1245
    fill_decode_neighbors(h, -(MB_FIELD));
1246 1246

  
1247
    if( h->slice_type_nos == FF_B_TYPE ) {
1247
    if( h->slice_type_nos == AV_PICTURE_TYPE_B ) {
1248 1248
        int ctx = 0;
1249
        assert(h->slice_type_nos == FF_B_TYPE);
1249
        assert(h->slice_type_nos == AV_PICTURE_TYPE_B);
1250 1250

  
1251 1251
        if( !IS_DIRECT( h->left_type[0]-1 ) )
1252 1252
            ctx++;
......
1279 1279
        }
1280 1280
            partition_count= b_mb_type_info[mb_type].partition_count;
1281 1281
            mb_type=         b_mb_type_info[mb_type].type;
1282
    } else if( h->slice_type_nos == FF_P_TYPE ) {
1282
    } else if( h->slice_type_nos == AV_PICTURE_TYPE_P ) {
1283 1283
        if( get_cabac_noinline( &h->cabac, &h->cabac_state[14] ) == 0 ) {
1284 1284
            /* P-type */
1285 1285
            if( get_cabac_noinline( &h->cabac, &h->cabac_state[15] ) == 0 ) {
......
1297 1297
        }
1298 1298
    } else {
1299 1299
        mb_type= decode_cabac_intra_mb_type(h, 3, 1);
1300
        if(h->slice_type == FF_SI_TYPE && mb_type)
1300
        if(h->slice_type == AV_PICTURE_TYPE_SI && mb_type)
1301 1301
            mb_type--;
1302
        assert(h->slice_type_nos == FF_I_TYPE);
1302
        assert(h->slice_type_nos == AV_PICTURE_TYPE_I);
1303 1303
decode_intra_mb:
1304 1304
        partition_count = 0;
1305 1305
        cbp= i_mb_type_info[mb_type].cbp;
......
1388 1388
    } else if( partition_count == 4 ) {
1389 1389
        int i, j, sub_partition_count[4], list, ref[2][4];
1390 1390

  
1391
        if( h->slice_type_nos == FF_B_TYPE ) {
1391
        if( h->slice_type_nos == AV_PICTURE_TYPE_B ) {
1392 1392
            for( i = 0; i < 4; i++ ) {
1393 1393
                h->sub_mb_type[i] = decode_cabac_b_mb_sub_type( h );
1394 1394
                sub_partition_count[i]= b_sub_mb_type_info[ h->sub_mb_type[i] ].partition_count;

Also available in: Unified diff