1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 04:17:34 +00:00

LibVideo: Rename "ColorRange" to "VideoFullRangeFlag"

That matches the terminology used in ITU-T Rec. H.273,
PNG's cICP chunk, and the ICC cicpTag.

Also change the enum values to match the values in the spec --
0 means "not full range" and 1 means "full range".

(For now, keep the "Unspecified" entry around, and give it value 2.
This value is not in the spec.)

No intended behavior change.
This commit is contained in:
Nico Weber 2023-02-08 14:16:37 -05:00 committed by Linus Groh
parent 49474d8718
commit 89b98830f6
7 changed files with 29 additions and 29 deletions

View file

@ -77,24 +77,24 @@ public:
CodingIndependentCodePoints to_cicp() const
{
Video::ColorRange color_range;
Video::VideoFullRangeFlag video_full_range_flag;
switch (range) {
case ColorRange::Full:
color_range = Video::ColorRange::Full;
video_full_range_flag = Video::VideoFullRangeFlag::Full;
break;
case ColorRange::Broadcast:
color_range = Video::ColorRange::Studio;
video_full_range_flag = Video::VideoFullRangeFlag::Studio;
break;
case ColorRange::Unspecified:
case ColorRange::UseCICP:
// FIXME: Figure out what UseCICP should do here. Matroska specification did not
// seem to explain in the 'colour' section. When this is fixed, change
// replace_code_points_if_specified to match.
color_range = Video::ColorRange::Unspecified;
video_full_range_flag = Video::VideoFullRangeFlag::Unspecified;
break;
}
return { color_primaries, transfer_characteristics, matrix_coefficients, color_range };
return { color_primaries, transfer_characteristics, matrix_coefficients, video_full_range_flag };
}
};