Modified libstagefright to use legacy Qualcomm OMX IL libs on ICS for MSM7x27 SoCs

Search This thread

Ganster41

Senior Member
Sep 12, 2011
52
632
Hi, low-end devices users! I have good news for you :)

As you know, Qualcomm has ended support for their SoCs, based on ARMv6 core, and doesn't release OpenMax IL libraries for Android 4.0+. Someone was crying on Qualcomm's forum, someone try to understand, how to extend GB proprietaries to support new Google OMX extensions, but nobody try to modify libstagefright, and disable using new unimplemended functions...

I spent about a few weeks, learning stagefright architecture, and differents between GB and ICS OMX layers...and now I ready to show it to you :)

I have only ZTE Blade, and can make ROM only for it. You can download it here. In addition to worked hardware-accelerated video playback, and camcorder, it builded with Linaro GCC 4.7.1, and has a little UI speedup(if it not a placebo :) ). ROM based on KonstaT device tree, thanks him for it.
Oh, my Dropbox temporary blocked to public links. I upload ROM to letitbit too.

Modified framework's sources can be found on my github. Besides it, you need to add one global define to your device's BoardConfig.mk - COMMON_GLOBAL_CFLAGS += -DQCOM_LEGACY_OMX

UPD: Patch already ported by XDA users! Read CM10 port thread.

UPD2: Please, if you want my help with integration problem, attach logcat at the time, when you try to use vide playback/camcorder. I can't help without any information.
This post can be helpful. Thanks to cougarcougar for it.

UPD3: Fixed playing videos in Browser, and non-fullscreen mode.

UPD4: Last important error on ICS is color banding on gradients in some videos. I think its not OMX work, that need something improvements in Surface rendering...

UPD5: You can use updated OMX from attachment, and my last changes in libstagefright to enable HW playback of AVI, DivX, WMA and RealMedia formats! :)
Big thanks to miroslav_mm for this research!
For RealMedia some kernel improvements needed. Look here for differents.
If you get a problems with new libs, you can try to still use your device oem libs. For get extended extractor working you need only add that:
libdivxdrmdecrypt.so, libmmosal.so, libmmparser.so and libmmparser_divxdrmlib.so

Important addition!
Devices based on MSM7x27 chips has two different versions of OMX libs.
"Old"(for froyo?) has an unknown padding between color components parts of returning buffer. I have fixed that for most videos, but some strange resolutions are still gets broken colors with green line on top.
"New" version are present in Samsung/LG devices, who has official Gingerbread ROMs. It returns correct buffer in dfferent color format(YV12, instead of NV21), but it laggy on VGA+ videos. Now don't know why. May be it convert resulting buffer to YV12 on CPU... I will try to understand it later.
I think you can use "old" libs from ZTE Blade on any device, because "new" libs work on ZTE Blade too.

PS: If you want to thanks/support my work - you know where you can find button for it. ;)
 

Attachments

  • OMX_libs_update.zip
    1.4 MB · Views: 2,545
Last edited:

b3rvirus

Member
Jan 15, 2012
44
2
Yogyakarta, Indonesia
Great! :D

I have tested your build on my Blade
and this is the first time in history that our old armv6 device can play 800x480 videos on ICS!

hope the other dev can see this and works together to fix the remaining issues

keep up the good work!
 
Last edited:

warface123

Senior Member
Jun 13, 2012
1,303
188
Miami
how can i use this just download the package and flash or do i need to do something else it?
 
Last edited:

DJBhardwaj

Inactive Recognized Contributor
Apr 23, 2011
5,055
2,745
30
Delhi
GT-i9020
Google Nexus 4

Top Liked Posts

  • There are no posts matching your filters.
  • 523
    Hi, low-end devices users! I have good news for you :)

    As you know, Qualcomm has ended support for their SoCs, based on ARMv6 core, and doesn't release OpenMax IL libraries for Android 4.0+. Someone was crying on Qualcomm's forum, someone try to understand, how to extend GB proprietaries to support new Google OMX extensions, but nobody try to modify libstagefright, and disable using new unimplemended functions...

    I spent about a few weeks, learning stagefright architecture, and differents between GB and ICS OMX layers...and now I ready to show it to you :)

    I have only ZTE Blade, and can make ROM only for it. You can download it here. In addition to worked hardware-accelerated video playback, and camcorder, it builded with Linaro GCC 4.7.1, and has a little UI speedup(if it not a placebo :) ). ROM based on KonstaT device tree, thanks him for it.
    Oh, my Dropbox temporary blocked to public links. I upload ROM to letitbit too.

    Modified framework's sources can be found on my github. Besides it, you need to add one global define to your device's BoardConfig.mk - COMMON_GLOBAL_CFLAGS += -DQCOM_LEGACY_OMX

    UPD: Patch already ported by XDA users! Read CM10 port thread.

    UPD2: Please, if you want my help with integration problem, attach logcat at the time, when you try to use vide playback/camcorder. I can't help without any information.
    This post can be helpful. Thanks to cougarcougar for it.

    UPD3: Fixed playing videos in Browser, and non-fullscreen mode.

    UPD4: Last important error on ICS is color banding on gradients in some videos. I think its not OMX work, that need something improvements in Surface rendering...

    UPD5: You can use updated OMX from attachment, and my last changes in libstagefright to enable HW playback of AVI, DivX, WMA and RealMedia formats! :)
    Big thanks to miroslav_mm for this research!
    For RealMedia some kernel improvements needed. Look here for differents.
    If you get a problems with new libs, you can try to still use your device oem libs. For get extended extractor working you need only add that:
    libdivxdrmdecrypt.so, libmmosal.so, libmmparser.so and libmmparser_divxdrmlib.so

    Important addition!
    Devices based on MSM7x27 chips has two different versions of OMX libs.
    "Old"(for froyo?) has an unknown padding between color components parts of returning buffer. I have fixed that for most videos, but some strange resolutions are still gets broken colors with green line on top.
    "New" version are present in Samsung/LG devices, who has official Gingerbread ROMs. It returns correct buffer in dfferent color format(YV12, instead of NV21), but it laggy on VGA+ videos. Now don't know why. May be it convert resulting buffer to YV12 on CPU... I will try to understand it later.
    I think you can use "old" libs from ZTE Blade on any device, because "new" libs work on ZTE Blade too.

    PS: If you want to thanks/support my work - you know where you can find button for it. ;)
    22
    I suggest everyone to press the "newsworthy thread" button ;)
    This is the best news I heard in a few months...
    and facepalm to Qualcomm
    20
    omx ALL the things!

    I'll give this a look and see what I can do. Thanks!
    13
    This decoders already implemented in our platform. You need only update OMX libs in your ROM to get it working.
    Last Samsung and LG phones already has it in its oem libs, i think, because it can play this formats on Gingerbread.
    12
    Wow,you are doing an amazing work right there. Big hopes for our little MSM7x27 devices :)