History

avcodec: Remove redundant setting of AV_FRAME_FLAG_KEY, AV_PICTURE_TYPE_I

This is done generically now.

Andreas Rheinhardt committed 2 years ago

Commit df3cdf41 parent eee88ba74 files · +0 −184Browse files

Unified · Split

74 files
  1. libavcodec/012v.c +0 −3
  2. libavcodec/aic.c +0 −2
  3. libavcodec/aliaspixdec.c +0 −3
  4. libavcodec/asvdec.c +0 −2
  5. libavcodec/avuidec.c +0 −3
  6. libavcodec/bitpacked_dec.c +0 −3
  7. libavcodec/bmp.c +0 −2
  8. libavcodec/brenderpix.c +0 −2
  9. libavcodec/cdxl.c +0 −2
  10. libavcodec/cljrdec.c +0 −2
  11. libavcodec/cllc.c +0 −3
  12. libavcodec/cri.c +0 −3
  13. libavcodec/dds.c +0 −2
  14. libavcodec/dnxhddec.c +0 −2
  15. libavcodec/dvdec.c +0 −2
  16. libavcodec/dxtory.c +0 −2
  17. libavcodec/dxv.c +0 −2
  18. libavcodec/fitsdec.c +0 −3
  19. libavcodec/fraps.c +0 −3
  20. libavcodec/frwu.c +0 −3
  21. libavcodec/hapdec.c +0 −2
  22. libavcodec/hdrdec.c +0 −3
  23. libavcodec/hq_hqa.c +0 −3
  24. libavcodec/hqx.c +0 −3
  25. libavcodec/jpeg2000dec.c +0 −2
  26. libavcodec/lagarith.c +0 −3
  27. libavcodec/lcldec.c +0 −3
  28. libavcodec/leaddec.c +0 −3
  29. libavcodec/loco.c +0 −1
  30. libavcodec/m101.c +0 −2
  31. libavcodec/magicyuv.c +0 −3
  32. libavcodec/mdec.c +0 −2
  33. libavcodec/mpeg12dec.c +0 −2
  34. libavcodec/mscc.c +0 −3
  35. libavcodec/msp2dec.c +0 −3
  36. libavcodec/mvcdec.c +0 −3
  37. libavcodec/mvha.c +0 −2
  38. libavcodec/notchlc.c +0 −3
  39. libavcodec/pgxdec.c +0 −2
  40. libavcodec/pixlet.c +0 −2
  41. libavcodec/pnmdec.c +0 −2
  42. libavcodec/proresdec.c +0 −2
  43. libavcodec/prosumer.c +0 −2
  44. libavcodec/qdrw.c +0 −3
  45. libavcodec/qoidec.c +0 −3
  46. libavcodec/r210dec.c +0 −2
  47. libavcodec/rawdec.c +0 −3
  48. libavcodec/rtv1.c +0 −3
  49. libavcodec/sgidec.c +0 −2
  50. libavcodec/sgirledec.c +0 −3
  51. libavcodec/sheervideo.c +0 −3
  52. libavcodec/speedhqdec.c +0 −1
  53. libavcodec/targa_y216dec.c +0 −3
  54. libavcodec/tiff.c +0 −1
  55. libavcodec/tmv.c +0 −2
  56. libavcodec/truemotion2rt.c +0 −2
  57. libavcodec/utvideodec.c +0 −2
  58. libavcodec/v210dec.c +0 −3
  59. libavcodec/v210x.c +0 −2
  60. libavcodec/v308dec.c +0 −3
  61. libavcodec/v408dec.c +0 −3
  62. libavcodec/v410dec.c +0 −3
  63. libavcodec/vble.c +0 −4
  64. libavcodec/vcr1.c +0 −2
  65. libavcodec/vmixdec.c +0 −3
  66. libavcodec/wbmpdec.c +0 −3
  67. libavcodec/wnv1.c +0 −1
  68. libavcodec/xbmdec.c +0 −3
  69. libavcodec/xl.c +0 −2
  70. libavcodec/xpmdec.c +0 −3
  71. libavcodec/xwddec.c +0 −3
  72. libavcodec/y41pdec.c +0 −3
  73. libavcodec/ylc.c +0 −2
  74. libavcodec/yuv4dec.c +0 −3
libavcodec/012v.c+0−3
@@ -64,9 +64,6 @@ static int zero12v_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 63 unmodified lines
6464 if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
6565 return ret;
6666
67− pic->pict_type = AV_PICTURE_TYPE_I;
68− pic->flags |= AV_FRAME_FLAG_KEY;
69−
7067 line_end = avpkt->data + stride;
7168 for (line = 0; line < avctx->height; line++) {
7269 uint16_t y_temp[6] = {0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000};
libavcodec/aic.c+0−2
@@ -393,8 +393,6 @@ static int aic_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 392 unmodified lines
393393 int slice_size;
394394
395395 ctx->frame = frame;
396− ctx->frame->pict_type = AV_PICTURE_TYPE_I;
397− ctx->frame->flags |= AV_FRAME_FLAG_KEY;
398396
399397 off = FFALIGN(AIC_HDR_SIZE + ctx->num_x_slices * ctx->mb_height * 2, 4);
400398
libavcodec/aliaspixdec.c+0−3
@@ -69,9 +69,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *f, · 68 unmodified lines
6969 if (ret < 0)
7070 return ret;
7171
72− f->pict_type = AV_PICTURE_TYPE_I;
73− f->flags |= AV_FRAME_FLAG_KEY;
74−
7572 x = 0;
7673 y = 1;
7774 out_buf = f->data[0];
libavcodec/asvdec.c+0−2
@@ -244,8 +244,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 243 unmodified lines
244244
245245 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
246246 return ret;
247− p->pict_type = AV_PICTURE_TYPE_I;
248− p->flags |= AV_FRAME_FLAG_KEY;
249247
250248 if (avctx->codec_id == AV_CODEC_ID_ASV1) {
251249 av_fast_padded_malloc(&a->bitstream_buffer, &a->bitstream_buffer_size,
libavcodec/avuidec.c+0−3
@@ -71,9 +71,6 @@ static int avui_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 70 unmodified lines
7171 if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
7272 return ret;
7373
74− pic->flags |= AV_FRAME_FLAG_KEY;
75− pic->pict_type = AV_PICTURE_TYPE_I;
76−
7774 if (!interlaced) {
7875 src += avctx->width * skip;
7976 srca += avctx->width * skip;
libavcodec/bitpacked_dec.c+0−3
@@ -130,9 +130,6 @@ static int bitpacked_decode(AVCodecContext *avctx, AVFrame *frame, · 129 unmodified lines
130130 if (res)
131131 return res;
132132
133− frame->pict_type = AV_PICTURE_TYPE_I;
134− frame->flags |= AV_FRAME_FLAG_KEY;
135−
136133 *got_frame = 1;
137134 return buf_size;
138135
libavcodec/bmp.c+0−2
@@ -209,8 +209,6 @@ static int bmp_decode_frame(AVCodecContext *avctx, AVFrame *p, · 208 unmodified lines
209209
210210 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
211211 return ret;
212− p->pict_type = AV_PICTURE_TYPE_I;
213− p->flags |= AV_FRAME_FLAG_KEY;
214212
215213 buf = buf0 + hsize;
216214 dsize = buf_size - hsize;
libavcodec/brenderpix.c+0−2
@@ -285,8 +285,6 @@ FF_ENABLE_DEPRECATION_WARNINGS · 284 unmodified lines
285285 bytes_per_scanline,
286286 bytes_per_scanline, hdr.height);
287287
288− frame->pict_type = AV_PICTURE_TYPE_I;
289− frame->flags |= AV_FRAME_FLAG_KEY;
290288 *got_frame = 1;
291289
292290 return avpkt->size;
libavcodec/cdxl.c+0−2
@@ -306,8 +306,6 @@ static int cdxl_decode_frame(AVCodecContext *avctx, AVFrame *p, · 305 unmodified lines
306306
307307 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
308308 return ret;
309− p->pict_type = AV_PICTURE_TYPE_I;
310− p->flags |= AV_FRAME_FLAG_KEY;
311309
312310 if (encoding) {
313311 av_fast_padded_malloc(&c->new_video, &c->new_video_size,
libavcodec/cljrdec.c+0−2
@@ -50,8 +50,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 49 unmodified lines
5050
5151 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
5252 return ret;
53− p->pict_type = AV_PICTURE_TYPE_I;
54− p->flags |= AV_FRAME_FLAG_KEY;
5553
5654 init_get_bits(&gb, buf, buf_size * 8);
5755
libavcodec/cllc.c+0−3
@@ -461,9 +461,6 @@ static int cllc_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 460 unmodified lines
461461 return AVERROR_INVALIDDATA;
462462 }
463463
464− pic->flags |= AV_FRAME_FLAG_KEY;
465− pic->pict_type = AV_PICTURE_TYPE_I;
466−
467464 *got_picture_ptr = 1;
468465
469466 return avpkt->size;
libavcodec/cri.c+0−3
@@ -406,9 +406,6 @@ skip: · 405 unmodified lines
406406 }
407407 }
408408
409− p->pict_type = AV_PICTURE_TYPE_I;
410− p->flags |= AV_FRAME_FLAG_KEY;
411−
412409 *got_frame = 1;
413410
414411 return 0;
libavcodec/dds.c+0−2
@@ -711,8 +711,6 @@ FF_ENABLE_DEPRECATION_WARNINGS · 710 unmodified lines
711711 run_postproc(avctx, frame);
712712
713713 /* Frame is ready to be output. */
714− frame->pict_type = AV_PICTURE_TYPE_I;
715− frame->flags |= AV_FRAME_FLAG_KEY;
716714 *got_frame = 1;
717715
718716 return avpkt->size;
libavcodec/dnxhddec.c+0−2
@@ -655,8 +655,6 @@ decode_coding_unit: · 654 unmodified lines
655655 if (first_field) {
656656 if ((ret = ff_thread_get_buffer(avctx, picture, 0)) < 0)
657657 return ret;
658− picture->pict_type = AV_PICTURE_TYPE_I;
659− picture->flags |= AV_FRAME_FLAG_KEY;
660658 }
661659
662660 ctx->buf_size = buf_size - ctx->data_offset;
libavcodec/dvdec.c+0−2
@@ -643,8 +643,6 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 642 unmodified lines
643643 }
644644
645645 s->frame = frame;
646− frame->flags |= AV_FRAME_FLAG_KEY;
647− frame->pict_type = AV_PICTURE_TYPE_I;
648646 avctx->pix_fmt = s->sys->pix_fmt;
649647 avctx->framerate = av_inv_q(s->sys->time_base);
650648 avctx->bit_rate = av_rescale_q(s->sys->frame_size,
libavcodec/dxtory.c+0−2
@@ -863,8 +863,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, · 862 unmodified lines
863863 if (ret)
864864 return ret;
865865
866− pic->pict_type = AV_PICTURE_TYPE_I;
867− pic->flags |= AV_FRAME_FLAG_KEY;
868866 *got_frame = 1;
869867
870868 return avpkt->size;
libavcodec/dxv.c+0−2
@@ -1048,8 +1048,6 @@ static int dxv_decode(AVCodecContext *avctx, AVFrame *frame, · 1047 unmodified lines
10481048 }
10491049
10501050 /* Frame is ready to be output. */
1051− frame->pict_type = AV_PICTURE_TYPE_I;
1052− frame->flags |= AV_FRAME_FLAG_KEY;
10531051 *got_frame = 1;
10541052
10551053 return avpkt->size;
libavcodec/fitsdec.c+0−3
@@ -301,9 +301,6 @@ static int fits_decode_frame(AVCodecContext *avctx, AVFrame *p, · 300 unmodified lines
301301 }
302302 }
303303
304− p->flags |= AV_FRAME_FLAG_KEY;
305− p->pict_type = AV_PICTURE_TYPE_I;
306−
307304 *got_frame = 1;
308305
309306 return avpkt->size;
libavcodec/fraps.c+0−3
@@ -215,9 +215,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *f, · 214 unmodified lines
215215 }
216216 }
217217
218− f->pict_type = AV_PICTURE_TYPE_I;
219− f->flags |= AV_FRAME_FLAG_KEY;
220−
221218 avctx->pix_fmt = version & 1 ? is_pal ? AV_PIX_FMT_PAL8 : AV_PIX_FMT_BGR24 : AV_PIX_FMT_YUVJ420P;
222219 avctx->color_range = version & 1 ? AVCOL_RANGE_UNSPECIFIED
223220 : AVCOL_RANGE_JPEG;
libavcodec/frwu.c+0−3
@@ -62,9 +62,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, · 61 unmodified lines
6262 if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
6363 return ret;
6464
65− pic->pict_type = AV_PICTURE_TYPE_I;
66− pic->flags |= AV_FRAME_FLAG_KEY;
67−
6865 for (field = 0; field < 2; field++) {
6966 int i;
7067 int field_h = (avctx->height + !field) >> 1;
libavcodec/hapdec.c+0−2
@@ -330,8 +330,6 @@ static int hap_decode(AVCodecContext *avctx, AVFrame *frame, · 329 unmodified lines
330330 }
331331
332332 /* Frame is ready to be output */
333− frame->pict_type = AV_PICTURE_TYPE_I;
334− frame->flags |= AV_FRAME_FLAG_KEY;
335333 *got_frame = 1;
336334
337335 return avpkt->size;
libavcodec/hdrdec.c+0−3
@@ -212,9 +212,6 @@ convert: · 211 unmodified lines
212212 }
213213 }
214214
215− p->flags |= AV_FRAME_FLAG_KEY;
216− p->pict_type = AV_PICTURE_TYPE_I;
217−
218215 *got_frame = 1;
219216
220217 return avpkt->size;
libavcodec/hq_hqa.c+0−3
@@ -366,9 +366,6 @@ static int hq_hqa_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 365 unmodified lines
366366 return ret;
367367 }
368368
369− pic->flags |= AV_FRAME_FLAG_KEY;
370− pic->pict_type = AV_PICTURE_TYPE_I;
371−
372369 *got_frame = 1;
373370
374371 return avpkt->size;
libavcodec/hqx.c+0−3
@@ -504,9 +504,6 @@ static int hqx_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 503 unmodified lines
504504
505505 avctx->execute2(avctx, decode_slice_thread, NULL, NULL, 16);
506506
507− ctx->pic->flags |= AV_FRAME_FLAG_KEY;
508− ctx->pic->pict_type = AV_PICTURE_TYPE_I;
509−
510507 *got_picture_ptr = 1;
511508
512509 return avpkt->size;
libavcodec/jpeg2000dec.c+0−2
@@ -2503,8 +2503,6 @@ static int jpeg2000_decode_frame(AVCodecContext *avctx, AVFrame *picture, · 2502 unmodified lines
25032503 /* get picture buffer */
25042504 if ((ret = ff_thread_get_buffer(avctx, picture, 0)) < 0)
25052505 goto end;
2506− picture->pict_type = AV_PICTURE_TYPE_I;
2507− picture->flags |= AV_FRAME_FLAG_KEY;
25082506
25092507 if (ret = jpeg2000_read_bitstream_packets(s))
25102508 goto end;
libavcodec/lagarith.c+0−3
@@ -570,9 +570,6 @@ static int lag_decode_frame(AVCodecContext *avctx, AVFrame *p, · 569 unmodified lines
570570 int i, j, planes = 3;
571571 int ret = 0;
572572
573− p->flags |= AV_FRAME_FLAG_KEY;
574− p->pict_type = AV_PICTURE_TYPE_I;
575−
576573 frametype = buf[0];
577574
578575 offset_gu = AV_RL32(buf + 1);
libavcodec/lcldec.c+0−3
@@ -481,9 +481,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, · 480 unmodified lines
481481 return AVERROR_INVALIDDATA;
482482 }
483483
484− frame->flags |= AV_FRAME_FLAG_KEY;
485− frame->pict_type = AV_PICTURE_TYPE_I;
486−
487484 *got_frame = 1;
488485
489486 /* always report that the buffer was completely consumed */
libavcodec/leaddec.c+0−3
@@ -182,9 +182,6 @@ static int lead_decode_frame(AVCodecContext *avctx, AVFrame * frame, · 181 unmodified lines
182182 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
183183 return ret;
184184
185− frame->flags |= AV_FRAME_FLAG_KEY;
186− frame->pict_type = AV_PICTURE_TYPE_I;
187−
188185 av_fast_padded_malloc(&s->bitstream_buf, &s->bitstream_buf_size, avpkt->size - 8);
189186 if (!s->bitstream_buf)
190187 return AVERROR(ENOMEM);
libavcodec/loco.c+0−1
@@ -206,7 +206,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 205 unmodified lines
206206
207207 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
208208 return ret;
209− p->flags |= AV_FRAME_FLAG_KEY;
210209
211210 #define ADVANCE_BY_DECODED do { \
212211 if (decoded < 0 || decoded >= buf_size) goto buf_too_small; \
libavcodec/m101.c+0−2
@@ -66,8 +66,6 @@ static int m101_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 65 unmodified lines
6666
6767 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
6868 return ret;
69− frame->pict_type = AV_PICTURE_TYPE_I;
70− frame->flags |= AV_FRAME_FLAG_KEY;
7169 if ((avctx->extradata[3*4] & 3) != 3) {
7270 frame->flags |= AV_FRAME_FLAG_INTERLACED;
7371 if (avctx->extradata[3*4] & 1)
libavcodec/magicyuv.c+0−3
@@ -652,9 +652,6 @@ static int magy_decode_frame(AVCodecContext *avctx, AVFrame *p, · 651 unmodified lines
652652 if (ret < 0)
653653 return ret;
654654
655− p->pict_type = AV_PICTURE_TYPE_I;
656− p->flags |= AV_FRAME_FLAG_KEY;
657−
658655 if ((ret = ff_thread_get_buffer(avctx, p, 0)) < 0)
659656 return ret;
660657
libavcodec/mdec.c+0−2
@@ -177,8 +177,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, · 176 unmodified lines
177177
178178 if ((ret = ff_thread_get_buffer(avctx, frame, 0)) < 0)
179179 return ret;
180− frame->pict_type = AV_PICTURE_TYPE_I;
181− frame->flags |= AV_FRAME_FLAG_KEY;
182180
183181 av_fast_padded_malloc(&a->bitstream_buffer, &a->bitstream_buffer_size, buf_size);
184182 if (!a->bitstream_buffer)
libavcodec/mpeg12dec.c+0−2
@@ -2822,8 +2822,6 @@ static int ipu_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 2821 unmodified lines
28222822 if (get_bits_left(gb) != 32)
28232823 return AVERROR_INVALIDDATA;
28242824
2825− frame->pict_type = AV_PICTURE_TYPE_I;
2826− frame->flags |= AV_FRAME_FLAG_KEY;
28272825 *got_frame = 1;
28282826
28292827 return avpkt->size;
libavcodec/mscc.c+0−3
@@ -205,9 +205,6 @@ inflate_error: · 204 unmodified lines
205205 s->uncomp_buf + s->bpp * j * avctx->width, s->bpp * avctx->width);
206206 }
207207
208− frame->flags |= AV_FRAME_FLAG_KEY;
209− frame->pict_type = AV_PICTURE_TYPE_I;
210−
211208 *got_frame = 1;
212209
213210 return avpkt->size;
libavcodec/msp2dec.c+0−3
@@ -46,9 +46,6 @@ static int msp2_decode_frame(AVCodecContext *avctx, AVFrame *p, · 45 unmodified lines
4646 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
4747 return ret;
4848
49− p->pict_type = AV_PICTURE_TYPE_I;
50− p->flags |= AV_FRAME_FLAG_KEY;
51−
5249 bytestream2_init(&idx, buf, 2 * avctx->height);
5350 buf += 2 * avctx->height;
5451 buf_size -= 2 * avctx->height;
libavcodec/mvcdec.c+0−3
@@ -246,9 +246,6 @@ static int mvc_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 245 unmodified lines
246246 if (ret < 0)
247247 return ret;
248248
249− frame->pict_type = AV_PICTURE_TYPE_I;
250− frame->flags |= AV_FRAME_FLAG_KEY;
251−
252249 *got_frame = 1;
253250
254251 return avpkt->size;
libavcodec/mvha.c+0−2
@@ -271,8 +271,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, · 270 unmodified lines
271271 }
272272 }
273273
274− frame->pict_type = AV_PICTURE_TYPE_I;
275− frame->flags |= AV_FRAME_FLAG_KEY;
276274 *got_frame = 1;
277275
278276 return avpkt->size;
libavcodec/notchlc.c+0−3
@@ -515,9 +515,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 514 unmodified lines
515515 if (ret < 0)
516516 return ret;
517517
518− p->pict_type = AV_PICTURE_TYPE_I;
519− p->flags |= AV_FRAME_FLAG_KEY;
520−
521518 *got_frame = 1;
522519
523520 return avpkt->size;
libavcodec/pgxdec.c+0−2
@@ -139,8 +139,6 @@ static int pgx_decode_frame(AVCodecContext *avctx, AVFrame *p, · 138 unmodified lines
139139 return AVERROR_INVALIDDATA;
140140 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
141141 return ret;
142− p->pict_type = AV_PICTURE_TYPE_I;
143− p->flags |= AV_FRAME_FLAG_KEY;
144142 avctx->bits_per_raw_sample = depth;
145143 if (bpp == 8)
146144 write_frame_8(p, &g, width, height, sign, depth);
libavcodec/pixlet.c+0−2
@@ -667,8 +667,6 @@ static int pixlet_decode_frame(AVCodecContext *avctx, AVFrame *p, · 666 unmodified lines
667667
668668 bytestream2_skip(&ctx->gb, 8);
669669
670− p->pict_type = AV_PICTURE_TYPE_I;
671− p->flags |= AV_FRAME_FLAG_KEY;
672670 p->color_range = AVCOL_RANGE_JPEG;
673671
674672 ret = ff_thread_get_buffer(avctx, p, 0);
libavcodec/pnmdec.c+0−2
@@ -64,8 +64,6 @@ static int pnm_decode_frame(AVCodecContext *avctx, AVFrame *p, · 63 unmodified lines
6464
6565 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
6666 return ret;
67− p->pict_type = AV_PICTURE_TYPE_I;
68− p->flags |= AV_FRAME_FLAG_KEY;
6967 avctx->bits_per_raw_sample = av_log2(s->maxval) + 1;
7068
7169 switch (avctx->pix_fmt) {
libavcodec/proresdec.c+0−2
@@ -787,8 +787,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, · 786 unmodified lines
787787 }
788788
789789 ctx->frame = frame;
790− ctx->frame->pict_type = AV_PICTURE_TYPE_I;
791− ctx->frame->flags |= AV_FRAME_FLAG_KEY;
792790 ctx->first_field = 1;
793791
794792 buf += 8;
libavcodec/prosumer.c+0−2
@@ -194,8 +194,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, · 193 unmodified lines
194194 }
195195 }
196196
197− frame->pict_type = AV_PICTURE_TYPE_I;
198− frame->flags |= AV_FRAME_FLAG_KEY;
199197 *got_frame = 1;
200198
201199 return avpkt->size;
libavcodec/qdrw.c+0−3
@@ -506,9 +506,6 @@ FF_ENABLE_DEPRECATION_WARNINGS · 505 unmodified lines
506506 }
507507
508508 if (*got_frame) {
509− p->pict_type = AV_PICTURE_TYPE_I;
510− p->flags |= AV_FRAME_FLAG_KEY;
511−
512509 return avpkt->size;
513510 } else {
514511 av_log(avctx, AV_LOG_ERROR, "Frame contained no usable data\n");
libavcodec/qoidec.c+0−3
@@ -106,9 +106,6 @@ static int qoi_decode_frame(AVCodecContext *avctx, AVFrame *p, · 105 unmodified lines
106106 memcpy(&dst[off_x * channels], px, channels);
107107 }
108108
109− p->flags |= AV_FRAME_FLAG_KEY;
110− p->pict_type = AV_PICTURE_TYPE_I;
111−
112109 *got_frame = 1;
113110
114111 return avpkt->size;
libavcodec/r210dec.c+0−2
@@ -56,8 +56,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, · 55 unmodified lines
5656 if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
5757 return ret;
5858
59− pic->pict_type = AV_PICTURE_TYPE_I;
60− pic->flags |= AV_FRAME_FLAG_KEY;
6159 g_line = pic->data[0];
6260 b_line = pic->data[1];
6361 r_line = pic->data[2];
libavcodec/rawdec.c+0−3
@@ -225,9 +225,6 @@ static int raw_decode(AVCodecContext *avctx, AVFrame *frame, · 224 unmodified lines
225225
226226 need_copy = !avpkt->buf || context->is_1_2_4_8_bpp || context->is_yuv2 || context->is_lt_16bpp;
227227
228− frame->pict_type = AV_PICTURE_TYPE_I;
229− frame->flags |= AV_FRAME_FLAG_KEY;
230−
231228 res = ff_decode_frame_props(avctx, frame);
232229 if (res < 0)
233230 return res;
libavcodec/rtv1.c+0−3
@@ -132,9 +132,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 131 unmodified lines
132132 if (ret < 0)
133133 return ret;
134134
135− p->pict_type = AV_PICTURE_TYPE_I;
136− p->flags |= AV_FRAME_FLAG_KEY;
137−
138135 *got_frame = 1;
139136
140137 return avpkt->size;
libavcodec/sgidec.c+0−2
@@ -248,8 +248,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 247 unmodified lines
248248 MAP(2, 1);
249249 break;
250250 }
251− p->pict_type = AV_PICTURE_TYPE_I;
252− p->flags |= AV_FRAME_FLAG_KEY;
253251
254252 /* Skip header. */
255253 bytestream2_seek(&g, SGI_HEADER_SIZE, SEEK_SET);
libavcodec/sgirledec.c+0−3
@@ -123,9 +123,6 @@ static int sgirle_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 122 unmodified lines
123123 if (ret < 0)
124124 return ret;
125125
126− frame->pict_type = AV_PICTURE_TYPE_I;
127− frame->flags |= AV_FRAME_FLAG_KEY;
128−
129126 *got_frame = 1;
130127
131128 return avpkt->size;
libavcodec/sheervideo.c+0−3
@@ -1972,9 +1972,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 1971 unmodified lines
19721972 return AVERROR_INVALIDDATA;
19731973 }
19741974
1975− p->pict_type = AV_PICTURE_TYPE_I;
1976− p->flags |= AV_FRAME_FLAG_KEY;
1977−
19781975 if ((ret = ff_thread_get_buffer(avctx, p, 0)) < 0)
19791976 return ret;
19801977
libavcodec/speedhqdec.c+0−1
@@ -440,7 +440,6 @@ static int speedhq_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 439 unmodified lines
440440 if ((ret = ff_thread_get_buffer(avctx, frame, 0)) < 0) {
441441 return ret;
442442 }
443− frame->flags |= AV_FRAME_FLAG_KEY;
444443
445444 if (second_field_offset == 4 || second_field_offset == (buf_size-4)) {
446445 /*
libavcodec/targa_y216dec.c+0−3
@@ -47,9 +47,6 @@ static int y216_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 46 unmodified lines
4747 if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
4848 return ret;
4949
50− pic->flags |= AV_FRAME_FLAG_KEY;
51− pic->pict_type = AV_PICTURE_TYPE_I;
52−
5350 y = (uint16_t *)pic->data[0];
5451 u = (uint16_t *)pic->data[1];
5552 v = (uint16_t *)pic->data[2];
libavcodec/tiff.c+0−1
@@ -2381,7 +2381,6 @@ again: · 2380 unmodified lines
23812381 }
23822382 }
23832383
2384− p->flags |= AV_FRAME_FLAG_KEY;
23852384 *got_frame = 1;
23862385
23872386 return avpkt->size;
libavcodec/tmv.c+0−2
@@ -56,8 +56,6 @@ static int tmv_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 55 unmodified lines
5656 return AVERROR_INVALIDDATA;
5757 }
5858
59− frame->pict_type = AV_PICTURE_TYPE_I;
60− frame->flags |= AV_FRAME_FLAG_KEY;
6159 dst = frame->data[0];
6260
6361 #if FF_API_PALETTE_HAS_CHANGED
libavcodec/truemotion2rt.c+0−2
@@ -201,8 +201,6 @@ static int truemotion2rt_decode_frame(AVCodecContext *avctx, AVFrame *p, · 200 unmodified lines
201201 dst += p->linesize[2];
202202 }
203203
204− p->pict_type = AV_PICTURE_TYPE_I;
205− p->flags |= AV_FRAME_FLAG_KEY;
206204 *got_frame = 1;
207205
208206 return avpkt->size;
libavcodec/utvideodec.c+0−2
@@ -890,8 +890,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, · 889 unmodified lines
890890 break;
891891 }
892892
893− frame->flags |= AV_FRAME_FLAG_KEY;
894− frame->pict_type = AV_PICTURE_TYPE_I;
895893 if (c->interlaced)
896894 frame->flags |= AV_FRAME_FLAG_INTERLACED;
897895
libavcodec/v210dec.c+0−3
@@ -187,9 +187,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, · 186 unmodified lines
187187 if ((ret = ff_thread_get_buffer(avctx, pic, 0)) < 0)
188188 return ret;
189189
190− pic->pict_type = AV_PICTURE_TYPE_I;
191− pic->flags |= AV_FRAME_FLAG_KEY;
192−
193190 if (stride) {
194191 td.stride = stride;
195192 td.buf = psrc;
libavcodec/v210x.c+0−2
@@ -61,8 +61,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, · 60 unmodified lines
6161 udst = (uint16_t *)pic->data[1];
6262 vdst = (uint16_t *)pic->data[2];
6363 yend = ydst + width;
64− pic->pict_type = AV_PICTURE_TYPE_I;
65− pic->flags |= AV_FRAME_FLAG_KEY;
6664
6765 for (;;) {
6866 uint32_t v = av_be2ne32(*src++);
libavcodec/v308dec.c+0−3
@@ -48,9 +48,6 @@ static int v308_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 47 unmodified lines
4848 if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
4949 return ret;
5050
51− pic->flags |= AV_FRAME_FLAG_KEY;
52− pic->pict_type = AV_PICTURE_TYPE_I;
53−
5451 y = pic->data[0];
5552 u = pic->data[1];
5653 v = pic->data[2];
libavcodec/v408dec.c+0−3
@@ -45,9 +45,6 @@ static int v408_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 44 unmodified lines
4545 if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
4646 return ret;
4747
48− pic->flags |= AV_FRAME_FLAG_KEY;
49− pic->pict_type = AV_PICTURE_TYPE_I;
50−
5148 y = pic->data[0];
5249 u = pic->data[1];
5350 v = pic->data[2];
libavcodec/v410dec.c+0−3
@@ -102,9 +102,6 @@ static int v410_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 101 unmodified lines
102102 if ((ret = ff_thread_get_buffer(avctx, pic, 0)) < 0)
103103 return ret;
104104
105− pic->flags |= AV_FRAME_FLAG_KEY;
106− pic->pict_type = AV_PICTURE_TYPE_I;
107−
108105 td.buf = src;
109106 td.frame = pic;
110107 avctx->execute2(avctx, v410_decode_slice, &td, NULL, thread_count);
libavcodec/vble.c+0−4
@@ -134,10 +134,6 @@ static int vble_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 133 unmodified lines
134134 if ((ret = ff_thread_get_buffer(avctx, pic, 0)) < 0)
135135 return ret;
136136
137− /* Set flags */
138− pic->flags |= AV_FRAME_FLAG_KEY;
139− pic->pict_type = AV_PICTURE_TYPE_I;
140−
141137 /* Version should always be 1 */
142138 version = AV_RL32(src);
143139
libavcodec/vcr1.c+0−2
@@ -62,8 +62,6 @@ static int vcr1_decode_frame(AVCodecContext *avctx, AVFrame *p, · 61 unmodified lines
6262
6363 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
6464 return ret;
65− p->pict_type = AV_PICTURE_TYPE_I;
66− p->flags |= AV_FRAME_FLAG_KEY;
6765
6866 for (i = 0; i < 16; i++) {
6967 a->delta[i] = *bytestream++;
libavcodec/vmixdec.c+0−3
@@ -289,9 +289,6 @@ static int decode_frame(AVCodecContext *avctx, · 288 unmodified lines
289289
290290 avctx->execute2(avctx, decode_slices, frame, NULL, s->nb_slices);
291291
292− frame->pict_type = AV_PICTURE_TYPE_I;
293− frame->flags |= AV_FRAME_FLAG_KEY;
294−
295292 *got_frame = 1;
296293
297294 return avpkt->size;
libavcodec/wbmpdec.c+0−3
@@ -74,9 +74,6 @@ static int wbmp_decode_frame(AVCodecContext *avctx, AVFrame *p, · 73 unmodified lines
7474 else
7575 readbits(p->data[0], width, height, p->linesize[0], gb.buffer, gb.buffer_end - gb.buffer);
7676
77− p->flags |= AV_FRAME_FLAG_KEY;
78− p->pict_type = AV_PICTURE_TYPE_I;
79−
8077 *got_frame = 1;
8178
8279 return buf_size;
libavcodec/wnv1.c+0−1
@@ -69,7 +69,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 68 unmodified lines
6969
7070 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
7171 return ret;
72− p->flags |= AV_FRAME_FLAG_KEY;
7372
7473 if ((ret = init_get_bits8(&gb, buf + 8, buf_size - 8)) < 0)
7574 return ret;
libavcodec/xbmdec.c+0−3
@@ -135,9 +135,6 @@ static int xbm_decode_frame(AVCodecContext *avctx, AVFrame *p, · 134 unmodified lines
135135 }
136136 }
137137
138− p->flags |= AV_FRAME_FLAG_KEY;
139− p->pict_type = AV_PICTURE_TYPE_I;
140−
141138 *got_frame = 1;
142139
143140 return avpkt->size;
libavcodec/xl.c+0−2
@@ -59,8 +59,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 58 unmodified lines
5959
6060 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
6161 return ret;
62− p->pict_type = AV_PICTURE_TYPE_I;
63− p->flags |= AV_FRAME_FLAG_KEY;
6462
6563 Y = p->data[0];
6664 U = p->data[1];
libavcodec/xpmdec.c+0−3
@@ -429,9 +429,6 @@ static int xpm_decode_frame(AVCodecContext *avctx, AVFrame *p, · 428 unmodified lines
429429 ptr += mod_strcspn(ptr, ",") + 1;
430430 }
431431
432− p->flags |= AV_FRAME_FLAG_KEY;
433− p->pict_type = AV_PICTURE_TYPE_I;
434−
435432 *got_frame = 1;
436433
437434 return avpkt->size;
libavcodec/xwddec.c+0−3
@@ -216,9 +216,6 @@ static int xwd_decode_frame(AVCodecContext *avctx, AVFrame *p, · 215 unmodified lines
216216 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
217217 return ret;
218218
219− p->flags |= AV_FRAME_FLAG_KEY;
220− p->pict_type = AV_PICTURE_TYPE_I;
221−
222219 if (avctx->pix_fmt == AV_PIX_FMT_PAL8) {
223220 uint32_t *dst = (uint32_t *)p->data[1];
224221 uint8_t red, green, blue;
libavcodec/y41pdec.c+0−3
@@ -51,9 +51,6 @@ static int y41p_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 50 unmodified lines
5151 if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
5252 return ret;
5353
54− pic->flags |= AV_FRAME_FLAG_KEY;
55− pic->pict_type = AV_PICTURE_TYPE_I;
56−
5754 for (i = avctx->height - 1; i >= 0 ; i--) {
5855 y = &pic->data[0][i * pic->linesize[0]];
5956 u = &pic->data[1][i * pic->linesize[1]];
libavcodec/ylc.c+0−2
@@ -426,8 +426,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 425 unmodified lines
426426 dst += p->linesize[0];
427427 }
428428
429− p->pict_type = AV_PICTURE_TYPE_I;
430− p->flags |= AV_FRAME_FLAG_KEY;
431429 *got_frame = 1;
432430
433431 return avpkt->size;
libavcodec/yuv4dec.c+0−3
@@ -46,9 +46,6 @@ static int yuv4_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 45 unmodified lines
4646 if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
4747 return ret;
4848
49− pic->flags |= AV_FRAME_FLAG_KEY;
50− pic->pict_type = AV_PICTURE_TYPE_I;
51−
5249 y = pic->data[0];
5350 u = pic->data[1];
5451 v = pic->data[2];

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