Hi, I'm checking out this example qcom_video_codec_sample_1_3_1 which is really great. I'm wondering if this approch also applies to any other non-qualcomm baseed device? Can we decode video with hardware on the universal Android platform in the same way?
The only change I could see that is the IOMX.h file, how could I make it work with other CPU?
Thanks in advance.
You could potentially use this on other non-QC chipsets, but you would also need to (a) know the codec string of the target device to search for, and (b) account for any specific input / output format information for the Video Core of the target device. You'll see accommodations made for the file formats in the QcomOmxPublicInterface.cpp file during the input and output callbacks, and would need to make modifications for [b] in those blocks
Thanks, Steve.
How could I fallback to non-hardware video codecs in this example? I mean there gotta be unsupported hardware on devices, right? Could you show me a quick piece of code to do that?
Take decode 264 stream for example, should I use "OMX.google.h264.decoder" as the soft codec when I failed to find one like "OMX.qcom.video.decoder.avc" or any other provided by the chipset vendor?
EnderX,
That codec should work for you for software, or if you can try to get the vendor codec from other CPUs by iterating over the available codecs (as done in the sample when looking for the codec) and analyzing the logs. Again, you'll need to do your own research for file format considerations and any specifics for feeding the encoder or decoder. What is your use case? If you are just decoding alone, the MediaCodec java APIs might be sufficient for you.
-Steve
I have an issue about using OMX.qcom.video.decoder.avc for avc bitstream decoding on 4.2 device, it looks like can not support HW rendering while SurfaceTexture passing by via MediaCodec.configure(format, surfaceTextureClient, NULL/*crypto*/, 0).
**************************
queueBuffer: error queuing buffer to SurfaceTexture, -32
Codec reports an error. ( omx error 0x80001001, internalError -32 )
Display event receiver pipe was closed or an error ocurred, events=0x9
*************************
And also, I have tried to disable HW rendering via passby NULL surface to MediaCodec.configure(), it works. But,
The data colorformat in DecodedBuffer is qcom build-in format YUV420PackedSemiPlanar64x32Tile2m8ka, it need color converter to common yuv format via software function, i.e, to I420/NV12 etc. Is there software reference or document about converting 64x32Tile2m8ka to I420/NV12 format for various/general video size (qvga,vga, cif, 4cif, 720p, 1080p etc)?
So, qcom experts, any ideas about those above?
My devices is Snapdragon MSM8255 / Adreno 205, OS: 4.2.2 (MediaCodec can be supported).