From 41b8d63384964fe228192bebbf21f51153471817 Mon Sep 17 00:00:00 2001 From: Tiago Gomes Date: Tue, 3 Mar 2026 18:40:00 +0100 Subject: [PATCH] Fix another mix between X/Y and Row/Column relationship - This IP uses X for rows and Y for columns. --- vision/L1/include/imgproc/xf_ispstats.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/vision/L1/include/imgproc/xf_ispstats.hpp b/vision/L1/include/imgproc/xf_ispstats.hpp index a82d17a27b..b18788ec8e 100644 --- a/vision/L1/include/imgproc/xf_ispstats.hpp +++ b/vision/L1/include/imgproc/xf_ispstats.hpp @@ -125,8 +125,8 @@ void xfSTATSKernel_bgr(xf::cv::Mat& _src_m // Check if part of zone if ((col >= roi_tlx) && (col <= (roi_brx)) && (row >= roi_tly) && (row <= (roi_bry))) { - int zone_col = int((col - roi_tlx) / zone_width); - int zone_row = int((row - roi_tly) / zone_height); + int zone_col = int((col - roi_tly) / zone_width); + int zone_row = int((row - roi_tlx) / zone_height); zone_idx = (zone_row * zone_col_num) + zone_col; EXTRACT_UPDATE: @@ -292,8 +292,8 @@ void xfSTATSKernel_bayer(xf::cv::Mat& src, // Check if part of zone if ((col >= roi_tlx) && (col <= (roi_brx)) && (row >= roi_tly) && (row <= (roi_bry))) { - int zone_col = int((col - roi_tlx) / zone_width); - int zone_row = int((row - roi_tly) / zone_height); + int zone_col = int((col - roi_tly) / zone_width); + int zone_row = int((row - roi_tlx) / zone_height); zone_idx = (zone_row * zone_col_num) + zone_col; col_idx = col * NPC + 0 + col_incr; @@ -428,8 +428,8 @@ void xfSTATSKernel_gray(xf::cv::Mat& _src_ // Check if part of zone if ((col >= roi_tlx) && (col <= (roi_brx)) && (row >= roi_tly) && (row <= (roi_bry))) { - int zone_col = int((col - roi_tlx) / zone_width); - int zone_row = int((row - roi_tly) / zone_height); + int zone_col = int((col - roi_tly) / zone_width); + int zone_row = int((row - roi_tlx) / zone_height); zone_idx = (zone_row * zone_col_num) + zone_col; EXTRACT_UPDATE: