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

Commit a42a42da authored by Lajos Molnar's avatar Lajos Molnar Committed by android-build-merger
Browse files

Merge "VideoCapabilities: account for block size for getAchievableRates" into...

Merge "VideoCapabilities: account for block size for getAchievableRates" into nyc-dev am: 3c6736b0
am: 83244980

* commit '83244980':
  VideoCapabilities: account for block size for getAchievableRates

Change-Id: Ice8dda5e378fdac4af3f7935e8592e45297ce8d1
parents 260ea63b 83244980
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1247,7 +1247,8 @@ public final class MediaCodecInfo {
        private Range<Double> estimateFrameRatesFor(int width, int height) {
            Size size = findClosestSize(width, height);
            Range<Long> range = mMeasuredFrameRates.get(size);
            Double ratio = (double)(size.getWidth() * size.getHeight()) / (width * height);
            Double ratio = getBlockCount(size.getWidth(), size.getHeight())
                    / (double)Math.max(getBlockCount(width, height), 1);
            return Range.create(range.getLower() * ratio, range.getUpper() * ratio);
        }