Closed
Bug 949930
Opened 11 years ago
Closed 11 years ago
CameraControl.sensorAngle doesn't return consistent angle among different devices
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(blocking-b2g:1.3+, firefox27 wontfix, firefox28 fixed, firefox29 fixed, b2g-v1.3 fixed)
People
(Reporter: rexboy, Assigned: ben.tian)
References
Details
Attachments
(1 file)
(deleted),
patch
|
mikeh
:
review+
|
Details | Diff | Splinter Review |
CameraControl.sensorAngle on Unagi returns 270 degree.
Meanwhile, CameraControl.sensorAngle on Buri returns 90 degree with exactly the same direction of preview.
I guess they report degree based on different direction of rotation
(e.g. one on clockwise and another on counter-clockwise).
We may need to fix this before applying it into Camera app, or one of them will show
preview upside-down.
Reporter | ||
Comment 1•11 years ago
|
||
Hello Mike, do you have any idea on this issue?
Flags: needinfo?(mhabicher)
Comment 2•11 years ago
|
||
Hi KM, does hamachi otherwise take photos and record videos with the correct orientation?
I just checked and there is not ro.moz.camera offset in https://github.com/mozilla-b2g/android-device-hamachi/blob/master/full_hamachi.mk, so the value you're getting from .sensorOffset is exactly the value returned by the camera driver.
Flags: needinfo?(mhabicher) → needinfo?(rexboy)
Reporter | ||
Comment 3•11 years ago
|
||
Yes, both photos and video recording works as they should be.
The same problem is reported on Keon (see Bug 947956 comment 11) after applying CameraControl.sensorAngle...
We didn't print the angle out, but maybe they are having the same problem.
Flags: needinfo?(rexboy)
Comment 4•11 years ago
|
||
KM, try adding a line like this one to the file in comment 2:
https://github.com/mozilla-b2g/android-device-unagi/blob/master/full_unagi.mk#L16
Reporter | ||
Comment 5•11 years ago
|
||
Nominating 1.3? since it blocks a 1.3+ bug.
blocking-b2g: --- → 1.3?
Reporter | ||
Comment 6•11 years ago
|
||
I'm not having the build environment of Buri.. I can try on it for now but I feels like it would be better if there are someone working on Gecko/Gonk can help on supporting this bug.
Comment 7•11 years ago
|
||
(In reply to KM Lee [:rexboy] (Away: 12/25-1/5) from comment #6)
> I'm not having the build environment of Buri.. I can try on it for now but I
> feels like it would be better if there are someone working on Gecko/Gonk can
> help on supporting this bug.
Hi,
You can find Vincent Liu or I can help.
Comment 8•11 years ago
|
||
marking this a blocker based on initial description of previews showing upside down
blocking-b2g: 1.3? → 1.3+
Updated•11 years ago
|
Assignee: nobody → mhabicher
Reporter | ||
Comment 9•11 years ago
|
||
I just pushed the setting mentioned in Comment 4. to buri.
It works. I can apply patch of bug 947956 after pushing the setting.
As far as I know, we have at least Keon and Buri having this problem.
So, maybe what we need to do in this bug is to confirm if this pref is set correct for each devices?
Comment 10•11 years ago
|
||
(In reply to KM Lee [:rexboy] (Away: 12/25-1/5) from comment #9)
>
> I just pushed the setting mentioned in Comment 4. to buri.
> It works. I can apply patch of bug 947956 after pushing the setting.
\o/
> As far as I know, we have at least Keon and Buri having this problem.
> So, maybe what we need to do in this bug is to confirm if this pref is set
> correct for each devices?
Exactly.
Assignee: mhabicher → rexboy
Reporter | ||
Comment 11•11 years ago
|
||
Since I haven't send Gecko patch before, I think I'm not the appropriate one who can help on this issue.
Marco may you help find someone help on it?
Assignee: rexboy → nobody
Flags: needinfo?(mchen)
Comment 12•11 years ago
|
||
(In reply to KM Lee [:rexboy] (Away: 12/25-1/5) from comment #11)
>
> Since I haven't send Gecko patch before, I think I'm not the appropriate one
> who can help on this issue. Marco may you help find someone help on it?
It's not actually a Gecko change--just a chance to one of the configuration files used to build the Gonk image. Since the repo is on github, patching it is the same as patching Gaia.
Comment 13•11 years ago
|
||
Yes,
This change will be added into device-XXX folder in github not in Gecko.
If you still feel not suitable to update it, please let me know what value should be added into ro.moz.cam.0.sensor_offset. Then I can do it.
Ex: https://github.com/mozilla-b2g/android-device-unagi/blob/master/full_unagi.mk#L16
Flags: needinfo?(mchen)
Reporter | ||
Comment 14•11 years ago
|
||
Update:
I just did more tests per comment from Vliu. If we just add sensor_offset for Hamachi,
the preview rotates correctly; however pictures taken are upside-down instead.
So it seems that adding sensor_offset doesn't solve the problem.
we need to trace it with more detail.
Just discussed with Vliu and Ben. We are clarifying some details both inside takePicture and preview frame.
Comment 15•11 years ago
|
||
KM Lee,
From the latest updates from you, assuming you are actively working on this. Assigning it to you. Thanks!
Hema
Assignee: nobody → rexboy
Reporter | ||
Comment 16•11 years ago
|
||
We are still investigating the root cause.
I can assign to appropriate assignee after we find how to solve it.
Changing catalog since this doesn't seem to be a Gaia bug.
Component: Gaia::Camera → General
Reporter | ||
Comment 17•11 years ago
|
||
Tested on several devices. Seems that devices without ro.moz.cam.0.sensor_offset works well. Otherwise it fails.
Devices works:
Helix_back :sensor_offset=0 .sensorAngle returns= 90. Expected sensorAngle= 90.
Helix_front :sensor_offset=0 .sensorAngle returns=270. Expected sensorAngle=270.
Fugu_back :sensor_offset=0 .sensorAngle returns= 90. Expected sensorAngle= 90.
Fugu_front :sensor_offset=0 .sensorAngle returns=270. Expected sensorAngle=270.
Flatfish_back :sensor_offset=0 .sensorAngle returns= 0. Expected sensorAngle= 0.
Flatfish_front :sensor_offset=0 .sensorAngle returns= 0. Expected sensorAngle= 0.
Hamachi :sensor_offset=0 .sensorAngle returns= 90. Expected sensorAngle= 90.
Devices doesn't works:
Keon :sensor_offset=270.sensorAngle returns= 0. Expected sensorAngle= 90.
Inari :sensor_offset=270.sensorAngle returns= 0. Expected sensorAngle= 90.
Unagi :sensor_offset=180.sensorAngle returns=270. Expected sensorAngle= 90.
Not very sure what's going wrong,
but I guess we should do something on sensorAngle against sensor_offset.
Assignee | ||
Comment 18•11 years ago
|
||
Gecko should return raw orientation [1] instead of sensor orientation in [2], since preview is only affected by raw orientation.
[1] http://developer.android.com/reference/android/hardware/Camera.CameraInfo.html#orientation
[2] http://dxr.mozilla.org/mozilla-central/source/dom/camera/GonkCameraControl.cpp#445
Only picture orientation should consider ro.moz.cam.0.sensor_offset as the sensor_offset is to correct picture orientation done by non-v4l2 qcom camera driver. Non-v4l2 driver appends 1) raw orientation [3] and 2) 7x25A offset [4] onto picture orientation set by gecko, whereas v4l2-based one doesn't. Therefore, Hamachi requires no sensor_offset as it uses v4l2-based driver.
> Hamachi :sensor_offset=0 .sensorAngle returns= 90. Expected
> sensorAngle= 90.
Keon and Inari require sensor_offset=270 to correct 1).
> Keon :sensor_offset=270.sensorAngle returns= 0. Expected sensorAngle=
> 90.
> Inari :sensor_offset=270.sensorAngle returns= 0. Expected sensorAngle=
> 90.
Unagi requires sensor_offset=180 to correct 1)+2).
> Unagi :sensor_offset=180.sensorAngle returns=270. Expected sensorAngle=
> 90.
[3] https://www.codeaurora.org/cgit/quic/la/platform/hardware/qcom/camera/tree/QualcommCameraHardware.cpp?h=ics_chocolate_rb4.2#n8840
[4] https://www.codeaurora.org/cgit/quic/la/platform/hardware/qcom/camera/tree/QualcommCameraHardware.cpp?h=ics_chocolate_rb4.2#n2601
Note one way to tell whether it's v4l2-based camera driver is from logs. V4l2-based driver shows "QCamera_..." logs, whereas non-v4l2 driver shows "QualcommCameraHardware..." logs.
Assignee | ||
Comment 19•11 years ago
|
||
Return raw orientation for preview and video; only picture uses offset adjusted orientation.
Assignee: rexboy → btian
Attachment #8358265 -
Flags: review?(mhabicher)
Comment 20•11 years ago
|
||
Comment on attachment 8358265 [details] [diff] [review]
Patch 1 (v1): Return raw orientation to gaia for preview
Review of attachment 8358265 [details] [diff] [review]:
-----------------------------------------------------------------
This looks good to me--does it fix the issue Rex is running into?
Attachment #8358265 -
Flags: review?(mhabicher) → review+
Assignee | ||
Comment 21•11 years ago
|
||
(In reply to Mike Habicher [:mikeh] from comment #20)
> Comment on attachment 8358265 [details] [diff] [review]
> Patch 1 (v1): Return raw orientation to gaia for preview
>
> Review of attachment 8358265 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> This looks good to me--does it fix the issue Rex is running into?
Yes, this patch makes [1] return raw orientation for preview instead of offset adjusted orientation. I've verified this patch on unagi with Rex's gaia change.
[1] http://dxr.mozilla.org/mozilla-central/source/dom/camera/GonkCameraControl.cpp#445
Assignee | ||
Comment 22•11 years ago
|
||
Assignee | ||
Comment 23•11 years ago
|
||
Comment 24•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Comment 25•11 years ago
|
||
status-b2g-v1.3:
--- → fixed
status-firefox27:
--- → wontfix
status-firefox28:
--- → fixed
status-firefox29:
--- → fixed
Target Milestone: --- → 1.3 C2/1.4 S2(17jan)
You need to log in
before you can comment on or make changes to this bug.
Description
•