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

Commit 739fe737 authored by Lajos Molnar's avatar Lajos Molnar
Browse files

CCodec: make HDR10/+ support detection logic work for encoders

This allows MediaCodecInfo to advertise HDR10/+ profile support.

Bug: 158284167
Change-Id: I24474bba3873eeff30037dedc8837f96855c93cc
parent 210105af
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -103,11 +103,16 @@ void addSupportedProfileLevels(
    c2_status_t err1 = intf->querySupportedParams(&paramDescs);
    if (err1 == C2_OK) {
        for (const std::shared_ptr<C2ParamDescriptor> &desc : paramDescs) {
            switch ((uint32_t)desc->index()) {
            case C2StreamHdr10PlusInfo::output::PARAM_TYPE:
            C2Param::Type type = desc->index();
            // only consider supported parameters on raw ports
            if (!(encoder ? type.forInput() : type.forOutput())) {
                continue;
            }
            switch (type.coreIndex()) {
            case C2StreamHdr10PlusInfo::CORE_INDEX:
                supportsHdr10Plus = true;
                break;
            case C2StreamHdrStaticInfo::output::PARAM_TYPE:
            case C2StreamHdrStaticInfo::CORE_INDEX:
                supportsHdr = true;
                break;
            default: