summaryrefslogtreecommitdiff
path: root/libavcodec/libx265.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2016-03-13 09:40:09 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2016-03-13 09:40:09 +0100
commitd11d78facb1b24a0dc6ea63c2410d62c1f92742e (patch)
tree9365821388c445791c27227fd2f40babf1778310 /libavcodec/libx265.c
parentdb4786f1cf03a5ce4841412e5dad03404e5ade7a (diff)
downloadffmpeg-d11d78facb1b24a0dc6ea63c2410d62c1f92742e.tar.gz
lavc/libx265: Support GBR encoding.
Diffstat (limited to 'libavcodec/libx265.c')
-rw-r--r--libavcodec/libx265.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
index 68c7fba3cc..11088b2205 100644
--- a/libavcodec/libx265.c
+++ b/libavcodec/libx265.c
@@ -154,6 +154,12 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx)
case AV_PIX_FMT_YUV422P12:
ctx->params->internalCsp = X265_CSP_I422;
break;
+ case AV_PIX_FMT_GBRP:
+ case AV_PIX_FMT_GBRP10:
+ case AV_PIX_FMT_GBRP12:
+ ctx->params->vui.matrixCoeffs = AVCOL_SPC_RGB;
+ ctx->params->vui.bEnableVideoSignalTypePresentFlag = 1;
+ ctx->params->vui.bEnableColorDescriptionPresentFlag = 1;
case AV_PIX_FMT_YUV444P:
case AV_PIX_FMT_YUV444P10:
case AV_PIX_FMT_YUV444P12:
@@ -318,6 +324,7 @@ static const enum AVPixelFormat x265_csp_eight[] = {
AV_PIX_FMT_YUV420P,
AV_PIX_FMT_YUV422P,
AV_PIX_FMT_YUV444P,
+ AV_PIX_FMT_GBRP,
AV_PIX_FMT_NONE
};
@@ -325,9 +332,11 @@ static const enum AVPixelFormat x265_csp_ten[] = {
AV_PIX_FMT_YUV420P,
AV_PIX_FMT_YUV422P,
AV_PIX_FMT_YUV444P,
+ AV_PIX_FMT_GBRP,
AV_PIX_FMT_YUV420P10,
AV_PIX_FMT_YUV422P10,
AV_PIX_FMT_YUV444P10,
+ AV_PIX_FMT_GBRP10,
AV_PIX_FMT_NONE
};
@@ -335,12 +344,15 @@ static const enum AVPixelFormat x265_csp_twelve[] = {
AV_PIX_FMT_YUV420P,
AV_PIX_FMT_YUV422P,
AV_PIX_FMT_YUV444P,
+ AV_PIX_FMT_GBRP,
AV_PIX_FMT_YUV420P10,
AV_PIX_FMT_YUV422P10,
AV_PIX_FMT_YUV444P10,
+ AV_PIX_FMT_GBRP10,
AV_PIX_FMT_YUV420P12,
AV_PIX_FMT_YUV422P12,
AV_PIX_FMT_YUV444P12,
+ AV_PIX_FMT_GBRP12,
AV_PIX_FMT_NONE
};