History

replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*

Stefano Sabatini committed 15 years ago

Commit ce5e49b1 parent 301183d138 files · +642 −642Browse files

Unified · Split

138 files
  1. ffmpeg.c +1 −1
  2. libavcodec/4xm.c +4 −4
  3. libavcodec/a64multienc.c +2 −2
  4. libavcodec/ansi.c +2 −2
  5. libavcodec/asv1.c +2 −2
  6. libavcodec/avcodec.h +1 −1
  7. libavcodec/avs.c +2 −2
  8. libavcodec/bfi.c +2 −2
  9. libavcodec/bmp.c +1 −1
  10. libavcodec/bmpenc.c +1 −1
  11. libavcodec/c93.c +2 −2
  12. libavcodec/cavs.h +1 −1
  13. libavcodec/cavsdec.c +15 −15
  14. libavcodec/cljr.c +2 −2
  15. libavcodec/cscd.c +2 −2
  16. libavcodec/dirac_parser.c +1 −1
  17. libavcodec/dnxhddec.c +1 −1
  18. libavcodec/dnxhdenc.c +1 −1
  19. libavcodec/dpxenc.c +1 −1
  20. libavcodec/dv.c +2 −2
  21. libavcodec/dxa.c +4 −4
  22. libavcodec/dxva2_h264.c +2 −2
  23. libavcodec/dxva2_mpeg2.c +4 −4
  24. libavcodec/dxva2_vc1.c +6 −6
  25. libavcodec/eacmv.c +2 −2
  26. libavcodec/eatgq.c +1 −1
  27. libavcodec/eatgv.c +2 −2
  28. libavcodec/error_resilience.c +4 −4
  29. libavcodec/ffv1.c +2 −2
  30. libavcodec/flashsvenc.c +2 −2
  31. libavcodec/flvdec.c +3 −3
  32. libavcodec/flvenc.c +1 −1
  33. libavcodec/fraps.c +10 −10
  34. libavcodec/frwu.c +1 −1
  35. libavcodec/gif.c +1 −1
  36. libavcodec/h261dec.c +5 −5
  37. libavcodec/h263.c +1 −1
  38. libavcodec/h263dec.c +11 −11
  39. libavcodec/h264.c +30 −30
  40. libavcodec/h264.h +3 −3
  41. libavcodec/h264_cabac.c +10 −10
  42. libavcodec/h264_cavlc.c +7 −7
  43. libavcodec/h264_direct.c +1 −1
  44. libavcodec/h264_parser.c +1 −1
  45. libavcodec/h264_refs.c +2 −2
  46. libavcodec/h264data.h +1 −1
  47. libavcodec/huffyuv.c +1 −1
  48. libavcodec/intelh263dec.c +1 −1
  49. libavcodec/ituh263dec.c +12 −12
  50. libavcodec/ituh263enc.c +5 −5
  51. libavcodec/jpeglsenc.c +1 −1
  52. libavcodec/jvdec.c +1 −1
  53. libavcodec/kmvc.c +2 −2
  54. libavcodec/lclenc.c +1 −1
  55. libavcodec/libvpxenc.c +2 −2
  56. libavcodec/libx264.c +6 −6
  57. libavcodec/libxavs.c +3 −3
  58. libavcodec/libxvid_rc.c +1 −1
  59. libavcodec/libxvidff.c +7 −7
  60. libavcodec/ljpegenc.c +1 −1
  61. libavcodec/mdec.c +1 −1
  62. libavcodec/mimic.c +1 −1
  63. libavcodec/mjpegdec.c +1 −1
  64. libavcodec/motion_est.c +2 −2
  65. libavcodec/motion_est_template.c +1 −1
  66. libavcodec/mpeg12.c +24 −24
  67. libavcodec/mpeg12enc.c +9 −9
  68. libavcodec/mpeg4video.c +4 −4
  69. libavcodec/mpeg4videodec.c +38 −38
  70. libavcodec/mpeg4videoenc.c +15 −15
  71. libavcodec/mpegvideo.c +32 −32
  72. libavcodec/mpegvideo.h +1 −1
  73. libavcodec/mpegvideo_common.h +3 −3
  74. libavcodec/mpegvideo_enc.c +37 −37
  75. libavcodec/mpegvideo_xvmc.c +3 −3
  76. libavcodec/msmpeg4.c +14 −14
  77. libavcodec/mxpegdec.c +2 −2
  78. libavcodec/nuv.c +1 −1
  79. libavcodec/pamenc.c +1 −1
  80. libavcodec/parser.c +2 −2
  81. libavcodec/pcx.c +1 −1
  82. libavcodec/pcxenc.c +1 −1
  83. libavcodec/pictordec.c +1 −1
  84. libavcodec/pngdec.c +1 −1
  85. libavcodec/pngenc.c +1 −1
  86. libavcodec/pnmdec.c +1 −1
  87. libavcodec/pnmenc.c +1 −1
  88. libavcodec/ptx.c +1 −1
  89. libavcodec/qdrw.c +1 −1
  90. libavcodec/qtrleenc.c +2 −2
  91. libavcodec/r210dec.c +1 −1
  92. libavcodec/ratecontrol.c +33 −33
  93. libavcodec/rawdec.c +1 −1
  94. libavcodec/rawenc.c +1 −1
  95. libavcodec/rv10.c +13 −13
  96. libavcodec/rv10enc.c +2 −2
  97. libavcodec/rv20enc.c +1 −1
  98. libavcodec/rv30.c +1 −1
  99. libavcodec/rv34.c +10 −10
  100. libavcodec/rv40.c +1 −1
  101. libavcodec/sgidec.c +1 −1
  102. libavcodec/sgienc.c +1 −1
  103. libavcodec/smacker.c +2 −2
  104. libavcodec/snow.c +11 −11
  105. libavcodec/sunrast.c +1 −1
  106. libavcodec/svq1dec.c +6 −6
  107. libavcodec/svq1enc.c +7 −7
  108. libavcodec/svq3.c +21 −21
  109. libavcodec/targaenc.c +1 −1
  110. libavcodec/tiffenc.c +1 −1
  111. libavcodec/tmv.c +1 −1
  112. libavcodec/truemotion2.c +2 −2
  113. libavcodec/txd.c +1 −1
  114. libavcodec/v210dec.c +1 −1
  115. libavcodec/v210enc.c +1 −1
  116. libavcodec/v210x.c +1 −1
  117. libavcodec/vaapi_h264.c +1 −1
  118. libavcodec/vaapi_mpeg2.c +2 −2
  119. libavcodec/vaapi_mpeg4.c +4 −4
  120. libavcodec/vaapi_vc1.c +19 −19
  121. libavcodec/vc1.c +34 −34
  122. libavcodec/vc1_parser.c +3 −3
  123. libavcodec/vc1dec.c +12 −12
  124. libavcodec/vcr1.c +2 −2
  125. libavcodec/vdpau.c +6 −6
  126. libavcodec/vmnc.c +2 −2
  127. libavcodec/vp3.c +2 −2
  128. libavcodec/vp3_parser.c +2 −2
  129. libavcodec/vp56.c +2 −2
  130. libavcodec/vp8.c +1 −1
  131. libavcodec/vp8_parser.c +1 −1
  132. libavcodec/wmv2dec.c +4 −4
  133. libavcodec/wmv2enc.c +3 −3
  134. libavcodec/xl.c +1 −1
  135. libavcodec/zmbv.c +2 −2
  136. libavcodec/zmbvenc.c +1 −1
  137. libavformat/gxfenc.c +2 −2
  138. libavformat/utils.c +3 −3
ffmpeg.c+1−1
@@ -1270,7 +1270,7 @@ static void do_video_out(AVFormatContext *s, · 1269 unmodified lines
12701270 //av_log(NULL, AV_LOG_DEBUG, "%"PRId64" -> encoder\n", ost->sync_opts);
12711271 if (ost->forced_kf_index < ost->forced_kf_count &&
12721272 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;
12741274 ost->forced_kf_index++;
12751275 }
12761276 ret = avcodec_encode_video(enc,
libavcodec/4xm.c+4−4
@@ -780,11 +780,11 @@ static int decode_frame(AVCodecContext *avctx, · 779 unmodified lines
780780 }
781781
782782 if(frame_4cc == AV_RL32("ifr2")){
783− p->pict_type= FF_I_TYPE;
783+ p->pict_type= AV_PICTURE_TYPE_I;
784784 if(decode_i2_frame(f, buf-4, frame_size) < 0)
785785 return -1;
786786 }else if(frame_4cc == AV_RL32("ifrm")){
787− p->pict_type= FF_I_TYPE;
787+ p->pict_type= AV_PICTURE_TYPE_I;
788788 if(decode_i_frame(f, buf, frame_size) < 0)
789789 return -1;
790790 }else if(frame_4cc == AV_RL32("pfrm") || frame_4cc == AV_RL32("pfr2")){
@@ -796,7 +796,7 @@ static int decode_frame(AVCodecContext *avctx, · 5 unmodified lines
796796 }
797797 }
798798
799− p->pict_type= FF_P_TYPE;
799+ p->pict_type= AV_PICTURE_TYPE_P;
800800 if(decode_p_frame(f, buf, frame_size) < 0)
801801 return -1;
802802 }else if(frame_4cc == AV_RL32("snd_")){
@@ -805,7 +805,7 @@ static int decode_frame(AVCodecContext *avctx, · 2 unmodified lines
805805 av_log(avctx, AV_LOG_ERROR, "ignoring unknown chunk length:%d\n", buf_size);
806806 }
807807
808− p->key_frame= p->pict_type == FF_I_TYPE;
808+ p->key_frame= p->pict_type == AV_PICTURE_TYPE_I;
809809
810810 *picture= *p;
811811 *data_size = sizeof(AVPicture);
libavcodec/a64multienc.c+2−2
@@ -216,7 +216,7 @@ static av_cold int a64multi_init_encoder(AVCodecContext *avctx) · 215 unmodified lines
216216
217217 avcodec_get_frame_defaults(&c->picture);
218218 avctx->coded_frame = &c->picture;
219− avctx->coded_frame->pict_type = FF_I_TYPE;
219+ avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
220220 avctx->coded_frame->key_frame = 1;
221221 if (!avctx->codec_tag)
222222 avctx->codec_tag = AV_RL32("a64m");
@@ -290,7 +290,7 @@ static int a64multi_encode_frame(AVCodecContext *avctx, unsigned char *buf, · 67 unmodified lines
290290 /* fill up mc_meta_charset with data until lifetime exceeds */
291291 if (c->mc_frame_counter < c->mc_lifetime) {
292292 *p = *pict;
293− p->pict_type = FF_I_TYPE;
293+ p->pict_type = AV_PICTURE_TYPE_I;
294294 p->key_frame = 1;
295295 to_meta_with_crop(avctx, p, meta + 32000 * c->mc_frame_counter);
296296 c->mc_frame_counter++;
libavcodec/ansi.c+2−2
@@ -226,7 +226,7 @@ static int execute_code(AVCodecContext * avctx, int c) · 225 unmodified lines
226226 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
227227 return ret;
228228 }
229− s->frame.pict_type = FF_I_TYPE;
229+ s->frame.pict_type = AV_PICTURE_TYPE_I;
230230 s->frame.palette_has_changed = 1;
231231 memcpy(s->frame.data[1], ff_cga_palette, 16 * 4);
232232 erase_screen(avctx);
@@ -323,7 +323,7 @@ static int decode_frame(AVCodecContext *avctx, · 90 unmodified lines
323323 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
324324 return ret;
325325 }
326− s->frame.pict_type = FF_I_TYPE;
326+ s->frame.pict_type = AV_PICTURE_TYPE_I;
327327 s->frame.palette_has_changed = 1;
328328 memcpy(s->frame.data[1], ff_cga_palette, 16 * 4);
329329
libavcodec/asv1.c+2−2
@@ -405,7 +405,7 @@ static int decode_frame(AVCodecContext *avctx, · 404 unmodified lines
405405 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
406406 return -1;
407407 }
408− p->pict_type= FF_I_TYPE;
408+ p->pict_type= AV_PICTURE_TYPE_I;
409409 p->key_frame= 1;
410410
411411 av_fast_malloc(&a->bitstream_buffer, &a->bitstream_buffer_size, buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
@@ -470,7 +470,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, · 58 unmodified lines
470470 init_put_bits(&a->pb, buf, buf_size);
471471
472472 *p = *pict;
473− p->pict_type= FF_I_TYPE;
473+ p->pict_type= AV_PICTURE_TYPE_I;
474474 p->key_frame= 1;
475475
476476 for(mb_y=0; mb_y<a->mb_height2; mb_y++){
libavcodec/avcodec.h+1−1
@@ -3920,7 +3920,7 @@ typedef struct AVCodecParserContext { · 3919 unmodified lines
39203920 /*!
39213921 * Set by parser to 1 for key frames and 0 for non-key frames.
39223922 * 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
39243924 * will be used.
39253925 */
39263926 int key_frame;
libavcodec/avs.c+2−2
@@ -63,7 +63,7 @@ avs_decode_frame(AVCodecContext * avctx, · 62 unmodified lines
6363 return -1;
6464 }
6565 p->reference = 1;
66− p->pict_type = FF_P_TYPE;
66+ p->pict_type = AV_PICTURE_TYPE_P;
6767 p->key_frame = 0;
6868
6969 out = avs->picture.data[0];
@@ -93,7 +93,7 @@ avs_decode_frame(AVCodecContext * avctx, · 23 unmodified lines
9393
9494 switch (sub_type) {
9595 case AVS_I_FRAME:
96− p->pict_type = FF_I_TYPE;
96+ p->pict_type = AV_PICTURE_TYPE_I;
9797 p->key_frame = 1;
9898 case AVS_P_FRAME_3X3:
9999 vect_w = 3;
libavcodec/bfi.c+2−2
@@ -69,7 +69,7 @@ static int bfi_decode_frame(AVCodecContext * avctx, void *data, · 68 unmodified lines
6969
7070 /* Set frame parameters and palette, if necessary */
7171 if (!avctx->frame_number) {
72− bfi->frame.pict_type = FF_I_TYPE;
72+ bfi->frame.pict_type = AV_PICTURE_TYPE_I;
7373 bfi->frame.key_frame = 1;
7474 /* Setting the palette */
7575 if(avctx->extradata_size>768) {
@@ -89,7 +89,7 @@ static int bfi_decode_frame(AVCodecContext * avctx, void *data, · 13 unmodified lines
8989 memcpy(bfi->pal, bfi->frame.data[1], sizeof(bfi->pal));
9090 bfi->frame.palette_has_changed = 1;
9191 } else {
92− bfi->frame.pict_type = FF_P_TYPE;
92+ bfi->frame.pict_type = AV_PICTURE_TYPE_P;
9393 bfi->frame.key_frame = 0;
9494 bfi->frame.palette_has_changed = 0;
9595 memcpy(bfi->frame.data[1], bfi->pal, sizeof(bfi->pal));
libavcodec/bmp.c+1−1
@@ -200,7 +200,7 @@ static int bmp_decode_frame(AVCodecContext *avctx, · 199 unmodified lines
200200 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
201201 return -1;
202202 }
203− p->pict_type = FF_I_TYPE;
203+ p->pict_type = AV_PICTURE_TYPE_I;
204204 p->key_frame = 1;
205205
206206 buf = buf0 + hsize;
libavcodec/bmpenc.c+1−1
@@ -74,7 +74,7 @@ static int bmp_encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_s · 73 unmodified lines
7474 uint8_t *ptr;
7575 unsigned char* buf0 = buf;
7676 *p = *pict;
77− p->pict_type= FF_I_TYPE;
77+ p->pict_type= AV_PICTURE_TYPE_I;
7878 p->key_frame= 1;
7979 switch (avctx->pix_fmt) {
8080 case PIX_FMT_RGB565:
libavcodec/c93.c+2−2
@@ -137,10 +137,10 @@ static int decode_frame(AVCodecContext *avctx, void *data, · 136 unmodified lines
137137 stride = newpic->linesize[0];
138138
139139 if (buf[0] & C93_FIRST_FRAME) {
140− newpic->pict_type = FF_I_TYPE;
140+ newpic->pict_type = AV_PICTURE_TYPE_I;
141141 newpic->key_frame = 1;
142142 } else {
143− newpic->pict_type = FF_P_TYPE;
143+ newpic->pict_type = AV_PICTURE_TYPE_P;
144144 newpic->key_frame = 0;
145145 }
146146
libavcodec/cavs.h+1−1
@@ -278,7 +278,7 @@ static inline void set_mv_intra(AVSContext *h) { · 277 unmodified lines
278278 set_mvs(&h->mv[MV_FWD_X0], BLK_16X16);
279279 h->mv[MV_BWD_X0] = ff_cavs_intra_mv;
280280 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)
282282 h->col_type_base[h->mbidx] = I_8X8;
283283 }
284284
libavcodec/cavsdec.c+15−15
@@ -220,7 +220,7 @@ static int decode_mb_i(AVSContext *h, int cbp_code) { · 219 unmodified lines
220220 ff_cavs_modify_mb_i(h, &pred_mode_uv);
221221
222222 /* get coded block pattern */
223− if(h->pic_type == FF_I_TYPE)
223+ if(h->pic_type == AV_PICTURE_TYPE_I)
224224 cbp_code = get_ue_golomb(gb);
225225 if(cbp_code > 63){
226226 av_log(h->s.avctx, AV_LOG_ERROR, "illegal intra cbp\n");
@@ -424,7 +424,7 @@ static inline int decode_slice_header(AVSContext *h, GetBitContext *gb) { · 197 unmodified lines
424424 h->qp = get_bits(gb,6);
425425 }
426426 /* 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))
428428 if(get_bits1(gb)) { //slice_weighting_flag
429429 av_log(h->s.avctx, AV_LOG_ERROR,
430430 "weighted prediction not yet supported\n");
@@ -470,17 +470,17 @@ static int decode_pic(AVSContext *h) { · 39 unmodified lines
470470 }
471471 skip_bits(&s->gb,16);//bbv_dwlay
472472 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) {
475475 av_log(s->avctx, AV_LOG_ERROR, "illegal picture type\n");
476476 return -1;
477477 }
478478 /* make sure we have the reference frames we need */
479479 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))
481481 return -1;
482482 } else {
483− h->pic_type = FF_I_TYPE;
483+ h->pic_type = AV_PICTURE_TYPE_I;
484484 if(get_bits1(&s->gb))
485485 skip_bits(&s->gb,24);//time_code
486486 /* old sample clips were all progressive and no low_delay,
@@ -502,7 +502,7 @@ static int decode_pic(AVSContext *h) { · 15 unmodified lines
502502 h->picture.poc = get_bits(&s->gb,8)*2;
503503
504504 /* get temporal distances and MV scaling factors */
505− if(h->pic_type != FF_B_TYPE) {
505+ if(h->pic_type != AV_PICTURE_TYPE_B) {
506506 h->dist[0] = (h->picture.poc - h->DPB[0].poc + 512) % 512;
507507 } else {
508508 h->dist[0] = (h->DPB[0].poc - h->picture.poc + 512) % 512;
@@ -510,7 +510,7 @@ static int decode_pic(AVSContext *h) { · 1 unmodified line
510510 h->dist[1] = (h->picture.poc - h->DPB[1].poc + 512) % 512;
511511 h->scale_den[0] = h->dist[0] ? 512/h->dist[0] : 0;
512512 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) {
514514 h->sym_factor = h->dist[0]*h->scale_den[1];
515515 } else {
516516 h->direct_den[0] = h->dist[0] ? 16384/h->dist[0] : 0;
@@ -529,12 +529,12 @@ static int decode_pic(AVSContext *h) { · 12 unmodified lines
529529 skip_bits1(&s->gb); //repeat_first_field
530530 h->qp_fixed = get_bits1(&s->gb);
531531 h->qp = get_bits(&s->gb,6);
532− if(h->pic_type == FF_I_TYPE) {
532+ if(h->pic_type == AV_PICTURE_TYPE_I) {
533533 if(!h->progressive && !h->pic_structure)
534534 skip_bits1(&s->gb);//what is this?
535535 skip_bits(&s->gb,4); //reserved bits
536536 } 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))
538538 h->ref_flag = get_bits1(&s->gb);
539539 skip_bits(&s->gb,4); //reserved bits
540540 h->skip_mode_flag = get_bits1(&s->gb);
@@ -546,12 +546,12 @@ static int decode_pic(AVSContext *h) { · 5 unmodified lines
546546 } else {
547547 h->alpha_offset = h->beta_offset = 0;
548548 }
549− if(h->pic_type == FF_I_TYPE) {
549+ if(h->pic_type == AV_PICTURE_TYPE_I) {
550550 do {
551551 check_for_slice(h);
552552 decode_mb_i(h, 0);
553553 } 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) {
555555 do {
556556 if(check_for_slice(h))
557557 skip_count = -1;
@@ -567,7 +567,7 @@ static int decode_pic(AVSContext *h) { · 9 unmodified lines
567567 decode_mb_p(h,mb_type);
568568 }
569569 } while(ff_cavs_next_mb(h));
570− } else { /* FF_B_TYPE */
570+ } else { /* AV_PICTURE_TYPE_B */
571571 do {
572572 if(check_for_slice(h))
573573 skip_count = -1;
@@ -584,7 +584,7 @@ static int decode_pic(AVSContext *h) { · 10 unmodified lines
584584 }
585585 } while(ff_cavs_next_mb(h));
586586 }
587− if(h->pic_type != FF_B_TYPE) {
587+ if(h->pic_type != AV_PICTURE_TYPE_B) {
588588 if(h->DPB[1].data[0])
589589 s->avctx->release_buffer(s->avctx, (AVFrame *)&h->DPB[1]);
590590 h->DPB[1] = h->DPB[0];
@@ -684,7 +684,7 @@ static int cavs_decode_frame(AVCodecContext * avctx,void *data, int *data_size, · 93 unmodified lines
684684 if(decode_pic(h))
685685 break;
686686 *data_size = sizeof(AVPicture);
687− if(h->pic_type != FF_B_TYPE) {
687+ if(h->pic_type != AV_PICTURE_TYPE_B) {
688688 if(h->DPB[1].data[0]) {
689689 *picture = *(AVFrame *) &h->DPB[1];
690690 } else {
libavcodec/cljr.c+2−2
@@ -64,7 +64,7 @@ static int decode_frame(AVCodecContext *avctx, · 63 unmodified lines
6464 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
6565 return -1;
6666 }
67− p->pict_type= FF_I_TYPE;
67+ p->pict_type= AV_PICTURE_TYPE_I;
6868 p->key_frame= 1;
6969
7070 init_get_bits(&a->gb, buf, buf_size);
@@ -100,7 +100,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, · 29 unmodified lines
100100 int size;
101101
102102 *p = *pict;
103− p->pict_type= FF_I_TYPE;
103+ p->pict_type= AV_PICTURE_TYPE_I;
104104 p->key_frame= 1;
105105
106106 emms_c();
libavcodec/cscd.c+2−2
@@ -183,7 +183,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 182 unmodified lines
183183
184184 // flip upside down, add difference frame
185185 if (buf[0] & 1) { // keyframe
186− c->pic.pict_type = FF_I_TYPE;
186+ c->pic.pict_type = AV_PICTURE_TYPE_I;
187187 c->pic.key_frame = 1;
188188 switch (c->bpp) {
189189 case 16:
@@ -197,7 +197,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 7 unmodified lines
197197 c->linelen, c->height);
198198 }
199199 } else {
200− c->pic.pict_type = FF_P_TYPE;
200+ c->pic.pict_type = AV_PICTURE_TYPE_P;
201201 c->pic.key_frame = 0;
202202 switch (c->bpp) {
203203 case 16:
libavcodec/dirac_parser.c+1−1
@@ -194,7 +194,7 @@ static int dirac_combine_frame(AVCodecParserContext *s, AVCodecContext *avctx, · 193 unmodified lines
194194 avctx->has_b_frames = 1;
195195 }
196196 if (avctx->has_b_frames && s->pts == s->dts)
197− s->pict_type = FF_B_TYPE;
197+ s->pict_type = AV_PICTURE_TYPE_B;
198198
199199 /* Finally have a complete Dirac data unit */
200200 *buf = pc->dirac_unit;
libavcodec/dnxhddec.c+1−1
@@ -55,7 +55,7 @@ static av_cold int dnxhd_decode_init(AVCodecContext *avctx) · 54 unmodified lines
5555 ctx->avctx = avctx;
5656 dsputil_init(&ctx->dsp, avctx);
5757 avctx->coded_frame = &ctx->picture;
58− ctx->picture.type = FF_I_TYPE;
58+ ctx->picture.type = AV_PICTURE_TYPE_I;
5959 ctx->picture.key_frame = 1;
6060 return 0;
6161 }
libavcodec/dnxhdenc.c+1−1
@@ -222,7 +222,7 @@ static int dnxhd_encode_init(AVCodecContext *avctx) · 221 unmodified lines
222222 FF_ALLOCZ_OR_GOTO(ctx->m.avctx, ctx->mb_qscale, ctx->m.mb_num *sizeof(uint8_t) , fail);
223223
224224 ctx->frame.key_frame = 1;
225− ctx->frame.pict_type = FF_I_TYPE;
225+ ctx->frame.pict_type = AV_PICTURE_TYPE_I;
226226 ctx->m.avctx->coded_frame = &ctx->frame;
227227
228228 if (avctx->thread_count > MAX_THREADS) {
libavcodec/dpxenc.c+1−1
@@ -35,7 +35,7 @@ static av_cold int encode_init(AVCodecContext *avctx) · 34 unmodified lines
3535 DPXContext *s = avctx->priv_data;
3636
3737 avctx->coded_frame = &s->picture;
38− avctx->coded_frame->pict_type = FF_I_TYPE;
38+ avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
3939 avctx->coded_frame->key_frame = 1;
4040
4141 s->big_endian = 1;
libavcodec/dv.c+2−2
@@ -1095,7 +1095,7 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, · 1094 unmodified lines
10951095
10961096 s->picture.reference = 0;
10971097 s->picture.key_frame = 1;
1098− s->picture.pict_type = FF_I_TYPE;
1098+ s->picture.pict_type = AV_PICTURE_TYPE_I;
10991099 avctx->pix_fmt = s->sys->pix_fmt;
11001100 avctx->time_base = s->sys->time_base;
11011101 avcodec_set_dimensions(avctx, s->sys->width, s->sys->height);
@@ -1264,7 +1264,7 @@ static int dvvideo_encode_frame(AVCodecContext *c, uint8_t *buf, int buf_size, · 162 unmodified lines
12641264 c->pix_fmt = s->sys->pix_fmt;
12651265 s->picture = *((AVFrame *)data);
12661266 s->picture.key_frame = 1;
1267− s->picture.pict_type = FF_I_TYPE;
1267+ s->picture.pict_type = AV_PICTURE_TYPE_I;
12681268
12691269 s->buf = buf;
12701270 c->execute(c, dv_encode_video_segment, s->sys->work_chunks, NULL,
libavcodec/dxa.c+4−4
@@ -240,13 +240,13 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac · 239 unmodified lines
240240 switch(compr){
241241 case -1:
242242 c->pic.key_frame = 0;
243− c->pic.pict_type = FF_P_TYPE;
243+ c->pic.pict_type = AV_PICTURE_TYPE_P;
244244 if(c->prev.data[0])
245245 memcpy(c->pic.data[0], c->prev.data[0], c->pic.linesize[0] * avctx->height);
246246 else{ // Should happen only when first frame is 'NULL'
247247 memset(c->pic.data[0], 0, c->pic.linesize[0] * avctx->height);
248248 c->pic.key_frame = 1;
249− c->pic.pict_type = FF_I_TYPE;
249+ c->pic.pict_type = AV_PICTURE_TYPE_I;
250250 }
251251 break;
252252 case 2:
@@ -254,7 +254,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac · 1 unmodified line
254254 case 4:
255255 case 5:
256256 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;
258258 for(j = 0; j < avctx->height; j++){
259259 if(compr & 1){
260260 for(i = 0; i < avctx->width; i++)
@@ -269,7 +269,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac · 8 unmodified lines
269269 case 12: // ScummVM coding
270270 case 13:
271271 c->pic.key_frame = 0;
272− c->pic.pict_type = FF_P_TYPE;
272+ c->pic.pict_type = AV_PICTURE_TYPE_P;
273273 decode_13(avctx, c, c->pic.data[0], srcptr, c->prev.data[0]);
274274 break;
275275 default:
libavcodec/dxva2_h264.c+2−2
@@ -246,7 +246,7 @@ static void fill_slice_long(AVCodecContext *avctx, DXVA_Slice_H264_Long *slice, · 245 unmodified lines
246246 slice->slice_qs_delta = 0; /* XXX not implemented by FFmpeg */
247247 slice->slice_qp_delta = s->qscale - h->pps.init_qp;
248248 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)
250250 slice->direct_spatial_mv_pred_flag = h->direct_spatial_mv_pred;
251251 slice->cabac_init_idc = h->pps.cabac ? h->cabac_init_idc : 0;
252252 if (h->deblocking_filter < 2)
@@ -403,7 +403,7 @@ static int decode_slice(AVCodecContext *avctx, · 150 unmodified lines
403403 position, size);
404404 ctx_pic->slice_count++;
405405
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)
407407 ctx_pic->pp.wBitFields &= ~(1 << 15); /* Set IntraPicFlag to 0 */
408408 return 0;
409409 }
libavcodec/dxva2_mpeg2.c+4−4
@@ -44,11 +44,11 @@ static void fill_picture_parameters(AVCodecContext *avctx, · 43 unmodified lines
4444 memset(pp, 0, sizeof(*pp));
4545 pp->wDecodedPictureIndex = ff_dxva2_get_surface_index(ctx, current_picture);
4646 pp->wDeblockedPictureIndex = 0;
47− if (s->pict_type != FF_I_TYPE)
47+ if (s->pict_type != AV_PICTURE_TYPE_I)
4848 pp->wForwardRefPictureIndex = ff_dxva2_get_surface_index(ctx, &s->last_picture);
4949 else
5050 pp->wForwardRefPictureIndex = 0xffff;
51− if (s->pict_type == FF_B_TYPE)
51+ if (s->pict_type == AV_PICTURE_TYPE_B)
5252 pp->wBackwardRefPictureIndex = ff_dxva2_get_surface_index(ctx, &s->next_picture);
5353 else
5454 pp->wBackwardRefPictureIndex = 0xffff;
@@ -61,8 +61,8 @@ static void fill_picture_parameters(AVCodecContext *avctx, · 6 unmodified lines
6161 pp->bBPPminus1 = 7;
6262 pp->bPicStructure = s->picture_structure;
6363 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;
6666 pp->bBidirectionalAveragingMode = 0;
6767 pp->bMVprecisionAndChromaRelation= 0; /* FIXME */
6868 pp->bChromaFormat = s->chroma_format;
libavcodec/dxva2_vc1.c+6−6
@@ -42,11 +42,11 @@ static void fill_picture_parameters(AVCodecContext *avctx, · 41 unmodified lines
4242 memset(pp, 0, sizeof(*pp));
4343 pp->wDecodedPictureIndex =
4444 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)
4646 pp->wForwardRefPictureIndex = ff_dxva2_get_surface_index(ctx, &s->last_picture);
4747 else
4848 pp->wForwardRefPictureIndex = 0xffff;
49− if (s->pict_type == FF_B_TYPE)
49+ if (s->pict_type == AV_PICTURE_TYPE_B)
5050 pp->wBackwardRefPictureIndex = ff_dxva2_get_surface_index(ctx, &s->next_picture);
5151 else
5252 pp->wBackwardRefPictureIndex = 0xffff;
@@ -69,8 +69,8 @@ static void fill_picture_parameters(AVCodecContext *avctx, · 16 unmodified lines
6969 if (s->picture_structure & PICT_BOTTOM_FIELD)
7070 pp->bPicStructure |= 0x02;
7171 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;
7474 pp->bBidirectionalAveragingMode = (1 << 7) |
7575 ((ctx->cfg->ConfigIntraResidUnsigned != 0) << 6) |
7676 ((ctx->cfg->ConfigResidDiffAccelerator != 0) << 5) |
@@ -108,10 +108,10 @@ static void fill_picture_parameters(AVCodecContext *avctx, · 31 unmodified lines
108108 (v->interlace << 5) |
109109 (v->tfcntrflag << 4) |
110110 (v->finterpflag << 3) |
111− ((s->pict_type != FF_B_TYPE) << 2) |
111+ ((s->pict_type != AV_PICTURE_TYPE_B) << 2) |
112112 (v->psf << 1) |
113113 (v->extended_dmv );
114− if (s->pict_type != FF_I_TYPE)
114+ if (s->pict_type != AV_PICTURE_TYPE_I)
115115 pp->bPic4MVallowed = v->mv_mode == MV_PMODE_MIXED_MV ||
116116 (v->mv_mode == MV_PMODE_INTENSITY_COMP &&
117117 v->mv_mode2 == MV_PMODE_MIXED_MV);
libavcodec/eacmv.c+2−2
@@ -180,10 +180,10 @@ static int cmv_decode_frame(AVCodecContext *avctx, · 179 unmodified lines
180180 if ((buf[0]&1)) { // subtype
181181 cmv_decode_inter(s, buf+2, buf_end);
182182 s->frame.key_frame = 0;
183− s->frame.pict_type = FF_P_TYPE;
183+ s->frame.pict_type = AV_PICTURE_TYPE_P;
184184 }else{
185185 s->frame.key_frame = 1;
186− s->frame.pict_type = FF_I_TYPE;
186+ s->frame.pict_type = AV_PICTURE_TYPE_I;
187187 cmv_decode_intra(s, buf+2, buf_end);
188188 }
189189
libavcodec/eatgq.c+1−1
@@ -218,7 +218,7 @@ static int tgq_decode_frame(AVCodecContext *avctx, · 217 unmodified lines
218218
219219 if (!s->frame.data[0]) {
220220 s->frame.key_frame = 1;
221− s->frame.pict_type = FF_I_TYPE;
221+ s->frame.pict_type = AV_PICTURE_TYPE_I;
222222 s->frame.buffer_hints = FF_BUFFER_HINTS_VALID;
223223 if (avctx->get_buffer(avctx, &s->frame)) {
224224 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
libavcodec/eatgv.c+2−2
@@ -300,7 +300,7 @@ static int tgv_decode_frame(AVCodecContext *avctx, · 299 unmodified lines
300300
301301 if(chunk_type==kVGT_TAG) {
302302 s->frame.key_frame = 1;
303− s->frame.pict_type = FF_I_TYPE;
303+ s->frame.pict_type = AV_PICTURE_TYPE_I;
304304 if (unpack(buf, buf_end, s->frame.data[0], s->avctx->width, s->avctx->height)<0) {
305305 av_log(avctx, AV_LOG_WARNING, "truncated intra frame\n");
306306 return -1;
@@ -311,7 +311,7 @@ static int tgv_decode_frame(AVCodecContext *avctx, · 4 unmodified lines
311311 return buf_size;
312312 }
313313 s->frame.key_frame = 0;
314− s->frame.pict_type = FF_P_TYPE;
314+ s->frame.pict_type = AV_PICTURE_TYPE_P;
315315 if (tgv_decode_inter(s, buf, buf_end)<0) {
316316 av_log(avctx, AV_LOG_WARNING, "truncated inter frame\n");
317317 return -1;
libavcodec/error_resilience.c+4−4
@@ -639,7 +639,7 @@ static int is_intra_more_likely(MpegEncContext *s){ · 638 unmodified lines
639639 if(undamaged_count < 5) return 0; //almost all MBs damaged -> use temporal prediction
640640
641641 //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)
643643 return 1;
644644
645645 skip_amount= FFMAX(undamaged_count/50, 1); //check only upto 50 MBs
@@ -658,7 +658,7 @@ static int is_intra_more_likely(MpegEncContext *s){ · 12 unmodified lines
658658 j++;
659659 if((j%skip_amount) != 0) continue; //skip a few to speed things up
660660
661− if(s->pict_type==FF_I_TYPE){
661+ if(s->pict_type==AV_PICTURE_TYPE_I){
662662 uint8_t *mb_ptr = s->current_picture.data[0] + mb_x*16 + mb_y*16*s->linesize;
663663 uint8_t *last_mb_ptr= s->last_picture.data [0] + mb_x*16 + mb_y*16*s->linesize;
664664
@@ -977,7 +977,7 @@ void ff_er_frame_end(MpegEncContext *s){ · 312 unmodified lines
977977 }
978978
979979 /* guess MVs */
980− if(s->pict_type==FF_B_TYPE){
980+ if(s->pict_type==AV_PICTURE_TYPE_B){
981981 for(mb_y=0; mb_y<s->mb_height; mb_y++){
982982 for(mb_x=0; mb_x<s->mb_width; mb_x++){
983983 int xy= mb_x*2 + mb_y*2*s->b8_stride;
@@ -1114,7 +1114,7 @@ ec_clean: · 130 unmodified lines
11141114 const int mb_xy= s->mb_index2xy[i];
11151115 int error= s->error_status_table[mb_xy];
11161116
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))){
11181118 s->mbskip_table[mb_xy]=0;
11191119 }
11201120 s->mbintra_table[mb_xy]=1;
libavcodec/ffv1.c+2−2
@@ -1160,7 +1160,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, · 1159 unmodified lines
11601160 ff_build_rac_states(c, 0.05*(1LL<<32), 256-8);
11611161
11621162 *p = *pict;
1163− p->pict_type= FF_I_TYPE;
1163+ p->pict_type= AV_PICTURE_TYPE_I;
11641164
11651165 if(avctx->gop_size==0 || f->picture_number % avctx->gop_size == 0){
11661166 put_rac(c, &keystate, 1);
@@ -1723,7 +1723,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac · 556 unmodified lines
17231723 ff_build_rac_states(c, 0.05*(1LL<<32), 256-8);
17241724
17251725
1726− p->pict_type= FF_I_TYPE; //FIXME I vs. P
1726+ p->pict_type= AV_PICTURE_TYPE_I; //FIXME I vs. P
17271727 if(get_rac(c, &keystate)){
17281728 p->key_frame= 1;
17291729 if(read_header(f) < 0)
libavcodec/flashsvenc.c+2−2
@@ -260,12 +260,12 @@ static int flashsv_encode_frame(AVCodecContext *avctx, uint8_t *buf, · 259 unmodified lines
260260
261261 //mark the frame type so the muxer can mux it correctly
262262 if (I_frame) {
263− p->pict_type = FF_I_TYPE;
263+ p->pict_type = AV_PICTURE_TYPE_I;
264264 p->key_frame = 1;
265265 s->last_key_frame = avctx->frame_number;
266266 av_log(avctx, AV_LOG_DEBUG, "Inserting key frame at frame %d\n", avctx->frame_number);
267267 } else {
268− p->pict_type = FF_P_TYPE;
268+ p->pict_type = AV_PICTURE_TYPE_P;
269269 p->key_frame = 0;
270270 }
271271
libavcodec/flvdec.c+3−3
@@ -88,10 +88,10 @@ int ff_flv_decode_picture_header(MpegEncContext *s) · 87 unmodified lines
8888 s->width = width;
8989 s->height = height;
9090
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;
9393 if (s->dropable)
94− s->pict_type = FF_P_TYPE;
94+ s->pict_type = AV_PICTURE_TYPE_P;
9595
9696 skip_bits1(&s->gb); /* deblocking flag */
9797 s->chroma_qscale= s->qscale = get_bits(&s->gb, 5);
libavcodec/flvenc.c+1−1
@@ -53,7 +53,7 @@ void ff_flv_encode_picture_header(MpegEncContext * s, int picture_number) · 52 unmodified lines
5353 put_bits(&s->pb, 16, s->width);
5454 put_bits(&s->pb, 16, s->height);
5555 }
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 */
5757 put_bits(&s->pb, 1, 1); /* DeblockingFlag: on */
5858 put_bits(&s->pb, 5, s->qscale); /* Quantizer */
5959 put_bits(&s->pb, 1, 0); /* ExtraInformation */
libavcodec/fraps.c+10−10
@@ -180,10 +180,10 @@ static int decode_frame(AVCodecContext *avctx, · 179 unmodified lines
180180 return -1;
181181 }
182182 /* 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;
185185
186− if (f->pict_type == FF_I_TYPE) {
186+ if (f->pict_type == AV_PICTURE_TYPE_I) {
187187 buf32=(const uint32_t*)buf;
188188 for(y=0; y<avctx->height/2; y++){
189189 luma1=(uint32_t*)&f->data[0][ y*2*f->linesize[0] ];
@@ -223,10 +223,10 @@ static int decode_frame(AVCodecContext *avctx, · 33 unmodified lines
223223 return -1;
224224 }
225225 /* 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;
228228
229− if (f->pict_type == FF_I_TYPE) {
229+ if (f->pict_type == AV_PICTURE_TYPE_I) {
230230 for(y=0; y<avctx->height; y++)
231231 memcpy(&f->data[0][ (avctx->height-y)*f->linesize[0] ],
232232 &buf[y*avctx->width*3],
@@ -252,11 +252,11 @@ static int decode_frame(AVCodecContext *avctx, · 19 unmodified lines
252252 }
253253 /* skip frame */
254254 if(buf_size == 8) {
255− f->pict_type = FF_P_TYPE;
255+ f->pict_type = AV_PICTURE_TYPE_P;
256256 f->key_frame = 0;
257257 break;
258258 }
259− f->pict_type = FF_I_TYPE;
259+ f->pict_type = AV_PICTURE_TYPE_I;
260260 f->key_frame = 1;
261261 if ((AV_RL32(buf) != FPS_TAG)||(buf_size < (planes*1024 + 24))) {
262262 av_log(avctx, AV_LOG_ERROR, "Fraps: error in data stream\n");
@@ -297,11 +297,11 @@ static int decode_frame(AVCodecContext *avctx, · 34 unmodified lines
297297 }
298298 /* skip frame */
299299 if(buf_size == 8) {
300− f->pict_type = FF_P_TYPE;
300+ f->pict_type = AV_PICTURE_TYPE_P;
301301 f->key_frame = 0;
302302 break;
303303 }
304− f->pict_type = FF_I_TYPE;
304+ f->pict_type = AV_PICTURE_TYPE_I;
305305 f->key_frame = 1;
306306 if ((AV_RL32(buf) != FPS_TAG)||(buf_size < (planes*1024 + 24))) {
307307 av_log(avctx, AV_LOG_ERROR, "Fraps: error in data stream\n");
libavcodec/frwu.c+1−1
@@ -61,7 +61,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 60 unmodified lines
6161 if (avctx->get_buffer(avctx, pic) < 0)
6262 return -1;
6363
64− pic->pict_type = FF_I_TYPE;
64+ pic->pict_type = AV_PICTURE_TYPE_I;
6565 pic->key_frame = 1;
6666 pic->interlaced_frame = 1;
6767 pic->top_field_first = 1;
libavcodec/gif.c+1−1
@@ -150,7 +150,7 @@ static int gif_encode_frame(AVCodecContext *avctx, unsigned char *outbuf, int bu · 149 unmodified lines
150150 uint8_t *end = outbuf + buf_size;
151151
152152 *p = *pict;
153− p->pict_type = FF_I_TYPE;
153+ p->pict_type = AV_PICTURE_TYPE_I;
154154 p->key_frame = 1;
155155 gif_image_write_header(avctx, &outbuf_ptr, (uint32_t *)pict->data[1]);
156156 gif_image_write_image(avctx, &outbuf_ptr, end, pict->data[0], pict->linesize[0]);
libavcodec/h261dec.c+5−5
@@ -497,9 +497,9 @@ static int h261_decode_picture_header(H261Context *h){ · 496 unmodified lines
497497 skip_bits(&s->gb, 8);
498498 }
499499
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
501501 // 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;
503503
504504 h->gob_number = 0;
505505 return 0;
@@ -597,10 +597,10 @@ retry: · 91 unmodified lines
597597
598598 // for skipping the frame
599599 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;
601601
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)
604604 || avctx->skip_frame >= AVDISCARD_ALL)
605605 return get_consumed_bytes(s, buf_size);
606606
libavcodec/h263.c+1−1
@@ -148,7 +148,7 @@ void ff_h263_loop_filter(MpegEncContext * s){ · 147 unmodified lines
148148 uint8_t *dest_cb= s->dest[1];
149149 uint8_t *dest_cr= s->dest[2];
150150
151−// if(s->pict_type==FF_B_TYPE && !s->readable) return;
151+// if(s->pict_type==AV_PICTURE_TYPE_B && !s->readable) return;
152152
153153 /*
154154 Diag Top
libavcodec/h263dec.c+11−11
@@ -218,7 +218,7 @@ static int decode_slice(MpegEncContext *s){ · 217 unmodified lines
218218 //printf("%d %d %06X\n", ret, get_bits_count(&s->gb), show_bits(&s->gb, 24));
219219 ret= s->decode_mb(s, s->block);
220220
221− if (s->pict_type!=FF_B_TYPE)
221+ if (s->pict_type!=AV_PICTURE_TYPE_B)
222222 ff_h263_update_motion_val(s);
223223
224224 if(ret<0){
@@ -310,7 +310,7 @@ static int decode_slice(MpegEncContext *s){ · 85 unmodified lines
310310 int max_extra=7;
311311
312312 /* 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)
314314 max_extra+= 17;
315315
316316 /* buggy padding but the frame should still end approximately at the bitstream end */
@@ -600,26 +600,26 @@ retry: · 283 unmodified lines
600600
601601 // for skipping the frame
602602 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;
604604
605605 /* 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)
609609 || avctx->skip_frame >= AVDISCARD_ALL)
610610 return get_consumed_bytes(s, buf_size);
611611
612612 if(s->next_p_frame_damaged){
613− if(s->pict_type==FF_B_TYPE)
613+ if(s->pict_type==AV_PICTURE_TYPE_B)
614614 return get_consumed_bytes(s, buf_size);
615615 else
616616 s->next_p_frame_damaged=0;
617617 }
618618
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){
620620 s->me.qpel_put= s->dsp.put_2tap_qpel_pixels_tab;
621621 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){
623623 s->me.qpel_put= s->dsp.put_qpel_pixels_tab;
624624 s->me.qpel_avg= s->dsp.avg_qpel_pixels_tab;
625625 }else{
@@ -672,7 +672,7 @@ retry: · 46 unmodified lines
672672 decode_slice(s);
673673 }
674674
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)
676676 if(!CONFIG_MSMPEG4_DECODER || msmpeg4_decode_ext_header(s, buf_size) < 0){
677677 s->error_status_table[s->mb_num-1]= AC_ERROR|DC_ERROR|MV_ERROR;
678678 }
@@ -722,7 +722,7 @@ intrax8_decoded: · 43 unmodified lines
722722
723723 assert(s->current_picture.pict_type == s->current_picture_ptr->pict_type);
724724 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) {
726726 *pict= *(AVFrame*)s->current_picture_ptr;
727727 } else if (s->last_picture_ptr != NULL) {
728728 *pict= *(AVFrame*)s->last_picture_ptr;
libavcodec/h264.c+30−30
@@ -918,7 +918,7 @@ static void decode_postinit(H264Context *h){ · 917 unmodified lines
918918 else if((out_of_order && pics-1 == s->avctx->has_b_frames && s->avctx->has_b_frames < MAX_DELAYED_PIC_COUNT)
919919 || (s->low_delay &&
920920 ((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)))
922922 {
923923 s->low_delay = 0;
924924 s->avctx->has_b_frames++;
@@ -1449,7 +1449,7 @@ static int pred_weight_table(H264Context *h){ · 524 unmodified lines
14491449 }
14501450 }
14511451 }
1452− if(h->slice_type_nos != FF_B_TYPE) break;
1452+ if(h->slice_type_nos != AV_PICTURE_TYPE_B) break;
14531453 }
14541454 h->use_weight= h->use_weight || h->use_weight_chroma;
14551455 return 0;
@@ -1817,7 +1817,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0){ · 361 unmodified lines
18171817 h->slice_type_fixed=0;
18181818
18191819 slice_type= golomb_to_pict_type[ slice_type ];
1820− if (slice_type == FF_I_TYPE
1820+ if (slice_type == AV_PICTURE_TYPE_I
18211821 || (h0->current_slice != 0 && slice_type == h0->last_slice_type) ) {
18221822 default_ref_list_done = 1;
18231823 }
@@ -2110,15 +2110,15 @@ static int decode_slice_header(H264Context *h, H264Context *h0){ · 286 unmodified lines
21102110 h->ref_count[0]= h->pps.ref_count[0];
21112111 h->ref_count[1]= h->pps.ref_count[1];
21122112
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){
21152115 h->direct_spatial_mv_pred= get_bits1(&s->gb);
21162116 }
21172117 num_ref_idx_active_override_flag= get_bits1(&s->gb);
21182118
21192119 if(num_ref_idx_active_override_flag){
21202120 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)
21222122 h->ref_count[1]= get_ue_golomb(&s->gb) + 1;
21232123
21242124 if(h->ref_count[0]-1 > 32-1 || h->ref_count[1]-1 > 32-1){
@@ -2127,7 +2127,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0){ · 2 unmodified lines
21272127 return -1;
21282128 }
21292129 }
2130− if(h->slice_type_nos == FF_B_TYPE)
2130+ if(h->slice_type_nos == AV_PICTURE_TYPE_B)
21312131 h->list_count= 2;
21322132 else
21332133 h->list_count= 1;
@@ -2138,22 +2138,22 @@ static int decode_slice_header(H264Context *h, H264Context *h0){ · 4 unmodified lines
21382138 ff_h264_fill_default_ref_list(h);
21392139 }
21402140
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)
21422142 return -1;
21432143
2144− if(h->slice_type_nos!=FF_I_TYPE){
2144+ if(h->slice_type_nos!=AV_PICTURE_TYPE_I){
21452145 s->last_picture_ptr= &h->ref_list[0][0];
21462146 ff_copy_picture(&s->last_picture, s->last_picture_ptr);
21472147 }
2148− if(h->slice_type_nos==FF_B_TYPE){
2148+ if(h->slice_type_nos==AV_PICTURE_TYPE_B){
21492149 s->next_picture_ptr= &h->ref_list[1][0];
21502150 ff_copy_picture(&s->next_picture, s->next_picture_ptr);
21512151 }
21522152
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 ) )
21552155 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){
21572157 implicit_weight_table(h, -1);
21582158 }else {
21592159 h->use_weight = 0;
@@ -2169,17 +2169,17 @@ static int decode_slice_header(H264Context *h, H264Context *h0){ · 9 unmodified lines
21692169 if(FRAME_MBAFF){
21702170 ff_h264_fill_mbaff_ref_list(h);
21712171
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){
21732173 implicit_weight_table(h, 0);
21742174 implicit_weight_table(h, 1);
21752175 }
21762176 }
21772177
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)
21792179 ff_h264_direct_dist_scale_factor(h);
21802180 ff_h264_direct_ref_list_init(h);
21812181
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 ){
21832183 tmp = get_ue_golomb_31(&s->gb);
21842184 if(tmp > 2){
21852185 av_log(s->avctx, AV_LOG_ERROR, "cabac_init_idc overflow\n");
@@ -2198,10 +2198,10 @@ static int decode_slice_header(H264Context *h, H264Context *h0){ · 12 unmodified lines
21982198 h->chroma_qp[0] = get_chroma_qp(h, 0, s->qscale);
21992199 h->chroma_qp[1] = get_chroma_qp(h, 1, s->qscale);
22002200 //FIXME qscale / qp ... stuff
2201− if(h->slice_type == FF_SP_TYPE){
2201+ if(h->slice_type == AV_PICTURE_TYPE_SP){
22022202 get_bits1(&s->gb); /* sp_for_switch_flag */
22032203 }
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){
22052205 get_se_golomb(&s->gb); /* slice_qs_delta */
22062206 }
22072207
@@ -2230,8 +2230,8 @@ static int decode_slice_header(H264Context *h, H264Context *h0){ · 22 unmodified lines
22302230 }
22312231
22322232 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)
22352235 ||(s->avctx->skip_loop_filter >= AVDISCARD_NONREF && h->nal_ref_idc == 0))
22362236 h->deblocking_filter= 0;
22372237
@@ -2315,7 +2315,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0){ · 77 unmodified lines
23152315 h->deblocking_filter, h->slice_alpha_c0_offset/2-26, h->slice_beta_offset/2-26,
23162316 h->use_weight,
23172317 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") : ""
23192319 );
23202320 }
23212321
@@ -2325,11 +2325,11 @@ static int decode_slice_header(H264Context *h, H264Context *h0){ · 3 unmodified lines
23252325 int ff_h264_get_slice_type(const H264Context *h)
23262326 {
23272327 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;
23332333 default: return -1;
23342334 }
23352335 }
@@ -3000,8 +3000,8 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){ · 664 unmodified lines
30003000
30013001 if(hx->redundant_pic_count==0
30023002 && (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)
30053005 && avctx->skip_frame < AVDISCARD_ALL){
30063006 if(avctx->hwaccel) {
30073007 if (avctx->hwaccel->decode_slice(avctx, &buf[buf_index - consumed], consumed) < 0)
@@ -3037,8 +3037,8 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){ · 29 unmodified lines
30373037 if(hx->redundant_pic_count==0 && hx->intra_gb_ptr && hx->s.data_partitioning
30383038 && s->context_initialized
30393039 && (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)
30423042 && avctx->skip_frame < AVDISCARD_ALL)
30433043 context_count++;
30443044 break;
libavcodec/h264.h+3−3
@@ -1118,7 +1118,7 @@ static void fill_decode_caches(H264Context *h, int mb_type){ · 1117 unmodified lines
11181118 }
11191119 AV_ZERO16(h->mvd_cache [list][scan8[4 ]]);
11201120 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){
11221122 fill_rectangle(&h->direct_cache[scan8[0]], 4, 4, 8, MB_TYPE_16x16>>1, 1);
11231123
11241124 if(IS_DIRECT(top_type)){
@@ -1255,7 +1255,7 @@ static inline void write_back_motion(H264Context *h, int mb_type){ · 130 unmodified lines
12551255 }
12561256 }
12571257
1258− if(h->slice_type_nos == FF_B_TYPE && CABAC){
1258+ if(h->slice_type_nos == AV_PICTURE_TYPE_B && CABAC){
12591259 if(IS_8X8(mb_type)){
12601260 uint8_t *direct_table = &h->direct_table[4*h->mb_xy];
12611261 direct_table[1] = h->sub_mb_type[1]>>1;
@@ -1286,7 +1286,7 @@ static void av_unused decode_mb_skip(H264Context *h){ · 24 unmodified lines
12861286 if(MB_FIELD)
12871287 mb_type|= MB_TYPE_INTERLACED;
12881288
1289− if( h->slice_type_nos == FF_B_TYPE )
1289+ if( h->slice_type_nos == AV_PICTURE_TYPE_B )
12901290 {
12911291 // just for fill_caches. pred_direct_motion will set the real mb_type
12921292 mb_type|= MB_TYPE_L0L1|MB_TYPE_DIRECT2|MB_TYPE_SKIP;
libavcodec/h264_cabac.c+10−10
@@ -691,7 +691,7 @@ void ff_h264_init_cabac_states(H264Context *h) { · 690 unmodified lines
691691 const int8_t (*tab)[2];
692692 const int slice_qp = av_clip(s->qscale - 6*(h->sps.bit_depth_luma-8), 0, 51);
693693
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;
695695 else tab = cabac_context_init_PB[h->cabac_init_idc];
696696
697697 /* calculate pre-state */
@@ -779,7 +779,7 @@ static int decode_cabac_mb_skip( H264Context *h, int mb_x, int mb_y ) { · 81 unmodified lines
779779 if( h->slice_table[mbb_xy] == h->slice_num && !IS_SKIP( s->current_picture.mb_type[mbb_xy] ))
780780 ctx++;
781781
782− if( h->slice_type_nos == FF_B_TYPE )
782+ if( h->slice_type_nos == AV_PICTURE_TYPE_B )
783783 ctx += 13;
784784 return get_cabac_noinline( &h->cabac, &h->cabac_state[11+ctx] );
785785 }
@@ -888,7 +888,7 @@ static int decode_cabac_mb_ref( H264Context *h, int list, int n ) { · 102 unmodified lines
888888 int ref = 0;
889889 int ctx = 0;
890890
891− if( h->slice_type_nos == FF_B_TYPE) {
891+ if( h->slice_type_nos == AV_PICTURE_TYPE_B) {
892892 if( refa > 0 && !(h->direct_cache[scan8[n] - 1]&(MB_TYPE_DIRECT2>>1)) )
893893 ctx++;
894894 if( refb > 0 && !(h->direct_cache[scan8[n] - 8]&(MB_TYPE_DIRECT2>>1)) )
@@ -1208,7 +1208,7 @@ int ff_h264_decode_mb_cabac(H264Context *h) { · 313 unmodified lines
12081208 mb_xy = h->mb_xy = s->mb_x + s->mb_y*s->mb_stride;
12091209
12101210 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 ) {
12121212 int skip;
12131213 /* a skipped mb needs the aff flag from the following mb */
12141214 if( FRAME_MBAFF && (s->mb_y&1)==1 && h->prev_mb_skipped )
@@ -1244,9 +1244,9 @@ int ff_h264_decode_mb_cabac(H264Context *h) { · 29 unmodified lines
12441244
12451245 fill_decode_neighbors(h, -(MB_FIELD));
12461246
1247− if( h->slice_type_nos == FF_B_TYPE ) {
1247+ if( h->slice_type_nos == AV_PICTURE_TYPE_B ) {
12481248 int ctx = 0;
1249− assert(h->slice_type_nos == FF_B_TYPE);
1249+ assert(h->slice_type_nos == AV_PICTURE_TYPE_B);
12501250
12511251 if( !IS_DIRECT( h->left_type[0]-1 ) )
12521252 ctx++;
@@ -1279,7 +1279,7 @@ int ff_h264_decode_mb_cabac(H264Context *h) { · 26 unmodified lines
12791279 }
12801280 partition_count= b_mb_type_info[mb_type].partition_count;
12811281 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 ) {
12831283 if( get_cabac_noinline( &h->cabac, &h->cabac_state[14] ) == 0 ) {
12841284 /* P-type */
12851285 if( get_cabac_noinline( &h->cabac, &h->cabac_state[15] ) == 0 ) {
@@ -1297,9 +1297,9 @@ int ff_h264_decode_mb_cabac(H264Context *h) { · 11 unmodified lines
12971297 }
12981298 } else {
12991299 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)
13011301 mb_type--;
1302− assert(h->slice_type_nos == FF_I_TYPE);
1302+ assert(h->slice_type_nos == AV_PICTURE_TYPE_I);
13031303 decode_intra_mb:
13041304 partition_count = 0;
13051305 cbp= i_mb_type_info[mb_type].cbp;
@@ -1388,7 +1388,7 @@ decode_intra_mb: · 82 unmodified lines
13881388 } else if( partition_count == 4 ) {
13891389 int i, j, sub_partition_count[4], list, ref[2][4];
13901390
1391− if( h->slice_type_nos == FF_B_TYPE ) {
1391+ if( h->slice_type_nos == AV_PICTURE_TYPE_B ) {
13921392 for( i = 0; i < 4; i++ ) {
13931393 h->sub_mb_type[i] = decode_cabac_b_mb_sub_type( h );
13941394 sub_partition_count[i]= b_sub_mb_type_info[ h->sub_mb_type[i] ].partition_count;
libavcodec/h264_cavlc.c+7−7
@@ -548,7 +548,7 @@ int ff_h264_decode_mb_cavlc(H264Context *h){ · 547 unmodified lines
548548 tprintf(s->avctx, "pic:%d mb:%d/%d\n", h->frame_num, s->mb_x, s->mb_y);
549549 cbp = 0; /* avoid warning. FIXME: find a solution without slowing
550550 down the code */
551− if(h->slice_type_nos != FF_I_TYPE){
551+ if(h->slice_type_nos != AV_PICTURE_TYPE_I){
552552 if(s->mb_skip_run==-1)
553553 s->mb_skip_run= get_ue_golomb(&s->gb);
554554
@@ -569,7 +569,7 @@ int ff_h264_decode_mb_cavlc(H264Context *h){ · 14 unmodified lines
569569 h->prev_mb_skipped= 0;
570570
571571 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){
573573 if(mb_type < 23){
574574 partition_count= b_mb_type_info[mb_type].partition_count;
575575 mb_type= b_mb_type_info[mb_type].type;
@@ -577,7 +577,7 @@ int ff_h264_decode_mb_cavlc(H264Context *h){ · 1 unmodified line
577577 mb_type -= 23;
578578 goto decode_intra_mb;
579579 }
580− }else if(h->slice_type_nos == FF_P_TYPE){
580+ }else if(h->slice_type_nos == AV_PICTURE_TYPE_P){
581581 if(mb_type < 5){
582582 partition_count= p_mb_type_info[mb_type].partition_count;
583583 mb_type= p_mb_type_info[mb_type].type;
@@ -586,8 +586,8 @@ int ff_h264_decode_mb_cavlc(H264Context *h){ · 2 unmodified lines
586586 goto decode_intra_mb;
587587 }
588588 }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)
591591 mb_type--;
592592 decode_intra_mb:
593593 if(mb_type > 25){
@@ -678,7 +678,7 @@ decode_intra_mb: · 84 unmodified lines
678678 }else if(partition_count==4){
679679 int i, j, sub_partition_count[4], list, ref[2][4];
680680
681− if(h->slice_type_nos == FF_B_TYPE){
681+ if(h->slice_type_nos == AV_PICTURE_TYPE_B){
682682 for(i=0; i<4; i++){
683683 h->sub_mb_type[i]= get_ue_golomb_31(&s->gb);
684684 if(h->sub_mb_type[i] >=13){
@@ -696,7 +696,7 @@ decode_intra_mb: · 11 unmodified lines
696696 h->ref_cache[1][scan8[12]] = PART_NOT_AVAILABLE;
697697 }
698698 }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 ?
700700 for(i=0; i<4; i++){
701701 h->sub_mb_type[i]= get_ue_golomb_31(&s->gb);
702702 if(h->sub_mb_type[i] >=4){
libavcodec/h264_direct.c+1−1
@@ -130,7 +130,7 @@ void ff_h264_direct_ref_list_init(H264Context * const h){ · 129 unmodified lines
130130 h->col_fieldoff= 2*(h->ref_list[1][0].reference) - 3;
131131 }
132132
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)
134134 return;
135135
136136 for(list=0; list<2; list++){
libavcodec/h264_parser.c+1−1
@@ -117,7 +117,7 @@ static inline int parse_nal_units(AVCodecParserContext *s, · 116 unmodified lines
117117 const uint8_t *ptr;
118118
119119 /* set some sane default values */
120− s->pict_type = FF_I_TYPE;
120+ s->pict_type = AV_PICTURE_TYPE_I;
121121 s->key_frame = 0;
122122
123123 h->s.avctx= avctx;
libavcodec/h264_refs.c+2−2
@@ -110,7 +110,7 @@ int ff_h264_fill_default_ref_list(H264Context *h){ · 109 unmodified lines
110110 MpegEncContext * const s = &h->s;
111111 int i, len;
112112
113− if(h->slice_type_nos==FF_B_TYPE){
113+ if(h->slice_type_nos==AV_PICTURE_TYPE_B){
114114 Picture *sorted[32];
115115 int cur_poc, list;
116116 int lens[2];
@@ -149,7 +149,7 @@ int ff_h264_fill_default_ref_list(H264Context *h){ · 32 unmodified lines
149149 for (i=0; i<h->ref_count[0]; i++) {
150150 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]);
151151 }
152− if(h->slice_type_nos==FF_B_TYPE){
152+ if(h->slice_type_nos==AV_PICTURE_TYPE_B){
153153 for (i=0; i<h->ref_count[1]; i++) {
154154 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]);
155155 }
libavcodec/h264data.h+1−1
@@ -36,7 +36,7 @@ · 35 unmodified lines
3636
3737
3838 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};
4040
4141 static const uint8_t golomb_to_intra4x4_cbp[48]={
4242 47, 31, 15, 0, 23, 27, 29, 30, 7, 11, 13, 14, 39, 43, 45, 46,
libavcodec/huffyuv.c+1−1
@@ -1238,7 +1238,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, · 1237 unmodified lines
12381238 int i, j, size=0;
12391239
12401240 *p = *pict;
1241− p->pict_type= FF_I_TYPE;
1241+ p->pict_type= AV_PICTURE_TYPE_I;
12421242 p->key_frame= 1;
12431243
12441244 if(s->context){
libavcodec/intelh263dec.c+1−1
@@ -52,7 +52,7 @@ int ff_intel_h263_decode_picture_header(MpegEncContext *s) · 51 unmodified lines
5252 }
5353 s->h263_plus = 0;
5454
55− s->pict_type = FF_I_TYPE + get_bits1(&s->gb);
55+ s->pict_type = AV_PICTURE_TYPE_I + get_bits1(&s->gb);
5656
5757 s->unrestricted_mv = get_bits1(&s->gb);
5858 s->h263_long_vectors = s->unrestricted_mv;
libavcodec/ituh263dec.c+12−12
@@ -347,7 +347,7 @@ static void preview_obmc(MpegEncContext *s){ · 346 unmodified lines
347347 s->block_index[i]+= 1;
348348 s->mb_x++;
349349
350− assert(s->pict_type == FF_P_TYPE);
350+ assert(s->pict_type == AV_PICTURE_TYPE_P);
351351
352352 do{
353353 if (get_bits1(&s->gb)) {
@@ -460,7 +460,7 @@ static int h263_decode_block(MpegEncContext * s, DCTELEM * block, · 106 unmodified lines
460460 /* DC coef */
461461 if(s->codec_id == CODEC_ID_RV10){
462462 #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) {
464464 int component, diff;
465465 component = (n <= 3 ? 0 : n - 4 + 1);
466466 level = s->last_dc[component];
@@ -608,7 +608,7 @@ int ff_h263_decode_mb(MpegEncContext *s, · 141 unmodified lines
608608
609609 assert(!s->h263_pred);
610610
611− if (s->pict_type == FF_P_TYPE) {
611+ if (s->pict_type == AV_PICTURE_TYPE_P) {
612612 do{
613613 if (get_bits1(&s->gb)) {
614614 /* skip mb */
@@ -700,7 +700,7 @@ int ff_h263_decode_mb(MpegEncContext *s, · 85 unmodified lines
700700 mot_val[1] = my;
701701 }
702702 }
703− } else if(s->pict_type==FF_B_TYPE) {
703+ } else if(s->pict_type==AV_PICTURE_TYPE_B) {
704704 int mb_type;
705705 const int stride= s->b8_stride;
706706 int16_t *mot_val0 = s->current_picture.motion_val[0][ 2*(s->mb_x + s->mb_y*stride) ];
@@ -843,7 +843,7 @@ intra: · 136 unmodified lines
843843 if(s->pb_frame && h263_skip_b_part(s, cbpb) < 0)
844844 return -1;
845845 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)
847847 preview_obmc(s);
848848 }
849849 end:
@@ -921,7 +921,7 @@ int h263_decode_picture_header(MpegEncContext *s) · 71 unmodified lines
921921 if (!width)
922922 return -1;
923923
924− s->pict_type = FF_I_TYPE + get_bits1(&s->gb);
924+ s->pict_type = AV_PICTURE_TYPE_I + get_bits1(&s->gb);
925925
926926 s->h263_long_vectors = get_bits1(&s->gb);
927927
@@ -985,11 +985,11 @@ int h263_decode_picture_header(MpegEncContext *s) · 57 unmodified lines
985985 /* MPPTYPE */
986986 s->pict_type = get_bits(&s->gb, 3);
987987 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
993993 default:
994994 return -1;
995995 }
@@ -1112,7 +1112,7 @@ int h263_decode_picture_header(MpegEncContext *s) · 116 unmodified lines
11121112 }
11131113
11141114 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")){
11161116 int i,j;
11171117 for(i=0; i<85; i++) av_log(s->avctx, AV_LOG_DEBUG, "%d", get_bits1(&s->gb));
11181118 av_log(s->avctx, AV_LOG_DEBUG, "\n");
libavcodec/ituh263enc.c+5−5
@@ -145,7 +145,7 @@ void h263_encode_picture_header(MpegEncContext * s, int picture_number) · 144 unmodified lines
145145 if (!s->h263_plus) {
146146 /* H.263v1 */
147147 put_bits(&s->pb, 3, format);
148− put_bits(&s->pb, 1, (s->pict_type == FF_P_TYPE));
148+ put_bits(&s->pb, 1, (s->pict_type == AV_PICTURE_TYPE_P));
149149 /* By now UMV IS DISABLED ON H.263v1, since the restrictions
150150 of H.263v1 UMV implies to check the predicted MV after
151151 calculation of the current MB to see if we're on the limits */
@@ -181,7 +181,7 @@ void h263_encode_picture_header(MpegEncContext * s, int picture_number) · 29 unmodified lines
181181 put_bits(&s->pb,1,1); /* "1" to prevent start code emulation */
182182 put_bits(&s->pb,3,0); /* Reserved */
183183
184− put_bits(&s->pb, 3, s->pict_type == FF_P_TYPE);
184+ put_bits(&s->pb, 3, s->pict_type == AV_PICTURE_TYPE_P);
185185
186186 put_bits(&s->pb,1,0); /* Reference Picture Resampling: off */
187187 put_bits(&s->pb,1,0); /* Reduced-Resolution Update: off */
@@ -260,12 +260,12 @@ void h263_encode_gob_header(MpegEncContext * s, int mb_line) · 72 unmodified lines
260260 put_bits(&s->pb, 1, 1);
261261 put_bits(&s->pb, 5, s->qscale); /* GQUANT */
262262 put_bits(&s->pb, 1, 1);
263− put_bits(&s->pb, 2, s->pict_type == FF_I_TYPE); /* GFID */
263+ put_bits(&s->pb, 2, s->pict_type == AV_PICTURE_TYPE_I); /* GFID */
264264 }else{
265265 int gob_number= mb_line / s->gob_index;
266266
267267 put_bits(&s->pb, 5, gob_number); /* GN */
268− put_bits(&s->pb, 2, s->pict_type == FF_I_TYPE); /* GFID */
268+ put_bits(&s->pb, 2, s->pict_type == AV_PICTURE_TYPE_I); /* GFID */
269269 put_bits(&s->pb, 5, s->qscale); /* GQUANT */
270270 }
271271 }
@@ -607,7 +607,7 @@ void h263_encode_mb(MpegEncContext * s, · 335 unmodified lines
607607 }
608608
609609 cbpc = cbp & 3;
610− if (s->pict_type == FF_I_TYPE) {
610+ if (s->pict_type == AV_PICTURE_TYPE_I) {
611611 if(s->dquant) cbpc+=4;
612612 put_bits(&s->pb,
613613 ff_h263_intra_MCBPC_bits[cbpc],
libavcodec/jpeglsenc.c+1−1
@@ -245,7 +245,7 @@ static int encode_picture_ls(AVCodecContext *avctx, unsigned char *buf, int buf_ · 244 unmodified lines
245245 init_put_bits(&pb2, buf2, buf_size);
246246
247247 *p = *pict;
248− p->pict_type= FF_I_TYPE;
248+ p->pict_type= AV_PICTURE_TYPE_I;
249249 p->key_frame= 1;
250250
251251 if(avctx->pix_fmt == PIX_FMT_GRAY8 || avctx->pix_fmt == PIX_FMT_GRAY16)
libavcodec/jvdec.c+1−1
@@ -180,7 +180,7 @@ static int decode_frame(AVCodecContext *avctx, · 179 unmodified lines
180180
181181 if (video_size) {
182182 s->frame.key_frame = 1;
183− s->frame.pict_type = FF_I_TYPE;
183+ s->frame.pict_type = AV_PICTURE_TYPE_I;
184184 s->frame.palette_has_changed = s->palette_has_changed;
185185 s->palette_has_changed = 0;
186186 memcpy(s->frame.data[1], s->palette, AVPALETTE_SIZE);
libavcodec/kmvc.c+2−2
@@ -259,10 +259,10 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *data_size, AVPa · 258 unmodified lines
259259
260260 if (header & KMVC_KEYFRAME) {
261261 ctx->pic.key_frame = 1;
262− ctx->pic.pict_type = FF_I_TYPE;
262+ ctx->pic.pict_type = AV_PICTURE_TYPE_I;
263263 } else {
264264 ctx->pic.key_frame = 0;
265− ctx->pic.pict_type = FF_P_TYPE;
265+ ctx->pic.pict_type = AV_PICTURE_TYPE_P;
266266 }
267267
268268 if (header & KMVC_PALETTE) {
libavcodec/lclenc.c+1−1
@@ -76,7 +76,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, · 75 unmodified lines
7676 int zret; // Zlib return code
7777
7878 *p = *pict;
79− p->pict_type= FF_I_TYPE;
79+ p->pict_type= AV_PICTURE_TYPE_I;
8080 p->key_frame= 1;
8181
8282 if(avctx->pix_fmt != PIX_FMT_BGR24){
libavcodec/libvpxenc.c+2−2
@@ -358,9 +358,9 @@ static int storeframe(AVCodecContext *avctx, struct FrameListData *cx_frame, · 357 unmodified lines
358358 coded_frame->key_frame = !!(cx_frame->flags & VPX_FRAME_IS_KEY);
359359
360360 if (coded_frame->key_frame)
361− coded_frame->pict_type = FF_I_TYPE;
361+ coded_frame->pict_type = AV_PICTURE_TYPE_I;
362362 else
363− coded_frame->pict_type = FF_P_TYPE;
363+ coded_frame->pict_type = AV_PICTURE_TYPE_P;
364364 } else {
365365 av_log(avctx, AV_LOG_ERROR,
366366 "Compressed frame larger than storage provided! (%zu/%d)\n",
libavcodec/libx264.c+6−6
@@ -110,9 +110,9 @@ static int X264_frame(AVCodecContext *ctx, uint8_t *buf, · 109 unmodified lines
110110
111111 x4->pic.i_pts = frame->pts;
112112 x4->pic.i_type =
113− frame->pict_type == FF_I_TYPE ? X264_TYPE_KEYFRAME :
114− frame->pict_type == FF_P_TYPE ? X264_TYPE_P :
115− frame->pict_type == FF_B_TYPE ? X264_TYPE_B :
113+ frame->pict_type == AV_PICTURE_TYPE_I ? X264_TYPE_KEYFRAME :
114+ frame->pict_type == AV_PICTURE_TYPE_P ? X264_TYPE_P :
115+ frame->pict_type == AV_PICTURE_TYPE_B ? X264_TYPE_B :
116116 X264_TYPE_AUTO;
117117 if (x4->params.b_tff != frame->top_field_first) {
118118 x4->params.b_tff = frame->top_field_first;
@@ -135,14 +135,14 @@ static int X264_frame(AVCodecContext *ctx, uint8_t *buf, · 16 unmodified lines
135135 switch (pic_out.i_type) {
136136 case X264_TYPE_IDR:
137137 case X264_TYPE_I:
138− x4->out_pic.pict_type = FF_I_TYPE;
138+ x4->out_pic.pict_type = AV_PICTURE_TYPE_I;
139139 break;
140140 case X264_TYPE_P:
141− x4->out_pic.pict_type = FF_P_TYPE;
141+ x4->out_pic.pict_type = AV_PICTURE_TYPE_P;
142142 break;
143143 case X264_TYPE_B:
144144 case X264_TYPE_BREF:
145− x4->out_pic.pict_type = FF_B_TYPE;
145+ x4->out_pic.pict_type = AV_PICTURE_TYPE_B;
146146 break;
147147 }
148148
libavcodec/libxavs.c+3−3
@@ -138,14 +138,14 @@ static int XAVS_frame(AVCodecContext *ctx, uint8_t *buf, · 137 unmodified lines
138138 switch (pic_out.i_type) {
139139 case XAVS_TYPE_IDR:
140140 case XAVS_TYPE_I:
141− x4->out_pic.pict_type = FF_I_TYPE;
141+ x4->out_pic.pict_type = AV_PICTURE_TYPE_I;
142142 break;
143143 case XAVS_TYPE_P:
144− x4->out_pic.pict_type = FF_P_TYPE;
144+ x4->out_pic.pict_type = AV_PICTURE_TYPE_P;
145145 break;
146146 case XAVS_TYPE_B:
147147 case XAVS_TYPE_BREF:
148− x4->out_pic.pict_type = FF_B_TYPE;
148+ x4->out_pic.pict_type = AV_PICTURE_TYPE_B;
149149 break;
150150 }
151151
libavcodec/libxvid_rc.c+1−1
@@ -134,7 +134,7 @@ float ff_xvid_rate_estimate_qscale(MpegEncContext *s, int dry_run){ · 133 unmodified lines
134134 if(!dry_run)
135135 s->rc_context.dry_run_qscale= 0;
136136
137− if(s->pict_type == FF_B_TYPE) //FIXME this is not exactly identical to xvid
137+ if(s->pict_type == AV_PICTURE_TYPE_B) //FIXME this is not exactly identical to xvid
138138 return xvid_plg_data.quant * FF_QP2LAMBDA * s->avctx->b_quant_factor + s->avctx->b_quant_offset;
139139 else
140140 return xvid_plg_data.quant * FF_QP2LAMBDA;
libavcodec/libxvidff.c+7−7
@@ -450,9 +450,9 @@ static int xvid_encode_frame(AVCodecContext *avctx, · 449 unmodified lines
450450 xvid_enc_frame.vol_flags = x->vol_flags;
451451 xvid_enc_frame.motion = x->me_flags;
452452 xvid_enc_frame.type =
453− picture->pict_type == FF_I_TYPE ? XVID_TYPE_IVOP :
454− picture->pict_type == FF_P_TYPE ? XVID_TYPE_PVOP :
455− picture->pict_type == FF_B_TYPE ? XVID_TYPE_BVOP :
453+ picture->pict_type == AV_PICTURE_TYPE_I ? XVID_TYPE_IVOP :
454+ picture->pict_type == AV_PICTURE_TYPE_P ? XVID_TYPE_PVOP :
455+ picture->pict_type == AV_PICTURE_TYPE_B ? XVID_TYPE_BVOP :
456456 XVID_TYPE_AUTO;
457457
458458 /* Pixel aspect ratio setting */
@@ -493,13 +493,13 @@ static int xvid_encode_frame(AVCodecContext *avctx, · 34 unmodified lines
493493 if( 0 <= xerr ) {
494494 p->quality = xvid_enc_stats.quant * FF_QP2LAMBDA;
495495 if( xvid_enc_stats.type == XVID_TYPE_PVOP )
496− p->pict_type = FF_P_TYPE;
496+ p->pict_type = AV_PICTURE_TYPE_P;
497497 else if( xvid_enc_stats.type == XVID_TYPE_BVOP )
498− p->pict_type = FF_B_TYPE;
498+ p->pict_type = AV_PICTURE_TYPE_B;
499499 else if( xvid_enc_stats.type == XVID_TYPE_SVOP )
500− p->pict_type = FF_S_TYPE;
500+ p->pict_type = AV_PICTURE_TYPE_S;
501501 else
502− p->pict_type = FF_I_TYPE;
502+ p->pict_type = AV_PICTURE_TYPE_I;
503503 if( xvid_enc_frame.out_flags & XVID_KEYFRAME ) {
504504 p->key_frame = 1;
505505 if( x->quicktime_format )
libavcodec/ljpegenc.c+1−1
@@ -49,7 +49,7 @@ static int encode_picture_lossless(AVCodecContext *avctx, unsigned char *buf, in · 48 unmodified lines
4949 init_put_bits(&s->pb, buf, buf_size);
5050
5151 *p = *pict;
52− p->pict_type= FF_I_TYPE;
52+ p->pict_type= AV_PICTURE_TYPE_I;
5353 p->key_frame= 1;
5454
5555 ff_mjpeg_encode_picture_header(s);
libavcodec/mdec.c+1−1
@@ -170,7 +170,7 @@ static int decode_frame(AVCodecContext *avctx, · 169 unmodified lines
170170 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
171171 return -1;
172172 }
173− p->pict_type= FF_I_TYPE;
173+ p->pict_type= AV_PICTURE_TYPE_I;
174174 p->key_frame= 1;
175175
176176 av_fast_malloc(&a->bitstream_buffer, &a->bitstream_buffer_size, buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
libavcodec/mimic.c+1−1
@@ -352,7 +352,7 @@ static int mimic_decode_frame(AVCodecContext *avctx, void *data, · 351 unmodified lines
352352 }
353353
354354 ctx->buf_ptrs[ctx->cur_index].reference = 1;
355− ctx->buf_ptrs[ctx->cur_index].pict_type = is_pframe ? FF_P_TYPE:FF_I_TYPE;
355+ ctx->buf_ptrs[ctx->cur_index].pict_type = is_pframe ? AV_PICTURE_TYPE_P:AV_PICTURE_TYPE_I;
356356 if(ff_thread_get_buffer(avctx, &ctx->buf_ptrs[ctx->cur_index])) {
357357 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
358358 return -1;
libavcodec/mjpegdec.c+1−1
@@ -353,7 +353,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) · 352 unmodified lines
353353 av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
354354 return -1;
355355 }
356− s->picture_ptr->pict_type= FF_I_TYPE;
356+ s->picture_ptr->pict_type= AV_PICTURE_TYPE_I;
357357 s->picture_ptr->key_frame= 1;
358358 s->got_picture = 1;
359359
libavcodec/motion_est.c+2−2
@@ -1893,7 +1893,7 @@ int ff_get_best_fcode(MpegEncContext * s, int16_t (*mv_table)[2], int type) · 1892 unmodified lines
18931893 continue;
18941894
18951895 for(j=0; j<fcode && j<8; j++){
1896− if(s->pict_type==FF_B_TYPE || s->current_picture.mc_mb_var[xy] < s->current_picture.mb_var[xy])
1896+ if(s->pict_type==AV_PICTURE_TYPE_B || s->current_picture.mc_mb_var[xy] < s->current_picture.mb_var[xy])
18971897 score[j]-= 170;
18981898 }
18991899 }
@@ -1925,7 +1925,7 @@ void ff_fix_long_p_mvs(MpegEncContext * s) · 25 unmodified lines
19251925 MotionEstContext * const c= &s->me;
19261926 const int f_code= s->f_code;
19271927 int y, range;
1928− assert(s->pict_type==FF_P_TYPE);
1928+ assert(s->pict_type==AV_PICTURE_TYPE_P);
19291929
19301930 range = (((s->out_format == FMT_MPEG1 || s->msmpeg4_version) ? 8 : 16) << f_code);
19311931
libavcodec/motion_est_template.c+1−1
@@ -1037,7 +1037,7 @@ static av_always_inline int epzs_motion_search_internal(MpegEncContext * s, int · 1036 unmodified lines
10371037 score_map[0]= dmin;
10381038
10391039 //FIXME precalc first term below?
1040− if((s->pict_type == FF_B_TYPE && !(c->flags & FLAG_DIRECT)) || s->flags&CODEC_FLAG_MV0)
1040+ if((s->pict_type == AV_PICTURE_TYPE_B && !(c->flags & FLAG_DIRECT)) || s->flags&CODEC_FLAG_MV0)
10411041 dmin += (mv_penalty[pred_x] + mv_penalty[pred_y])*penalty_factor;
10421042
10431043 /* first line */
libavcodec/mpeg12.c+24−24
@@ -214,7 +214,7 @@ static int mpeg_decode_mb(MpegEncContext *s, · 213 unmodified lines
214214 assert(s->mb_skipped==0);
215215
216216 if (s->mb_skip_run-- != 0) {
217− if (s->pict_type == FF_P_TYPE) {
217+ if (s->pict_type == AV_PICTURE_TYPE_P) {
218218 s->mb_skipped = 1;
219219 s->current_picture.mb_type[ s->mb_x + s->mb_y*s->mb_stride ]= MB_TYPE_SKIP | MB_TYPE_L0 | MB_TYPE_16x16;
220220 } else {
@@ -240,7 +240,7 @@ static int mpeg_decode_mb(MpegEncContext *s, · 19 unmodified lines
240240
241241 switch(s->pict_type) {
242242 default:
243− case FF_I_TYPE:
243+ case AV_PICTURE_TYPE_I:
244244 if (get_bits1(&s->gb) == 0) {
245245 if (get_bits1(&s->gb) == 0){
246246 av_log(s->avctx, AV_LOG_ERROR, "invalid mb type in I Frame at %d %d\n", s->mb_x, s->mb_y);
@@ -251,7 +251,7 @@ static int mpeg_decode_mb(MpegEncContext *s, · 4 unmodified lines
251251 mb_type = MB_TYPE_INTRA;
252252 }
253253 break;
254− case FF_P_TYPE:
254+ case AV_PICTURE_TYPE_P:
255255 mb_type = get_vlc2(&s->gb, mb_ptype_vlc.table, MB_PTYPE_VLC_BITS, 1);
256256 if (mb_type < 0){
257257 av_log(s->avctx, AV_LOG_ERROR, "invalid mb type in P Frame at %d %d\n", s->mb_x, s->mb_y);
@@ -259,7 +259,7 @@ static int mpeg_decode_mb(MpegEncContext *s, · 1 unmodified line
259259 }
260260 mb_type = ptype2mb_type[ mb_type ];
261261 break;
262− case FF_B_TYPE:
262+ case AV_PICTURE_TYPE_B:
263263 mb_type = get_vlc2(&s->gb, mb_btype_vlc.table, MB_BTYPE_VLC_BITS, 1);
264264 if (mb_type < 0){
265265 av_log(s->avctx, AV_LOG_ERROR, "invalid mb type in B Frame at %d %d\n", s->mb_x, s->mb_y);
@@ -1198,7 +1198,7 @@ static int mpeg_decode_update_thread_context(AVCodecContext *avctx, const AVCode · 932 unmodified lines
11981198 if(!ctx->mpeg_enc_ctx_allocated)
11991199 memcpy(s + 1, s1 + 1, sizeof(Mpeg1Context) - sizeof(MpegEncContext));
12001200
1201− if(!(s->pict_type == FF_B_TYPE || s->low_delay))
1201+ if(!(s->pict_type == AV_PICTURE_TYPE_B || s->low_delay))
12021202 s->picture_number++;
12031203
12041204 return 0;
@@ -1408,7 +1408,7 @@ static int mpeg1_decode_picture(AVCodecContext *avctx, · 203 unmodified lines
14081408 return -1;
14091409
14101410 vbv_delay= get_bits(&s->gb, 16);
1411− if (s->pict_type == FF_P_TYPE || s->pict_type == FF_B_TYPE) {
1411+ if (s->pict_type == AV_PICTURE_TYPE_P || s->pict_type == AV_PICTURE_TYPE_B) {
14121412 s->full_pel[0] = get_bits1(&s->gb);
14131413 f_code = get_bits(&s->gb, 3);
14141414 if (f_code == 0 && avctx->error_recognition >= FF_ER_COMPLIANT)
@@ -1416,7 +1416,7 @@ static int mpeg1_decode_picture(AVCodecContext *avctx, · 1 unmodified line
14161416 s->mpeg_f_code[0][0] = f_code;
14171417 s->mpeg_f_code[0][1] = f_code;
14181418 }
1419− if (s->pict_type == FF_B_TYPE) {
1419+ if (s->pict_type == AV_PICTURE_TYPE_B) {
14201420 s->full_pel[1] = get_bits1(&s->gb);
14211421 f_code = get_bits(&s->gb, 3);
14221422 if (f_code == 0 && avctx->error_recognition >= FF_ER_COMPLIANT)
@@ -1425,7 +1425,7 @@ static int mpeg1_decode_picture(AVCodecContext *avctx, · 2 unmodified lines
14251425 s->mpeg_f_code[1][1] = f_code;
14261426 }
14271427 s->current_picture.pict_type= s->pict_type;
1428− s->current_picture.key_frame= s->pict_type == FF_I_TYPE;
1428+ s->current_picture.key_frame= s->pict_type == AV_PICTURE_TYPE_I;
14291429
14301430 if(avctx->debug & FF_DEBUG_PICT_INFO)
14311431 av_log(avctx, AV_LOG_DEBUG, "vbv_delay %d, ref %d type:%d\n", vbv_delay, ref, s->pict_type);
@@ -1573,13 +1573,13 @@ static void mpeg_decode_picture_coding_extension(Mpeg1Context *s1) · 141 unmodified lines
15731573 av_log(s->avctx, AV_LOG_ERROR, "Missing picture start code, guessing missing values\n");
15741574 if(s->mpeg_f_code[1][0] == 15 && s->mpeg_f_code[1][1]==15){
15751575 if(s->mpeg_f_code[0][0] == 15 && s->mpeg_f_code[0][1] == 15)
1576− s->pict_type= FF_I_TYPE;
1576+ s->pict_type= AV_PICTURE_TYPE_I;
15771577 else
1578− s->pict_type= FF_P_TYPE;
1578+ s->pict_type= AV_PICTURE_TYPE_P;
15791579 }else
1580− s->pict_type= FF_B_TYPE;
1580+ s->pict_type= AV_PICTURE_TYPE_B;
15811581 s->current_picture.pict_type= s->pict_type;
1582− s->current_picture.key_frame= s->pict_type == FF_I_TYPE;
1582+ s->current_picture.key_frame= s->pict_type == AV_PICTURE_TYPE_I;
15831583 }
15841584 s->intra_dc_precision = get_bits(&s->gb, 2);
15851585 s->picture_structure = get_bits(&s->gb, 2);
@@ -1790,7 +1790,7 @@ static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y, · 204 unmodified lines
17901790 if(s->avctx->debug&FF_DEBUG_PICT_INFO){
17911791 av_log(s->avctx, AV_LOG_DEBUG, "qp:%d fc:%2d%2d%2d%2d %s %s %s %s %s dc:%d pstruct:%d fdct:%d cmv:%d qtype:%d ivlc:%d rff:%d %s\n",
17921792 s->qscale, s->mpeg_f_code[0][0],s->mpeg_f_code[0][1],s->mpeg_f_code[1][0],s->mpeg_f_code[1][1],
1793− s->pict_type == FF_I_TYPE ? "I" : (s->pict_type == FF_P_TYPE ? "P" : (s->pict_type == FF_B_TYPE ? "B" : "S")),
1793+ s->pict_type == AV_PICTURE_TYPE_I ? "I" : (s->pict_type == AV_PICTURE_TYPE_P ? "P" : (s->pict_type == AV_PICTURE_TYPE_B ? "B" : "S")),
17941794 s->progressive_sequence ? "ps" :"", s->progressive_frame ? "pf" : "", s->alternate_scan ? "alt" :"", s->top_field_first ? "top" :"",
17951795 s->intra_dc_precision, s->picture_structure, s->frame_pred_frame_dct, s->concealment_motion_vectors,
17961796 s->q_scale_type, s->intra_vlc_format, s->repeat_first_field, s->chroma_420_type ? "420" :"");
@@ -1813,7 +1813,7 @@ static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y, · 16 unmodified lines
18131813
18141814 for(i=0; i<2; i++){
18151815 for(dir=0; dir<2; dir++){
1816− if (s->mb_intra || (dir==1 && s->pict_type != FF_B_TYPE)) {
1816+ if (s->mb_intra || (dir==1 && s->pict_type != AV_PICTURE_TYPE_B)) {
18171817 motion_x = motion_y = 0;
18181818 }else if (s->mv_type == MV_TYPE_16X16 || (s->mv_type == MV_TYPE_FIELD && field_pic)){
18191819 motion_x = s->mv[dir][0][0];
@@ -1853,7 +1853,7 @@ static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y, · 33 unmodified lines
18531853
18541854 if(s->mb_y >= s->mb_height){
18551855 int left= get_bits_left(&s->gb);
1856− int is_d10= s->chroma_format==2 && s->pict_type==FF_I_TYPE && avctx->profile==0 && avctx->level==5
1856+ int is_d10= s->chroma_format==2 && s->pict_type==AV_PICTURE_TYPE_I && avctx->profile==0 && avctx->level==5
18571857 && s->intra_dc_precision == 2 && s->q_scale_type == 1 && s->alternate_scan == 0
18581858 && s->progressive_frame == 0 /* vbv_delay == 0xBBB || 0xE10*/;
18591859
@@ -1896,7 +1896,7 @@ static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y, · 36 unmodified lines
18961896 }
18971897 if(s->mb_skip_run){
18981898 int i;
1899− if(s->pict_type == FF_I_TYPE){
1899+ if(s->pict_type == AV_PICTURE_TYPE_I){
19001900 av_log(s->avctx, AV_LOG_ERROR, "skipped MB in I frame at %d %d\n", s->mb_x, s->mb_y);
19011901 return -1;
19021902 }
@@ -1909,7 +1909,7 @@ static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y, · 6 unmodified lines
19091909 s->mv_type = MV_TYPE_16X16;
19101910 else
19111911 s->mv_type = MV_TYPE_FIELD;
1912− if (s->pict_type == FF_P_TYPE) {
1912+ if (s->pict_type == AV_PICTURE_TYPE_P) {
19131913 /* if P type, zero motion vector is implied */
19141914 s->mv_dir = MV_DIR_FORWARD;
19151915 s->mv[0][0][0] = s->mv[0][0][1] = 0;
@@ -2000,7 +2000,7 @@ static int slice_end(AVCodecContext *avctx, AVFrame *pict) · 84 unmodified lines
20002000
20012001 MPV_frame_end(s);
20022002
2003− if (s->pict_type == FF_B_TYPE || s->low_delay) {
2003+ if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) {
20042004 *pict= *(AVFrame*)s->current_picture_ptr;
20052005 ff_print_debug_info(s, pict);
20062006 } else {
@@ -2339,7 +2339,7 @@ static int decode_chunks(AVCodecContext *avctx, · 332 unmodified lines
23392339 uint32_t start_code = -1;
23402340 buf_ptr = ff_find_start_code(buf_ptr,buf_end, &start_code);
23412341 if (start_code > 0x1ff){
2342− if(s2->pict_type != FF_B_TYPE || avctx->skip_frame <= AVDISCARD_DEFAULT){
2342+ if(s2->pict_type != AV_PICTURE_TYPE_B || avctx->skip_frame <= AVDISCARD_DEFAULT){
23432343 if(HAVE_THREADS && avctx->active_thread_type&FF_THREAD_SLICE){
23442344 int i;
23452345
@@ -2465,19 +2465,19 @@ static int decode_chunks(AVCodecContext *avctx, · 119 unmodified lines
24652465
24662466 if(s2->last_picture_ptr==NULL){
24672467 /* Skip B-frames if we do not have reference frames and gop is not closed */
2468− if(s2->pict_type==FF_B_TYPE){
2468+ if(s2->pict_type==AV_PICTURE_TYPE_B){
24692469 if(!s2->closed_gop)
24702470 break;
24712471 }
24722472 }
2473− if(s2->pict_type==FF_I_TYPE)
2473+ if(s2->pict_type==AV_PICTURE_TYPE_I)
24742474 s->sync=1;
24752475 if(s2->next_picture_ptr==NULL){
24762476 /* Skip P-frames if we do not have a reference frame or we have an invalid header. */
2477− if(s2->pict_type==FF_P_TYPE && !s->sync) break;
2477+ if(s2->pict_type==AV_PICTURE_TYPE_P && !s->sync) break;
24782478 }
2479− if( (avctx->skip_frame >= AVDISCARD_NONREF && s2->pict_type==FF_B_TYPE)
2480− ||(avctx->skip_frame >= AVDISCARD_NONKEY && s2->pict_type!=FF_I_TYPE)
2479+ if( (avctx->skip_frame >= AVDISCARD_NONREF && s2->pict_type==AV_PICTURE_TYPE_B)
2480+ ||(avctx->skip_frame >= AVDISCARD_NONKEY && s2->pict_type!=AV_PICTURE_TYPE_I)
24812481 || avctx->skip_frame >= AVDISCARD_ALL)
24822482 break;
24832483
libavcodec/mpeg12enc.c+9−9
@@ -354,7 +354,7 @@ void mpeg1_encode_picture_header(MpegEncContext *s, int picture_number) · 353 unmodified lines
354354 put_bits(&s->pb, 16, 0xFFFF); /* vbv_delay */
355355
356356 // RAL: Forward f_code also needed for B frames
357− if (s->pict_type == FF_P_TYPE || s->pict_type == FF_B_TYPE) {
357+ if (s->pict_type == AV_PICTURE_TYPE_P || s->pict_type == AV_PICTURE_TYPE_B) {
358358 put_bits(&s->pb, 1, 0); /* half pel coordinates */
359359 if(s->codec_id == CODEC_ID_MPEG1VIDEO)
360360 put_bits(&s->pb, 3, s->f_code); /* forward_f_code */
@@ -363,7 +363,7 @@ void mpeg1_encode_picture_header(MpegEncContext *s, int picture_number) · 2 unmodified lines
363363 }
364364
365365 // RAL: Backward f_code necessary for B frames
366− if (s->pict_type == FF_B_TYPE) {
366+ if (s->pict_type == AV_PICTURE_TYPE_B) {
367367 put_bits(&s->pb, 1, 0); /* half pel coordinates */
368368 if(s->codec_id == CODEC_ID_MPEG1VIDEO)
369369 put_bits(&s->pb, 3, s->b_code); /* backward_f_code */
@@ -377,13 +377,13 @@ void mpeg1_encode_picture_header(MpegEncContext *s, int picture_number) · 7 unmodified lines
377377 if(s->codec_id == CODEC_ID_MPEG2VIDEO){
378378 put_header(s, EXT_START_CODE);
379379 put_bits(&s->pb, 4, 8); //pic ext
380− if (s->pict_type == FF_P_TYPE || s->pict_type == FF_B_TYPE) {
380+ if (s->pict_type == AV_PICTURE_TYPE_P || s->pict_type == AV_PICTURE_TYPE_B) {
381381 put_bits(&s->pb, 4, s->f_code);
382382 put_bits(&s->pb, 4, s->f_code);
383383 }else{
384384 put_bits(&s->pb, 8, 255);
385385 }
386− if (s->pict_type == FF_B_TYPE) {
386+ if (s->pict_type == AV_PICTURE_TYPE_B) {
387387 put_bits(&s->pb, 4, s->b_code);
388388 put_bits(&s->pb, 4, s->b_code);
389389 }else{
@@ -456,15 +456,15 @@ static av_always_inline void mpeg1_encode_mb_internal(MpegEncContext *s, · 66 unmodified lines
456456
457457 if (cbp == 0 && !first_mb && s->mv_type == MV_TYPE_16X16 &&
458458 (mb_x != s->mb_width - 1 || (mb_y != s->mb_height - 1 && s->codec_id == CODEC_ID_MPEG1VIDEO)) &&
459− ((s->pict_type == FF_P_TYPE && (motion_x | motion_y) == 0) ||
460− (s->pict_type == FF_B_TYPE && s->mv_dir == s->last_mv_dir && (((s->mv_dir & MV_DIR_FORWARD) ? ((s->mv[0][0][0] - s->last_mv[0][0][0])|(s->mv[0][0][1] - s->last_mv[0][0][1])) : 0) |
459+ ((s->pict_type == AV_PICTURE_TYPE_P && (motion_x | motion_y) == 0) ||
460+ (s->pict_type == AV_PICTURE_TYPE_B && s->mv_dir == s->last_mv_dir && (((s->mv_dir & MV_DIR_FORWARD) ? ((s->mv[0][0][0] - s->last_mv[0][0][0])|(s->mv[0][0][1] - s->last_mv[0][0][1])) : 0) |
461461 ((s->mv_dir & MV_DIR_BACKWARD) ? ((s->mv[1][0][0] - s->last_mv[1][0][0])|(s->mv[1][0][1] - s->last_mv[1][0][1])) : 0)) == 0))) {
462462 s->mb_skip_run++;
463463 s->qscale -= s->dquant;
464464 s->skip_count++;
465465 s->misc_bits++;
466466 s->last_bits++;
467− if(s->pict_type == FF_P_TYPE){
467+ if(s->pict_type == AV_PICTURE_TYPE_P){
468468 s->last_mv[0][1][0]= s->last_mv[0][0][0]=
469469 s->last_mv[0][1][1]= s->last_mv[0][0][1]= 0;
470470 }
@@ -476,7 +476,7 @@ static av_always_inline void mpeg1_encode_mb_internal(MpegEncContext *s, · 5 unmodified lines
476476 encode_mb_skip_run(s, s->mb_skip_run);
477477 }
478478
479− if (s->pict_type == FF_I_TYPE) {
479+ if (s->pict_type == AV_PICTURE_TYPE_I) {
480480 if(s->dquant && cbp){
481481 put_mb_modes(s, 2, 1, 0, 0); /* macroblock_type : macroblock_quant = 1 */
482482 put_qscale(s);
@@ -497,7 +497,7 @@ static av_always_inline void mpeg1_encode_mb_internal(MpegEncContext *s, · 14 unmodified lines
497497 s->misc_bits+= get_bits_diff(s);
498498 s->i_count++;
499499 memset(s->last_mv, 0, sizeof(s->last_mv));
500− } else if (s->pict_type == FF_P_TYPE) {
500+ } else if (s->pict_type == AV_PICTURE_TYPE_P) {
501501 if(s->mv_type == MV_TYPE_16X16){
502502 if (cbp != 0) {
503503 if ((motion_x|motion_y) == 0) {
libavcodec/mpeg4video.c+4−4
@@ -28,12 +28,12 @@ uint8_t ff_mpeg4_static_rl_table_store[3][2][2*MAX_RUN + MAX_LEVEL + 3]; · 27 unmodified lines
2828
2929 int ff_mpeg4_get_video_packet_prefix_length(MpegEncContext *s){
3030 switch(s->pict_type){
31− case FF_I_TYPE:
31+ case AV_PICTURE_TYPE_I:
3232 return 16;
33− case FF_P_TYPE:
34− case FF_S_TYPE:
33+ case AV_PICTURE_TYPE_P:
34+ case AV_PICTURE_TYPE_S:
3535 return s->f_code+15;
36− case FF_B_TYPE:
36+ case AV_PICTURE_TYPE_B:
3737 return FFMAX3(s->f_code, s->b_code, 2) + 15;
3838 default:
3939 return -1;
libavcodec/mpeg4videodec.c+38−38
@@ -118,7 +118,7 @@ static inline int mpeg4_is_resync(MpegEncContext *s){ · 117 unmodified lines
118118 }
119119
120120 while(v<=0xFF){
121− if(s->pict_type==FF_B_TYPE || (v>>(8-s->pict_type)!=1) || s->partitioned_frame)
121+ if(s->pict_type==AV_PICTURE_TYPE_B || (v>>(8-s->pict_type)!=1) || s->partitioned_frame)
122122 break;
123123 skip_bits(&s->gb, 8+s->pict_type);
124124 bits_count+= 8+s->pict_type;
@@ -373,7 +373,7 @@ int mpeg4_decode_video_packet_header(MpegEncContext *s) · 248 unmodified lines
373373 av_log(s->avctx, AV_LOG_ERROR, "illegal mb_num in video packet (%d %d) \n", mb_num, s->mb_num);
374374 return -1;
375375 }
376− if(s->pict_type == FF_B_TYPE){
376+ if(s->pict_type == AV_PICTURE_TYPE_B){
377377 int mb_x = 0, mb_y = 0;
378378
379379 while(s->next_picture.mbskip_table[ s->mb_index2xy[ mb_num ] ]) {
@@ -413,20 +413,20 @@ int mpeg4_decode_video_packet_header(MpegEncContext *s) · 33 unmodified lines
413413 if(s->shape != BIN_ONLY_SHAPE){
414414 skip_bits(&s->gb, 3); /* intra dc vlc threshold */
415415 //FIXME don't just ignore everything
416− if(s->pict_type == FF_S_TYPE && s->vol_sprite_usage==GMC_SPRITE){
416+ if(s->pict_type == AV_PICTURE_TYPE_S && s->vol_sprite_usage==GMC_SPRITE){
417417 mpeg4_decode_sprite_trajectory(s, &s->gb);
418418 av_log(s->avctx, AV_LOG_ERROR, "untested\n");
419419 }
420420
421421 //FIXME reduced res stuff here
422422
423− if (s->pict_type != FF_I_TYPE) {
423+ if (s->pict_type != AV_PICTURE_TYPE_I) {
424424 int f_code = get_bits(&s->gb, 3); /* fcode_for */
425425 if(f_code==0){
426426 av_log(s->avctx, AV_LOG_ERROR, "Error, video packet header damaged (f_code=0)\n");
427427 }
428428 }
429− if (s->pict_type == FF_B_TYPE) {
429+ if (s->pict_type == AV_PICTURE_TYPE_B) {
430430 int b_code = get_bits(&s->gb, 3);
431431 if(b_code==0){
432432 av_log(s->avctx, AV_LOG_ERROR, "Error, video packet header damaged (b_code=0)\n");
@@ -555,7 +555,7 @@ static int mpeg4_decode_partition_a(MpegEncContext *s){ · 122 unmodified lines
555555 if(s->mb_x == s->resync_mb_x && s->mb_y == s->resync_mb_y+1)
556556 s->first_slice_line=0;
557557
558− if(s->pict_type==FF_I_TYPE){
558+ if(s->pict_type==AV_PICTURE_TYPE_I){
559559 int i;
560560
561561 do{
@@ -604,7 +604,7 @@ try_again: · 42 unmodified lines
604604 skip_bits1(&s->gb);
605605 if(bits&0x10000){
606606 /* skip mb */
607− if(s->pict_type==FF_S_TYPE && s->vol_sprite_usage==GMC_SPRITE){
607+ if(s->pict_type==AV_PICTURE_TYPE_S && s->vol_sprite_usage==GMC_SPRITE){
608608 s->current_picture.mb_type[xy]= MB_TYPE_SKIP | MB_TYPE_16x16 | MB_TYPE_GMC | MB_TYPE_L0;
609609 mx= get_amv(s, 0);
610610 my= get_amv(s, 1);
@@ -645,7 +645,7 @@ try_again: · 34 unmodified lines
645645 if(s->mbintra_table[xy])
646646 ff_clean_intra_table_entries(s);
647647
648− if(s->pict_type==FF_S_TYPE && s->vol_sprite_usage==GMC_SPRITE && (cbpc & 16) == 0)
648+ if(s->pict_type==AV_PICTURE_TYPE_S && s->vol_sprite_usage==GMC_SPRITE && (cbpc & 16) == 0)
649649 s->mcsel= get_bits1(&s->gb);
650650 else s->mcsel= 0;
651651
@@ -717,7 +717,7 @@ static int mpeg4_decode_partition_b(MpegEncContext *s, int mb_count){ · 65 unmodified lines
717717 if(s->mb_x == s->resync_mb_x && s->mb_y == s->resync_mb_y+1)
718718 s->first_slice_line=0;
719719
720− if(s->pict_type==FF_I_TYPE){
720+ if(s->pict_type==AV_PICTURE_TYPE_I){
721721 int ac_pred= get_bits1(&s->gb);
722722 int cbpy = get_vlc2(&s->gb, ff_h263_cbpy_vlc.table, CBPY_VLC_BITS, 1);
723723 if(cbpy<0){
@@ -791,8 +791,8 @@ static int mpeg4_decode_partition_b(MpegEncContext *s, int mb_count){ · 67 unmodified lines
791791 int ff_mpeg4_decode_partitions(MpegEncContext *s)
792792 {
793793 int mb_num;
794− const int part_a_error= s->pict_type==FF_I_TYPE ? (DC_ERROR|MV_ERROR) : MV_ERROR;
795− const int part_a_end = s->pict_type==FF_I_TYPE ? (DC_END |MV_END) : MV_END;
794+ const int part_a_error= s->pict_type==AV_PICTURE_TYPE_I ? (DC_ERROR|MV_ERROR) : MV_ERROR;
795+ const int part_a_end = s->pict_type==AV_PICTURE_TYPE_I ? (DC_END |MV_END) : MV_END;
796796
797797 mb_num= mpeg4_decode_partition_a(s);
798798 if(mb_num<0){
@@ -808,7 +808,7 @@ int ff_mpeg4_decode_partitions(MpegEncContext *s) · 9 unmodified lines
808808
809809 s->mb_num_left= mb_num;
810810
811− if(s->pict_type==FF_I_TYPE){
811+ if(s->pict_type==AV_PICTURE_TYPE_I){
812812 while(show_bits(&s->gb, 9) == 1)
813813 skip_bits(&s->gb, 9);
814814 if(get_bits_long(&s->gb, 19)!=DC_MARKER){
@@ -826,11 +826,11 @@ int ff_mpeg4_decode_partitions(MpegEncContext *s) · 11 unmodified lines
826826 ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, part_a_end);
827827
828828 if( mpeg4_decode_partition_b(s, mb_num) < 0){
829− if(s->pict_type==FF_P_TYPE)
829+ if(s->pict_type==AV_PICTURE_TYPE_P)
830830 ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, DC_ERROR);
831831 return -1;
832832 }else{
833− if(s->pict_type==FF_P_TYPE)
833+ if(s->pict_type==AV_PICTURE_TYPE_P)
834834 ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, DC_END);
835835 }
836836
@@ -1101,7 +1101,7 @@ static int mpeg4_decode_partitioned_mb(MpegEncContext *s, DCTELEM block[6][64]) · 264 unmodified lines
11011101 ff_set_qscale(s, s->current_picture.qscale_table[xy] );
11021102 }
11031103
1104− if (s->pict_type == FF_P_TYPE || s->pict_type==FF_S_TYPE) {
1104+ if (s->pict_type == AV_PICTURE_TYPE_P || s->pict_type==AV_PICTURE_TYPE_S) {
11051105 int i;
11061106 for(i=0; i<4; i++){
11071107 s->mv[0][i][0] = s->current_picture.motion_val[0][ s->block_index[i] ][0];
@@ -1115,7 +1115,7 @@ static int mpeg4_decode_partitioned_mb(MpegEncContext *s, DCTELEM block[6][64]) · 7 unmodified lines
11151115 s->block_last_index[i] = -1;
11161116 s->mv_dir = MV_DIR_FORWARD;
11171117 s->mv_type = MV_TYPE_16X16;
1118− if(s->pict_type==FF_S_TYPE && s->vol_sprite_usage==GMC_SPRITE){
1118+ if(s->pict_type==AV_PICTURE_TYPE_S && s->vol_sprite_usage==GMC_SPRITE){
11191119 s->mcsel=1;
11201120 s->mb_skipped = 0;
11211121 }else{
@@ -1179,7 +1179,7 @@ static int mpeg4_decode_mb(MpegEncContext *s, · 57 unmodified lines
11791179
11801180 assert(s->h263_pred);
11811181
1182− if (s->pict_type == FF_P_TYPE || s->pict_type==FF_S_TYPE) {
1182+ if (s->pict_type == AV_PICTURE_TYPE_P || s->pict_type==AV_PICTURE_TYPE_S) {
11831183 do{
11841184 if (get_bits1(&s->gb)) {
11851185 /* skip mb */
@@ -1188,7 +1188,7 @@ static int mpeg4_decode_mb(MpegEncContext *s, · 2 unmodified lines
11881188 s->block_last_index[i] = -1;
11891189 s->mv_dir = MV_DIR_FORWARD;
11901190 s->mv_type = MV_TYPE_16X16;
1191− if(s->pict_type==FF_S_TYPE && s->vol_sprite_usage==GMC_SPRITE){
1191+ if(s->pict_type==AV_PICTURE_TYPE_S && s->vol_sprite_usage==GMC_SPRITE){
11921192 s->current_picture.mb_type[xy]= MB_TYPE_SKIP | MB_TYPE_GMC | MB_TYPE_16x16 | MB_TYPE_L0;
11931193 s->mcsel=1;
11941194 s->mv[0][0][0]= get_amv(s, 0);
@@ -1216,7 +1216,7 @@ static int mpeg4_decode_mb(MpegEncContext *s, · 21 unmodified lines
12161216 s->mb_intra = ((cbpc & 4) != 0);
12171217 if (s->mb_intra) goto intra;
12181218
1219− if(s->pict_type==FF_S_TYPE && s->vol_sprite_usage==GMC_SPRITE && (cbpc & 16) == 0)
1219+ if(s->pict_type==AV_PICTURE_TYPE_S && s->vol_sprite_usage==GMC_SPRITE && (cbpc & 16) == 0)
12201220 s->mcsel= get_bits1(&s->gb);
12211221 else s->mcsel= 0;
12221222 cbpy = get_vlc2(&s->gb, ff_h263_cbpy_vlc.table, CBPY_VLC_BITS, 1) ^ 0x0F;
@@ -1295,7 +1295,7 @@ static int mpeg4_decode_mb(MpegEncContext *s, · 72 unmodified lines
12951295 mot_val[1] = my;
12961296 }
12971297 }
1298− } else if(s->pict_type==FF_B_TYPE) {
1298+ } else if(s->pict_type==AV_PICTURE_TYPE_B) {
12991299 int modb1; // first bit of modb
13001300 int modb2; // second bit of modb
13011301 int mb_type;
@@ -1492,12 +1492,12 @@ end: · 190 unmodified lines
14921492 if(mpeg4_is_resync(s)){
14931493 const int delta= s->mb_x + 1 == s->mb_width ? 2 : 1;
14941494
1495− if(s->pict_type==FF_B_TYPE){
1495+ if(s->pict_type==AV_PICTURE_TYPE_B){
14961496 ff_thread_await_progress((AVFrame*)s->next_picture_ptr,
14971497 (s->mb_x + delta >= s->mb_width) ? FFMIN(s->mb_y+1, s->mb_height-1) : s->mb_y, 0);
14981498 }
14991499
1500− if(s->pict_type==FF_B_TYPE && s->next_picture.mbskip_table[xy + delta])
1500+ if(s->pict_type==AV_PICTURE_TYPE_B && s->next_picture.mbskip_table[xy + delta])
15011501 return SLICE_OK;
15021502 return SLICE_END;
15031503 }
@@ -1897,13 +1897,13 @@ static int decode_user_data(MpegEncContext *s, GetBitContext *gb){ · 393 unmodified lines
18971897 static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){
18981898 int time_incr, time_increment;
18991899
1900− s->pict_type = get_bits(gb, 2) + FF_I_TYPE; /* pict type: I = 0 , P = 1 */
1901− if(s->pict_type==FF_B_TYPE && s->low_delay && s->vol_control_parameters==0 && !(s->flags & CODEC_FLAG_LOW_DELAY)){
1900+ s->pict_type = get_bits(gb, 2) + AV_PICTURE_TYPE_I; /* pict type: I = 0 , P = 1 */
1901+ if(s->pict_type==AV_PICTURE_TYPE_B && s->low_delay && s->vol_control_parameters==0 && !(s->flags & CODEC_FLAG_LOW_DELAY)){
19021902 av_log(s->avctx, AV_LOG_ERROR, "low_delay flag incorrectly, clearing it\n");
19031903 s->low_delay=0;
19041904 }
19051905
1906− s->partitioned_frame= s->data_partitioning && s->pict_type!=FF_B_TYPE;
1906+ s->partitioned_frame= s->data_partitioning && s->pict_type!=AV_PICTURE_TYPE_B;
19071907 if(s->partitioned_frame)
19081908 s->decode_mb= mpeg4_decode_partitioned_mb;
19091909 else
@@ -1919,8 +1919,8 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){ · 9 unmodified lines
19191919 av_log(s->avctx, AV_LOG_ERROR, "hmm, seems the headers are not complete, trying to guess time_increment_bits\n");
19201920
19211921 for(s->time_increment_bits=1 ;s->time_increment_bits<16; s->time_increment_bits++){
1922− if ( s->pict_type == FF_P_TYPE
1923− || (s->pict_type == FF_S_TYPE && s->vol_sprite_usage==GMC_SPRITE)) {
1922+ if ( s->pict_type == AV_PICTURE_TYPE_P
1923+ || (s->pict_type == AV_PICTURE_TYPE_S && s->vol_sprite_usage==GMC_SPRITE)) {
19241924 if((show_bits(gb, s->time_increment_bits+6)&0x37) == 0x30) break;
19251925 }else
19261926 if((show_bits(gb, s->time_increment_bits+5)&0x1F) == 0x18) break;
@@ -1932,7 +1932,7 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){ · 5 unmodified lines
19321932 if(IS_3IV1) time_increment= get_bits1(gb); //FIXME investigate further
19331933 else time_increment= get_bits(gb, s->time_increment_bits);
19341934
1935− if(s->pict_type!=FF_B_TYPE){
1935+ if(s->pict_type!=AV_PICTURE_TYPE_B){
19361936 s->last_time_base= s->time_base;
19371937 s->time_base+= time_incr;
19381938 s->time= s->time_base*s->avctx->time_base.den + time_increment;
@@ -1982,8 +1982,8 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){ · 43 unmodified lines
19821982 av_log(s->avctx, AV_LOG_ERROR, "vop not coded\n");
19831983 return FRAME_SKIPPED;
19841984 }
1985− if (s->shape != BIN_ONLY_SHAPE && ( s->pict_type == FF_P_TYPE
1986− || (s->pict_type == FF_S_TYPE && s->vol_sprite_usage==GMC_SPRITE))) {
1985+ if (s->shape != BIN_ONLY_SHAPE && ( s->pict_type == AV_PICTURE_TYPE_P
1986+ || (s->pict_type == AV_PICTURE_TYPE_S && s->vol_sprite_usage==GMC_SPRITE))) {
19871987 /* rounding type for motion estimation */
19881988 s->no_rounding = get_bits1(gb);
19891989 } else {
@@ -1992,7 +1992,7 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){ · 2 unmodified lines
19921992 //FIXME reduced res stuff
19931993
19941994 if (s->shape != RECT_SHAPE) {
1995− if (s->vol_sprite_usage != 1 || s->pict_type != FF_I_TYPE) {
1995+ if (s->vol_sprite_usage != 1 || s->pict_type != AV_PICTURE_TYPE_I) {
19961996 int width, height, hor_spat_ref, ver_spat_ref;
19971997
19981998 width = get_bits(gb, 13);
@@ -2013,9 +2013,9 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){ · 14 unmodified lines
20132013
20142014 if (s->shape != BIN_ONLY_SHAPE) {
20152015 skip_bits_long(gb, s->cplx_estimation_trash_i);
2016− if(s->pict_type != FF_I_TYPE)
2016+ if(s->pict_type != AV_PICTURE_TYPE_I)
20172017 skip_bits_long(gb, s->cplx_estimation_trash_p);
2018− if(s->pict_type == FF_B_TYPE)
2018+ if(s->pict_type == AV_PICTURE_TYPE_B)
20192019 skip_bits_long(gb, s->cplx_estimation_trash_b);
20202020
20212021 s->intra_dc_threshold= mpeg4_dc_threshold[ get_bits(gb, 3) ];
@@ -2038,7 +2038,7 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){ · 16 unmodified lines
20382038 ff_init_scantable(s->dsp.idct_permutation, &s->intra_v_scantable, ff_alternate_vertical_scan);
20392039 }
20402040
2041− if(s->pict_type == FF_S_TYPE && (s->vol_sprite_usage==STATIC_SPRITE || s->vol_sprite_usage==GMC_SPRITE)){
2041+ if(s->pict_type == AV_PICTURE_TYPE_S && (s->vol_sprite_usage==STATIC_SPRITE || s->vol_sprite_usage==GMC_SPRITE)){
20422042 mpeg4_decode_sprite_trajectory(s, gb);
20432043 if(s->sprite_brightness_change) av_log(s->avctx, AV_LOG_ERROR, "sprite_brightness_change not supported\n");
20442044 if(s->vol_sprite_usage==STATIC_SPRITE) av_log(s->avctx, AV_LOG_ERROR, "static sprite not supported\n");
@@ -2051,7 +2051,7 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){ · 6 unmodified lines
20512051 return -1; // makes no sense to continue, as there is nothing left from the image then
20522052 }
20532053
2054− if (s->pict_type != FF_I_TYPE) {
2054+ if (s->pict_type != AV_PICTURE_TYPE_I) {
20552055 s->f_code = get_bits(gb, 3); /* fcode_for */
20562056 if(s->f_code==0){
20572057 av_log(s->avctx, AV_LOG_ERROR, "Error, header damaged or not MPEG4 header (f_code=0)\n");
@@ -2060,7 +2060,7 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){ · 2 unmodified lines
20602060 }else
20612061 s->f_code=1;
20622062
2063− if (s->pict_type == FF_B_TYPE) {
2063+ if (s->pict_type == AV_PICTURE_TYPE_B) {
20642064 s->b_code = get_bits(gb, 3);
20652065 }else
20662066 s->b_code=1;
@@ -2068,14 +2068,14 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){ · 1 unmodified line
20682068 if(s->avctx->debug&FF_DEBUG_PICT_INFO){
20692069 av_log(s->avctx, AV_LOG_DEBUG, "qp:%d fc:%d,%d %s size:%d pro:%d alt:%d top:%d %spel part:%d resync:%d w:%d a:%d rnd:%d vot:%d%s dc:%d ce:%d/%d/%d\n",
20702070 s->qscale, s->f_code, s->b_code,
2071− s->pict_type == FF_I_TYPE ? "I" : (s->pict_type == FF_P_TYPE ? "P" : (s->pict_type == FF_B_TYPE ? "B" : "S")),
2071+ s->pict_type == AV_PICTURE_TYPE_I ? "I" : (s->pict_type == AV_PICTURE_TYPE_P ? "P" : (s->pict_type == AV_PICTURE_TYPE_B ? "B" : "S")),
20722072 gb->size_in_bits,s->progressive_sequence, s->alternate_scan, s->top_field_first,
20732073 s->quarter_sample ? "q" : "h", s->data_partitioning, s->resync_marker, s->num_sprite_warping_points,
20742074 s->sprite_warping_accuracy, 1-s->no_rounding, s->vo_type, s->vol_control_parameters ? " VOLC" : " ", s->intra_dc_threshold, s->cplx_estimation_trash_i, s->cplx_estimation_trash_p, s->cplx_estimation_trash_b);
20752075 }
20762076
20772077 if(!s->scalability){
2078− if (s->shape!=RECT_SHAPE && s->pict_type!=FF_I_TYPE) {
2078+ if (s->shape!=RECT_SHAPE && s->pict_type!=AV_PICTURE_TYPE_I) {
20792079 skip_bits1(gb); // vop shape coding type
20802080 }
20812081 }else{
libavcodec/mpeg4videoenc.c+15−15
@@ -205,7 +205,7 @@ void ff_clean_mpeg4_qscales(MpegEncContext *s){ · 204 unmodified lines
205205
206206 ff_clean_h263_qscales(s);
207207
208− if(s->pict_type== FF_B_TYPE){
208+ if(s->pict_type== AV_PICTURE_TYPE_B){
209209 int odd=0;
210210 /* ok, come on, this isn't funny anymore, there's more code for handling this mpeg4 mess than for the actual adaptive quantization */
211211
@@ -497,14 +497,14 @@ void mpeg4_encode_mb(MpegEncContext * s, · 285 unmodified lines
497497 {
498498 int cbpc, cbpy, pred_x, pred_y;
499499 PutBitContext * const pb2 = s->data_partitioning ? &s->pb2 : &s->pb;
500− PutBitContext * const tex_pb = s->data_partitioning && s->pict_type!=FF_B_TYPE ? &s->tex_pb : &s->pb;
501− PutBitContext * const dc_pb = s->data_partitioning && s->pict_type!=FF_I_TYPE ? &s->pb2 : &s->pb;
500+ PutBitContext * const tex_pb = s->data_partitioning && s->pict_type!=AV_PICTURE_TYPE_B ? &s->tex_pb : &s->pb;
501+ PutBitContext * const dc_pb = s->data_partitioning && s->pict_type!=AV_PICTURE_TYPE_I ? &s->pb2 : &s->pb;
502502 const int interleaved_stats= (s->flags&CODEC_FLAG_PASS1) && !s->data_partitioning ? 1 : 0;
503503
504504 if (!s->mb_intra) {
505505 int i, cbp;
506506
507− if(s->pict_type==FF_B_TYPE){
507+ if(s->pict_type==AV_PICTURE_TYPE_B){
508508 static const int mb_type_table[8]= {-1, 3, 2, 1,-1,-1,-1, 0}; /* convert from mv_dir to type */
509509 int mb_type= mb_type_table[s->mv_dir];
510510
@@ -637,7 +637,7 @@ void mpeg4_encode_mb(MpegEncContext * s, · 126 unmodified lines
637637 s->p_tex_bits+= get_bits_diff(s);
638638 }
639639
640− }else{ /* s->pict_type==FF_B_TYPE */
640+ }else{ /* s->pict_type==AV_PICTURE_TYPE_B */
641641 cbp= get_p_cbp(s, block, motion_x, motion_y);
642642
643643 if ((cbp | motion_x | motion_y | s->dquant) == 0 && s->mv_type==MV_TYPE_16X16) {
@@ -660,7 +660,7 @@ void mpeg4_encode_mb(MpegEncContext * s, · 16 unmodified lines
660660 int diff;
661661 Picture *pic= s->reordered_input_picture[i+1];
662662
663− if(pic==NULL || pic->pict_type!=FF_B_TYPE) break;
663+ if(pic==NULL || pic->pict_type!=AV_PICTURE_TYPE_B) break;
664664
665665 b_pic= pic->data[0] + offset;
666666 if(pic->type != FF_BUFFER_TYPE_SHARED)
@@ -824,7 +824,7 @@ void mpeg4_encode_mb(MpegEncContext * s, · 157 unmodified lines
824824 }
825825
826826 cbpc = cbp & 3;
827− if (s->pict_type == FF_I_TYPE) {
827+ if (s->pict_type == AV_PICTURE_TYPE_I) {
828828 if(s->dquant) cbpc+=4;
829829 put_bits(&s->pb,
830830 ff_h263_intra_MCBPC_bits[cbpc],
@@ -876,7 +876,7 @@ void ff_mpeg4_stuffing(PutBitContext * pbc) · 45 unmodified lines
876876
877877 /* must be called before writing the header */
878878 void ff_set_mpeg4_time(MpegEncContext * s){
879− if(s->pict_type==FF_B_TYPE){
879+ if(s->pict_type==AV_PICTURE_TYPE_B){
880880 ff_mpeg4_init_direct_mv(s);
881881 }else{
882882 s->last_time_base= s->time_base;
@@ -1066,7 +1066,7 @@ void mpeg4_encode_picture_header(MpegEncContext * s, int picture_number) · 183 unmodified lines
10661066 int time_incr;
10671067 int time_div, time_mod;
10681068
1069− if(s->pict_type==FF_I_TYPE){
1069+ if(s->pict_type==AV_PICTURE_TYPE_I){
10701070 if(!(s->flags&CODEC_FLAG_GLOBAL_HEADER)){
10711071 if(s->strict_std_compliance < FF_COMPLIANCE_VERY_STRICT) //HACK, the reference sw is buggy
10721072 mpeg4_encode_visual_object_header(s);
@@ -1077,7 +1077,7 @@ void mpeg4_encode_picture_header(MpegEncContext * s, int picture_number) · 4 unmodified lines
10771077 mpeg4_encode_gop_header(s);
10781078 }
10791079
1080− s->partitioned_frame= s->data_partitioning && s->pict_type!=FF_B_TYPE;
1080+ s->partitioned_frame= s->data_partitioning && s->pict_type!=AV_PICTURE_TYPE_B;
10811081
10821082 put_bits(&s->pb, 16, 0); /* vop header */
10831083 put_bits(&s->pb, 16, VOP_STARTCODE); /* vop header */
@@ -1097,8 +1097,8 @@ void mpeg4_encode_picture_header(MpegEncContext * s, int picture_number) · 13 unmodified lines
10971097 put_bits(&s->pb, s->time_increment_bits, time_mod); /* time increment */
10981098 put_bits(&s->pb, 1, 1); /* marker */
10991099 put_bits(&s->pb, 1, 1); /* vop coded */
1100− if ( s->pict_type == FF_P_TYPE
1101− || (s->pict_type == FF_S_TYPE && s->vol_sprite_usage==GMC_SPRITE)) {
1100+ if ( s->pict_type == AV_PICTURE_TYPE_P
1101+ || (s->pict_type == AV_PICTURE_TYPE_S && s->vol_sprite_usage==GMC_SPRITE)) {
11021102 put_bits(&s->pb, 1, s->no_rounding); /* rounding type */
11031103 }
11041104 put_bits(&s->pb, 3, 0); /* intra dc VLC threshold */
@@ -1110,9 +1110,9 @@ void mpeg4_encode_picture_header(MpegEncContext * s, int picture_number) · 5 unmodified lines
11101110
11111111 put_bits(&s->pb, 5, s->qscale);
11121112
1113− if (s->pict_type != FF_I_TYPE)
1113+ if (s->pict_type != AV_PICTURE_TYPE_I)
11141114 put_bits(&s->pb, 3, s->f_code); /* fcode_for */
1115− if (s->pict_type == FF_B_TYPE)
1115+ if (s->pict_type == AV_PICTURE_TYPE_B)
11161116 put_bits(&s->pb, 3, s->b_code); /* fcode_back */
11171117 }
11181118
@@ -1317,7 +1317,7 @@ void ff_mpeg4_merge_partitions(MpegEncContext *s) · 198 unmodified lines
13171317 const int tex_pb_len= put_bits_count(&s->tex_pb);
13181318 const int bits= put_bits_count(&s->pb);
13191319
1320− if(s->pict_type==FF_I_TYPE){
1320+ if(s->pict_type==AV_PICTURE_TYPE_I){
13211321 put_bits(&s->pb, 19, DC_MARKER);
13221322 s->misc_bits+=19 + pb2_len + bits - s->last_bits;
13231323 s->i_tex_bits+= tex_pb_len;
libavcodec/mpegvideo.c+32−32
@@ -313,8 +313,8 @@ int ff_alloc_picture(MpegEncContext *s, Picture *pic, int shared){ · 312 unmodified lines
313313 /* It might be nicer if the application would keep track of these
314314 * but it would require an API change. */
315315 memmove(s->prev_pict_types+1, s->prev_pict_types, PREV_PICT_TYPES_BUFFER_SIZE-1);
316− s->prev_pict_types[0]= s->dropable ? FF_B_TYPE : s->pict_type;
317− if(pic->age < PREV_PICT_TYPES_BUFFER_SIZE && s->prev_pict_types[pic->age] == FF_B_TYPE)
316+ s->prev_pict_types[0]= s->dropable ? AV_PICTURE_TYPE_B : s->pict_type;
317+ if(pic->age < PREV_PICT_TYPES_BUFFER_SIZE && s->prev_pict_types[pic->age] == AV_PICTURE_TYPE_B)
318318 pic->age= INT_MAX; // Skipped MBs in B-frames are quite rare in MPEG-1/2 and it is a bit tricky to skip them anyway.
319319 pic->owner2 = s;
320320
@@ -527,7 +527,7 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst, const AVCodecContext *src · 206 unmodified lines
527527 s->last_pict_type= s1->pict_type;
528528 if (s1->current_picture_ptr) s->last_lambda_for[s1->pict_type] = s1->current_picture_ptr->quality;
529529
530− if(s1->pict_type!=FF_B_TYPE){
530+ if(s1->pict_type!=AV_PICTURE_TYPE_B){
531531 s->last_non_b_pict_type= s1->pict_type;
532532 }
533533 }
@@ -1023,7 +1023,7 @@ int MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) · 489 unmodified lines
10231023 assert(s->last_picture_ptr==NULL || s->out_format != FMT_H264 || s->codec_id == CODEC_ID_SVQ3);
10241024
10251025 /* mark&release old frames */
1026− if (s->pict_type != FF_B_TYPE && s->last_picture_ptr && s->last_picture_ptr != s->next_picture_ptr && s->last_picture_ptr->data[0]) {
1026+ if (s->pict_type != AV_PICTURE_TYPE_B && s->last_picture_ptr && s->last_picture_ptr != s->next_picture_ptr && s->last_picture_ptr->data[0]) {
10271027 if(s->out_format != FMT_H264 || s->codec_id == CODEC_ID_SVQ3){
10281028 free_frame_buffer(s, s->last_picture_ptr);
10291029
@@ -1054,7 +1054,7 @@ int MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) · 24 unmodified lines
10541054 if (!s->dropable){
10551055 if (s->codec_id == CODEC_ID_H264)
10561056 pic->reference = s->picture_structure;
1057− else if (s->pict_type != FF_B_TYPE)
1057+ else if (s->pict_type != AV_PICTURE_TYPE_B)
10581058 pic->reference = 3;
10591059 }
10601060
@@ -1077,11 +1077,11 @@ int MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) · 16 unmodified lines
10771077 s->current_picture_ptr->pict_type= s->pict_type;
10781078 // if(s->flags && CODEC_FLAG_QSCALE)
10791079 // s->current_picture_ptr->quality= s->new_picture_ptr->quality;
1080− s->current_picture_ptr->key_frame= s->pict_type == FF_I_TYPE;
1080+ s->current_picture_ptr->key_frame= s->pict_type == AV_PICTURE_TYPE_I;
10811081
10821082 ff_copy_picture(&s->current_picture, s->current_picture_ptr);
10831083
1084− if (s->pict_type != FF_B_TYPE) {
1084+ if (s->pict_type != AV_PICTURE_TYPE_B) {
10851085 s->last_picture_ptr= s->next_picture_ptr;
10861086 if(!s->dropable)
10871087 s->next_picture_ptr= s->current_picture_ptr;
@@ -1093,7 +1093,7 @@ int MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) · 5 unmodified lines
10931093 s->pict_type, s->dropable);*/
10941094
10951095 if(s->codec_id != CODEC_ID_H264){
1096− if((s->last_picture_ptr==NULL || s->last_picture_ptr->data[0]==NULL) && s->pict_type!=FF_I_TYPE){
1096+ if((s->last_picture_ptr==NULL || s->last_picture_ptr->data[0]==NULL) && s->pict_type!=AV_PICTURE_TYPE_I){
10971097 av_log(avctx, AV_LOG_ERROR, "warning: first frame is no keyframe\n");
10981098 /* Allocate a dummy frame */
10991099 i= ff_find_unused_picture(s, 0);
@@ -1103,7 +1103,7 @@ int MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) · 3 unmodified lines
11031103 ff_thread_report_progress((AVFrame*)s->last_picture_ptr, INT_MAX, 0);
11041104 ff_thread_report_progress((AVFrame*)s->last_picture_ptr, INT_MAX, 1);
11051105 }
1106− if((s->next_picture_ptr==NULL || s->next_picture_ptr->data[0]==NULL) && s->pict_type==FF_B_TYPE){
1106+ if((s->next_picture_ptr==NULL || s->next_picture_ptr->data[0]==NULL) && s->pict_type==AV_PICTURE_TYPE_B){
11071107 /* Allocate a dummy frame */
11081108 i= ff_find_unused_picture(s, 0);
11091109 s->next_picture_ptr= &s->picture[i];
@@ -1117,7 +1117,7 @@ int MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) · 7 unmodified lines
11171117 if(s->last_picture_ptr) ff_copy_picture(&s->last_picture, s->last_picture_ptr);
11181118 if(s->next_picture_ptr) ff_copy_picture(&s->next_picture, s->next_picture_ptr);
11191119
1120− assert(s->pict_type == FF_I_TYPE || (s->last_picture_ptr && s->last_picture_ptr->data[0]));
1120+ assert(s->pict_type == AV_PICTURE_TYPE_I || (s->last_picture_ptr && s->last_picture_ptr->data[0]));
11211121
11221122 if(s->picture_structure!=PICT_FRAME && s->out_format != FMT_H264){
11231123 int i;
@@ -1185,7 +1185,7 @@ void MPV_frame_end(MpegEncContext *s) · 61 unmodified lines
11851185
11861186 s->last_pict_type = s->pict_type;
11871187 s->last_lambda_for[s->pict_type]= s->current_picture_ptr->quality;
1188− if(s->pict_type!=FF_B_TYPE){
1188+ if(s->pict_type!=AV_PICTURE_TYPE_B){
11891189 s->last_non_b_pict_type= s->pict_type;
11901190 }
11911191 #if 0
@@ -1314,12 +1314,12 @@ void ff_print_debug_info(MpegEncContext *s, AVFrame *pict){ · 122 unmodified lines
13141314
13151315 av_log(s->avctx,AV_LOG_DEBUG,"New frame, type: ");
13161316 switch (pict->pict_type) {
1317− case FF_I_TYPE: av_log(s->avctx,AV_LOG_DEBUG,"I\n"); break;
1318− case FF_P_TYPE: av_log(s->avctx,AV_LOG_DEBUG,"P\n"); break;
1319− case FF_B_TYPE: av_log(s->avctx,AV_LOG_DEBUG,"B\n"); break;
1320− case FF_S_TYPE: av_log(s->avctx,AV_LOG_DEBUG,"S\n"); break;
1321− case FF_SI_TYPE: av_log(s->avctx,AV_LOG_DEBUG,"SI\n"); break;
1322− case FF_SP_TYPE: av_log(s->avctx,AV_LOG_DEBUG,"SP\n"); break;
1317+ case AV_PICTURE_TYPE_I: av_log(s->avctx,AV_LOG_DEBUG,"I\n"); break;
1318+ case AV_PICTURE_TYPE_P: av_log(s->avctx,AV_LOG_DEBUG,"P\n"); break;
1319+ case AV_PICTURE_TYPE_B: av_log(s->avctx,AV_LOG_DEBUG,"B\n"); break;
1320+ case AV_PICTURE_TYPE_S: av_log(s->avctx,AV_LOG_DEBUG,"S\n"); break;
1321+ case AV_PICTURE_TYPE_SI: av_log(s->avctx,AV_LOG_DEBUG,"SI\n"); break;
1322+ case AV_PICTURE_TYPE_SP: av_log(s->avctx,AV_LOG_DEBUG,"SP\n"); break;
13231323 }
13241324 for(y=0; y<s->mb_height; y++){
13251325 for(x=0; x<s->mb_width; x++){
@@ -1415,15 +1415,15 @@ void ff_print_debug_info(MpegEncContext *s, AVFrame *pict){ · 89 unmodified lines
14151415 for(type=0; type<3; type++){
14161416 int direction = 0;
14171417 switch (type) {
1418− case 0: if ((!(s->avctx->debug_mv&FF_DEBUG_VIS_MV_P_FOR)) || (pict->pict_type!=FF_P_TYPE))
1418+ case 0: if ((!(s->avctx->debug_mv&FF_DEBUG_VIS_MV_P_FOR)) || (pict->pict_type!=AV_PICTURE_TYPE_P))
14191419 continue;
14201420 direction = 0;
14211421 break;
1422− case 1: if ((!(s->avctx->debug_mv&FF_DEBUG_VIS_MV_B_FOR)) || (pict->pict_type!=FF_B_TYPE))
1422+ case 1: if ((!(s->avctx->debug_mv&FF_DEBUG_VIS_MV_B_FOR)) || (pict->pict_type!=AV_PICTURE_TYPE_B))
14231423 continue;
14241424 direction = 0;
14251425 break;
1426− case 2: if ((!(s->avctx->debug_mv&FF_DEBUG_VIS_MV_B_BACK)) || (pict->pict_type!=FF_B_TYPE))
1426+ case 2: if ((!(s->avctx->debug_mv&FF_DEBUG_VIS_MV_B_BACK)) || (pict->pict_type!=AV_PICTURE_TYPE_B))
14271427 continue;
14281428 direction = 1;
14291429 break;
@@ -1819,7 +1819,7 @@ static inline void MPV_motion_lowres(MpegEncContext *s, · 389 unmodified lines
18191819 ref_picture, pix_op,
18201820 s->mv[dir][1][0], s->mv[dir][1][1], block_s, mb_y);
18211821 } else {
1822− if(s->picture_structure != s->field_select[dir][0] + 1 && s->pict_type != FF_B_TYPE && !s->first_field){
1822+ if(s->picture_structure != s->field_select[dir][0] + 1 && s->pict_type != AV_PICTURE_TYPE_B && !s->first_field){
18231823 ref_picture= s->current_picture_ptr->data;
18241824 }
18251825
@@ -1833,7 +1833,7 @@ static inline void MPV_motion_lowres(MpegEncContext *s, · 7 unmodified lines
18331833 for(i=0; i<2; i++){
18341834 uint8_t ** ref2picture;
18351835
1836− if(s->picture_structure == s->field_select[dir][i] + 1 || s->pict_type == FF_B_TYPE || s->first_field){
1836+ if(s->picture_structure == s->field_select[dir][i] + 1 || s->pict_type == AV_PICTURE_TYPE_B || s->first_field){
18371837 ref2picture= ref_picture;
18381838 }else{
18391839 ref2picture= s->current_picture_ptr->data;
@@ -2029,14 +2029,14 @@ void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64], · 189 unmodified lines
20292029 else if (!is_mpeg12 && (s->h263_pred || s->h263_aic))
20302030 s->mbintra_table[mb_xy]=1;
20312031
2032− if ((s->flags&CODEC_FLAG_PSNR) || !(s->encoding && (s->intra_only || s->pict_type==FF_B_TYPE) && s->avctx->mb_decision != FF_MB_DECISION_RD)) { //FIXME precalc
2032+ if ((s->flags&CODEC_FLAG_PSNR) || !(s->encoding && (s->intra_only || s->pict_type==AV_PICTURE_TYPE_B) && s->avctx->mb_decision != FF_MB_DECISION_RD)) { //FIXME precalc
20332033 uint8_t *dest_y, *dest_cb, *dest_cr;
20342034 int dct_linesize, dct_offset;
20352035 op_pixels_func (*op_pix)[4];
20362036 qpel_mc_func (*op_qpix)[16];
20372037 const int linesize= s->current_picture.linesize[0]; //not s->linesize as this would be wrong for field pics
20382038 const int uvlinesize= s->current_picture.linesize[1];
2039− const int readable= s->pict_type != FF_B_TYPE || s->encoding || s->avctx->draw_horiz_band || lowres_flag;
2039+ const int readable= s->pict_type != AV_PICTURE_TYPE_B || s->encoding || s->avctx->draw_horiz_band || lowres_flag;
20402040 const int block_size= lowres_flag ? 8>>s->avctx->lowres : 8;
20412041
20422042 /* avoid copy if macroblock skipped in last frame too */
@@ -2049,7 +2049,7 @@ void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64], · 6 unmodified lines
20492049
20502050 if (s->mb_skipped) {
20512051 s->mb_skipped= 0;
2052− assert(s->pict_type!=FF_I_TYPE);
2052+ assert(s->pict_type!=AV_PICTURE_TYPE_I);
20532053
20542054 (*mbskip_ptr) ++; /* indicate that this time we skipped it */
20552055 if(*mbskip_ptr >99) *mbskip_ptr= 99;
@@ -2105,7 +2105,7 @@ void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64], · 49 unmodified lines
21052105 }
21062106 }else{
21072107 op_qpix= s->me.qpel_put;
2108− if ((!s->no_rounding) || s->pict_type==FF_B_TYPE){
2108+ if ((!s->no_rounding) || s->pict_type==AV_PICTURE_TYPE_B){
21092109 op_pix = s->dsp.put_pixels_tab;
21102110 }else{
21112111 op_pix = s->dsp.put_no_rnd_pixels_tab;
@@ -2123,8 +2123,8 @@ void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64], · 11 unmodified lines
21232123
21242124 /* skip dequant / idct if we are really late ;) */
21252125 if(s->avctx->skip_idct){
2126− if( (s->avctx->skip_idct >= AVDISCARD_NONREF && s->pict_type == FF_B_TYPE)
2127− ||(s->avctx->skip_idct >= AVDISCARD_NONKEY && s->pict_type != FF_I_TYPE)
2126+ if( (s->avctx->skip_idct >= AVDISCARD_NONREF && s->pict_type == AV_PICTURE_TYPE_B)
2127+ ||(s->avctx->skip_idct >= AVDISCARD_NONKEY && s->pict_type != AV_PICTURE_TYPE_I)
21282128 || s->avctx->skip_idct >= AVDISCARD_ALL)
21292129 goto skip_idct;
21302130 }
@@ -2287,14 +2287,14 @@ void ff_draw_horiz_band(MpegEncContext *s, int y, int h){ · 156 unmodified lines
22872287 AVFrame *src;
22882288 int offset[4];
22892289
2290− if(s->pict_type==FF_B_TYPE || s->low_delay || (s->avctx->slice_flags&SLICE_FLAG_CODED_ORDER))
2290+ if(s->pict_type==AV_PICTURE_TYPE_B || s->low_delay || (s->avctx->slice_flags&SLICE_FLAG_CODED_ORDER))
22912291 src= (AVFrame*)s->current_picture_ptr;
22922292 else if(s->last_picture_ptr)
22932293 src= (AVFrame*)s->last_picture_ptr;
22942294 else
22952295 return;
22962296
2297− if(s->pict_type==FF_B_TYPE && s->picture_structure == PICT_FRAME && s->out_format != FMT_H264){
2297+ if(s->pict_type==AV_PICTURE_TYPE_B && s->picture_structure == PICT_FRAME && s->out_format != FMT_H264){
22982298 offset[0]=
22992299 offset[1]=
23002300 offset[2]=
@@ -2330,7 +2330,7 @@ void ff_init_block_index(MpegEncContext *s){ //FIXME maybe rename · 29 unmodified lines
23302330 s->dest[1] = s->current_picture.data[1] + ((s->mb_x - 1) << (mb_size - s->chroma_x_shift));
23312331 s->dest[2] = s->current_picture.data[2] + ((s->mb_x - 1) << (mb_size - s->chroma_x_shift));
23322332
2333− if(!(s->pict_type==FF_B_TYPE && s->avctx->draw_horiz_band && s->picture_structure==PICT_FRAME))
2333+ if(!(s->pict_type==AV_PICTURE_TYPE_B && s->avctx->draw_horiz_band && s->picture_structure==PICT_FRAME))
23342334 {
23352335 if(s->picture_structure==PICT_FRAME){
23362336 s->dest[0] += s->mb_y * linesize << mb_size;
@@ -2609,6 +2609,6 @@ void ff_set_qscale(MpegEncContext * s, int qscale) · 272 unmodified lines
26092609
26102610 void MPV_report_decode_progress(MpegEncContext *s)
26112611 {
2612− if (s->pict_type != FF_B_TYPE && !s->partitioned_frame)
2612+ if (s->pict_type != AV_PICTURE_TYPE_B && !s->partitioned_frame)
26132613 ff_thread_report_progress((AVFrame*)s->current_picture_ptr, s->mb_y, 0);
26142614 }
libavcodec/mpegvideo.h+1−1
@@ -330,7 +330,7 @@ typedef struct MpegEncContext { · 329 unmodified lines
330330 int adaptive_quant; ///< use adaptive quantization
331331 int dquant; ///< qscale difference to prev qscale
332332 int closed_gop; ///< MPEG1/2 GOP is closed
333− int pict_type; ///< FF_I_TYPE, FF_P_TYPE, FF_B_TYPE, ...
333+ int pict_type; ///< AV_PICTURE_TYPE_I, AV_PICTURE_TYPE_P, AV_PICTURE_TYPE_B, ...
334334 int last_pict_type; //FIXME removes
335335 int last_non_b_pict_type; ///< used for mpeg4 gmc b-frames & ratecontrol
336336 int dropable;
libavcodec/mpegvideo_common.h+3−3
@@ -649,7 +649,7 @@ static av_always_inline void MPV_motion_internal(MpegEncContext *s, · 648 unmodified lines
649649
650650 prefetch_motion(s, ref_picture, dir);
651651
652− if(!is_mpeg12 && s->obmc && s->pict_type != FF_B_TYPE){
652+ if(!is_mpeg12 && s->obmc && s->pict_type != AV_PICTURE_TYPE_B){
653653 int16_t mv_cache[4][4][2];
654654 const int xy= s->mb_x + s->mb_y*s->mb_stride;
655655 const int mot_stride= s->b8_stride;
@@ -816,7 +816,7 @@ static av_always_inline void MPV_motion_internal(MpegEncContext *s, · 160 unmodified lines
816816 s->mv[dir][1][0], s->mv[dir][1][1], 8, mb_y);
817817 }
818818 } else {
819− if(s->picture_structure != s->field_select[dir][0] + 1 && s->pict_type != FF_B_TYPE && !s->first_field){
819+ if(s->picture_structure != s->field_select[dir][0] + 1 && s->pict_type != AV_PICTURE_TYPE_B && !s->first_field){
820820 ref_picture= s->current_picture_ptr->data;
821821 }
822822
@@ -831,7 +831,7 @@ static av_always_inline void MPV_motion_internal(MpegEncContext *s, · 8 unmodified lines
831831 uint8_t ** ref2picture;
832832
833833 if(s->picture_structure == s->field_select[dir][i] + 1
834− || s->pict_type == FF_B_TYPE || s->first_field){
834+ || s->pict_type == AV_PICTURE_TYPE_B || s->first_field){
835835 ref2picture= ref_picture;
836836 }else{
837837 ref2picture= s->current_picture_ptr->data;
libavcodec/mpegvideo_enc.c+37−37
@@ -968,8 +968,8 @@ static int estimate_best_b_count(MpegEncContext *s){ · 967 unmodified lines
968968 assert(scale>=0 && scale <=3);
969969
970970 // emms_c();
971− p_lambda= s->last_lambda_for[FF_P_TYPE]; //s->next_picture_ptr->quality;
972− b_lambda= s->last_lambda_for[FF_B_TYPE]; //p_lambda *FFABS(s->avctx->b_quant_factor) + s->avctx->b_quant_offset;
971+ p_lambda= s->last_lambda_for[AV_PICTURE_TYPE_P]; //s->next_picture_ptr->quality;
972+ b_lambda= s->last_lambda_for[AV_PICTURE_TYPE_B]; //p_lambda *FFABS(s->avctx->b_quant_factor) + s->avctx->b_quant_offset;
973973 if(!b_lambda) b_lambda= p_lambda; //FIXME we should do this somewhere else
974974 lambda2= (b_lambda*b_lambda + (1<<FF_LAMBDA_SHIFT)/2 ) >> FF_LAMBDA_SHIFT;
975975
@@ -1024,7 +1024,7 @@ static int estimate_best_b_count(MpegEncContext *s){ · 48 unmodified lines
10241024
10251025 c->error[0]= c->error[1]= c->error[2]= 0;
10261026
1027− input[0].pict_type= FF_I_TYPE;
1027+ input[0].pict_type= AV_PICTURE_TYPE_I;
10281028 input[0].quality= 1 * FF_QP2LAMBDA;
10291029 out_size = avcodec_encode_video(c, outbuf, outbuf_size, &input[0]);
10301030 // rd += (out_size * lambda2) >> FF_LAMBDA_SHIFT;
@@ -1032,7 +1032,7 @@ static int estimate_best_b_count(MpegEncContext *s){ · 1 unmodified line
10321032 for(i=0; i<s->max_b_frames+1; i++){
10331033 int is_p= i % (j+1) == j || i==s->max_b_frames;
10341034
1035− input[i+1].pict_type= is_p ? FF_P_TYPE : FF_B_TYPE;
1035+ input[i+1].pict_type= is_p ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_B;
10361036 input[i+1].quality= is_p ? p_lambda : b_lambda;
10371037 out_size = avcodec_encode_video(c, outbuf, outbuf_size, &input[i+1]);
10381038 rd += (out_size * lambda2) >> (FF_LAMBDA_SHIFT - 3);
@@ -1074,7 +1074,7 @@ static int select_input_picture(MpegEncContext *s){ · 35 unmodified lines
10741074 if(s->reordered_input_picture[0]==NULL && s->input_picture[0]){
10751075 if(/*s->picture_in_gop_number >= s->gop_size ||*/ s->next_picture_ptr==NULL || s->intra_only){
10761076 s->reordered_input_picture[0]= s->input_picture[0];
1077− s->reordered_input_picture[0]->pict_type= FF_I_TYPE;
1077+ s->reordered_input_picture[0]->pict_type= AV_PICTURE_TYPE_I;
10781078 s->reordered_input_picture[0]->coded_picture_number= s->coded_picture_number++;
10791079 }else{
10801080 int b_frames;
@@ -1109,7 +1109,7 @@ static int select_input_picture(MpegEncContext *s){ · 28 unmodified lines
11091109 if(pict_num >= s->rc_context.num_entries)
11101110 break;
11111111 if(!s->input_picture[i]){
1112− s->rc_context.entry[pict_num-1].new_pict_type = FF_P_TYPE;
1112+ s->rc_context.entry[pict_num-1].new_pict_type = AV_PICTURE_TYPE_P;
11131113 break;
11141114 }
11151115
@@ -1153,10 +1153,10 @@ static int select_input_picture(MpegEncContext *s){ · 37 unmodified lines
11531153
11541154 for(i= b_frames - 1; i>=0; i--){
11551155 int type= s->input_picture[i]->pict_type;
1156− if(type && type != FF_B_TYPE)
1156+ if(type && type != AV_PICTURE_TYPE_B)
11571157 b_frames= i;
11581158 }
1159− if(s->input_picture[b_frames]->pict_type == FF_B_TYPE && b_frames == s->max_b_frames){
1159+ if(s->input_picture[b_frames]->pict_type == AV_PICTURE_TYPE_B && b_frames == s->max_b_frames){
11601160 av_log(s->avctx, AV_LOG_ERROR, "warning, too many b frames in a row\n");
11611161 }
11621162
@@ -1166,29 +1166,29 @@ static int select_input_picture(MpegEncContext *s){ · 3 unmodified lines
11661166 }else{
11671167 if(s->flags & CODEC_FLAG_CLOSED_GOP)
11681168 b_frames=0;
1169− s->input_picture[b_frames]->pict_type= FF_I_TYPE;
1169+ s->input_picture[b_frames]->pict_type= AV_PICTURE_TYPE_I;
11701170 }
11711171 }
11721172
11731173 if( (s->flags & CODEC_FLAG_CLOSED_GOP)
11741174 && b_frames
1175− && s->input_picture[b_frames]->pict_type== FF_I_TYPE)
1175+ && s->input_picture[b_frames]->pict_type== AV_PICTURE_TYPE_I)
11761176 b_frames--;
11771177
11781178 s->reordered_input_picture[0]= s->input_picture[b_frames];
1179− if(s->reordered_input_picture[0]->pict_type != FF_I_TYPE)
1180− s->reordered_input_picture[0]->pict_type= FF_P_TYPE;
1179+ if(s->reordered_input_picture[0]->pict_type != AV_PICTURE_TYPE_I)
1180+ s->reordered_input_picture[0]->pict_type= AV_PICTURE_TYPE_P;
11811181 s->reordered_input_picture[0]->coded_picture_number= s->coded_picture_number++;
11821182 for(i=0; i<b_frames; i++){
11831183 s->reordered_input_picture[i+1]= s->input_picture[i];
1184− s->reordered_input_picture[i+1]->pict_type= FF_B_TYPE;
1184+ s->reordered_input_picture[i+1]->pict_type= AV_PICTURE_TYPE_B;
11851185 s->reordered_input_picture[i+1]->coded_picture_number= s->coded_picture_number++;
11861186 }
11871187 }
11881188 }
11891189 no_output_pic:
11901190 if(s->reordered_input_picture[0]){
1191− s->reordered_input_picture[0]->reference= s->reordered_input_picture[0]->pict_type!=FF_B_TYPE ? 3 : 0;
1191+ s->reordered_input_picture[0]->reference= s->reordered_input_picture[0]->pict_type!=AV_PICTURE_TYPE_B ? 3 : 0;
11921192
11931193 ff_copy_picture(&s->new_picture, s->reordered_input_picture[0]);
11941194
@@ -1296,11 +1296,11 @@ vbv_retry: · 101 unmodified lines
12961296 s->lambda_table[i]= FFMAX(s->lambda_table[i]+1, s->lambda_table[i]*(s->qscale+1) / s->qscale);
12971297 }
12981298 s->mb_skipped = 0; //done in MPV_frame_start()
1299− if(s->pict_type==FF_P_TYPE){ //done in encode_picture() so we must undo it
1299+ if(s->pict_type==AV_PICTURE_TYPE_P){ //done in encode_picture() so we must undo it
13001300 if(s->flipflop_rounding || s->codec_id == CODEC_ID_H263P || s->codec_id == CODEC_ID_MPEG4)
13011301 s->no_rounding ^= 1;
13021302 }
1303− if(s->pict_type!=FF_B_TYPE){
1303+ if(s->pict_type!=AV_PICTURE_TYPE_B){
13041304 s->time_base= s->last_time_base;
13051305 s->last_non_b_time= s->time - s->pp_time;
13061306 }
@@ -1528,7 +1528,7 @@ static av_always_inline void encode_mb_internal(MpegEncContext *s, int motion_x, · 221 unmodified lines
15281528
15291529 if(s->codec_id==CODEC_ID_MPEG4){
15301530 if(!s->mb_intra){
1531− if(s->pict_type == FF_B_TYPE){
1531+ if(s->pict_type == AV_PICTURE_TYPE_B){
15321532 if(s->dquant&1 || s->mv_dir&MV_DIRECT)
15331533 s->dquant= 0;
15341534 }
@@ -1605,7 +1605,7 @@ static av_always_inline void encode_mb_internal(MpegEncContext *s, int motion_x, · 70 unmodified lines
16051605 dest_cb = s->dest[1];
16061606 dest_cr = s->dest[2];
16071607
1608− if ((!s->no_rounding) || s->pict_type==FF_B_TYPE){
1608+ if ((!s->no_rounding) || s->pict_type==AV_PICTURE_TYPE_B){
16091609 op_pix = s->dsp.put_pixels_tab;
16101610 op_qpix= s->dsp.put_qpel_pixels_tab;
16111611 }else{
@@ -1995,7 +1995,7 @@ static int estimate_motion_thread(AVCodecContext *c, void *arg){ · 383 unmodified lines
19951995 s->block_index[3]+=2;
19961996
19971997 /* compute motion vector & mb_type and store in context */
1998− if(s->pict_type==FF_B_TYPE)
1998+ if(s->pict_type==AV_PICTURE_TYPE_B)
19991999 ff_estimate_b_frame_motion(s, s->mb_x, s->mb_y);
20002000 else
20012001 ff_estimate_p_frame_motion(s, s->mb_x, s->mb_y);
@@ -2393,7 +2393,7 @@ static int encode_thread(AVCodecContext *c, void *arg){ · 391 unmodified lines
23932393 s->mv[1][0][0] = best_s.mv[1][0][0];
23942394 s->mv[1][0][1] = best_s.mv[1][0][1];
23952395
2396− qpi = s->pict_type == FF_B_TYPE ? 2 : 0;
2396+ qpi = s->pict_type == AV_PICTURE_TYPE_B ? 2 : 0;
23972397 for(; qpi<4; qpi++){
23982398 int dquant= dquant_tab[qpi];
23992399 qp= last_qp + dquant;
@@ -2495,7 +2495,7 @@ static int encode_thread(AVCodecContext *c, void *arg){ · 95 unmodified lines
24952495 s->last_bits= put_bits_count(&s->pb);
24962496
24972497 if (CONFIG_H263_ENCODER &&
2498− s->out_format == FMT_H263 && s->pict_type!=FF_B_TYPE)
2498+ s->out_format == FMT_H263 && s->pict_type!=AV_PICTURE_TYPE_B)
24992499 ff_h263_update_motion_val(s);
25002500
25012501 if(next_block==0){ //FIXME 16 vs linesize16
@@ -2622,7 +2622,7 @@ static int encode_thread(AVCodecContext *c, void *arg){ · 120 unmodified lines
26222622 s->last_mv_dir = s->mv_dir;
26232623
26242624 if (CONFIG_H263_ENCODER &&
2625− s->out_format == FMT_H263 && s->pict_type!=FF_B_TYPE)
2625+ s->out_format == FMT_H263 && s->pict_type!=AV_PICTURE_TYPE_B)
26262626 ff_h263_update_motion_val(s);
26272627
26282628 MPV_decode_mb(s, s->block);
@@ -2660,7 +2660,7 @@ static int encode_thread(AVCodecContext *c, void *arg){ · 31 unmodified lines
26602660 }
26612661
26622662 //not beautiful here but we must write it before flushing so it has to be here
2663− if (CONFIG_MSMPEG4_ENCODER && s->msmpeg4_version && s->msmpeg4_version<4 && s->pict_type == FF_I_TYPE)
2663+ if (CONFIG_MSMPEG4_ENCODER && s->msmpeg4_version && s->msmpeg4_version<4 && s->pict_type == AV_PICTURE_TYPE_I)
26642664 msmpeg4_encode_ext_header(s);
26652665
26662666 write_slice_end(s);
@@ -2758,7 +2758,7 @@ static void set_frame_distances(MpegEncContext * s){ · 91 unmodified lines
27582758 assert(s->current_picture_ptr->pts != AV_NOPTS_VALUE);
27592759 s->time= s->current_picture_ptr->pts*s->avctx->time_base.num;
27602760
2761− if(s->pict_type==FF_B_TYPE){
2761+ if(s->pict_type==AV_PICTURE_TYPE_B){
27622762 s->pb_time= s->pp_time - (s->last_non_b_time - s->time);
27632763 assert(s->pb_time > 0 && s->pb_time < s->pp_time);
27642764 }else{
@@ -2791,10 +2791,10 @@ static int encode_picture(MpegEncContext *s, int picture_number) · 26 unmodified lines
27912791
27922792 // s->lambda= s->current_picture_ptr->quality; //FIXME qscale / ... stuff for ME rate distortion
27932793
2794− if(s->pict_type==FF_I_TYPE){
2794+ if(s->pict_type==AV_PICTURE_TYPE_I){
27952795 if(s->msmpeg4_version >= 3) s->no_rounding=1;
27962796 else s->no_rounding=0;
2797− }else if(s->pict_type!=FF_B_TYPE){
2797+ }else if(s->pict_type!=AV_PICTURE_TYPE_B){
27982798 if(s->flipflop_rounding || s->codec_id == CODEC_ID_H263P || s->codec_id == CODEC_ID_MPEG4)
27992799 s->no_rounding ^= 1;
28002800 }
@@ -2804,7 +2804,7 @@ static int encode_picture(MpegEncContext *s, int picture_number) · 3 unmodified lines
28042804 return -1;
28052805 ff_get_2pass_fcode(s);
28062806 }else if(!(s->flags & CODEC_FLAG_QSCALE)){
2807− if(s->pict_type==FF_B_TYPE)
2807+ if(s->pict_type==AV_PICTURE_TYPE_B)
28082808 s->lambda= s->last_lambda_for[s->pict_type];
28092809 else
28102810 s->lambda= s->last_lambda_for[s->last_non_b_pict_type];
@@ -2820,17 +2820,17 @@ static int encode_picture(MpegEncContext *s, int picture_number) · 9 unmodified lines
28202820 return -1;
28212821
28222822 /* Estimate motion for every MB */
2823− if(s->pict_type != FF_I_TYPE){
2823+ if(s->pict_type != AV_PICTURE_TYPE_I){
28242824 s->lambda = (s->lambda * s->avctx->me_penalty_compensation + 128)>>8;
28252825 s->lambda2= (s->lambda2* (int64_t)s->avctx->me_penalty_compensation + 128)>>8;
2826− if(s->pict_type != FF_B_TYPE && s->avctx->me_threshold==0){
2827− if((s->avctx->pre_me && s->last_non_b_pict_type==FF_I_TYPE) || s->avctx->pre_me==2){
2826+ if(s->pict_type != AV_PICTURE_TYPE_B && s->avctx->me_threshold==0){
2827+ if((s->avctx->pre_me && s->last_non_b_pict_type==AV_PICTURE_TYPE_I) || s->avctx->pre_me==2){
28282828 s->avctx->execute(s->avctx, pre_estimate_motion_thread, &s->thread_context[0], NULL, context_count, sizeof(void*));
28292829 }
28302830 }
28312831
28322832 s->avctx->execute(s->avctx, estimate_motion_thread, &s->thread_context[0], NULL, context_count, sizeof(void*));
2833− }else /* if(s->pict_type == FF_I_TYPE) */{
2833+ }else /* if(s->pict_type == AV_PICTURE_TYPE_I) */{
28342834 /* I-Frame */
28352835 for(i=0; i<s->mb_stride*s->mb_height; i++)
28362836 s->mb_type[i]= CANDIDATE_MB_TYPE_INTRA;
@@ -2847,15 +2847,15 @@ static int encode_picture(MpegEncContext *s, int picture_number) · 10 unmodified lines
28472847 s->current_picture. mb_var_sum= s->current_picture_ptr-> mb_var_sum= s->me. mb_var_sum_temp;
28482848 emms_c();
28492849
2850− if(s->me.scene_change_score > s->avctx->scenechange_threshold && s->pict_type == FF_P_TYPE){
2851− s->pict_type= FF_I_TYPE;
2850+ if(s->me.scene_change_score > s->avctx->scenechange_threshold && s->pict_type == AV_PICTURE_TYPE_P){
2851+ s->pict_type= AV_PICTURE_TYPE_I;
28522852 for(i=0; i<s->mb_stride*s->mb_height; i++)
28532853 s->mb_type[i]= CANDIDATE_MB_TYPE_INTRA;
28542854 //printf("Scene change detected, encoding as I Frame %d %d\n", s->current_picture.mb_var_sum, s->current_picture.mc_mb_var_sum);
28552855 }
28562856
28572857 if(!s->umvplus){
2858− if(s->pict_type==FF_P_TYPE || s->pict_type==FF_S_TYPE) {
2858+ if(s->pict_type==AV_PICTURE_TYPE_P || s->pict_type==AV_PICTURE_TYPE_S) {
28592859 s->f_code= ff_get_best_fcode(s, s->p_mv_table, CANDIDATE_MB_TYPE_INTER);
28602860
28612861 if(s->flags & CODEC_FLAG_INTERLACED_ME){
@@ -2877,7 +2877,7 @@ static int encode_picture(MpegEncContext *s, int picture_number) · 15 unmodified lines
28772877 }
28782878 }
28792879
2880− if(s->pict_type==FF_B_TYPE){
2880+ if(s->pict_type==AV_PICTURE_TYPE_B){
28812881 int a, b;
28822882
28832883 a = ff_get_best_fcode(s, s->b_forw_mv_table, CANDIDATE_MB_TYPE_FORWARD);
@@ -2911,7 +2911,7 @@ static int encode_picture(MpegEncContext *s, int picture_number) · 27 unmodified lines
29112911 if (estimate_qp(s, 0) < 0)
29122912 return -1;
29132913
2914− if(s->qscale < 3 && s->max_qcoeff<=128 && s->pict_type==FF_I_TYPE && !(s->flags & CODEC_FLAG_QSCALE))
2914+ if(s->qscale < 3 && s->max_qcoeff<=128 && s->pict_type==AV_PICTURE_TYPE_I && !(s->flags & CODEC_FLAG_QSCALE))
29152915 s->qscale= 3; //reduce clipping problems
29162916
29172917 if (s->out_format == FMT_MJPEG) {
@@ -2931,7 +2931,7 @@ static int encode_picture(MpegEncContext *s, int picture_number) · 13 unmodified lines
29312931
29322932 //FIXME var duplication
29332933 s->current_picture_ptr->key_frame=
2934− s->current_picture.key_frame= s->pict_type == FF_I_TYPE; //FIXME pic_ptr
2934+ s->current_picture.key_frame= s->pict_type == AV_PICTURE_TYPE_I; //FIXME pic_ptr
29352935 s->current_picture_ptr->pict_type=
29362936 s->current_picture.pict_type= s->pict_type;
29372937
libavcodec/mpegvideo_xvmc.c+3−3
@@ -110,9 +110,9 @@ int ff_xvmc_field_start(MpegEncContext *s, AVCodecContext *avctx) · 109 unmodified lines
110110 render->p_past_surface = NULL;
111111
112112 switch(s->pict_type) {
113− case FF_I_TYPE:
113+ case AV_PICTURE_TYPE_I:
114114 return 0; // no prediction from other frames
115− case FF_B_TYPE:
115+ case AV_PICTURE_TYPE_B:
116116 next = (struct xvmc_pix_fmt*)s->next_picture.data[2];
117117 if (!next)
118118 return -1;
@@ -120,7 +120,7 @@ int ff_xvmc_field_start(MpegEncContext *s, AVCodecContext *avctx) · 1 unmodified line
120120 return -1;
121121 render->p_future_surface = next->p_surface;
122122 // no return here, going to set forward prediction
123− case FF_P_TYPE:
123+ case AV_PICTURE_TYPE_P:
124124 last = (struct xvmc_pix_fmt*)s->last_picture.data[2];
125125 if (!last)
126126 last = render; // predict second field from the first
libavcodec/msmpeg4.c+14−14
@@ -308,7 +308,7 @@ static void find_best_tables(MpegEncContext * s) · 307 unmodified lines
308308 int intra_luma_count = s->ac_stats[1][0][level][run][last];
309309 int intra_chroma_count= s->ac_stats[1][1][level][run][last];
310310
311− if(s->pict_type==FF_I_TYPE){
311+ if(s->pict_type==AV_PICTURE_TYPE_I){
312312 size += intra_luma_count *rl_length[i ][level][run][last];
313313 chroma_size+= intra_chroma_count*rl_length[i+3][level][run][last];
314314 }else{
@@ -333,7 +333,7 @@ static void find_best_tables(MpegEncContext * s) · 18 unmodified lines
333333 // printf("type:%d, best:%d, qp:%d, var:%d, mcvar:%d, size:%d //\n",
334334 // s->pict_type, best, s->qscale, s->mb_var_sum, s->mc_mb_var_sum, best_size);
335335
336− if(s->pict_type==FF_P_TYPE) chroma_best= best;
336+ if(s->pict_type==AV_PICTURE_TYPE_P) chroma_best= best;
337337
338338 memset(s->ac_stats, 0, sizeof(int)*(MAX_LEVEL+1)*(MAX_RUN+1)*2*2*2);
339339
@@ -342,7 +342,7 @@ static void find_best_tables(MpegEncContext * s) · 2 unmodified lines
342342
343343 if(s->pict_type != s->last_non_b_pict_type){
344344 s->rl_table_index= 2;
345− if(s->pict_type==FF_I_TYPE)
345+ if(s->pict_type==AV_PICTURE_TYPE_I)
346346 s->rl_chroma_table_index= 1;
347347 else
348348 s->rl_chroma_table_index= 2;
@@ -369,10 +369,10 @@ void msmpeg4_encode_picture_header(MpegEncContext * s, int picture_number) · 20 unmodified lines
369369 s->use_skip_mb_code = 1; /* only if P frame */
370370 s->per_mb_rl_table = 0;
371371 if(s->msmpeg4_version==4)
372− s->inter_intra_pred= (s->width*s->height < 320*240 && s->bit_rate<=II_BITRATE && s->pict_type==FF_P_TYPE);
372+ s->inter_intra_pred= (s->width*s->height < 320*240 && s->bit_rate<=II_BITRATE && s->pict_type==AV_PICTURE_TYPE_P);
373373 //printf("%d %d %d %d %d\n", s->pict_type, s->bit_rate, s->inter_intra_pred, s->width, s->height);
374374
375− if (s->pict_type == FF_I_TYPE) {
375+ if (s->pict_type == AV_PICTURE_TYPE_I) {
376376 s->slice_height= s->mb_height/1;
377377 put_bits(&s->pb, 5, 0x16 + s->mb_height/s->slice_height);
378378
@@ -619,7 +619,7 @@ void msmpeg4_encode_mb(MpegEncContext * s, · 240 unmodified lines
619619 }
620620
621621 if(s->msmpeg4_version<=2){
622− if (s->pict_type == FF_I_TYPE) {
622+ if (s->pict_type == AV_PICTURE_TYPE_I) {
623623 put_bits(&s->pb,
624624 v2_intra_cbpc[cbp&3][1], v2_intra_cbpc[cbp&3][0]);
625625 } else {
@@ -634,7 +634,7 @@ void msmpeg4_encode_mb(MpegEncContext * s, · 8 unmodified lines
634634 ff_h263_cbpy_tab[cbp>>2][1],
635635 ff_h263_cbpy_tab[cbp>>2][0]);
636636 }else{
637− if (s->pict_type == FF_I_TYPE) {
637+ if (s->pict_type == AV_PICTURE_TYPE_I) {
638638 put_bits(&s->pb,
639639 ff_msmp4_mb_i_table[coded_cbp][1], ff_msmp4_mb_i_table[coded_cbp][0]);
640640 } else {
@@ -1094,7 +1094,7 @@ static int msmpeg4v12_decode_mb(MpegEncContext *s, DCTELEM block[6][64]) · 453 unmodified lines
10941094 {
10951095 int cbp, code, i;
10961096
1097− if (s->pict_type == FF_P_TYPE) {
1097+ if (s->pict_type == AV_PICTURE_TYPE_P) {
10981098 if (s->use_skip_mb_code) {
10991099 if (get_bits1(&s->gb)) {
11001100 /* skip mb */
@@ -1161,7 +1161,7 @@ static int msmpeg4v12_decode_mb(MpegEncContext *s, DCTELEM block[6][64]) · 60 unmodified lines
11611161 } else{
11621162 s->ac_pred = 0;
11631163 cbp|= get_vlc2(&s->gb, ff_h263_cbpy_vlc.table, CBPY_VLC_BITS, 1)<<2; //FIXME check errors
1164− if(s->pict_type==FF_P_TYPE) cbp^=0x3C;
1164+ if(s->pict_type==AV_PICTURE_TYPE_P) cbp^=0x3C;
11651165 }
11661166 }
11671167
@@ -1182,7 +1182,7 @@ static int msmpeg4v34_decode_mb(MpegEncContext *s, DCTELEM block[6][64]) · 14 unmodified lines
11821182 uint8_t *coded_val;
11831183 uint32_t * const mb_type_ptr= &s->current_picture.mb_type[ s->mb_x + s->mb_y*s->mb_stride ];
11841184
1185− if (s->pict_type == FF_P_TYPE) {
1185+ if (s->pict_type == AV_PICTURE_TYPE_P) {
11861186 if (s->use_skip_mb_code) {
11871187 if (get_bits1(&s->gb)) {
11881188 /* skip mb */
@@ -1390,15 +1390,15 @@ int msmpeg4_decode_picture_header(MpegEncContext * s) · 201 unmodified lines
13901390 }
13911391
13921392 s->pict_type = get_bits(&s->gb, 2) + 1;
1393− if (s->pict_type != FF_I_TYPE &&
1394− s->pict_type != FF_P_TYPE){
1393+ if (s->pict_type != AV_PICTURE_TYPE_I &&
1394+ s->pict_type != AV_PICTURE_TYPE_P){
13951395 av_log(s->avctx, AV_LOG_ERROR, "invalid picture type\n");
13961396 return -1;
13971397 }
13981398 #if 0
13991399 {
14001400 static int had_i=0;
1401− if(s->pict_type == FF_I_TYPE) had_i=1;
1401+ if(s->pict_type == AV_PICTURE_TYPE_I) had_i=1;
14021402 if(!had_i) return -1;
14031403 }
14041404 #endif
@@ -1408,7 +1408,7 @@ int msmpeg4_decode_picture_header(MpegEncContext * s) · 3 unmodified lines
14081408 return -1;
14091409 }
14101410
1411− if (s->pict_type == FF_I_TYPE) {
1411+ if (s->pict_type == AV_PICTURE_TYPE_I) {
14121412 code = get_bits(&s->gb, 5);
14131413 if(s->msmpeg4_version==1){
14141414 if(code==0 || code>s->mb_height){
libavcodec/mxpegdec.c+2−2
@@ -256,11 +256,11 @@ static int mxpeg_decode_frame(AVCodecContext *avctx, · 255 unmodified lines
256256 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
257257 return AVERROR(ENOMEM);
258258 }
259− jpg->picture_ptr->pict_type = FF_P_TYPE;
259+ jpg->picture_ptr->pict_type = AV_PICTURE_TYPE_P;
260260 jpg->picture_ptr->key_frame = 0;
261261 jpg->got_picture = 1;
262262 } else {
263− jpg->picture_ptr->pict_type = FF_I_TYPE;
263+ jpg->picture_ptr->pict_type = AV_PICTURE_TYPE_I;
264264 jpg->picture_ptr->key_frame = 1;
265265 }
266266
libavcodec/nuv.c+1−1
@@ -208,7 +208,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 207 unmodified lines
208208 return -1;
209209 }
210210
211− c->pic.pict_type = keyframe ? FF_I_TYPE : FF_P_TYPE;
211+ c->pic.pict_type = keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P;
212212 c->pic.key_frame = keyframe;
213213 // decompress/copy/whatever data
214214 switch (comptype) {
libavcodec/pamenc.c+1−1
@@ -40,7 +40,7 @@ static int pam_encode_frame(AVCodecContext *avctx, unsigned char *outbuf, · 39 unmodified lines
4040 }
4141
4242 *p = *pict;
43− p->pict_type = FF_I_TYPE;
43+ p->pict_type = AV_PICTURE_TYPE_I;
4444 p->key_frame = 1;
4545
4646 s->bytestream_start =
libavcodec/parser.c+2−2
@@ -72,7 +72,7 @@ AVCodecParserContext *av_parser_init(int codec_id) · 71 unmodified lines
7272 }
7373 }
7474 s->fetch_timestamp=1;
75− s->pict_type = FF_I_TYPE;
75+ s->pict_type = AV_PICTURE_TYPE_I;
7676 s->key_frame = -1;
7777 s->convergence_duration = 0;
7878 s->dts_sync_point = INT_MIN;
@@ -186,7 +186,7 @@ int av_parser_change(AVCodecParserContext *s, · 107 unmodified lines
186186 *poutbuf_size= buf_size;
187187 if(avctx->extradata){
188188 if( (keyframe && (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER))
189− /*||(s->pict_type != FF_I_TYPE && (s->flags & PARSER_FLAG_DUMP_EXTRADATA_AT_NOKEY))*/
189+ /*||(s->pict_type != AV_PICTURE_TYPE_I && (s->flags & PARSER_FLAG_DUMP_EXTRADATA_AT_NOKEY))*/
190190 /*||(? && (s->flags & PARSER_FLAG_DUMP_EXTRADATA_AT_BEGIN)*/){
191191 int size= buf_size + avctx->extradata_size;
192192 *poutbuf_size= size;
libavcodec/pcx.c+1−1
@@ -152,7 +152,7 @@ static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 151 unmodified lines
152152 return -1;
153153 }
154154
155− p->pict_type = FF_I_TYPE;
155+ p->pict_type = AV_PICTURE_TYPE_I;
156156
157157 ptr = p->data[0];
158158 stride = p->linesize[0];
libavcodec/pcxenc.c+1−1
@@ -108,7 +108,7 @@ static int pcx_encode_frame(AVCodecContext *avctx, · 107 unmodified lines
108108 const uint8_t *src;
109109
110110 *pict = *(AVFrame *)data;
111− pict->pict_type = FF_I_TYPE;
111+ pict->pict_type = AV_PICTURE_TYPE_I;
112112 pict->key_frame = 1;
113113
114114 if (avctx->width > 65535 || avctx->height > 65535) {
libavcodec/pictordec.c+1−1
@@ -148,7 +148,7 @@ static int decode_frame(AVCodecContext *avctx, · 147 unmodified lines
148148 return -1;
149149 }
150150 memset(s->frame.data[0], 0, s->height * s->frame.linesize[0]);
151− s->frame.pict_type = FF_I_TYPE;
151+ s->frame.pict_type = AV_PICTURE_TYPE_I;
152152 s->frame.palette_has_changed = 1;
153153
154154 palette = (uint32_t*)s->frame.data[1];
libavcodec/pngdec.c+1−1
@@ -485,7 +485,7 @@ static int decode_frame(AVCodecContext *avctx, · 484 unmodified lines
485485 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
486486 goto fail;
487487 }
488− p->pict_type= FF_I_TYPE;
488+ p->pict_type= AV_PICTURE_TYPE_I;
489489 p->key_frame= 1;
490490 p->interlaced_frame = !!s->interlace_type;
491491
libavcodec/pngenc.c+1−1
@@ -243,7 +243,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, · 242 unmodified lines
243243 uint8_t *top_buf = NULL;
244244
245245 *p = *pict;
246− p->pict_type= FF_I_TYPE;
246+ p->pict_type= AV_PICTURE_TYPE_I;
247247 p->key_frame= 1;
248248
249249 s->bytestream_start=
libavcodec/pnmdec.c+1−1
@@ -52,7 +52,7 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data, · 51 unmodified lines
5252 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
5353 return -1;
5454 }
55− p->pict_type = FF_I_TYPE;
55+ p->pict_type = AV_PICTURE_TYPE_I;
5656 p->key_frame = 1;
5757
5858 switch (avctx->pix_fmt) {
libavcodec/pnmenc.c+1−1
@@ -39,7 +39,7 @@ static int pnm_encode_frame(AVCodecContext *avctx, unsigned char *outbuf, · 38 unmodified lines
3939 }
4040
4141 *p = *pict;
42− p->pict_type = FF_I_TYPE;
42+ p->pict_type = AV_PICTURE_TYPE_I;
4343 p->key_frame = 1;
4444
4545 s->bytestream_start =
libavcodec/ptx.c+1−1
@@ -74,7 +74,7 @@ static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 73 unmodified lines
7474 return -1;
7575 }
7676
77− p->pict_type = FF_I_TYPE;
77+ p->pict_type = AV_PICTURE_TYPE_I;
7878
7979 ptr = p->data[0];
8080 stride = p->linesize[0];
libavcodec/qdrw.c+1−1
@@ -54,7 +54,7 @@ static int decode_frame(AVCodecContext *avctx, · 53 unmodified lines
5454 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
5555 return -1;
5656 }
57− p->pict_type= FF_I_TYPE;
57+ p->pict_type= AV_PICTURE_TYPE_I;
5858 p->key_frame= 1;
5959
6060 outdata = a->pic.data[0];
libavcodec/qtrleenc.c+2−2
@@ -295,11 +295,11 @@ static int qtrle_encode_frame(AVCodecContext *avctx, uint8_t *buf, int buf_size, · 294 unmodified lines
295295
296296 if (avctx->gop_size == 0 || (s->avctx->frame_number % avctx->gop_size) == 0) {
297297 /* I-Frame */
298− p->pict_type = FF_I_TYPE;
298+ p->pict_type = AV_PICTURE_TYPE_I;
299299 p->key_frame = 1;
300300 } else {
301301 /* P-Frame */
302− p->pict_type = FF_P_TYPE;
302+ p->pict_type = AV_PICTURE_TYPE_P;
303303 p->key_frame = 0;
304304 }
305305
libavcodec/r210dec.c+1−1
@@ -54,7 +54,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 53 unmodified lines
5454 if (avctx->get_buffer(avctx, pic) < 0)
5555 return -1;
5656
57− pic->pict_type = FF_I_TYPE;
57+ pic->pict_type = AV_PICTURE_TYPE_I;
5858 pic->key_frame = 1;
5959 dst_line = pic->data[0];
6060
libavcodec/ratecontrol.c+33−33
@@ -144,7 +144,7 @@ int ff_rate_control_init(MpegEncContext *s) · 143 unmodified lines
144144 /* init all to skipped p frames (with b frames we might have a not encoded frame at the end FIXME) */
145145 for(i=0; i<rcc->num_entries; i++){
146146 RateControlEntry *rce= &rcc->entry[i];
147− rce->pict_type= rce->new_pict_type=FF_P_TYPE;
147+ rce->pict_type= rce->new_pict_type=AV_PICTURE_TYPE_P;
148148 rce->qscale= rce->new_qscale=FF_QP2LAMBDA * 2;
149149 rce->misc_bits= s->mb_num + 10;
150150 rce->mb_var_sum= s->mb_num*100;
@@ -211,9 +211,9 @@ int ff_rate_control_init(MpegEncContext *s) · 60 unmodified lines
211211 double bits= s->avctx->rc_initial_cplx * (i/10000.0 + 1.0)*s->mb_num;
212212 RateControlEntry rce;
213213
214− if (i%((s->gop_size+3)/4)==0) rce.pict_type= FF_I_TYPE;
215− else if(i%(s->max_b_frames+1)) rce.pict_type= FF_B_TYPE;
216− else rce.pict_type= FF_P_TYPE;
214+ if (i%((s->gop_size+3)/4)==0) rce.pict_type= AV_PICTURE_TYPE_I;
215+ else if(i%(s->max_b_frames+1)) rce.pict_type= AV_PICTURE_TYPE_B;
216+ else rce.pict_type= AV_PICTURE_TYPE_P;
217217
218218 rce.new_pict_type= rce.pict_type;
219219 rce.mc_mb_var_sum= bits*s->mb_num/100000;
@@ -223,7 +223,7 @@ int ff_rate_control_init(MpegEncContext *s) · 3 unmodified lines
223223 rce.b_code = 1;
224224 rce.misc_bits= 1;
225225
226− if(s->pict_type== FF_I_TYPE){
226+ if(s->pict_type== AV_PICTURE_TYPE_I){
227227 rce.i_count = s->mb_num;
228228 rce.i_tex_bits= bits;
229229 rce.p_tex_bits= 0;
@@ -317,23 +317,23 @@ static double get_qscale(MpegEncContext *s, RateControlEntry *rce, double rate_f · 87 unmodified lines
317317 rce->p_tex_bits*rce->qscale,
318318 (rce->i_tex_bits + rce->p_tex_bits)*(double)rce->qscale,
319319 rce->mv_bits/mb_num,
320− rce->pict_type == FF_B_TYPE ? (rce->f_code + rce->b_code)*0.5 : rce->f_code,
320+ rce->pict_type == AV_PICTURE_TYPE_B ? (rce->f_code + rce->b_code)*0.5 : rce->f_code,
321321 rce->i_count/mb_num,
322322 rce->mc_mb_var_sum/mb_num,
323323 rce->mb_var_sum/mb_num,
324− rce->pict_type == FF_I_TYPE,
325− rce->pict_type == FF_P_TYPE,
326− rce->pict_type == FF_B_TYPE,
324+ rce->pict_type == AV_PICTURE_TYPE_I,
325+ rce->pict_type == AV_PICTURE_TYPE_P,
326+ rce->pict_type == AV_PICTURE_TYPE_B,
327327 rcc->qscale_sum[pict_type] / (double)rcc->frame_count[pict_type],
328328 a->qcompress,
329−/* rcc->last_qscale_for[FF_I_TYPE],
330− rcc->last_qscale_for[FF_P_TYPE],
331− rcc->last_qscale_for[FF_B_TYPE],
329+/* rcc->last_qscale_for[AV_PICTURE_TYPE_I],
330+ rcc->last_qscale_for[AV_PICTURE_TYPE_P],
331+ rcc->last_qscale_for[AV_PICTURE_TYPE_B],
332332 rcc->next_non_b_qscale,*/
333− rcc->i_cplx_sum[FF_I_TYPE] / (double)rcc->frame_count[FF_I_TYPE],
334− rcc->i_cplx_sum[FF_P_TYPE] / (double)rcc->frame_count[FF_P_TYPE],
335− rcc->p_cplx_sum[FF_P_TYPE] / (double)rcc->frame_count[FF_P_TYPE],
336− rcc->p_cplx_sum[FF_B_TYPE] / (double)rcc->frame_count[FF_B_TYPE],
333+ rcc->i_cplx_sum[AV_PICTURE_TYPE_I] / (double)rcc->frame_count[AV_PICTURE_TYPE_I],
334+ rcc->i_cplx_sum[AV_PICTURE_TYPE_P] / (double)rcc->frame_count[AV_PICTURE_TYPE_P],
335+ rcc->p_cplx_sum[AV_PICTURE_TYPE_P] / (double)rcc->frame_count[AV_PICTURE_TYPE_P],
336+ rcc->p_cplx_sum[AV_PICTURE_TYPE_B] / (double)rcc->frame_count[AV_PICTURE_TYPE_B],
337337 (rcc->i_cplx_sum[pict_type] + rcc->p_cplx_sum[pict_type]) / (double)rcc->frame_count[pict_type],
338338 0
339339 };
@@ -364,9 +364,9 @@ static double get_qscale(MpegEncContext *s, RateControlEntry *rce, double rate_f · 24 unmodified lines
364364 q= bits2qp(rce, bits);
365365
366366 /* I/B difference */
367− if (pict_type==FF_I_TYPE && s->avctx->i_quant_factor<0.0)
367+ if (pict_type==AV_PICTURE_TYPE_I && s->avctx->i_quant_factor<0.0)
368368 q= -q*s->avctx->i_quant_factor + s->avctx->i_quant_offset;
369− else if(pict_type==FF_B_TYPE && s->avctx->b_quant_factor<0.0)
369+ else if(pict_type==AV_PICTURE_TYPE_B && s->avctx->b_quant_factor<0.0)
370370 q= -q*s->avctx->b_quant_factor + s->avctx->b_quant_offset;
371371 if(q<1) q=1;
372372
@@ -377,17 +377,17 @@ static double get_diff_limited_q(MpegEncContext *s, RateControlEntry *rce, doubl · 4 unmodified lines
377377 RateControlContext *rcc= &s->rc_context;
378378 AVCodecContext *a= s->avctx;
379379 const int pict_type= rce->new_pict_type;
380− const double last_p_q = rcc->last_qscale_for[FF_P_TYPE];
380+ const double last_p_q = rcc->last_qscale_for[AV_PICTURE_TYPE_P];
381381 const double last_non_b_q= rcc->last_qscale_for[rcc->last_non_b_pict_type];
382382
383− if (pict_type==FF_I_TYPE && (a->i_quant_factor>0.0 || rcc->last_non_b_pict_type==FF_P_TYPE))
383+ if (pict_type==AV_PICTURE_TYPE_I && (a->i_quant_factor>0.0 || rcc->last_non_b_pict_type==AV_PICTURE_TYPE_P))
384384 q= last_p_q *FFABS(a->i_quant_factor) + a->i_quant_offset;
385− else if(pict_type==FF_B_TYPE && a->b_quant_factor>0.0)
385+ else if(pict_type==AV_PICTURE_TYPE_B && a->b_quant_factor>0.0)
386386 q= last_non_b_q* a->b_quant_factor + a->b_quant_offset;
387387 if(q<1) q=1;
388388
389389 /* last qscale / qdiff stuff */
390− if(rcc->last_non_b_pict_type==pict_type || pict_type!=FF_I_TYPE){
390+ if(rcc->last_non_b_pict_type==pict_type || pict_type!=AV_PICTURE_TYPE_I){
391391 double last_q= rcc->last_qscale_for[pict_type];
392392 const int maxdiff= FF_QP2LAMBDA * a->max_qdiff;
393393
@@ -397,7 +397,7 @@ static double get_diff_limited_q(MpegEncContext *s, RateControlEntry *rce, doubl · 3 unmodified lines
397397
398398 rcc->last_qscale_for[pict_type]= q; //Note we cannot do that after blurring
399399
400− if(pict_type!=FF_B_TYPE)
400+ if(pict_type!=AV_PICTURE_TYPE_B)
401401 rcc->last_non_b_pict_type= pict_type;
402402
403403 return q;
@@ -412,10 +412,10 @@ static void get_qminmax(int *qmin_ret, int *qmax_ret, MpegEncContext *s, int pic · 8 unmodified lines
412412
413413 assert(qmin <= qmax);
414414
415− if(pict_type==FF_B_TYPE){
415+ if(pict_type==AV_PICTURE_TYPE_B){
416416 qmin= (int)(qmin*FFABS(s->avctx->b_quant_factor)+s->avctx->b_quant_offset + 0.5);
417417 qmax= (int)(qmax*FFABS(s->avctx->b_quant_factor)+s->avctx->b_quant_offset + 0.5);
418− }else if(pict_type==FF_I_TYPE){
418+ }else if(pict_type==AV_PICTURE_TYPE_I){
419419 qmin= (int)(qmin*FFABS(s->avctx->i_quant_factor)+s->avctx->i_quant_offset + 0.5);
420420 qmax= (int)(qmax*FFABS(s->avctx->i_quant_factor)+s->avctx->i_quant_offset + 0.5);
421421 }
@@ -441,7 +441,7 @@ static double modify_qscale(MpegEncContext *s, RateControlEntry *rce, double q, · 19 unmodified lines
441441 get_qminmax(&qmin, &qmax, s, pict_type);
442442
443443 /* modulation */
444− if(s->avctx->rc_qmod_freq && frame_num%s->avctx->rc_qmod_freq==0 && pict_type==FF_P_TYPE)
444+ if(s->avctx->rc_qmod_freq && frame_num%s->avctx->rc_qmod_freq==0 && pict_type==AV_PICTURE_TYPE_P)
445445 q*= s->avctx->rc_qmod_amp;
446446
447447 //printf("q:%f\n", q);
@@ -684,7 +684,7 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run) · 236 unmodified lines
684684 //printf("input_pic_num:%d pic_num:%d frame_rate:%d\n", s->input_picture_number, s->picture_number, s->frame_rate);
685685 /* update predictors */
686686 if(picture_number>2 && !dry_run){
687− const int last_var= s->last_pict_type == FF_I_TYPE ? rcc->last_mb_var_sum : rcc->last_mc_mb_var_sum;
687+ const int last_var= s->last_pict_type == AV_PICTURE_TYPE_I ? rcc->last_mb_var_sum : rcc->last_mc_mb_var_sum;
688688 update_predictor(&rcc->pred[s->last_pict_type], rcc->last_qscale, sqrt(last_var), s->frame_bits);
689689 }
690690
@@ -699,7 +699,7 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run) · 8 unmodified lines
699699
700700 //FIXME add a dts field to AVFrame and ensure its set and use it here instead of reordering
701701 //but the reordering is simpler for now until h.264 b pyramid must be handeld
702− if(s->pict_type == FF_B_TYPE || s->low_delay)
702+ if(s->pict_type == AV_PICTURE_TYPE_B || s->low_delay)
703703 dts_pic= s->current_picture_ptr;
704704 else
705705 dts_pic= s->last_picture_ptr;
@@ -717,11 +717,11 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run) · 11 unmodified lines
717717 br_compensation= (a->bit_rate_tolerance - diff)/a->bit_rate_tolerance;
718718 if(br_compensation<=0.0) br_compensation=0.001;
719719
720− var= pict_type == FF_I_TYPE ? pic->mb_var_sum : pic->mc_mb_var_sum;
720+ var= pict_type == AV_PICTURE_TYPE_I ? pic->mb_var_sum : pic->mc_mb_var_sum;
721721
722722 short_term_q = 0; /* avoid warning */
723723 if(s->flags&CODEC_FLAG_PASS2){
724− if(pict_type!=FF_I_TYPE)
724+ if(pict_type!=AV_PICTURE_TYPE_I)
725725 assert(pict_type == rce->new_pict_type);
726726
727727 q= rce->new_qscale / br_compensation;
@@ -737,7 +737,7 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run) · 9 unmodified lines
737737 rce->misc_bits= 1;
738738
739739 bits= predict_size(&rcc->pred[pict_type], rce->qscale, sqrt(var));
740− if(pict_type== FF_I_TYPE){
740+ if(pict_type== AV_PICTURE_TYPE_I){
741741 rce->i_count = s->mb_num;
742742 rce->i_tex_bits= bits;
743743 rce->p_tex_bits= 0;
@@ -767,7 +767,7 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run) · 23 unmodified lines
767767 //printf("%f ", q);
768768 assert(q>0.0);
769769
770− if(pict_type==FF_P_TYPE || s->intra_only){ //FIXME type dependent blur like in 2-pass
770+ if(pict_type==AV_PICTURE_TYPE_P || s->intra_only){ //FIXME type dependent blur like in 2-pass
771771 rcc->short_term_qsum*=a->qblur;
772772 rcc->short_term_qcount*=a->qblur;
773773
@@ -842,7 +842,7 @@ static int init_pass2(MpegEncContext *s) · 68 unmodified lines
842842 complexity[rce->new_pict_type]+= (rce->i_tex_bits+ rce->p_tex_bits)*(double)rce->qscale;
843843 const_bits[rce->new_pict_type]+= rce->mv_bits + rce->misc_bits;
844844 }
845− all_const_bits= const_bits[FF_I_TYPE] + const_bits[FF_P_TYPE] + const_bits[FF_B_TYPE];
845+ all_const_bits= const_bits[AV_PICTURE_TYPE_I] + const_bits[AV_PICTURE_TYPE_P] + const_bits[AV_PICTURE_TYPE_B];
846846
847847 if(all_available_bits < all_const_bits){
848848 av_log(s->avctx, AV_LOG_ERROR, "requested bitrate is too low\n");
libavcodec/rawdec.c+1−1
@@ -92,7 +92,7 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx) · 91 unmodified lines
9292 if (!context->buffer)
9393 return -1;
9494 }
95− context->pic.pict_type = FF_I_TYPE;
95+ context->pic.pict_type = AV_PICTURE_TYPE_I;
9696 context->pic.key_frame = 1;
9797
9898 avctx->coded_frame= &context->pic;
libavcodec/rawenc.c+1−1
@@ -32,7 +32,7 @@ · 31 unmodified lines
3232 static av_cold int raw_init_encoder(AVCodecContext *avctx)
3333 {
3434 avctx->coded_frame = (AVFrame *)avctx->priv_data;
35− avctx->coded_frame->pict_type = FF_I_TYPE;
35+ avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
3636 avctx->coded_frame->key_frame = 1;
3737 avctx->bits_per_coded_sample = av_get_bits_per_pixel(&av_pix_fmt_descriptors[avctx->pix_fmt]);
3838 if(!avctx->codec_tag)
libavcodec/rv10.c+13−13
@@ -240,9 +240,9 @@ static int rv10_decode_picture_header(MpegEncContext *s) · 239 unmodified lines
240240 marker = get_bits1(&s->gb);
241241
242242 if (get_bits1(&s->gb))
243− s->pict_type = FF_P_TYPE;
243+ s->pict_type = AV_PICTURE_TYPE_P;
244244 else
245− s->pict_type = FF_I_TYPE;
245+ s->pict_type = AV_PICTURE_TYPE_I;
246246 if(!marker) av_log(s->avctx, AV_LOG_ERROR, "marker missing\n");
247247 pb_frame = get_bits1(&s->gb);
248248
@@ -259,7 +259,7 @@ static int rv10_decode_picture_header(MpegEncContext *s) · 10 unmodified lines
259259 return -1;
260260 }
261261
262− if (s->pict_type == FF_I_TYPE) {
262+ if (s->pict_type == AV_PICTURE_TYPE_I) {
263263 if (s->rv10_version == 3) {
264264 /* specific MPEG like DC coding not used */
265265 s->last_dc[0] = get_bits(&s->gb, 8);
@@ -319,16 +319,16 @@ static int rv20_decode_picture_header(MpegEncContext *s) · 53 unmodified lines
319319
320320 i= get_bits(&s->gb, 2);
321321 switch(i){
322− case 0: s->pict_type= FF_I_TYPE; break;
323− case 1: s->pict_type= FF_I_TYPE; break; //hmm ...
324− case 2: s->pict_type= FF_P_TYPE; break;
325− case 3: s->pict_type= FF_B_TYPE; break;
322+ case 0: s->pict_type= AV_PICTURE_TYPE_I; break;
323+ case 1: s->pict_type= AV_PICTURE_TYPE_I; break; //hmm ...
324+ case 2: s->pict_type= AV_PICTURE_TYPE_P; break;
325+ case 3: s->pict_type= AV_PICTURE_TYPE_B; break;
326326 default:
327327 av_log(s->avctx, AV_LOG_ERROR, "unknown frame type\n");
328328 return -1;
329329 }
330330
331− if(s->last_picture_ptr==NULL && s->pict_type==FF_B_TYPE){
331+ if(s->last_picture_ptr==NULL && s->pict_type==AV_PICTURE_TYPE_B){
332332 av_log(s->avctx, AV_LOG_ERROR, "early B pix\n");
333333 return -1;
334334 }
@@ -399,7 +399,7 @@ static int rv20_decode_picture_header(MpegEncContext *s) · 64 unmodified lines
399399 if(seq - s->time > 0x4000) seq -= 0x8000;
400400 if(seq - s->time < -0x4000) seq += 0x8000;
401401 if(seq != s->time){
402− if(s->pict_type!=FF_B_TYPE){
402+ if(s->pict_type!=AV_PICTURE_TYPE_B){
403403 s->time= seq;
404404 s->pp_time= s->time - s->last_non_b_time;
405405 s->last_non_b_time= s->time;
@@ -422,7 +422,7 @@ av_log(s->avctx, AV_LOG_DEBUG, "\n");*/ · 16 unmodified lines
422422
423423 s->f_code = 1;
424424 s->unrestricted_mv = 1;
425− s->h263_aic= s->pict_type == FF_I_TYPE;
425+ s->h263_aic= s->pict_type == AV_PICTURE_TYPE_I;
426426 // s->alt_inter_vlc=1;
427427 // s->obmc=1;
428428 // s->umvplus=1;
@@ -435,7 +435,7 @@ av_log(s->avctx, AV_LOG_DEBUG, "\n");*/ · 6 unmodified lines
435435 seq, s->mb_x, s->mb_y, s->pict_type, s->qscale, s->no_rounding);
436436 }
437437
438− assert(s->pict_type != FF_B_TYPE || !s->low_delay);
438+ assert(s->pict_type != AV_PICTURE_TYPE_B || !s->low_delay);
439439
440440 return s->mb_width*s->mb_height - mb_pos;
441441 }
@@ -616,7 +616,7 @@ static int rv10_decode_packet(AVCodecContext *avctx, · 174 unmodified lines
616616 av_log(s->avctx, AV_LOG_ERROR, "ERROR at MB %d %d\n", s->mb_x, s->mb_y);
617617 return -1;
618618 }
619− if(s->pict_type != FF_B_TYPE)
619+ if(s->pict_type != AV_PICTURE_TYPE_B)
620620 ff_h263_update_motion_val(s);
621621 MPV_decode_mb(s, s->block);
622622 if(s->loop_filter)
@@ -693,7 +693,7 @@ static int rv10_decode_frame(AVCodecContext *avctx, · 70 unmodified lines
693693 ff_er_frame_end(s);
694694 MPV_frame_end(s);
695695
696− if (s->pict_type == FF_B_TYPE || s->low_delay) {
696+ if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) {
697697 *pict= *(AVFrame*)s->current_picture_ptr;
698698 } else if (s->last_picture_ptr != NULL) {
699699 *pict= *(AVFrame*)s->last_picture_ptr;
libavcodec/rv10enc.c+2−2
@@ -36,13 +36,13 @@ void rv10_encode_picture_header(MpegEncContext *s, int picture_number) · 35 unmodified lines
3636
3737 put_bits(&s->pb, 1, 1); /* marker */
3838
39− put_bits(&s->pb, 1, (s->pict_type == FF_P_TYPE));
39+ put_bits(&s->pb, 1, (s->pict_type == AV_PICTURE_TYPE_P));
4040
4141 put_bits(&s->pb, 1, 0); /* not PB frame */
4242
4343 put_bits(&s->pb, 5, s->qscale);
4444
45− if (s->pict_type == FF_I_TYPE) {
45+ if (s->pict_type == AV_PICTURE_TYPE_I) {
4646 /* specific MPEG like DC coding not used */
4747 }
4848 /* if multiple packets per frame are sent, the position at which
libavcodec/rv20enc.c+1−1
@@ -47,7 +47,7 @@ void rv20_encode_picture_header(MpegEncContext *s, int picture_number){ · 46 unmodified lines
4747 assert(s->modified_quant==1);
4848 assert(s->loop_filter==1);
4949
50− s->h263_aic= s->pict_type == FF_I_TYPE;
50+ s->h263_aic= s->pict_type == AV_PICTURE_TYPE_I;
5151 if(s->h263_aic){
5252 s->y_dc_scale_table=
5353 s->c_dc_scale_table= ff_aic_dc_scale_table;
libavcodec/rv30.c+1−1
@@ -111,7 +111,7 @@ static int rv30_decode_mb_info(RV34DecContext *r) · 110 unmodified lines
111111 av_log(s->avctx, AV_LOG_ERROR, "dquant needed\n");
112112 code -= 6;
113113 }
114− if(s->pict_type != FF_B_TYPE)
114+ if(s->pict_type != AV_PICTURE_TYPE_B)
115115 return rv30_p_types[code];
116116 else
117117 return rv30_b_types[code];
libavcodec/rv34.c+10−10
@@ -816,7 +816,7 @@ static int rv34_decode_mv(RV34DecContext *r, int block_type) · 815 unmodified lines
816816 ZERO8x2(s->current_picture_ptr->motion_val[0][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride);
817817 return 0;
818818 case RV34_MB_SKIP:
819− if(s->pict_type == FF_P_TYPE){
819+ if(s->pict_type == AV_PICTURE_TYPE_P){
820820 ZERO8x2(s->current_picture_ptr->motion_val[0][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride);
821821 rv34_mc_1mv (r, block_type, 0, 0, 0, 2, 2, 0);
822822 break;
@@ -1055,9 +1055,9 @@ static int rv34_decode_mb_header(RV34DecContext *r, int8_t *intra_types) · 232 unmodified lines
10551055 s->current_picture_ptr->mb_type[mb_pos] = rv34_mb_type_to_lavc[r->block_type];
10561056 r->mb_type[mb_pos] = r->block_type;
10571057 if(r->block_type == RV34_MB_SKIP){
1058− if(s->pict_type == FF_P_TYPE)
1058+ if(s->pict_type == AV_PICTURE_TYPE_P)
10591059 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)
10611061 r->mb_type[mb_pos] = RV34_MB_B_DIRECT;
10621062 }
10631063 r->is16 = !!IS_INTRA16x16(s->current_picture_ptr->mb_type[mb_pos]);
@@ -1197,7 +1197,7 @@ static int rv34_decode_macroblock(RV34DecContext *r, int8_t *intra_types) · 133 unmodified lines
11971197 cbp = cbp2 = rv34_decode_mb_header(r, intra_types);
11981198 r->cbp_luma [mb_pos] = cbp;
11991199 r->cbp_chroma[mb_pos] = cbp >> 16;
1200− if(s->pict_type == FF_I_TYPE)
1200+ if(s->pict_type == AV_PICTURE_TYPE_I)
12011201 r->deblock_coefs[mb_pos] = 0xFFFF;
12021202 else
12031203 r->deblock_coefs[mb_pos] = rv34_set_deblock_coef(r) | r->cbp_luma[mb_pos];
@@ -1298,12 +1298,12 @@ static int rv34_decode_slice(RV34DecContext *r, int end, const uint8_t* buf, int · 94 unmodified lines
12981298 r->cbp_chroma = av_realloc(r->cbp_chroma, r->s.mb_stride * r->s.mb_height * sizeof(*r->cbp_chroma));
12991299 r->deblock_coefs = av_realloc(r->deblock_coefs, r->s.mb_stride * r->s.mb_height * sizeof(*r->deblock_coefs));
13001300 }
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;
13021302 if(MPV_frame_start(s, s->avctx) < 0)
13031303 return -1;
13041304 ff_er_frame_start(s);
13051305 r->cur_pts = r->si.pts;
1306− if(s->pict_type != FF_B_TYPE){
1306+ if(s->pict_type != AV_PICTURE_TYPE_B){
13071307 r->last_pts = r->next_pts;
13081308 r->next_pts = r->cur_pts;
13091309 }
@@ -1452,10 +1452,10 @@ int ff_rv34_decode_frame(AVCodecContext *avctx, · 142 unmodified lines
14521452 av_log(avctx, AV_LOG_ERROR, "First slice header is incorrect\n");
14531453 return -1;
14541454 }
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)
14561456 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)
14591459 || avctx->skip_frame >= AVDISCARD_ALL)
14601460 return buf_size;
14611461
@@ -1494,7 +1494,7 @@ int ff_rv34_decode_frame(AVCodecContext *avctx, · 32 unmodified lines
14941494 r->loop_filter(r, s->mb_height - 1);
14951495 ff_er_frame_end(s);
14961496 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) {
14981498 *pict= *(AVFrame*)s->current_picture_ptr;
14991499 } else if (s->last_picture_ptr != NULL) {
15001500 *pict= *(AVFrame*)s->last_picture_ptr;
libavcodec/rv40.c+1−1
@@ -253,7 +253,7 @@ static int rv40_decode_mb_info(RV34DecContext *r) · 252 unmodified lines
253253 prev_type = i;
254254 }
255255 }
256− if(s->pict_type == FF_P_TYPE){
256+ if(s->pict_type == AV_PICTURE_TYPE_P){
257257 prev_type = block_num_to_ptype_vlc_num[prev_type];
258258 q = get_vlc2(gb, ptype_vlc[prev_type].table, PTYPE_VLC_BITS, 1);
259259 if(q < PBTYPE_ESCAPE)
libavcodec/sgidec.c+1−1
@@ -215,7 +215,7 @@ static int decode_frame(AVCodecContext *avctx, · 214 unmodified lines
215215 return -1;
216216 }
217217
218− p->pict_type = FF_I_TYPE;
218+ p->pict_type = AV_PICTURE_TYPE_I;
219219 p->key_frame = 1;
220220 out_buf = p->data[0];
221221
libavcodec/sgienc.c+1−1
@@ -52,7 +52,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, · 51 unmodified lines
5252 unsigned char *orig_buf = buf, *end_buf = buf + buf_size;
5353
5454 *p = *(AVFrame*)data;
55− p->pict_type = FF_I_TYPE;
55+ p->pict_type = AV_PICTURE_TYPE_I;
5656 p->key_frame = 1;
5757
5858 width = avctx->width;
libavcodec/smacker.c+2−2
@@ -373,9 +373,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac · 372 unmodified lines
373373 smk->pic.palette_has_changed = buf[0] & 1;
374374 smk->pic.key_frame = !!(buf[0] & 2);
375375 if(smk->pic.key_frame)
376− smk->pic.pict_type = FF_I_TYPE;
376+ smk->pic.pict_type = AV_PICTURE_TYPE_I;
377377 else
378− smk->pic.pict_type = FF_P_TYPE;
378+ smk->pic.pict_type = AV_PICTURE_TYPE_P;
379379
380380 buf++;
381381 for(i = 0; i < 256; i++)
libavcodec/snow.c+11−11
@@ -2074,7 +2074,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac · 2073 unmodified lines
20742074 ff_init_range_decoder(c, buf, buf_size);
20752075 ff_build_rac_states(c, 0.05*(1LL<<32), 256-8);
20762076
2077− s->current_picture.pict_type= FF_I_TYPE; //FIXME I vs. P
2077+ s->current_picture.pict_type= AV_PICTURE_TYPE_I; //FIXME I vs. P
20782078 if(decode_header(s)<0)
20792079 return -1;
20802080 common_init_after_header(avctx);
@@ -3651,7 +3651,7 @@ static int ratecontrol_1pass(SnowContext *s, AVFrame *pict) · 1570 unmodified lines
36513651 coef_sum = (uint64_t)coef_sum * coef_sum >> 16;
36523652 assert(coef_sum < INT_MAX);
36533653
3654− if(pict->pict_type == FF_I_TYPE){
3654+ if(pict->pict_type == AV_PICTURE_TYPE_I){
36553655 s->m.current_picture.mb_var_sum= coef_sum;
36563656 s->m.current_picture.mc_mb_var_sum= 0;
36573657 }else{
@@ -3720,7 +3720,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, · 62 unmodified lines
37203720 if(avctx->flags&CODEC_FLAG_PASS2){
37213721 s->m.pict_type =
37223722 pict->pict_type= s->m.rc_context.entry[avctx->frame_number].new_pict_type;
3723− s->keyframe= pict->pict_type==FF_I_TYPE;
3723+ s->keyframe= pict->pict_type==AV_PICTURE_TYPE_I;
37243724 if(!(avctx->flags&CODEC_FLAG_QSCALE)) {
37253725 pict->quality= ff_rate_estimate_qscale(&s->m, 0);
37263726 if (pict->quality < 0)
@@ -3729,7 +3729,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, · 2 unmodified lines
37293729 }else{
37303730 s->keyframe= avctx->gop_size==0 || avctx->frame_number % avctx->gop_size == 0;
37313731 s->m.pict_type=
3732− pict->pict_type= s->keyframe ? FF_I_TYPE : FF_P_TYPE;
3732+ pict->pict_type= s->keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P;
37333733 }
37343734
37353735 if(s->pass1_rc && avctx->frame_number == 0)
@@ -3748,7 +3748,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, · 12 unmodified lines
37483748 s->m.current_picture_ptr= &s->m.current_picture;
37493749 s->m.last_picture.pts= s->m.current_picture.pts;
37503750 s->m.current_picture.pts= pict->pts;
3751− if(pict->pict_type == FF_P_TYPE){
3751+ if(pict->pict_type == AV_PICTURE_TYPE_P){
37523752 int block_width = (width +15)>>4;
37533753 int block_height= (height+15)>>4;
37543754 int stride= s->current_picture.linesize[0];
@@ -3797,13 +3797,13 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, · 42 unmodified lines
37973797
37983798 redo_frame:
37993799
3800− if(pict->pict_type == FF_I_TYPE)
3800+ if(pict->pict_type == AV_PICTURE_TYPE_I)
38013801 s->spatial_decomposition_count= 5;
38023802 else
38033803 s->spatial_decomposition_count= 5;
38043804
38053805 s->m.pict_type = pict->pict_type;
3806− s->qbias= pict->pict_type == FF_P_TYPE ? 2 : 0;
3806+ s->qbias= pict->pict_type == AV_PICTURE_TYPE_P ? 2 : 0;
38073807
38083808 common_init_after_header(avctx);
38093809
@@ -3836,12 +3836,12 @@ redo_frame: · 26 unmodified lines
38363836 predict_plane(s, s->spatial_idwt_buffer, plane_index, 0);
38373837
38383838 if( plane_index==0
3839− && pict->pict_type == FF_P_TYPE
3839+ && pict->pict_type == AV_PICTURE_TYPE_P
38403840 && !(avctx->flags&CODEC_FLAG_PASS2)
38413841 && s->m.me.scene_change_score > s->avctx->scenechange_threshold){
38423842 ff_init_range_encoder(c, buf, buf_size);
38433843 ff_build_rac_states(c, 0.05*(1LL<<32), 256-8);
3844− pict->pict_type= FF_I_TYPE;
3844+ pict->pict_type= AV_PICTURE_TYPE_I;
38453845 s->keyframe=1;
38463846 s->current_picture.key_frame=1;
38473847 goto redo_frame;
@@ -3887,7 +3887,7 @@ redo_frame: · 39 unmodified lines
38873887 if(!QUANTIZE2)
38883888 quantize(s, b, b->ibuf, b->buf, b->stride, s->qbias);
38893889 if(orientation==0)
3890− decorrelate(s, b, b->ibuf, b->stride, pict->pict_type == FF_P_TYPE, 0);
3890+ decorrelate(s, b, b->ibuf, b->stride, pict->pict_type == AV_PICTURE_TYPE_P, 0);
38913891 encode_subband(s, b, b->ibuf, b->parent ? b->parent->ibuf : NULL, b->stride, orientation);
38923892 assert(b->parent==NULL || b->parent->stride == b->stride*2);
38933893 if(orientation==0)
@@ -3914,7 +3914,7 @@ redo_frame: · 20 unmodified lines
39143914 predict_plane(s, s->spatial_idwt_buffer, plane_index, 1);
39153915 }else{
39163916 //ME/MC only
3917− if(pict->pict_type == FF_I_TYPE){
3917+ if(pict->pict_type == AV_PICTURE_TYPE_I){
39183918 for(y=0; y<h; y++){
39193919 for(x=0; x<w; x++){
39203920 s->current_picture.data[plane_index][y*s->current_picture.linesize[plane_index] + x]=
libavcodec/sunrast.c+1−1
@@ -107,7 +107,7 @@ static int sunrast_decode_frame(AVCodecContext *avctx, void *data, · 106 unmodified lines
107107 return -1;
108108 }
109109
110− p->pict_type = FF_I_TYPE;
110+ p->pict_type = AV_PICTURE_TYPE_I;
111111
112112 if (depth != 8 && maplength) {
113113 av_log(avctx, AV_LOG_WARNING, "useless colormap found or file is corrupted, trying to recover\n");
libavcodec/svq1dec.c+6−6
@@ -563,7 +563,7 @@ static int svq1_decode_frame_header (GetBitContext *bitbuf,MpegEncContext *s) { · 562 unmodified lines
563563 if(s->pict_type==4)
564564 return -1;
565565
566− if (s->pict_type == FF_I_TYPE) {
566+ if (s->pict_type == AV_PICTURE_TYPE_I) {
567567
568568 /* unknown fields */
569569 if (s->f_code == 0x50 || s->f_code == 0x60) {
@@ -669,10 +669,10 @@ static int svq1_decode_frame(AVCodecContext *avctx, · 99 unmodified lines
669669
670670 //FIXME this avoids some confusion for "B frames" without 2 references
671671 //this should be removed after libavcodec can handle more flexible picture types & ordering
672− if(s->pict_type==FF_B_TYPE && s->last_picture_ptr==NULL) return buf_size;
672+ if(s->pict_type==AV_PICTURE_TYPE_B && s->last_picture_ptr==NULL) return buf_size;
673673
674− if( (avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type==FF_B_TYPE)
675− ||(avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type!=FF_I_TYPE)
674+ if( (avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type==AV_PICTURE_TYPE_B)
675+ ||(avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type!=AV_PICTURE_TYPE_I)
676676 || avctx->skip_frame >= AVDISCARD_ALL)
677677 return buf_size;
678678
@@ -699,13 +699,13 @@ static int svq1_decode_frame(AVCodecContext *avctx, · 20 unmodified lines
699699
700700 current = s->current_picture.data[i];
701701
702− if(s->pict_type==FF_B_TYPE){
702+ if(s->pict_type==AV_PICTURE_TYPE_B){
703703 previous = s->next_picture.data[i];
704704 }else{
705705 previous = s->last_picture.data[i];
706706 }
707707
708− if (s->pict_type == FF_I_TYPE) {
708+ if (s->pict_type == AV_PICTURE_TYPE_I) {
709709 /* keyframe */
710710 for (y=0; y < height; y+=16) {
711711 for (x=0; x < width; x+=16) {
libavcodec/svq1enc.c+7−7
@@ -86,7 +86,7 @@ static void svq1_write_header(SVQ1Context *s, int frame_type) · 85 unmodified lines
8686 /* frame type */
8787 put_bits(&s->pb, 2, frame_type - 1);
8888
89− if (frame_type == FF_I_TYPE) {
89+ if (frame_type == AV_PICTURE_TYPE_I) {
9090
9191 /* no checksum since frame code is 0x20 */
9292
@@ -280,7 +280,7 @@ static int svq1_encode_plane(SVQ1Context *s, int plane, unsigned char *src_plane · 187 unmodified lines
280280 block_width = (width + 15) / 16;
281281 block_height = (height + 15) / 16;
282282
283− if(s->picture.pict_type == FF_P_TYPE){
283+ if(s->picture.pict_type == AV_PICTURE_TYPE_P){
284284 s->m.avctx= s->avctx;
285285 s->m.current_picture_ptr= &s->m.current_picture;
286286 s->m.last_picture_ptr = &s->m.last_picture;
@@ -382,11 +382,11 @@ static int svq1_encode_plane(SVQ1Context *s, int plane, unsigned char *src_plane · 95 unmodified lines
382382 ff_init_block_index(&s->m);
383383 ff_update_block_index(&s->m);
384384
385− if(s->picture.pict_type == FF_I_TYPE || (s->m.mb_type[x + y*s->m.mb_stride]&CANDIDATE_MB_TYPE_INTRA)){
385+ if(s->picture.pict_type == AV_PICTURE_TYPE_I || (s->m.mb_type[x + y*s->m.mb_stride]&CANDIDATE_MB_TYPE_INTRA)){
386386 for(i=0; i<6; i++){
387387 init_put_bits(&s->reorder_pb[i], reorder_buffer[0][i], 7*32);
388388 }
389− if(s->picture.pict_type == FF_P_TYPE){
389+ if(s->picture.pict_type == AV_PICTURE_TYPE_P){
390390 const uint8_t *vlc= ff_svq1_block_type_vlc[SVQ1_BLOCK_INTRA];
391391 put_bits(&s->reorder_pb[5], vlc[1], vlc[0]);
392392 score[0]= vlc[1]*lambda;
@@ -401,7 +401,7 @@ static int svq1_encode_plane(SVQ1Context *s, int plane, unsigned char *src_plane · 8 unmodified lines
401401
402402 best=0;
403403
404− if(s->picture.pict_type == FF_P_TYPE){
404+ if(s->picture.pict_type == AV_PICTURE_TYPE_P){
405405 const uint8_t *vlc= ff_svq1_block_type_vlc[SVQ1_BLOCK_INTER];
406406 int mx, my, pred_x, pred_y, dxy;
407407 int16_t *motion_ptr;
@@ -528,8 +528,8 @@ static int svq1_encode_frame(AVCodecContext *avctx, unsigned char *buf, · 120 unmodified lines
528528 init_put_bits(&s->pb, buf, buf_size);
529529
530530 *p = *pict;
531− p->pict_type = avctx->gop_size && avctx->frame_number % avctx->gop_size ? FF_P_TYPE : FF_I_TYPE;
532− p->key_frame = p->pict_type == FF_I_TYPE;
531+ p->pict_type = avctx->gop_size && avctx->frame_number % avctx->gop_size ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I;
532+ p->key_frame = p->pict_type == AV_PICTURE_TYPE_I;
533533
534534 svq1_write_header(s, p->pict_type);
535535 for(i=0; i<3; i++){
libavcodec/svq3.c+21−21
@@ -438,10 +438,10 @@ static int svq3_decode_mb(H264Context *h, unsigned int mb_type) · 437 unmodified lines
438438 h->topright_samples_available = 0xFFFF;
439439
440440 if (mb_type == 0) { /* SKIP */
441− if (s->pict_type == FF_P_TYPE || s->next_picture.mb_type[mb_xy] == -1) {
441+ if (s->pict_type == AV_PICTURE_TYPE_P || s->next_picture.mb_type[mb_xy] == -1) {
442442 svq3_mc_dir_part(s, 16*s->mb_x, 16*s->mb_y, 16, 16, 0, 0, 0, 0, 0, 0);
443443
444− if (s->pict_type == FF_B_TYPE) {
444+ if (s->pict_type == AV_PICTURE_TYPE_B) {
445445 svq3_mc_dir_part(s, 16*s->mb_x, 16*s->mb_y, 16, 16, 0, 0, 0, 0, 1, 1);
446446 }
447447
@@ -502,15 +502,15 @@ static int svq3_decode_mb(H264Context *h, unsigned int mb_type) · 54 unmodified lines
502502 }else
503503 memset(&h->ref_cache[m][scan8[0] - 1*8 - 1], PART_NOT_AVAILABLE, 8);
504504
505− if (s->pict_type != FF_B_TYPE)
505+ if (s->pict_type != AV_PICTURE_TYPE_B)
506506 break;
507507 }
508508
509509 /* decode motion vector(s) and form prediction(s) */
510− if (s->pict_type == FF_P_TYPE) {
510+ if (s->pict_type == AV_PICTURE_TYPE_P) {
511511 if (svq3_mc_dir(h, (mb_type - 1), mode, 0, 0) < 0)
512512 return -1;
513− } else { /* FF_B_TYPE */
513+ } else { /* AV_PICTURE_TYPE_B */
514514 if (mb_type != 2) {
515515 if (svq3_mc_dir(h, 0, mode, 0, 0) < 0)
516516 return -1;
@@ -609,11 +609,11 @@ static int svq3_decode_mb(H264Context *h, unsigned int mb_type) · 92 unmodified lines
609609 mb_type = MB_TYPE_INTRA16x16;
610610 }
611611
612− if (!IS_INTER(mb_type) && s->pict_type != FF_I_TYPE) {
612+ if (!IS_INTER(mb_type) && s->pict_type != AV_PICTURE_TYPE_I) {
613613 for (i = 0; i < 4; i++) {
614614 memset(s->current_picture.motion_val[0][b_xy + i*h->b_stride], 0, 4*2*sizeof(int16_t));
615615 }
616− if (s->pict_type == FF_B_TYPE) {
616+ if (s->pict_type == AV_PICTURE_TYPE_B) {
617617 for (i = 0; i < 4; i++) {
618618 memset(s->current_picture.motion_val[1][b_xy + i*h->b_stride], 0, 4*2*sizeof(int16_t));
619619 }
@@ -622,12 +622,12 @@ static int svq3_decode_mb(H264Context *h, unsigned int mb_type) · 2 unmodified lines
622622 if (!IS_INTRA4x4(mb_type)) {
623623 memset(h->intra4x4_pred_mode+h->mb2br_xy[mb_xy], DC_PRED, 8);
624624 }
625− if (!IS_SKIP(mb_type) || s->pict_type == FF_B_TYPE) {
625+ if (!IS_SKIP(mb_type) || s->pict_type == AV_PICTURE_TYPE_B) {
626626 memset(h->non_zero_count_cache + 8, 0, 4*9*sizeof(uint8_t));
627627 s->dsp.clear_blocks(h->mb);
628628 }
629629
630− if (!IS_INTRA16x16(mb_type) && (!IS_SKIP(mb_type) || s->pict_type == FF_B_TYPE)) {
630+ if (!IS_INTRA16x16(mb_type) && (!IS_SKIP(mb_type) || s->pict_type == AV_PICTURE_TYPE_B)) {
631631 if ((vlc = svq3_get_ue_golomb(&s->gb)) >= 48){
632632 av_log(h->s.avctx, AV_LOG_ERROR, "cbp_vlc=%d\n", vlc);
633633 return -1;
@@ -635,7 +635,7 @@ static int svq3_decode_mb(H264Context *h, unsigned int mb_type) · 1 unmodified line
635635
636636 cbp = IS_INTRA(mb_type) ? golomb_to_intra4x4_cbp[vlc] : golomb_to_inter_cbp[vlc];
637637 }
638− if (IS_INTRA16x16(mb_type) || (s->pict_type != FF_I_TYPE && s->adaptive_quant && cbp)) {
638+ if (IS_INTRA16x16(mb_type) || (s->pict_type != AV_PICTURE_TYPE_I && s->adaptive_quant && cbp)) {
639639 s->qscale += svq3_get_se_golomb(&s->gb);
640640
641641 if (s->qscale > 31){
@@ -947,18 +947,18 @@ static int svq3_decode_frame(AVCodecContext *avctx, · 305 unmodified lines
947947
948948 /* for skipping the frame */
949949 s->current_picture.pict_type = s->pict_type;
950− s->current_picture.key_frame = (s->pict_type == FF_I_TYPE);
950+ s->current_picture.key_frame = (s->pict_type == AV_PICTURE_TYPE_I);
951951
952952 /* Skip B-frames if we do not have reference frames. */
953− if (s->last_picture_ptr == NULL && s->pict_type == FF_B_TYPE)
953+ if (s->last_picture_ptr == NULL && s->pict_type == AV_PICTURE_TYPE_B)
954954 return 0;
955− if ( (avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type == FF_B_TYPE)
956− ||(avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type != FF_I_TYPE)
955+ if ( (avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type == AV_PICTURE_TYPE_B)
956+ ||(avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type != AV_PICTURE_TYPE_I)
957957 || avctx->skip_frame >= AVDISCARD_ALL)
958958 return 0;
959959
960960 if (s->next_p_frame_damaged) {
961− if (s->pict_type == FF_B_TYPE)
961+ if (s->pict_type == AV_PICTURE_TYPE_B)
962962 return 0;
963963 else
964964 s->next_p_frame_damaged = 0;
@@ -967,7 +967,7 @@ static int svq3_decode_frame(AVCodecContext *avctx, · 2 unmodified lines
967967 if (ff_h264_frame_start(h) < 0)
968968 return -1;
969969
970− if (s->pict_type == FF_B_TYPE) {
970+ if (s->pict_type == AV_PICTURE_TYPE_B) {
971971 h->frame_num_offset = (h->slice_num - h->prev_frame_num);
972972
973973 if (h->frame_num_offset < 0) {
@@ -1016,9 +1016,9 @@ static int svq3_decode_frame(AVCodecContext *avctx, · 42 unmodified lines
10161016
10171017 mb_type = svq3_get_ue_golomb(&s->gb);
10181018
1019− if (s->pict_type == FF_I_TYPE) {
1019+ if (s->pict_type == AV_PICTURE_TYPE_I) {
10201020 mb_type += 8;
1021− } else if (s->pict_type == FF_B_TYPE && mb_type >= 4) {
1021+ } else if (s->pict_type == AV_PICTURE_TYPE_B && mb_type >= 4) {
10221022 mb_type += 4;
10231023 }
10241024 if (mb_type > 33 || svq3_decode_mb(h, mb_type)) {
@@ -1030,9 +1030,9 @@ static int svq3_decode_frame(AVCodecContext *avctx, · 5 unmodified lines
10301030 ff_h264_hl_decode_mb (h);
10311031 }
10321032
1033− if (s->pict_type != FF_B_TYPE && !s->low_delay) {
1033+ if (s->pict_type != AV_PICTURE_TYPE_B && !s->low_delay) {
10341034 s->current_picture.mb_type[s->mb_x + s->mb_y*s->mb_stride] =
1035− (s->pict_type == FF_P_TYPE && mb_type < 8) ? (mb_type - 1) : -1;
1035+ (s->pict_type == AV_PICTURE_TYPE_P && mb_type < 8) ? (mb_type - 1) : -1;
10361036 }
10371037 }
10381038
@@ -1041,7 +1041,7 @@ static int svq3_decode_frame(AVCodecContext *avctx, · 2 unmodified lines
10411041
10421042 MPV_frame_end(s);
10431043
1044− if (s->pict_type == FF_B_TYPE || s->low_delay) {
1044+ if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) {
10451045 *(AVFrame *) data = *(AVFrame *) &s->current_picture;
10461046 } else {
10471047 *(AVFrame *) data = *(AVFrame *) &s->last_picture;
libavcodec/targaenc.c+1−1
@@ -90,7 +90,7 @@ static int targa_encode_frame(AVCodecContext *avctx, · 89 unmodified lines
9090 return AVERROR(EINVAL);
9191 }
9292
93− p->pict_type= FF_I_TYPE;
93+ p->pict_type= AV_PICTURE_TYPE_I;
9494 p->key_frame= 1;
9595
9696 /* zero out the header and only set applicable fields */
libavcodec/tiffenc.c+1−1
@@ -221,7 +221,7 @@ static int encode_frame(AVCodecContext * avctx, unsigned char *buf, · 220 unmodified lines
221221 s->buf_size = buf_size;
222222
223223 *p = *pict;
224− p->pict_type = FF_I_TYPE;
224+ p->pict_type = AV_PICTURE_TYPE_I;
225225 p->key_frame = 1;
226226 avctx->coded_frame= &s->picture;
227227
libavcodec/tmv.c+1−1
@@ -59,7 +59,7 @@ static int tmv_decode_frame(AVCodecContext *avctx, void *data, · 58 unmodified lines
5959 return -1;
6060 }
6161
62− tmv->pic.pict_type = FF_I_TYPE;
62+ tmv->pic.pict_type = AV_PICTURE_TYPE_I;
6363 tmv->pic.key_frame = 1;
6464 dst = tmv->pic.data[0];
6565
libavcodec/truemotion2.c+2−2
@@ -807,9 +807,9 @@ static int decode_frame(AVCodecContext *avctx, · 806 unmodified lines
807807 }
808808 p->key_frame = tm2_decode_blocks(l, p);
809809 if(p->key_frame)
810− p->pict_type = FF_I_TYPE;
810+ p->pict_type = AV_PICTURE_TYPE_I;
811811 else
812− p->pict_type = FF_P_TYPE;
812+ p->pict_type = AV_PICTURE_TYPE_P;
813813
814814 l->cur = !l->cur;
815815 *data_size = sizeof(AVFrame);
libavcodec/txd.c+1−1
@@ -89,7 +89,7 @@ static int txd_decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 88 unmodified lines
8989 return -1;
9090 }
9191
92− p->pict_type = FF_I_TYPE;
92+ p->pict_type = AV_PICTURE_TYPE_I;
9393
9494 ptr = p->data[0];
9595 stride = p->linesize[0];
libavcodec/v210dec.c+1−1
@@ -63,7 +63,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 62 unmodified lines
6363 y = (uint16_t*)pic->data[0];
6464 u = (uint16_t*)pic->data[1];
6565 v = (uint16_t*)pic->data[2];
66− pic->pict_type = FF_I_TYPE;
66+ pic->pict_type = AV_PICTURE_TYPE_I;
6767 pic->key_frame = 1;
6868
6969 #define READ_PIXELS(a, b, c) \
libavcodec/v210enc.c+1−1
@@ -43,7 +43,7 @@ static av_cold int encode_init(AVCodecContext *avctx) · 42 unmodified lines
4343 avctx->coded_frame = avcodec_alloc_frame();
4444
4545 avctx->coded_frame->key_frame = 1;
46− avctx->coded_frame->pict_type = FF_I_TYPE;
46+ avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
4747
4848 return 0;
4949 }
libavcodec/v210x.c+1−1
@@ -63,7 +63,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac · 62 unmodified lines
6363 udst= (uint16_t *)pic->data[1];
6464 vdst= (uint16_t *)pic->data[2];
6565 yend= ydst + width;
66− pic->pict_type= FF_I_TYPE;
66+ pic->pict_type= AV_PICTURE_TYPE_I;
6767 pic->key_frame= 1;
6868
6969 for(;;){
libavcodec/vaapi_h264.c+1−1
@@ -312,7 +312,7 @@ static int decode_slice(AVCodecContext *avctx, · 311 unmodified lines
312312 slice_param->slice_data_bit_offset = get_bits_count(&h->s.gb) + 8; /* bit buffer started beyond nal_unit_type */
313313 slice_param->first_mb_in_slice = (s->mb_y >> FIELD_OR_MBAFF_PICTURE) * s->mb_width + s->mb_x;
314314 slice_param->slice_type = ff_h264_get_slice_type(h);
315− slice_param->direct_spatial_mv_pred_flag = h->slice_type == FF_B_TYPE ? h->direct_spatial_mv_pred : 0;
315+ slice_param->direct_spatial_mv_pred_flag = h->slice_type == AV_PICTURE_TYPE_B ? h->direct_spatial_mv_pred : 0;
316316 slice_param->num_ref_idx_l0_active_minus1 = h->list_count > 0 ? h->ref_count[0] - 1 : 0;
317317 slice_param->num_ref_idx_l1_active_minus1 = h->list_count > 1 ? h->ref_count[1] - 1 : 0;
318318 slice_param->cabac_init_idc = h->cabac_init_idc;
libavcodec/vaapi_mpeg2.c+2−2
@@ -72,10 +72,10 @@ static int vaapi_mpeg2_start_frame(AVCodecContext *avctx, av_unused const uint8_ · 71 unmodified lines
7272 pic_param->picture_coding_extension.bits.is_first_field = mpeg2_get_is_frame_start(s);
7373
7474 switch (s->pict_type) {
75− case FF_B_TYPE:
75+ case AV_PICTURE_TYPE_B:
7676 pic_param->backward_reference_picture = ff_vaapi_get_surface_id(&s->next_picture);
7777 // fall-through
78− case FF_P_TYPE:
78+ case AV_PICTURE_TYPE_P:
7979 pic_param->forward_reference_picture = ff_vaapi_get_surface_id(&s->last_picture);
8080 break;
8181 }
libavcodec/vaapi_mpeg4.c+4−4
@@ -78,8 +78,8 @@ static int vaapi_mpeg4_start_frame(AVCodecContext *avctx, av_unused const uint8_ · 77 unmodified lines
7878 }
7979 pic_param->quant_precision = s->quant_precision;
8080 pic_param->vop_fields.value = 0; /* reset all bits */
81− pic_param->vop_fields.bits.vop_coding_type = s->pict_type - FF_I_TYPE;
82− pic_param->vop_fields.bits.backward_reference_vop_coding_type = s->pict_type == FF_B_TYPE ? s->next_picture.pict_type - FF_I_TYPE : 0;
81+ pic_param->vop_fields.bits.vop_coding_type = s->pict_type - AV_PICTURE_TYPE_I;
82+ pic_param->vop_fields.bits.backward_reference_vop_coding_type = s->pict_type == AV_PICTURE_TYPE_B ? s->next_picture.pict_type - AV_PICTURE_TYPE_I : 0;
8383 pic_param->vop_fields.bits.vop_rounding_type = s->no_rounding;
8484 pic_param->vop_fields.bits.intra_dc_vlc_thr = mpeg4_get_intra_dc_vlc_thr(s);
8585 pic_param->vop_fields.bits.top_field_first = s->top_field_first;
@@ -92,9 +92,9 @@ static int vaapi_mpeg4_start_frame(AVCodecContext *avctx, av_unused const uint8_ · 6 unmodified lines
9292 pic_param->TRB = s->pb_time;
9393 pic_param->TRD = s->pp_time;
9494
95− if (s->pict_type == FF_B_TYPE)
95+ if (s->pict_type == AV_PICTURE_TYPE_B)
9696 pic_param->backward_reference_picture = ff_vaapi_get_surface_id(&s->next_picture);
97− if (s->pict_type != FF_I_TYPE)
97+ if (s->pict_type != AV_PICTURE_TYPE_I)
9898 pic_param->forward_reference_picture = ff_vaapi_get_surface_id(&s->last_picture);
9999
100100 /* Fill in VAIQMatrixBufferMPEG4 */
libavcodec/vaapi_vc1.c+19−19
@@ -42,7 +42,7 @@ static inline int vc1_has_MVTYPEMB_bitplane(VC1Context *v) · 41 unmodified lines
4242 {
4343 if (v->mv_type_is_raw)
4444 return 0;
45− return (v->s.pict_type == FF_P_TYPE &&
45+ return (v->s.pict_type == AV_PICTURE_TYPE_P &&
4646 (v->mv_mode == MV_PMODE_MIXED_MV ||
4747 (v->mv_mode == MV_PMODE_INTENSITY_COMP &&
4848 v->mv_mode2 == MV_PMODE_MIXED_MV)));
@@ -53,8 +53,8 @@ static inline int vc1_has_SKIPMB_bitplane(VC1Context *v) · 4 unmodified lines
5353 {
5454 if (v->skip_is_raw)
5555 return 0;
56− return (v->s.pict_type == FF_P_TYPE ||
57− (v->s.pict_type == FF_B_TYPE && !v->bi_type));
56+ return (v->s.pict_type == AV_PICTURE_TYPE_P ||
57+ (v->s.pict_type == AV_PICTURE_TYPE_B && !v->bi_type));
5858 }
5959
6060 /** Check whether the DIRECTMB bitplane is present */
@@ -62,7 +62,7 @@ static inline int vc1_has_DIRECTMB_bitplane(VC1Context *v) · 1 unmodified line
6262 {
6363 if (v->dmb_is_raw)
6464 return 0;
65− return v->s.pict_type == FF_B_TYPE && !v->bi_type;
65+ return v->s.pict_type == AV_PICTURE_TYPE_B && !v->bi_type;
6666 }
6767
6868 /** Check whether the ACPRED bitplane is present */
@@ -71,8 +71,8 @@ static inline int vc1_has_ACPRED_bitplane(VC1Context *v) · 2 unmodified lines
7171 if (v->acpred_is_raw)
7272 return 0;
7373 return (v->profile == PROFILE_ADVANCED &&
74− (v->s.pict_type == FF_I_TYPE ||
75− (v->s.pict_type == FF_B_TYPE && v->bi_type)));
74+ (v->s.pict_type == AV_PICTURE_TYPE_I ||
75+ (v->s.pict_type == AV_PICTURE_TYPE_B && v->bi_type)));
7676 }
7777
7878 /** Check whether the OVERFLAGS bitplane is present */
@@ -81,8 +81,8 @@ static inline int vc1_has_OVERFLAGS_bitplane(VC1Context *v) · 2 unmodified lines
8181 if (v->overflg_is_raw)
8282 return 0;
8383 return (v->profile == PROFILE_ADVANCED &&
84− (v->s.pict_type == FF_I_TYPE ||
85− (v->s.pict_type == FF_B_TYPE && v->bi_type)) &&
84+ (v->s.pict_type == AV_PICTURE_TYPE_I ||
85+ (v->s.pict_type == AV_PICTURE_TYPE_B && v->bi_type)) &&
8686 (v->overlap && v->pq <= 8) &&
8787 v->condover == CONDOVER_SELECT);
8888 }
@@ -92,9 +92,9 @@ static int vc1_get_PTYPE(VC1Context *v) · 3 unmodified lines
9292 {
9393 MpegEncContext * const s = &v->s;
9494 switch (s->pict_type) {
95− case FF_I_TYPE: return 0;
96− case FF_P_TYPE: return v->p_frame_skipped ? 4 : 1;
97− case FF_B_TYPE: return v->bi_type ? 3 : 2;
95+ case AV_PICTURE_TYPE_I: return 0;
96+ case AV_PICTURE_TYPE_P: return v->p_frame_skipped ? 4 : 1;
97+ case AV_PICTURE_TYPE_B: return v->bi_type ? 3 : 2;
9898 }
9999 return 0;
100100 }
@@ -102,8 +102,8 @@ static int vc1_get_PTYPE(VC1Context *v) · 1 unmodified line
102102 /** Reconstruct bitstream MVMODE (7.1.1.32) */
103103 static inline VAMvModeVC1 vc1_get_MVMODE(VC1Context *v)
104104 {
105− if (v->s.pict_type == FF_P_TYPE ||
106− (v->s.pict_type == FF_B_TYPE && !v->bi_type))
105+ if (v->s.pict_type == AV_PICTURE_TYPE_P ||
106+ (v->s.pict_type == AV_PICTURE_TYPE_B && !v->bi_type))
107107 return get_VAMvModeVC1(v->mv_mode);
108108 return 0;
109109 }
@@ -111,7 +111,7 @@ static inline VAMvModeVC1 vc1_get_MVMODE(VC1Context *v) · 1 unmodified line
111111 /** Reconstruct bitstream MVMODE2 (7.1.1.33) */
112112 static inline VAMvModeVC1 vc1_get_MVMODE2(VC1Context *v)
113113 {
114− if (v->s.pict_type == FF_P_TYPE && v->mv_mode == MV_PMODE_INTENSITY_COMP)
114+ if (v->s.pict_type == AV_PICTURE_TYPE_P && v->mv_mode == MV_PMODE_INTENSITY_COMP)
115115 return get_VAMvModeVC1(v->mv_mode2);
116116 return 0;
117117 }
@@ -245,10 +245,10 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t · 127 unmodified lines
245245 pic_param->transform_fields.bits.intra_transform_dc_table = v->s.dc_table_index;
246246
247247 switch (s->pict_type) {
248− case FF_B_TYPE:
248+ case AV_PICTURE_TYPE_B:
249249 pic_param->backward_reference_picture = ff_vaapi_get_surface_id(&s->next_picture);
250250 // fall-through
251− case FF_P_TYPE:
251+ case AV_PICTURE_TYPE_P:
252252 pic_param->forward_reference_picture = ff_vaapi_get_surface_id(&s->last_picture);
253253 break;
254254 }
@@ -259,12 +259,12 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t · 4 unmodified lines
259259 int x, y, n;
260260
261261 switch (s->pict_type) {
262− case FF_P_TYPE:
262+ case AV_PICTURE_TYPE_P:
263263 ff_bp[0] = pic_param->bitplane_present.flags.bp_direct_mb ? v->direct_mb_plane : NULL;
264264 ff_bp[1] = pic_param->bitplane_present.flags.bp_skip_mb ? s->mbskip_table : NULL;
265265 ff_bp[2] = pic_param->bitplane_present.flags.bp_mv_type_mb ? v->mv_type_mb_plane : NULL;
266266 break;
267− case FF_B_TYPE:
267+ case AV_PICTURE_TYPE_B:
268268 if (!v->bi_type) {
269269 ff_bp[0] = pic_param->bitplane_present.flags.bp_direct_mb ? v->direct_mb_plane : NULL;
270270 ff_bp[1] = pic_param->bitplane_present.flags.bp_skip_mb ? s->mbskip_table : NULL;
@@ -272,7 +272,7 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t · 1 unmodified line
272272 break;
273273 }
274274 /* fall-through (BI-type) */
275− case FF_I_TYPE:
275+ case AV_PICTURE_TYPE_I:
276276 ff_bp[0] = NULL; /* XXX: interlaced frame (FIELDTX plane) */
277277 ff_bp[1] = pic_param->bitplane_present.flags.bp_ac_pred ? v->acpred_plane : NULL;
278278 ff_bp[2] = pic_param->bitplane_present.flags.bp_overflags ? v->over_flags_plane : NULL;
libavcodec/vc1.c+34−34
@@ -612,29 +612,29 @@ int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb) · 611 unmodified lines
612612 v->s.pict_type = get_bits1(gb);
613613 if (v->s.avctx->max_b_frames) {
614614 if (!v->s.pict_type) {
615− if (get_bits1(gb)) v->s.pict_type = FF_I_TYPE;
616− else v->s.pict_type = FF_B_TYPE;
617− } else v->s.pict_type = FF_P_TYPE;
618− } else v->s.pict_type = v->s.pict_type ? FF_P_TYPE : FF_I_TYPE;
615+ if (get_bits1(gb)) v->s.pict_type = AV_PICTURE_TYPE_I;
616+ else v->s.pict_type = AV_PICTURE_TYPE_B;
617+ } else v->s.pict_type = AV_PICTURE_TYPE_P;
618+ } else v->s.pict_type = v->s.pict_type ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I;
619619
620620 v->bi_type = 0;
621− if(v->s.pict_type == FF_B_TYPE) {
621+ if(v->s.pict_type == AV_PICTURE_TYPE_B) {
622622 v->bfraction_lut_index = get_vlc2(gb, ff_vc1_bfraction_vlc.table, VC1_BFRACTION_VLC_BITS, 1);
623623 v->bfraction = ff_vc1_bfraction_lut[v->bfraction_lut_index];
624624 if(v->bfraction == 0) {
625− v->s.pict_type = FF_BI_TYPE;
625+ v->s.pict_type = AV_PICTURE_TYPE_BI;
626626 }
627627 }
628− if(v->s.pict_type == FF_I_TYPE || v->s.pict_type == FF_BI_TYPE)
628+ if(v->s.pict_type == AV_PICTURE_TYPE_I || v->s.pict_type == AV_PICTURE_TYPE_BI)
629629 skip_bits(gb, 7); // skip buffer fullness
630630
631631 if(v->parse_only)
632632 return 0;
633633
634634 /* calculate RND */
635− if(v->s.pict_type == FF_I_TYPE || v->s.pict_type == FF_BI_TYPE)
635+ if(v->s.pict_type == AV_PICTURE_TYPE_I || v->s.pict_type == AV_PICTURE_TYPE_BI)
636636 v->rnd = 1;
637− if(v->s.pict_type == FF_P_TYPE)
637+ if(v->s.pict_type == AV_PICTURE_TYPE_P)
638638 v->rnd ^= 1;
639639
640640 /* Quantizer stuff */
@@ -661,18 +661,18 @@ int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb) · 20 unmodified lines
661661 v->k_y = v->mvrange + 8; //k_y can be 8 9 10 11
662662 v->range_x = 1 << (v->k_x - 1);
663663 v->range_y = 1 << (v->k_y - 1);
664− if (v->multires && v->s.pict_type != FF_B_TYPE) v->respic = get_bits(gb, 2);
664+ if (v->multires && v->s.pict_type != AV_PICTURE_TYPE_B) v->respic = get_bits(gb, 2);
665665
666− if(v->res_x8 && (v->s.pict_type == FF_I_TYPE || v->s.pict_type == FF_BI_TYPE)){
666+ if(v->res_x8 && (v->s.pict_type == AV_PICTURE_TYPE_I || v->s.pict_type == AV_PICTURE_TYPE_BI)){
667667 v->x8_type = get_bits1(gb);
668668 }else v->x8_type = 0;
669669 //av_log(v->s.avctx, AV_LOG_INFO, "%c Frame: QP=[%i]%i (+%i/2) %i\n",
670−// (v->s.pict_type == FF_P_TYPE) ? 'P' : ((v->s.pict_type == FF_I_TYPE) ? 'I' : 'B'), pqindex, v->pq, v->halfpq, v->rangeredfrm);
670+// (v->s.pict_type == AV_PICTURE_TYPE_P) ? 'P' : ((v->s.pict_type == AV_PICTURE_TYPE_I) ? 'I' : 'B'), pqindex, v->pq, v->halfpq, v->rangeredfrm);
671671
672− if(v->s.pict_type == FF_I_TYPE || v->s.pict_type == FF_P_TYPE) v->use_ic = 0;
672+ if(v->s.pict_type == AV_PICTURE_TYPE_I || v->s.pict_type == AV_PICTURE_TYPE_P) v->use_ic = 0;
673673
674674 switch(v->s.pict_type) {
675− case FF_P_TYPE:
675+ case AV_PICTURE_TYPE_P:
676676 if (v->pq < 5) v->tt_index = 0;
677677 else if(v->pq < 13) v->tt_index = 1;
678678 else v->tt_index = 2;
@@ -755,7 +755,7 @@ int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb) · 76 unmodified lines
755755 v->ttfrm = TT_8X8;
756756 }
757757 break;
758− case FF_B_TYPE:
758+ case AV_PICTURE_TYPE_B:
759759 if (v->pq < 5) v->tt_index = 0;
760760 else if(v->pq < 13) v->tt_index = 1;
761761 else v->tt_index = 2;
@@ -801,7 +801,7 @@ int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb) · 39 unmodified lines
801801 {
802802 /* AC Syntax */
803803 v->c_ac_table_index = decode012(gb);
804− if (v->s.pict_type == FF_I_TYPE || v->s.pict_type == FF_BI_TYPE)
804+ if (v->s.pict_type == AV_PICTURE_TYPE_I || v->s.pict_type == AV_PICTURE_TYPE_BI)
805805 {
806806 v->y_ac_table_index = decode012(gb);
807807 }
@@ -809,8 +809,8 @@ int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb) · 1 unmodified line
809809 v->s.dc_table_index = get_bits1(gb);
810810 }
811811
812− if(v->s.pict_type == FF_BI_TYPE) {
813− v->s.pict_type = FF_B_TYPE;
812+ if(v->s.pict_type == AV_PICTURE_TYPE_BI) {
813+ v->s.pict_type = AV_PICTURE_TYPE_B;
814814 v->bi_type = 1;
815815 }
816816 return 0;
@@ -833,19 +833,19 @@ int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb) · 16 unmodified lines
833833 }
834834 switch(get_unary(gb, 0, 4)) {
835835 case 0:
836− v->s.pict_type = FF_P_TYPE;
836+ v->s.pict_type = AV_PICTURE_TYPE_P;
837837 break;
838838 case 1:
839− v->s.pict_type = FF_B_TYPE;
839+ v->s.pict_type = AV_PICTURE_TYPE_B;
840840 break;
841841 case 2:
842− v->s.pict_type = FF_I_TYPE;
842+ v->s.pict_type = AV_PICTURE_TYPE_I;
843843 break;
844844 case 3:
845− v->s.pict_type = FF_BI_TYPE;
845+ v->s.pict_type = AV_PICTURE_TYPE_BI;
846846 break;
847847 case 4:
848− v->s.pict_type = FF_P_TYPE; // skipped pic
848+ v->s.pict_type = AV_PICTURE_TYPE_P; // skipped pic
849849 v->p_frame_skipped = 1;
850850 return 0;
851851 }
@@ -867,11 +867,11 @@ int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb) · 15 unmodified lines
867867 if(v->interlace)
868868 v->uvsamp = get_bits1(gb);
869869 if(v->finterpflag) v->interpfrm = get_bits1(gb);
870− if(v->s.pict_type == FF_B_TYPE) {
870+ if(v->s.pict_type == AV_PICTURE_TYPE_B) {
871871 v->bfraction_lut_index = get_vlc2(gb, ff_vc1_bfraction_vlc.table, VC1_BFRACTION_VLC_BITS, 1);
872872 v->bfraction = ff_vc1_bfraction_lut[v->bfraction_lut_index];
873873 if(v->bfraction == 0) {
874− v->s.pict_type = FF_BI_TYPE; /* XXX: should not happen here */
874+ v->s.pict_type = AV_PICTURE_TYPE_BI; /* XXX: should not happen here */
875875 }
876876 }
877877 pqindex = get_bits(gb, 5);
@@ -895,14 +895,14 @@ int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb) · 17 unmodified lines
895895 if(v->postprocflag)
896896 v->postproc = get_bits(gb, 2);
897897
898− if(v->s.pict_type == FF_I_TYPE || v->s.pict_type == FF_P_TYPE) v->use_ic = 0;
898+ if(v->s.pict_type == AV_PICTURE_TYPE_I || v->s.pict_type == AV_PICTURE_TYPE_P) v->use_ic = 0;
899899
900900 if(v->parse_only)
901901 return 0;
902902
903903 switch(v->s.pict_type) {
904− case FF_I_TYPE:
905− case FF_BI_TYPE:
904+ case AV_PICTURE_TYPE_I:
905+ case AV_PICTURE_TYPE_BI:
906906 status = bitplane_decoding(v->acpred_plane, &v->acpred_is_raw, v);
907907 if (status < 0) return -1;
908908 av_log(v->s.avctx, AV_LOG_DEBUG, "ACPRED plane encoding: "
@@ -918,7 +918,7 @@ int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb) · 9 unmodified lines
918918 }
919919 }
920920 break;
921− case FF_P_TYPE:
921+ case AV_PICTURE_TYPE_P:
922922 if (v->extended_mv) v->mvrange = get_unary(gb, 0, 3);
923923 else v->mvrange = 0;
924924 v->k_x = v->mvrange + 9 + (v->mvrange >> 1); //k_x can be 9 10 12 13
@@ -1007,7 +1007,7 @@ int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb) · 82 unmodified lines
10071007 v->ttfrm = TT_8X8;
10081008 }
10091009 break;
1010− case FF_B_TYPE:
1010+ case AV_PICTURE_TYPE_B:
10111011 if (v->extended_mv) v->mvrange = get_unary(gb, 0, 3);
10121012 else v->mvrange = 0;
10131013 v->k_x = v->mvrange + 9 + (v->mvrange >> 1); //k_x can be 9 10 12 13
@@ -1058,20 +1058,20 @@ int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb) · 44 unmodified lines
10581058
10591059 /* AC Syntax */
10601060 v->c_ac_table_index = decode012(gb);
1061− if (v->s.pict_type == FF_I_TYPE || v->s.pict_type == FF_BI_TYPE)
1061+ if (v->s.pict_type == AV_PICTURE_TYPE_I || v->s.pict_type == AV_PICTURE_TYPE_BI)
10621062 {
10631063 v->y_ac_table_index = decode012(gb);
10641064 }
10651065 /* DC Syntax */
10661066 v->s.dc_table_index = get_bits1(gb);
1067− if ((v->s.pict_type == FF_I_TYPE || v->s.pict_type == FF_BI_TYPE) && v->dquant) {
1067+ if ((v->s.pict_type == AV_PICTURE_TYPE_I || v->s.pict_type == AV_PICTURE_TYPE_BI) && v->dquant) {
10681068 av_log(v->s.avctx, AV_LOG_DEBUG, "VOP DQuant info\n");
10691069 vop_dquant_decoding(v);
10701070 }
10711071
10721072 v->bi_type = 0;
1073− if(v->s.pict_type == FF_BI_TYPE) {
1074− v->s.pict_type = FF_B_TYPE;
1073+ if(v->s.pict_type == AV_PICTURE_TYPE_BI) {
1074+ v->s.pict_type = AV_PICTURE_TYPE_B;
10751075 v->bi_type = 1;
10761076 }
10771077 return 0;
libavcodec/vc1_parser.c+3−3
@@ -67,9 +67,9 @@ static void vc1_extract_headers(AVCodecParserContext *s, AVCodecContext *avctx, · 66 unmodified lines
6767 else
6868 vc1_parse_frame_header_adv(&vpc->v, &gb);
6969
70− /* keep FF_BI_TYPE internal to VC1 */
71− if (vpc->v.s.pict_type == FF_BI_TYPE)
72− s->pict_type = FF_B_TYPE;
70+ /* keep AV_PICTURE_TYPE_BI internal to VC1 */
71+ if (vpc->v.s.pict_type == AV_PICTURE_TYPE_BI)
72+ s->pict_type = AV_PICTURE_TYPE_B;
7373 else
7474 s->pict_type = vpc->v.s.pict_type;
7575
libavcodec/vc1dec.c+12−12
@@ -203,7 +203,7 @@ static void vc1_mc_1mv(VC1Context *v, int dir) · 202 unmodified lines
203203 my = s->mv[dir][0][1];
204204
205205 // 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) {
207207 s->current_picture.motion_val[1][s->block_index[0]][0] = mx;
208208 s->current_picture.motion_val[1][s->block_index[0]][1] = my;
209209 }
@@ -3061,7 +3061,7 @@ static void vc1_decode_skip_blocks(VC1Context *v) · 2851 unmodified lines
30613061 ff_draw_horiz_band(s, s->mb_y * 16, 16);
30623062 s->first_slice_line = 0;
30633063 }
3064− s->pict_type = FF_P_TYPE;
3064+ s->pict_type = AV_PICTURE_TYPE_P;
30653065 }
30663066
30673067 static void vc1_decode_blocks(VC1Context *v, int mby_start, int mby_end)
@@ -3072,19 +3072,19 @@ static void vc1_decode_blocks(VC1Context *v, int mby_start, int mby_end) · 4 unmodified lines
30723072 ff_intrax8_decode_picture(&v->x8, 2*v->pq+v->halfpq, v->pq*(!v->pquantizer) );
30733073 }else{
30743074 switch(v->s.pict_type) {
3075− case FF_I_TYPE:
3075+ case AV_PICTURE_TYPE_I:
30763076 if(v->profile == PROFILE_ADVANCED)
30773077 vc1_decode_i_blocks_adv(v, mby_start, mby_end);
30783078 else
30793079 vc1_decode_i_blocks(v);
30803080 break;
3081− case FF_P_TYPE:
3081+ case AV_PICTURE_TYPE_P:
30823082 if(v->p_frame_skipped)
30833083 vc1_decode_skip_blocks(v);
30843084 else
30853085 vc1_decode_p_blocks(v, mby_start, mby_end);
30863086 break;
3087− case FF_B_TYPE:
3087+ case AV_PICTURE_TYPE_B:
30883088 if(v->bi_type){
30893089 if(v->profile == PROFILE_ADVANCED)
30903090 vc1_decode_i_blocks_adv(v, mby_start, mby_end);
@@ -3498,7 +3498,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, · 407 unmodified lines
34983498 }
34993499 }
35003500
3501− if (v->res_sprite && s->pict_type!=FF_I_TYPE) {
3501+ if (v->res_sprite && s->pict_type!=AV_PICTURE_TYPE_I) {
35023502 av_log(v->s.avctx, AV_LOG_WARNING, "Sprite decoder: expected I-frame\n");
35033503 }
35043504
@@ -3513,20 +3513,20 @@ static int vc1_decode_frame(AVCodecContext *avctx, · 8 unmodified lines
35133513
35143514 // for skipping the frame
35153515 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;
35173517
35183518 /* 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)){
35203520 goto err;
35213521 }
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)
35243524 || avctx->skip_frame >= AVDISCARD_ALL) {
35253525 goto end;
35263526 }
35273527
35283528 if(s->next_p_frame_damaged){
3529− if(s->pict_type==FF_B_TYPE)
3529+ if(s->pict_type==AV_PICTURE_TYPE_B)
35303530 goto end;
35313531 else
35323532 s->next_p_frame_damaged=0;
@@ -3570,7 +3570,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, · 37 unmodified lines
35703570
35713571 assert(s->current_picture.pict_type == s->current_picture_ptr->pict_type);
35723572 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) {
35743574 *pict= *(AVFrame*)s->current_picture_ptr;
35753575 } else if (s->last_picture_ptr != NULL) {
35763576 *pict= *(AVFrame*)s->last_picture_ptr;
libavcodec/vcr1.c+2−2
@@ -61,7 +61,7 @@ static int decode_frame(AVCodecContext *avctx, · 60 unmodified lines
6161 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
6262 return -1;
6363 }
64− p->pict_type= FF_I_TYPE;
64+ p->pict_type= AV_PICTURE_TYPE_I;
6565 p->key_frame= 1;
6666
6767 for(i=0; i<16; i++){
@@ -127,7 +127,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, · 59 unmodified lines
127127 int size;
128128
129129 *p = *pict;
130− p->pict_type= FF_I_TYPE;
130+ p->pict_type= AV_PICTURE_TYPE_I;
131131 p->key_frame= 1;
132132
133133 emms_c();
libavcodec/vdpau.c+6−6
@@ -225,12 +225,12 @@ void ff_vdpau_mpeg_picture_complete(MpegEncContext *s, const uint8_t *buf, · 224 unmodified lines
225225 render->info.mpeg.backward_reference = VDP_INVALID_HANDLE;
226226
227227 switch(s->pict_type){
228− case FF_B_TYPE:
228+ case AV_PICTURE_TYPE_B:
229229 next = (struct vdpau_render_state *)s->next_picture.data[0];
230230 assert(next);
231231 render->info.mpeg.backward_reference = next->surface;
232232 // no return here, going to set forward prediction
233− case FF_P_TYPE:
233+ case AV_PICTURE_TYPE_P:
234234 last = (struct vdpau_render_state *)s->last_picture.data[0];
235235 if (!last) // FIXME: Does this test make sense?
236236 last = render; // predict second field from the first
@@ -295,12 +295,12 @@ void ff_vdpau_vc1_decode_picture(MpegEncContext *s, const uint8_t *buf, · 58 unmodified lines
295295 render->info.vc1.picture_type = s->pict_type - 1 + s->pict_type / 3;
296296
297297 switch(s->pict_type){
298− case FF_B_TYPE:
298+ case AV_PICTURE_TYPE_B:
299299 next = (struct vdpau_render_state *)s->next_picture.data[0];
300300 assert(next);
301301 render->info.vc1.backward_reference = next->surface;
302302 // no break here, going to set forward prediction
303− case FF_P_TYPE:
303+ case AV_PICTURE_TYPE_P:
304304 last = (struct vdpau_render_state *)s->last_picture.data[0];
305305 if (!last) // FIXME: Does this test make sense?
306306 last = render; // predict second field from the first
@@ -351,13 +351,13 @@ void ff_vdpau_mpeg4_decode_picture(MpegEncContext *s, const uint8_t *buf, · 44 unmodified lines
351351 render->info.mpeg4.backward_reference = VDP_INVALID_HANDLE;
352352
353353 switch (s->pict_type) {
354− case FF_B_TYPE:
354+ case AV_PICTURE_TYPE_B:
355355 next = (struct vdpau_render_state *)s->next_picture.data[0];
356356 assert(next);
357357 render->info.mpeg4.backward_reference = next->surface;
358358 render->info.mpeg4.vop_coding_type = 2;
359359 // no break here, going to set forward prediction
360− case FF_P_TYPE:
360+ case AV_PICTURE_TYPE_P:
361361 last = (struct vdpau_render_state *)s->last_picture.data[0];
362362 assert(last);
363363 render->info.mpeg4.forward_reference = last->surface;
libavcodec/vmnc.c+2−2
@@ -301,7 +301,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac · 300 unmodified lines
301301 }
302302
303303 c->pic.key_frame = 0;
304− c->pic.pict_type = FF_P_TYPE;
304+ c->pic.pict_type = AV_PICTURE_TYPE_P;
305305
306306 //restore screen after cursor
307307 if(c->screendta) {
@@ -374,7 +374,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac · 66 unmodified lines
374374 break;
375375 case MAGIC_WMVi: // ServerInitialization struct
376376 c->pic.key_frame = 1;
377− c->pic.pict_type = FF_I_TYPE;
377+ c->pic.pict_type = AV_PICTURE_TYPE_I;
378378 depth = *src++;
379379 if(depth != c->bpp) {
380380 av_log(avctx, AV_LOG_INFO, "Depth mismatch. Container %i bpp, Frame data: %i bpp\n", c->bpp, depth);
libavcodec/vp3.c+2−2
@@ -1876,7 +1876,7 @@ static int vp3_decode_frame(AVCodecContext *avctx, · 1875 unmodified lines
18761876 return buf_size;
18771877
18781878 s->current_frame.reference = 3;
1879− s->current_frame.pict_type = s->keyframe ? FF_I_TYPE : FF_P_TYPE;
1879+ s->current_frame.pict_type = s->keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P;
18801880 if (ff_thread_get_buffer(avctx, &s->current_frame) < 0) {
18811881 av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
18821882 goto error;
@@ -1908,7 +1908,7 @@ static int vp3_decode_frame(AVCodecContext *avctx, · 25 unmodified lines
19081908 av_log(s->avctx, AV_LOG_WARNING, "vp3: first frame not a keyframe\n");
19091909
19101910 s->golden_frame.reference = 3;
1911− s->golden_frame.pict_type = FF_I_TYPE;
1911+ s->golden_frame.pict_type = AV_PICTURE_TYPE_I;
19121912 if (ff_thread_get_buffer(avctx, &s->golden_frame) < 0) {
19131913 av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
19141914 goto error;
libavcodec/vp3_parser.c+2−2
@@ -26,9 +26,9 @@ static int parse(AVCodecParserContext *s, · 25 unmodified lines
2626 const uint8_t *buf, int buf_size)
2727 {
2828 if(avctx->codec_id == CODEC_ID_THEORA)
29− s->pict_type= (buf[0]&0x40) ? FF_P_TYPE : FF_I_TYPE;
29+ s->pict_type= (buf[0]&0x40) ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I;
3030 else
31− s->pict_type= (buf[0]&0x80) ? FF_P_TYPE : FF_I_TYPE;
31+ s->pict_type= (buf[0]&0x80) ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I;
3232
3333 *poutbuf = buf;
3434 *poutbuf_size = buf_size;
libavcodec/vp56.c+2−2
@@ -526,12 +526,12 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 525 unmodified lines
526526 }
527527
528528 if (p->key_frame) {
529− p->pict_type = FF_I_TYPE;
529+ p->pict_type = AV_PICTURE_TYPE_I;
530530 s->default_models_init(s);
531531 for (block=0; block<s->mb_height*s->mb_width; block++)
532532 s->macroblocks[block].type = VP56_MB_INTRA;
533533 } else {
534− p->pict_type = FF_P_TYPE;
534+ p->pict_type = AV_PICTURE_TYPE_P;
535535 vp56_parse_mb_type_models(s);
536536 s->parse_vector_models(s);
537537 s->mb_type = VP56_MB_INTER_NOVEC_PF;
libavcodec/vp8.c+1−1
@@ -1493,7 +1493,7 @@ static int vp8_decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 1492 unmodified lines
14931493 avctx->release_buffer(avctx, curframe);
14941494
14951495 curframe->key_frame = s->keyframe;
1496− curframe->pict_type = s->keyframe ? FF_I_TYPE : FF_P_TYPE;
1496+ curframe->pict_type = s->keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P;
14971497 curframe->reference = referenced ? 3 : 0;
14981498 if ((ret = avctx->get_buffer(avctx, curframe))) {
14991499 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed!\n");
libavcodec/vp8_parser.c+1−1
@@ -25,7 +25,7 @@ static int parse(AVCodecParserContext *s, · 24 unmodified lines
2525 const uint8_t **poutbuf, int *poutbuf_size,
2626 const uint8_t *buf, int buf_size)
2727 {
28− s->pict_type= (buf[0]&0x01) ? FF_P_TYPE : FF_I_TYPE;
28+ s->pict_type= (buf[0]&0x01) ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I;
2929
3030 *poutbuf = buf;
3131 *poutbuf_size = buf_size;
libavcodec/wmv2dec.c+4−4
@@ -120,7 +120,7 @@ int ff_wmv2_decode_picture_header(MpegEncContext * s) · 119 unmodified lines
120120 decode_ext_header(w);
121121
122122 s->pict_type = get_bits1(&s->gb) + 1;
123− if(s->pict_type == FF_I_TYPE){
123+ if(s->pict_type == AV_PICTURE_TYPE_I){
124124 code = get_bits(&s->gb, 7);
125125 av_log(s->avctx, AV_LOG_DEBUG, "I7:%X/\n", code);
126126 }
@@ -135,7 +135,7 @@ int ff_wmv2_decode_secondary_picture_header(MpegEncContext * s) · 8 unmodified lines
135135 {
136136 Wmv2Context * const w= (Wmv2Context*)s;
137137
138− if (s->pict_type == FF_I_TYPE) {
138+ if (s->pict_type == AV_PICTURE_TYPE_I) {
139139 if(w->j_type_bit) w->j_type= get_bits1(&s->gb);
140140 else w->j_type= 0; //FIXME check
141141
@@ -342,7 +342,7 @@ int ff_wmv2_decode_mb(MpegEncContext *s, DCTELEM block[6][64]) · 200 unmodified lines
342342
343343 if(w->j_type) return 0;
344344
345− if (s->pict_type == FF_P_TYPE) {
345+ if (s->pict_type == AV_PICTURE_TYPE_P) {
346346 if(IS_SKIP(s->current_picture.mb_type[s->mb_y * s->mb_stride + s->mb_x])){
347347 /* skip mb */
348348 s->mb_intra = 0;
@@ -419,7 +419,7 @@ int ff_wmv2_decode_mb(MpegEncContext *s, DCTELEM block[6][64]) · 70 unmodified lines
419419 }
420420 }
421421 } else {
422−//if(s->pict_type==FF_P_TYPE)
422+//if(s->pict_type==AV_PICTURE_TYPE_P)
423423 // printf("%d%d ", s->inter_intra_pred, cbp);
424424 //printf("I at %d %d %d %06X\n", s->mb_x, s->mb_y, ((cbp&3)? 1 : 0) +((cbp&0x3C)? 2 : 0), show_bits(&s->gb, 24));
425425 s->ac_pred = get_bits1(&s->gb);
libavcodec/wmv2enc.c+3−3
@@ -72,7 +72,7 @@ int ff_wmv2_encode_picture_header(MpegEncContext * s, int picture_number) · 71 unmodified lines
7272 Wmv2Context * const w= (Wmv2Context*)s;
7373
7474 put_bits(&s->pb, 1, s->pict_type - 1);
75− if(s->pict_type == FF_I_TYPE){
75+ if(s->pict_type == AV_PICTURE_TYPE_I){
7676 put_bits(&s->pb, 7, 0);
7777 }
7878 put_bits(&s->pb, 5, s->qscale);
@@ -87,7 +87,7 @@ int ff_wmv2_encode_picture_header(MpegEncContext * s, int picture_number) · 8 unmodified lines
8787
8888 assert(s->flipflop_rounding);
8989
90− if (s->pict_type == FF_I_TYPE) {
90+ if (s->pict_type == AV_PICTURE_TYPE_I) {
9191 assert(s->no_rounding==1);
9292 if(w->j_type_bit) put_bits(&s->pb, 1, w->j_type);
9393
@@ -191,7 +191,7 @@ void ff_wmv2_encode_mb(MpegEncContext * s, · 97 unmodified lines
191191 coded_cbp |= val << (5 - i);
192192 }
193193
194− if (s->pict_type == FF_I_TYPE) {
194+ if (s->pict_type == AV_PICTURE_TYPE_I) {
195195 put_bits(&s->pb,
196196 ff_msmp4_mb_i_table[coded_cbp][1], ff_msmp4_mb_i_table[coded_cbp][0]);
197197 } else {
libavcodec/xl.c+1−1
@@ -60,7 +60,7 @@ static int decode_frame(AVCodecContext *avctx, · 59 unmodified lines
6060 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
6161 return -1;
6262 }
63− p->pict_type= FF_I_TYPE;
63+ p->pict_type= AV_PICTURE_TYPE_I;
6464 p->key_frame= 1;
6565
6666 Y = a->pic.data[0];
libavcodec/zmbv.c+2−2
@@ -500,11 +500,11 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac · 499 unmodified lines
500500 }
501501 if(c->flags & ZMBV_KEYFRAME) {
502502 c->pic.key_frame = 1;
503− c->pic.pict_type = FF_I_TYPE;
503+ c->pic.pict_type = AV_PICTURE_TYPE_I;
504504 c->decode_intra(c);
505505 } else {
506506 c->pic.key_frame = 0;
507− c->pic.pict_type = FF_P_TYPE;
507+ c->pic.pict_type = AV_PICTURE_TYPE_P;
508508 if(c->decomp_len)
509509 c->decode_xor(c);
510510 }
libavcodec/zmbvenc.c+1−1
@@ -134,7 +134,7 @@ static int encode_frame(AVCodecContext *avctx, uint8_t *buf, int buf_size, void · 133 unmodified lines
134134 if(c->curfrm == c->keyint)
135135 c->curfrm = 0;
136136 *p = *pict;
137− p->pict_type= keyframe ? FF_I_TYPE : FF_P_TYPE;
137+ p->pict_type= keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P;
138138 p->key_frame= keyframe;
139139 chpal = !keyframe && memcmp(p->data[1], c->pal2, 1024);
140140
libavformat/gxfenc.c+2−2
@@ -834,10 +834,10 @@ static int gxf_write_media_preamble(AVFormatContext *s, AVPacket *pkt, int size) · 833 unmodified lines
834834 avio_wb16(pb, size / 2);
835835 } else if (st->codec->codec_id == CODEC_ID_MPEG2VIDEO) {
836836 int frame_type = gxf_parse_mpeg_frame(sc, pkt->data, pkt->size);
837− if (frame_type == FF_I_TYPE) {
837+ if (frame_type == AV_PICTURE_TYPE_I) {
838838 avio_w8(pb, 0x0d);
839839 sc->iframes++;
840− } else if (frame_type == FF_B_TYPE) {
840+ } else if (frame_type == AV_PICTURE_TYPE_B) {
841841 avio_w8(pb, 0x0f);
842842 sc->bframes++;
843843 } else {
libavformat/utils.c+3−3
@@ -896,7 +896,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, · 895 unmodified lines
896896 if((s->flags & AVFMT_FLAG_IGNDTS) && pkt->pts != AV_NOPTS_VALUE)
897897 pkt->dts= AV_NOPTS_VALUE;
898898
899− if (st->codec->codec_id != CODEC_ID_H264 && pc && pc->pict_type == FF_B_TYPE)
899+ if (st->codec->codec_id != CODEC_ID_H264 && pc && pc->pict_type == AV_PICTURE_TYPE_B)
900900 //FIXME Set low_delay = 0 when has_b_frames = 1
901901 st->codec->has_b_frames = 1;
902902
@@ -912,7 +912,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, · 9 unmodified lines
912912 /* XXX: need has_b_frame, but cannot get it if the codec is
913913 not initialized */
914914 if (delay &&
915− pc && pc->pict_type != FF_B_TYPE)
915+ pc && pc->pict_type != AV_PICTURE_TYPE_B)
916916 presentation_delayed = 1;
917917
918918 if(pkt->pts != AV_NOPTS_VALUE && pkt->dts != AV_NOPTS_VALUE && pkt->dts > pkt->pts && st->pts_wrap_bits<63
@@ -1040,7 +1040,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, · 121 unmodified lines
10401040 /* keyframe computation */
10411041 if (pc->key_frame == 1)
10421042 pkt->flags |= AV_PKT_FLAG_KEY;
1043− else if (pc->key_frame == -1 && pc->pict_type == FF_I_TYPE)
1043+ else if (pc->key_frame == -1 && pc->pict_type == AV_PICTURE_TYPE_I)
10441044 pkt->flags |= AV_PKT_FLAG_KEY;
10451045 }
10461046 if (pc)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t