diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2014-06-11 21:19:42 +0100 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2014-06-12 16:45:02 +0100 |
commit | 61a344916d324c8ca52064964478f46c877f02e2 (patch) | |
tree | 1d052d84eda086b6a6e4be1ae2603d2dbc6b9f98 /libavcodec/libx265.c | |
parent | 180e6b48060f97fdd8497320395b61dc85664ecd (diff) | |
download | ffmpeg-61a344916d324c8ca52064964478f46c877f02e2.tar.gz |
libx265: Add 4:2:2 support
It is also not final yet, so require -strict experimental.
Requires a bump to version 17.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavcodec/libx265.c')
-rw-r--r-- | libavcodec/libx265.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c index 0730784d24..5f27662079 100644 --- a/libavcodec/libx265.c +++ b/libavcodec/libx265.c @@ -82,10 +82,9 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx) int nnal; if (avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL && - !av_pix_fmt_desc_get(avctx->pix_fmt)->log2_chroma_w && - !av_pix_fmt_desc_get(avctx->pix_fmt)->log2_chroma_h) { + !av_pix_fmt_desc_get(avctx->pix_fmt)->log2_chroma_w) { av_log(avctx, AV_LOG_ERROR, - "4:4:4 support is not fully defined for HEVC yet. " + "4:2:2 and 4:4:4 support is not fully defined for HEVC yet. " "Set -strict experimental to encode anyway.\n"); return AVERROR(ENOSYS); } @@ -134,6 +133,10 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx) case AV_PIX_FMT_YUV420P10: ctx->params->internalCsp = X265_CSP_I420; break; + case AV_PIX_FMT_YUV422P: + case AV_PIX_FMT_YUV422P10: + ctx->params->internalCsp = X265_CSP_I422; + break; case AV_PIX_FMT_YUV444P: case AV_PIX_FMT_YUV444P10: ctx->params->internalCsp = X265_CSP_I444; @@ -262,14 +265,17 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt, static const enum AVPixelFormat x265_csp_eight[] = { AV_PIX_FMT_YUV420P, + AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_NONE }; static const enum AVPixelFormat x265_csp_twelve[] = { 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 }; |