diff options
author | Anton Khirnov <anton@khirnov.net> | 2014-07-20 11:26:13 +0000 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2014-07-28 08:02:50 +0000 |
commit | c5fca0174db9ed45be821177f49bd9633152704d (patch) | |
tree | 99c8d47f6ad5b6d0334ab1c75e37f0d73177e51d /libavcodec | |
parent | 42eb9154a83e9a7aedb1168b2f1112af765cf2b5 (diff) | |
download | ffmpeg-streaming-c5fca0174db9ed45be821177f49bd9633152704d.zip ffmpeg-streaming-c5fca0174db9ed45be821177f49bd9633152704d.tar.gz |
lavc: add a property for marking codecs that support frame reordering
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/avcodec.h | 10 | ||||
-rw-r--r-- | libavcodec/codec_desc.c | 32 | ||||
-rw-r--r-- | libavcodec/version.h | 2 |
3 files changed, 27 insertions, 17 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 8f93911..7385dd3 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -509,6 +509,16 @@ typedef struct AVCodecDescriptor { * Codec supports lossless compression. Audio and video codecs only. */ #define AV_CODEC_PROP_LOSSLESS (1 << 2) +/** + * Codec supports frame reordering. That is, the coded order (the order in which + * the encoded packets are output by the encoders / stored / input to the + * decoders) may be different from the presentation order of the corresponding + * frames. + * + * For codecs that do not have this property set, PTS and DTS should always be + * equal. + */ +#define AV_CODEC_PROP_REORDER (1 << 3) /** * @ingroup lavc_decoding diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index f0a6dad..548c508 100644 --- a/libavcodec/codec_desc.c +++ b/libavcodec/codec_desc.c @@ -30,14 +30,14 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "mpeg1video", .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video"), - .props = AV_CODEC_PROP_LOSSY, + .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, }, { .id = AV_CODEC_ID_MPEG2VIDEO, .type = AVMEDIA_TYPE_VIDEO, .name = "mpeg2video", .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video"), - .props = AV_CODEC_PROP_LOSSY, + .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, }, #if FF_API_XVMC { @@ -60,7 +60,7 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "h263", .long_name = NULL_IF_CONFIG_SMALL("H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2"), - .props = AV_CODEC_PROP_LOSSY, + .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, }, { .id = AV_CODEC_ID_RV10, @@ -74,7 +74,7 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "rv20", .long_name = NULL_IF_CONFIG_SMALL("RealVideo 1.0"), - .props = AV_CODEC_PROP_LOSSY, + .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, }, { .id = AV_CODEC_ID_MJPEG, @@ -95,7 +95,7 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "mpeg4", .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2"), - .props = AV_CODEC_PROP_LOSSY, + .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, }, { .id = AV_CODEC_ID_RAWVIDEO, @@ -144,14 +144,14 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "h263p", .long_name = NULL_IF_CONFIG_SMALL("H.263+ / H.263-1998 / H.263 version 2"), - .props = AV_CODEC_PROP_LOSSY, + .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, }, { .id = AV_CODEC_ID_H263I, .type = AVMEDIA_TYPE_VIDEO, .name = "h263i", .long_name = NULL_IF_CONFIG_SMALL("Intel H.263"), - .props = AV_CODEC_PROP_LOSSY, + .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, }, { .id = AV_CODEC_ID_FLV1, @@ -172,7 +172,7 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "svq3", .long_name = NULL_IF_CONFIG_SMALL("Sorenson Vector Quantizer 3 / Sorenson Video 3 / SVQ3"), - .props = AV_CODEC_PROP_LOSSY, + .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, }, { .id = AV_CODEC_ID_DVVIDEO, @@ -200,7 +200,7 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "h264", .long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_LOSSLESS, + .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_LOSSLESS | AV_CODEC_PROP_REORDER, }, { .id = AV_CODEC_ID_INDEO3, @@ -445,28 +445,28 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "rv30", .long_name = NULL_IF_CONFIG_SMALL("RealVideo 3.0"), - .props = AV_CODEC_PROP_LOSSY, + .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, }, { .id = AV_CODEC_ID_RV40, .type = AVMEDIA_TYPE_VIDEO, .name = "rv40", .long_name = NULL_IF_CONFIG_SMALL("RealVideo 4.0"), - .props = AV_CODEC_PROP_LOSSY, + .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, }, { .id = AV_CODEC_ID_VC1, .type = AVMEDIA_TYPE_VIDEO, .name = "vc1", .long_name = NULL_IF_CONFIG_SMALL("SMPTE VC-1"), - .props = AV_CODEC_PROP_LOSSY, + .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, }, { .id = AV_CODEC_ID_WMV3, .type = AVMEDIA_TYPE_VIDEO, .name = "wmv3", .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 9"), - .props = AV_CODEC_PROP_LOSSY, + .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, }, { .id = AV_CODEC_ID_LOCO, @@ -578,7 +578,7 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "cavs", .long_name = NULL_IF_CONFIG_SMALL("Chinese AVS (Audio Video Standard) (AVS1-P2, JiZhun profile)"), - .props = AV_CODEC_PROP_LOSSY, + .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, }, { .id = AV_CODEC_ID_JPEG2000, @@ -726,7 +726,7 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "dirac", .long_name = NULL_IF_CONFIG_SMALL("Dirac"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_LOSSLESS, + .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_LOSSLESS | AV_CODEC_PROP_REORDER, }, { .id = AV_CODEC_ID_BFI, @@ -1097,7 +1097,7 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "hevc", .long_name = NULL_IF_CONFIG_SMALL("HEVC (High Efficiency Video Coding)"), - .props = AV_CODEC_PROP_LOSSY, + .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, }, { .id = AV_CODEC_ID_FIC, diff --git a/libavcodec/version.h b/libavcodec/version.h index 99ba631..d521221 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -29,7 +29,7 @@ #include "libavutil/version.h" #define LIBAVCODEC_VERSION_MAJOR 55 -#define LIBAVCODEC_VERSION_MINOR 56 +#define LIBAVCODEC_VERSION_MINOR 57 #define LIBAVCODEC_VERSION_MICRO 0 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ |