mirror of
https://github.com/raspberrypi/userland.git
synced 2025-12-06 04:49:12 +00:00
isp: allow more formats of lens shading tables, including corner-sampled and 16-bit
The old lens_shading parameter structures exist for backwards compatability, but there's a new v2 version which includes a corner_sampled flag (when the grid is sampled on cell corners rather than centrally) and a gain_format, which allows different fractional precision in the uint8_t values, and even a u4.10 16-bit format. Calls through the V4L2 interface to the ISP should use the v2 style of structure.
This commit is contained in:
committed by
popcornmix
parent
106b9ee84d
commit
b420015189
@@ -950,6 +950,34 @@ typedef struct MMAL_PARAMETER_LENS_SHADING_T
|
||||
uint32_t ref_transform;
|
||||
} MMAL_PARAMETER_LENS_SHADING_T;
|
||||
|
||||
typedef enum MMAL_PARAM_LS_GAIN_FORMAT_TYPE_T
|
||||
{
|
||||
MMAL_PARAM_LS_GAIN_FORMAT_TYPE_U0P8_1 = 0,
|
||||
MMAL_PARAM_LS_GAIN_FORMAT_TYPE_U1P7_0 = 1,
|
||||
MMAL_PARAM_LS_GAIN_FORMAT_TYPE_U1P7_1 = 2,
|
||||
MMAL_PARAM_LS_GAIN_FORMAT_TYPE_U2P6_0 = 3,
|
||||
MMAL_PARAM_LS_GAIN_FORMAT_TYPE_U2P6_1 = 4,
|
||||
MMAL_PARAM_LS_GAIN_FORMAT_TYPE_U3P5_0 = 5,
|
||||
MMAL_PARAM_LS_GAIN_FORMAT_TYPE_U3P5_1 = 6,
|
||||
MMAL_PARAM_LS_GAIN_FORMAT_TYPE_U4P10 = 7,
|
||||
MMAL_PARAM_LS_GAIN_FORMAT_TYPE_DUMMY = 0x7FFFFFFF
|
||||
} MMAL_PARAM_LS_GAIN_FORMAT_TYPE_T;
|
||||
|
||||
typedef struct MMAL_PARAMETER_LENS_SHADING_V2_T
|
||||
{
|
||||
MMAL_PARAMETER_HEADER_T hdr;
|
||||
|
||||
MMAL_BOOL_T enabled;
|
||||
uint32_t grid_cell_size;
|
||||
uint32_t grid_width;
|
||||
uint32_t grid_stride;
|
||||
uint32_t grid_height;
|
||||
uint32_t mem_handle_table;
|
||||
uint32_t ref_transform;
|
||||
MMAL_BOOL_T corner_sampled;
|
||||
MMAL_PARAM_LS_GAIN_FORMAT_TYPE_T gain_format;
|
||||
} MMAL_PARAMETER_LENS_SHADING_V2_T;
|
||||
|
||||
/*
|
||||
The mode determines the kind of resize.
|
||||
MMAL_RESIZE_BOX allow the max_width and max_height to set a bounding box into
|
||||
|
||||
@@ -2643,6 +2643,18 @@ nRefTransform should be set to the transform in force when the reference table w
|
||||
captured. This allows correct compensation when the sensor is subsequently used with
|
||||
an alternate transform.
|
||||
*/
|
||||
typedef enum OMX_LSGAINFORMATTYPE {
|
||||
OMX_LSGAINFORMAT_U0P8_1 = 0, /**< Gains are u0.8 format with a base of 1 */
|
||||
OMX_LSGAINFORMAT_U1P7_0 = 1, /**< Gains are u1.7 format with a base of 0 */
|
||||
OMX_LSGAINFORMAT_U1P7_1 = 2, /**< Gains are u1.7 format with a base of 1 */
|
||||
OMX_LSGAINFORMAT_U2P6_0 = 3, /**< Gains are u2.6 format with a base of 0 */
|
||||
OMX_LSGAINFORMAT_U2P6_1 = 4, /**< Gains are u2.6 format with a base of 1 */
|
||||
OMX_LSGAINFORMAT_U3P5_0 = 5, /**< Gains are u3.5 format with a base of 0 */
|
||||
OMX_LSGAINFORMAT_U3P5_1 = 6, /**< Gains are u3.5 format with a base of 1 */
|
||||
OMX_LSGAINFORMAT_U4P10 = 7, /**< Gains are u4.10 format with a base of 0 (note: 16-bit values) */
|
||||
OMX_LSGAINFORMAT_DUMMY = 0x7FFFFFFF
|
||||
} OMX_LSGAINFORMATTYPE;
|
||||
|
||||
typedef struct OMX_PARAM_LENSSHADINGOVERRIDETYPE {
|
||||
OMX_U32 nSize;
|
||||
OMX_VERSIONTYPE nVersion;
|
||||
@@ -2650,10 +2662,12 @@ typedef struct OMX_PARAM_LENSSHADINGOVERRIDETYPE {
|
||||
OMX_BOOL bEnabled; /**< Enable the override grid */
|
||||
OMX_U32 nGridCellSize; /**< size of each grid element. Assumes square grid */
|
||||
OMX_U32 nWidth; /**< grid width */
|
||||
OMX_U32 nStride; /**< grid stride (allows for padding) */
|
||||
OMX_U32 nStride; /**< grid stride (allows for padding) in *samples* (not bytes) */
|
||||
OMX_U32 nHeight; /**< grid height */
|
||||
OMX_U32 nMemHandleTable; /**< Handle for grid */
|
||||
OMX_U32 nRefTransform; /**< Reference transform taken from raw header */
|
||||
OMX_BOOL bCornerSampled; /**< Are grids sampled at cell corners, or centres */
|
||||
OMX_LSGAINFORMATTYPE eLsGainFormat; /**< Format of the gain tables */
|
||||
} OMX_PARAM_LENSSHADINGOVERRIDETYPE;
|
||||
|
||||
/* OMX_IndexConfigBrcmPowerMonitor: Deprecated.*/
|
||||
|
||||
Reference in New Issue
Block a user