Persona is no longer an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 766395 - Video decoding using libstagefright on otoro device does not use hardware decoder on B2G
: Video decoding using libstagefright on otoro device does not use hardware dec...
Product: Core
Classification: Components
Component: Audio/Video (show other bugs)
: Trunk
: ARM Gonk (Firefox OS)
: P1 normal (vote)
: mozilla17
Assigned To: cajbir (:cajbir)
: Maire Reavy [:mreavy]
: 767648 (view as bug list)
Depends on: 759506 762697
Blocks: 767849
  Show dependency treegraph
Reported: 2012-06-19 16:56 PDT by cajbir (:cajbir)
Modified: 2012-08-22 02:44 PDT (History)
7 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch 1 rev 1 - Add support for Qualcomm colour format (3.85 KB, patch)
2012-06-20 18:06 PDT, Edwin Flores [:eflores] [:edwin]
cajbir.bugzilla: review+
Details | Diff | Splinter Review
Patch 1 rev 2 - Add support for Qualcomm colour format (3.85 KB, patch)
2012-06-20 19:28 PDT, Edwin Flores [:eflores] [:edwin]
edwin: review+
Details | Diff | Splinter Review
logcat output / hw decoding crash (7.62 KB, text/plain)
2012-06-26 15:22 PDT, [:onecyrenus]
no flags Details
Enable use of hardware decoders (4.68 KB, patch)
2012-08-21 19:28 PDT, cajbir (:cajbir)
edwin: review+
Details | Diff | Splinter Review

Description cajbir (:cajbir) 2012-06-19 16:56:14 PDT
When playing H.264 videos on an otoro device with B2G the software libstagefright decoder is used resulting in poor performance and basic profile support only.
Comment 1 cajbir (:cajbir) 2012-06-19 17:12:15 PDT
Device is missing the following shared libraries to get hardware decoding working:
Comment 2 Edwin Flores [:eflores] [:edwin] 2012-06-20 18:06:10 PDT
Created attachment 635154 [details] [diff] [review]
Patch 1 rev 1 - Add support for Qualcomm colour format

h.264 now working on otoro. Very slow, however, and some videos don't work. Will have to investigate further.
Comment 3 Edwin Flores [:eflores] [:edwin] 2012-06-20 19:28:49 PDT
Created attachment 635167 [details] [diff] [review]
Patch 1 rev 2 - Add support for Qualcomm colour format

Had U and V channels backwards. Carry over r=doublec.
Comment 4 cajbir (:cajbir) 2012-06-23 02:19:22 PDT
*** Bug 767648 has been marked as a duplicate of this bug. ***
Comment 5 cajbir (:cajbir) 2012-06-24 17:27:44 PDT
Can we land this so that when the issue in comment 1 is addressed hardware acceleration will work?
Comment 6 Edwin Flores [:eflores] [:edwin] 2012-06-24 22:08:36 PDT
Pull request for comment 1 at
Comment 7 [:onecyrenus] 2012-06-26 01:54:50 PDT
Just an update from my perspective. there are some other shared libraries that don't seem to be present. 

E/ExtendedExtractor(  453): Failed to open MM_PARSER_LIB, dlerror = Cannot load library: load_library[1091]: Library '' not found 
E/ExtendedExtractor(  453): Failed to open MM_PARSER_LITE_LIB, dlerror = Cannot load library: load_library[1091]: Library '' not found 

Also the video I am trying to open does not play.  

            //if(!strcmp(mComponentName, "")
            //    && (profile != kAVCProfileBaseline)) {
            //    LOGE("%s does not support profiles > kAVCProfileBaseline", mComponentName);
                // The profile is unsupported by the decoder
            //    return ERROR_UNSUPPORTED;
           // }
This seems to be where the decision is being made.  Uncommented, I get audio playback but the lack of the ".so" files listed above throw an error. 

Without uncommenting I get no audio / video .
Looks like there have been changes to libstagefright, that we don't have... 
as these lines don't show up.
Comment 8 cajbir (:cajbir) 2012-06-26 02:34:32 PDT is the software decoder. We want the *.qcom.* decoder which those .so files give us. What video doesn't play for you with those .so files included in /system/lib?
Comment 9 [:onecyrenus] 2012-06-26 02:44:46 PDT
Which .so files ? are they checked in ?
Comment 10 cajbir (:cajbir) 2012-06-26 02:47:56 PDT
See comment 1 or wait for comment 6 to be actioned. Even if comment 6 is done though, if you've already installed b2g you've lost those .so files and need to get them from the original android OS that was on the device.
Comment 11 [:onecyrenus] 2012-06-26 03:01:37 PDT
Chris all otoro devices that went out to QA came pre-flashed to B2G. :( which means those libs are not on my machine.
Comment 12 [:onecyrenus] 2012-06-26 15:22:18 PDT
Created attachment 636901 [details]
logcat output / hw decoding crash

Attached it the log i received when attempting to play content ||
Comment 13 [:onecyrenus] 2012-06-26 15:23:51 PDT
Obtained original files, applied the pull from comment 6, and tested. 

@Edwin, what is the reference video that you are using. ?
Comment 14 Edwin Flores [:eflores] [:edwin] 2012-06-26 15:25:42 PDT
This patch is now obsolete. We should have something proper going in the next couple of days. (sorry!)

Reference video I'm using is
Comment 15 Edwin Flores [:eflores] [:edwin] 2012-06-26 15:26:37 PDT
Actually, that's wrong. We'll have something going on maguro, but otoro will require a bit more work yet due to our GB/ICS munge.
Comment 16 [:onecyrenus] 2012-06-26 15:41:39 PDT
So should we rename this bug for maguro, and create a new one for otoro ?
Comment 17 cajbir (:cajbir) 2012-06-26 15:44:55 PDT
This should stay otoro because we don't have hardware decoding on otoro and that's what it's addressing.
Comment 18 [:onecyrenus] 2012-06-26 16:00:47 PDT
Ok.? Is the above patch obsolete for otoro ? There should be a separate bug for maguro support then.
Comment 19 [:onecyrenus] 2012-06-26 22:53:22 PDT
Edwin, can you give an eta on otoro, and is the b2g demo going to be on a maguro  or an otoro device?
Comment 20 Joe Drew (not getting mail) 2012-07-17 13:41:06 PDT
We don't expect that this is device-specific, but rather chipset-specific, right? If it's otoro-only, then we might not need to block on this.
Comment 21 [:onecyrenus] 2012-07-17 14:03:49 PDT
This is chipset specific, but for all intensive purposes it is device specific.
Otoro is the device we are shipping on.
Comment 22 cajbir (:cajbir) 2012-07-17 17:19:00 PDT
This particular bug was for the otoro device specific problem of the hardware decoder shared libraries not being installed when doing an otoro config. It also requires the patch which is attached and this allows hardware decoding to work. But it is very very slow - slower than software. The fix for the slowness is being done in bug 759506.

The issue for the shared libraries not being copied was being addressed by Edwin in a pull request to the mozilla-b2g github repository. Once that's done this patch can be landed and the bug closed. 

Edwin, how'd that pull request go?
Comment 23 Sotaro Ikeda [:sotaro] 2012-07-19 22:28:13 PDT
It is FYI. Platform specific hw codecs is provided by

it is added as OMX plugin in OMXMaster::addVendorPlugin()
Comment 24 Andreas Gal :gal 2012-08-08 10:14:20 PDT
How are we doing here?
Comment 25 cajbir (:cajbir) 2012-08-08 17:44:34 PDT
It's blocked on 759506 which currently has issues with hardware decoding.
Comment 26 cajbir (:cajbir) 2012-08-21 19:28:26 PDT
Created attachment 654053 [details] [diff] [review]
Enable use of hardware decoders

Turns on hardware decoding support on B2G. If the otoro device has the libOmx*.so files for hardware codecs mentioned in comment 1 this enables decoding videos using the hardware decoder.
Comment 27 cajbir (:cajbir) 2012-08-21 20:07:36 PDT
Pull request to get the libraries copied over (updated version of comment 6):
Comment 29 Ed Morley (Away 28th Oct -> 6th Nov) [:emorley] 2012-08-22 02:44:37 PDT

Note You need to log in before you can comment on or make changes to this bug.