summaryrefslogtreecommitdiff
path: root/libavcodec/nvenc.c
diff options
context:
space:
mode:
authorTimo Rothenpieler <timo@rothenpieler.org>2016-09-28 14:21:03 +0200
committerTimo Rothenpieler <timo@rothenpieler.org>2016-09-28 16:48:43 +0200
commit033f98c902f5b556a01be27d2cb5cff93bda92f3 (patch)
treea0031e22b909e21640fe27ab7715c6ecdf04d37c /libavcodec/nvenc.c
parenta81b000a392e5c7119d2eddb3f4c90ab9f1e0554 (diff)
avcodec/nvenc: add HEVC REXT profile
Diffstat (limited to 'libavcodec/nvenc.c')
-rw-r--r--libavcodec/nvenc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index ecc1c4f9e2..421ea79c62 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -864,6 +864,10 @@ static av_cold int nvenc_setup_hevc_config(AVCodecContext *avctx)
cc->profileGUID = NV_ENC_HEVC_PROFILE_MAIN10_GUID;
avctx->profile = FF_PROFILE_HEVC_MAIN_10;
break;
+ case NV_ENC_HEVC_PROFILE_REXT:
+ cc->profileGUID = NV_ENC_HEVC_PROFILE_FREXT_GUID;
+ avctx->profile = FF_PROFILE_HEVC_REXT;
+ break;
}
// force setting profile as main10 if input is 10 bit
@@ -872,6 +876,12 @@ static av_cold int nvenc_setup_hevc_config(AVCodecContext *avctx)
avctx->profile = FF_PROFILE_HEVC_MAIN_10;
}
+ // force setting profile as rext if input is yuv444
+ if (IS_YUV444(ctx->data_pix_fmt)) {
+ cc->profileGUID = NV_ENC_HEVC_PROFILE_FREXT_GUID;
+ avctx->profile = FF_PROFILE_HEVC_REXT;
+ }
+
hevc->chromaFormatIDC = IS_YUV444(ctx->data_pix_fmt) ? 3 : 1;
hevc->pixelBitDepthMinus8 = IS_10BIT(ctx->data_pix_fmt) ? 2 : 0;