1
0

avcodec: Remove redundant setting of AV_FRAME_FLAG_KEY, AV_PICTURE_TYPE_I

This is done generically now.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2024-05-09 03:34:32 +02:00
parent eee88ba0dc
commit df3cdf4c75
74 changed files with 0 additions and 184 deletions

View File

@ -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};

View File

@ -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);

View File

@ -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];

View File

@ -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,

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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,

View File

@ -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);

View File

@ -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;

View File

@ -406,9 +406,6 @@ skip:
}
}
p->pict_type = AV_PICTURE_TYPE_I;
p->flags |= AV_FRAME_FLAG_KEY;
*got_frame = 1;
return 0;

View File

@ -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;

View File

@ -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;

View File

@ -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,

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -212,9 +212,6 @@ convert:
}
}
p->flags |= AV_FRAME_FLAG_KEY;
p->pict_type = AV_PICTURE_TYPE_I;
*got_frame = 1;
return avpkt->size;

View File

@ -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;

View File

@ -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;

View File

@ -2503,8 +2503,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;

View File

@ -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);

View File

@ -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 */

View File

@ -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);

View File

@ -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; \

View File

@ -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)

View File

@ -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;

View File

@ -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)

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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) {

View File

@ -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;

View File

@ -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;

View File

@ -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");

View File

@ -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;

View File

@ -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];

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -440,7 +440,6 @@ static int speedhq_decode_frame(AVCodecContext *avctx, AVFrame *frame,
if ((ret = ff_thread_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)) {
/*

View File

@ -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];

View File

@ -2381,7 +2381,6 @@ again:
}
}
p->flags |= AV_FRAME_FLAG_KEY;
*got_frame = 1;
return avpkt->size;

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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++);

View File

@ -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];

View File

@ -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];

View File

@ -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);

View File

@ -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);

View File

@ -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++;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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];

View File

@ -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;

View File

@ -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;

View File

@ -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]];

View File

@ -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;

View File

@ -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];