mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
x265enc: Specify colorimetry related VUI parameters
Set the colorimetry config for the information to be embedded in encodec bitstream.
This commit is contained in:
parent
8753561015
commit
d6680b35b4
1 changed files with 17 additions and 0 deletions
|
@ -676,6 +676,23 @@ gst_x265_enc_init_encoder (GstX265Enc * encoder)
|
||||||
encoder->x265param.vui.sarHeight = info->par_d;
|
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) {
|
if (encoder->qp != -1) {
|
||||||
/* CQP */
|
/* CQP */
|
||||||
encoder->x265param.rc.qp = encoder->qp;
|
encoder->x265param.rc.qp = encoder->qp;
|
||||||
|
|
Loading…
Reference in a new issue