mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-17 06:52:23 +00:00
LibMedia/Matroska: Actually read out the video color range
Apparently I forgot to put read the value for this field, though this generally doesn't matter since video bitstreams usually specify CICP as well.
This commit is contained in:
parent
a99ff1fcb4
commit
d3f88b4987
Notes:
sideshowbarker
2024-07-16 22:18:54 +09:00
Author: https://github.com/Zaggy1024
Commit: d3f88b4987
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/230
Reviewed-by: https://github.com/ADKaster
1 changed files with 5 additions and 0 deletions
|
@ -62,6 +62,7 @@ constexpr u32 COLOR_ENTRY_ID = 0x55B0;
|
|||
constexpr u32 PRIMARIES_ID = 0x55BB;
|
||||
constexpr u32 TRANSFER_CHARACTERISTICS_ID = 0x55BA;
|
||||
constexpr u32 MATRIX_COEFFICIENTS_ID = 0x55B1;
|
||||
constexpr u32 RANGE_ID = 0x55B9;
|
||||
constexpr u32 BITS_PER_CHANNEL_ID = 0x55B2;
|
||||
|
||||
// Audio
|
||||
|
@ -385,6 +386,10 @@ static DecoderErrorOr<TrackEntry::ColorFormat> parse_video_color_information(Str
|
|||
color_format.matrix_coefficients = static_cast<MatrixCoefficients>(TRY_READ(streamer.read_u64()));
|
||||
dbgln_if(MATROSKA_TRACE_DEBUG, "Read Colour's MatrixCoefficients attribute: {}", matrix_coefficients_to_string(color_format.matrix_coefficients));
|
||||
break;
|
||||
case RANGE_ID:
|
||||
color_format.range = static_cast<TrackEntry::ColorRange>(TRY_READ(streamer.read_u64()));
|
||||
dbgln_if(MATROSKA_TRACE_DEBUG, "Read Colour's Range attribute: {}", to_underlying(color_format.range));
|
||||
break;
|
||||
case BITS_PER_CHANNEL_ID:
|
||||
color_format.bits_per_channel = TRY_READ(streamer.read_u64());
|
||||
dbgln_if(MATROSKA_TRACE_DEBUG, "Read Colour's BitsPerChannel attribute: {}", color_format.bits_per_channel);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue