From 9167e3dcf612a13426a85f2753b6acd0251e7385 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Thu, 20 Feb 2025 19:25:03 -0800 Subject: [PATCH] Revert "camerad: fix incorrect row offset calculation in calculate_exposure_value (#34634)" This reverts commit 29414458499562bdf2736f3e0b0b95b89be5867f. --- system/camerad/cameras/camera_common.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/camerad/cameras/camera_common.cc b/system/camerad/cameras/camera_common.cc index 1d7b6ada24..f63a48b733 100644 --- a/system/camerad/cameras/camera_common.cc +++ b/system/camerad/cameras/camera_common.cc @@ -100,7 +100,7 @@ float calculate_exposure_value(const CameraBuf *b, Rect ae_xywh, int x_skip, int unsigned int lum_total = 0; for (int y = ae_xywh.y; y < ae_xywh.y + ae_xywh.h; y += y_skip) { for (int x = ae_xywh.x; x < ae_xywh.x + ae_xywh.w; x += x_skip) { - uint8_t lum = pix_ptr[(y * b->cur_yuv_buf->stride) + x]; + uint8_t lum = pix_ptr[(y * b->out_img_width) + x]; lum_binning[lum]++; lum_total += 1; }