Forums - HW video decode on non-qualcoom CPU

6 posts / 0 new
Last post
HW video decode on non-qualcoom CPU
EnderX
Join Date: 26 Mar 13
Posts: 4
Posted: Wed, 2013-03-27 03:04

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.

  • Up0
  • Down0
Steve L (not verified)
Posted: Wed, 2013-03-27 09:26

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

  • Up0
  • Down0
EnderX
Join Date: 26 Mar 13
Posts: 4
Posted: Wed, 2013-03-27 18:50

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?

  • Up0
  • Down0
EnderX
Join Date: 26 Mar 13
Posts: 4
Posted: Thu, 2013-03-28 00:18

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?

  • Up0
  • Down0
Steve L (not verified)
Posted: Thu, 2013-03-28 10:17

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

 

  • Up0
  • Down0
denbian
Join Date: 25 Mar 13
Posts: 1
Posted: Mon, 2013-09-09 20:28

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).

 

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.