Commit b7d5ce36 by andrewlewis Committed by Oliver Woodman

Add a comment to explain the input size calculation.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=111833857
parent c6cdf7e0
...@@ -536,6 +536,7 @@ public class MediaCodecVideoTrackRenderer extends MediaCodecTrackRenderer { ...@@ -536,6 +536,7 @@ public class MediaCodecVideoTrackRenderer extends MediaCodecTrackRenderer {
// Leave the default max input size. // Leave the default max input size.
return; return;
} }
// Estimate the maximum input size assuming three channel 4:2:0 subsampled input frames.
int maxInputSize = (maxPixels * 3) / (2 * minCompressionRatio); int maxInputSize = (maxPixels * 3) / (2 * minCompressionRatio);
format.setInteger(android.media.MediaFormat.KEY_MAX_INPUT_SIZE, maxInputSize); format.setInteger(android.media.MediaFormat.KEY_MAX_INPUT_SIZE, maxInputSize);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment