mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibGfx+LibMedia+LibWeb: Use new Matrix subscript operator
This commit is contained in:
parent
423e944a92
commit
9a8599f265
Notes:
github-actions[bot]
2025-07-28 07:16:42 +00:00
Author: https://github.com/ion232
Commit: 9a8599f265
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5613
Reviewed-by: https://github.com/gmta ✅
11 changed files with 165 additions and 174 deletions
|
|
@ -131,17 +131,17 @@ DecoderErrorOr<ColorConverter> ColorConverter::create(u8 bit_depth, CodingIndepe
|
|||
|
||||
// Expand color primaries matrix with identity elements.
|
||||
FloatMatrix4x4 color_primaries_matrix_4x4 = {
|
||||
color_primaries_matrix.elements()[0][0],
|
||||
color_primaries_matrix.elements()[0][1],
|
||||
color_primaries_matrix.elements()[0][2],
|
||||
color_primaries_matrix[0, 0],
|
||||
color_primaries_matrix[0, 1],
|
||||
color_primaries_matrix[0, 2],
|
||||
0.0f, // y
|
||||
color_primaries_matrix.elements()[1][0],
|
||||
color_primaries_matrix.elements()[1][1],
|
||||
color_primaries_matrix.elements()[1][2],
|
||||
color_primaries_matrix[1, 0],
|
||||
color_primaries_matrix[1, 1],
|
||||
color_primaries_matrix[1, 2],
|
||||
0.0f, // u
|
||||
color_primaries_matrix.elements()[2][0],
|
||||
color_primaries_matrix.elements()[2][1],
|
||||
color_primaries_matrix.elements()[2][2],
|
||||
color_primaries_matrix[2, 0],
|
||||
color_primaries_matrix[2, 1],
|
||||
color_primaries_matrix[2, 2],
|
||||
0.0f, // v
|
||||
0.0f,
|
||||
0.0f,
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ ALWAYS_INLINE constexpr FloatMatrix3x3 primaries_matrix(FloatVector2 red, FloatV
|
|||
|
||||
ALWAYS_INLINE constexpr FloatVector3 matrix_row(FloatMatrix3x3 matrix, size_t row)
|
||||
{
|
||||
return { matrix.elements()[row][0], matrix.elements()[row][1], matrix.elements()[row][2] };
|
||||
return { matrix[row, 0], matrix[row, 1], matrix[row, 2] };
|
||||
}
|
||||
|
||||
ALWAYS_INLINE constexpr FloatMatrix3x3 generate_rgb_to_xyz_matrix(FloatVector2 red_xy, FloatVector2 green_xy, FloatVector2 blue_xy, FloatVector2 white_xy)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue