[FFmpeg-devel] [PATCH 4/4] avcodec: Remove redundant setting of AV_FRAME_FLAG_KEY, AV_PICTURE_TYPE_I
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Thu May 9 05:04:43 EEST 2024
This is done generically now.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
libavcodec/012v.c | 3 ---
libavcodec/aic.c | 2 --
libavcodec/aliaspixdec.c | 3 ---
libavcodec/asvdec.c | 2 --
libavcodec/avuidec.c | 3 ---
libavcodec/bitpacked_dec.c | 3 ---
libavcodec/bmp.c | 2 --
libavcodec/brenderpix.c | 2 --
libavcodec/cdxl.c | 2 --
libavcodec/cljrdec.c | 2 --
libavcodec/cllc.c | 3 ---
libavcodec/cri.c | 3 ---
libavcodec/dds.c | 2 --
libavcodec/dnxhddec.c | 2 --
libavcodec/dvdec.c | 2 --
libavcodec/dxtory.c | 2 --
libavcodec/dxv.c | 2 --
libavcodec/fitsdec.c | 3 ---
libavcodec/fraps.c | 3 ---
libavcodec/frwu.c | 3 ---
libavcodec/hapdec.c | 2 --
libavcodec/hdrdec.c | 3 ---
libavcodec/hq_hqa.c | 3 ---
libavcodec/hqx.c | 3 ---
libavcodec/jpeg2000dec.c | 2 --
libavcodec/lagarith.c | 3 ---
libavcodec/lcldec.c | 3 ---
libavcodec/leaddec.c | 3 ---
libavcodec/loco.c | 1 -
libavcodec/m101.c | 2 --
libavcodec/magicyuv.c | 3 ---
libavcodec/mdec.c | 2 --
libavcodec/mpeg12dec.c | 2 --
libavcodec/mscc.c | 3 ---
libavcodec/msp2dec.c | 3 ---
libavcodec/mvcdec.c | 3 ---
libavcodec/mvha.c | 2 --
libavcodec/notchlc.c | 3 ---
libavcodec/pgxdec.c | 2 --
libavcodec/pixlet.c | 2 --
libavcodec/pnmdec.c | 2 --
libavcodec/proresdec.c | 2 --
libavcodec/prosumer.c | 2 --
libavcodec/qdrw.c | 3 ---
libavcodec/qoidec.c | 3 ---
libavcodec/r210dec.c | 2 --
libavcodec/rawdec.c | 3 ---
libavcodec/rtv1.c | 3 ---
libavcodec/sgidec.c | 2 --
libavcodec/sgirledec.c | 3 ---
libavcodec/sheervideo.c | 3 ---
libavcodec/speedhqdec.c | 1 -
libavcodec/targa_y216dec.c | 3 ---
libavcodec/tiff.c | 1 -
libavcodec/tmv.c | 2 --
libavcodec/truemotion2rt.c | 2 --
libavcodec/utvideodec.c | 2 --
libavcodec/v210dec.c | 3 ---
libavcodec/v210x.c | 2 --
libavcodec/v308dec.c | 3 ---
libavcodec/v408dec.c | 3 ---
libavcodec/v410dec.c | 3 ---
libavcodec/vble.c | 4 ----
libavcodec/vcr1.c | 2 --
libavcodec/vmixdec.c | 3 ---
libavcodec/wbmpdec.c | 3 ---
libavcodec/wnv1.c | 1 -
libavcodec/xbmdec.c | 3 ---
libavcodec/xl.c | 2 --
libavcodec/xpmdec.c | 3 ---
libavcodec/xwddec.c | 3 ---
libavcodec/y41pdec.c | 3 ---
libavcodec/ylc.c | 2 --
libavcodec/yuv4dec.c | 3 ---
74 files changed, 184 deletions(-)
diff --git a/libavcodec/012v.c b/libavcodec/012v.c
index fa5eb0f95e..7bb60219cc 100644
--- a/libavcodec/012v.c
+++ b/libavcodec/012v.c
@@ -64,9 +64,6 @@ static int zero12v_decode_frame(AVCodecContext *avctx, AVFrame *pic,
if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
return ret;
- pic->pict_type = AV_PICTURE_TYPE_I;
- pic->flags |= AV_FRAME_FLAG_KEY;
-
line_end = avpkt->data + stride;
for (line = 0; line < avctx->height; line++) {
uint16_t y_temp[6] = {0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000};
diff --git a/libavcodec/aic.c b/libavcodec/aic.c
index 440c399049..3ff170b414 100644
--- a/libavcodec/aic.c
+++ b/libavcodec/aic.c
@@ -393,8 +393,6 @@ static int aic_decode_frame(AVCodecContext *avctx, AVFrame *frame,
int slice_size;
ctx->frame = frame;
- ctx->frame->pict_type = AV_PICTURE_TYPE_I;
- ctx->frame->flags |= AV_FRAME_FLAG_KEY;
off = FFALIGN(AIC_HDR_SIZE + ctx->num_x_slices * ctx->mb_height * 2, 4);
diff --git a/libavcodec/aliaspixdec.c b/libavcodec/aliaspixdec.c
index 72f810d408..50a6b72a0a 100644
--- a/libavcodec/aliaspixdec.c
+++ b/libavcodec/aliaspixdec.c
@@ -69,9 +69,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *f,
if (ret < 0)
return ret;
- f->pict_type = AV_PICTURE_TYPE_I;
- f->flags |= AV_FRAME_FLAG_KEY;
-
x = 0;
y = 1;
out_buf = f->data[0];
diff --git a/libavcodec/asvdec.c b/libavcodec/asvdec.c
index 568881ccd2..5abe279f35 100644
--- a/libavcodec/asvdec.c
+++ b/libavcodec/asvdec.c
@@ -244,8 +244,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p,
if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
return ret;
- p->pict_type = AV_PICTURE_TYPE_I;
- p->flags |= AV_FRAME_FLAG_KEY;
if (avctx->codec_id == AV_CODEC_ID_ASV1) {
av_fast_padded_malloc(&a->bitstream_buffer, &a->bitstream_buffer_size,
diff --git a/libavcodec/avuidec.c b/libavcodec/avuidec.c
index 48b23d4875..64a1d019d3 100644
--- a/libavcodec/avuidec.c
+++ b/libavcodec/avuidec.c
@@ -71,9 +71,6 @@ static int avui_decode_frame(AVCodecContext *avctx, AVFrame *pic,
if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
return ret;
- pic->flags |= AV_FRAME_FLAG_KEY;
- pic->pict_type = AV_PICTURE_TYPE_I;
-
if (!interlaced) {
src += avctx->width * skip;
srca += avctx->width * skip;
diff --git a/libavcodec/bitpacked_dec.c b/libavcodec/bitpacked_dec.c
index 54c008bd86..a1d3b7b505 100644
--- a/libavcodec/bitpacked_dec.c
+++ b/libavcodec/bitpacked_dec.c
@@ -130,9 +130,6 @@ static int bitpacked_decode(AVCodecContext *avctx, AVFrame *frame,
if (res)
return res;
- frame->pict_type = AV_PICTURE_TYPE_I;
- frame->flags |= AV_FRAME_FLAG_KEY;
-
*got_frame = 1;
return buf_size;
diff --git a/libavcodec/bmp.c b/libavcodec/bmp.c
index d117c06cf4..360c103200 100644
--- a/libavcodec/bmp.c
+++ b/libavcodec/bmp.c
@@ -209,8 +209,6 @@ static int bmp_decode_frame(AVCodecContext *avctx, AVFrame *p,
if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
return ret;
- p->pict_type = AV_PICTURE_TYPE_I;
- p->flags |= AV_FRAME_FLAG_KEY;
buf = buf0 + hsize;
dsize = buf_size - hsize;
diff --git a/libavcodec/brenderpix.c b/libavcodec/brenderpix.c
index 70a3e6be2a..07bb47fff9 100644
--- a/libavcodec/brenderpix.c
+++ b/libavcodec/brenderpix.c
@@ -285,8 +285,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
bytes_per_scanline,
bytes_per_scanline, hdr.height);
- frame->pict_type = AV_PICTURE_TYPE_I;
- frame->flags |= AV_FRAME_FLAG_KEY;
*got_frame = 1;
return avpkt->size;
diff --git a/libavcodec/cdxl.c b/libavcodec/cdxl.c
index 26f05e6280..c30e85b2ed 100644
--- a/libavcodec/cdxl.c
+++ b/libavcodec/cdxl.c
@@ -306,8 +306,6 @@ static int cdxl_decode_frame(AVCodecContext *avctx, AVFrame *p,
if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
return ret;
- p->pict_type = AV_PICTURE_TYPE_I;
- p->flags |= AV_FRAME_FLAG_KEY;
if (encoding) {
av_fast_padded_malloc(&c->new_video, &c->new_video_size,
diff --git a/libavcodec/cljrdec.c b/libavcodec/cljrdec.c
index a4baa015f6..66e9d56e0e 100644
--- a/libavcodec/cljrdec.c
+++ b/libavcodec/cljrdec.c
@@ -50,8 +50,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p,
if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
return ret;
- p->pict_type = AV_PICTURE_TYPE_I;
- p->flags |= AV_FRAME_FLAG_KEY;
init_get_bits(&gb, buf, buf_size * 8);
diff --git a/libavcodec/cllc.c b/libavcodec/cllc.c
index 9b07f7c78e..168b8cb3d0 100644
--- a/libavcodec/cllc.c
+++ b/libavcodec/cllc.c
@@ -461,9 +461,6 @@ static int cllc_decode_frame(AVCodecContext *avctx, AVFrame *pic,
return AVERROR_INVALIDDATA;
}
- pic->flags |= AV_FRAME_FLAG_KEY;
- pic->pict_type = AV_PICTURE_TYPE_I;
-
*got_picture_ptr = 1;
return avpkt->size;
diff --git a/libavcodec/cri.c b/libavcodec/cri.c
index 990e52ac99..7b9a350967 100644
--- a/libavcodec/cri.c
+++ b/libavcodec/cri.c
@@ -406,9 +406,6 @@ skip:
}
}
- p->pict_type = AV_PICTURE_TYPE_I;
- p->flags |= AV_FRAME_FLAG_KEY;
-
*got_frame = 1;
return 0;
diff --git a/libavcodec/dds.c b/libavcodec/dds.c
index 89cf225f25..2af7f5c98f 100644
--- a/libavcodec/dds.c
+++ b/libavcodec/dds.c
@@ -711,8 +711,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
run_postproc(avctx, frame);
/* Frame is ready to be output. */
- frame->pict_type = AV_PICTURE_TYPE_I;
- frame->flags |= AV_FRAME_FLAG_KEY;
*got_frame = 1;
return avpkt->size;
diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c
index e549b38720..fe0809a5f5 100644
--- a/libavcodec/dnxhddec.c
+++ b/libavcodec/dnxhddec.c
@@ -655,8 +655,6 @@ decode_coding_unit:
if (first_field) {
if ((ret = ff_thread_get_buffer(avctx, picture, 0)) < 0)
return ret;
- picture->pict_type = AV_PICTURE_TYPE_I;
- picture->flags |= AV_FRAME_FLAG_KEY;
}
ctx->buf_size = buf_size - ctx->data_offset;
diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c
index 9e8d40187d..8297b6d2f3 100644
--- a/libavcodec/dvdec.c
+++ b/libavcodec/dvdec.c
@@ -643,8 +643,6 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, AVFrame *frame,
}
s->frame = frame;
- frame->flags |= AV_FRAME_FLAG_KEY;
- frame->pict_type = AV_PICTURE_TYPE_I;
avctx->pix_fmt = s->sys->pix_fmt;
avctx->framerate = av_inv_q(s->sys->time_base);
avctx->bit_rate = av_rescale_q(s->sys->frame_size,
diff --git a/libavcodec/dxtory.c b/libavcodec/dxtory.c
index f36420cdd9..a9b5d835db 100644
--- a/libavcodec/dxtory.c
+++ b/libavcodec/dxtory.c
@@ -863,8 +863,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic,
if (ret)
return ret;
- pic->pict_type = AV_PICTURE_TYPE_I;
- pic->flags |= AV_FRAME_FLAG_KEY;
*got_frame = 1;
return avpkt->size;
diff --git a/libavcodec/dxv.c b/libavcodec/dxv.c
index f130db3a4e..7c873a3e92 100644
--- a/libavcodec/dxv.c
+++ b/libavcodec/dxv.c
@@ -1048,8 +1048,6 @@ static int dxv_decode(AVCodecContext *avctx, AVFrame *frame,
}
/* Frame is ready to be output. */
- frame->pict_type = AV_PICTURE_TYPE_I;
- frame->flags |= AV_FRAME_FLAG_KEY;
*got_frame = 1;
return avpkt->size;
diff --git a/libavcodec/fitsdec.c b/libavcodec/fitsdec.c
index 284e945ba5..56df3e4d6b 100644
--- a/libavcodec/fitsdec.c
+++ b/libavcodec/fitsdec.c
@@ -301,9 +301,6 @@ static int fits_decode_frame(AVCodecContext *avctx, AVFrame *p,
}
}
- p->flags |= AV_FRAME_FLAG_KEY;
- p->pict_type = AV_PICTURE_TYPE_I;
-
*got_frame = 1;
return avpkt->size;
diff --git a/libavcodec/fraps.c b/libavcodec/fraps.c
index 4e45efeba8..d7b713c7c4 100644
--- a/libavcodec/fraps.c
+++ b/libavcodec/fraps.c
@@ -215,9 +215,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *f,
}
}
- f->pict_type = AV_PICTURE_TYPE_I;
- f->flags |= AV_FRAME_FLAG_KEY;
-
avctx->pix_fmt = version & 1 ? is_pal ? AV_PIX_FMT_PAL8 : AV_PIX_FMT_BGR24 : AV_PIX_FMT_YUVJ420P;
avctx->color_range = version & 1 ? AVCOL_RANGE_UNSPECIFIED
: AVCOL_RANGE_JPEG;
diff --git a/libavcodec/frwu.c b/libavcodec/frwu.c
index 70bc136765..3b52b968fe 100644
--- a/libavcodec/frwu.c
+++ b/libavcodec/frwu.c
@@ -62,9 +62,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic,
if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
return ret;
- pic->pict_type = AV_PICTURE_TYPE_I;
- pic->flags |= AV_FRAME_FLAG_KEY;
-
for (field = 0; field < 2; field++) {
int i;
int field_h = (avctx->height + !field) >> 1;
diff --git a/libavcodec/hapdec.c b/libavcodec/hapdec.c
index 22b7c281d1..918eff7876 100644
--- a/libavcodec/hapdec.c
+++ b/libavcodec/hapdec.c
@@ -330,8 +330,6 @@ static int hap_decode(AVCodecContext *avctx, AVFrame *frame,
}
/* Frame is ready to be output */
- frame->pict_type = AV_PICTURE_TYPE_I;
- frame->flags |= AV_FRAME_FLAG_KEY;
*got_frame = 1;
return avpkt->size;
diff --git a/libavcodec/hdrdec.c b/libavcodec/hdrdec.c
index 9b6395bb6d..b7ade48e32 100644
--- a/libavcodec/hdrdec.c
+++ b/libavcodec/hdrdec.c
@@ -212,9 +212,6 @@ convert:
}
}
- p->flags |= AV_FRAME_FLAG_KEY;
- p->pict_type = AV_PICTURE_TYPE_I;
-
*got_frame = 1;
return avpkt->size;
diff --git a/libavcodec/hq_hqa.c b/libavcodec/hq_hqa.c
index 096fb65dc7..738ed9868d 100644
--- a/libavcodec/hq_hqa.c
+++ b/libavcodec/hq_hqa.c
@@ -366,9 +366,6 @@ static int hq_hqa_decode_frame(AVCodecContext *avctx, AVFrame *pic,
return ret;
}
- pic->flags |= AV_FRAME_FLAG_KEY;
- pic->pict_type = AV_PICTURE_TYPE_I;
-
*got_frame = 1;
return avpkt->size;
diff --git a/libavcodec/hqx.c b/libavcodec/hqx.c
index 51099aa684..ee6c5a6622 100644
--- a/libavcodec/hqx.c
+++ b/libavcodec/hqx.c
@@ -504,9 +504,6 @@ static int hqx_decode_frame(AVCodecContext *avctx, AVFrame *frame,
avctx->execute2(avctx, decode_slice_thread, NULL, NULL, 16);
- ctx->pic->flags |= AV_FRAME_FLAG_KEY;
- ctx->pic->pict_type = AV_PICTURE_TYPE_I;
-
*got_picture_ptr = 1;
return avpkt->size;
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index 28bf6be2fe..595bba6273 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -2506,8 +2506,6 @@ static int jpeg2000_decode_frame(AVCodecContext *avctx, AVFrame *picture,
/* get picture buffer */
if ((ret = ff_thread_get_buffer(avctx, picture, 0)) < 0)
goto end;
- picture->pict_type = AV_PICTURE_TYPE_I;
- picture->flags |= AV_FRAME_FLAG_KEY;
if (ret = jpeg2000_read_bitstream_packets(s))
goto end;
diff --git a/libavcodec/lagarith.c b/libavcodec/lagarith.c
index 75b557e518..0969448eda 100644
--- a/libavcodec/lagarith.c
+++ b/libavcodec/lagarith.c
@@ -570,9 +570,6 @@ static int lag_decode_frame(AVCodecContext *avctx, AVFrame *p,
int i, j, planes = 3;
int ret = 0;
- p->flags |= AV_FRAME_FLAG_KEY;
- p->pict_type = AV_PICTURE_TYPE_I;
-
frametype = buf[0];
offset_gu = AV_RL32(buf + 1);
diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c
index b4304618e4..b439dbe25e 100644
--- a/libavcodec/lcldec.c
+++ b/libavcodec/lcldec.c
@@ -481,9 +481,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
return AVERROR_INVALIDDATA;
}
- frame->flags |= AV_FRAME_FLAG_KEY;
- frame->pict_type = AV_PICTURE_TYPE_I;
-
*got_frame = 1;
/* always report that the buffer was completely consumed */
diff --git a/libavcodec/leaddec.c b/libavcodec/leaddec.c
index 1406cb0014..947c7275be 100644
--- a/libavcodec/leaddec.c
+++ b/libavcodec/leaddec.c
@@ -182,9 +182,6 @@ static int lead_decode_frame(AVCodecContext *avctx, AVFrame * frame,
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
return ret;
- frame->flags |= AV_FRAME_FLAG_KEY;
- frame->pict_type = AV_PICTURE_TYPE_I;
-
av_fast_padded_malloc(&s->bitstream_buf, &s->bitstream_buf_size, avpkt->size - 8);
if (!s->bitstream_buf)
return AVERROR(ENOMEM);
diff --git a/libavcodec/loco.c b/libavcodec/loco.c
index 3d11823284..b1294a9798 100644
--- a/libavcodec/loco.c
+++ b/libavcodec/loco.c
@@ -206,7 +206,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p,
if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
return ret;
- p->flags |= AV_FRAME_FLAG_KEY;
#define ADVANCE_BY_DECODED do { \
if (decoded < 0 || decoded >= buf_size) goto buf_too_small; \
diff --git a/libavcodec/m101.c b/libavcodec/m101.c
index 43a3c7bbe5..3ed1cab281 100644
--- a/libavcodec/m101.c
+++ b/libavcodec/m101.c
@@ -66,8 +66,6 @@ static int m101_decode_frame(AVCodecContext *avctx, AVFrame *frame,
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
return ret;
- frame->pict_type = AV_PICTURE_TYPE_I;
- frame->flags |= AV_FRAME_FLAG_KEY;
if ((avctx->extradata[3*4] & 3) != 3) {
frame->flags |= AV_FRAME_FLAG_INTERLACED;
if (avctx->extradata[3*4] & 1)
diff --git a/libavcodec/magicyuv.c b/libavcodec/magicyuv.c
index 06fad8f3f7..b85505c428 100644
--- a/libavcodec/magicyuv.c
+++ b/libavcodec/magicyuv.c
@@ -652,9 +652,6 @@ static int magy_decode_frame(AVCodecContext *avctx, AVFrame *p,
if (ret < 0)
return ret;
- p->pict_type = AV_PICTURE_TYPE_I;
- p->flags |= AV_FRAME_FLAG_KEY;
-
if ((ret = ff_thread_get_buffer(avctx, p, 0)) < 0)
return ret;
diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c
index 31c09de5bc..5ab40719ac 100644
--- a/libavcodec/mdec.c
+++ b/libavcodec/mdec.c
@@ -177,8 +177,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
if ((ret = ff_thread_get_buffer(avctx, frame, 0)) < 0)
return ret;
- frame->pict_type = AV_PICTURE_TYPE_I;
- frame->flags |= AV_FRAME_FLAG_KEY;
av_fast_padded_malloc(&a->bitstream_buffer, &a->bitstream_buffer_size, buf_size);
if (!a->bitstream_buffer)
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 21a214ef5b..a9fe3503db 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -2822,8 +2822,6 @@ static int ipu_decode_frame(AVCodecContext *avctx, AVFrame *frame,
if (get_bits_left(gb) != 32)
return AVERROR_INVALIDDATA;
- frame->pict_type = AV_PICTURE_TYPE_I;
- frame->flags |= AV_FRAME_FLAG_KEY;
*got_frame = 1;
return avpkt->size;
diff --git a/libavcodec/mscc.c b/libavcodec/mscc.c
index 39bfad0b98..26143bfd5e 100644
--- a/libavcodec/mscc.c
+++ b/libavcodec/mscc.c
@@ -205,9 +205,6 @@ inflate_error:
s->uncomp_buf + s->bpp * j * avctx->width, s->bpp * avctx->width);
}
- frame->flags |= AV_FRAME_FLAG_KEY;
- frame->pict_type = AV_PICTURE_TYPE_I;
-
*got_frame = 1;
return avpkt->size;
diff --git a/libavcodec/msp2dec.c b/libavcodec/msp2dec.c
index 30a2825e47..e1daeeb144 100644
--- a/libavcodec/msp2dec.c
+++ b/libavcodec/msp2dec.c
@@ -46,9 +46,6 @@ static int msp2_decode_frame(AVCodecContext *avctx, AVFrame *p,
if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
return ret;
- p->pict_type = AV_PICTURE_TYPE_I;
- p->flags |= AV_FRAME_FLAG_KEY;
-
bytestream2_init(&idx, buf, 2 * avctx->height);
buf += 2 * avctx->height;
buf_size -= 2 * avctx->height;
diff --git a/libavcodec/mvcdec.c b/libavcodec/mvcdec.c
index 6c971f709e..44cab1889b 100644
--- a/libavcodec/mvcdec.c
+++ b/libavcodec/mvcdec.c
@@ -246,9 +246,6 @@ static int mvc_decode_frame(AVCodecContext *avctx, AVFrame *frame,
if (ret < 0)
return ret;
- frame->pict_type = AV_PICTURE_TYPE_I;
- frame->flags |= AV_FRAME_FLAG_KEY;
-
*got_frame = 1;
return avpkt->size;
diff --git a/libavcodec/mvha.c b/libavcodec/mvha.c
index 356cebc64e..24dd88e854 100644
--- a/libavcodec/mvha.c
+++ b/libavcodec/mvha.c
@@ -271,8 +271,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
}
}
- frame->pict_type = AV_PICTURE_TYPE_I;
- frame->flags |= AV_FRAME_FLAG_KEY;
*got_frame = 1;
return avpkt->size;
diff --git a/libavcodec/notchlc.c b/libavcodec/notchlc.c
index 6dd3f88440..39c646d790 100644
--- a/libavcodec/notchlc.c
+++ b/libavcodec/notchlc.c
@@ -515,9 +515,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p,
if (ret < 0)
return ret;
- p->pict_type = AV_PICTURE_TYPE_I;
- p->flags |= AV_FRAME_FLAG_KEY;
-
*got_frame = 1;
return avpkt->size;
diff --git a/libavcodec/pgxdec.c b/libavcodec/pgxdec.c
index cc7cdb8c9a..bffd57eddc 100644
--- a/libavcodec/pgxdec.c
+++ b/libavcodec/pgxdec.c
@@ -139,8 +139,6 @@ static int pgx_decode_frame(AVCodecContext *avctx, AVFrame *p,
return AVERROR_INVALIDDATA;
if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
return ret;
- p->pict_type = AV_PICTURE_TYPE_I;
- p->flags |= AV_FRAME_FLAG_KEY;
avctx->bits_per_raw_sample = depth;
if (bpp == 8)
write_frame_8(p, &g, width, height, sign, depth);
diff --git a/libavcodec/pixlet.c b/libavcodec/pixlet.c
index f432b15d71..b3baaf6260 100644
--- a/libavcodec/pixlet.c
+++ b/libavcodec/pixlet.c
@@ -667,8 +667,6 @@ static int pixlet_decode_frame(AVCodecContext *avctx, AVFrame *p,
bytestream2_skip(&ctx->gb, 8);
- p->pict_type = AV_PICTURE_TYPE_I;
- p->flags |= AV_FRAME_FLAG_KEY;
p->color_range = AVCOL_RANGE_JPEG;
ret = ff_thread_get_buffer(avctx, p, 0);
diff --git a/libavcodec/pnmdec.c b/libavcodec/pnmdec.c
index acd77ea810..a6945549bd 100644
--- a/libavcodec/pnmdec.c
+++ b/libavcodec/pnmdec.c
@@ -64,8 +64,6 @@ static int pnm_decode_frame(AVCodecContext *avctx, AVFrame *p,
if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
return ret;
- p->pict_type = AV_PICTURE_TYPE_I;
- p->flags |= AV_FRAME_FLAG_KEY;
avctx->bits_per_raw_sample = av_log2(s->maxval) + 1;
switch (avctx->pix_fmt) {
diff --git a/libavcodec/proresdec.c b/libavcodec/proresdec.c
index 73fbd3458e..ec1d0bd0be 100644
--- a/libavcodec/proresdec.c
+++ b/libavcodec/proresdec.c
@@ -787,8 +787,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
}
ctx->frame = frame;
- ctx->frame->pict_type = AV_PICTURE_TYPE_I;
- ctx->frame->flags |= AV_FRAME_FLAG_KEY;
ctx->first_field = 1;
buf += 8;
diff --git a/libavcodec/prosumer.c b/libavcodec/prosumer.c
index a1ed6a9e53..1930e3e3e6 100644
--- a/libavcodec/prosumer.c
+++ b/libavcodec/prosumer.c
@@ -194,8 +194,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
}
}
- frame->pict_type = AV_PICTURE_TYPE_I;
- frame->flags |= AV_FRAME_FLAG_KEY;
*got_frame = 1;
return avpkt->size;
diff --git a/libavcodec/qdrw.c b/libavcodec/qdrw.c
index 21a53b8e72..ca38f48bd9 100644
--- a/libavcodec/qdrw.c
+++ b/libavcodec/qdrw.c
@@ -506,9 +506,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
}
if (*got_frame) {
- p->pict_type = AV_PICTURE_TYPE_I;
- p->flags |= AV_FRAME_FLAG_KEY;
-
return avpkt->size;
} else {
av_log(avctx, AV_LOG_ERROR, "Frame contained no usable data\n");
diff --git a/libavcodec/qoidec.c b/libavcodec/qoidec.c
index 37bc2084c0..bb48fa23cf 100644
--- a/libavcodec/qoidec.c
+++ b/libavcodec/qoidec.c
@@ -106,9 +106,6 @@ static int qoi_decode_frame(AVCodecContext *avctx, AVFrame *p,
memcpy(&dst[off_x * channels], px, channels);
}
- p->flags |= AV_FRAME_FLAG_KEY;
- p->pict_type = AV_PICTURE_TYPE_I;
-
*got_frame = 1;
return avpkt->size;
diff --git a/libavcodec/r210dec.c b/libavcodec/r210dec.c
index fe6a025988..7405da68e8 100644
--- a/libavcodec/r210dec.c
+++ b/libavcodec/r210dec.c
@@ -56,8 +56,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic,
if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
return ret;
- pic->pict_type = AV_PICTURE_TYPE_I;
- pic->flags |= AV_FRAME_FLAG_KEY;
g_line = pic->data[0];
b_line = pic->data[1];
r_line = pic->data[2];
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index 8de90e0477..b02edac371 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -225,9 +225,6 @@ static int raw_decode(AVCodecContext *avctx, AVFrame *frame,
need_copy = !avpkt->buf || context->is_1_2_4_8_bpp || context->is_yuv2 || context->is_lt_16bpp;
- frame->pict_type = AV_PICTURE_TYPE_I;
- frame->flags |= AV_FRAME_FLAG_KEY;
-
res = ff_decode_frame_props(avctx, frame);
if (res < 0)
return res;
diff --git a/libavcodec/rtv1.c b/libavcodec/rtv1.c
index 807c8a3466..c40f9ada56 100644
--- a/libavcodec/rtv1.c
+++ b/libavcodec/rtv1.c
@@ -132,9 +132,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p,
if (ret < 0)
return ret;
- p->pict_type = AV_PICTURE_TYPE_I;
- p->flags |= AV_FRAME_FLAG_KEY;
-
*got_frame = 1;
return avpkt->size;
diff --git a/libavcodec/sgidec.c b/libavcodec/sgidec.c
index 04a347c51e..40186dcdb7 100644
--- a/libavcodec/sgidec.c
+++ b/libavcodec/sgidec.c
@@ -248,8 +248,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p,
MAP(2, 1);
break;
}
- p->pict_type = AV_PICTURE_TYPE_I;
- p->flags |= AV_FRAME_FLAG_KEY;
/* Skip header. */
bytestream2_seek(&g, SGI_HEADER_SIZE, SEEK_SET);
diff --git a/libavcodec/sgirledec.c b/libavcodec/sgirledec.c
index 18bf8081fc..3ce72eccb8 100644
--- a/libavcodec/sgirledec.c
+++ b/libavcodec/sgirledec.c
@@ -123,9 +123,6 @@ static int sgirle_decode_frame(AVCodecContext *avctx, AVFrame *frame,
if (ret < 0)
return ret;
- frame->pict_type = AV_PICTURE_TYPE_I;
- frame->flags |= AV_FRAME_FLAG_KEY;
-
*got_frame = 1;
return avpkt->size;
diff --git a/libavcodec/sheervideo.c b/libavcodec/sheervideo.c
index 660e2661a4..ef20633e1f 100644
--- a/libavcodec/sheervideo.c
+++ b/libavcodec/sheervideo.c
@@ -1972,9 +1972,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p,
return AVERROR_INVALIDDATA;
}
- p->pict_type = AV_PICTURE_TYPE_I;
- p->flags |= AV_FRAME_FLAG_KEY;
-
if ((ret = ff_thread_get_buffer(avctx, p, 0)) < 0)
return ret;
diff --git a/libavcodec/speedhqdec.c b/libavcodec/speedhqdec.c
index d3605b0649..e21ef0077f 100644
--- a/libavcodec/speedhqdec.c
+++ b/libavcodec/speedhqdec.c
@@ -436,7 +436,6 @@ static int speedhq_decode_frame(AVCodecContext *avctx, AVFrame *frame,
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) {
return ret;
}
- frame->flags |= AV_FRAME_FLAG_KEY;
if (second_field_offset == 4 || second_field_offset == (buf_size-4)) {
/*
diff --git a/libavcodec/targa_y216dec.c b/libavcodec/targa_y216dec.c
index 2874a51aae..08f85391d8 100644
--- a/libavcodec/targa_y216dec.c
+++ b/libavcodec/targa_y216dec.c
@@ -47,9 +47,6 @@ static int y216_decode_frame(AVCodecContext *avctx, AVFrame *pic,
if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
return ret;
- pic->flags |= AV_FRAME_FLAG_KEY;
- pic->pict_type = AV_PICTURE_TYPE_I;
-
y = (uint16_t *)pic->data[0];
u = (uint16_t *)pic->data[1];
v = (uint16_t *)pic->data[2];
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index 19301d9e49..6157071792 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -2381,7 +2381,6 @@ again:
}
}
- p->flags |= AV_FRAME_FLAG_KEY;
*got_frame = 1;
return avpkt->size;
diff --git a/libavcodec/tmv.c b/libavcodec/tmv.c
index 2a7e1a105f..2ff1424bd8 100644
--- a/libavcodec/tmv.c
+++ b/libavcodec/tmv.c
@@ -56,8 +56,6 @@ static int tmv_decode_frame(AVCodecContext *avctx, AVFrame *frame,
return AVERROR_INVALIDDATA;
}
- frame->pict_type = AV_PICTURE_TYPE_I;
- frame->flags |= AV_FRAME_FLAG_KEY;
dst = frame->data[0];
#if FF_API_PALETTE_HAS_CHANGED
diff --git a/libavcodec/truemotion2rt.c b/libavcodec/truemotion2rt.c
index 4f8590fc82..438f96f6b4 100644
--- a/libavcodec/truemotion2rt.c
+++ b/libavcodec/truemotion2rt.c
@@ -201,8 +201,6 @@ static int truemotion2rt_decode_frame(AVCodecContext *avctx, AVFrame *p,
dst += p->linesize[2];
}
- p->pict_type = AV_PICTURE_TYPE_I;
- p->flags |= AV_FRAME_FLAG_KEY;
*got_frame = 1;
return avpkt->size;
diff --git a/libavcodec/utvideodec.c b/libavcodec/utvideodec.c
index 5377926fa6..4c0fa2ca67 100644
--- a/libavcodec/utvideodec.c
+++ b/libavcodec/utvideodec.c
@@ -890,8 +890,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
break;
}
- frame->flags |= AV_FRAME_FLAG_KEY;
- frame->pict_type = AV_PICTURE_TYPE_I;
if (c->interlaced)
frame->flags |= AV_FRAME_FLAG_INTERLACED;
diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c
index 5cead150d3..8b370e5659 100644
--- a/libavcodec/v210dec.c
+++ b/libavcodec/v210dec.c
@@ -187,9 +187,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic,
if ((ret = ff_thread_get_buffer(avctx, pic, 0)) < 0)
return ret;
- pic->pict_type = AV_PICTURE_TYPE_I;
- pic->flags |= AV_FRAME_FLAG_KEY;
-
if (stride) {
td.stride = stride;
td.buf = psrc;
diff --git a/libavcodec/v210x.c b/libavcodec/v210x.c
index 55630fa2fb..a4b43883ed 100644
--- a/libavcodec/v210x.c
+++ b/libavcodec/v210x.c
@@ -61,8 +61,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic,
udst = (uint16_t *)pic->data[1];
vdst = (uint16_t *)pic->data[2];
yend = ydst + width;
- pic->pict_type = AV_PICTURE_TYPE_I;
- pic->flags |= AV_FRAME_FLAG_KEY;
for (;;) {
uint32_t v = av_be2ne32(*src++);
diff --git a/libavcodec/v308dec.c b/libavcodec/v308dec.c
index 4bc4ea4e21..b591a79dd2 100644
--- a/libavcodec/v308dec.c
+++ b/libavcodec/v308dec.c
@@ -48,9 +48,6 @@ static int v308_decode_frame(AVCodecContext *avctx, AVFrame *pic,
if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
return ret;
- pic->flags |= AV_FRAME_FLAG_KEY;
- pic->pict_type = AV_PICTURE_TYPE_I;
-
y = pic->data[0];
u = pic->data[1];
v = pic->data[2];
diff --git a/libavcodec/v408dec.c b/libavcodec/v408dec.c
index bb6c877c79..2433c6de14 100644
--- a/libavcodec/v408dec.c
+++ b/libavcodec/v408dec.c
@@ -45,9 +45,6 @@ static int v408_decode_frame(AVCodecContext *avctx, AVFrame *pic,
if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
return ret;
- pic->flags |= AV_FRAME_FLAG_KEY;
- pic->pict_type = AV_PICTURE_TYPE_I;
-
y = pic->data[0];
u = pic->data[1];
v = pic->data[2];
diff --git a/libavcodec/v410dec.c b/libavcodec/v410dec.c
index 35e4a8ae03..04be830ad2 100644
--- a/libavcodec/v410dec.c
+++ b/libavcodec/v410dec.c
@@ -102,9 +102,6 @@ static int v410_decode_frame(AVCodecContext *avctx, AVFrame *pic,
if ((ret = ff_thread_get_buffer(avctx, pic, 0)) < 0)
return ret;
- pic->flags |= AV_FRAME_FLAG_KEY;
- pic->pict_type = AV_PICTURE_TYPE_I;
-
td.buf = src;
td.frame = pic;
avctx->execute2(avctx, v410_decode_slice, &td, NULL, thread_count);
diff --git a/libavcodec/vble.c b/libavcodec/vble.c
index 32157913c7..c5d92bd6f5 100644
--- a/libavcodec/vble.c
+++ b/libavcodec/vble.c
@@ -134,10 +134,6 @@ static int vble_decode_frame(AVCodecContext *avctx, AVFrame *pic,
if ((ret = ff_thread_get_buffer(avctx, pic, 0)) < 0)
return ret;
- /* Set flags */
- pic->flags |= AV_FRAME_FLAG_KEY;
- pic->pict_type = AV_PICTURE_TYPE_I;
-
/* Version should always be 1 */
version = AV_RL32(src);
diff --git a/libavcodec/vcr1.c b/libavcodec/vcr1.c
index 771337e262..c9ed62266a 100644
--- a/libavcodec/vcr1.c
+++ b/libavcodec/vcr1.c
@@ -62,8 +62,6 @@ static int vcr1_decode_frame(AVCodecContext *avctx, AVFrame *p,
if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
return ret;
- p->pict_type = AV_PICTURE_TYPE_I;
- p->flags |= AV_FRAME_FLAG_KEY;
for (i = 0; i < 16; i++) {
a->delta[i] = *bytestream++;
diff --git a/libavcodec/vmixdec.c b/libavcodec/vmixdec.c
index f61fd02092..46d817c7f3 100644
--- a/libavcodec/vmixdec.c
+++ b/libavcodec/vmixdec.c
@@ -289,9 +289,6 @@ static int decode_frame(AVCodecContext *avctx,
avctx->execute2(avctx, decode_slices, frame, NULL, s->nb_slices);
- frame->pict_type = AV_PICTURE_TYPE_I;
- frame->flags |= AV_FRAME_FLAG_KEY;
-
*got_frame = 1;
return avpkt->size;
diff --git a/libavcodec/wbmpdec.c b/libavcodec/wbmpdec.c
index 3b5753abcd..50c729047d 100644
--- a/libavcodec/wbmpdec.c
+++ b/libavcodec/wbmpdec.c
@@ -74,9 +74,6 @@ static int wbmp_decode_frame(AVCodecContext *avctx, AVFrame *p,
else
readbits(p->data[0], width, height, p->linesize[0], gb.buffer, gb.buffer_end - gb.buffer);
- p->flags |= AV_FRAME_FLAG_KEY;
- p->pict_type = AV_PICTURE_TYPE_I;
-
*got_frame = 1;
return buf_size;
diff --git a/libavcodec/wnv1.c b/libavcodec/wnv1.c
index 0e8dae598f..3d0d90fe38 100644
--- a/libavcodec/wnv1.c
+++ b/libavcodec/wnv1.c
@@ -69,7 +69,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p,
if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
return ret;
- p->flags |= AV_FRAME_FLAG_KEY;
if ((ret = init_get_bits8(&gb, buf + 8, buf_size - 8)) < 0)
return ret;
diff --git a/libavcodec/xbmdec.c b/libavcodec/xbmdec.c
index 2d84327e02..09096b9df6 100644
--- a/libavcodec/xbmdec.c
+++ b/libavcodec/xbmdec.c
@@ -135,9 +135,6 @@ static int xbm_decode_frame(AVCodecContext *avctx, AVFrame *p,
}
}
- p->flags |= AV_FRAME_FLAG_KEY;
- p->pict_type = AV_PICTURE_TYPE_I;
-
*got_frame = 1;
return avpkt->size;
diff --git a/libavcodec/xl.c b/libavcodec/xl.c
index f008d56e89..6d60611ad3 100644
--- a/libavcodec/xl.c
+++ b/libavcodec/xl.c
@@ -59,8 +59,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p,
if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
return ret;
- p->pict_type = AV_PICTURE_TYPE_I;
- p->flags |= AV_FRAME_FLAG_KEY;
Y = p->data[0];
U = p->data[1];
diff --git a/libavcodec/xpmdec.c b/libavcodec/xpmdec.c
index 6db9f5248e..2eb5daf545 100644
--- a/libavcodec/xpmdec.c
+++ b/libavcodec/xpmdec.c
@@ -429,9 +429,6 @@ static int xpm_decode_frame(AVCodecContext *avctx, AVFrame *p,
ptr += mod_strcspn(ptr, ",") + 1;
}
- p->flags |= AV_FRAME_FLAG_KEY;
- p->pict_type = AV_PICTURE_TYPE_I;
-
*got_frame = 1;
return avpkt->size;
diff --git a/libavcodec/xwddec.c b/libavcodec/xwddec.c
index f691587be9..fac8c21af8 100644
--- a/libavcodec/xwddec.c
+++ b/libavcodec/xwddec.c
@@ -216,9 +216,6 @@ static int xwd_decode_frame(AVCodecContext *avctx, AVFrame *p,
if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
return ret;
- p->flags |= AV_FRAME_FLAG_KEY;
- p->pict_type = AV_PICTURE_TYPE_I;
-
if (avctx->pix_fmt == AV_PIX_FMT_PAL8) {
uint32_t *dst = (uint32_t *)p->data[1];
uint8_t red, green, blue;
diff --git a/libavcodec/y41pdec.c b/libavcodec/y41pdec.c
index 14e36dc998..270b23c14f 100644
--- a/libavcodec/y41pdec.c
+++ b/libavcodec/y41pdec.c
@@ -51,9 +51,6 @@ static int y41p_decode_frame(AVCodecContext *avctx, AVFrame *pic,
if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
return ret;
- pic->flags |= AV_FRAME_FLAG_KEY;
- pic->pict_type = AV_PICTURE_TYPE_I;
-
for (i = avctx->height - 1; i >= 0 ; i--) {
y = &pic->data[0][i * pic->linesize[0]];
u = &pic->data[1][i * pic->linesize[1]];
diff --git a/libavcodec/ylc.c b/libavcodec/ylc.c
index b03df31556..44cbfa712a 100644
--- a/libavcodec/ylc.c
+++ b/libavcodec/ylc.c
@@ -426,8 +426,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p,
dst += p->linesize[0];
}
- p->pict_type = AV_PICTURE_TYPE_I;
- p->flags |= AV_FRAME_FLAG_KEY;
*got_frame = 1;
return avpkt->size;
diff --git a/libavcodec/yuv4dec.c b/libavcodec/yuv4dec.c
index ad83a2125c..3b406057f9 100644
--- a/libavcodec/yuv4dec.c
+++ b/libavcodec/yuv4dec.c
@@ -46,9 +46,6 @@ static int yuv4_decode_frame(AVCodecContext *avctx, AVFrame *pic,
if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
return ret;
- pic->flags |= AV_FRAME_FLAG_KEY;
- pic->pict_type = AV_PICTURE_TYPE_I;
-
y = pic->data[0];
u = pic->data[1];
v = pic->data[2];
--
2.40.1
More information about the ffmpeg-devel
mailing list