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

Commit a1994d6e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Actually use the hdr mapper for AV1 in GetHdrProfileLevelMapper"

parents d938b861 0702d1f6
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -117,8 +117,9 @@ void addSupportedProfileLevels(
        }
    }

    // For VP9, the static info is always propagated by framework.
    // For VP9/AV1, the static info is always propagated by framework.
    supportsHdr |= (mediaType == MIMETYPE_VIDEO_VP9);
    supportsHdr |= (mediaType == MIMETYPE_VIDEO_AV1);

    for (C2Value::Primitive profile : profileQuery[0].values.values) {
        pl.profile = (C2Config::profile_t)profile.ref<uint32_t>();
+4 −1
Original line number Diff line number Diff line
@@ -382,10 +382,11 @@ ALookup<C2Config::profile_t, int32_t> sAv1Profiles = {
    // TODO: will need to disambiguate between Main8 and Main10
    { C2Config::PROFILE_AV1_0, AV1ProfileMain8 },
    { C2Config::PROFILE_AV1_0, AV1ProfileMain10 },
    { C2Config::PROFILE_AV1_0, AV1ProfileMain10HDR10 },
    { C2Config::PROFILE_AV1_0, AV1ProfileMain10HDR10Plus },
};

ALookup<C2Config::profile_t, int32_t> sAv1HdrProfiles = {
    { C2Config::PROFILE_AV1_0, AV1ProfileMain10 },
    { C2Config::PROFILE_AV1_0, AV1ProfileMain10HDR10 },
};

@@ -662,6 +663,8 @@ C2Mapper::GetHdrProfileLevelMapper(std::string mediaType, bool isHdr10Plus) {
        return std::make_shared<HevcProfileLevelMapper>(true, isHdr10Plus);
    } else if (mediaType == MIMETYPE_VIDEO_VP9) {
        return std::make_shared<Vp9ProfileLevelMapper>(true, isHdr10Plus);
    } else if (mediaType == MIMETYPE_VIDEO_AV1) {
        return std::make_shared<Av1ProfileLevelMapper>(true, isHdr10Plus);
    }
    return nullptr;
}