2

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

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

fadden
  • 51,356
  • 5
  • 116
  • 166
dewijones92
  • 1,319
  • 2
  • 24
  • 45
  • Why not decode them directly to the TextureView? Get the SurfaceTexture from the TextureView, pass it to the Surface constructor, hand that Surface to the MediaCodec decoder. Note MediaCodec uses different YUV formats than Camera; see also http://stackoverflow.com/questions/13703596/ – fadden Apr 30 '15 at 00:19
  • @fadden Thanks for your reply. The reason I need to do it this way is because I want to apply effects to each frame using RenderScript. Can you offer me any advice for this? Thanks – dewijones92 Apr 30 '15 at 06:52
  • See https://software.intel.com/en-us/articles/google-android-multimedia-api-playback-with-renderscript-effect – Alex Cohn Dec 04 '17 at 09:14

0 Answers0