
If MediaCodec allocates passes an image buffer with a cropped region, SurfaceTexture.getTransformMatrix will cut off 2 pixels from each dimensions. The resulting videos will appear a little stretched. This patch inspects the SurfaceTexture transform matrix, and guesses what the unscaled transform matrix should be. Behind experimentalAdjustSurfaceTextureTransformationMatrix flag PiperOrigin-RevId: 635721267