Revision ce5e49b0

View differences:

ffmpeg.c
1270 1270
//av_log(NULL, AV_LOG_DEBUG, "%"PRId64" -> encoder\n", ost->sync_opts);
1271 1271
            if (ost->forced_kf_index < ost->forced_kf_count &&
1272 1272
                big_picture.pts >= ost->forced_kf_pts[ost->forced_kf_index]) {
1273
                big_picture.pict_type = FF_I_TYPE;
1273
                big_picture.pict_type = AV_PICTURE_TYPE_I;
1274 1274
                ost->forced_kf_index++;
1275 1275
            }
1276 1276
            ret = avcodec_encode_video(enc,
libavcodec/4xm.c
780 780
    }
781 781

  
782 782
    if(frame_4cc == AV_RL32("ifr2")){
783
        p->pict_type= FF_I_TYPE;
783
        p->pict_type= AV_PICTURE_TYPE_I;
784 784
        if(decode_i2_frame(f, buf-4, frame_size) < 0)
785 785
            return -1;
786 786
    }else if(frame_4cc == AV_RL32("ifrm")){
787
        p->pict_type= FF_I_TYPE;
787
        p->pict_type= AV_PICTURE_TYPE_I;
788 788
        if(decode_i_frame(f, buf, frame_size) < 0)
789 789
            return -1;
790 790
    }else if(frame_4cc == AV_RL32("pfrm") || frame_4cc == AV_RL32("pfr2")){
......
796 796
            }
797 797
        }
798 798

  
799
        p->pict_type= FF_P_TYPE;
799
        p->pict_type= AV_PICTURE_TYPE_P;
800 800
        if(decode_p_frame(f, buf, frame_size) < 0)
801 801
            return -1;
802 802
    }else if(frame_4cc == AV_RL32("snd_")){
......
805 805
        av_log(avctx, AV_LOG_ERROR, "ignoring unknown chunk length:%d\n", buf_size);
806 806
    }
807 807

  
808
    p->key_frame= p->pict_type == FF_I_TYPE;
808
    p->key_frame= p->pict_type == AV_PICTURE_TYPE_I;
809 809

  
810 810
    *picture= *p;
811 811
    *data_size = sizeof(AVPicture);
libavcodec/a64multienc.c
216 216

  
217 217
    avcodec_get_frame_defaults(&c->picture);
218 218
    avctx->coded_frame            = &c->picture;
219
    avctx->coded_frame->pict_type = FF_I_TYPE;
219
    avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
220 220
    avctx->coded_frame->key_frame = 1;
221 221
    if (!avctx->codec_tag)
222 222
         avctx->codec_tag = AV_RL32("a64m");
......
290 290
        /* fill up mc_meta_charset with data until lifetime exceeds */
291 291
        if (c->mc_frame_counter < c->mc_lifetime) {
292 292
            *p = *pict;
293
            p->pict_type = FF_I_TYPE;
293
            p->pict_type = AV_PICTURE_TYPE_I;
294 294
            p->key_frame = 1;
295 295
            to_meta_with_crop(avctx, p, meta + 32000 * c->mc_frame_counter);
296 296
            c->mc_frame_counter++;
libavcodec/ansi.c
226 226
                av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
227 227
                return ret;
228 228
            }
229
            s->frame.pict_type           = FF_I_TYPE;
229
            s->frame.pict_type           = AV_PICTURE_TYPE_I;
230 230
            s->frame.palette_has_changed = 1;
231 231
            memcpy(s->frame.data[1], ff_cga_palette, 16 * 4);
232 232
            erase_screen(avctx);
......
323 323
        av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
324 324
        return ret;
325 325
    }
326
    s->frame.pict_type           = FF_I_TYPE;
326
    s->frame.pict_type           = AV_PICTURE_TYPE_I;
327 327
    s->frame.palette_has_changed = 1;
328 328
    memcpy(s->frame.data[1], ff_cga_palette, 16 * 4);
329 329

  
libavcodec/asv1.c
405 405
        av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
406 406
        return -1;
407 407
    }
408
    p->pict_type= FF_I_TYPE;
408
    p->pict_type= AV_PICTURE_TYPE_I;
409 409
    p->key_frame= 1;
410 410

  
411 411
    av_fast_malloc(&a->bitstream_buffer, &a->bitstream_buffer_size, buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
......
470 470
    init_put_bits(&a->pb, buf, buf_size);
471 471

  
472 472
    *p = *pict;
473
    p->pict_type= FF_I_TYPE;
473
    p->pict_type= AV_PICTURE_TYPE_I;
474 474
    p->key_frame= 1;
475 475

  
476 476
    for(mb_y=0; mb_y<a->mb_height2; mb_y++){
libavcodec/avcodec.h
3920 3920
    /*!
3921 3921
     * Set by parser to 1 for key frames and 0 for non-key frames.
3922 3922
     * It is initialized to -1, so if the parser doesn't set this flag,
3923
     * old-style fallback using FF_I_TYPE picture type as key frames
3923
     * old-style fallback using AV_PICTURE_TYPE_I picture type as key frames
3924 3924
     * will be used.
3925 3925
     */
3926 3926
    int key_frame;
libavcodec/avs.c
63 63
        return -1;
64 64
    }
65 65
    p->reference = 1;
66
    p->pict_type = FF_P_TYPE;
66
    p->pict_type = AV_PICTURE_TYPE_P;
67 67
    p->key_frame = 0;
68 68

  
69 69
    out = avs->picture.data[0];
......
93 93

  
94 94
    switch (sub_type) {
95 95
    case AVS_I_FRAME:
96
        p->pict_type = FF_I_TYPE;
96
        p->pict_type = AV_PICTURE_TYPE_I;
97 97
        p->key_frame = 1;
98 98
    case AVS_P_FRAME_3X3:
99 99
        vect_w = 3;
libavcodec/bfi.c
69 69

  
70 70
    /* Set frame parameters and palette, if necessary */
71 71
    if (!avctx->frame_number) {
72
        bfi->frame.pict_type = FF_I_TYPE;
72
        bfi->frame.pict_type = AV_PICTURE_TYPE_I;
73 73
        bfi->frame.key_frame = 1;
74 74
        /* Setting the palette */
75 75
        if(avctx->extradata_size>768) {
......
89 89
        memcpy(bfi->pal, bfi->frame.data[1], sizeof(bfi->pal));
90 90
        bfi->frame.palette_has_changed = 1;
91 91
    } else {
92
        bfi->frame.pict_type = FF_P_TYPE;
92
        bfi->frame.pict_type = AV_PICTURE_TYPE_P;
93 93
        bfi->frame.key_frame = 0;
94 94
        bfi->frame.palette_has_changed = 0;
95 95
        memcpy(bfi->frame.data[1], bfi->pal, sizeof(bfi->pal));
libavcodec/bmp.c
200 200
        av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
201 201
        return -1;
202 202
    }
203
    p->pict_type = FF_I_TYPE;
203
    p->pict_type = AV_PICTURE_TYPE_I;
204 204
    p->key_frame = 1;
205 205

  
206 206
    buf = buf0 + hsize;
libavcodec/bmpenc.c
74 74
    uint8_t *ptr;
75 75
    unsigned char* buf0 = buf;
76 76
    *p = *pict;
77
    p->pict_type= FF_I_TYPE;
77
    p->pict_type= AV_PICTURE_TYPE_I;
78 78
    p->key_frame= 1;
79 79
    switch (avctx->pix_fmt) {
80 80
    case PIX_FMT_RGB565:
libavcodec/c93.c
137 137
    stride = newpic->linesize[0];
138 138

  
139 139
    if (buf[0] & C93_FIRST_FRAME) {
140
        newpic->pict_type = FF_I_TYPE;
140
        newpic->pict_type = AV_PICTURE_TYPE_I;
141 141
        newpic->key_frame = 1;
142 142
    } else {
143
        newpic->pict_type = FF_P_TYPE;
143
        newpic->pict_type = AV_PICTURE_TYPE_P;
144 144
        newpic->key_frame = 0;
145 145
    }
146 146

  
libavcodec/cavs.h
278 278
    set_mvs(&h->mv[MV_FWD_X0], BLK_16X16);
279 279
    h->mv[MV_BWD_X0] = ff_cavs_intra_mv;
280 280
    set_mvs(&h->mv[MV_BWD_X0], BLK_16X16);
281
    if(h->pic_type != FF_B_TYPE)
281
    if(h->pic_type != AV_PICTURE_TYPE_B)
282 282
        h->col_type_base[h->mbidx] = I_8X8;
283 283
}
284 284

  
libavcodec/cavsdec.c
220 220
    ff_cavs_modify_mb_i(h, &pred_mode_uv);
221 221

  
222 222
    /* get coded block pattern */
223
    if(h->pic_type == FF_I_TYPE)
223
    if(h->pic_type == AV_PICTURE_TYPE_I)
224 224
        cbp_code = get_ue_golomb(gb);
225 225
    if(cbp_code > 63){
226 226
        av_log(h->s.avctx, AV_LOG_ERROR, "illegal intra cbp\n");
......
424 424
        h->qp = get_bits(gb,6);
425 425
    }
426 426
    /* inter frame or second slice can have weighting params */
427
    if((h->pic_type != FF_I_TYPE) || (!h->pic_structure && h->mby >= h->mb_width/2))
427
    if((h->pic_type != AV_PICTURE_TYPE_I) || (!h->pic_structure && h->mby >= h->mb_width/2))
428 428
        if(get_bits1(gb)) { //slice_weighting_flag
429 429
            av_log(h->s.avctx, AV_LOG_ERROR,
430 430
                   "weighted prediction not yet supported\n");
......
470 470
    }
471 471
    skip_bits(&s->gb,16);//bbv_dwlay
472 472
    if(h->stc == PIC_PB_START_CODE) {
473
        h->pic_type = get_bits(&s->gb,2) + FF_I_TYPE;
474
        if(h->pic_type > FF_B_TYPE) {
473
        h->pic_type = get_bits(&s->gb,2) + AV_PICTURE_TYPE_I;
474
        if(h->pic_type > AV_PICTURE_TYPE_B) {
475 475
            av_log(s->avctx, AV_LOG_ERROR, "illegal picture type\n");
476 476
            return -1;
477 477
        }
478 478
        /* make sure we have the reference frames we need */
479 479
        if(!h->DPB[0].data[0] ||
480
          (!h->DPB[1].data[0] && h->pic_type == FF_B_TYPE))
480
          (!h->DPB[1].data[0] && h->pic_type == AV_PICTURE_TYPE_B))
481 481
            return -1;
482 482
    } else {
483
        h->pic_type = FF_I_TYPE;
483
        h->pic_type = AV_PICTURE_TYPE_I;
484 484
        if(get_bits1(&s->gb))
485 485
            skip_bits(&s->gb,24);//time_code
486 486
        /* old sample clips were all progressive and no low_delay,
......
502 502
    h->picture.poc = get_bits(&s->gb,8)*2;
503 503

  
504 504
    /* get temporal distances and MV scaling factors */
505
    if(h->pic_type != FF_B_TYPE) {
505
    if(h->pic_type != AV_PICTURE_TYPE_B) {
506 506
        h->dist[0] = (h->picture.poc - h->DPB[0].poc  + 512) % 512;
507 507
    } else {
508 508
        h->dist[0] = (h->DPB[0].poc  - h->picture.poc + 512) % 512;
......
510 510
    h->dist[1] = (h->picture.poc - h->DPB[1].poc  + 512) % 512;
511 511
    h->scale_den[0] = h->dist[0] ? 512/h->dist[0] : 0;
512 512
    h->scale_den[1] = h->dist[1] ? 512/h->dist[1] : 0;
513
    if(h->pic_type == FF_B_TYPE) {
513
    if(h->pic_type == AV_PICTURE_TYPE_B) {
514 514
        h->sym_factor = h->dist[0]*h->scale_den[1];
515 515
    } else {
516 516
        h->direct_den[0] = h->dist[0] ? 16384/h->dist[0] : 0;
......
529 529
    skip_bits1(&s->gb);        //repeat_first_field
530 530
    h->qp_fixed                = get_bits1(&s->gb);
531 531
    h->qp                      = get_bits(&s->gb,6);
532
    if(h->pic_type == FF_I_TYPE) {
532
    if(h->pic_type == AV_PICTURE_TYPE_I) {
533 533
        if(!h->progressive && !h->pic_structure)
534 534
            skip_bits1(&s->gb);//what is this?
535 535
        skip_bits(&s->gb,4);   //reserved bits
536 536
    } else {
537
        if(!(h->pic_type == FF_B_TYPE && h->pic_structure == 1))
537
        if(!(h->pic_type == AV_PICTURE_TYPE_B && h->pic_structure == 1))
538 538
            h->ref_flag        = get_bits1(&s->gb);
539 539
        skip_bits(&s->gb,4);   //reserved bits
540 540
        h->skip_mode_flag      = get_bits1(&s->gb);
......
546 546
    } else {
547 547
        h->alpha_offset = h->beta_offset  = 0;
548 548
    }
549
    if(h->pic_type == FF_I_TYPE) {
549
    if(h->pic_type == AV_PICTURE_TYPE_I) {
550 550
        do {
551 551
            check_for_slice(h);
552 552
            decode_mb_i(h, 0);
553 553
        } while(ff_cavs_next_mb(h));
554
    } else if(h->pic_type == FF_P_TYPE) {
554
    } else if(h->pic_type == AV_PICTURE_TYPE_P) {
555 555
        do {
556 556
            if(check_for_slice(h))
557 557
                skip_count = -1;
......
567 567
                    decode_mb_p(h,mb_type);
568 568
            }
569 569
        } while(ff_cavs_next_mb(h));
570
    } else { /* FF_B_TYPE */
570
    } else { /* AV_PICTURE_TYPE_B */
571 571
        do {
572 572
            if(check_for_slice(h))
573 573
                skip_count = -1;
......
584 584
            }
585 585
        } while(ff_cavs_next_mb(h));
586 586
    }
587
    if(h->pic_type != FF_B_TYPE) {
587
    if(h->pic_type != AV_PICTURE_TYPE_B) {
588 588
        if(h->DPB[1].data[0])
589 589
            s->avctx->release_buffer(s->avctx, (AVFrame *)&h->DPB[1]);
590 590
        h->DPB[1] = h->DPB[0];
......
684 684
            if(decode_pic(h))
685 685
                break;
686 686
            *data_size = sizeof(AVPicture);
687
            if(h->pic_type != FF_B_TYPE) {
687
            if(h->pic_type != AV_PICTURE_TYPE_B) {
688 688
                if(h->DPB[1].data[0]) {
689 689
                    *picture = *(AVFrame *) &h->DPB[1];
690 690
                } else {
libavcodec/cljr.c
64 64
        av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
65 65
        return -1;
66 66
    }
67
    p->pict_type= FF_I_TYPE;
67
    p->pict_type= AV_PICTURE_TYPE_I;
68 68
    p->key_frame= 1;
69 69

  
70 70
    init_get_bits(&a->gb, buf, buf_size);
......
100 100
    int size;
101 101

  
102 102
    *p = *pict;
103
    p->pict_type= FF_I_TYPE;
103
    p->pict_type= AV_PICTURE_TYPE_I;
104 104
    p->key_frame= 1;
105 105

  
106 106
    emms_c();
libavcodec/cscd.c
183 183

  
184 184
    // flip upside down, add difference frame
185 185
    if (buf[0] & 1) { // keyframe
186
        c->pic.pict_type = FF_I_TYPE;
186
        c->pic.pict_type = AV_PICTURE_TYPE_I;
187 187
        c->pic.key_frame = 1;
188 188
        switch (c->bpp) {
189 189
          case 16:
......
197 197
                                 c->linelen, c->height);
198 198
        }
199 199
    } else {
200
        c->pic.pict_type = FF_P_TYPE;
200
        c->pic.pict_type = AV_PICTURE_TYPE_P;
201 201
        c->pic.key_frame = 0;
202 202
        switch (c->bpp) {
203 203
          case 16:
libavcodec/dirac_parser.c
194 194
                avctx->has_b_frames = 1;
195 195
        }
196 196
        if (avctx->has_b_frames && s->pts == s->dts)
197
             s->pict_type = FF_B_TYPE;
197
             s->pict_type = AV_PICTURE_TYPE_B;
198 198

  
199 199
        /* Finally have a complete Dirac data unit */
200 200
        *buf      = pc->dirac_unit;
libavcodec/dnxhddec.c
55 55
    ctx->avctx = avctx;
56 56
    dsputil_init(&ctx->dsp, avctx);
57 57
    avctx->coded_frame = &ctx->picture;
58
    ctx->picture.type = FF_I_TYPE;
58
    ctx->picture.type = AV_PICTURE_TYPE_I;
59 59
    ctx->picture.key_frame = 1;
60 60
    return 0;
61 61
}
libavcodec/dnxhdenc.c
222 222
    FF_ALLOCZ_OR_GOTO(ctx->m.avctx, ctx->mb_qscale,  ctx->m.mb_num   *sizeof(uint8_t) , fail);
223 223

  
224 224
    ctx->frame.key_frame = 1;
225
    ctx->frame.pict_type = FF_I_TYPE;
225
    ctx->frame.pict_type = AV_PICTURE_TYPE_I;
226 226
    ctx->m.avctx->coded_frame = &ctx->frame;
227 227

  
228 228
    if (avctx->thread_count > MAX_THREADS) {
libavcodec/dpxenc.c
35 35
    DPXContext *s = avctx->priv_data;
36 36

  
37 37
    avctx->coded_frame = &s->picture;
38
    avctx->coded_frame->pict_type = FF_I_TYPE;
38
    avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
39 39
    avctx->coded_frame->key_frame = 1;
40 40

  
41 41
    s->big_endian         = 1;
libavcodec/dv.c
1095 1095

  
1096 1096
    s->picture.reference = 0;
1097 1097
    s->picture.key_frame = 1;
1098
    s->picture.pict_type = FF_I_TYPE;
1098
    s->picture.pict_type = AV_PICTURE_TYPE_I;
1099 1099
    avctx->pix_fmt   = s->sys->pix_fmt;
1100 1100
    avctx->time_base = s->sys->time_base;
1101 1101
    avcodec_set_dimensions(avctx, s->sys->width, s->sys->height);
......
1264 1264
    c->pix_fmt           = s->sys->pix_fmt;
1265 1265
    s->picture           = *((AVFrame *)data);
1266 1266
    s->picture.key_frame = 1;
1267
    s->picture.pict_type = FF_I_TYPE;
1267
    s->picture.pict_type = AV_PICTURE_TYPE_I;
1268 1268

  
1269 1269
    s->buf = buf;
1270 1270
    c->execute(c, dv_encode_video_segment, s->sys->work_chunks, NULL,
libavcodec/dxa.c
240 240
    switch(compr){
241 241
    case -1:
242 242
        c->pic.key_frame = 0;
243
        c->pic.pict_type = FF_P_TYPE;
243
        c->pic.pict_type = AV_PICTURE_TYPE_P;
244 244
        if(c->prev.data[0])
245 245
            memcpy(c->pic.data[0], c->prev.data[0], c->pic.linesize[0] * avctx->height);
246 246
        else{ // Should happen only when first frame is 'NULL'
247 247
            memset(c->pic.data[0], 0, c->pic.linesize[0] * avctx->height);
248 248
            c->pic.key_frame = 1;
249
            c->pic.pict_type = FF_I_TYPE;
249
            c->pic.pict_type = AV_PICTURE_TYPE_I;
250 250
        }
251 251
        break;
252 252
    case 2:
......
254 254
    case 4:
255 255
    case 5:
256 256
        c->pic.key_frame = !(compr & 1);
257
        c->pic.pict_type = (compr & 1) ? FF_P_TYPE : FF_I_TYPE;
257
        c->pic.pict_type = (compr & 1) ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I;
258 258
        for(j = 0; j < avctx->height; j++){
259 259
            if(compr & 1){
260 260
                for(i = 0; i < avctx->width; i++)
......
269 269
    case 12: // ScummVM coding
270 270
    case 13:
271 271
        c->pic.key_frame = 0;
272
        c->pic.pict_type = FF_P_TYPE;
272
        c->pic.pict_type = AV_PICTURE_TYPE_P;
273 273
        decode_13(avctx, c, c->pic.data[0], srcptr, c->prev.data[0]);
274 274
        break;
275 275
    default:
libavcodec/dxva2_h264.c
246 246
    slice->slice_qs_delta    = 0; /* XXX not implemented by FFmpeg */
247 247
    slice->slice_qp_delta    = s->qscale - h->pps.init_qp;
248 248
    slice->redundant_pic_cnt = h->redundant_pic_count;
249
    if (h->slice_type == FF_B_TYPE)
249
    if (h->slice_type == AV_PICTURE_TYPE_B)
250 250
        slice->direct_spatial_mv_pred_flag = h->direct_spatial_mv_pred;
251 251
    slice->cabac_init_idc = h->pps.cabac ? h->cabac_init_idc : 0;
252 252
    if (h->deblocking_filter < 2)
......
403 403
                        position, size);
404 404
    ctx_pic->slice_count++;
405 405

  
406
    if (h->slice_type != FF_I_TYPE && h->slice_type != FF_SI_TYPE)
406
    if (h->slice_type != AV_PICTURE_TYPE_I && h->slice_type != AV_PICTURE_TYPE_SI)
407 407
        ctx_pic->pp.wBitFields &= ~(1 << 15); /* Set IntraPicFlag to 0 */
408 408
    return 0;
409 409
}
libavcodec/dxva2_mpeg2.c
44 44
    memset(pp, 0, sizeof(*pp));
45 45
    pp->wDecodedPictureIndex         = ff_dxva2_get_surface_index(ctx, current_picture);
46 46
    pp->wDeblockedPictureIndex       = 0;
47
    if (s->pict_type != FF_I_TYPE)
47
    if (s->pict_type != AV_PICTURE_TYPE_I)
48 48
        pp->wForwardRefPictureIndex  = ff_dxva2_get_surface_index(ctx, &s->last_picture);
49 49
    else
50 50
        pp->wForwardRefPictureIndex  = 0xffff;
51
    if (s->pict_type == FF_B_TYPE)
51
    if (s->pict_type == AV_PICTURE_TYPE_B)
52 52
        pp->wBackwardRefPictureIndex = ff_dxva2_get_surface_index(ctx, &s->next_picture);
53 53
    else
54 54
        pp->wBackwardRefPictureIndex = 0xffff;
......
61 61
    pp->bBPPminus1                   = 7;
62 62
    pp->bPicStructure                = s->picture_structure;
63 63
    pp->bSecondField                 = is_field && !s->first_field;
64
    pp->bPicIntra                    = s->pict_type == FF_I_TYPE;
65
    pp->bPicBackwardPrediction       = s->pict_type == FF_B_TYPE;
64
    pp->bPicIntra                    = s->pict_type == AV_PICTURE_TYPE_I;
65
    pp->bPicBackwardPrediction       = s->pict_type == AV_PICTURE_TYPE_B;
66 66
    pp->bBidirectionalAveragingMode  = 0;
67 67
    pp->bMVprecisionAndChromaRelation= 0; /* FIXME */
68 68
    pp->bChromaFormat                = s->chroma_format;
libavcodec/dxva2_vc1.c
42 42
    memset(pp, 0, sizeof(*pp));
43 43
    pp->wDecodedPictureIndex    =
44 44
    pp->wDeblockedPictureIndex  = ff_dxva2_get_surface_index(ctx, current_picture);
45
    if (s->pict_type != FF_I_TYPE)
45
    if (s->pict_type != AV_PICTURE_TYPE_I)
46 46
        pp->wForwardRefPictureIndex = ff_dxva2_get_surface_index(ctx, &s->last_picture);
47 47
    else
48 48
        pp->wForwardRefPictureIndex = 0xffff;
49
    if (s->pict_type == FF_B_TYPE)
49
    if (s->pict_type == AV_PICTURE_TYPE_B)
50 50
        pp->wBackwardRefPictureIndex = ff_dxva2_get_surface_index(ctx, &s->next_picture);
51 51
    else
52 52
        pp->wBackwardRefPictureIndex = 0xffff;
......
69 69
    if (s->picture_structure & PICT_BOTTOM_FIELD)
70 70
        pp->bPicStructure      |= 0x02;
71 71
    pp->bSecondField            = v->interlace && v->fcm != 0x03 && !s->first_field;
72
    pp->bPicIntra               = s->pict_type == FF_I_TYPE;
73
    pp->bPicBackwardPrediction  = s->pict_type == FF_B_TYPE;
72
    pp->bPicIntra               = s->pict_type == AV_PICTURE_TYPE_I;
73
    pp->bPicBackwardPrediction  = s->pict_type == AV_PICTURE_TYPE_B;
74 74
    pp->bBidirectionalAveragingMode = (1                                           << 7) |
75 75
                                      ((ctx->cfg->ConfigIntraResidUnsigned != 0)   << 6) |
76 76
                                      ((ctx->cfg->ConfigResidDiffAccelerator != 0) << 5) |
......
108 108
                                  (v->interlace                << 5) |
109 109
                                  (v->tfcntrflag               << 4) |
110 110
                                  (v->finterpflag              << 3) |
111
                                  ((s->pict_type != FF_B_TYPE) << 2) |
111
                                  ((s->pict_type != AV_PICTURE_TYPE_B) << 2) |
112 112
                                  (v->psf                      << 1) |
113 113
                                  (v->extended_dmv                 );
114
    if (s->pict_type != FF_I_TYPE)
114
    if (s->pict_type != AV_PICTURE_TYPE_I)
115 115
        pp->bPic4MVallowed      = v->mv_mode == MV_PMODE_MIXED_MV ||
116 116
                                  (v->mv_mode == MV_PMODE_INTENSITY_COMP &&
117 117
                                   v->mv_mode2 == MV_PMODE_MIXED_MV);
libavcodec/eacmv.c
180 180
    if ((buf[0]&1)) {  // subtype
181 181
        cmv_decode_inter(s, buf+2, buf_end);
182 182
        s->frame.key_frame = 0;
183
        s->frame.pict_type = FF_P_TYPE;
183
        s->frame.pict_type = AV_PICTURE_TYPE_P;
184 184
    }else{
185 185
        s->frame.key_frame = 1;
186
        s->frame.pict_type = FF_I_TYPE;
186
        s->frame.pict_type = AV_PICTURE_TYPE_I;
187 187
        cmv_decode_intra(s, buf+2, buf_end);
188 188
    }
189 189

  
libavcodec/eatgq.c
218 218

  
219 219
    if (!s->frame.data[0]) {
220 220
        s->frame.key_frame = 1;
221
        s->frame.pict_type = FF_I_TYPE;
221
        s->frame.pict_type = AV_PICTURE_TYPE_I;
222 222
        s->frame.buffer_hints = FF_BUFFER_HINTS_VALID;
223 223
        if (avctx->get_buffer(avctx, &s->frame)) {
224 224
            av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
libavcodec/eatgv.c
300 300

  
301 301
    if(chunk_type==kVGT_TAG) {
302 302
        s->frame.key_frame = 1;
303
        s->frame.pict_type = FF_I_TYPE;
303
        s->frame.pict_type = AV_PICTURE_TYPE_I;
304 304
        if (unpack(buf, buf_end, s->frame.data[0], s->avctx->width, s->avctx->height)<0) {
305 305
            av_log(avctx, AV_LOG_WARNING, "truncated intra frame\n");
306 306
            return -1;
......
311 311
            return buf_size;
312 312
        }
313 313
        s->frame.key_frame = 0;
314
        s->frame.pict_type = FF_P_TYPE;
314
        s->frame.pict_type = AV_PICTURE_TYPE_P;
315 315
        if (tgv_decode_inter(s, buf, buf_end)<0) {
316 316
            av_log(avctx, AV_LOG_WARNING, "truncated inter frame\n");
317 317
            return -1;
libavcodec/error_resilience.c
639 639
    if(undamaged_count < 5) return 0; //almost all MBs damaged -> use temporal prediction
640 640

  
641 641
    //prevent dsp.sad() check, that requires access to the image
642
    if(CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration && s->pict_type == FF_I_TYPE)
642
    if(CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration && s->pict_type == AV_PICTURE_TYPE_I)
643 643
        return 1;
644 644

  
645 645
    skip_amount= FFMAX(undamaged_count/50, 1); //check only upto 50 MBs
......
658 658
            j++;
659 659
            if((j%skip_amount) != 0) continue; //skip a few to speed things up
660 660

  
661
            if(s->pict_type==FF_I_TYPE){
661
            if(s->pict_type==AV_PICTURE_TYPE_I){
662 662
                uint8_t *mb_ptr     = s->current_picture.data[0] + mb_x*16 + mb_y*16*s->linesize;
663 663
                uint8_t *last_mb_ptr= s->last_picture.data   [0] + mb_x*16 + mb_y*16*s->linesize;
664 664

  
......
977 977
    }
978 978

  
979 979
    /* guess MVs */
980
    if(s->pict_type==FF_B_TYPE){
980
    if(s->pict_type==AV_PICTURE_TYPE_B){
981 981
        for(mb_y=0; mb_y<s->mb_height; mb_y++){
982 982
            for(mb_x=0; mb_x<s->mb_width; mb_x++){
983 983
                int xy= mb_x*2 + mb_y*2*s->b8_stride;
......
1114 1114
        const int mb_xy= s->mb_index2xy[i];
1115 1115
        int error= s->error_status_table[mb_xy];
1116 1116

  
1117
        if(s->pict_type!=FF_B_TYPE && (error&(DC_ERROR|MV_ERROR|AC_ERROR))){
1117
        if(s->pict_type!=AV_PICTURE_TYPE_B && (error&(DC_ERROR|MV_ERROR|AC_ERROR))){
1118 1118
            s->mbskip_table[mb_xy]=0;
1119 1119
        }
1120 1120
        s->mbintra_table[mb_xy]=1;
libavcodec/ffv1.c
1160 1160
    ff_build_rac_states(c, 0.05*(1LL<<32), 256-8);
1161 1161

  
1162 1162
    *p = *pict;
1163
    p->pict_type= FF_I_TYPE;
1163
    p->pict_type= AV_PICTURE_TYPE_I;
1164 1164

  
1165 1165
    if(avctx->gop_size==0 || f->picture_number % avctx->gop_size == 0){
1166 1166
        put_rac(c, &keystate, 1);
......
1723 1723
    ff_build_rac_states(c, 0.05*(1LL<<32), 256-8);
1724 1724

  
1725 1725

  
1726
    p->pict_type= FF_I_TYPE; //FIXME I vs. P
1726
    p->pict_type= AV_PICTURE_TYPE_I; //FIXME I vs. P
1727 1727
    if(get_rac(c, &keystate)){
1728 1728
        p->key_frame= 1;
1729 1729
        if(read_header(f) < 0)
libavcodec/flashsvenc.c
260 260

  
261 261
    //mark the frame type so the muxer can mux it correctly
262 262
    if (I_frame) {
263
        p->pict_type = FF_I_TYPE;
263
        p->pict_type = AV_PICTURE_TYPE_I;
264 264
        p->key_frame = 1;
265 265
        s->last_key_frame = avctx->frame_number;
266 266
        av_log(avctx, AV_LOG_DEBUG, "Inserting key frame at frame %d\n", avctx->frame_number);
267 267
    } else {
268
        p->pict_type = FF_P_TYPE;
268
        p->pict_type = AV_PICTURE_TYPE_P;
269 269
        p->key_frame = 0;
270 270
    }
271 271

  
libavcodec/flvdec.c
88 88
    s->width = width;
89 89
    s->height = height;
90 90

  
91
    s->pict_type = FF_I_TYPE + get_bits(&s->gb, 2);
92
    s->dropable= s->pict_type > FF_P_TYPE;
91
    s->pict_type = AV_PICTURE_TYPE_I + get_bits(&s->gb, 2);
92
    s->dropable= s->pict_type > AV_PICTURE_TYPE_P;
93 93
    if (s->dropable)
94
        s->pict_type = FF_P_TYPE;
94
        s->pict_type = AV_PICTURE_TYPE_P;
95 95

  
96 96
    skip_bits1(&s->gb); /* deblocking flag */
97 97
    s->chroma_qscale= s->qscale = get_bits(&s->gb, 5);
libavcodec/flvenc.c
53 53
        put_bits(&s->pb, 16, s->width);
54 54
        put_bits(&s->pb, 16, s->height);
55 55
      }
56
      put_bits(&s->pb, 2, s->pict_type == FF_P_TYPE); /* PictureType */
56
      put_bits(&s->pb, 2, s->pict_type == AV_PICTURE_TYPE_P); /* PictureType */
57 57
      put_bits(&s->pb, 1, 1); /* DeblockingFlag: on */
58 58
      put_bits(&s->pb, 5, s->qscale); /* Quantizer */
59 59
      put_bits(&s->pb, 1, 0); /* ExtraInformation */
libavcodec/fraps.c
180 180
            return -1;
181 181
        }
182 182
        /* bit 31 means same as previous pic */
183
        f->pict_type = (header & (1U<<31))? FF_P_TYPE : FF_I_TYPE;
184
        f->key_frame = f->pict_type == FF_I_TYPE;
183
        f->pict_type = (header & (1U<<31))? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I;
184
        f->key_frame = f->pict_type == AV_PICTURE_TYPE_I;
185 185

  
186
        if (f->pict_type == FF_I_TYPE) {
186
        if (f->pict_type == AV_PICTURE_TYPE_I) {
187 187
            buf32=(const uint32_t*)buf;
188 188
            for(y=0; y<avctx->height/2; y++){
189 189
                luma1=(uint32_t*)&f->data[0][ y*2*f->linesize[0] ];
......
223 223
            return -1;
224 224
        }
225 225
        /* bit 31 means same as previous pic */
226
        f->pict_type = (header & (1U<<31))? FF_P_TYPE : FF_I_TYPE;
227
        f->key_frame = f->pict_type == FF_I_TYPE;
226
        f->pict_type = (header & (1U<<31))? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I;
227
        f->key_frame = f->pict_type == AV_PICTURE_TYPE_I;
228 228

  
229
        if (f->pict_type == FF_I_TYPE) {
229
        if (f->pict_type == AV_PICTURE_TYPE_I) {
230 230
            for(y=0; y<avctx->height; y++)
231 231
                memcpy(&f->data[0][ (avctx->height-y)*f->linesize[0] ],
232 232
                       &buf[y*avctx->width*3],
......
252 252
        }
253 253
        /* skip frame */
254 254
        if(buf_size == 8) {
255
            f->pict_type = FF_P_TYPE;
255
            f->pict_type = AV_PICTURE_TYPE_P;
256 256
            f->key_frame = 0;
257 257
            break;
258 258
        }
259
        f->pict_type = FF_I_TYPE;
259
        f->pict_type = AV_PICTURE_TYPE_I;
260 260
        f->key_frame = 1;
261 261
        if ((AV_RL32(buf) != FPS_TAG)||(buf_size < (planes*1024 + 24))) {
262 262
            av_log(avctx, AV_LOG_ERROR, "Fraps: error in data stream\n");
......
297 297
        }
298 298
        /* skip frame */
299 299
        if(buf_size == 8) {
300
            f->pict_type = FF_P_TYPE;
300
            f->pict_type = AV_PICTURE_TYPE_P;
301 301
            f->key_frame = 0;
302 302
            break;
303 303
        }
304
        f->pict_type = FF_I_TYPE;
304
        f->pict_type = AV_PICTURE_TYPE_I;
305 305
        f->key_frame = 1;
306 306
        if ((AV_RL32(buf) != FPS_TAG)||(buf_size < (planes*1024 + 24))) {
307 307
            av_log(avctx, AV_LOG_ERROR, "Fraps: error in data stream\n");
libavcodec/frwu.c
61 61
    if (avctx->get_buffer(avctx, pic) < 0)
62 62
        return -1;
63 63

  
64
    pic->pict_type = FF_I_TYPE;
64
    pic->pict_type = AV_PICTURE_TYPE_I;
65 65
    pic->key_frame = 1;
66 66
    pic->interlaced_frame = 1;
67 67
    pic->top_field_first = 1;
libavcodec/gif.c
150 150
    uint8_t *end = outbuf + buf_size;
151 151

  
152 152
    *p = *pict;
153
    p->pict_type = FF_I_TYPE;
153
    p->pict_type = AV_PICTURE_TYPE_I;
154 154
    p->key_frame = 1;
155 155
    gif_image_write_header(avctx, &outbuf_ptr, (uint32_t *)pict->data[1]);
156 156
    gif_image_write_image(avctx, &outbuf_ptr, end, pict->data[0], pict->linesize[0]);
libavcodec/h261dec.c
497 497
        skip_bits(&s->gb, 8);
498 498
    }
499 499

  
500
    // h261 has no I-FRAMES, but if we pass FF_I_TYPE for the first frame, the codec crashes if it does
500
    // h261 has no I-FRAMES, but if we pass AV_PICTURE_TYPE_I for the first frame, the codec crashes if it does
501 501
    // not contain all I-blocks (e.g. when a packet is lost)
502
    s->pict_type = FF_P_TYPE;
502
    s->pict_type = AV_PICTURE_TYPE_P;
503 503

  
504 504
    h->gob_number = 0;
505 505
    return 0;
......
597 597

  
598 598
    // for skipping the frame
599 599
    s->current_picture.pict_type= s->pict_type;
600
    s->current_picture.key_frame= s->pict_type == FF_I_TYPE;
600
    s->current_picture.key_frame= s->pict_type == AV_PICTURE_TYPE_I;
601 601

  
602
    if(  (avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type==FF_B_TYPE)
603
       ||(avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type!=FF_I_TYPE)
602
    if(  (avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type==AV_PICTURE_TYPE_B)
603
       ||(avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type!=AV_PICTURE_TYPE_I)
604 604
       || avctx->skip_frame >= AVDISCARD_ALL)
605 605
        return get_consumed_bytes(s, buf_size);
606 606

  
libavcodec/h263.c
148 148
    uint8_t *dest_cb= s->dest[1];
149 149
    uint8_t *dest_cr= s->dest[2];
150 150

  
151
//    if(s->pict_type==FF_B_TYPE && !s->readable) return;
151
//    if(s->pict_type==AV_PICTURE_TYPE_B && !s->readable) return;
152 152

  
153 153
    /*
154 154
       Diag Top
libavcodec/h263dec.c
218 218
//printf("%d %d %06X\n", ret, get_bits_count(&s->gb), show_bits(&s->gb, 24));
219 219
            ret= s->decode_mb(s, s->block);
220 220

  
221
            if (s->pict_type!=FF_B_TYPE)
221
            if (s->pict_type!=AV_PICTURE_TYPE_B)
222 222
                ff_h263_update_motion_val(s);
223 223

  
224 224
            if(ret<0){
......
310 310
        int max_extra=7;
311 311

  
312 312
        /* no markers in M$ crap */
313
        if(s->msmpeg4_version && s->pict_type==FF_I_TYPE)
313
        if(s->msmpeg4_version && s->pict_type==AV_PICTURE_TYPE_I)
314 314
            max_extra+= 17;
315 315

  
316 316
        /* buggy padding but the frame should still end approximately at the bitstream end */
......
600 600

  
601 601
    // for skipping the frame
602 602
    s->current_picture.pict_type= s->pict_type;
603
    s->current_picture.key_frame= s->pict_type == FF_I_TYPE;
603
    s->current_picture.key_frame= s->pict_type == AV_PICTURE_TYPE_I;
604 604

  
605 605
    /* skip B-frames if we don't have reference frames */
606
    if(s->last_picture_ptr==NULL && (s->pict_type==FF_B_TYPE || s->dropable)) return get_consumed_bytes(s, buf_size);
607
    if(   (avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type==FF_B_TYPE)
608
       || (avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type!=FF_I_TYPE)
606
    if(s->last_picture_ptr==NULL && (s->pict_type==AV_PICTURE_TYPE_B || s->dropable)) return get_consumed_bytes(s, buf_size);
607
    if(   (avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type==AV_PICTURE_TYPE_B)
608
       || (avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type!=AV_PICTURE_TYPE_I)
609 609
       ||  avctx->skip_frame >= AVDISCARD_ALL)
610 610
        return get_consumed_bytes(s, buf_size);
611 611

  
612 612
    if(s->next_p_frame_damaged){
613
        if(s->pict_type==FF_B_TYPE)
613
        if(s->pict_type==AV_PICTURE_TYPE_B)
614 614
            return get_consumed_bytes(s, buf_size);
615 615
        else
616 616
            s->next_p_frame_damaged=0;
617 617
    }
618 618

  
619
    if((s->avctx->flags2 & CODEC_FLAG2_FAST) && s->pict_type==FF_B_TYPE){
619
    if((s->avctx->flags2 & CODEC_FLAG2_FAST) && s->pict_type==AV_PICTURE_TYPE_B){
620 620
        s->me.qpel_put= s->dsp.put_2tap_qpel_pixels_tab;
621 621
        s->me.qpel_avg= s->dsp.avg_2tap_qpel_pixels_tab;
622
    }else if((!s->no_rounding) || s->pict_type==FF_B_TYPE){
622
    }else if((!s->no_rounding) || s->pict_type==AV_PICTURE_TYPE_B){
623 623
        s->me.qpel_put= s->dsp.put_qpel_pixels_tab;
624 624
        s->me.qpel_avg= s->dsp.avg_qpel_pixels_tab;
625 625
    }else{
......
672 672
        decode_slice(s);
673 673
    }
674 674

  
675
    if (s->h263_msmpeg4 && s->msmpeg4_version<4 && s->pict_type==FF_I_TYPE)
675
    if (s->h263_msmpeg4 && s->msmpeg4_version<4 && s->pict_type==AV_PICTURE_TYPE_I)
676 676
        if(!CONFIG_MSMPEG4_DECODER || msmpeg4_decode_ext_header(s, buf_size) < 0){
677 677
            s->error_status_table[s->mb_num-1]= AC_ERROR|DC_ERROR|MV_ERROR;
678 678
        }
......
722 722

  
723 723
assert(s->current_picture.pict_type == s->current_picture_ptr->pict_type);
724 724
assert(s->current_picture.pict_type == s->pict_type);
725
    if (s->pict_type == FF_B_TYPE || s->low_delay) {
725
    if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) {
726 726
        *pict= *(AVFrame*)s->current_picture_ptr;
727 727
    } else if (s->last_picture_ptr != NULL) {
728 728
        *pict= *(AVFrame*)s->last_picture_ptr;
libavcodec/h264.c
918 918
    else if((out_of_order && pics-1 == s->avctx->has_b_frames && s->avctx->has_b_frames < MAX_DELAYED_PIC_COUNT)
919 919
       || (s->low_delay &&
920 920
        ((h->next_outputed_poc != INT_MIN && out->poc > h->next_outputed_poc + 2)
921
         || cur->pict_type == FF_B_TYPE)))
921
         || cur->pict_type == AV_PICTURE_TYPE_B)))
922 922
    {
923 923
        s->low_delay = 0;
924 924
        s->avctx->has_b_frames++;
......
1449 1449
                }
1450 1450
            }
1451 1451
        }
1452
        if(h->slice_type_nos != FF_B_TYPE) break;
1452
        if(h->slice_type_nos != AV_PICTURE_TYPE_B) break;
1453 1453
    }
1454 1454
    h->use_weight= h->use_weight || h->use_weight_chroma;
1455 1455
    return 0;
......
1817 1817
        h->slice_type_fixed=0;
1818 1818

  
1819 1819
    slice_type= golomb_to_pict_type[ slice_type ];
1820
    if (slice_type == FF_I_TYPE
1820
    if (slice_type == AV_PICTURE_TYPE_I
1821 1821
        || (h0->current_slice != 0 && slice_type == h0->last_slice_type) ) {
1822 1822
        default_ref_list_done = 1;
1823 1823
    }
......
2110 2110
    h->ref_count[0]= h->pps.ref_count[0];
2111 2111
    h->ref_count[1]= h->pps.ref_count[1];
2112 2112

  
2113
    if(h->slice_type_nos != FF_I_TYPE){
2114
        if(h->slice_type_nos == FF_B_TYPE){
2113
    if(h->slice_type_nos != AV_PICTURE_TYPE_I){
2114
        if(h->slice_type_nos == AV_PICTURE_TYPE_B){
2115 2115
            h->direct_spatial_mv_pred= get_bits1(&s->gb);
2116 2116
        }
2117 2117
        num_ref_idx_active_override_flag= get_bits1(&s->gb);
2118 2118

  
2119 2119
        if(num_ref_idx_active_override_flag){
2120 2120
            h->ref_count[0]= get_ue_golomb(&s->gb) + 1;
2121
            if(h->slice_type_nos==FF_B_TYPE)
2121
            if(h->slice_type_nos==AV_PICTURE_TYPE_B)
2122 2122
                h->ref_count[1]= get_ue_golomb(&s->gb) + 1;
2123 2123

  
2124 2124
            if(h->ref_count[0]-1 > 32-1 || h->ref_count[1]-1 > 32-1){
......
2127 2127
                return -1;
2128 2128
            }
2129 2129
        }
2130
        if(h->slice_type_nos == FF_B_TYPE)
2130
        if(h->slice_type_nos == AV_PICTURE_TYPE_B)
2131 2131
            h->list_count= 2;
2132 2132
        else
2133 2133
            h->list_count= 1;
......
2138 2138
        ff_h264_fill_default_ref_list(h);
2139 2139
    }
2140 2140

  
2141
    if(h->slice_type_nos!=FF_I_TYPE && ff_h264_decode_ref_pic_list_reordering(h) < 0)
2141
    if(h->slice_type_nos!=AV_PICTURE_TYPE_I && ff_h264_decode_ref_pic_list_reordering(h) < 0)
2142 2142
        return -1;
2143 2143

  
2144
    if(h->slice_type_nos!=FF_I_TYPE){
2144
    if(h->slice_type_nos!=AV_PICTURE_TYPE_I){
2145 2145
        s->last_picture_ptr= &h->ref_list[0][0];
2146 2146
        ff_copy_picture(&s->last_picture, s->last_picture_ptr);
2147 2147
    }
2148
    if(h->slice_type_nos==FF_B_TYPE){
2148
    if(h->slice_type_nos==AV_PICTURE_TYPE_B){
2149 2149
        s->next_picture_ptr= &h->ref_list[1][0];
2150 2150
        ff_copy_picture(&s->next_picture, s->next_picture_ptr);
2151 2151
    }
2152 2152

  
2153
    if(   (h->pps.weighted_pred          && h->slice_type_nos == FF_P_TYPE )
2154
       ||  (h->pps.weighted_bipred_idc==1 && h->slice_type_nos== FF_B_TYPE ) )
2153
    if(   (h->pps.weighted_pred          && h->slice_type_nos == AV_PICTURE_TYPE_P )
2154
       ||  (h->pps.weighted_bipred_idc==1 && h->slice_type_nos== AV_PICTURE_TYPE_B ) )
2155 2155
        pred_weight_table(h);
2156
    else if(h->pps.weighted_bipred_idc==2 && h->slice_type_nos== FF_B_TYPE){
2156
    else if(h->pps.weighted_bipred_idc==2 && h->slice_type_nos== AV_PICTURE_TYPE_B){
2157 2157
        implicit_weight_table(h, -1);
2158 2158
    }else {
2159 2159
        h->use_weight = 0;
......
2169 2169
    if(FRAME_MBAFF){
2170 2170
        ff_h264_fill_mbaff_ref_list(h);
2171 2171

  
2172
        if(h->pps.weighted_bipred_idc==2 && h->slice_type_nos== FF_B_TYPE){
2172
        if(h->pps.weighted_bipred_idc==2 && h->slice_type_nos== AV_PICTURE_TYPE_B){
2173 2173
            implicit_weight_table(h, 0);
2174 2174
            implicit_weight_table(h, 1);
2175 2175
        }
2176 2176
    }
2177 2177

  
2178
    if(h->slice_type_nos==FF_B_TYPE && !h->direct_spatial_mv_pred)
2178
    if(h->slice_type_nos==AV_PICTURE_TYPE_B && !h->direct_spatial_mv_pred)
2179 2179
        ff_h264_direct_dist_scale_factor(h);
2180 2180
    ff_h264_direct_ref_list_init(h);
2181 2181

  
2182
    if( h->slice_type_nos != FF_I_TYPE && h->pps.cabac ){
2182
    if( h->slice_type_nos != AV_PICTURE_TYPE_I && h->pps.cabac ){
2183 2183
        tmp = get_ue_golomb_31(&s->gb);
2184 2184
        if(tmp > 2){
2185 2185
            av_log(s->avctx, AV_LOG_ERROR, "cabac_init_idc overflow\n");
......
2198 2198
    h->chroma_qp[0] = get_chroma_qp(h, 0, s->qscale);
2199 2199
    h->chroma_qp[1] = get_chroma_qp(h, 1, s->qscale);
2200 2200
    //FIXME qscale / qp ... stuff
2201
    if(h->slice_type == FF_SP_TYPE){
2201
    if(h->slice_type == AV_PICTURE_TYPE_SP){
2202 2202
        get_bits1(&s->gb); /* sp_for_switch_flag */
2203 2203
    }
2204
    if(h->slice_type==FF_SP_TYPE || h->slice_type == FF_SI_TYPE){
2204
    if(h->slice_type==AV_PICTURE_TYPE_SP || h->slice_type == AV_PICTURE_TYPE_SI){
2205 2205
        get_se_golomb(&s->gb); /* slice_qs_delta */
2206 2206
    }
2207 2207

  
......
2230 2230
    }
2231 2231

  
2232 2232
    if(   s->avctx->skip_loop_filter >= AVDISCARD_ALL
2233
       ||(s->avctx->skip_loop_filter >= AVDISCARD_NONKEY && h->slice_type_nos != FF_I_TYPE)
2234
       ||(s->avctx->skip_loop_filter >= AVDISCARD_BIDIR  && h->slice_type_nos == FF_B_TYPE)
2233
       ||(s->avctx->skip_loop_filter >= AVDISCARD_NONKEY && h->slice_type_nos != AV_PICTURE_TYPE_I)
2234
       ||(s->avctx->skip_loop_filter >= AVDISCARD_BIDIR  && h->slice_type_nos == AV_PICTURE_TYPE_B)
2235 2235
       ||(s->avctx->skip_loop_filter >= AVDISCARD_NONREF && h->nal_ref_idc == 0))
2236 2236
        h->deblocking_filter= 0;
2237 2237

  
......
2315 2315
               h->deblocking_filter, h->slice_alpha_c0_offset/2-26, h->slice_beta_offset/2-26,
2316 2316
               h->use_weight,
2317 2317
               h->use_weight==1 && h->use_weight_chroma ? "c" : "",
2318
               h->slice_type == FF_B_TYPE ? (h->direct_spatial_mv_pred ? "SPAT" : "TEMP") : ""
2318
               h->slice_type == AV_PICTURE_TYPE_B ? (h->direct_spatial_mv_pred ? "SPAT" : "TEMP") : ""
2319 2319
               );
2320 2320
    }
2321 2321

  
......
2325 2325
int ff_h264_get_slice_type(const H264Context *h)
2326 2326
{
2327 2327
    switch (h->slice_type) {
2328
    case FF_P_TYPE:  return 0;
2329
    case FF_B_TYPE:  return 1;
2330
    case FF_I_TYPE:  return 2;
2331
    case FF_SP_TYPE: return 3;
2332
    case FF_SI_TYPE: return 4;
2328
    case AV_PICTURE_TYPE_P:  return 0;
2329
    case AV_PICTURE_TYPE_B:  return 1;
2330
    case AV_PICTURE_TYPE_I:  return 2;
2331
    case AV_PICTURE_TYPE_SP: return 3;
2332
    case AV_PICTURE_TYPE_SI: return 4;
2333 2333
    default:         return -1;
2334 2334
    }
2335 2335
}
......
3000 3000

  
3001 3001
            if(hx->redundant_pic_count==0
3002 3002
               && (avctx->skip_frame < AVDISCARD_NONREF || hx->nal_ref_idc)
3003
               && (avctx->skip_frame < AVDISCARD_BIDIR  || hx->slice_type_nos!=FF_B_TYPE)
3004
               && (avctx->skip_frame < AVDISCARD_NONKEY || hx->slice_type_nos==FF_I_TYPE)
3003
               && (avctx->skip_frame < AVDISCARD_BIDIR  || hx->slice_type_nos!=AV_PICTURE_TYPE_B)
3004
               && (avctx->skip_frame < AVDISCARD_NONKEY || hx->slice_type_nos==AV_PICTURE_TYPE_I)
3005 3005
               && avctx->skip_frame < AVDISCARD_ALL){
3006 3006
                if(avctx->hwaccel) {
3007 3007
                    if (avctx->hwaccel->decode_slice(avctx, &buf[buf_index - consumed], consumed) < 0)
......
3037 3037
            if(hx->redundant_pic_count==0 && hx->intra_gb_ptr && hx->s.data_partitioning
3038 3038
               && s->context_initialized
3039 3039
               && (avctx->skip_frame < AVDISCARD_NONREF || hx->nal_ref_idc)
3040
               && (avctx->skip_frame < AVDISCARD_BIDIR  || hx->slice_type_nos!=FF_B_TYPE)
3041
               && (avctx->skip_frame < AVDISCARD_NONKEY || hx->slice_type_nos==FF_I_TYPE)
3040
               && (avctx->skip_frame < AVDISCARD_BIDIR  || hx->slice_type_nos!=AV_PICTURE_TYPE_B)
3041
               && (avctx->skip_frame < AVDISCARD_NONKEY || hx->slice_type_nos==AV_PICTURE_TYPE_I)
3042 3042
               && avctx->skip_frame < AVDISCARD_ALL)
3043 3043
                context_count++;
3044 3044
            break;
libavcodec/h264.h
1118 1118
                }
1119 1119
                AV_ZERO16(h->mvd_cache [list][scan8[4 ]]);
1120 1120
                AV_ZERO16(h->mvd_cache [list][scan8[12]]);
1121
                if(h->slice_type_nos == FF_B_TYPE){
1121
                if(h->slice_type_nos == AV_PICTURE_TYPE_B){
1122 1122
                    fill_rectangle(&h->direct_cache[scan8[0]], 4, 4, 8, MB_TYPE_16x16>>1, 1);
1123 1123

  
1124 1124
                    if(IS_DIRECT(top_type)){
......
1255 1255
        }
1256 1256
    }
1257 1257

  
1258
    if(h->slice_type_nos == FF_B_TYPE && CABAC){
1258
    if(h->slice_type_nos == AV_PICTURE_TYPE_B && CABAC){
1259 1259
        if(IS_8X8(mb_type)){
1260 1260
            uint8_t *direct_table = &h->direct_table[4*h->mb_xy];
1261 1261
            direct_table[1] = h->sub_mb_type[1]>>1;
......
1286 1286
    if(MB_FIELD)
1287 1287
        mb_type|= MB_TYPE_INTERLACED;
1288 1288

  
1289
    if( h->slice_type_nos == FF_B_TYPE )
1289
    if( h->slice_type_nos == AV_PICTURE_TYPE_B )
1290 1290
    {
1291 1291
        // just for fill_caches. pred_direct_motion will set the real mb_type
1292 1292
        mb_type|= MB_TYPE_L0L1|MB_TYPE_DIRECT2|MB_TYPE_SKIP;
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;
libavcodec/h264_cavlc.c
548 548
    tprintf(s->avctx, "pic:%d mb:%d/%d\n", h->frame_num, s->mb_x, s->mb_y);
549 549
    cbp = 0; /* avoid warning. FIXME: find a solution without slowing
550 550
                down the code */
551
    if(h->slice_type_nos != FF_I_TYPE){
551
    if(h->slice_type_nos != AV_PICTURE_TYPE_I){
552 552
        if(s->mb_skip_run==-1)
553 553
            s->mb_skip_run= get_ue_golomb(&s->gb);
554 554

  
......
569 569
    h->prev_mb_skipped= 0;
570 570

  
571 571
    mb_type= get_ue_golomb(&s->gb);
572
    if(h->slice_type_nos == FF_B_TYPE){
572
    if(h->slice_type_nos == AV_PICTURE_TYPE_B){
573 573
        if(mb_type < 23){
574 574
            partition_count= b_mb_type_info[mb_type].partition_count;
575 575
            mb_type=         b_mb_type_info[mb_type].type;
......
577 577
            mb_type -= 23;
578 578
            goto decode_intra_mb;
579 579
        }
580
    }else if(h->slice_type_nos == FF_P_TYPE){
580
    }else if(h->slice_type_nos == AV_PICTURE_TYPE_P){
581 581
        if(mb_type < 5){
582 582
            partition_count= p_mb_type_info[mb_type].partition_count;
583 583
            mb_type=         p_mb_type_info[mb_type].type;
......
586 586
            goto decode_intra_mb;
587 587
        }
588 588
    }else{
589
       assert(h->slice_type_nos == FF_I_TYPE);
590
        if(h->slice_type == FF_SI_TYPE && mb_type)
589
       assert(h->slice_type_nos == AV_PICTURE_TYPE_I);
590
        if(h->slice_type == AV_PICTURE_TYPE_SI && mb_type)
591 591
            mb_type--;
592 592
decode_intra_mb:
593 593
        if(mb_type > 25){
......
678 678
    }else if(partition_count==4){
679 679
        int i, j, sub_partition_count[4], list, ref[2][4];
680 680

  
681
        if(h->slice_type_nos == FF_B_TYPE){
681
        if(h->slice_type_nos == AV_PICTURE_TYPE_B){
682 682
            for(i=0; i<4; i++){
683 683
                h->sub_mb_type[i]= get_ue_golomb_31(&s->gb);
684 684
                if(h->sub_mb_type[i] >=13){
......
696 696
                h->ref_cache[1][scan8[12]] = PART_NOT_AVAILABLE;
697 697
            }
698 698
        }else{
699
            assert(h->slice_type_nos == FF_P_TYPE); //FIXME SP correct ?
699
            assert(h->slice_type_nos == AV_PICTURE_TYPE_P); //FIXME SP correct ?
700 700
            for(i=0; i<4; i++){
701 701
                h->sub_mb_type[i]= get_ue_golomb_31(&s->gb);
702 702
                if(h->sub_mb_type[i] >=4){
libavcodec/h264_direct.c
130 130
        h->col_fieldoff= 2*(h->ref_list[1][0].reference) - 3;
131 131
    }
132 132

  
133
    if(cur->pict_type != FF_B_TYPE || h->direct_spatial_mv_pred)
133
    if(cur->pict_type != AV_PICTURE_TYPE_B || h->direct_spatial_mv_pred)
134 134
        return;
135 135

  
136 136
    for(list=0; list<2; list++){
libavcodec/h264_parser.c
117 117
    const uint8_t *ptr;
118 118

  
119 119
    /* set some sane default values */
120
    s->pict_type = FF_I_TYPE;
120
    s->pict_type = AV_PICTURE_TYPE_I;
121 121
    s->key_frame = 0;
122 122

  
123 123
    h->s.avctx= avctx;
libavcodec/h264_refs.c
110 110
    MpegEncContext * const s = &h->s;
111 111
    int i, len;
112 112

  
113
    if(h->slice_type_nos==FF_B_TYPE){
113
    if(h->slice_type_nos==AV_PICTURE_TYPE_B){
114 114
        Picture *sorted[32];
115 115
        int cur_poc, list;
116 116
        int lens[2];
......
149 149
    for (i=0; i<h->ref_count[0]; i++) {
150 150
        tprintf(h->s.avctx, "List0: %s fn:%d 0x%p\n", (h->default_ref_list[0][i].long_ref ? "LT" : "ST"), h->default_ref_list[0][i].pic_id, h->default_ref_list[0][i].data[0]);
151 151
    }
152
    if(h->slice_type_nos==FF_B_TYPE){
152
    if(h->slice_type_nos==AV_PICTURE_TYPE_B){
153 153
        for (i=0; i<h->ref_count[1]; i++) {
154 154
            tprintf(h->s.avctx, "List1: %s fn:%d 0x%p\n", (h->default_ref_list[1][i].long_ref ? "LT" : "ST"), h->default_ref_list[1][i].pic_id, h->default_ref_list[1][i].data[0]);
155 155
        }
libavcodec/h264data.h
36 36

  
37 37

  
38 38
static const uint8_t golomb_to_pict_type[5]=
39
{FF_P_TYPE, FF_B_TYPE, FF_I_TYPE, FF_SP_TYPE, FF_SI_TYPE};
39
{AV_PICTURE_TYPE_P, AV_PICTURE_TYPE_B, AV_PICTURE_TYPE_I, AV_PICTURE_TYPE_SP, AV_PICTURE_TYPE_SI};
40 40

  
41 41
static const uint8_t golomb_to_intra4x4_cbp[48]={
42 42
 47, 31, 15,  0, 23, 27, 29, 30,  7, 11, 13, 14, 39, 43, 45, 46,
libavcodec/huffyuv.c
1238 1238
    int i, j, size=0;
1239 1239

  
1240 1240
    *p = *pict;
1241
    p->pict_type= FF_I_TYPE;
1241
    p->pict_type= AV_PICTURE_TYPE_I;
1242 1242
    p->key_frame= 1;
1243 1243

  
1244 1244
    if(s->context){
libavcodec/intelh263dec.c
52 52
    }
53 53
    s->h263_plus = 0;
54 54

  
55
    s->pict_type = FF_I_TYPE + get_bits1(&s->gb);
55
    s->pict_type = AV_PICTURE_TYPE_I + get_bits1(&s->gb);
56 56

  
57 57
    s->unrestricted_mv = get_bits1(&s->gb);
58 58
    s->h263_long_vectors = s->unrestricted_mv;
libavcodec/ituh263dec.c
347 347
        s->block_index[i]+= 1;
348 348
    s->mb_x++;
349 349

  
350
    assert(s->pict_type == FF_P_TYPE);
350
    assert(s->pict_type == AV_PICTURE_TYPE_P);
351 351

  
352 352
    do{
353 353
        if (get_bits1(&s->gb)) {
......
460 460
        /* DC coef */
461 461
        if(s->codec_id == CODEC_ID_RV10){
462 462
#if CONFIG_RV10_DECODER
463
          if (s->rv10_version == 3 && s->pict_type == FF_I_TYPE) {
463
          if (s->rv10_version == 3 && s->pict_type == AV_PICTURE_TYPE_I) {
464 464
            int component, diff;
465 465
            component = (n <= 3 ? 0 : n - 4 + 1);
466 466
            level = s->last_dc[component];
......
608 608

  
609 609
    assert(!s->h263_pred);
610 610

  
611
    if (s->pict_type == FF_P_TYPE) {
611
    if (s->pict_type == AV_PICTURE_TYPE_P) {
612 612
        do{
613 613
            if (get_bits1(&s->gb)) {
614 614
                /* skip mb */
......
700 700
                mot_val[1] = my;
701 701
            }
702 702
        }
703
    } else if(s->pict_type==FF_B_TYPE) {
703
    } else if(s->pict_type==AV_PICTURE_TYPE_B) {
704 704
        int mb_type;
705 705
        const int stride= s->b8_stride;
706 706
        int16_t *mot_val0 = s->current_picture.motion_val[0][ 2*(s->mb_x + s->mb_y*stride) ];
......
843 843
    if(s->pb_frame && h263_skip_b_part(s, cbpb) < 0)
844 844
        return -1;
845 845
    if(s->obmc && !s->mb_intra){
846
        if(s->pict_type == FF_P_TYPE && s->mb_x+1<s->mb_width && s->mb_num_left != 1)
846
        if(s->pict_type == AV_PICTURE_TYPE_P && s->mb_x+1<s->mb_width && s->mb_num_left != 1)
847 847
            preview_obmc(s);
848 848
    }
849 849
end:
......
921 921
        if (!width)
922 922
            return -1;
923 923

  
924
        s->pict_type = FF_I_TYPE + get_bits1(&s->gb);
924
        s->pict_type = AV_PICTURE_TYPE_I + get_bits1(&s->gb);
925 925

  
926 926
        s->h263_long_vectors = get_bits1(&s->gb);
927 927

  
......
985 985
        /* MPPTYPE */
986 986
        s->pict_type = get_bits(&s->gb, 3);
987 987
        switch(s->pict_type){
988
        case 0: s->pict_type= FF_I_TYPE;break;
989
        case 1: s->pict_type= FF_P_TYPE;break;
990
        case 2: s->pict_type= FF_P_TYPE;s->pb_frame = 3;break;
991
        case 3: s->pict_type= FF_B_TYPE;break;
992
        case 7: s->pict_type= FF_I_TYPE;break; //ZYGO
988
        case 0: s->pict_type= AV_PICTURE_TYPE_I;break;
989
        case 1: s->pict_type= AV_PICTURE_TYPE_P;break;
990
        case 2: s->pict_type= AV_PICTURE_TYPE_P;s->pb_frame = 3;break;
991
        case 3: s->pict_type= AV_PICTURE_TYPE_B;break;
992
        case 7: s->pict_type= AV_PICTURE_TYPE_I;break; //ZYGO
993 993
        default:
994 994
            return -1;
995 995
        }
......
1112 1112
    }
1113 1113

  
1114 1114
        ff_h263_show_pict_info(s);
1115
    if (s->pict_type == FF_I_TYPE && s->codec_tag == AV_RL32("ZYGO")){
1115
    if (s->pict_type == AV_PICTURE_TYPE_I && s->codec_tag == AV_RL32("ZYGO")){
1116 1116
        int i,j;
1117 1117
        for(i=0; i<85; i++) av_log(s->avctx, AV_LOG_DEBUG, "%d", get_bits1(&s->gb));
1118 1118
        av_log(s->avctx, AV_LOG_DEBUG, "\n");
libavcodec/ituh263enc.c
145 145
    if (!s->h263_plus) {
146 146
        /* H.263v1 */
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff