Revision ce5e49b0 libavcodec/vc1dec.c

View differences:

libavcodec/vc1dec.c
203 203
    my = s->mv[dir][0][1];
204 204

  
205 205
    // store motion vectors for further use in B frames
206
    if(s->pict_type == FF_P_TYPE) {
206
    if(s->pict_type == AV_PICTURE_TYPE_P) {
207 207
        s->current_picture.motion_val[1][s->block_index[0]][0] = mx;
208 208
        s->current_picture.motion_val[1][s->block_index[0]][1] = my;
209 209
    }
......
3061 3061
        ff_draw_horiz_band(s, s->mb_y * 16, 16);
3062 3062
        s->first_slice_line = 0;
3063 3063
    }
3064
    s->pict_type = FF_P_TYPE;
3064
    s->pict_type = AV_PICTURE_TYPE_P;
3065 3065
}
3066 3066

  
3067 3067
static void vc1_decode_blocks(VC1Context *v, int mby_start, int mby_end)
......
3072 3072
        ff_intrax8_decode_picture(&v->x8, 2*v->pq+v->halfpq, v->pq*(!v->pquantizer) );
3073 3073
    }else{
3074 3074
        switch(v->s.pict_type) {
3075
        case FF_I_TYPE:
3075
        case AV_PICTURE_TYPE_I:
3076 3076
            if(v->profile == PROFILE_ADVANCED)
3077 3077
                vc1_decode_i_blocks_adv(v, mby_start, mby_end);
3078 3078
            else
3079 3079
                vc1_decode_i_blocks(v);
3080 3080
            break;
3081
        case FF_P_TYPE:
3081
        case AV_PICTURE_TYPE_P:
3082 3082
            if(v->p_frame_skipped)
3083 3083
                vc1_decode_skip_blocks(v);
3084 3084
            else
3085 3085
                vc1_decode_p_blocks(v, mby_start, mby_end);
3086 3086
            break;
3087
        case FF_B_TYPE:
3087
        case AV_PICTURE_TYPE_B:
3088 3088
            if(v->bi_type){
3089 3089
                if(v->profile == PROFILE_ADVANCED)
3090 3090
                    vc1_decode_i_blocks_adv(v, mby_start, mby_end);
......
3498 3498
        }
3499 3499
    }
3500 3500

  
3501
    if (v->res_sprite && s->pict_type!=FF_I_TYPE) {
3501
    if (v->res_sprite && s->pict_type!=AV_PICTURE_TYPE_I) {
3502 3502
        av_log(v->s.avctx, AV_LOG_WARNING, "Sprite decoder: expected I-frame\n");
3503 3503
    }
3504 3504

  
......
3513 3513

  
3514 3514
    // for skipping the frame
3515 3515
    s->current_picture.pict_type= s->pict_type;
3516
    s->current_picture.key_frame= s->pict_type == FF_I_TYPE;
3516
    s->current_picture.key_frame= s->pict_type == AV_PICTURE_TYPE_I;
3517 3517

  
3518 3518
    /* skip B-frames if we don't have reference frames */
3519
    if(s->last_picture_ptr==NULL && (s->pict_type==FF_B_TYPE || s->dropable)){
3519
    if(s->last_picture_ptr==NULL && (s->pict_type==AV_PICTURE_TYPE_B || s->dropable)){
3520 3520
        goto err;
3521 3521
    }
3522
    if(   (avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type==FF_B_TYPE)
3523
       || (avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type!=FF_I_TYPE)
3522
    if(   (avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type==AV_PICTURE_TYPE_B)
3523
       || (avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type!=AV_PICTURE_TYPE_I)
3524 3524
       ||  avctx->skip_frame >= AVDISCARD_ALL) {
3525 3525
        goto end;
3526 3526
    }
3527 3527

  
3528 3528
    if(s->next_p_frame_damaged){
3529
        if(s->pict_type==FF_B_TYPE)
3529
        if(s->pict_type==AV_PICTURE_TYPE_B)
3530 3530
            goto end;
3531 3531
        else
3532 3532
            s->next_p_frame_damaged=0;
......
3570 3570

  
3571 3571
assert(s->current_picture.pict_type == s->current_picture_ptr->pict_type);
3572 3572
assert(s->current_picture.pict_type == s->pict_type);
3573
    if (s->pict_type == FF_B_TYPE || s->low_delay) {
3573
    if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) {
3574 3574
        *pict= *(AVFrame*)s->current_picture_ptr;
3575 3575
    } else if (s->last_picture_ptr != NULL) {
3576 3576
        *pict= *(AVFrame*)s->last_picture_ptr;

Also available in: Unified diff