How do I correctly convert YUV colours to RGB in A

2019-08-10 14:36发布

问题:

I am using MediaCodec to retrieve frames from a video on the SD card.

I am using ScriptIntrinsicYuvToRGB to convert the outputted frames of the MediaCodec to RGB. Then I am displaying them in a TextureView.
The problem is, the RGB colours are wrong (e.g. The grass is meant to be green. NOT purplish-grey)
Anybody know how to fix this please?
Thanks