am 9090d3c3: am 02022b70: Merge "media: fix estimateFrameRatesFor to use correct ratio" into mnc-dev

* commit '9090d3c3d46f7c52fe744ddcd104578b6a5cc742':
  media: fix estimateFrameRatesFor to use correct ratio
This commit is contained in:
Ronghua Wu
2015-07-29 01:27:09 +00:00
committed by Android Git Automerger

View File

@@ -1216,7 +1216,7 @@ 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)(width * height) / (size.getWidth() * size.getHeight());
Double ratio = (double)(size.getWidth() * size.getHeight()) / (width * height);
return Range.create(range.getLower() * ratio, range.getUpper() * ratio);
}