summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWonsik Kim <wonsik@google.com>2020-12-18 01:34:44 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-12-18 01:34:44 +0000
commitc87f35988d9795c9873d23eab3609660931a09c7 (patch)
tree4d952771afdde62510fd3f63562e35c0a1a2a7fb
parentdc70bd944ec795a9a906d36883b1bf2892d02602 (diff)
parent6289aa237480eecb035d8be17eaa609c7152b916 (diff)
Merge "MediaCodecInfo: do not alter performance points for 32-bit processes" am: 4f94f12cba am: 6289aa2374
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1532514 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I96718eb4dd138cd8b6650cf9d85b08c79621c206
-rw-r--r--media/java/android/media/MediaCodecInfo.java33
1 files changed, 5 insertions, 28 deletions
diff --git a/media/java/android/media/MediaCodecInfo.java b/media/java/android/media/MediaCodecInfo.java
index e7e83ebb001f..9657b25e7c18 100644
--- a/media/java/android/media/MediaCodecInfo.java
+++ b/media/java/android/media/MediaCodecInfo.java
@@ -1865,10 +1865,6 @@ public final class MediaCodecInfo {
&& aligned.mMaxMacroBlockRate >= otherAligned.mMaxMacroBlockRate);
}
- /* package private */ boolean isEqualDimension(@NonNull PerformancePoint other) {
- return mWidth == other.mWidth && mHeight == other.mHeight;
- }
-
private @NonNull Size getCommonBlockSize(@NonNull PerformancePoint other) {
return new Size(
Math.max(mBlockSize.getWidth(), other.mBlockSize.getWidth()) * 16,
@@ -2010,8 +2006,11 @@ public final class MediaCodecInfo {
* codecs are active, should use that highest pixel count, and add the frame rates of
* each individual codec.
* <p class=note>
- * Supported resolution could be further restricted for 32-bit processes due to
- * the limited virtual memory space.
+ * 32-bit processes will not support resolutions larger than 4096x4096 due to
+ * the limited address space, but performance points will be presented as is.
+ * In other words, even though a component publishes a performance point for
+ * a resolution higher than 4096x4096, it does not mean that the resolution is supported
+ * for 32-bit processes.
*/
@Nullable
public List<PerformancePoint> getSupportedPerformancePoints() {
@@ -2215,28 +2214,6 @@ public final class MediaCodecInfo {
(a.getMaxFrameRate() != b.getMaxFrameRate()) ?
(a.getMaxFrameRate() < b.getMaxFrameRate() ? -1 : 1) : 0));
- // remove redundant points
- for (int i = 1; i < ret.size(); ++i) {
- PerformancePoint a = ret.get(i);
- for (int j = 0; j < i; ++j) {
- PerformancePoint b = ret.get(j);
- if (b.isEqualDimension(a) && b.covers(a)) {
- ret.set(i, null);
- break;
- }
- }
- }
- int newSize = 0;
- for (int i = 0; i < ret.size(); ++i) {
- PerformancePoint a = ret.get(i);
- if (a == null) {
- continue;
- }
- ret.set(newSize, a);
- ++newSize;
- }
- ret.setSize(newSize);
-
return Collections.unmodifiableList(ret);
}