I am using libstagefright to decode a 1020p video having baseline high and level 31 on android.
On emulator the video decoding fails, and i assume the reason is that softavc does not support high baseline according to the code here
But I tested this code on a real device which uses the OMX.MTK.VIDEO.DECODER.AVC decoder. And according to this link, this decoder supports high baseline decoding with level 31.
But the video result is garbled.
Does anyone have any insight, why this is so? And what could be the possible solution?
There could be 3 reasons for garbled output
The decoder employs a
stridewhich you haven't factored into your calculations. Recommended Solution: Please checkOMXcomponent'sportparameters and look forstrideand make suitable modifications.I presume you are decoding
1080, please consider1088for calculations instead of1080. This can be confirmed if your output has clearluma, but jumbledchroma. Does720pplay fine for you?If it's neither of the above 2 conditions are true, then the decoder may be outputting a
tiledoutput. Please check with the vendor's specifications. If this is true, you will need to convert from thetiledformat to a more common format likeNV12.EDIT: I think
tilingis your problem. Please check thisgithubcommit which is related to your problem and has a solution for color conversion.