Skip to content

core/colorpipeline: improve optimization with differing reference luminances

Xaver Hugl requested to merge work/zamundaaa/optimize-reference into master

This is done by

  • fixing isFuzzyScalingOnly to not check the [3, 3] component, which is always 1
  • making the comparison between transfer functions fuzzy, so small floating point errors don't prevent two practically identical functions to be optimized out
  • switching manual optimizations to use addMatrix instead, which removes the matrix or replaces it with a multiplier

and the autotest is expanded to test transformations between color descriptions with transfer functions and reference luminances that are just scaled versions of each other.

This fixes direct scanout unnecessarily needing KMS color transformations since !6227 (merged), where a multiplier was switched out for changing a matrix directly instead. I'll look into a direct scanout autotest, to ensure this sort of thing doesn't happen again...

Merge request reports

Loading