Commit 1ae4814a authored by Seungha Yang's avatar Seungha Yang 🐑

matroska: Add BT2020_10, PQ and HLG transfer functions

The direct use of newly added transfer functions
parent 041a9881
Pipeline #38608 failed with stages
in 34 minutes and 33 seconds
......@@ -659,7 +659,6 @@ gst_matroska_demux_parse_colour (GstMatroskaDemux * demux, GstEbmlRead * ebml,
* GstVideoTransferFunction, but functionally same as "1: BT709" */
case 1:
case 6:
case 14:
colorimetry.transfer = GST_VIDEO_TRANSFER_BT709;
break;
case 2:
......@@ -686,9 +685,18 @@ gst_matroska_demux_parse_colour (GstMatroskaDemux * demux, GstEbmlRead * ebml,
case 13:
colorimetry.transfer = GST_VIDEO_TRANSFER_SRGB;
break;
case 14:
colorimetry.transfer = GST_VIDEO_TRANSFER_BT2020_10;
break;
case 15:
colorimetry.transfer = GST_VIDEO_TRANSFER_BT2020_12;
break;
case 16:
colorimetry.transfer = GST_VIDEO_TRANSFER_SMPTE2084;
break;
case 18:
colorimetry.transfer = GST_VIDEO_TRANSFER_BT2020_12;
break;
default:
GST_FIXME_OBJECT (demux,
"Unsupported color transfer characteristics %"
......
......@@ -2595,6 +2595,9 @@ gst_matroska_mux_write_colour (GstMatroskaMux * mux,
case GST_VIDEO_COLOR_MATRIX_BT2020:
matrix_id = 9;
break;
default:
GST_FIXME_OBJECT (mux, "Unhandled color matrix %d", matrix_id);
break;
}
switch (videocontext->colorimetry.range) {
......@@ -2641,9 +2644,22 @@ gst_matroska_mux_write_colour (GstMatroskaMux * mux,
case GST_VIDEO_TRANSFER_SRGB:
transfer_id = 13;
break;
case GST_VIDEO_TRANSFER_BT2020_10:
transfer_id = 14;
break;
case GST_VIDEO_TRANSFER_BT2020_12:
transfer_id = 15;
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) {
......@@ -2685,6 +2701,9 @@ gst_matroska_mux_write_colour (GstMatroskaMux * mux,
case GST_VIDEO_COLOR_PRIMARIES_EBU3213:
primaries_id = 22;
break;
default:
GST_FIXME_OBJECT (mux, "Unhandled color primaries %d", primaries_id);
break;
}
gst_ebml_write_uint (ebml, GST_MATROSKA_ID_VIDEORANGE, range_id);
......
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