Loading
MediaCodec: Signal crop attrb correctly to MediaImage during instantiation
The getOutputImage() of MediaCodec API translates the decoded image data and MediaImage2 metadata to MediaImage. MediaImage is constructed by copying only the display section of the decoded data. For images with cropRect set, the display section needs to be correctly identified with fields xOffset and yOffset which correspond to cropLeft and cropTop respectively. This was missing causing issues in the final image received from the API. This is addressed. Bug: 163299340 Test: atest CtsMediaV2TestCases:CodecDecoderValidationTest Test: atest MctsMediaV2TestCases:CodecDecoderValidationTest Flag: EXEMPT bugfix Change-Id: I99b92821f7585da2504dfc66df7af8fc96941fdd