This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM3730: Video acceleration on Android ICS

Other Parts Discussed in Thread: DM3730, OMAP3530

Hi,

I am currently working on video acceleration in Android ICS on DM3730. My project is based on the rowboat release: http://code.google.com/p/rowboat/wiki/ICSonBeagleboard_WithSGX

I am trying two different approaches and would like some insight from the TI community.

My first approach has been to integrate the DVSDK as it was in gingerbread. I've made few changes to build the following packages:
      * dsplink_arm
      * dsplink_dsp
      * dsplink_gpp_genpackage
      * dsplink_dsp_genpackage
      * lpm
      * cmem
      * sdma
      * ce
      * codecs
As the DMAI codecs part is made only for OpenCore and the PV framework, it has to be re-designed for Stagefright.

The second approach is to look at the omap4 way of accelerating video, especially the binding with stagefright (not a lot more as the architecture is obviously a lot different). From what I understood the hw part is added in the hardware/ti/omap4 folder in the omx and libstagefrighthw sub-directories. As I found the same directories in the hardware/ti/omap3/ folder of the rowboat release I built them even though I know they must not work as-is (otherwise it would have been activated). So far I haven't been able to bind them  with the openmax layer.
Doing this work I noticed that even some software codecs do not work ([OMX.google.h264.decoder] ERROR(0x80001001, -1007)). The result I expected was that the video would be really slow but I do not understand why the software codec fails.

So here are my questions about this subject:
- What do these packages (hardware/ti/omap3/libstagefright and omx) provide?
- What is the work to be done on them to have an accelerated video (if possible this way)? How to bind them with SF?
- Which approach should I focus on (which one is the best)?
- Why doesnt the h264 sw codec work?

Thanks,
Gary

  • Dear Gary,

    im also interested in integrating the DVSDK in ICS. Are there some news / approaches available ?

    Thanks,

    Carsten

  • Hi Carsten,

    I stopped working on it but from what I heard some people succeeded in porting OpenCore in ICS in order to use the DVSDK just like in Gingerbread. However I am wondering if such implementation would be compliant with ICS compatibility requirements.

    Good luck,

    Gary

  • Hi Gary,

    at the moment I'm trying to compile DVSDK under Android ICS.

    I integrated it like it is done in gingerbread, but I get linker errors.

    It seems that some ov5T files are not created when compiling, but I don't know why that does not happen.

    Can you give me any hint, how you got the DVSDK compiling?

    Regards,

    Matthias

  • Hi Gary1,

    I am also trying to get DSP/Codec Engine functionality on OMAP3530 into our Android ICS systems.  I have had no success finding any useful information for this endeavor. I have next to no experience with Gingerbread. Is there a website or a certain set of search terms I can use to find out how people have done this in Gingerbread (so that I may try to do the same for ICS).

    Thank you very much,

    Dennis 

  • Hi Dennis,

    the rowboat project should be the right place. I dont know if the project builds Gingerbread with DSP "out of the box" for OMAP35x. But i think it

    is no problem to make it work.

    Regards

    Carsten

  • Hi Dennis,

    Here is a link that explains how to build the DVSDK for Gingerbread:

    http://code.google.com/p/rowboat/wiki/TI_DM37x_Android_2_3_4_MM_Acceleration

    However, as I said in my first post, ICS is very different from Gingerbread, therefore you won't be able to do the same. You would have to do a lot of modifications. First of all the DVSDK uses functionalities that are not present in the ICS bionic library anymore (semaphores, messages etc...).

    But if you succeed in porting everything, please don't forget to share it ;-)

    Thanks,

    Gary

  • For what I know you can have 2 approaches.

    1. One starting point is just before StageFright, in

    /mydroid/frameworks/base/media/libmediaplayerservice/MediaPlayerService.cpp

    between mentioned Android releases this is the point where different products are selected based in file format or extension. check the file for more details.

    In this file you can add a TEST_PLAYER code that could fit what you want to use. This interface is more like mediaplayer functions with what you need to interface check, setDataSource(), prepare(), start(), stop(), seekto(), etc. In this file there is a note that using this test player is only for development and that it is required some other steps to add them or similar text, check it.

    http://developer.android.com/reference/android/media/MediaPlayer.html

    2. From DOMX and StageFright point of view if you want to add your codec below StageFright then you need to add it as a Plug-in in

    /4AI/mydroid/frameworks/base/media/libstagefright/omx/OMXMaster.cpp

    and Sofware codec is in

    /4AI/mydroid/frameworks/base/media/libstagefright/omx/SoftOMXPlugin.cpp

    between BG and ICS I think they use the same plug-in programming,

    for DOMX the plug-in is in

    ICS - /4AI/mydroid/hardware/ti/omap4xxx/libstagefrighthw

    GB - /27.13.1/mydroid/hardware/ti/omx/core_plugin/omx_core_plugin/src

    these plug-ins uses OpenMax IL as interface to manage state changes and buffer processing.

    http://www.khronos.org/openmax/

    you can download OMAP 4 releases from

    http://omapedia.org/wiki/Release_Notes

    for 4AI try to select latest 4AI.1.7 and for reference on GB you can use 27.13.1

    http://omapedia.org/wiki/BlazeTablet_L27.13.1_Release_Notes

    http://omapedia.org/wiki/4AI.1.7_OMAP4_Icecream_Sandwich_Release_Notes

    but this features #1 and #2 are in Android code that means it must be available in DVSDK in Android side.

    In order to control what codec to use in StageFright you need to read this file

    /mydroid/frameworks/base/media/libstagefright/OMXCodec.cpp

    there are some arrays with components and MIME types, kEncoderInfo[] and kDecoderInfo[], when a codec is selected it looks for it in the list and plays the first one and if it is not available code will look for the next in the list. If SW codec is not playing there could be some fatal error that is not letting code to search for the next one in the list, until I know.

    If you require some more about DOMX you can read next link information

    http://omapedia.org/wiki/Ducati_For_Dummies

    if you require some more information about DOMX you can try contacting a TI Representative and ask them if they have some document available, it may require to sing some NDA or not.

    About what is the best approach, I have read Android code for Media Player and DOMX code, both are plug-ins to use #1 and #2, different approaches you may need to read the code to see if your actual code fits it, and if your code is in OpenMax IL it could be needed to check if the versions are compatible, just a comment.

    There are many variables involved that could cause the error you are seeing, I just meant to answer the first question providing some information.

  • That is some good information, thanks. I will see what I can do with it and get back to you.

    Thank you,

    Dennis 

  • Ok, one extra comment you can check source code in http://git.omapzoom.org/ just select the correct repository and then below in repository page select the branch or label that matches the release that you need to access. This to avoid downloading full source code locally as a second option.

  • Hi Gary,

    I am also trying something similar.  I need two things here.

    1. Is there a good starting point/instructions to bring up ICS on DM3730?

    2. A good way to integrate HW accelerated codecs on ICS.

    Were you successful in doing the above?

    Thanks a lot!

  • Hi all,


    i ported HW accelerated JPEG decoding to ICS (using DSPBridge / OMX). Its running very well especially
    decoding MJEPG streams. The CPU load drops about 30% (depending on input quality).

    If someone is interested please send a message.

    Regards,

    Carsten