Skip to content

Improve handling of perceptual encoding metrics #392

@lexaknyazev

Description

@lexaknyazev

Basis encoder has a "perceptual" flag. When enabled, it assigns uneven weights to red, green, and blue channels for computing the error metric. By the way, only ETC1S is affected by that for now.

Ideally, the settings should be more flexible:

  • compute metrics in linear / non-linear space (i.e. decode 8-bit sRGB to real values), not implemented yet;
  • set per-channel weights (Allow user to control channel weightings BinomialLLC/basis_universal#202):
    • even;
    • luma, should depend on the color primaries:
      • Rec. 709: [0.2126, 0.7152, 0.0722] (matches the current "perceptual")
      • Rec. 2020: [0.2627, 0.6780, 0.0593]
      • ...
    • custom (e.g. to ignore unused channels).

Currently, the perceptual flag is tied to the source transfer function which is a bit misleading.

/cc @zeux

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions