mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
matroska: Add BT2020_10, PQ and HLG transfer functions
The direct use of newly added transfer functions
This commit is contained in:
parent
041a988100
commit
1ae4814a74
2 changed files with 28 additions and 1 deletions
|
@ -659,7 +659,6 @@ gst_matroska_demux_parse_colour (GstMatroskaDemux * demux, GstEbmlRead * ebml,
|
||||||
* GstVideoTransferFunction, but functionally same as "1: BT709" */
|
* GstVideoTransferFunction, but functionally same as "1: BT709" */
|
||||||
case 1:
|
case 1:
|
||||||
case 6:
|
case 6:
|
||||||
case 14:
|
|
||||||
colorimetry.transfer = GST_VIDEO_TRANSFER_BT709;
|
colorimetry.transfer = GST_VIDEO_TRANSFER_BT709;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
@ -686,9 +685,18 @@ gst_matroska_demux_parse_colour (GstMatroskaDemux * demux, GstEbmlRead * ebml,
|
||||||
case 13:
|
case 13:
|
||||||
colorimetry.transfer = GST_VIDEO_TRANSFER_SRGB;
|
colorimetry.transfer = GST_VIDEO_TRANSFER_SRGB;
|
||||||
break;
|
break;
|
||||||
|
case 14:
|
||||||
|
colorimetry.transfer = GST_VIDEO_TRANSFER_BT2020_10;
|
||||||
|
break;
|
||||||
case 15:
|
case 15:
|
||||||
colorimetry.transfer = GST_VIDEO_TRANSFER_BT2020_12;
|
colorimetry.transfer = GST_VIDEO_TRANSFER_BT2020_12;
|
||||||
break;
|
break;
|
||||||
|
case 16:
|
||||||
|
colorimetry.transfer = GST_VIDEO_TRANSFER_SMPTE2084;
|
||||||
|
break;
|
||||||
|
case 18:
|
||||||
|
colorimetry.transfer = GST_VIDEO_TRANSFER_BT2020_12;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
GST_FIXME_OBJECT (demux,
|
GST_FIXME_OBJECT (demux,
|
||||||
"Unsupported color transfer characteristics %"
|
"Unsupported color transfer characteristics %"
|
||||||
|
|
|
@ -2595,6 +2595,9 @@ gst_matroska_mux_write_colour (GstMatroskaMux * mux,
|
||||||
case GST_VIDEO_COLOR_MATRIX_BT2020:
|
case GST_VIDEO_COLOR_MATRIX_BT2020:
|
||||||
matrix_id = 9;
|
matrix_id = 9;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
GST_FIXME_OBJECT (mux, "Unhandled color matrix %d", matrix_id);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (videocontext->colorimetry.range) {
|
switch (videocontext->colorimetry.range) {
|
||||||
|
@ -2641,9 +2644,22 @@ gst_matroska_mux_write_colour (GstMatroskaMux * mux,
|
||||||
case GST_VIDEO_TRANSFER_SRGB:
|
case GST_VIDEO_TRANSFER_SRGB:
|
||||||
transfer_id = 13;
|
transfer_id = 13;
|
||||||
break;
|
break;
|
||||||
|
case GST_VIDEO_TRANSFER_BT2020_10:
|
||||||
|
transfer_id = 14;
|
||||||
|
break;
|
||||||
case GST_VIDEO_TRANSFER_BT2020_12:
|
case GST_VIDEO_TRANSFER_BT2020_12:
|
||||||
transfer_id = 15;
|
transfer_id = 15;
|
||||||
break;
|
break;
|
||||||
|
case GST_VIDEO_TRANSFER_SMPTE2084:
|
||||||
|
transfer_id = 16;
|
||||||
|
break;
|
||||||
|
case GST_VIDEO_TRANSFER_ARIB_STD_B67:
|
||||||
|
transfer_id = 18;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
GST_FIXME_OBJECT (mux,
|
||||||
|
"Unhandled transfer characteristic %d", transfer_id);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (videocontext->colorimetry.primaries) {
|
switch (videocontext->colorimetry.primaries) {
|
||||||
|
@ -2685,6 +2701,9 @@ gst_matroska_mux_write_colour (GstMatroskaMux * mux,
|
||||||
case GST_VIDEO_COLOR_PRIMARIES_EBU3213:
|
case GST_VIDEO_COLOR_PRIMARIES_EBU3213:
|
||||||
primaries_id = 22;
|
primaries_id = 22;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
GST_FIXME_OBJECT (mux, "Unhandled color primaries %d", primaries_id);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_ebml_write_uint (ebml, GST_MATROSKA_ID_VIDEORANGE, range_id);
|
gst_ebml_write_uint (ebml, GST_MATROSKA_ID_VIDEORANGE, range_id);
|
||||||
|
|
Loading…
Reference in a new issue