Commit 4ae69eeb authored by Ricky Liang's avatar Ricky Liang Committed by Commit Bot

[CrOS] video_capture: fix up the sensor rotation degree calculation

The android.sensor.orientation metadata specifies the clockwise angle
through which the output image needs to be rotated to be upright on the
device screen in its native orientation.

Bug: 990682
Change-Id: I552a0b0bedc126efe85519cd25cc904d6e550e81
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2341026
Auto-Submit: Ricky Liang <jcliang@chromium.org>
Commit-Queue: Wei Lee <wtlee@chromium.org>
Reviewed-by: default avatarWei Lee <wtlee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#795512}
parent ebbb7fa2
...@@ -87,8 +87,7 @@ int CameraDeviceContext::GetRotationForDisplay() { ...@@ -87,8 +87,7 @@ int CameraDeviceContext::GetRotationForDisplay() {
} }
int CameraDeviceContext::GetRotationFromSensorOrientation() { int CameraDeviceContext::GetRotationFromSensorOrientation() {
// We need to rotate the frame back to 0 degree. return sensor_orientation_;
return (360 - sensor_orientation_);
} }
bool CameraDeviceContext::ReserveVideoCaptureBufferFromPool( bool CameraDeviceContext::ReserveVideoCaptureBufferFromPool(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment