[0/3] libipa: Fix CameraSensorHelper gain helpers
mbox series

Message ID 20240223155954.4139705-1-kieran.bingham@ideasonboard.com
Headers show
  • libipa: Fix CameraSensorHelper gain helpers
Related show


Kieran Bingham Feb. 23, 2024, 3:59 p.m. UTC
The CameraSensorHelper class provides helpers to simplify the
descriptions of gain models of the sensors.

This provides an implementation of converting a gain-code to a linear
gain value, and a return calculation that converts a linear gain to a
gain code.

It could be expected that a gain value reported by the 'gain(code)'
function should itself generate the same code when called into
'gainCode(gain)' but this is not the case.

This series addresses this by correcting the rounding issue and adding a
test to ensure all CameraSensorHelpers meet this expectation.

Note that the test needs extended as it falsly identifies a failure in
the ar0521 helper.

Kieran Bingham (3):
  ipa: libipa: Allow retrieving the name of a CameraSensorHelperFactory
  test: ipa: libipa: Add CameraSensorHelper Gain Model tests
  libipa: camera_sensor_helper: Fix rounding of gainCode

 src/ipa/libipa/camera_sensor_helper.cpp |  6 +--
 src/ipa/libipa/camera_sensor_helper.h   |  2 +
 test/ipa/camera_sensor_helper.cpp       | 69 +++++++++++++++++++++++++
 test/ipa/meson.build                    |  1 +
 4 files changed, 75 insertions(+), 3 deletions(-)
 create mode 100644 test/ipa/camera_sensor_helper.cpp