Add a comment to explain the input size calculation.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=111833857
This commit is contained in:
andrewlewis 2016-01-11 02:12:21 -08:00 committed by Oliver Woodman
parent c6cdf7e083
commit b7d5ce366a

View File

@ -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);
} }