Search code examples
androidrgbandroid-mediacodecyuvcolor-space

How to force Android decoder to decode frame to RGB


Do manufacturers force the color format on their hardware decoders? It seems that Android MediaCodec decodes a frame to YUV on Nexus 7 and 9. Is there any way to force the color format for the decoded frame to be RGB instead? Why do manufacturers have proprietary color formats (as is the case with Nexus 7's Qualcomm)?

Thanks


Solution

  • The YUV color formats that the hardware decoders use are more efficient. For example, a frame in YUV420 is half the size of the same frame in RGB.