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

Commit 6f03d754 authored by Yichi Chen's avatar Yichi Chen Committed by Automerger Merge Worker
Browse files

Merge "CCodec: Validate hdr10PlusInfo with the flexCount" into rvc-dev am: d3c372d5

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/av/+/11863719

Change-Id: Idf302a01c06711b2534188e495b7938be8ba1556
parents 9e94b891 d3c372d5
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -732,6 +732,9 @@ status_t CCodecBufferChannel::renderOutputBuffer(
    std::shared_ptr<const C2StreamHdr10PlusInfo::output> hdr10PlusInfo =
    std::shared_ptr<const C2StreamHdr10PlusInfo::output> hdr10PlusInfo =
        std::static_pointer_cast<const C2StreamHdr10PlusInfo::output>(
        std::static_pointer_cast<const C2StreamHdr10PlusInfo::output>(
                c2Buffer->getInfo(C2StreamHdr10PlusInfo::output::PARAM_TYPE));
                c2Buffer->getInfo(C2StreamHdr10PlusInfo::output::PARAM_TYPE));
    if (hdr10PlusInfo && hdr10PlusInfo->flexCount() == 0) {
        hdr10PlusInfo.reset();
    }


    {
    {
        Mutexed<OutputSurface>::Locked output(mOutputSurface);
        Mutexed<OutputSurface>::Locked output(mOutputSurface);
@@ -783,7 +786,7 @@ status_t CCodecBufferChannel::renderOutputBuffer(
                    .maxLuminance = hdrStaticInfo->mastering.maxLuminance,
                    .maxLuminance = hdrStaticInfo->mastering.maxLuminance,
                    .minLuminance = hdrStaticInfo->mastering.minLuminance,
                    .minLuminance = hdrStaticInfo->mastering.minLuminance,
                };
                };
                hdr.validTypes = HdrMetadata::SMPTE2086;
                hdr.validTypes |= HdrMetadata::SMPTE2086;
                hdr.smpte2086 = smpte2086_meta;
                hdr.smpte2086 = smpte2086_meta;
            }
            }
            // If the content light level fields are 0, do not use them, it
            // If the content light level fields are 0, do not use them, it