diff options
author | Stephen Hutchinson <qyot27@gmail.com> | 2016-01-26 19:10:02 -0500 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-02-01 01:36:44 +0100 |
commit | 70742e599b6698f14d08af745c119c16711cd5ba (patch) | |
tree | 4e4423d9df0d80cde9a4f1ad7f10fabf62b142a2 /libavcodec/libx265.c | |
parent | 80075b0149049a131ea0d4e8b96c6c0695e128b7 (diff) | |
download | ffmpeg-70742e599b6698f14d08af745c119c16711cd5ba.tar.gz |
libx265: Enable 12-bit encoding
The configure detection is bumped to X265_BUILD >= 68,
since API version 68 corresponds with the x265 1.8
release tarball. The warnings inside x265 about
12-bit being experimental were removed prior to API
version 72 a short time later. At this time of
writing, X265_BUILD is at version 80.
12-bit support in the HEVC standard was approved in
October 2014 as part of HEVC Version 2 and published
in January 2015:
http://www.itu.int/ITU-T/recommendations/rec.aspx?rec=12296
http://www.itu.int/rec/T-REC-H.265-201410-S
https://hevc.hhi.fraunhofer.de/rext
Reveiwed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/libx265.c')
-rw-r--r-- | libavcodec/libx265.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c index 4c36f4c3c1..68c7fba3cc 100644 --- a/libavcodec/libx265.c +++ b/libavcodec/libx265.c @@ -146,14 +146,17 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx) switch (avctx->pix_fmt) { case AV_PIX_FMT_YUV420P: case AV_PIX_FMT_YUV420P10: + case AV_PIX_FMT_YUV420P12: ctx->params->internalCsp = X265_CSP_I420; break; case AV_PIX_FMT_YUV422P: case AV_PIX_FMT_YUV422P10: + case AV_PIX_FMT_YUV422P12: ctx->params->internalCsp = X265_CSP_I422; break; case AV_PIX_FMT_YUV444P: case AV_PIX_FMT_YUV444P10: + case AV_PIX_FMT_YUV444P12: ctx->params->internalCsp = X265_CSP_I444; break; } @@ -318,6 +321,16 @@ static const enum AVPixelFormat x265_csp_eight[] = { AV_PIX_FMT_NONE }; +static const enum AVPixelFormat x265_csp_ten[] = { + AV_PIX_FMT_YUV420P, + AV_PIX_FMT_YUV422P, + AV_PIX_FMT_YUV444P, + AV_PIX_FMT_YUV420P10, + AV_PIX_FMT_YUV422P10, + AV_PIX_FMT_YUV444P10, + AV_PIX_FMT_NONE +}; + static const enum AVPixelFormat x265_csp_twelve[] = { AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, @@ -325,13 +338,18 @@ static const enum AVPixelFormat x265_csp_twelve[] = { AV_PIX_FMT_YUV420P10, AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV444P10, + AV_PIX_FMT_YUV420P12, + AV_PIX_FMT_YUV422P12, + AV_PIX_FMT_YUV444P12, AV_PIX_FMT_NONE }; static av_cold void libx265_encode_init_csp(AVCodec *codec) { - if (x265_api_get(10)) + if (x265_api_get(12)) codec->pix_fmts = x265_csp_twelve; + else if (x265_api_get(10)) + codec->pix_fmts = x265_csp_ten; else if (x265_api_get(8)) codec->pix_fmts = x265_csp_eight; } |