Commit 1eb7c1d4 authored by Rodger Combs's avatar Rodger Combs

lavc/libx265: support all color parameters that x265 does

parent 0c31a387
...@@ -115,11 +115,11 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx) ...@@ -115,11 +115,11 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx)
ctx->params->sourceHeight = avctx->height; ctx->params->sourceHeight = avctx->height;
ctx->params->bEnablePsnr = !!(avctx->flags & AV_CODEC_FLAG_PSNR); ctx->params->bEnablePsnr = !!(avctx->flags & AV_CODEC_FLAG_PSNR);
if ((avctx->color_primaries <= AVCOL_PRI_BT2020 && if ((avctx->color_primaries <= AVCOL_PRI_SMPTE432 &&
avctx->color_primaries != AVCOL_PRI_UNSPECIFIED) || avctx->color_primaries != AVCOL_PRI_UNSPECIFIED) ||
(avctx->color_trc <= AVCOL_TRC_BT2020_12 && (avctx->color_trc <= AVCOL_TRC_ARIB_STD_B67 &&
avctx->color_trc != AVCOL_TRC_UNSPECIFIED) || avctx->color_trc != AVCOL_TRC_UNSPECIFIED) ||
(avctx->colorspace <= AVCOL_SPC_BT2020_CL && (avctx->colorspace <= AVCOL_SPC_ICTCP &&
avctx->colorspace != AVCOL_SPC_UNSPECIFIED)) { avctx->colorspace != AVCOL_SPC_UNSPECIFIED)) {
ctx->params->vui.bEnableVideoSignalTypePresentFlag = 1; ctx->params->vui.bEnableVideoSignalTypePresentFlag = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment