Closed
Bug 911548
Opened 11 years ago
Closed 11 years ago
Add necessary patches for aosp gonk stagefright
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(blocking-b2g:koi+, b2g-v1.2 fixed)
People
(Reporter: sotaro, Assigned: sotaro)
References
Details
(Whiteboard: POVB, QARegressExclude)
Attachments
(1 file, 5 obsolete files)
aosp's OMXCodec do not use allocated output buffers, return the last two buffers to the native window. In android, ANativeWindow is used for buffer source and rendering target by OMXCodec. The return buffers are necessary not to block the rendering target's task. But in b2g, ANativeWindow is used just for buffer source, do not need to return the buffers.
The change is done in ICS caf in Bug 864230 for v1.x. But for nexus-4, we are using JB aosp as android source. So we need to apply the change for nexus-4.
Assignee | ||
Updated•11 years ago
|
Assignee | ||
Comment 1•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
blocking-b2g: --- → koi?
Updated•11 years ago
|
blocking-b2g: koi? → koi+
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → sotaro.ikeda.g
Assignee | ||
Comment 2•11 years ago
|
||
This is necessary only on AOSP.
Assignee | ||
Updated•11 years ago
|
Summary: Change OMXCodec to use all allocated output buffers → Add necessary patches for aosp gonk stagefright
Assignee | ||
Comment 4•11 years ago
|
||
Attachment #798266 -
Attachment is obsolete: true
Assignee | ||
Comment 5•11 years ago
|
||
Assignee | ||
Comment 6•11 years ago
|
||
b2g nexus-4 uses aosp as base gonk code, not caf. We need to maintain necessary change to gonk. This bug is for stagefright change.
Assignee | ||
Comment 7•11 years ago
|
||
Bug 871018 is also important change in b2g18. But it is not necessary for AOSP. Bug 871018 is necessary only on caf's OMXCodec.
Assignee | ||
Comment 8•11 years ago
|
||
b2g18 has another patch related to stagefright. It is Bug 823324. I feel it is not ncecessary even in caf b2g18. It is added to mitigate the incorrect gralloc buffer handling crash. But this patch derive another problem. If there is the problem, hw codec is not freed forever. It make situation worse.
Assignee | ||
Updated•11 years ago
|
Attachment #801285 -
Flags: review?(mwu)
Assignee | ||
Updated•11 years ago
|
Attachment #801287 -
Flags: review?(mwu)
Comment 9•11 years ago
|
||
gonk-patches will not be used for post-ICS devices. We should fork frameworks/av instead.
Comment 10•11 years ago
|
||
I've forked frameworks/av. Use https://github.com/mozilla-b2g/platform_frameworks_av/tree/b2g-4.3_r2.1
Assignee | ||
Updated•11 years ago
|
Attachment #801285 -
Attachment is obsolete: true
Attachment #801285 -
Flags: review?(mwu)
Assignee | ||
Updated•11 years ago
|
Attachment #801287 -
Attachment is obsolete: true
Attachment #801287 -
Flags: review?(mwu)
Assignee | ||
Comment 11•11 years ago
|
||
Assignee | ||
Comment 12•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #802607 -
Flags: review?(mwu)
Assignee | ||
Updated•11 years ago
|
Attachment #802614 -
Flags: review?(mwu)
Comment 13•11 years ago
|
||
Comment on attachment 802614 [details] [diff] [review]
patch - change to b2g-manifest
I'll make this change in-place (instead of moving it to the B2G section).
Attachment #802614 -
Flags: review?(mwu)
Comment 14•11 years ago
|
||
Assignee | ||
Comment 15•11 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #11)
> Created attachment 802607 [details]
> pull request to mozilla-b2g/platform_frameworks_av
The change of the color conversion comes from codeaurora.
https://www.codeaurora.org/cgit/external/simcom/platform/frameworks/av/tree/media/libstagefright/colorconversion/ColorConverter.cpp?h=jb-8930-master-dsda
See Bug 911518 comment #2.
Comment 16•11 years ago
|
||
I'm still not comfortable with the use of libmm-color-convertor.so. I don't see any evidence that libmm-color-convertor.so uses anything other than software running on the cpu to do its job. This particular format has also been reverse engineered.
Assignee | ||
Comment 17•11 years ago
|
||
As I told in the oslo b2g work week, caf did color conversion by software in the past. I found the following code. If it is not for the product, it seems enough. How do you think about the code?
https://www.codeaurora.org/cgit/quic/la/platform/frameworks/base/tree/media/libstagefright/colorconversion/ColorConverter.cpp?id=M8960AAAAANLYA1001
Flags: needinfo?(mwu)
Comment 18•11 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #17)
> As I told in the oslo b2g work week, caf did color conversion by software in
> the past. I found the following code. If it is not for the product, it seems
> enough. How do you think about the code?
>
> https://www.codeaurora.org/cgit/quic/la/platform/frameworks/base/tree/media/
> libstagefright/colorconversion/ColorConverter.cpp?id=M8960AAAAANLYA1001
Looks reasonable. If we can build that code in instead of dlopening at runtime, I'll be ok with this.
Flags: needinfo?(mwu)
Assignee | ||
Comment 19•11 years ago
|
||
Thanks for the comment. I am going to implement the patch by using the software color conversion.
Assignee | ||
Updated•11 years ago
|
Attachment #802614 -
Attachment is obsolete: true
Assignee | ||
Updated•11 years ago
|
Attachment #802607 -
Attachment is obsolete: true
Attachment #802607 -
Flags: review?(mwu)
Assignee | ||
Comment 20•11 years ago
|
||
Assignee | ||
Comment 21•11 years ago
|
||
Comment on attachment 809228 [details]
pull request to mozilla-b2g/platform_frameworks_av
mwu, can you review the pull request. I confirmed the patch work on nexus-4 with temporary modification on Bug 910498.
Attachment #809228 -
Flags: review?(mwu)
Comment 22•11 years ago
|
||
Comment on attachment 809228 [details]
pull request to mozilla-b2g/platform_frameworks_av
Much better - thanks!
I didn't do an in-depth review since I assume this is mostly just code imported from other places.
Didn't you also have another patch to frameworks/av/media/libstagefright/OMXCodec.cpp ? r=me for that too if you still want to land that.
Attachment #809228 -
Flags: review?(mwu) → review+
Assignee | ||
Comment 23•11 years ago
|
||
(In reply to Michael Wu [:mwu] from comment #22)
>
> Didn't you also have another patch to
> frameworks/av/media/libstagefright/OMXCodec.cpp ? r=me for that too if you
> still want to land that.
Thanks for the quick review! The change to OMXCodec.cpp is already included in the pull request. It is only one line change.
Assignee | ||
Comment 24•11 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #23)
> (In reply to Michael Wu [:mwu] from comment #22)
> >
> > Didn't you also have another patch to
> > frameworks/av/media/libstagefright/OMXCodec.cpp ? r=me for that too if you
> > still want to land that.
>
> Thanks for the quick review! The change to OMXCodec.cpp is already included
> in the pull request. It is only one line change.
It's the following part.
--------------------------------------
cancelEnd = mPortBuffers[kPortIndexOutput].size();
} else {
// Return the last two buffers to the native window.
- cancelStart = def.nBufferCountActual - minUndequeuedBufs;
+ cancelStart = def.nBufferCountActual;
cancelEnd = def.nBufferCountActual;
}
Comment 25•11 years ago
|
||
Ah, I missed it.
Actually, can you pull that change out into its own commit? It makes sense on its own.
You should have write access to the repo so commit whenever you're ready.
Assignee | ||
Comment 26•11 years ago
|
||
Okey, I am going to split the change to own commit.
Assignee | ||
Comment 27•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 28•11 years ago
|
||
Oh, I need to uplift the change to "b2g-4.3_r2.1".
Comment 29•11 years ago
|
||
Yeah - sorry I missed that. Please reset the master branch to its previous state after uplifting.
Assignee | ||
Comment 30•11 years ago
|
||
Assignee | ||
Comment 31•11 years ago
|
||
(In reply to Michael Wu [:mwu] from comment #29)
> Yeah - sorry I missed that. Please reset the master branch to its previous
> state after uplifting.
Okey.
Assignee | ||
Comment 32•11 years ago
|
||
reset of mater is completed. mwu, thanks for your help.
Comment 33•11 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #21)
> Comment on attachment 809228 [details]
> pull request to mozilla-b2g/platform_frameworks_av
>
> mwu, can you review the pull request. I confirmed the patch work on nexus-4
> with temporary modification on Bug 910498.
Sotaro, can you please explain how you came up with the color conversion changes here https://github.com/sotaroikeda/platform_frameworks_av/commit/048364d2e6d0ee71f83447d3fc9cf1fab1815ae1?
Correct me if I am wrong but I assume all these color conversion changes already exist on CAF and we don't need to make any corresponding changes.
Flags: needinfo?(sotaro.ikeda.g)
Assignee | ||
Comment 34•11 years ago
|
||
(In reply to Inder from comment #33)
> (In reply to Sotaro Ikeda [:sotaro] from comment #21)
> Sotaro, can you please explain how you came up with the color conversion
> changes here
> https://github.com/sotaroikeda/platform_frameworks_av/commit/
> 048364d2e6d0ee71f83447d3fc9cf1fab1815ae1?
> Correct me if I am wrong but I assume all these color conversion changes
> already exist on CAF and we don't need to make any corresponding changes.
It is necessary, because current moz build for nexus 4 does not use caf, but use AOSP.
Flags: needinfo?(sotaro.ikeda.g)
Assignee | ||
Comment 35•11 years ago
|
||
Inder, does caf provide the support for nexus4 build? And can you give me a link of corresponding color conversion code?
Flags: needinfo?(ikumar)
Assignee | ||
Comment 36•11 years ago
|
||
And I am not the person to make decision to use AOSP for nexus4 moz build.
Comment 37•11 years ago
|
||
Should this have POVB or NPOTB on the whiteboard? It's showing up in my needs-uplift queries, but it sure doesn't look like there's anything actionable here on my end.
Assignee | ||
Updated•11 years ago
|
status-b2g-v1.2:
--- → fixed
Comment 39•11 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #34)
> (In reply to Inder from comment #33)
> > (In reply to Sotaro Ikeda [:sotaro] from comment #21)
> > Sotaro, can you please explain how you came up with the color conversion
> > changes here
> > https://github.com/sotaroikeda/platform_frameworks_av/commit/
> > 048364d2e6d0ee71f83447d3fc9cf1fab1815ae1?
> > Correct me if I am wrong but I assume all these color conversion changes
> > already exist on CAF and we don't need to make any corresponding changes.
>
> It is necessary, because current moz build for nexus 4 does not use caf, but
> use AOSP.
Sotaro,
Sorry, if I caused confusion. I am aware that nexus 4 uses AOSP and I wasn't suggesting you to start using CAF. I was just wondering if I need to make any corresponding changes in CAF. I noticed that in your commit you brought in CAF copyright so I guess your color conversion changes are from CAF somewhere?
See: https://github.com/mozilla-b2g/platform_frameworks_av/blob/b2g-4.3_r2.1/media/libstagefright/colorconversion/ColorConverter.cpp#L3
Flags: needinfo?(ikumar)
Assignee | ||
Comment 40•11 years ago
|
||
Yes, I borrowed the color conversion code from CAF. The first version of pull request was made from the following.
https://www.codeaurora.org/cgit/external/simcom/platform/frameworks/av/tree/media/libstagefright/colorconversion/ColorConverter.cpp?h=jb-8930-master-dsda
The second(final) version was made from the following. The following code is a bit old, but still seems to convert color correctly.
https://www.codeaurora.org/cgit/quic/la/platform/frameworks/base/tree/media/libstagefright/colorconversion/ColorConverter.cpp?id=M8960AAAAANLYA1001
Updated•11 years ago
|
Whiteboard: POVB → POVB, QARegressExclude
Assignee | ||
Comment 41•11 years ago
|
||
Hi Inder, in ics_1.2 "persist.camera.shutter.disable" is defined to skip loading sound filed in CameraService, but in b2g_jb_mr2 do not have this system property. Is CAF going to add the property to CAF b2g_jb?
https://www.codeaurora.org/cgit/quic/la/platform/frameworks/base/tree/services/camera/libcameraservice/CameraService.cpp?h=b2g_ics_1.2#n297
https://www.codeaurora.org/cgit/quic/la/platform/frameworks/av/tree/services/camera/libcameraservice/CameraService.cpp?h=b2g_jb_mr2
Flags: needinfo?(ikumar)
Comment 42•11 years ago
|
||
Sotaro -- we didn't have plans to add the system property. Do we need this for proper shutter sound functioning?
Flags: needinfo?(ikumar) → needinfo?(sotaro.ikeda.g)
Assignee | ||
Comment 43•11 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #41)
> https://www.codeaurora.org/cgit/quic/la/platform/frameworks/base/tree/
> services/camera/libcameraservice/CameraService.cpp?h=b2g_ics_1.2#n297
I asked the question just because codeaurora added the system property to CameraService on android ICS.
It is not necessary for the shutter sound functioning on b2g. On b2g, we disable CameraService's shutter sound just by removing android default sound files. But it causes spend several ms to try to load the files by using android::MediaPlayer. The above disable system shutter sound at all. The CameraService does not even try to load the file.
Flags: needinfo?(sotaro.ikeda.g)
You need to log in
before you can comment on or make changes to this bug.
Description
•