Camera: Add checks to validate wnr capability.
Change-Id: Ie8b35a526d5a15ff70708d94f0066f8128f656cd
diff --git a/camera/QCamera2/HAL3/QCamera3HWI.cpp b/camera/QCamera2/HAL3/QCamera3HWI.cpp
index cd1a166..eeb1f32 100644
--- a/camera/QCamera2/HAL3/QCamera3HWI.cpp
+++ b/camera/QCamera2/HAL3/QCamera3HWI.cpp
@@ -3587,7 +3587,6 @@
ALOGD("%s: need do reprocess for ZSL WNR or min PP reprocess", __func__);
return true;
}
-
return needRotationReprocess();
}
@@ -3674,4 +3673,8 @@
return gCamCapability[mCameraId]->min_num_pp_bufs;
}
+bool QCamera3HardwareInterface::isWNREnabled() {
+ return gCamCapability[mCameraId]->isWnrSupported;
+}
+
}; //end namespace qcamera
diff --git a/camera/QCamera2/HAL3/QCamera3HWI.h b/camera/QCamera2/HAL3/QCamera3HWI.h
index 26983ef..53f8cc3 100644
--- a/camera/QCamera2/HAL3/QCamera3HWI.h
+++ b/camera/QCamera2/HAL3/QCamera3HWI.h
@@ -132,8 +132,8 @@
QCamera3ReprocessChannel *addOnlineReprocChannel(QCamera3Channel *pInputChannel, QCamera3PicChannel *picChHandle);
bool needRotationReprocess();
bool needReprocess();
+ bool isWNREnabled();
cam_denoise_process_type_t getWaveletDenoiseProcessPlate();
- bool isWNREnabled() {return true;};
void captureResultCb(mm_camera_super_buf_t *metadata,
camera3_stream_buffer_t *buffer, uint32_t frame_number);
diff --git a/camera/QCamera2/stack/common/cam_intf.h b/camera/QCamera2/stack/common/cam_intf.h
index a805067..bf7b493 100644
--- a/camera/QCamera2/stack/common/cam_intf.h
+++ b/camera/QCamera2/stack/common/cam_intf.h
@@ -58,7 +58,8 @@
cam_hal_version_t version;
cam_position_t position; /* sensor position: front, back */
-
+
+ uint16_t isWnrSupported;
/* supported iso modes */
uint8_t supported_iso_modes_cnt;
cam_iso_mode_type supported_iso_modes[CAM_ISO_MODE_MAX];