1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:27:46 +00:00

LibVideo: Add CICP parsing to MatroskaReader

This will allow correct independent code points to be selected from VP9
in WebM, since the VP9 bitstream does not specify them independently.
This commit is contained in:
Zaggy1024 2022-10-10 05:04:28 -05:00 committed by Andreas Kling
parent cd127b65c3
commit b87398341b
4 changed files with 106 additions and 1 deletions

View file

@ -93,6 +93,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto uv_subsampling_x = vp9_decoder.get_uv_subsampling_x();
Gfx::IntSize uv_size { y_size.width() >> uv_subsampling_x, y_size.height() >> uv_subsampling_y };
auto cicp = vp9_decoder.get_cicp_color_space();
video_track.color_format.replace_code_points_if_specified(cicp);
cicp.default_code_points_if_unspecified(Video::ColorPrimaries::BT709, Video::TransferCharacteristics::BT709, Video::MatrixCoefficients::BT709);
auto color_converter_result = Video::ColorConverter::create(vp9_decoder.get_bit_depth(), cicp);