From 9e4225cf7f26b57e0054470127bcc032b6d29742 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 12 Dec 2020 15:09:10 +0100 Subject: Handle AVID MJPEG streams directly in the MJPEG decoder. AVID streams - currently handled by the AVRN decoder - can be (depending on extradata contents) either MJPEG or raw video. To decode the MJPEG variant, the AVRN decoder currently instantiates a MJPEG decoder internally and forwards decoded frames to the caller (possibly after cropping them). This is suboptimal, because the AVRN decoder does not forward all the features of the internal MJPEG decoder, such as direct rendering. Handling such forwarding in a full and generic manner would be quite hard, so it is simpler to just handle those streams in the MJPEG decoder directly. The AVRN decoder, which now handles only the raw streams, can now be marked as supporting direct rendering. This also removes the last remaining internal use of the obsolete decoding API. --- libavformat/isom_tags.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavformat/isom_tags.c') diff --git a/libavformat/isom_tags.c b/libavformat/isom_tags.c index 75c3ee2b32..1666b9d4a5 100644 --- a/libavformat/isom_tags.c +++ b/libavformat/isom_tags.c @@ -69,8 +69,8 @@ const AVCodecTag ff_codec_movvideo_tags[] = { { AV_CODEC_ID_MJPEG, MKTAG('j', 'p', 'e', 'g') }, /* PhotoJPEG */ { AV_CODEC_ID_MJPEG, MKTAG('m', 'j', 'p', 'a') }, /* Motion-JPEG (format A) */ - { AV_CODEC_ID_AVRN , MKTAG('A', 'V', 'D', 'J') }, /* MJPEG with alpha-channel (AVID JFIF meridien compressed) */ -/* { AV_CODEC_ID_MJPEG, MKTAG('A', 'V', 'R', 'n') }, *//* MJPEG with alpha-channel (AVID ABVB/Truevision NuVista) */ + { AV_CODEC_ID_MJPEG, MKTAG('A', 'V', 'D', 'J') }, /* MJPEG with alpha-channel (AVID JFIF meridien compressed) */ + { AV_CODEC_ID_MJPEG, MKTAG('A', 'V', 'R', 'n') }, /* MJPEG with alpha-channel (AVID ABVB/Truevision NuVista) */ { AV_CODEC_ID_MJPEG, MKTAG('d', 'm', 'b', '1') }, /* Motion JPEG OpenDML */ { AV_CODEC_ID_MJPEGB, MKTAG('m', 'j', 'p', 'b') }, /* Motion-JPEG (format B) */ -- cgit v1.2.3