Revision ce5e49b0 libavcodec/rv34.c

View differences:

libavcodec/rv34.c
816 816
        ZERO8x2(s->current_picture_ptr->motion_val[0][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride);
817 817
        return 0;
818 818
    case RV34_MB_SKIP:
819
        if(s->pict_type == FF_P_TYPE){
819
        if(s->pict_type == AV_PICTURE_TYPE_P){
820 820
            ZERO8x2(s->current_picture_ptr->motion_val[0][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride);
821 821
            rv34_mc_1mv (r, block_type, 0, 0, 0, 2, 2, 0);
822 822
            break;
......
1055 1055
        s->current_picture_ptr->mb_type[mb_pos] = rv34_mb_type_to_lavc[r->block_type];
1056 1056
        r->mb_type[mb_pos] = r->block_type;
1057 1057
        if(r->block_type == RV34_MB_SKIP){
1058
            if(s->pict_type == FF_P_TYPE)
1058
            if(s->pict_type == AV_PICTURE_TYPE_P)
1059 1059
                r->mb_type[mb_pos] = RV34_MB_P_16x16;
1060
            if(s->pict_type == FF_B_TYPE)
1060
            if(s->pict_type == AV_PICTURE_TYPE_B)
1061 1061
                r->mb_type[mb_pos] = RV34_MB_B_DIRECT;
1062 1062
        }
1063 1063
        r->is16 = !!IS_INTRA16x16(s->current_picture_ptr->mb_type[mb_pos]);
......
1197 1197
    cbp = cbp2 = rv34_decode_mb_header(r, intra_types);
1198 1198
    r->cbp_luma  [mb_pos] = cbp;
1199 1199
    r->cbp_chroma[mb_pos] = cbp >> 16;
1200
    if(s->pict_type == FF_I_TYPE)
1200
    if(s->pict_type == AV_PICTURE_TYPE_I)
1201 1201
        r->deblock_coefs[mb_pos] = 0xFFFF;
1202 1202
    else
1203 1203
        r->deblock_coefs[mb_pos] = rv34_set_deblock_coef(r) | r->cbp_luma[mb_pos];
......
1298 1298
            r->cbp_chroma = av_realloc(r->cbp_chroma, r->s.mb_stride * r->s.mb_height * sizeof(*r->cbp_chroma));
1299 1299
            r->deblock_coefs = av_realloc(r->deblock_coefs, r->s.mb_stride * r->s.mb_height * sizeof(*r->deblock_coefs));
1300 1300
        }
1301
        s->pict_type = r->si.type ? r->si.type : FF_I_TYPE;
1301
        s->pict_type = r->si.type ? r->si.type : AV_PICTURE_TYPE_I;
1302 1302
        if(MPV_frame_start(s, s->avctx) < 0)
1303 1303
            return -1;
1304 1304
        ff_er_frame_start(s);
1305 1305
        r->cur_pts = r->si.pts;
1306
        if(s->pict_type != FF_B_TYPE){
1306
        if(s->pict_type != AV_PICTURE_TYPE_B){
1307 1307
            r->last_pts = r->next_pts;
1308 1308
            r->next_pts = r->cur_pts;
1309 1309
        }
......
1452 1452
        av_log(avctx, AV_LOG_ERROR, "First slice header is incorrect\n");
1453 1453
        return -1;
1454 1454
    }
1455
    if((!s->last_picture_ptr || !s->last_picture_ptr->data[0]) && si.type == FF_B_TYPE)
1455
    if((!s->last_picture_ptr || !s->last_picture_ptr->data[0]) && si.type == AV_PICTURE_TYPE_B)
1456 1456
        return -1;
1457
    if(   (avctx->skip_frame >= AVDISCARD_NONREF && si.type==FF_B_TYPE)
1458
       || (avctx->skip_frame >= AVDISCARD_NONKEY && si.type!=FF_I_TYPE)
1457
    if(   (avctx->skip_frame >= AVDISCARD_NONREF && si.type==AV_PICTURE_TYPE_B)
1458
       || (avctx->skip_frame >= AVDISCARD_NONKEY && si.type!=AV_PICTURE_TYPE_I)
1459 1459
       ||  avctx->skip_frame >= AVDISCARD_ALL)
1460 1460
        return buf_size;
1461 1461

  
......
1494 1494
            r->loop_filter(r, s->mb_height - 1);
1495 1495
        ff_er_frame_end(s);
1496 1496
        MPV_frame_end(s);
1497
        if (s->pict_type == FF_B_TYPE || s->low_delay) {
1497
        if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) {
1498 1498
            *pict= *(AVFrame*)s->current_picture_ptr;
1499 1499
        } else if (s->last_picture_ptr != NULL) {
1500 1500
            *pict= *(AVFrame*)s->last_picture_ptr;

Also available in: Unified diff