diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-05-10 19:33:26 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-05-19 11:40:55 +0200 |
commit | 95937d6316310015187cbad371b58f54653a9ed1 (patch) | |
tree | ec5405175fce7e36aa5525ad34237eb94244c4ec /libavcodec | |
parent | 2a00d68c09ea37a0b413c103a0fad915c8ebb067 (diff) | |
download | ffmpeg-95937d6316310015187cbad371b58f54653a9ed1.tar.gz |
avcodec/codec_desc: Mark AVRN, TGQ, PhotoCD, VBN as intra-only
Also remove the then redundant assignments of AV_FRAME_FLAG_KEY,
AV_PICTURE_TYPE_I.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/avrndec.c | 2 | ||||
-rw-r--r-- | libavcodec/codec_desc.c | 7 | ||||
-rw-r--r-- | libavcodec/eatgq.c | 2 | ||||
-rw-r--r-- | libavcodec/photocd.c | 3 | ||||
-rw-r--r-- | libavcodec/vbndec.c | 3 |
5 files changed, 4 insertions, 13 deletions
diff --git a/libavcodec/avrndec.c b/libavcodec/avrndec.c index 97d2824625..02bdfb6516 100644 --- a/libavcodec/avrndec.c +++ b/libavcodec/avrndec.c @@ -67,8 +67,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(a->interlace) { buf += (true_height - avctx->height)*avctx->width; diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index 5ae26f5d2b..a28ef68061 100644 --- a/libavcodec/codec_desc.c +++ b/libavcodec/codec_desc.c @@ -905,7 +905,7 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "tgq", .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts TGQ video"), - .props = AV_CODEC_PROP_LOSSY, + .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, }, { .id = AV_CODEC_ID_TQI, @@ -1503,6 +1503,7 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "avrn", .long_name = NULL_IF_CONFIG_SMALL("Avid AVI Codec"), + .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, }, { .id = AV_CODEC_ID_CPIA, @@ -1820,7 +1821,7 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "photocd", .long_name = NULL_IF_CONFIG_SMALL("Kodak Photo CD"), - .props = AV_CODEC_PROP_LOSSY, + .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, }, { .id = AV_CODEC_ID_IPU, @@ -1869,7 +1870,7 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "vbn", .long_name = NULL_IF_CONFIG_SMALL("Vizrt Binary Image"), - .props = AV_CODEC_PROP_LOSSY, + .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, }, { .id = AV_CODEC_ID_JPEGXL, diff --git a/libavcodec/eatgq.c b/libavcodec/eatgq.c index 0f0ed3585f..d326c05390 100644 --- a/libavcodec/eatgq.c +++ b/libavcodec/eatgq.c @@ -237,8 +237,6 @@ static int tgq_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; for (y = 0; y < FFALIGN(avctx->height, 16) >> 4; y++) for (x = 0; x < FFALIGN(avctx->width, 16) >> 4; x++) diff --git a/libavcodec/photocd.c b/libavcodec/photocd.c index 07e8d460bd..75948d1b42 100644 --- a/libavcodec/photocd.c +++ b/libavcodec/photocd.c @@ -331,9 +331,6 @@ static int photocd_decode_frame(AVCodecContext *avctx, AVFrame *p, if ((ret = ff_thread_get_buffer(avctx, p, 0)) < 0) return ret; - p->pict_type = AV_PICTURE_TYPE_I; - p->flags |= AV_FRAME_FLAG_KEY; - bytestream2_init(gb, avpkt->data, avpkt->size); if (s->resolution < 3) { diff --git a/libavcodec/vbndec.c b/libavcodec/vbndec.c index 4a38b02168..a96843f212 100644 --- a/libavcodec/vbndec.c +++ b/libavcodec/vbndec.c @@ -151,9 +151,6 @@ static int vbn_decode_frame(AVCodecContext *avctx, if (ret < 0) goto out; - frame->pict_type = AV_PICTURE_TYPE_I; - frame->flags |= AV_FRAME_FLAG_KEY; - if (format == VBN_FORMAT_RAW) { uint8_t *flipped = frame->data[0] + frame->linesize[0] * (frame->height - 1); av_image_copy_plane(flipped, -frame->linesize[0], image_buf ? image_buf : gb->buffer, linesize, linesize, frame->height); |