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

Commit 68caf3cc authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "C2SoftVpxEnc: Correct minimum level setting code" am: d08e4950 am:...

Merge "C2SoftVpxEnc: Correct minimum level setting code" am: d08e4950 am: cb359b84 am: 02532e0c

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



Change-Id: Ia71a77e47cb91bfd10baab2e9e7974c958e5c944
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 82b8a62f 02532e0c
Loading
Loading
Loading
Loading
+13 −16
Original line number Original line Diff line number Diff line
@@ -264,11 +264,8 @@ C2R C2SoftVpxEnc::IntfImpl::ProfileLevelSetter(bool mayBlock,
    // the requirements.
    // the requirements.
    bool needsUpdate = false;
    bool needsUpdate = false;
    for (const LevelLimits& limit : kLimits) {
    for (const LevelLimits& limit : kLimits) {
        if (samples > limit.samples) continue;
        if (samples <= limit.samples && samplesPerSec <= limit.samplesPerSec &&
        if (samplesPerSec > limit.samplesPerSec) continue;
            bitrate.v.value <= limit.bitrate && dimension <= limit.dimension) {
        if (bitrate.v.value > limit.bitrate) continue;
        if (dimension > limit.dimension) continue;

            // This is the lowest level that meets the requirements, and if
            // This is the lowest level that meets the requirements, and if
            // we haven't seen the supplied level yet, that means we don't
            // we haven't seen the supplied level yet, that means we don't
            // need the update.
            // need the update.
@@ -280,7 +277,7 @@ C2R C2SoftVpxEnc::IntfImpl::ProfileLevelSetter(bool mayBlock,
            }
            }
            found = true;
            found = true;
            break;
            break;

        }
        if (me.v.level == limit.level) {
        if (me.v.level == limit.level) {
            // We break out of the loop when the lowest feasible level is
            // We break out of the loop when the lowest feasible level is
            // found. The fact that we're here means that our level doesn't
            // found. The fact that we're here means that our level doesn't