[0/4] software-isp: Align GPU cropping and statistics
mbox series

Message ID 20261015194335.287960-1-halfline@gmail.com
Headers show
Series
  • software-isp: Align GPU cropping and statistics
Related show

Message

Ray Strode Oct. 15, 2026, 7:43 p.m. UTC
Hi all,

This series fixes crop positioning and statistics alignment in the EGL
software ISP when producing frames at different output sizes and aspect
ratios.

The GPU projection currently positions the cropped image off-center in
the output, shifting the visible scene. CPU statistics operate on the
full sensor buffer using a window derived from the output dimensions,
so metering can cover a different region from the one displayed.

Patches 1 and 2 center the GPU crop and add a test that compares rendered
output against a centered crop of the native image. Patches 3 and 4 align
statistics with the visible sensor region and add checks for the expected
sample count, symmetry, and pixel inclusion and exclusion at crop
boundaries. The tests cover 8-bit and packed RAW10 input with two Bayer
patterns.

Thanks,
Ray

Ray Strode (4):
  software-isp: Center the GPU image crop
  tests: Validate rendered GPU crop across output sizes
  software-isp: Meter the visible sensor crop
  tests: Validate visible GPU statistics across output sizes

 src/libcamera/software_isp/debayer_egl.cpp |  37 ++--
 src/libcamera/software_isp/debayer_egl.h   |   1 -
 test/meson.build                           |  19 +-
 test/software-isp-gpu-crop.cpp             | 203 +++++++++++++++++++++
 test/software-isp-gpu-stats.cpp            | 188 +++++++++++++++++++
 5 files changed, 433 insertions(+), 15 deletions(-)
 create mode 100644 test/software-isp-gpu-crop.cpp
 create mode 100644 test/software-isp-gpu-stats.cpp