This is done generically now.
Showing the changes to libavcodec (74 of 74 files). Show all
Unified · Split
| @@ -64,9 +64,6 @@ static int zero12v_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 63 unmodified lines | ||
| 64 | 64 | if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) |
| 65 | 65 | return ret; |
| 66 | 66 | |
| 67 | − pic->pict_type = AV_PICTURE_TYPE_I; | |
| 68 | − pic->flags |= AV_FRAME_FLAG_KEY; | |
| 69 | − | |
| 70 | 67 | line_end = avpkt->data + stride; |
| 71 | 68 | for (line = 0; line < avctx->height; line++) { |
| 72 | 69 | uint16_t y_temp[6] = {0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000}; |
| @@ -393,8 +393,6 @@ static int aic_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 392 unmodified lines | ||
| 393 | 393 | int slice_size; |
| 394 | 394 | |
| 395 | 395 | ctx->frame = frame; |
| 396 | − ctx->frame->pict_type = AV_PICTURE_TYPE_I; | |
| 397 | − ctx->frame->flags |= AV_FRAME_FLAG_KEY; | |
| 398 | 396 | |
| 399 | 397 | off = FFALIGN(AIC_HDR_SIZE + ctx->num_x_slices * ctx->mb_height * 2, 4); |
| 400 | 398 | |
| @@ -69,9 +69,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *f, · 68 unmodified lines | ||
| 69 | 69 | if (ret < 0) |
| 70 | 70 | return ret; |
| 71 | 71 | |
| 72 | − f->pict_type = AV_PICTURE_TYPE_I; | |
| 73 | − f->flags |= AV_FRAME_FLAG_KEY; | |
| 74 | − | |
| 75 | 72 | x = 0; |
| 76 | 73 | y = 1; |
| 77 | 74 | out_buf = f->data[0]; |
| @@ -244,8 +244,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 243 unmodified lines | ||
| 244 | 244 | |
| 245 | 245 | if ((ret = ff_get_buffer(avctx, p, 0)) < 0) |
| 246 | 246 | return ret; |
| 247 | − p->pict_type = AV_PICTURE_TYPE_I; | |
| 248 | − p->flags |= AV_FRAME_FLAG_KEY; | |
| 249 | 247 | |
| 250 | 248 | if (avctx->codec_id == AV_CODEC_ID_ASV1) { |
| 251 | 249 | av_fast_padded_malloc(&a->bitstream_buffer, &a->bitstream_buffer_size, |
| @@ -71,9 +71,6 @@ static int avui_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 70 unmodified lines | ||
| 71 | 71 | if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) |
| 72 | 72 | return ret; |
| 73 | 73 | |
| 74 | − pic->flags |= AV_FRAME_FLAG_KEY; | |
| 75 | − pic->pict_type = AV_PICTURE_TYPE_I; | |
| 76 | − | |
| 77 | 74 | if (!interlaced) { |
| 78 | 75 | src += avctx->width * skip; |
| 79 | 76 | srca += avctx->width * skip; |
| @@ -130,9 +130,6 @@ static int bitpacked_decode(AVCodecContext *avctx, AVFrame *frame, · 129 unmodified lines | ||
| 130 | 130 | if (res) |
| 131 | 131 | return res; |
| 132 | 132 | |
| 133 | − frame->pict_type = AV_PICTURE_TYPE_I; | |
| 134 | − frame->flags |= AV_FRAME_FLAG_KEY; | |
| 135 | − | |
| 136 | 133 | *got_frame = 1; |
| 137 | 134 | return buf_size; |
| 138 | 135 | |
| @@ -209,8 +209,6 @@ static int bmp_decode_frame(AVCodecContext *avctx, AVFrame *p, · 208 unmodified lines | ||
| 209 | 209 | |
| 210 | 210 | if ((ret = ff_get_buffer(avctx, p, 0)) < 0) |
| 211 | 211 | return ret; |
| 212 | − p->pict_type = AV_PICTURE_TYPE_I; | |
| 213 | − p->flags |= AV_FRAME_FLAG_KEY; | |
| 214 | 212 | |
| 215 | 213 | buf = buf0 + hsize; |
| 216 | 214 | dsize = buf_size - hsize; |
| @@ -285,8 +285,6 @@ FF_ENABLE_DEPRECATION_WARNINGS · 284 unmodified lines | ||
| 285 | 285 | bytes_per_scanline, |
| 286 | 286 | bytes_per_scanline, hdr.height); |
| 287 | 287 | |
| 288 | − frame->pict_type = AV_PICTURE_TYPE_I; | |
| 289 | − frame->flags |= AV_FRAME_FLAG_KEY; | |
| 290 | 288 | *got_frame = 1; |
| 291 | 289 | |
| 292 | 290 | return avpkt->size; |
| @@ -306,8 +306,6 @@ static int cdxl_decode_frame(AVCodecContext *avctx, AVFrame *p, · 305 unmodified lines | ||
| 306 | 306 | |
| 307 | 307 | if ((ret = ff_get_buffer(avctx, p, 0)) < 0) |
| 308 | 308 | return ret; |
| 309 | − p->pict_type = AV_PICTURE_TYPE_I; | |
| 310 | − p->flags |= AV_FRAME_FLAG_KEY; | |
| 311 | 309 | |
| 312 | 310 | if (encoding) { |
| 313 | 311 | av_fast_padded_malloc(&c->new_video, &c->new_video_size, |
| @@ -50,8 +50,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 49 unmodified lines | ||
| 50 | 50 | |
| 51 | 51 | if ((ret = ff_get_buffer(avctx, p, 0)) < 0) |
| 52 | 52 | return ret; |
| 53 | − p->pict_type = AV_PICTURE_TYPE_I; | |
| 54 | − p->flags |= AV_FRAME_FLAG_KEY; | |
| 55 | 53 | |
| 56 | 54 | init_get_bits(&gb, buf, buf_size * 8); |
| 57 | 55 | |
| @@ -461,9 +461,6 @@ static int cllc_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 460 unmodified lines | ||
| 461 | 461 | return AVERROR_INVALIDDATA; |
| 462 | 462 | } |
| 463 | 463 | |
| 464 | − pic->flags |= AV_FRAME_FLAG_KEY; | |
| 465 | − pic->pict_type = AV_PICTURE_TYPE_I; | |
| 466 | − | |
| 467 | 464 | *got_picture_ptr = 1; |
| 468 | 465 | |
| 469 | 466 | return avpkt->size; |
| @@ -406,9 +406,6 @@ skip: · 405 unmodified lines | ||
| 406 | 406 | } |
| 407 | 407 | } |
| 408 | 408 | |
| 409 | − p->pict_type = AV_PICTURE_TYPE_I; | |
| 410 | − p->flags |= AV_FRAME_FLAG_KEY; | |
| 411 | − | |
| 412 | 409 | *got_frame = 1; |
| 413 | 410 | |
| 414 | 411 | return 0; |
| @@ -711,8 +711,6 @@ FF_ENABLE_DEPRECATION_WARNINGS · 710 unmodified lines | ||
| 711 | 711 | run_postproc(avctx, frame); |
| 712 | 712 | |
| 713 | 713 | /* Frame is ready to be output. */ |
| 714 | − frame->pict_type = AV_PICTURE_TYPE_I; | |
| 715 | − frame->flags |= AV_FRAME_FLAG_KEY; | |
| 716 | 714 | *got_frame = 1; |
| 717 | 715 | |
| 718 | 716 | return avpkt->size; |
| @@ -655,8 +655,6 @@ decode_coding_unit: · 654 unmodified lines | ||
| 655 | 655 | if (first_field) { |
| 656 | 656 | if ((ret = ff_thread_get_buffer(avctx, picture, 0)) < 0) |
| 657 | 657 | return ret; |
| 658 | − picture->pict_type = AV_PICTURE_TYPE_I; | |
| 659 | − picture->flags |= AV_FRAME_FLAG_KEY; | |
| 660 | 658 | } |
| 661 | 659 | |
| 662 | 660 | ctx->buf_size = buf_size - ctx->data_offset; |
| @@ -643,8 +643,6 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 642 unmodified lines | ||
| 643 | 643 | } |
| 644 | 644 | |
| 645 | 645 | s->frame = frame; |
| 646 | − frame->flags |= AV_FRAME_FLAG_KEY; | |
| 647 | − frame->pict_type = AV_PICTURE_TYPE_I; | |
| 648 | 646 | avctx->pix_fmt = s->sys->pix_fmt; |
| 649 | 647 | avctx->framerate = av_inv_q(s->sys->time_base); |
| 650 | 648 | avctx->bit_rate = av_rescale_q(s->sys->frame_size, |
| @@ -863,8 +863,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, · 862 unmodified lines | ||
| 863 | 863 | if (ret) |
| 864 | 864 | return ret; |
| 865 | 865 | |
| 866 | − pic->pict_type = AV_PICTURE_TYPE_I; | |
| 867 | − pic->flags |= AV_FRAME_FLAG_KEY; | |
| 868 | 866 | *got_frame = 1; |
| 869 | 867 | |
| 870 | 868 | return avpkt->size; |
| @@ -1048,8 +1048,6 @@ static int dxv_decode(AVCodecContext *avctx, AVFrame *frame, · 1047 unmodified lines | ||
| 1048 | 1048 | } |
| 1049 | 1049 | |
| 1050 | 1050 | /* Frame is ready to be output. */ |
| 1051 | − frame->pict_type = AV_PICTURE_TYPE_I; | |
| 1052 | − frame->flags |= AV_FRAME_FLAG_KEY; | |
| 1053 | 1051 | *got_frame = 1; |
| 1054 | 1052 | |
| 1055 | 1053 | return avpkt->size; |
| @@ -301,9 +301,6 @@ static int fits_decode_frame(AVCodecContext *avctx, AVFrame *p, · 300 unmodified lines | ||
| 301 | 301 | } |
| 302 | 302 | } |
| 303 | 303 | |
| 304 | − p->flags |= AV_FRAME_FLAG_KEY; | |
| 305 | − p->pict_type = AV_PICTURE_TYPE_I; | |
| 306 | − | |
| 307 | 304 | *got_frame = 1; |
| 308 | 305 | |
| 309 | 306 | return avpkt->size; |
| @@ -215,9 +215,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *f, · 214 unmodified lines | ||
| 215 | 215 | } |
| 216 | 216 | } |
| 217 | 217 | |
| 218 | − f->pict_type = AV_PICTURE_TYPE_I; | |
| 219 | − f->flags |= AV_FRAME_FLAG_KEY; | |
| 220 | − | |
| 221 | 218 | avctx->pix_fmt = version & 1 ? is_pal ? AV_PIX_FMT_PAL8 : AV_PIX_FMT_BGR24 : AV_PIX_FMT_YUVJ420P; |
| 222 | 219 | avctx->color_range = version & 1 ? AVCOL_RANGE_UNSPECIFIED |
| 223 | 220 | : AVCOL_RANGE_JPEG; |
| @@ -62,9 +62,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, · 61 unmodified lines | ||
| 62 | 62 | if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) |
| 63 | 63 | return ret; |
| 64 | 64 | |
| 65 | − pic->pict_type = AV_PICTURE_TYPE_I; | |
| 66 | − pic->flags |= AV_FRAME_FLAG_KEY; | |
| 67 | − | |
| 68 | 65 | for (field = 0; field < 2; field++) { |
| 69 | 66 | int i; |
| 70 | 67 | int field_h = (avctx->height + !field) >> 1; |
| @@ -330,8 +330,6 @@ static int hap_decode(AVCodecContext *avctx, AVFrame *frame, · 329 unmodified lines | ||
| 330 | 330 | } |
| 331 | 331 | |
| 332 | 332 | /* Frame is ready to be output */ |
| 333 | − frame->pict_type = AV_PICTURE_TYPE_I; | |
| 334 | − frame->flags |= AV_FRAME_FLAG_KEY; | |
| 335 | 333 | *got_frame = 1; |
| 336 | 334 | |
| 337 | 335 | return avpkt->size; |
| @@ -212,9 +212,6 @@ convert: · 211 unmodified lines | ||
| 212 | 212 | } |
| 213 | 213 | } |
| 214 | 214 | |
| 215 | − p->flags |= AV_FRAME_FLAG_KEY; | |
| 216 | − p->pict_type = AV_PICTURE_TYPE_I; | |
| 217 | − | |
| 218 | 215 | *got_frame = 1; |
| 219 | 216 | |
| 220 | 217 | return avpkt->size; |
| @@ -366,9 +366,6 @@ static int hq_hqa_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 365 unmodified lines | ||
| 366 | 366 | return ret; |
| 367 | 367 | } |
| 368 | 368 | |
| 369 | − pic->flags |= AV_FRAME_FLAG_KEY; | |
| 370 | − pic->pict_type = AV_PICTURE_TYPE_I; | |
| 371 | − | |
| 372 | 369 | *got_frame = 1; |
| 373 | 370 | |
| 374 | 371 | return avpkt->size; |
| @@ -504,9 +504,6 @@ static int hqx_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 503 unmodified lines | ||
| 504 | 504 | |
| 505 | 505 | avctx->execute2(avctx, decode_slice_thread, NULL, NULL, 16); |
| 506 | 506 | |
| 507 | − ctx->pic->flags |= AV_FRAME_FLAG_KEY; | |
| 508 | − ctx->pic->pict_type = AV_PICTURE_TYPE_I; | |
| 509 | − | |
| 510 | 507 | *got_picture_ptr = 1; |
| 511 | 508 | |
| 512 | 509 | return avpkt->size; |
| @@ -2503,8 +2503,6 @@ static int jpeg2000_decode_frame(AVCodecContext *avctx, AVFrame *picture, · 2502 unmodified lines | ||
| 2503 | 2503 | /* get picture buffer */ |
| 2504 | 2504 | if ((ret = ff_thread_get_buffer(avctx, picture, 0)) < 0) |
| 2505 | 2505 | goto end; |
| 2506 | − picture->pict_type = AV_PICTURE_TYPE_I; | |
| 2507 | − picture->flags |= AV_FRAME_FLAG_KEY; | |
| 2508 | 2506 | |
| 2509 | 2507 | if (ret = jpeg2000_read_bitstream_packets(s)) |
| 2510 | 2508 | goto end; |
| @@ -570,9 +570,6 @@ static int lag_decode_frame(AVCodecContext *avctx, AVFrame *p, · 569 unmodified lines | ||
| 570 | 570 | int i, j, planes = 3; |
| 571 | 571 | int ret = 0; |
| 572 | 572 | |
| 573 | − p->flags |= AV_FRAME_FLAG_KEY; | |
| 574 | − p->pict_type = AV_PICTURE_TYPE_I; | |
| 575 | − | |
| 576 | 573 | frametype = buf[0]; |
| 577 | 574 | |
| 578 | 575 | offset_gu = AV_RL32(buf + 1); |
| @@ -481,9 +481,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, · 480 unmodified lines | ||
| 481 | 481 | return AVERROR_INVALIDDATA; |
| 482 | 482 | } |
| 483 | 483 | |
| 484 | − frame->flags |= AV_FRAME_FLAG_KEY; | |
| 485 | − frame->pict_type = AV_PICTURE_TYPE_I; | |
| 486 | − | |
| 487 | 484 | *got_frame = 1; |
| 488 | 485 | |
| 489 | 486 | /* always report that the buffer was completely consumed */ |
| @@ -182,9 +182,6 @@ static int lead_decode_frame(AVCodecContext *avctx, AVFrame * frame, · 181 unmodified lines | ||
| 182 | 182 | if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) |
| 183 | 183 | return ret; |
| 184 | 184 | |
| 185 | − frame->flags |= AV_FRAME_FLAG_KEY; | |
| 186 | − frame->pict_type = AV_PICTURE_TYPE_I; | |
| 187 | − | |
| 188 | 185 | av_fast_padded_malloc(&s->bitstream_buf, &s->bitstream_buf_size, avpkt->size - 8); |
| 189 | 186 | if (!s->bitstream_buf) |
| 190 | 187 | return AVERROR(ENOMEM); |
| @@ -206,7 +206,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 205 unmodified lines | ||
| 206 | 206 | |
| 207 | 207 | if ((ret = ff_get_buffer(avctx, p, 0)) < 0) |
| 208 | 208 | return ret; |
| 209 | − p->flags |= AV_FRAME_FLAG_KEY; | |
| 210 | 209 | |
| 211 | 210 | #define ADVANCE_BY_DECODED do { \ |
| 212 | 211 | if (decoded < 0 || decoded >= buf_size) goto buf_too_small; \ |
| @@ -66,8 +66,6 @@ static int m101_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 65 unmodified lines | ||
| 66 | 66 | |
| 67 | 67 | if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) |
| 68 | 68 | return ret; |
| 69 | − frame->pict_type = AV_PICTURE_TYPE_I; | |
| 70 | − frame->flags |= AV_FRAME_FLAG_KEY; | |
| 71 | 69 | if ((avctx->extradata[3*4] & 3) != 3) { |
| 72 | 70 | frame->flags |= AV_FRAME_FLAG_INTERLACED; |
| 73 | 71 | if (avctx->extradata[3*4] & 1) |
| @@ -652,9 +652,6 @@ static int magy_decode_frame(AVCodecContext *avctx, AVFrame *p, · 651 unmodified lines | ||
| 652 | 652 | if (ret < 0) |
| 653 | 653 | return ret; |
| 654 | 654 | |
| 655 | − p->pict_type = AV_PICTURE_TYPE_I; | |
| 656 | − p->flags |= AV_FRAME_FLAG_KEY; | |
| 657 | − | |
| 658 | 655 | if ((ret = ff_thread_get_buffer(avctx, p, 0)) < 0) |
| 659 | 656 | return ret; |
| 660 | 657 | |
| @@ -177,8 +177,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, · 176 unmodified lines | ||
| 177 | 177 | |
| 178 | 178 | if ((ret = ff_thread_get_buffer(avctx, frame, 0)) < 0) |
| 179 | 179 | return ret; |
| 180 | − frame->pict_type = AV_PICTURE_TYPE_I; | |
| 181 | − frame->flags |= AV_FRAME_FLAG_KEY; | |
| 182 | 180 | |
| 183 | 181 | av_fast_padded_malloc(&a->bitstream_buffer, &a->bitstream_buffer_size, buf_size); |
| 184 | 182 | if (!a->bitstream_buffer) |
| @@ -2822,8 +2822,6 @@ static int ipu_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 2821 unmodified lines | ||
| 2822 | 2822 | if (get_bits_left(gb) != 32) |
| 2823 | 2823 | return AVERROR_INVALIDDATA; |
| 2824 | 2824 | |
| 2825 | − frame->pict_type = AV_PICTURE_TYPE_I; | |
| 2826 | − frame->flags |= AV_FRAME_FLAG_KEY; | |
| 2827 | 2825 | *got_frame = 1; |
| 2828 | 2826 | |
| 2829 | 2827 | return avpkt->size; |
| @@ -205,9 +205,6 @@ inflate_error: · 204 unmodified lines | ||
| 205 | 205 | s->uncomp_buf + s->bpp * j * avctx->width, s->bpp * avctx->width); |
| 206 | 206 | } |
| 207 | 207 | |
| 208 | − frame->flags |= AV_FRAME_FLAG_KEY; | |
| 209 | − frame->pict_type = AV_PICTURE_TYPE_I; | |
| 210 | − | |
| 211 | 208 | *got_frame = 1; |
| 212 | 209 | |
| 213 | 210 | return avpkt->size; |
| @@ -46,9 +46,6 @@ static int msp2_decode_frame(AVCodecContext *avctx, AVFrame *p, · 45 unmodified lines | ||
| 46 | 46 | if ((ret = ff_get_buffer(avctx, p, 0)) < 0) |
| 47 | 47 | return ret; |
| 48 | 48 | |
| 49 | − p->pict_type = AV_PICTURE_TYPE_I; | |
| 50 | − p->flags |= AV_FRAME_FLAG_KEY; | |
| 51 | − | |
| 52 | 49 | bytestream2_init(&idx, buf, 2 * avctx->height); |
| 53 | 50 | buf += 2 * avctx->height; |
| 54 | 51 | buf_size -= 2 * avctx->height; |
| @@ -246,9 +246,6 @@ static int mvc_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 245 unmodified lines | ||
| 246 | 246 | if (ret < 0) |
| 247 | 247 | return ret; |
| 248 | 248 | |
| 249 | − frame->pict_type = AV_PICTURE_TYPE_I; | |
| 250 | − frame->flags |= AV_FRAME_FLAG_KEY; | |
| 251 | − | |
| 252 | 249 | *got_frame = 1; |
| 253 | 250 | |
| 254 | 251 | return avpkt->size; |
| @@ -271,8 +271,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, · 270 unmodified lines | ||
| 271 | 271 | } |
| 272 | 272 | } |
| 273 | 273 | |
| 274 | − frame->pict_type = AV_PICTURE_TYPE_I; | |
| 275 | − frame->flags |= AV_FRAME_FLAG_KEY; | |
| 276 | 274 | *got_frame = 1; |
| 277 | 275 | |
| 278 | 276 | return avpkt->size; |
| @@ -515,9 +515,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 514 unmodified lines | ||
| 515 | 515 | if (ret < 0) |
| 516 | 516 | return ret; |
| 517 | 517 | |
| 518 | − p->pict_type = AV_PICTURE_TYPE_I; | |
| 519 | − p->flags |= AV_FRAME_FLAG_KEY; | |
| 520 | − | |
| 521 | 518 | *got_frame = 1; |
| 522 | 519 | |
| 523 | 520 | return avpkt->size; |
| @@ -139,8 +139,6 @@ static int pgx_decode_frame(AVCodecContext *avctx, AVFrame *p, · 138 unmodified lines | ||
| 139 | 139 | return AVERROR_INVALIDDATA; |
| 140 | 140 | if ((ret = ff_get_buffer(avctx, p, 0)) < 0) |
| 141 | 141 | return ret; |
| 142 | − p->pict_type = AV_PICTURE_TYPE_I; | |
| 143 | − p->flags |= AV_FRAME_FLAG_KEY; | |
| 144 | 142 | avctx->bits_per_raw_sample = depth; |
| 145 | 143 | if (bpp == 8) |
| 146 | 144 | write_frame_8(p, &g, width, height, sign, depth); |
| @@ -667,8 +667,6 @@ static int pixlet_decode_frame(AVCodecContext *avctx, AVFrame *p, · 666 unmodified lines | ||
| 667 | 667 | |
| 668 | 668 | bytestream2_skip(&ctx->gb, 8); |
| 669 | 669 | |
| 670 | − p->pict_type = AV_PICTURE_TYPE_I; | |
| 671 | − p->flags |= AV_FRAME_FLAG_KEY; | |
| 672 | 670 | p->color_range = AVCOL_RANGE_JPEG; |
| 673 | 671 | |
| 674 | 672 | ret = ff_thread_get_buffer(avctx, p, 0); |
| @@ -64,8 +64,6 @@ static int pnm_decode_frame(AVCodecContext *avctx, AVFrame *p, · 63 unmodified lines | ||
| 64 | 64 | |
| 65 | 65 | if ((ret = ff_get_buffer(avctx, p, 0)) < 0) |
| 66 | 66 | return ret; |
| 67 | − p->pict_type = AV_PICTURE_TYPE_I; | |
| 68 | − p->flags |= AV_FRAME_FLAG_KEY; | |
| 69 | 67 | avctx->bits_per_raw_sample = av_log2(s->maxval) + 1; |
| 70 | 68 | |
| 71 | 69 | switch (avctx->pix_fmt) { |
| @@ -787,8 +787,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, · 786 unmodified lines | ||
| 787 | 787 | } |
| 788 | 788 | |
| 789 | 789 | ctx->frame = frame; |
| 790 | − ctx->frame->pict_type = AV_PICTURE_TYPE_I; | |
| 791 | − ctx->frame->flags |= AV_FRAME_FLAG_KEY; | |
| 792 | 790 | ctx->first_field = 1; |
| 793 | 791 | |
| 794 | 792 | buf += 8; |
| @@ -194,8 +194,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, · 193 unmodified lines | ||
| 194 | 194 | } |
| 195 | 195 | } |
| 196 | 196 | |
| 197 | − frame->pict_type = AV_PICTURE_TYPE_I; | |
| 198 | − frame->flags |= AV_FRAME_FLAG_KEY; | |
| 199 | 197 | *got_frame = 1; |
| 200 | 198 | |
| 201 | 199 | return avpkt->size; |
| @@ -506,9 +506,6 @@ FF_ENABLE_DEPRECATION_WARNINGS · 505 unmodified lines | ||
| 506 | 506 | } |
| 507 | 507 | |
| 508 | 508 | if (*got_frame) { |
| 509 | − p->pict_type = AV_PICTURE_TYPE_I; | |
| 510 | − p->flags |= AV_FRAME_FLAG_KEY; | |
| 511 | − | |
| 512 | 509 | return avpkt->size; |
| 513 | 510 | } else { |
| 514 | 511 | av_log(avctx, AV_LOG_ERROR, "Frame contained no usable data\n"); |
| @@ -106,9 +106,6 @@ static int qoi_decode_frame(AVCodecContext *avctx, AVFrame *p, · 105 unmodified lines | ||
| 106 | 106 | memcpy(&dst[off_x * channels], px, channels); |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | − p->flags |= AV_FRAME_FLAG_KEY; | |
| 110 | − p->pict_type = AV_PICTURE_TYPE_I; | |
| 111 | − | |
| 112 | 109 | *got_frame = 1; |
| 113 | 110 | |
| 114 | 111 | return avpkt->size; |
| @@ -56,8 +56,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, · 55 unmodified lines | ||
| 56 | 56 | if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) |
| 57 | 57 | return ret; |
| 58 | 58 | |
| 59 | − pic->pict_type = AV_PICTURE_TYPE_I; | |
| 60 | − pic->flags |= AV_FRAME_FLAG_KEY; | |
| 61 | 59 | g_line = pic->data[0]; |
| 62 | 60 | b_line = pic->data[1]; |
| 63 | 61 | r_line = pic->data[2]; |
| @@ -225,9 +225,6 @@ static int raw_decode(AVCodecContext *avctx, AVFrame *frame, · 224 unmodified lines | ||
| 225 | 225 | |
| 226 | 226 | need_copy = !avpkt->buf || context->is_1_2_4_8_bpp || context->is_yuv2 || context->is_lt_16bpp; |
| 227 | 227 | |
| 228 | − frame->pict_type = AV_PICTURE_TYPE_I; | |
| 229 | − frame->flags |= AV_FRAME_FLAG_KEY; | |
| 230 | − | |
| 231 | 228 | res = ff_decode_frame_props(avctx, frame); |
| 232 | 229 | if (res < 0) |
| 233 | 230 | return res; |
| @@ -132,9 +132,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 131 unmodified lines | ||
| 132 | 132 | if (ret < 0) |
| 133 | 133 | return ret; |
| 134 | 134 | |
| 135 | − p->pict_type = AV_PICTURE_TYPE_I; | |
| 136 | − p->flags |= AV_FRAME_FLAG_KEY; | |
| 137 | − | |
| 138 | 135 | *got_frame = 1; |
| 139 | 136 | |
| 140 | 137 | return avpkt->size; |
| @@ -248,8 +248,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 247 unmodified lines | ||
| 248 | 248 | MAP(2, 1); |
| 249 | 249 | break; |
| 250 | 250 | } |
| 251 | − p->pict_type = AV_PICTURE_TYPE_I; | |
| 252 | − p->flags |= AV_FRAME_FLAG_KEY; | |
| 253 | 251 | |
| 254 | 252 | /* Skip header. */ |
| 255 | 253 | bytestream2_seek(&g, SGI_HEADER_SIZE, SEEK_SET); |
| @@ -123,9 +123,6 @@ static int sgirle_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 122 unmodified lines | ||
| 123 | 123 | if (ret < 0) |
| 124 | 124 | return ret; |
| 125 | 125 | |
| 126 | − frame->pict_type = AV_PICTURE_TYPE_I; | |
| 127 | − frame->flags |= AV_FRAME_FLAG_KEY; | |
| 128 | − | |
| 129 | 126 | *got_frame = 1; |
| 130 | 127 | |
| 131 | 128 | return avpkt->size; |
| @@ -1972,9 +1972,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 1971 unmodified lines | ||
| 1972 | 1972 | return AVERROR_INVALIDDATA; |
| 1973 | 1973 | } |
| 1974 | 1974 | |
| 1975 | − p->pict_type = AV_PICTURE_TYPE_I; | |
| 1976 | − p->flags |= AV_FRAME_FLAG_KEY; | |
| 1977 | − | |
| 1978 | 1975 | if ((ret = ff_thread_get_buffer(avctx, p, 0)) < 0) |
| 1979 | 1976 | return ret; |
| 1980 | 1977 | |
| @@ -440,7 +440,6 @@ static int speedhq_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 439 unmodified lines | ||
| 440 | 440 | if ((ret = ff_thread_get_buffer(avctx, frame, 0)) < 0) { |
| 441 | 441 | return ret; |
| 442 | 442 | } |
| 443 | − frame->flags |= AV_FRAME_FLAG_KEY; | |
| 444 | 443 | |
| 445 | 444 | if (second_field_offset == 4 || second_field_offset == (buf_size-4)) { |
| 446 | 445 | /* |
| @@ -47,9 +47,6 @@ static int y216_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 46 unmodified lines | ||
| 47 | 47 | if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) |
| 48 | 48 | return ret; |
| 49 | 49 | |
| 50 | − pic->flags |= AV_FRAME_FLAG_KEY; | |
| 51 | − pic->pict_type = AV_PICTURE_TYPE_I; | |
| 52 | − | |
| 53 | 50 | y = (uint16_t *)pic->data[0]; |
| 54 | 51 | u = (uint16_t *)pic->data[1]; |
| 55 | 52 | v = (uint16_t *)pic->data[2]; |
| @@ -2381,7 +2381,6 @@ again: · 2380 unmodified lines | ||
| 2381 | 2381 | } |
| 2382 | 2382 | } |
| 2383 | 2383 | |
| 2384 | − p->flags |= AV_FRAME_FLAG_KEY; | |
| 2385 | 2384 | *got_frame = 1; |
| 2386 | 2385 | |
| 2387 | 2386 | return avpkt->size; |
| @@ -56,8 +56,6 @@ static int tmv_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 55 unmodified lines | ||
| 56 | 56 | return AVERROR_INVALIDDATA; |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | − frame->pict_type = AV_PICTURE_TYPE_I; | |
| 60 | − frame->flags |= AV_FRAME_FLAG_KEY; | |
| 61 | 59 | dst = frame->data[0]; |
| 62 | 60 | |
| 63 | 61 | #if FF_API_PALETTE_HAS_CHANGED |
| @@ -201,8 +201,6 @@ static int truemotion2rt_decode_frame(AVCodecContext *avctx, AVFrame *p, · 200 unmodified lines | ||
| 201 | 201 | dst += p->linesize[2]; |
| 202 | 202 | } |
| 203 | 203 | |
| 204 | − p->pict_type = AV_PICTURE_TYPE_I; | |
| 205 | − p->flags |= AV_FRAME_FLAG_KEY; | |
| 206 | 204 | *got_frame = 1; |
| 207 | 205 | |
| 208 | 206 | return avpkt->size; |
| @@ -890,8 +890,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, · 889 unmodified lines | ||
| 890 | 890 | break; |
| 891 | 891 | } |
| 892 | 892 | |
| 893 | − frame->flags |= AV_FRAME_FLAG_KEY; | |
| 894 | − frame->pict_type = AV_PICTURE_TYPE_I; | |
| 895 | 893 | if (c->interlaced) |
| 896 | 894 | frame->flags |= AV_FRAME_FLAG_INTERLACED; |
| 897 | 895 | |
| @@ -187,9 +187,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, · 186 unmodified lines | ||
| 187 | 187 | if ((ret = ff_thread_get_buffer(avctx, pic, 0)) < 0) |
| 188 | 188 | return ret; |
| 189 | 189 | |
| 190 | − pic->pict_type = AV_PICTURE_TYPE_I; | |
| 191 | − pic->flags |= AV_FRAME_FLAG_KEY; | |
| 192 | − | |
| 193 | 190 | if (stride) { |
| 194 | 191 | td.stride = stride; |
| 195 | 192 | td.buf = psrc; |
| @@ -61,8 +61,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, · 60 unmodified lines | ||
| 61 | 61 | udst = (uint16_t *)pic->data[1]; |
| 62 | 62 | vdst = (uint16_t *)pic->data[2]; |
| 63 | 63 | yend = ydst + width; |
| 64 | − pic->pict_type = AV_PICTURE_TYPE_I; | |
| 65 | − pic->flags |= AV_FRAME_FLAG_KEY; | |
| 66 | 64 | |
| 67 | 65 | for (;;) { |
| 68 | 66 | uint32_t v = av_be2ne32(*src++); |
| @@ -48,9 +48,6 @@ static int v308_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 47 unmodified lines | ||
| 48 | 48 | if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) |
| 49 | 49 | return ret; |
| 50 | 50 | |
| 51 | − pic->flags |= AV_FRAME_FLAG_KEY; | |
| 52 | − pic->pict_type = AV_PICTURE_TYPE_I; | |
| 53 | − | |
| 54 | 51 | y = pic->data[0]; |
| 55 | 52 | u = pic->data[1]; |
| 56 | 53 | v = pic->data[2]; |
| @@ -45,9 +45,6 @@ static int v408_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 44 unmodified lines | ||
| 45 | 45 | if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) |
| 46 | 46 | return ret; |
| 47 | 47 | |
| 48 | − pic->flags |= AV_FRAME_FLAG_KEY; | |
| 49 | − pic->pict_type = AV_PICTURE_TYPE_I; | |
| 50 | − | |
| 51 | 48 | y = pic->data[0]; |
| 52 | 49 | u = pic->data[1]; |
| 53 | 50 | v = pic->data[2]; |
| @@ -102,9 +102,6 @@ static int v410_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 101 unmodified lines | ||
| 102 | 102 | if ((ret = ff_thread_get_buffer(avctx, pic, 0)) < 0) |
| 103 | 103 | return ret; |
| 104 | 104 | |
| 105 | − pic->flags |= AV_FRAME_FLAG_KEY; | |
| 106 | − pic->pict_type = AV_PICTURE_TYPE_I; | |
| 107 | − | |
| 108 | 105 | td.buf = src; |
| 109 | 106 | td.frame = pic; |
| 110 | 107 | avctx->execute2(avctx, v410_decode_slice, &td, NULL, thread_count); |
| @@ -134,10 +134,6 @@ static int vble_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 133 unmodified lines | ||
| 134 | 134 | if ((ret = ff_thread_get_buffer(avctx, pic, 0)) < 0) |
| 135 | 135 | return ret; |
| 136 | 136 | |
| 137 | − /* Set flags */ | |
| 138 | − pic->flags |= AV_FRAME_FLAG_KEY; | |
| 139 | − pic->pict_type = AV_PICTURE_TYPE_I; | |
| 140 | − | |
| 141 | 137 | /* Version should always be 1 */ |
| 142 | 138 | version = AV_RL32(src); |
| 143 | 139 | |
| @@ -62,8 +62,6 @@ static int vcr1_decode_frame(AVCodecContext *avctx, AVFrame *p, · 61 unmodified lines | ||
| 62 | 62 | |
| 63 | 63 | if ((ret = ff_get_buffer(avctx, p, 0)) < 0) |
| 64 | 64 | return ret; |
| 65 | − p->pict_type = AV_PICTURE_TYPE_I; | |
| 66 | − p->flags |= AV_FRAME_FLAG_KEY; | |
| 67 | 65 | |
| 68 | 66 | for (i = 0; i < 16; i++) { |
| 69 | 67 | a->delta[i] = *bytestream++; |
| @@ -289,9 +289,6 @@ static int decode_frame(AVCodecContext *avctx, · 288 unmodified lines | ||
| 289 | 289 | |
| 290 | 290 | avctx->execute2(avctx, decode_slices, frame, NULL, s->nb_slices); |
| 291 | 291 | |
| 292 | − frame->pict_type = AV_PICTURE_TYPE_I; | |
| 293 | − frame->flags |= AV_FRAME_FLAG_KEY; | |
| 294 | − | |
| 295 | 292 | *got_frame = 1; |
| 296 | 293 | |
| 297 | 294 | return avpkt->size; |
| @@ -74,9 +74,6 @@ static int wbmp_decode_frame(AVCodecContext *avctx, AVFrame *p, · 73 unmodified lines | ||
| 74 | 74 | else |
| 75 | 75 | readbits(p->data[0], width, height, p->linesize[0], gb.buffer, gb.buffer_end - gb.buffer); |
| 76 | 76 | |
| 77 | − p->flags |= AV_FRAME_FLAG_KEY; | |
| 78 | − p->pict_type = AV_PICTURE_TYPE_I; | |
| 79 | − | |
| 80 | 77 | *got_frame = 1; |
| 81 | 78 | |
| 82 | 79 | return buf_size; |
| @@ -69,7 +69,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 68 unmodified lines | ||
| 69 | 69 | |
| 70 | 70 | if ((ret = ff_get_buffer(avctx, p, 0)) < 0) |
| 71 | 71 | return ret; |
| 72 | − p->flags |= AV_FRAME_FLAG_KEY; | |
| 73 | 72 | |
| 74 | 73 | if ((ret = init_get_bits8(&gb, buf + 8, buf_size - 8)) < 0) |
| 75 | 74 | return ret; |
| @@ -135,9 +135,6 @@ static int xbm_decode_frame(AVCodecContext *avctx, AVFrame *p, · 134 unmodified lines | ||
| 135 | 135 | } |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | − p->flags |= AV_FRAME_FLAG_KEY; | |
| 139 | − p->pict_type = AV_PICTURE_TYPE_I; | |
| 140 | − | |
| 141 | 138 | *got_frame = 1; |
| 142 | 139 | |
| 143 | 140 | return avpkt->size; |
| @@ -59,8 +59,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 58 unmodified lines | ||
| 59 | 59 | |
| 60 | 60 | if ((ret = ff_get_buffer(avctx, p, 0)) < 0) |
| 61 | 61 | return ret; |
| 62 | − p->pict_type = AV_PICTURE_TYPE_I; | |
| 63 | − p->flags |= AV_FRAME_FLAG_KEY; | |
| 64 | 62 | |
| 65 | 63 | Y = p->data[0]; |
| 66 | 64 | U = p->data[1]; |
| @@ -429,9 +429,6 @@ static int xpm_decode_frame(AVCodecContext *avctx, AVFrame *p, · 428 unmodified lines | ||
| 429 | 429 | ptr += mod_strcspn(ptr, ",") + 1; |
| 430 | 430 | } |
| 431 | 431 | |
| 432 | − p->flags |= AV_FRAME_FLAG_KEY; | |
| 433 | − p->pict_type = AV_PICTURE_TYPE_I; | |
| 434 | − | |
| 435 | 432 | *got_frame = 1; |
| 436 | 433 | |
| 437 | 434 | return avpkt->size; |
| @@ -216,9 +216,6 @@ static int xwd_decode_frame(AVCodecContext *avctx, AVFrame *p, · 215 unmodified lines | ||
| 216 | 216 | if ((ret = ff_get_buffer(avctx, p, 0)) < 0) |
| 217 | 217 | return ret; |
| 218 | 218 | |
| 219 | − p->flags |= AV_FRAME_FLAG_KEY; | |
| 220 | − p->pict_type = AV_PICTURE_TYPE_I; | |
| 221 | − | |
| 222 | 219 | if (avctx->pix_fmt == AV_PIX_FMT_PAL8) { |
| 223 | 220 | uint32_t *dst = (uint32_t *)p->data[1]; |
| 224 | 221 | uint8_t red, green, blue; |
| @@ -51,9 +51,6 @@ static int y41p_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 50 unmodified lines | ||
| 51 | 51 | if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) |
| 52 | 52 | return ret; |
| 53 | 53 | |
| 54 | − pic->flags |= AV_FRAME_FLAG_KEY; | |
| 55 | − pic->pict_type = AV_PICTURE_TYPE_I; | |
| 56 | − | |
| 57 | 54 | for (i = avctx->height - 1; i >= 0 ; i--) { |
| 58 | 55 | y = &pic->data[0][i * pic->linesize[0]]; |
| 59 | 56 | u = &pic->data[1][i * pic->linesize[1]]; |
| @@ -426,8 +426,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 425 unmodified lines | ||
| 426 | 426 | dst += p->linesize[0]; |
| 427 | 427 | } |
| 428 | 428 | |
| 429 | − p->pict_type = AV_PICTURE_TYPE_I; | |
| 430 | − p->flags |= AV_FRAME_FLAG_KEY; | |
| 431 | 429 | *got_frame = 1; |
| 432 | 430 | |
| 433 | 431 | return avpkt->size; |
| @@ -46,9 +46,6 @@ static int yuv4_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 45 unmodified lines | ||
| 46 | 46 | if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) |
| 47 | 47 | return ret; |
| 48 | 48 | |
| 49 | − pic->flags |= AV_FRAME_FLAG_KEY; | |
| 50 | − pic->pict_type = AV_PICTURE_TYPE_I; | |
| 51 | − | |
| 52 | 49 | y = pic->data[0]; |
| 53 | 50 | u = pic->data[1]; |
| 54 | 51 | v = pic->data[2]; |