I'm looking for the fastest way to take an image frame received from the MediaCodec decoder and draw it to the Android device screen. The important constraints and explanations are:
Cannot use MediaPlayer. No intermediate app allowed.
Must draw output frames from the MediaCodec decoder to the screen as quickly as possible (minimize latency).
The available decoder output formats are as follows:
ColorFormat[0] 0x00000013 COLOR_FormatYUV420Planar
ColorFormat[1] 0x00000015 COLOR_FormatYUV420SemiPlanar
ColorFormat[2] 0x7F000001 OMX_SEC_COLOR_FormatNV12TPhysicalAddress
ColorFormat[3] 0x7FC00002 OMX_SEC_COLOR_FormatNV12TiledThe video resolution, and thus the resolution of each output frame, is 960x720.
The target platform is Galaxy Note II and the approach can be specific to that platform (e.g. take advantage of available hardware functionality). This does not need to work on other platforms or be a generic solution.
An approach that takes less than 66ms would be good. Less than 33ms would be great. My current approach takes 80-90ms, which sucks. (I won't bother describing it since I don't want to skew the answers in any particular direction.)