mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:27:34 +00:00
LibGfx/ICC: Move MatrixMatrixConversion curve type check to ctor
A bit faster: ``` N Min Max Median Avg Stddev x 50 0.97179127 1.0031381 0.98313618 0.98407591 0.0092019442 + 50 0.95996714 0.99507213 0.96965885 0.97242294 0.0095455053 Difference at 95.0% confidence -0.011653 +/- 0.00372012 -1.18415% +/- 0.378032% (Student's t, pooled s = 0.0093753) ```
This commit is contained in:
parent
5f85aff036
commit
92852b8477
2 changed files with 9 additions and 2 deletions
|
@ -1586,6 +1586,15 @@ MatrixMatrixConversion::MatrixMatrixConversion(LutCurveType source_red_TRC,
|
|||
, m_destination_green_TRC(move(destination_green_TRC))
|
||||
, m_destination_blue_TRC(move(destination_blue_TRC))
|
||||
{
|
||||
auto check = [](auto const& trc) {
|
||||
VERIFY(trc->type() == CurveTagData::Type || trc->type() == ParametricCurveTagData::Type);
|
||||
};
|
||||
check(m_source_red_TRC);
|
||||
check(m_source_green_TRC);
|
||||
check(m_source_blue_TRC);
|
||||
check(m_destination_red_TRC);
|
||||
check(m_destination_green_TRC);
|
||||
check(m_destination_blue_TRC);
|
||||
}
|
||||
|
||||
Optional<MatrixMatrixConversion> Profile::matrix_matrix_conversion(Profile const& source_profile) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue