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

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

Merge "C2SoftVpxEnc: Correct minimum level setting code"

parents a8a1b31a a786d710
Loading
Loading
Loading
Loading
+13 −16
Original line number Diff line number Diff line
@@ -264,11 +264,8 @@ C2R C2SoftVpxEnc::IntfImpl::ProfileLevelSetter(bool mayBlock,
    // the requirements.
    bool needsUpdate = false;
    for (const LevelLimits& limit : kLimits) {
        if (samples > limit.samples) continue;
        if (samplesPerSec > limit.samplesPerSec) continue;
        if (bitrate.v.value > limit.bitrate) continue;
        if (dimension > limit.dimension) continue;

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

        }
        if (me.v.level == limit.level) {
            // 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