Fix color conversion from OMX_COLOR_FormatYUV420SemiPlanar
Use NV12ToABGR for OMX_COLOR_Format32BitRGBA8888, and NV12ToARGB for OMX_COLOR_Format32bitBGRA8888. The naming convention is reverse in libyuv and omx. bug: 129908793 test: locally modify StagefrightMetadataRetriever to prefer hw decoder and output in OMX_COLOR_FormatYUV420SemiPlanar format. The following tests would fail without this patch and pass with this patch: CtsMediaTestCases --android.media.cts.HeifWriterTest#testInputSurface_Grid_Handler fail CtsMediaTestCases --android.media.cts.HeifWriterTest#testInputSurface_Grid_NoHandler fail CtsMediaTestCases --android.media.cts.HeifWriterTest#testInputSurface_NoGrid_Handler fail CtsMediaTestCases --android.media.cts.HeifWriterTest#testInputSurface_NoGrid_NoHandler fail CtsMediaTestCases --android.media.cts.MediaMetadataRetrieverTest#testGetImageAtIndex fail (These tests fail because they use bitmap format of RGB, while others use RGB565.) Change-Id: I94feea2c29479e72d6111ee6a7ce44805b921e73
Loading
Please register or sign in to comment