Closed
Bug 998019
Opened 10 years ago
Closed 9 years ago
[Camera][Madai] Glitches in preview when switching from picture to video mode
Categories
(Core :: Graphics: Layers, defect)
Tracking
()
RESOLVED
WONTFIX
Tracking | Status | |
---|---|---|
b2g-v2.0 | --- | wontfix |
b2g-v2.0M | --- | wontfix |
b2g-v2.1 | --- | unaffected |
b2g-v2.2 | --- | unaffected |
People
(Reporter: dmarcos, Assigned: sotaro)
References
Details
Attachments
(8 files, 9 obsolete files)
1.20 MB,
video/quicktime
|
Details | |
43 bytes,
text/plain
|
Details | |
65 bytes,
text/plain
|
Details | |
1.00 MB,
text/plain
|
Details | |
26.88 KB,
text/plain
|
Details | |
37.51 KB,
patch
|
Details | Diff | Splinter Review | |
31.19 KB,
patch
|
Details | Diff | Splinter Review | |
32.35 KB,
patch
|
sotaro
:
review+
|
Details | Diff | Splinter Review |
The preview is resized when switching from video to picture and the transition is not smooth. It's more noticeable on front camera (see attached video)
Reporter | ||
Comment 1•10 years ago
|
||
Comment 2•10 years ago
|
||
It would be nice to fix this before shipping. If there's a simple patch, I'll set the approval flag for 1.4 uplift. We already have some kind of CSS transition to hide these mode switching glitches, right? Does it just need to be tweaked to handle this case? Diego: whoever worked on the existing transition code is probably the right person to take this bug as well.
Flags: needinfo?(dmarcos)
Updated•10 years ago
|
Assignee: nobody → wilsonpage
Comment 4•10 years ago
|
||
I tried disabling all other DOM work around the point where the <video> is resized, but the glitch still persists. It seems the browser is doing some painting async which means that we see a few frames painted of the unsized video after it has been resized.
Attachment #8411057 -
Flags: feedback?(mchang)
Comment 5•10 years ago
|
||
I think I finally understand the cause of this bug. It is a result of a delay on the Gecko side when switching streams. Currently this is the sequence of events: 1. Fade out the viewfinder 2. Re-configure the camera hardware 3. Wait for the preview 'started' state 4. Fade the viewfinder back in 5. Observe the stream change (glitch) EXPECTED Gecko should only announce the stream has 'started' once the new stream has started flowing. I believe this is a regression since 1.4 on the Gecko side, as we used to be able to safely rely on this event in 1.3.
Updated•10 years ago
|
Assignee: wilsonpage → mhabicher
Updated•10 years ago
|
Attachment #8411057 -
Flags: feedback?(mchang)
Comment 6•10 years ago
|
||
Comment 7•10 years ago
|
||
That attached branch removes a lot of noise to make the problem more apparent and clearer to debug.
Comment 8•10 years ago
|
||
I just flashed my Madai with: - gecko: b2g_autogen_ephemeral_branch:851c53529d1d651b3a277930236e3ebc62b63ad8 - gaia: master:bbc76bcdc937bdbaf3935351ba2d532449c63bf8 ...and I don't see any viewfinder glitching on either camera. The transition is clean.
Reporter | ||
Comment 10•10 years ago
|
||
Madai? Are you talking about QRD?
Comment 11•10 years ago
|
||
(In reply to Diego Marcos [:dmarcos] from comment #10) > > Madai? Are you talking about QRD? Sorry, yes--I keep conflating them.
Updated•10 years ago
|
Hardware: PowerPC → ARM
Reporter | ||
Comment 12•10 years ago
|
||
I don't have one. Wilson does but he hasn't been able to flash it. If you can help him he can test this out.
Comment 13•10 years ago
|
||
mike: You won't see the glitch on master as we are delaying the fade in for 300ms, in the hope that the stream will have changed by then. In some cases (like Diego's) this isn't long enough. If you flash the Gaia branch (attachment 8411163 [details]) that amended to make the underlying issue clearer.
Flags: needinfo?(wilsonpage)
Updated•10 years ago
|
Flags: needinfo?(mhabicher)
Comment 14•10 years ago
|
||
Flags: needinfo?(mhabicher)
Comment 15•10 years ago
|
||
The following change in controllers/viewfinder.js can make it easier to see the glitches (at the expense of the viewfinder being shrunk and improperly rotated): ViewfinderController.prototype.configurePreview = function() { var camera = this.app.settings.cameras.selected('key'); var isFrontCamera = camera === 'front'; var sensorAngle = this.camera.getSensorAngle(); var previewSize = this.camera.previewSize(); - this.viewfinder.updatePreview(previewSize, sensorAngle, isFrontCamera); };
Comment 16•10 years ago
|
||
Sotaro, can you take a quick look at this one? There's a visual glitch where it looks like it takes the <video> tag a few frames to recognize a change in frame size when switching from picture mode (640x480 frames) to video mode (1280x720 frames). From the logcat, it looks like the camera is responding properly to the size change request, so I'm thinking there might be something in the upper layers of Gecko with a delayed update.
Flags: needinfo?(sotaro.ikeda.g)
Assignee | ||
Comment 17•10 years ago
|
||
I did debugging by applying the patch and by enabling "Dump layers tree".
Flags: needinfo?(sotaro.ikeda.g)
Assignee | ||
Comment 18•10 years ago
|
||
Get log by applying attachment 8412324 [details] [diff] [review] and enabling enabling "Dump layers tree".
Assignee | ||
Comment 19•10 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #18) > Created attachment 8412325 [details] > logout when the problem happens > > Get log by applying attachment 8412324 [details] [diff] [review] and > enabling enabling "Dump layers tree". I got the log by using master nexus-4.
Assignee | ||
Comment 20•10 years ago
|
||
From attachment 8412325 [details], the following seems to happen. At [7], one preview frame is rendered by inconsistent state.
-[1] ImageHost renders front camera camera preview (w=640, h=640).
ImageLayerComposite's visible is (x=0, y=0, w=640, h=480).
-[2] camera app chane the preview to front camera recording mode.
-[3] camera preview size is changed to (w=1280, h=720)
-[4] VideoFrameContainer::SetCurrentFrame() is called by new video frame (w=1280, h=720)
-[5] VideoFrameContainer trigger reflow
-[6] ImageClient send the new video frame to ImageHost via ImageBridge
-[7] ImageHost renders front camera camera preview (w=1280, h=720) .
ImageLayerComposite's visible is still (x=0, y=0, w=640, h=480). ************* old data
-[8] reflow on camera app
-[9] Update new layer data to ImageLayerComposite
-[10]ImageHost renders front camera camera preview (w=1280, h=720) .
ImageLayerComposite's visible is (x=86, y=0, w=1108, h=720). ************* updated data
Assignee | ||
Comment 21•10 years ago
|
||
Layer data is updated by reflow on main thread and then forwarded to Host side via ClientLayerManager. Camera preview frame is forwarded to Host side via ImageBridge on ImageBridge thread. This difference made the inconsistent state between ImageHost and ImageLayerComposite for a short time.
Assignee | ||
Updated•10 years ago
|
Component: Gaia::Camera → Graphics: Layers
Product: Firefox OS → Core
Assignee | ||
Comment 22•10 years ago
|
||
Changed to a correct component.
Updated•10 years ago
|
Assignee: mhabicher → sotaro.ikeda.g
Assignee | ||
Updated•10 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Updated•10 years ago
|
Status: ASSIGNED → NEW
Comment 24•10 years ago
|
||
Any news on this? Why is this being unassigned?
Assignee | ||
Comment 25•10 years ago
|
||
Sorry, I was busy for other bugs. I could have a time for this bug since this week.
Assignee | ||
Updated•10 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Updated•10 years ago
|
Component: Graphics: Layers → Preinstalled B2G Apps
Product: Core → Tech Evangelism
Assignee | ||
Updated•10 years ago
|
Assignee: sotaro.ikeda.g → nobody
Assignee | ||
Updated•10 years ago
|
Component: Preinstalled B2G Apps → Graphics: Layers
Product: Tech Evangelism → Core
Comment 30•10 years ago
|
||
The same problem happen on Woodduck and reported by partner. Hi Hubert, qawanted for branch check on Flame FFOS 2.0. Thanks!
Updated•10 years ago
|
blocking-b2g: --- → 2.0M+
status-b2g-v2.0:
--- → ?
status-b2g-v2.0M:
--- → affected
Flags: needinfo?(hlu)
Keywords: qawanted
Comment 31•10 years ago
|
||
Hi Josh, On flame v2.0, I could reproduce this issue symptom "The preview is resized when switching from video to picture and the transition is not smooth." == Build Information - Flame == Gaia-Rev 9791940d5093c37336dcd85f7e66e9a8445a218e Gecko-Rev https://hg.mozilla.org/releases/mozilla-b2g32_v2_0/rev/00d3c843aeec Build-ID 20141010000201 Version 32.0 Device-Name flame-kk FW-Release 4.4.2 FW-Incremental 34 FW-Date Tue Sep 30 14:06:36 CST 2014 Bootloader L1TC00011840
Assignee | ||
Comment 33•10 years ago
|
||
I am going to implement a patch from tomorrow.
Assignee | ||
Comment 34•10 years ago
|
||
Assignee | ||
Comment 35•10 years ago
|
||
(In reply to Hubert Lu[:hlu] <hlu@mozilla.com> from comment #31) > Hi Josh, > On flame v2.0, I could reproduce this issue symptom "The preview is resized > when switching from video to picture and the transition is not smooth." From the above description, I am not sure it is taking about this bug. This bug is not about transition smoothness.
Assignee | ||
Comment 36•10 years ago
|
||
Attachment #8506393 -
Attachment is obsolete: true
Assignee | ||
Comment 37•10 years ago
|
||
Assignee | ||
Comment 38•10 years ago
|
||
This bug is about inconsistency between video image size and layer setting. It happen because video image is delivered via ImageBridge(by different thread).
Assignee | ||
Updated•10 years ago
|
Attachment #8412324 -
Attachment is obsolete: true
Assignee | ||
Comment 39•10 years ago
|
||
In current mozCamera implementation, same preview size is used when camera hal supports separate preview and video sizes.
Assignee | ||
Comment 40•10 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #39) > In current mozCamera implementation, same preview size is used when camera > hal supports separate preview and video sizes. It is implemented by Bug 1014877. On nexus-4, camera preview size is always 1280*720. On flame-kk, camera preview size is always 864*480.
Assignee | ||
Comment 41•10 years ago
|
||
From Bug 1014877 comment 59, wookstock also become to use same camera preview size.
Assignee | ||
Comment 42•10 years ago
|
||
josh, from Bug 1014877 comment 59 is there a still reason to block 1054172 and 1080481?
Flags: needinfo?(jocheng)
Assignee | ||
Comment 43•10 years ago
|
||
(In reply to Hubert Lu[:hlu] <hlu@mozilla.com> from comment #31) > Hi Josh, > On flame v2.0, I could reproduce this issue symptom "The preview is resized > when switching from video to picture and the transition is not smooth." > > == Build Information - Flame == > Gaia-Rev 9791940d5093c37336dcd85f7e66e9a8445a218e > Gecko-Rev > https://hg.mozilla.org/releases/mozilla-b2g32_v2_0/rev/00d3c843aeec > Build-ID 20141010000201 > Version 32.0 > Device-Name flame-kk > FW-Release 4.4.2 > FW-Incremental 34 > FW-Date Tue Sep 30 14:06:36 CST 2014 > Bootloader L1TC00011840 This problem seems to related to Bug 1014877.
Assignee | ||
Comment 44•10 years ago
|
||
Attachment #8507050 -
Attachment is obsolete: true
Assignee | ||
Comment 45•10 years ago
|
||
By disabling Bug 1014877, the glitch can be easily confirmed.
Assignee | ||
Comment 46•10 years ago
|
||
Attachment #8506995 -
Attachment is obsolete: true
Assignee | ||
Comment 47•10 years ago
|
||
Comment 48•10 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #42) > josh, from Bug 1014877 comment 59 is there a still reason to block 1054172 > and 1080481? Hi Sotaro, This bug is initially reported by partner in bug 1070799 with title "Preview shake when switch betwen camera and camcorder" which I think is same problem with bug. You can check the video attachment in bug 1070799. We thought bug 1014877 can fix this issue but there is still slightly shake when switching between picture and video mode per https://bugzilla.mozilla.org/show_bug.cgi?id=1070799#c9 and https://bugzilla.mozilla.org/show_bug.cgi?id=1014877#c59. Do you mean patch for this bug will also not fix this "slightly shake" problem? Thanks!
Flags: needinfo?(jocheng) → needinfo?(sotaro.ikeda.g)
Assignee | ||
Comment 49•10 years ago
|
||
I do not think this bug fix "slightly shake" problem. If camera preview size is always same size, this bug have no effect to it.
Flags: needinfo?(sotaro.ikeda.g)
Assignee | ||
Comment 50•10 years ago
|
||
Update some comments.
Attachment #8507137 -
Attachment is obsolete: true
Assignee | ||
Updated•10 years ago
|
Attachment #8508128 -
Flags: review?(nical.bugzilla)
Assignee | ||
Updated•10 years ago
|
Attachment #8508128 -
Flags: review?(nical.bugzilla)
Assignee | ||
Comment 51•10 years ago
|
||
Remove unnecessary log.
Attachment #8508128 -
Attachment is obsolete: true
Assignee | ||
Updated•10 years ago
|
Attachment #8508130 -
Flags: review?(nical.bugzilla)
Updated•10 years ago
|
status-b2g-v2.1:
--- → unaffected
status-b2g-v2.2:
--- → unaffected
Comment 52•10 years ago
|
||
Comment on attachment 8508130 [details] [diff] [review] patch - Add Image size generation handling Review of attachment 8508130 [details] [diff] [review]: ----------------------------------------------------------------- Sorry for the review lag. I would prefer something a bit more generic like the notion of a "SyncPoint" with a sync id, instead of making it specific to size (I assume will eventually bump into other properties of ImageLayers that need to be synchronized with main thread transactions), but I think that the implementation would be the same (or almost), just with different names. So we'll consider this if the needs come.
Attachment #8508130 -
Flags: review?(nical.bugzilla) → review+
Assignee | ||
Comment 53•10 years ago
|
||
Thanks for the review:-) I am going to update to more generic name.
Assignee | ||
Comment 54•10 years ago
|
||
Apply the comment. Carry "r=nical".
Attachment #8508130 -
Attachment is obsolete: true
Attachment #8511552 -
Flags: review+
Assignee | ||
Comment 55•10 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=da46b9b297cd reftests failed :-(
Assignee | ||
Comment 56•10 years ago
|
||
Carry "r=nical". Update how to set ImageLayer atributte.
Attachment #8511552 -
Attachment is obsolete: true
Assignee | ||
Comment 57•10 years ago
|
||
Limit only to async ImageContainer. Carry "r=nical".
Attachment #8511582 -
Attachment is obsolete: true
Attachment #8511592 -
Flags: review+
Assignee | ||
Comment 58•10 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=b1130f16ed5c
Assignee | ||
Comment 59•10 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #58) > https://tbpl.mozilla.org/?tree=Try&rev=b1130f16ed5c Some tryserver failures exist around "layout + video" tests.
Comment 61•10 years ago
|
||
Triage: Minor user impact and not happen after 2.1. Not fix in 2.0M.
Assignee | ||
Comment 62•10 years ago
|
||
Bug 1097441 fixed a part of the problem.
Comment 63•9 years ago
|
||
Woodduck shipped and issue not happen on 2.2. Close as wont fix.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•