Add AV1 support to the getCodecMaxInputSize function.

PiperOrigin-RevId: 445973162
This commit is contained in:
olly 2022-05-02 18:44:27 +01:00 committed by Ian Baker
parent ad25c2a8c3
commit 2283b9425e

View file

@ -808,6 +808,8 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
maxPixels = Util.ceilDivide(width, 16) * Util.ceilDivide(height, 16) * 16 * 16;
minCompressionRatio = 2;
break;
case MimeTypes.VIDEO_AV1:
// AV1 does not specify a ratio so use the values from the platform's C2SoftAomDec.cpp.
case MimeTypes.VIDEO_VP8:
// VPX does not specify a ratio so use the values from the platform's SoftVPX.cpp.
maxPixels = width * height;