1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:27:43 +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

@ -190,7 +190,7 @@ bool PlaybackManager::decode_and_queue_one_sample()
auto& cicp = decoded_frame->cicp();
cicp.adopt_specified_values(frame_sample->container_cicp());
cicp.default_code_points_if_unspecified({ ColorPrimaries::BT709, TransferCharacteristics::BT709, MatrixCoefficients::BT709, ColorRange::Studio });
cicp.default_code_points_if_unspecified({ ColorPrimaries::BT709, TransferCharacteristics::BT709, MatrixCoefficients::BT709, VideoFullRangeFlag::Studio });
// BT.601, BT.709 and BT.2020 have a similar transfer function to sRGB, so other applications
// (Chromium, VLC) forgo transfer characteristics conversion. We will emulate that behavior by