增加HDR曝光增益的控制

N938
Matthew 6 months ago
parent 4ba68b4d82
commit 6908711c3a

@ -1565,6 +1565,7 @@ bool CPhoneDevice::TakePhoto(const IDevice::PHOTO_INFO& photoInfo, const vector<
params.awbMode = mPhotoInfo.awbMode;
params.wait3ALocked = mPhotoInfo.wait3ALocked;
params.customHdr = mPhotoInfo.customHdr;
params.hdrStep = mPhotoInfo.hdrStep;
params.burstRawCapture = mPhotoInfo.usingRawFormat;
params.burstCaptures = mPhotoInfo.burstCaptures;
if (params.requestTemplate <= 0 || params.requestTemplate > 5)

@ -1880,10 +1880,10 @@ void NdkCamera::onCaptureCompleted(ACameraCaptureSession* session, ACaptureReque
if (m_params.customHdr)
{
int32_t compensation = m_params.compensation;
if (compensation == 0)
int32_t hdrStep = m_params.hdrStep;
if (hdrStep == 0)
{
compensation = 1;
hdrStep = 1;
}
val = { 0 };
@ -1897,13 +1897,12 @@ void NdkCamera::onCaptureCompleted(ACameraCaptureSession* session, ACaptureReque
uint8_t aeModeOff = ACAMERA_CONTROL_AE_MODE_OFF;
XYLOG(XYLOG_SEVERITY_INFO, "HDR: Base Exp=%lld ISO=%d", exTime / 1000, sensitivity);
if (exTime != -1 && sensitivity > 0)
{
for (int idx = 0; idx < burstCaptures; idx++)
{
ACaptureRequest_setEntry_u8(requests[idx], ACAMERA_CONTROL_AE_MODE, 1, &aeModeOff);
int64_t expt = exTime * ((idx == 0) ? 1 : (compensation + idx));
int64_t expt = (idx == 0) ? exTime : (exTime * (hdrStep + 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_;

@ -83,7 +83,8 @@ public:
unsigned int wait3ALocked : 3;
unsigned int burstRawCapture : 2;
unsigned int customHdr : 1;
unsigned int reserved : 15;
unsigned int hdrStep : 3;
unsigned int reserved : 12;
int64_t exposureTime;
unsigned int sensitivity;
int compensation;

Loading…
Cancel
Save