From 9fd0bbe1cd820ceb7bed88737bcb74d48a8ba35f Mon Sep 17 00:00:00 2001 From: "Andreas R." Date: Thu, 4 Jun 2026 20:55:56 +0200 Subject: [PATCH] V4L2: Apply software binning after frame stacking The non-stacked mono path calls PrimaryCCD.binFrame() to apply software binning, but the stacked path (STACK_MEAN, STACK_ADDITIVE, STACK_TAKE_DARK) writes the full-resolution accumulated frame directly to the CCD buffer without ever calling binFrame(). This causes a stride mismatch when binning is enabled, resulting in horizontal striping artifacts in the output image. Add PrimaryCCD.binFrame() after the stacked frame is written to the output buffer, matching the behavior of the non-stacked path. Reported-by: User on indilib.org forum (IMX415 sensor, indi_v4l2_ccd v1.2) --- drivers/video/v4l2driver.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/v4l2driver.cpp b/drivers/video/v4l2driver.cpp index cf5fe6b50c..a1e9e8aafc 100644 --- a/drivers/video/v4l2driver.cpp +++ b/drivers/video/v4l2driver.cpp @@ -1726,6 +1726,8 @@ void V4L2_Driver::newFrame() guard.unlock(); } } + + PrimaryCCD.binFrame(); } PrimaryCCD.setImageExtension("fits"); }