HDR特殊处理

N938
Matthew 6 months ago
parent 6bd0ebf5b1
commit 77184e796d

@ -1580,6 +1580,19 @@ bool CPhoneDevice::TakePhoto(const IDevice::PHOTO_INFO& photoInfo, const vector<
params.requestTemplate = 2;
}
if (mPhotoInfo.autoExposure != 0 && mPhotoInfo.customHdr != 0 && mPhotoInfo.channel == 1)
{
params.autoExposure = 0;
if (params.exposureTime == 0)
{
params.exposureTime = 100000000;
}
if (params.sensitivity == 0)
{
params.sensitivity = 110;
}
}
#if 0
if (photoInfo.ldrEnabled)
{

@ -1880,6 +1880,12 @@ void NdkCamera::onCaptureCompleted(ACameraCaptureSession* session, ACaptureReque
if (m_params.customHdr)
{
int32_t compensation = m_params.compensation;
if (compensation == 0)
{
compensation = 1;
}
val = { 0 };
status = ACameraMetadata_getConstEntry(result, ACAMERA_SENSOR_EXPOSURE_TIME, &val);
int64_t exTime = (status == ACAMERA_OK) ? val.data.i64[0] : -1;
@ -1897,7 +1903,7 @@ void NdkCamera::onCaptureCompleted(ACameraCaptureSession* session, ACaptureReque
for (int idx = 0; idx < burstCaptures; idx++)
{
ACaptureRequest_setEntry_u8(requests[idx], ACAMERA_CONTROL_AE_MODE, 1, &aeModeOff);
int64_t expt = exTime * (idx + 1);
int64_t expt = exTime * ((idx == 0) ? 1 : (compensation + idx));
ACaptureRequest_setEntry_i64(requests[idx], ACAMERA_SENSOR_EXPOSURE_TIME, 1, &expt);
ACaptureRequest_setEntry_i32(requests[idx], ACAMERA_SENSOR_SENSITIVITY, 1, &sensitivity);
sensitivity = sensitivityRange.min_;

Loading…
Cancel
Save