Video decoding using libstagefright on otoro device does not use hardware decoder on B2G

RESOLVED FIXED in mozilla17

Status

()

Core
Audio/Video
P1
normal
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: cajbir, Assigned: cajbir)

Tracking

(Blocks: 1 bug)

Trunk
mozilla17
ARM
Gonk (Firefox OS)
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(blocking-kilimanjaro:+, blocking-basecamp:+)

Details

Attachments

(2 attachments, 2 obsolete attachments)

(Assignee)

Description

5 years ago
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.
(Assignee)

Updated

5 years ago
blocking-basecamp: --- → ?
blocking-kilimanjaro: --- → ?
(Assignee)

Comment 1

5 years ago
Device is missing the following shared libraries to get hardware decoding working:

libOmxH264Dec.so
libOmxAacDec.so
libdivxdrmdecrypt.so
libmm-adspsvc.so
(Assignee)

Updated

5 years ago
Assignee: nobody → eflores
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.
Attachment #635154 - Flags: review?(chris.double)
(Assignee)

Updated

5 years ago
Attachment #635154 - Flags: review?(chris.double) → review+
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.
Attachment #635154 - Attachment is obsolete: true
Attachment #635167 - Flags: review+
(Assignee)

Updated

5 years ago
Duplicate of this bug: 767648
(Assignee)

Comment 5

5 years ago
Can we land this so that when the issue in comment 1 is addressed hardware acceleration will work?
(Assignee)

Updated

5 years ago
Blocks: 767849
Pull request for comment 1 at https://github.com/mozilla-b2g/android-device-otoro/pull/5
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 'libmmparser.so' not found 
E/ExtendedExtractor(  453): Failed to open MM_PARSER_LITE_LIB, dlerror = Cannot load library: load_library[1091]: Library 'libmmparser_lite.so' not found 

Also the video I am trying to open
people.mozilla.com/~dclarke/a.html does not play.  

            //if(!strcmp(mComponentName, "OMX.google.h264.decoder")
            //    && (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 . 

http://source-android.frandroid.com/frameworks/base/media/libstagefright/OMXCodec.cpp
Looks like there have been changes to libstagefright, that we don't have... 
as these lines don't show up.
(Assignee)

Comment 8

5 years ago
OMX.google.h264.decoder 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?
Which .so files ? are they checked in ?
(Assignee)

Comment 10

5 years ago
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.
Chris all otoro devices that went out to QA came pre-flashed to B2G. :( which means those libs are not on my machine.
Created attachment 636901 [details]
logcat output / hw decoding crash

Attached it the log i received when attempting to play content

people.mozilla.com/~dclarke/a.html || bit.ly/QencVk
Obtained original files, applied the pull from comment 6, and tested. 

@Edwin, what is the reference video that you are using. ?
This patch is now obsolete. We should have something proper going in the next couple of days. (sorry!)

Reference video I'm using is https://hg.mozilla.org/users/eflores_mozilla.com/video/raw-file/2aaf130aae3f/mp4/big_buck_bunny.mp4
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.
So should we rename this bug for maguro, and create a new one for otoro ?
(Assignee)

Comment 17

5 years ago
This should stay otoro because we don't have hardware decoding on otoro and that's what it's addressing.
Ok.? Is the above patch obsolete for otoro ? There should be a separate bug for maguro support then.
Edwin, can you give an eta on otoro, and is the b2g demo going to be on a maguro  or an otoro device?
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.
blocking-basecamp: ? → +
blocking-kilimanjaro: ? → +

Updated

5 years ago
Depends on: 762697
This is chipset specific, but for all intensive purposes it is device specific.
Otoro is the device we are shipping on.
(Assignee)

Comment 22

5 years ago
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?
It is FYI. Platform specific hw codecs is provided by libstagefrighthw.so

it is added as OMX plugin in OMXMaster::addVendorPlugin() 
http://androidxref.com/4.0.4/xref/frameworks/base/media/libstagefright/omx/OMXMaster.cpp#46

Comment 24

5 years ago
How are we doing here?
Priority: -- → P1
(Assignee)

Updated

5 years ago
Depends on: 759506
(Assignee)

Comment 25

5 years ago
It's blocked on 759506 which currently has issues with hardware decoding.
(Assignee)

Comment 26

5 years ago
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.
Assignee: eflores → chris.double
Attachment #635167 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #654053 - Flags: review?(eflores)
Attachment #654053 - Flags: review?(eflores) → review+
(Assignee)

Comment 27

5 years ago
Pull request to get the libraries copied over (updated version of comment 6):

https://github.com/mozilla-b2g/android-device-otoro/pull/12
(Assignee)

Comment 28

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/ce9f5c71a4aa
https://hg.mozilla.org/mozilla-central/rev/ce9f5c71a4aa
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.