@@ -173,8 +173,8 @@ status_t OpcodeListBuilder::addBayerGainMapsForMetadata(uint32_t lsmWidth,
173
173
174
174
status_t err = addGainMap (/* top*/ redTop,
175
175
/* left*/ redLeft,
176
- /* bottom*/ activeAreaHeight - 1 ,
177
- /* right*/ activeAreaWidth - 1 ,
176
+ /* bottom*/ activeAreaHeight,
177
+ /* right*/ activeAreaWidth,
178
178
/* plane*/ 0 ,
179
179
/* planes*/ 1 ,
180
180
/* rowPitch*/ 2 ,
@@ -191,8 +191,8 @@ status_t OpcodeListBuilder::addBayerGainMapsForMetadata(uint32_t lsmWidth,
191
191
192
192
err = addGainMap (/* top*/ greenEvenTop,
193
193
/* left*/ greenEvenLeft,
194
- /* bottom*/ activeAreaHeight - 1 ,
195
- /* right*/ activeAreaWidth - 1 ,
194
+ /* bottom*/ activeAreaHeight,
195
+ /* right*/ activeAreaWidth,
196
196
/* plane*/ 0 ,
197
197
/* planes*/ 1 ,
198
198
/* rowPitch*/ 2 ,
@@ -209,8 +209,8 @@ status_t OpcodeListBuilder::addBayerGainMapsForMetadata(uint32_t lsmWidth,
209
209
210
210
err = addGainMap (/* top*/ greenOddTop,
211
211
/* left*/ greenOddLeft,
212
- /* bottom*/ activeAreaHeight - 1 ,
213
- /* right*/ activeAreaWidth - 1 ,
212
+ /* bottom*/ activeAreaHeight,
213
+ /* right*/ activeAreaWidth,
214
214
/* plane*/ 0 ,
215
215
/* planes*/ 1 ,
216
216
/* rowPitch*/ 2 ,
@@ -227,8 +227,8 @@ status_t OpcodeListBuilder::addBayerGainMapsForMetadata(uint32_t lsmWidth,
227
227
228
228
err = addGainMap (/* top*/ blueTop,
229
229
/* left*/ blueLeft,
230
- /* bottom*/ activeAreaHeight - 1 ,
231
- /* right*/ activeAreaWidth - 1 ,
230
+ /* bottom*/ activeAreaHeight,
231
+ /* right*/ activeAreaWidth,
232
232
/* plane*/ 0 ,
233
233
/* planes*/ 1 ,
234
234
/* rowPitch*/ 2 ,
@@ -265,8 +265,8 @@ status_t OpcodeListBuilder::addMonochromeGainMapsForMetadata(uint32_t lsmWidth,
265
265
266
266
status_t err = addGainMap (/* top*/ 0 ,
267
267
/* left*/ 0 ,
268
- /* bottom*/ activeAreaHeight - 1 ,
269
- /* right*/ activeAreaWidth - 1 ,
268
+ /* bottom*/ activeAreaHeight,
269
+ /* right*/ activeAreaWidth,
270
270
/* plane*/ 0 ,
271
271
/* planes*/ 1 ,
272
272
/* rowPitch*/ 1 ,
@@ -364,8 +364,8 @@ status_t OpcodeListBuilder::addWarpRectilinearForMetadata(const float* kCoeffs,
364
364
return BAD_VALUE;
365
365
}
366
366
367
- double normalizedOCX = opticalCenterX / static_cast <double >(activeArrayWidth - 1 );
368
- double normalizedOCY = opticalCenterY / static_cast <double >(activeArrayHeight - 1 );
367
+ double normalizedOCX = opticalCenterX / static_cast <double >(activeArrayWidth);
368
+ double normalizedOCY = opticalCenterY / static_cast <double >(activeArrayHeight);
369
369
370
370
normalizedOCX = CLAMP (normalizedOCX, 0 , 1 );
371
371
normalizedOCY = CLAMP (normalizedOCY, 0 , 1 );
0 commit comments