Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 020dc042 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "CCodec: fix default color aspects handling"

parents efd0374e 759ac74b
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -417,16 +417,17 @@ void CCodecConfig::initializeStandardParams() {

    // read back default for decoders. This is needed in case the component does not support
    // color aspects. In that case, these values get copied to color-* keys.
    // TRICKY: We read these values at raw port, since that's where we want to read these.
    add(ConfigMapper("default-color-range",     C2_PARAMKEY_DEFAULT_COLOR_ASPECTS,   "range")
        .limitTo((D::VIDEO | D::IMAGE) & D::DECODER  & D::CODED & D::READ)
        .limitTo((D::VIDEO | D::IMAGE) & D::DECODER  & D::RAW & D::READ)
        .withC2Mappers<C2Color::range_t>());
    add(ConfigMapper("default-color-transfer",  C2_PARAMKEY_DEFAULT_COLOR_ASPECTS,   "transfer")
        .limitTo((D::VIDEO | D::IMAGE) & D::DECODER  & D::CODED & D::READ)
        .limitTo((D::VIDEO | D::IMAGE) & D::DECODER  & D::RAW & D::READ)
        .withC2Mappers<C2Color::transfer_t>());
    add(ConfigMapper("default-color-primaries", C2_PARAMKEY_DEFAULT_COLOR_ASPECTS,   "primaries")
        .limitTo((D::VIDEO | D::IMAGE) & D::DECODER  & D::CODED & D::READ));
        .limitTo((D::VIDEO | D::IMAGE) & D::DECODER  & D::RAW & D::READ));
    add(ConfigMapper("default-color-matrix",    C2_PARAMKEY_DEFAULT_COLOR_ASPECTS,   "matrix")
        .limitTo((D::VIDEO | D::IMAGE) & D::DECODER  & D::CODED & D::READ));
        .limitTo((D::VIDEO | D::IMAGE) & D::DECODER  & D::RAW & D::READ));

    // read back final for decoder output (also, configure final aspects as well. This should be
    // overwritten based on coded/default values if component supports color aspects, but is used