Commit d6680b35 authored by Seungha Yang's avatar Seungha Yang 🐑

x265enc: Specify colorimetry related VUI parameters

Set the colorimetry config for the information to be embedded in encodec bitstream.
parent 87535610
Pipeline #49441 passed with stages
in 129 minutes and 44 seconds
......@@ -676,6 +676,23 @@ gst_x265_enc_init_encoder (GstX265Enc * encoder)
encoder->x265param.vui.sarHeight = info->par_d;
}
encoder->x265param.vui.bEnableVideoSignalTypePresentFlag = 1;
/* Unspecified video format (5) */
encoder->x265param.vui.videoFormat = 5;
if (info->colorimetry.range == GST_VIDEO_COLOR_RANGE_0_255) {
encoder->x265param.vui.bEnableVideoFullRangeFlag = 1;
} else {
encoder->x265param.vui.bEnableVideoFullRangeFlag = 0;
}
encoder->x265param.vui.bEnableColorDescriptionPresentFlag = 1;
encoder->x265param.vui.matrixCoeffs =
gst_video_color_matrix_to_iso (info->colorimetry.matrix);
encoder->x265param.vui.colorPrimaries =
gst_video_color_primaries_to_iso (info->colorimetry.primaries);
encoder->x265param.vui.transferCharacteristics =
gst_video_color_transfer_to_iso (info->colorimetry.transfer);
if (encoder->qp != -1) {
/* CQP */
encoder->x265param.rc.qp = encoder->qp;
......
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