AnsweredAssumed Answered

Android MediaCodec : getOutputImage() returns NULL always on Freescale AVC Decoder

Question asked by Dwarakesh Radhakrishnan on May 2, 2019
Latest reply on May 6, 2019 by Joan Xie

Hi,

 

I am using iMX8x Board. Android firmware version is : P9.0.0_1.0.0_GA_DEMO_8Q

 

I am trying to get decoded image out of : OMX.Freescale.std.video_decoder.avc.v3.hw-based

 

My code snippet is :

 

mDecoder.configure(
   format,
   null,
   null,
   0);
mOutputIdx = mDecoder.dequeueOutputBuffer(mInfo, TIMEOUT_US);
if (mOutputIdx >= 0)
{
   Image = mDecoder.getOutputImage(mOutputIdx);
}

 

I have made sure the following

1. Surface is null

2. Made sure output format is RAW from Mime Type and also color format (COLOR_FormatYCbYCr : The only color format supported by OMX.Freescale.std.video_decoder.avc.v3.hw-based is this)

3. Dequeue'd  index is used to getOutputImage, meaning same buffer index that is dequeued has been passed to get Output image.

 

But still getOutputImage() returns NULL always

 

If I change it to software decoder it works fine.

I am suspecting if freescale decoder is not supporting COLOR_FormatYUV422Flexible or any flexible formats to be the issue, that getOutputImage() returns NULL always. Also if I give surface at the time of configure, I get the display. We need to get this Output image to do post processing.

 

Has anybody faced similar issue ? Any pointers would help.

Outcomes