If you are using a HW
accelerated decoder, then the allocation on the output port of your component would have been based on a Native Window
. In other words, the output buffer is basically a gralloc
handle which has been passed by the Stagefright
framework. (Ref: OMXCodec::allocateOutputBuffersFromNativeWindow
). Hence, the MediaBuffer
being returned shouldn't be interpreted as a plain YUV
buffer.
In case of AwesomeLocalRenderer
, the framework performs a software color conversion when mTarget->render
is invoked as shown here. If you trace the code flow, you will find that the MediaBuffer
content is directly interpreted as YUV
buffer.
For HW
accelerated codecs, you should be employing AwesomeNativeWindowRenderer
. If you have any special conditions for employing AwesomeLocalRenderer
, please do highlight the same. I can refine this response appropriately.
P.S: For debug purposes, you could also refer to this question which captured the methods to dump the YUV data and analyze the same.