aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGildas Cocherel <gildas.cocherel@laposte.net>2013-12-19 00:30:24 +0100
committerAnton Khirnov <anton@khirnov.net>2013-12-20 19:35:27 +0100
commit2a41826bea3833895dc06939831b7f35ca1f597e (patch)
treee1dca860f9256aa2d6b03a5ef9505d73719f6501
parentf412b2c9f3a7add0ab8021262ec4bad249347e30 (diff)
downloadffmpeg-2a41826bea3833895dc06939831b7f35ca1f597e.tar.gz
lavc: add HEVC profiles names
Signed-off-by: Anton Khirnov <anton@khirnov.net>
-rw-r--r--doc/APIchanges3
-rw-r--r--libavcodec/avcodec.h5
-rw-r--r--libavcodec/hevc.c9
-rw-r--r--libavcodec/version.h2
4 files changed, 18 insertions, 1 deletions
diff --git a/doc/APIchanges b/doc/APIchanges
index 944d214977..60e16d88c5 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -13,6 +13,9 @@ libavutil: 2013-12-xx
API changes, most recent first:
+2013-12-xx - xxxxxxx - lavc 55.30.0 - avcodec.h
+ Add HEVC profiles
+
2013-12-xx - xxxxxxx - lavc 55.28.1 - avcodec.h
av_frame_alloc(), av_frame_unref() and av_frame_free() now can and should be
used instead of avcodec_alloc_frame(), avcodec_get_frame_defaults() and
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 0e6ac0524e..9531c856bb 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2662,6 +2662,11 @@ typedef struct AVCodecContext {
#define FF_PROFILE_JPEG2000_DCINEMA_2K 3
#define FF_PROFILE_JPEG2000_DCINEMA_4K 4
+
+#define FF_PROFILE_HEVC_MAIN 1
+#define FF_PROFILE_HEVC_MAIN_10 2
+#define FF_PROFILE_HEVC_MAIN_STILL_PICTURE 3
+
/**
* level
* - encoding: Set by user.
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index 4af5aee155..530abdc26e 100644
--- a/libavcodec/hevc.c
+++ b/libavcodec/hevc.c
@@ -3170,6 +3170,14 @@ static void hevc_decode_flush(AVCodecContext *avctx)
#define OFFSET(x) offsetof(HEVCContext, x)
#define PAR (AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_VIDEO_PARAM)
+
+static const AVProfile profiles[] = {
+ { FF_PROFILE_HEVC_MAIN, "Main" },
+ { FF_PROFILE_HEVC_MAIN_10, "Main 10" },
+ { FF_PROFILE_HEVC_MAIN_STILL_PICTURE, "Main Still Picture" },
+ { FF_PROFILE_UNKNOWN },
+};
+
static const AVOption options[] = {
{ "apply_defdispwin", "Apply default display window from VUI", OFFSET(apply_defdispwin),
AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, PAR },
@@ -3198,4 +3206,5 @@ AVCodec ff_hevc_decoder = {
.init_thread_copy = hevc_init_thread_copy,
.capabilities = CODEC_CAP_DR1 | CODEC_CAP_DELAY |
CODEC_CAP_FRAME_THREADS,
+ .profiles = NULL_IF_CONFIG_SMALL(profiles),
};
diff --git a/libavcodec/version.h b/libavcodec/version.h
index c5a777bffd..25c22df808 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -27,7 +27,7 @@
*/
#define LIBAVCODEC_VERSION_MAJOR 55
-#define LIBAVCODEC_VERSION_MINOR 29
+#define LIBAVCODEC_VERSION_MINOR 30
#define LIBAVCODEC_VERSION_MICRO 0
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \