Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera err #1296

Open
wants to merge 5 commits into
base: celadon/r/mr0/stable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
From 750a6d205960e2edaaa3e5b7ff8400bbac2daac5 Mon Sep 17 00:00:00 2001
From: gkdeepa <[email protected]>
Date: Wed, 3 Nov 2021 14:11:10 +0530
Subject: [PATCH] check orientation in camera 90deg case

Tracked-On:
---
...ck-orientation-in-camera-180deg-case.patch | 50 +++++++++++++++++++
.../api1/client2/Parameters.cpp | 10 ++--
2 files changed, 56 insertions(+), 4 deletions(-)
create mode 100644 services/camera/libcameraservice/api1/0001-check-orientation-in-camera-180deg-case.patch

diff --git a/services/camera/libcameraservice/api1/0001-check-orientation-in-camera-180deg-case.patch b/services/camera/libcameraservice/api1/0001-check-orientation-in-camera-180deg-case.patch
new file mode 100644
index 0000000000..42b83e5fa1
--- /dev/null
+++ b/services/camera/libcameraservice/api1/0001-check-orientation-in-camera-180deg-case.patch
@@ -0,0 +1,50 @@
+From 9aa1a62d7206fdd32ea61eaecea46a58d5915686 Mon Sep 17 00:00:00 2001
+From: gkdeepa <[email protected]>
+Date: Wed, 3 Nov 2021 14:11:10 +0530
+Subject: [PATCH] check orientation in camera 180deg case
+
+Tracked-On:
+---
+ .../camera/libcameraservice/api1/client2/Parameters.cpp | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/services/camera/libcameraservice/api1/client2/Parameters.cpp b/services/camera/libcameraservice/api1/client2/Parameters.cpp
+index dbc863b3ad..9979610ca0 100644
+--- a/services/camera/libcameraservice/api1/client2/Parameters.cpp
++++ b/services/camera/libcameraservice/api1/client2/Parameters.cpp
+@@ -16,7 +16,7 @@
+
+ #define LOG_TAG "Camera2-Parameters"
+ #define ATRACE_TAG ATRACE_TAG_CAMERA
+-// #define LOG_NDEBUG 0
++#define LOG_NDEBUG 0
+
+ #include <utils/Log.h>
+ #include <utils/Trace.h>
+@@ -2828,10 +2828,12 @@ bool Parameters::boolFromString(const char *boolStr) {
+ }
+
+ int Parameters::degToTransform(int degrees, bool mirror) {
++ ALOGE("degrees and mirror %d %d ",degrees, mirror);
+ if (!mirror) {
+ if (degrees == 0) return 0;
+ else if (degrees == 90) return HAL_TRANSFORM_ROT_90;
+- else if (degrees == 180) return HAL_TRANSFORM_ROT_180;
++ //else if (degrees == 180) return HAL_TRANSFORM_ROT_180;
++ else if (degrees == 180) return 0;
+ else if (degrees == 270) return HAL_TRANSFORM_ROT_270;
+ } else { // Do mirror (horizontal flip)
+ if (degrees == 0) { // FLIP_H and ROT_0
+@@ -2839,7 +2841,8 @@ int Parameters::degToTransform(int degrees, bool mirror) {
+ } else if (degrees == 90) { // FLIP_H and ROT_90
+ return HAL_TRANSFORM_FLIP_H | HAL_TRANSFORM_ROT_90;
+ } else if (degrees == 180) { // FLIP_H and ROT_180
+- return HAL_TRANSFORM_FLIP_V;
++ return 0;
++ //return HAL_TRANSFORM_FLIP_V;
+ } else if (degrees == 270) { // FLIP_H and ROT_270
+ return HAL_TRANSFORM_FLIP_V | HAL_TRANSFORM_ROT_90;
+ }
+--
+2.17.1
+
diff --git a/services/camera/libcameraservice/api1/client2/Parameters.cpp b/services/camera/libcameraservice/api1/client2/Parameters.cpp
index dbc863b3ad..487e7cd426 100644
--- a/services/camera/libcameraservice/api1/client2/Parameters.cpp
+++ b/services/camera/libcameraservice/api1/client2/Parameters.cpp
@@ -16,7 +16,7 @@

#define LOG_TAG "Camera2-Parameters"
#define ATRACE_TAG ATRACE_TAG_CAMERA
-// #define LOG_NDEBUG 0
+#define LOG_NDEBUG 0

#include <utils/Log.h>
#include <utils/Trace.h>
@@ -2828,18 +2828,20 @@ bool Parameters::boolFromString(const char *boolStr) {
}

int Parameters::degToTransform(int degrees, bool mirror) {
+ ALOGE("degrees and mirror %d %d ",degrees, mirror);
if (!mirror) {
if (degrees == 0) return 0;
- else if (degrees == 90) return HAL_TRANSFORM_ROT_90;
+ else if (degrees == 90) return HAL_TRANSFORM_ROT_270;
else if (degrees == 180) return HAL_TRANSFORM_ROT_180;
else if (degrees == 270) return HAL_TRANSFORM_ROT_270;
} else { // Do mirror (horizontal flip)
if (degrees == 0) { // FLIP_H and ROT_0
return HAL_TRANSFORM_FLIP_H;
} else if (degrees == 90) { // FLIP_H and ROT_90
- return HAL_TRANSFORM_FLIP_H | HAL_TRANSFORM_ROT_90;
+ return HAL_TRANSFORM_FLIP_H ;
} else if (degrees == 180) { // FLIP_H and ROT_180
- return HAL_TRANSFORM_FLIP_V;
+ return 0;
+ //return HAL_TRANSFORM_FLIP_V;
} else if (degrees == 270) { // FLIP_H and ROT_270
return HAL_TRANSFORM_FLIP_V | HAL_TRANSFORM_ROT_90;
}
--
2.17.1

This file was deleted.

Loading
Loading