LibVideo: Add a video_full_range_flag_to_string() function

This commit is contained in:
Nico Weber 2023-02-08 14:20:43 -05:00 committed by Linus Groh
parent 89b98830f6
commit 405efc5936
Notes: sideshowbarker 2024-07-17 02:08:15 +09:00

View file

@ -240,4 +240,17 @@ constexpr StringView matrix_coefficients_to_string(MatrixCoefficients matrix_coe
return "Reserved"sv;
};
constexpr StringView video_full_range_flag_to_string(VideoFullRangeFlag video_full_range_flag)
{
switch (video_full_range_flag) {
case VideoFullRangeFlag::Studio:
return "Studio"sv;
case VideoFullRangeFlag::Full:
return "Full"sv;
case VideoFullRangeFlag::Unspecified: // Not part of the spec, serenity-specific addition for convenience.
return "Unspecified"sv;
}
return "Unknown"sv;
};
}