mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:47:34 +00:00
LibVideo: Implement CICP color space conversion
This adds a struct called CodingIndependentCodePoints and related enums that are used by video codecs to define its color space that frames must be converted from when displaying a video. Pre-multiplied matrices and lookup tables are stored to avoid most of the floating point division and exponentiation in the conversion.
This commit is contained in:
parent
ba79de0439
commit
cd127b65c3
15 changed files with 935 additions and 18 deletions
|
@ -136,8 +136,8 @@ DecoderErrorOr<FrameType> Parser::read_frame_type()
|
|||
DecoderErrorOr<ColorRange> Parser::read_color_range()
|
||||
{
|
||||
if (TRY_READ(m_bit_stream->read_bit()))
|
||||
return FullSwing;
|
||||
return StudioSwing;
|
||||
return ColorRange::Full;
|
||||
return ColorRange::Studio;
|
||||
}
|
||||
|
||||
/* (6.2) */
|
||||
|
@ -273,7 +273,7 @@ DecoderErrorOr<void> Parser::color_config()
|
|||
m_subsampling_y = true;
|
||||
}
|
||||
} else {
|
||||
m_color_range = FullSwing;
|
||||
m_color_range = ColorRange::Full;
|
||||
if (m_profile == 1 || m_profile == 3) {
|
||||
m_subsampling_x = false;
|
||||
m_subsampling_y = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue