I am using Android's MediaCodec API to decode and play live and raw H.264 video stream. My target device is a PC, running on Android-x86 6.0. The PC is running on a IntelĀ® CeleronĀ® Processor N2930 CPU.
When I set the decoder to surface mode and render the video to a TextureView, I am experiencing some color banding issues.
When I set the decoder to use ByteBuffer mode, and then save the decoded video frames to a file, then open the file on another computer, I found no color banding issues with the video frames.
Running out of ideas, then I tried to implement my own OpenGL ES view to render the video. Got it to work, but color banding is still there. Then I save the decoded frames from the OpenGL ES view renderer using GLES20.glReadPixels(), and when I open those frames on another computer, I see the color banding in the frames.
More observations: 1) I used the bundled video player (Video player) and MX Player to played some video files. Both the bundled video player and MX Player (in HW decoding mode) experienced the same color banding issue.
2) Playback in SW decoding mode in MX Player shows no color banding.
Tried almost all suggestions available on the web to no avail. Please help.
Thank you in advance.
Managed to circumvent the problem by using MediaCodec in ByteBuffer (software) mode.