V4L2_META_FMT_IPU3_PARAMS ('ip3p'), V4L2_META_FMT_IPU3_3A ('ip3s')
3A statistics #
The IPU3 ImgU 3A statistics accelerators collect different statistics over an input Bayer frame. Those statistics are obtained from the "ipu3-imgu [01] 3a stat" metadata capture video nodes, using the v4l2_meta_format interface. They are formatted as described by the ipu3_uapi_stats_3a structure.
The statistics collected are AWB (Auto-white balance) RGBS (Red, Green, Blue and Saturation measure) cells, AWB filter response, AF (Auto-focus) filter response, and AE (Auto-exposure) histogram.
The struct ipu3_uapi_4a_config saves all configurable parameters.
;
Pipeline parameters #
The pipeline parameters are passed to the "ipu3-imgu [01] parameters" metadata output video nodes, using the v4l2_meta_format interface. They are formatted as described by the ipu3_uapi_params structure.
Both 3A statistics and pipeline parameters described here are closely tied to the underlying camera sub-system (CSS) APIs. They are usually consumed and produced by dedicated user space libraries that comprise the important tuning tools, thus freeing the developers from being bothered with the low level hardware and algorithm details.
;
Intel IPU3 ImgU uAPI data types #
struct ipu3_uapi_grid_config #
Grid plane config
Definition
;
Members
width: Grid horizontal dimensions, in number of grid blocks(cells). For AWB, the range is (16, 80). For AF/AE, the range is (16, 32).height: Grid vertical dimensions, in number of grid cells. For AWB, the range is (16, 60). For AF/AE, the range is (16, 24).block_width_log2: Log2 of the width of each cell in pixels. For AWB, the range is [3, 6]. For AF/AE, the range is [3, 7].block_height_log2: Log2 of the height of each cell in pixels. For AWB, the range is [3, 6]. For AF/AE, the range is [3, 7].height_per_slice: The number of blocks in vertical axis per slice. Default 2.x_start: X value of top left corner of Region of Interest(ROI).y_start: Y value of top left corner of ROIx_end: X value of bottom right corner of ROIy_end: Y value of bottom right corner of ROI
Description
Due to the size of total amount of collected data, most statistics create a grid-based output, and the data is then divided into "slices".
struct ipu3_uapi_awb_set_item #
Memory layout for each cell in AWB
Definition
;
Members
Gr_avg: Green average for red lines in the cell.R_avg: Red average in the cell.B_avg: Blue average in the cell.Gb_avg: Green average for blue lines in the cell.sat_ratio: Percentage of pixels over the thresholds specified in ipu3_uapi_awb_config_s, coded from 0 to 255.padding0: Unused byte for padding.padding1: Unused byte for padding.padding2: Unused byte for padding.
struct ipu3_uapi_awb_raw_buffer #
AWB raw buffer
Definition
;
Members
meta_data: buffer to hold auto white balance meta data which is the average values for each color channel.
struct ipu3_uapi_awb_config_s #
AWB config
Definition
;
Members
rgbs_thr_gr: gr threshold value.rgbs_thr_r: Red threshold value.rgbs_thr_gb: gb threshold value.rgbs_thr_b: Blue threshold value.grid:ipu3_uapi_grid_config, the default grid resolution is 16x16 cells.
Description
The threshold is a saturation measure range [0, 8191], 8191 is default. Values over threshold may be optionally rejected for averaging.
struct ipu3_uapi_awb_config #
AWB config wrapper
Definition
;
Members
config: config for auto white balance as defined byipu3_uapi_awb_config_s
struct ipu3_uapi_ae_raw_buffer #
AE global weighted histogram
Definition
;
Members
vals: Sum of IPU3_UAPI_AE_COLORS in cell
Description
Each histogram contains IPU3_UAPI_AE_BINS bins. Each bin has 24 bit unsigned for counting the number of the pixel.
struct ipu3_uapi_ae_raw_buffer_aligned #
AE raw buffer
Definition
;
Members
buff:ipu3_uapi_ae_raw_bufferto hold full frame meta data.
struct ipu3_uapi_ae_grid_config #
AE weight grid
Definition
;
Members
width: Grid horizontal dimensions. Value: [16, 32], default 16.height: Grid vertical dimensions. Value: [16, 24], default 16.block_width_log2: Log2 of the width of the grid cell, value: [3, 7].block_height_log2: Log2 of the height of the grid cell, value: [3, 7]. default is 3 (cell size 8x8), 4 cell per grid.reserved0: reservedae_en: 0: does not write toipu3_uapi_ae_raw_buffer_alignedarray, 1: write normally.rst_hist_array: write 1 to trigger histogram array reset.done_rst_hist_array: flag for histogram array reset done.x_start: X value of top left corner of ROI, default 0.y_start: Y value of top left corner of ROI, default 0.x_end: X value of bottom right corner of ROIy_end: Y value of bottom right corner of ROI
Description
The AE block accumulates 4 global weighted histograms(R, G, B, Y) over
a defined ROI within the frame. The contribution of each pixel into the
histogram, defined by ipu3_uapi_ae_weight_elem LUT, is indexed by a grid.
struct ipu3_uapi_ae_weight_elem #
AE weights LUT
Definition
;
Members
cell0: weighted histogram grid value.cell1: weighted histogram grid value.cell2: weighted histogram grid value.cell3: weighted histogram grid value.cell4: weighted histogram grid value.cell5: weighted histogram grid value.cell6: weighted histogram grid value.cell7: weighted histogram grid value.
Description
Use weighted grid value to give a different contribution factor to each cell. Precision u4, range [0, 15].
struct ipu3_uapi_ae_ccm #
AE coefficients for WB and CCM
Definition
;
Members
gain_gr: WB gain factor for the gr channels. Default 256.gain_r: WB gain factor for the r channel. Default 256.gain_b: WB gain factor for the b channel. Default 256.gain_gb: WB gain factor for the gb channels. Default 256.mat: 4x4 matrix that transforms Bayer quad output from WB to RGB+Y.
Description
- Default: 128, 0, 0, 0, 0, 128, 0, 0, 0, 0, 128, 0, 0, 0, 0, 128,
As part of the raw frame pre-process stage, the WB and color conversion need to be applied to expose the impact of these gain operations.
struct ipu3_uapi_ae_config #
AE config
Definition
;
Members
grid_cfg: config for auto exposure statistics grid. See structipu3_uapi_ae_grid_config, as Imgu did not support output auto exposure statistics, so user can ignore this configuration and use the RGB table in auto-whitebalance statistics instead.weights:IPU3_UAPI_AE_WEIGHTSis based on 32x24 blocks in the grid. Each grid cell has a corresponding value in weights LUT called grid value, global histogram is updated based on grid value and pixel value.ae_ccm: Color convert matrix pre-processing block.
Description
Calculate AE grid from image resolution, resample ae weights.
struct ipu3_uapi_af_filter_config #
AF 2D filter for contrast measurements
Definition
;
Members
y1_coeff_0: filter Y1, structure: 3x11, support both symmetry and anti-symmetry type. A12 is center, A1-A11 are neighbours. for analyzing low frequency content, used to calculate sum of gradients in x direction.y1_coeff_0.a1: filter1 coefficients A1, u8, default 0.y1_coeff_0.a2: filter1 coefficients A2, u8, default 0.y1_coeff_0.a3: filter1 coefficients A3, u8, default 0.y1_coeff_0.a4: filter1 coefficients A4, u8, default 0.y1_coeff_1: Structy1_coeff_1.a5: filter1 coefficients A5, u8, default 0.y1_coeff_1.a6: filter1 coefficients A6, u8, default 0.y1_coeff_1.a7: filter1 coefficients A7, u8, default 0.y1_coeff_1.a8: filter1 coefficients A8, u8, default 0.y1_coeff_2: Structy1_coeff_2.a9: filter1 coefficients A9, u8, default 0.y1_coeff_2.a10: filter1 coefficients A10, u8, default 0.y1_coeff_2.a11: filter1 coefficients A11, u8, default 0.y1_coeff_2.a12: filter1 coefficients A12, u8, default 128.y1_sign_vec: Each bit corresponds to one coefficient sign bit, 0: positive, 1: negative, default 0.y2_coeff_0: Y2, same structure as Y1. For analyzing high frequency content.y2_coeff_0.a1: filter2 coefficients A1, u8, default 0.y2_coeff_0.a2: filter2 coefficients A2, u8, default 0.y2_coeff_0.a3: filter2 coefficients A3, u8, default 0.y2_coeff_0.a4: filter2 coefficients A4, u8, default 0.y2_coeff_1: Structy2_coeff_1.a5: filter2 coefficients A5, u8, default 0.y2_coeff_1.a6: filter2 coefficients A6, u8, default 0.y2_coeff_1.a7: filter2 coefficients A7, u8, default 0.y2_coeff_1.a8: filter2 coefficients A8, u8, default 0.y2_coeff_2: Structy2_coeff_2.a9: filter1 coefficients A9, u8, default 0.y2_coeff_2.a10: filter1 coefficients A10, u8, default 0.y2_coeff_2.a11: filter1 coefficients A11, u8, default 0.y2_coeff_2.a12: filter1 coefficients A12, u8, default 128.y2_sign_vec: Each bit corresponds to one coefficient sign bit, 0: positive, 1: negative, default 0.y_calc: Pre-processing that converts Bayer quad to RGB+Y values to be used for building histogram. Range [0, 32], default 8.y_calc.y_gen_rate_gr: Contribution ratio Gr for Yy_calc.y_gen_rate_r: Contribution ratio R for Yy_calc.y_gen_rate_b: Contribution ratio B for Yy_calc.y_gen_rate_gb: Contribution ratio Gb for Ynf: The shift right value that should be applied during the Y1/Y2 filter to make sure the total memory needed is 2 bytes per grid cell.nf.reserved0: reservednf.y1_nf: Normalization factor for the convolution coeffs of y1, should be log2 of the sum of the abs values of the filter coeffs, default 7 (2^7 = 128).nf.reserved1: reservednf.y2_nf: Normalization factor for y2, should be log2 of the sum of the abs values of the filter coeffs.nf.reserved2: reserved
Description
Rule: y_gen_rate_gr + y_gen_rate_r + y_gen_rate_b + y_gen_rate_gb = 32 A single Y is calculated based on sum of Gr/R/B/Gb based on their contribution ratio.
struct ipu3_uapi_af_raw_buffer #
AF meta data
Definition
;
Members
y_table: Each color component will be convolved separately with filter1 and filter2 and the result will be summed out and averaged for each cell.
struct ipu3_uapi_af_config_s #
AF config
Definition
;
Members
filter_config: AF uses Y1 and Y2 filters as configured inipu3_uapi_af_filter_configpadding: paddingsgrid_cfg: Seeipu3_uapi_grid_config, default resolution 16x16. Use large grid size for large image and vice versa.
struct ipu3_uapi_awb_fr_raw_buffer #
AWB filter response meta data
Definition
;
Members
meta_data: Statistics output on the grid after convolving with 1D filter.
struct ipu3_uapi_awb_fr_config_s #
AWB filter response config
Definition
;
Members
grid_cfg: grid config, default 16x16.bayer_coeff: 1D Filter 1x11 center symmetry/anti-symmetry. coefficients defaults { 0, 0, 0, 0, 0, 128 }. Applied on whole image for each Bayer channel separately by a weighted sum of its 11x1 neighbors.reserved1: reservedbayer_sign: sign of filter coefficients, default 0.bayer_nf: normalization factor for the convolution coeffs, to make sure total memory needed is within pre-determined range. NF should be the log2 of the sum of the abs values of the filter coeffs, range [7, 14], default 7.reserved2: reserved
struct ipu3_uapi_4a_config #
4A config
Definition
;
Members
awb_config:ipu3_uapi_awb_config_s, default resolution 16x16ae_grd_config: auto exposure statisticsipu3_uapi_ae_grid_configpadding: paddingsaf_config: auto focus configipu3_uapi_af_config_sawb_fr_config:ipu3_uapi_awb_fr_config_s, default resolution 16x16
struct ipu3_uapi_bubble_info #
Bubble info for host side debugging
Definition
;
Members
num_of_stripes: A single frame is divided into several parts called stripes due to limitation on line buffer memory. The separation between the stripes is vertical. Each such stripe is processed as a single frame by the ISP pipe.padding: padding bytes.num_sets: number of sets.padding1: padding bytes.size_of_set: set size.padding2: padding bytes.bubble_size: is the amount of padding in the bubble expressed in "sets".padding3: padding bytes.
struct ipu3_uapi_ff_status #
Enable bits for each 3A fixed function
Definition
;
Members
awb_en: auto white balance enablepadding: padding configae_en: auto exposure enablepadding1: padding configaf_en: auto focus enablepadding2: padding configawb_fr_en: awb filter response enable bitpadding3: padding config
struct ipu3_uapi_stats_3a #
3A statistics
Definition
;
Members
awb_raw_buffer: auto white balance meta dataipu3_uapi_awb_raw_bufferae_raw_buffer: auto exposure raw dataipu3_uapi_ae_raw_buffer_alignedcurrent Imgu does not output the auto exposure statistics to ae_raw_buffer, the user such as 3A algorithm can use the RGB table inipu3_uapi_awb_raw_bufferto do auto-exposure.af_raw_buffer:ipu3_uapi_af_raw_bufferfor auto focus meta dataawb_fr_raw_buffer: value as specified byipu3_uapi_awb_fr_raw_bufferstats_4a_config: 4a statistics config as defined byipu3_uapi_4a_config.ae_join_buffers: 1 to use ae_raw_buffer.padding: padding configstats_3a_bubble_per_stripe: aipu3_uapi_stats_3a_bubble_info_per_stripestats_3a_status: 3a statistics status set inipu3_uapi_ff_status
struct ipu3_uapi_bnr_static_config_wb_gains_config #
White balance gains
Definition
;
Members
gr: white balance gain for Gr channel.r: white balance gain for R channel.b: white balance gain for B channel.gb: white balance gain for Gb channel.
Description
For BNR parameters WB gain factor for the three channels [Ggr, Ggb, Gb, Gr]. Their precision is U3.13 and the range is (0, 8) and the actual gain is Gx + 1, it is typically Gx = 1.
Pout = {Pin * (1 + Gx)}.
struct ipu3_uapi_bnr_static_config_wb_gains_thr_config #
Threshold config
Definition
;
Members
gr: white balance threshold gain for Gr channel.r: white balance threshold gain for R channel.b: white balance threshold gain for B channel.gb: white balance threshold gain for Gb channel.
Description
Defines the threshold that specifies how different a defect pixel can be from its neighbors.(used by dynamic defect pixel correction sub block) Precision u4.4 range [0, 8].
struct ipu3_uapi_bnr_static_config_thr_coeffs_config #
Noise model coefficients that controls noise threshold
Definition
;
Members
cf: Free coefficient for threshold calculation, range [0, 8191], default 0.reserved0: reservedcg: Gain coefficient for threshold calculation, [0, 31], default 8.ci: Intensity coefficient for threshold calculation. range [0, 0x1f] default 6. format: u3.2 (3 most significant bits represent whole number, 2 least significant bits represent the fractional part with each count representing 0.25) e.g. 6 in binary format is 00110, that translates to 1.5reserved1: reservedr_nf: Normalization shift value for r^2 calculation, range [12, 20] where r is a radius of pixel [row, col] from centor of sensor. default 14.
Description
Threshold used to distinguish between noise and details.
struct ipu3_uapi_bnr_static_config_thr_ctrl_shd_config #
Shading config
Definition
;
Members
gr: Coefficient defines lens shading gain approximation for gr channelr: Coefficient defines lens shading gain approximation for r channelb: Coefficient defines lens shading gain approximation for b channelgb: Coefficient defines lens shading gain approximation for gb channel
Description
Parameters for noise model (NM) adaptation of BNR due to shading correction. All above have precision of u3.3, default to 0.
struct ipu3_uapi_bnr_static_config_opt_center_config #
Optical center config
Definition
;
Members
x_reset: Reset value of X (col start - X center). Precision s12.0.reserved0: reservedy_reset: Reset value of Y (row start - Y center). Precision s12.0.reserved2: reserved
Description
Distance from corner to optical center for NM adaptation due to shading correction (should be calculated based on shading tables)
struct ipu3_uapi_bnr_static_config_lut_config #
BNR square root lookup table
Definition
;
Members
values: pre-calculated values of square root function.
Description
LUT implementation of square root operation.
struct ipu3_uapi_bnr_static_config_bp_ctrl_config #
Detect bad pixels (bp)
Definition
;
Members
bp_thr_gain: Defines the threshold that specifies how different a defect pixel can be from its neighbors. Threshold is dependent on de-noise threshold calculated by algorithm. Range [4, 31], default 4.reserved0: reserveddefect_mode: Mode of addressed defect pixels, 0 - single defect pixel is expected, 1 - 2 adjacent defect pixels are expected, default 1.bp_gain: Defines how 2nd derivation that passes through a defect pixel is different from 2nd derivations that pass through neighbor pixels. u4.2, range [0, 256], default 8.reserved1: reservedw0_coeff: Blending coefficient of defect pixel correction. Precision u4, range [0, 8], default 8.reserved2: reservedw1_coeff: Enable influence of incorrect defect pixel correction to be avoided. Precision u4, range [1, 8], default 8.reserved3: reserved
struct ipu3_uapi_bnr_static_config_dn_detect_ctrl_config #
Denoising config
Definition
;
Members
alpha: Weight of central element of smoothing filter.beta: Weight of peripheral elements of smoothing filter, default 4.gamma: Weight of diagonal elements of smoothing filter, default 4.reserved0: reservedmax_inf: Maximum increase of peripheral or diagonal element influence relative to the pre-defined value range: [0x5, 0xa]reserved1: reservedgd_enable: Green disparity enable control, 0 - disable, 1 - enable.bpc_enable: Bad pixel correction enable control, 0 - disable, 1 - enable.bnr_enable: Bayer noise removal enable control, 0 - disable, 1 - enable.ff_enable: Fixed function enable, 0 - disable, 1 - enable.reserved2: reserved
Description
-
beta and gamma parameter define the strength of the noise removal filter.
All above has precision u0.4, range [0, 0xf] format: u0.4 (no / zero bits represent whole number, 4 bits represent the fractional part with each count representing 0.0625) e.g. 0xf translates to 0.0625x15 = 0.9375
struct ipu3_uapi_bnr_static_config_opt_center_sqr_config #
BNR optical square
Definition
;
Members
x_sqr_reset: Reset value of X^2.y_sqr_reset: Reset value of Y^2.
Description
Please note:
- X and Y ref to
ipu3_uapi_bnr_static_config_opt_center_config - Both structs are used in threshold formula to calculate r^2, where r is a radius of pixel [row, col] from centor of sensor.
struct ipu3_uapi_bnr_static_config #
BNR static config
Definition
;
Members
wb_gains: white balance gainsipu3_uapi_bnr_static_config_wb_gains_configwb_gains_thr: white balance gains threshold as defined byipu3_uapi_bnr_static_config_wb_gains_thr_configthr_coeffs: coefficients of thresholdipu3_uapi_bnr_static_config_thr_coeffs_configthr_ctrl_shd: control of shading thresholdipu3_uapi_bnr_static_config_thr_ctrl_shd_configopt_center: optical centeripu3_uapi_bnr_static_config_opt_center_configlut: lookup tableipu3_uapi_bnr_static_config_lut_configbp_ctrl: detect and remove bad pixels as defined in structipu3_uapi_bnr_static_config_bp_ctrl_configdn_detect_ctrl: detect and remove noise.ipu3_uapi_bnr_static_config_dn_detect_ctrl_configcolumn_size: The number of pixels in column.opt_center_sqr: Reset value of r^2 to optical center, seeipu3_uapi_bnr_static_config_opt_center_sqr_config.
Description
Above parameters and opt_center_sqr are used for white balance and shading.
struct ipu3_uapi_bnr_static_config_green_disparity #
Correct green disparity
Definition
;
Members
gd_red: Shading gain coeff for gr disparity level in bright red region. Precision u0.6, default 4(0.0625).reserved0: reservedgd_green: Shading gain coeff for gr disparity level in bright green region. Precision u0.6, default 4(0.0625).reserved1: reservedgd_blue: Shading gain coeff for gr disparity level in bright blue region. Precision u0.6, default 4(0.0625).reserved2: reservedgd_black: Maximal green disparity level in dark region (stronger disparity assumed to be image detail). Precision u14, default 80.reserved3: reservedgd_shading: Change maximal green disparity level according to square distance from image center.reserved4: reservedgd_support: Lower bound for the number of second green color pixels in current pixel neighborhood with less than threshold difference from it.reserved5: reservedgd_clip: Turn green disparity clip on/off, [0, 1], default 1.gd_central_weight: Central pixel weight in 9 pixels weighted sum.
Description
The shading gain coeff of red, green, blue and black are used to calculate threshold given a pixel's color value and its coordinates in the image.
struct ipu3_uapi_dm_config #
De-mosaic parameters
Definition
;
Members
dm_en: de-mosaic enable.ch_ar_en: Checker artifacts removal enable flag. Default 0.fcc_en: False color correction (FCC) enable flag. Default 0.reserved0: reservedframe_width: do not caregamma_sc: Sharpening coefficient (coefficient of 2-d derivation of complementary color in Hamilton-Adams interpolation). u5, range [0, 31], default 8.reserved1: reservedlc_ctrl: Parameter that controls weights of Chroma Homogeneity metric in calculation of final homogeneity metric. u5, range [0, 31], default 7.reserved2: reservedcr_param1: First parameter that defines Checker artifact removal feature gain. Precision u5, range [0, 31], default 8.reserved3: reservedcr_param2: Second parameter that defines Checker artifact removal feature gain. Precision u5, range [0, 31], default 8.reserved4: reservedcoring_param: Defines power of false color correction operation. low for preserving edge colors, high for preserving gray edge artifacts. Precision u1.4, range [0, 1.9375], default 4 (0.25).reserved5: reserved
Description
The demosaic fixed function block is responsible to covert Bayer(mosaiced) images into color images based on demosaicing algorithm.
struct ipu3_uapi_ccm_mat_config #
Color correction matrix
Definition
;
Members
coeff_m11: CCM 3x3 coefficient, range [-65536, 65535]coeff_m12: CCM 3x3 coefficient, range [-8192, 8191]coeff_m13: CCM 3x3 coefficient, range [-32768, 32767]coeff_o_r: Bias 3x1 coefficient, range [-8191, 8181]coeff_m21: CCM 3x3 coefficient, range [-32767, 32767]coeff_m22: CCM 3x3 coefficient, range [-8192, 8191]coeff_m23: CCM 3x3 coefficient, range [-32768, 32767]coeff_o_g: Bias 3x1 coefficient, range [-8191, 8181]coeff_m31: CCM 3x3 coefficient, range [-32768, 32767]coeff_m32: CCM 3x3 coefficient, range [-8192, 8191]coeff_m33: CCM 3x3 coefficient, range [-32768, 32767]coeff_o_b: Bias 3x1 coefficient, range [-8191, 8181]
Description
Transform sensor specific color space to standard sRGB by applying 3x3 matrix and adding a bias vector O. The transformation is basically a rotation and translation in the 3-dimensional color spaces. Here are the defaults:
9775, -2671, 1087, 0 -1071, 8303, 815, 0 -23, -7887, 16103, 0
struct ipu3_uapi_gamma_corr_ctrl #
Gamma correction
Definition
;
Members
enable: gamma correction enable.reserved: reserved
struct ipu3_uapi_gamma_corr_lut #
Per-pixel tone mapping implemented as LUT.
Definition
;
Members
lut: 256 tabulated values of the gamma function. LUT[1].. LUT[256] format u13.0, range [0, 8191].
Description
The tone mapping operation is done by a Piece wise linear graph that is implemented as a lookup table(LUT). The pixel component input intensity is the X-axis of the graph which is the table entry.
struct ipu3_uapi_gamma_config #
Gamma config
Definition
;
Members
gc_ctrl: control of gamma correctionipu3_uapi_gamma_corr_ctrlgc_lut: lookup table of gamma correctionipu3_uapi_gamma_corr_lut
struct ipu3_uapi_csc_mat_config #
Color space conversion matrix config
Definition
;
Members
coeff_c11: Conversion matrix value, format s0.14, range [-16384, 16383].coeff_c12: Conversion matrix value, format s0.14, range [-8192, 8191].coeff_c13: Conversion matrix value, format s0.14, range [-16384, 16383].coeff_b1: Bias 3x1 coefficient, s13.0 range [-8192, 8191].coeff_c21: Conversion matrix value, format s0.14, range [-16384, 16383].coeff_c22: Conversion matrix value, format s0.14, range [-8192, 8191].coeff_c23: Conversion matrix value, format s0.14, range [-16384, 16383].coeff_b2: Bias 3x1 coefficient, s13.0 range [-8192, 8191].coeff_c31: Conversion matrix value, format s0.14, range [-16384, 16383].coeff_c32: Conversion matrix value, format s0.14, range [-8192, 8191].coeff_c33: Conversion matrix value, format s0.14, range [-16384, 16383].coeff_b3: Bias 3x1 coefficient, s13.0 range [-8192, 8191].
Description
To transform each pixel from RGB to YUV (Y - brightness/luminance, UV -chroma) by applying the pixel's values by a 3x3 matrix and adding an optional bias 3x1 vector. Here are the default values for the matrix:
4898, 9617, 1867, 0, -2410, -4732, 7143, 0, 10076, -8437, -1638, 0,
(i.e. for real number 0.299, 0.299 * 2^14 becomes 4898.)
struct ipu3_uapi_cds_params #
Chroma down-scaling
Definition
;
Members
ds_c00: range [0, 3]ds_c01: range [0, 3]ds_c02: range [0, 3]ds_c03: range [0, 3]ds_c10: range [0, 3]ds_c11: range [0, 3]ds_c12: range [0, 3]ds_c13: range [0, 3]ds_nf: Normalization factor for Chroma output downscaling filter, range 0,4, default 2.reserved0: reservedcsc_en: Color space conversion enableuv_bin_output: 0: output YUV 4.2.0, 1: output YUV 4.2.2(default).reserved1: reserved
Description
- In case user does not provide, above 4x2 filter will use following defaults: 1, 3, 3, 1, 1, 3, 3, 1,
struct ipu3_uapi_shd_grid_config #
Bayer shading(darkening) correction
Definition
;
Members
width: Grid horizontal dimensions, u8, [8, 128], default 73height: Grid vertical dimensions, u8, [8, 128], default 56block_width_log2: Log2 of the width of the grid cell in pixel count u4, [0, 15], default value 5.reserved0: reservedblock_height_log2: Log2 of the height of the grid cell in pixel count u4, [0, 15], default value 6.reserved1: reservedgrid_height_per_slice: SHD_MAX_CELLS_PER_SET/width. (with SHD_MAX_CELLS_PER_SET = 146).x_start: X value of top left corner of sensor relative to ROI s13, [-4096, 0], default 0, only negative values.y_start: Y value of top left corner of sensor relative to ROI s13, [-4096, 0], default 0, only negative values.
struct ipu3_uapi_shd_general_config #
Shading general config
Definition
;
Members
init_set_vrt_offst_ul: set vertical offset, y_start >> block_height_log2 % grid_height_per_slice.shd_enable: shading enable.gain_factor: Gain factor. Shift calculated anti shading value. Precision u2. 0x0 - gain factor [1, 5], means no shift interpolated value. 0x1 - gain factor [1, 9], means shift interpolated by 1. 0x2 - gain factor [1, 17], means shift interpolated by 2.reserved: reserved
Description
Correction is performed by multiplying a gain factor for each of the 4 Bayer channels as a function of the pixel location in the sensor.
struct ipu3_uapi_shd_black_level_config #
Black level correction
Definition
;
Members
bl_r: Bios values for green red. s11 range [-2048, 2047].bl_gr: Bios values for green blue. s11 range [-2048, 2047].bl_gb: Bios values for red. s11 range [-2048, 2047].bl_b: Bios values for blue. s11 range [-2048, 2047].
struct ipu3_uapi_shd_config_static #
Shading config static
Definition
;
Members
grid: shading grid configipu3_uapi_shd_grid_configgeneral: shading general configipu3_uapi_shd_general_configblack_level: black level config for shading correction as defined byipu3_uapi_shd_black_level_config
struct ipu3_uapi_shd_lut #
Shading gain factor lookup table.
Definition
;
Members
sets: arraysets.r_and_gr: Red and GreenR Lookup table.sets.r_and_gr.r: Red shading factor.sets.r_and_gr.gr: GreenR shading factor.sets.reserved1: reservedsets.gb_and_b: GreenB and Blue Lookup table.sets.gb_and_b.gb: GreenB shading factor.sets.gb_and_b.b: Blue shading factor.sets.reserved2: reserved
Description
Map to shading correction LUT register set.
struct ipu3_uapi_shd_config #
Shading config
Definition
;
Members
shd: shading static config, seeipu3_uapi_shd_config_staticshd_lut: shading lookup tableipu3_uapi_shd_lut
struct ipu3_uapi_iefd_cux2 #
IEFd Config Unit 2 parameters
Definition
;
Members
x0: X0 point of Config Unit, u9.0, default 0.x1: X1 point of Config Unit, u9.0, default 0.a01: Slope A of Config Unit, s4.4, default 0.b01: Slope B, always 0.
Description
Calculate weight for blending directed and non-directed denoise elements
Note
Each instance of Config Unit needs X coordinate of n points and slope A factor between points calculated by driver based on calibration parameters.
All CU inputs are unsigned, they will be converted to signed when written
to register, i.e. a01 will be written to 9 bit register in s4.4 format.
The data precision s4.4 means 4 bits for integer parts and 4 bits for the
fractional part, the first bit indicates positive or negative value.
For userspace software (commonly the imaging library), the computation for
the CU slope values should be based on the slope resolution 1/16 (binary
0.0001 - the minimal interval value), the slope value range is [-256, +255].
This applies to ipu3_uapi_iefd_cux6_ed, ipu3_uapi_iefd_cux2_1,
ipu3_uapi_iefd_cux2_1, ipu3_uapi_iefd_cux4 and ipu3_uapi_iefd_cux6_rad.
struct ipu3_uapi_iefd_cux6_ed #
Calculate power of non-directed sharpening element, Config Unit 6 for edge detail (ED).
Definition
;
Members
x0: X coordinate of point 0, u9.0, default 0.x1: X coordinate of point 1, u9.0, default 0.x2: X coordinate of point 2, u9.0, default 0.reserved0: reservedx3: X coordinate of point 3, u9.0, default 0.x4: X coordinate of point 4, u9.0, default 0.x5: X coordinate of point 5, u9.0, default 0.reserved1: reserveda01: slope A points 01, s4.4, default 0.a12: slope A points 12, s4.4, default 0.a23: slope A points 23, s4.4, default 0.reserved2: reserveda34: slope A points 34, s4.4, default 0.a45: slope A points 45, s4.4, default 0.reserved3: reservedb01: slope B points 01, s4.4, default 0.b12: slope B points 12, s4.4, default 0.b23: slope B points 23, s4.4, default 0.reserved4: reservedb34: slope B points 34, s4.4, default 0.b45: slope B points 45, s4.4, default 0.reserved5: reserved.
struct ipu3_uapi_iefd_cux2_1 #
Calculate power of non-directed denoise element apply.
Definition
;
Members
x0: X0 point of Config Unit, u9.0, default 0.x1: X1 point of Config Unit, u9.0, default 0.a01: Slope A of Config Unit, s4.4, default 0.reserved1: reservedb01: offset B0 of Config Unit, u7.0, default 0.reserved2: reserved
struct ipu3_uapi_iefd_cux4 #
Calculate power of non-directed sharpening element.
Definition
;
Members
x0: X0 point of Config Unit, u9.0, default 0.x1: X1 point of Config Unit, u9.0, default 0.x2: X2 point of Config Unit, u9.0, default 0.reserved0: reservedx3: X3 point of Config Unit, u9.0, default 0.a01: Slope A0 of Config Unit, s4.4, default 0.a12: Slope A1 of Config Unit, s4.4, default 0.reserved1: reserveda23: Slope A2 of Config Unit, s4.4, default 0.b01: Offset B0 of Config Unit, s7.0, default 0.b12: Offset B1 of Config Unit, s7.0, default 0.reserved2: reservedb23: Offset B2 of Config Unit, s7.0, default 0.reserved3: reserved
struct ipu3_uapi_iefd_cux6_rad #
Radial Config Unit (CU)
Definition
;
Members
x0: x0 points of Config Unit radial, u8.0x1: x1 points of Config Unit radial, u8.0x2: x2 points of Config Unit radial, u8.0x3: x3 points of Config Unit radial, u8.0x4: x4 points of Config Unit radial, u8.0x5: x5 points of Config Unit radial, u8.0reserved1: reserveda01: Slope A of Config Unit radial, s7.8a12: Slope A of Config Unit radial, s7.8a23: Slope A of Config Unit radial, s7.8a34: Slope A of Config Unit radial, s7.8a45: Slope A of Config Unit radial, s7.8reserved2: reservedb01: Slope B of Config Unit radial, s9.0b12: Slope B of Config Unit radial, s9.0b23: Slope B of Config Unit radial, s9.0reserved4: reservedb34: Slope B of Config Unit radial, s9.0b45: Slope B of Config Unit radial, s9.0reserved5: reserved
struct ipu3_uapi_yuvp1_iefd_cfg_units #
IEFd Config Units parameters
Definition
;
Members
cu_1: calculate weight for blending directed and non-directed denoise elements. Seeipu3_uapi_iefd_cux2cu_ed: calculate power of non-directed sharpening element, seeipu3_uapi_iefd_cux6_edcu_3: calculate weight for blending directed and non-directed denoise elements. Aipu3_uapi_iefd_cux2cu_5: calculate power of non-directed denoise element apply, useipu3_uapi_iefd_cux2_1cu_6: calculate power of non-directed sharpening element. Seeipu3_uapi_iefd_cux4cu_7: calculate weight for blending directed and non-directed denoise elements. Useipu3_uapi_iefd_cux2cu_unsharp: Config Unit of unsharpipu3_uapi_iefd_cux4cu_radial: Config Unit of radialipu3_uapi_iefd_cux6_radcu_vssnlm: Config Unit of vssnlmipu3_uapi_iefd_cux2
struct ipu3_uapi_yuvp1_iefd_config_s #
IEFd config
Definition
;
Members
horver_diag_coeff: Gradient compensation. Compared with vertical / horizontal (0 / 90 degree), coefficient of diagonal (45 / 135 degree) direction should be corrected by approx. 1/sqrt(2).reserved0: reservedclamp_stitch: Slope to stitch between clamped and unclamped edge valuesreserved1: reserveddirect_metric_update: Update coeff for direction metricreserved2: reserveded_horver_diag_coeff: Radial Coefficient that compensates for different distance for vertical/horizontal and diagonal gradient calculation (approx. 1/sqrt(2))reserved3: reserved
struct ipu3_uapi_yuvp1_iefd_control #
IEFd control
Definition
;
Members
iefd_en: Enable IEFddenoise_en: Enable denoisedirect_smooth_en: Enable directional smoothrad_en: Enable radial updatevssnlm_en: Enable VSSNLM output filterreserved: reserved
struct ipu3_uapi_sharp_cfg #
Sharpening config
Definition
;
Members
nega_lmt_txt: Sharpening limit for negative overshoots for texture.reserved0: reservedposi_lmt_txt: Sharpening limit for positive overshoots for texture.reserved1: reservednega_lmt_dir: Sharpening limit for negative overshoots for direction (edge).reserved2: reservedposi_lmt_dir: Sharpening limit for positive overshoots for direction (edge).reserved3: reserved
Description
Fixed point type u13.0, range [0, 8191].
struct ipu3_uapi_far_w #
Sharpening config for far sub-group
Definition
;
Members
dir_shrp: Weight of wide direct sharpening, u1.6, range [0, 64], default 64.reserved0: reserveddir_dns: Weight of wide direct denoising, u1.6, range [0, 64], default 0.reserved1: reservedndir_dns_powr: Power of non-direct denoising, Precision u1.6, range [0, 64], default 64.reserved2: reserved
struct ipu3_uapi_unsharp_cfg #
Unsharp config
Definition
;
Members
unsharp_weight: Unsharp mask blending weight. u1.6, range [0, 64], default 16. 0 - disabled, 64 - use only unsharp.reserved0: reservedunsharp_amount: Unsharp mask amount, u4.5, range [0, 511], default 0.reserved1: reserved
struct ipu3_uapi_yuvp1_iefd_shrp_cfg #
IEFd sharpness config
Definition
;
Members
cfg: sharpness configipu3_uapi_sharp_cfgfar_w: wide range config, value as specified byipu3_uapi_far_w: The 5x5 environment is separated into 2 sub-groups, the 3x3 nearest neighbors (8 pixels called Near), and the second order neighborhood around them (16 pixels called Far).unshrp_cfg: unsharpness config.ipu3_uapi_unsharp_cfg
struct ipu3_uapi_unsharp_coef0 #
Unsharp mask coefficients
Definition
;
Members
c00: Coeff11, s0.8, range [-255, 255], default 1.c01: Coeff12, s0.8, range [-255, 255], default 5.c02: Coeff13, s0.8, range [-255, 255], default 9.reserved: reserved
Description
Configurable registers for common sharpening support.
struct ipu3_uapi_unsharp_coef1 #
Unsharp mask coefficients
Definition
;
Members
c11: Coeff22, s0.8, range [-255, 255], default 29.c12: Coeff23, s0.8, range [-255, 255], default 55.c22: Coeff33, s0.8, range [-255, 255], default 96.reserved: reserved
struct ipu3_uapi_yuvp1_iefd_unshrp_cfg #
Unsharp mask config
Definition
;
Members
unsharp_coef0: unsharp coefficient 0 config. Seeipu3_uapi_unsharp_coef0unsharp_coef1: unsharp coefficient 1 config. Seeipu3_uapi_unsharp_coef1
struct ipu3_uapi_radial_reset_xy #
Radial coordinate reset
Definition
;
Members
x: Radial reset of x coordinate. Precision s12, [-4095, 4095], default 0.reserved0: reservedy: Radial center y coordinate. Precision s12, [-4095, 4095], default 0.reserved1: reserved
struct ipu3_uapi_radial_reset_x2 #
Radial X^2 reset
Definition
;
Members
x2: Radial reset of x^2 coordinate. Precision u24, default 0.reserved: reserved
struct ipu3_uapi_radial_reset_y2 #
Radial Y^2 reset
Definition
;
Members
y2: Radial reset of y^2 coordinate. Precision u24, default 0.reserved: reserved
struct ipu3_uapi_radial_cfg #
Radial config
Definition
;
Members
rad_nf: Radial. R^2 normalization factor is scale down by 2^ - (15 + scale)reserved0: reservedrad_inv_r2: Radial R^-2 normelized to (0.5..1). Precision u7, range [0, 127].reserved1: reserved
struct ipu3_uapi_rad_far_w #
Radial FAR sub-group
Definition
;
Members
rad_dir_far_sharp_w: Weight of wide direct sharpening, u1.6, range [0, 64], default 64.rad_dir_far_dns_w: Weight of wide direct denoising, u1.6, range [0, 64], default 0.rad_ndir_far_dns_power: power of non-direct sharpening, u1.6, range [0, 64], default 0.reserved: reserved
struct ipu3_uapi_cu_cfg0 #
Radius Config Unit cfg0 register
Definition
;
Members
cu6_pow: Power of CU6. Power of non-direct sharpening, u3.4.reserved0: reservedcu_unsharp_pow: Power of unsharp mask, u2.4.reserved1: reservedrad_cu6_pow: Radial/corner CU6. Directed sharpening power, u3.4.reserved2: reservedrad_cu_unsharp_pow: Radial power of unsharp mask, u2.4.reserved3: reserved
struct ipu3_uapi_cu_cfg1 #
Radius Config Unit cfg1 register
Definition
;
Members
rad_cu6_x1: X1 point of Config Unit 6, precision u9.0.reserved0: reservedrad_cu_unsharp_x1: X1 point for Config Unit unsharp for radial/corner point precision u9.0.reserved1: reserved
struct ipu3_uapi_yuvp1_iefd_rad_cfg #
IEFd parameters changed radially over the picture plane.
Definition
;
Members
reset_xy: reset xy value in radial calculation.ipu3_uapi_radial_reset_xyreset_x2: reset x square value in radial calculation. See structipu3_uapi_radial_reset_x2reset_y2: reset y square value in radial calculation. See structipu3_uapi_radial_reset_y2cfg: radial config defined inipu3_uapi_radial_cfgrad_far_w: weight for wide range radial.ipu3_uapi_rad_far_wcu_cfg0: configuration unit 0. Seeipu3_uapi_cu_cfg0cu_cfg1: configuration unit 1. Seeipu3_uapi_cu_cfg1
struct ipu3_uapi_vss_lut_x #
Vssnlm LUT x0/x1/x2
Definition
;
Members
vs_x0: Vssnlm LUT x0, precision u8, range [0, 255], default 16.vs_x1: Vssnlm LUT x1, precision u8, range [0, 255], default 32.vs_x2: Vssnlm LUT x2, precision u8, range [0, 255], default 64.reserved2: reserved
struct ipu3_uapi_vss_lut_y #
Vssnlm LUT y0/y1/y2
Definition
;
Members
vs_y1: Vssnlm LUT y1, precision u4, range [0, 8], default 1.reserved0: reservedvs_y2: Vssnlm LUT y2, precision u4, range [0, 8], default 3.reserved1: reservedvs_y3: Vssnlm LUT y3, precision u4, range [0, 8], default 8.reserved2: reserved
struct ipu3_uapi_yuvp1_iefd_vssnlm_cfg #
IEFd Vssnlm Lookup table
Definition
;
Members
vss_lut_x: vss lookup table. Seeipu3_uapi_vss_lut_xdescriptionvss_lut_y: vss lookup table. Seeipu3_uapi_vss_lut_ydescription
struct ipu3_uapi_yuvp1_iefd_config #
IEFd config
Definition
;
Members
units: configuration unit setting,ipu3_uapi_yuvp1_iefd_cfg_unitsconfig: configuration, as defined byipu3_uapi_yuvp1_iefd_config_scontrol: control setting, as defined byipu3_uapi_yuvp1_iefd_controlsharp: sharpness setting, as defined byipu3_uapi_yuvp1_iefd_shrp_cfgunsharp: unsharpness setting, as defined byipu3_uapi_yuvp1_iefd_unshrp_cfgrad: radial setting, as defined byipu3_uapi_yuvp1_iefd_rad_cfgvsslnm: vsslnm setting, as defined byipu3_uapi_yuvp1_iefd_vssnlm_cfg
struct ipu3_uapi_yuvp1_yds_config #
Y Down-Sampling config
Definition
;
Members
c00: range [0, 3], default 0x0c01: range [0, 3], default 0x1c02: range [0, 3], default 0x1c03: range [0, 3], default 0x0c10: range [0, 3], default 0x0c11: range [0, 3], default 0x1c12: range [0, 3], default 0x1c13: range [0, 3], default 0x0norm_factor: Normalization factor, range [0, 4], default 2 0 - divide by 1 1 - divide by 2 2 - divide by 4 3 - divide by 8 4 - divide by 16reserved0: reservedbin_output: Down sampling on Luma channel in two optional modes 0 - Bin output 4.2.0 (default), 1 output 4.2.2.reserved1: reserved
Description
Above are 4x2 filter coefficients for chroma output downscaling.
struct ipu3_uapi_yuvp1_chnr_enable_config #
Chroma noise reduction enable
Definition
;
Members
enable: enable/disable chroma noise reductionyuv_mode: 0 - YUV420, 1 - YUV422reserved0: reservedcol_size: number of columns in the frame, max width is 2560reserved1: reserved
struct ipu3_uapi_yuvp1_chnr_coring_config #
Coring thresholds for UV
Definition
;
Members
u: U coring level, u0.13, range [0.0, 1.0], default 0.0reserved0: reservedv: V coring level, u0.13, range [0.0, 1.0], default 0.0reserved1: reserved
struct ipu3_uapi_yuvp1_chnr_sense_gain_config #
Chroma noise reduction gains
Definition
;
Members
vy: Sensitivity of horizontal edge of Y, default 100vu: Sensitivity of horizontal edge of U, default 100vv: Sensitivity of horizontal edge of V, default 100reserved0: reservedhy: Sensitivity of vertical edge of Y, default 50hu: Sensitivity of vertical edge of U, default 50hv: Sensitivity of vertical edge of V, default 50reserved1: reserved
Description
All sensitivity gain parameters have precision u13.0, range [0, 8191].
struct ipu3_uapi_yuvp1_chnr_iir_fir_config #
Chroma IIR/FIR filter config
Definition
;
Members
fir_0h: Value of center tap in horizontal FIR, range [0, 32], default 8.reserved0: reservedfir_1h: Value of distance 1 in horizontal FIR, range [0, 32], default 12.reserved1: reservedfir_2h: Value of distance 2 tap in horizontal FIR, range [0, 32], default 0.dalpha_clip_val: weight for previous row in IIR, range [1, 256], default 0.reserved2: reserved
struct ipu3_uapi_yuvp1_chnr_config #
Chroma noise reduction config
Definition
;
Members
enable: chroma noise reduction enable, seeipu3_uapi_yuvp1_chnr_enable_configcoring: coring config for chroma noise reduction, seeipu3_uapi_yuvp1_chnr_coring_configsense_gain: sensitivity config for chroma noise reduction, see ipu3_uapi_yuvp1_chnr_sense_gain_configiir_fir: iir and fir config for chroma noise reduction, see ipu3_uapi_yuvp1_chnr_iir_fir_config
struct ipu3_uapi_yuvp1_y_ee_nr_lpf_config #
Luma(Y) edge enhancement low-pass filter coefficients
Definition
;
Members
a_diag: Smoothing diagonal coefficient, u5.0.reserved0: reserveda_periph: Image smoothing perpherial, u5.0.reserved1: reserveda_cent: Image Smoothing center coefficient, u5.0.reserved2: reservedenable: 0: Y_EE_NR disabled, output = input; 1: Y_EE_NR enabled.
struct ipu3_uapi_yuvp1_y_ee_nr_sense_config #
Luma(Y) edge enhancement noise reduction sensitivity gains
Definition
;
Members
edge_sense_0: Sensitivity of edge in dark area. u13.0, default 8191.reserved0: reserveddelta_edge_sense: Difference in the sensitivity of edges between the bright and dark areas. u13.0, default 0.reserved1: reservedcorner_sense_0: Sensitivity of corner in dark area. u13.0, default 0.reserved2: reserveddelta_corner_sense: Difference in the sensitivity of corners between the bright and dark areas. u13.0, default 8191.reserved3: reserved
struct ipu3_uapi_yuvp1_y_ee_nr_gain_config #
Luma(Y) edge enhancement noise reduction gain config
Definition
;
Members
gain_pos_0: Gain for positive edge in dark area. u5.0, [0, 16], default 2.reserved0: reserveddelta_gain_posi: Difference in the gain of edges between the bright and dark areas for positive edges. u5.0, [0, 16], default 0.reserved1: reservedgain_neg_0: Gain for negative edge in dark area. u5.0, [0, 16], default 8.reserved2: reserveddelta_gain_neg: Difference in the gain of edges between the bright and dark areas for negative edges. u5.0, [0, 16], default 0.reserved3: reserved
struct ipu3_uapi_yuvp1_y_ee_nr_clip_config #
Luma(Y) edge enhancement noise reduction clipping config
Definition
;
Members
clip_pos_0: Limit of positive edge in dark area u5, value [0, 16], default 8.reserved0: reserveddelta_clip_posi: Difference in the limit of edges between the bright and dark areas for positive edges. u5, value [0, 16], default 8.reserved1: reservedclip_neg_0: Limit of negative edge in dark area u5, value [0, 16], default 8.reserved2: reserveddelta_clip_neg: Difference in the limit of edges between the bright and dark areas for negative edges. u5, value [0, 16], default 8.reserved3: reserved
struct ipu3_uapi_yuvp1_y_ee_nr_frng_config #
Luma(Y) edge enhancement noise reduction fringe config
Definition
;
Members
gain_exp: Common exponent of gains, u4, [0, 8], default 2.reserved0: reservedmin_edge: Threshold for edge and smooth stitching, u13.reserved1: reservedlin_seg_param: Power of LinSeg, u4.reserved2: reservedt1: Parameter for enabling/disabling the edge enhancement, u1.0, [0, 1], default 1.t2: Parameter for enabling/disabling the smoothing, u1.0, [0, 1], default 1.reserved3: reserved
struct ipu3_uapi_yuvp1_y_ee_nr_diag_config #
Luma(Y) edge enhancement noise reduction diagonal config
Definition
;
Members
diag_disc_g: Coefficient that prioritize diagonal edge direction on horizontal or vertical for final enhancement. u4.0, [1, 15], default 1.reserved0: reservedhvw_hor: Weight of horizontal/vertical edge enhancement for hv edge. u2.2, [1, 15], default 4.dw_hor: Weight of diagonal edge enhancement for hv edge. u2.2, [1, 15], default 1.hvw_diag: Weight of horizontal/vertical edge enhancement for diagonal edge. u2.2, [1, 15], default 1.dw_diag: Weight of diagonal edge enhancement for diagonal edge. u2.2, [1, 15], default 4.reserved1: reserved
struct ipu3_uapi_yuvp1_y_ee_nr_fc_coring_config #
Luma(Y) edge enhancement noise reduction false color correction (FCC) coring config
Definition
;
Members
pos_0: Gain for positive edge in dark, u13.0, [0, 16], default 0.reserved0: reservedpos_delta: Gain for positive edge in bright, value: pos_0 + pos_delta <=16 u13.0, default 0.reserved1: reservedneg_0: Gain for negative edge in dark area, u13.0, range [0, 16], default 0.reserved2: reservedneg_delta: Gain for negative edge in bright area. neg_0 + neg_delta <=16 u13.0, default 0.reserved3: reserved
Description
Coring is a simple soft thresholding technique.
struct ipu3_uapi_yuvp1_y_ee_nr_config #
Edge enhancement and noise reduction
Definition
;
Members
lpf: low-pass filter config. Seeipu3_uapi_yuvp1_y_ee_nr_lpf_configsense: sensitivity config. Seeipu3_uapi_yuvp1_y_ee_nr_sense_configgain: gain config as defined inipu3_uapi_yuvp1_y_ee_nr_gain_configclip: clip config as defined inipu3_uapi_yuvp1_y_ee_nr_clip_configfrng: fringe config as defined inipu3_uapi_yuvp1_y_ee_nr_frng_configdiag: diagonal edge config. Seeipu3_uapi_yuvp1_y_ee_nr_diag_configfc_coring: coring config for fringe control. Seeipu3_uapi_yuvp1_y_ee_nr_fc_coring_config
struct ipu3_uapi_yuvp2_tcc_gen_control_static_config #
Total color correction general control config
Definition
;
Members
en: 0 - TCC disabled. Output = input 1 - TCC enabled.blend_shift: blend shift, Range[3, 4], default NA.gain_according_to_y_only: 0: Gain is calculated according to YUV, 1: Gain is calculated according to Y onlyreserved0: reservedgamma: Final blending coefficients. Values[-16, 16], default NA.reserved1: reserveddelta: Final blending coefficients. Values[-16, 16], default NA.reserved2: reserved
struct ipu3_uapi_yuvp2_tcc_macc_elem_static_config #
Total color correction multi-axis color control (MACC) config
Definition
;
Members
a: a coefficient for 2x2 MACC conversion matrix.reserved0: reservedb: b coefficient 2x2 MACC conversion matrix.reserved1: reservedc: c coefficient for 2x2 MACC conversion matrix.reserved2: reservedd: d coefficient for 2x2 MACC conversion matrix.reserved3: reserved
struct ipu3_uapi_yuvp2_tcc_macc_table_static_config #
Total color correction multi-axis color control (MACC) table array
Definition
;
Members
entries: config for multi axis color correction, as specified byipu3_uapi_yuvp2_tcc_macc_elem_static_config
struct ipu3_uapi_yuvp2_tcc_inv_y_lut_static_config #
Total color correction inverse y lookup table
Definition
;
Members
entries: lookup table for inverse y estimation, and use it to estimate the ratio between luma and chroma. Chroma by approximate the absolute value of the radius on the chroma plane (R = sqrt(u^2+v^2) ) and luma by approximate by 1/Y.
struct ipu3_uapi_yuvp2_tcc_gain_pcwl_lut_static_config #
Total color correction lookup table for PCWL
Definition
;
Members
entries: lookup table for gain piece wise linear transformation (PCWL)
struct ipu3_uapi_yuvp2_tcc_r_sqr_lut_static_config #
Total color correction lookup table for r square root
Definition
;
Members
entries: lookup table for r square root estimation
struct ipu3_uapi_yuvp2_tcc_static_config #
Total color correction static
Definition
;
Members
gen_control: general config for Total Color Correctionmacc_table: config for multi axis color correctioninv_y_lut: lookup table for inverse y estimationgain_pcwl: lookup table for gain PCWLr_sqr_lut: lookup table for r square root estimation.
struct ipu3_uapi_anr_transform_config #
Advanced noise reduction transform
Definition
;
Members
enable: advanced noise reduction enabled.adaptive_treshhold_en: On IPU3, adaptive threshold is always enabled.reserved1: reservedreserved2: reservedalpha: using following defaults: 13, 13, 13, 13, 0, 0, 0, 0 11, 11, 11, 11, 0, 0, 0, 0 14, 14, 14, 14, 0, 0, 0, 0beta: use following defaults: 24, 24, 24, 24 21, 20, 20, 21 25, 25, 25, 25color: use defaults defined in driver/media/pci/intel/ipu3-tables.csqrt_lut: 11 bits per element, values = [724 768 810 849 887 923 958 991 1024 1056 1116 1145 1173 1201 1086 1228 1254 1280 1305 1330 1355 1379 1402 1425 1448]xreset: Reset value of X for r^2 calculation Value: col_start-X_center Constraint: Xreset + FrameWdith=4095 Xreset= -4095, default -1632.reserved3: reservedyreset: Reset value of Y for r^2 calculation Value: row_start-Y_center Constraint: Yreset + FrameHeight=4095 Yreset= -4095, default -1224.reserved4: reservedx_sqr_reset: Reset value of X^2 for r^2 calculation Value = (Xreset)^2r_normfactor: Normalization factor for R. Default 14.reserved5: reservedy_sqr_reset: Reset value of Y^2 for r^2 calculation Value = (Yreset)^2gain_scale: Parameter describing shading gain as a function of distance from the image center. A single value per frame, loaded by the driver. Default 115.
struct ipu3_uapi_anr_stitch_pyramid #
ANR stitch pyramid
Definition
;
Members
entry0: pyramid LUT entry0, range [0x0, 0x3f]entry1: pyramid LUT entry1, range [0x0, 0x3f]entry2: pyramid LUT entry2, range [0x0, 0x3f]reserved: reserved
struct ipu3_uapi_anr_stitch_config #
ANR stitch config
Definition
;
Members
anr_stitch_en: enable stitch. Enabled with 1.reserved: reservedpyramid: pyramid table as defined byipu3_uapi_anr_stitch_pyramiddefault values: { 1, 3, 5 }, { 7, 7, 5 }, { 3, 1, 3 }, { 9, 15, 21 }, { 21, 15, 9 }, { 3, 5, 15 }, { 25, 35, 35 }, { 25, 15, 5 }, { 7, 21, 35 }, { 49, 49, 35 }, { 21, 7, 7 }, { 21, 35, 49 }, { 49, 35, 21 }, { 7, 5, 15 }, { 25, 35, 35 }, { 25, 15, 5 }, { 3, 9, 15 }, { 21, 21, 15 }, { 9, 3, 1 }, { 3, 5, 7 }, { 7, 5, 3}, { 1 }
struct ipu3_uapi_anr_config #
ANR config
Definition
;
Members
transform: advanced noise reduction transform config as specified byipu3_uapi_anr_transform_configstitch: create 4x4 patch from 4 surrounding 8x8 patches.
struct ipu3_uapi_acc_param #
Accelerator cluster parameters
Definition
;
Members
bnr: parameters for bayer noise reduction static config. Seeipu3_uapi_bnr_static_configgreen_disparity: disparity static config between gr and gb channel. Seeipu3_uapi_bnr_static_config_green_disparitydm: de-mosaic config. Seeipu3_uapi_dm_configccm: color correction matrix. Seeipu3_uapi_ccm_mat_configgamma: gamma correction config. Seeipu3_uapi_gamma_configcsc: color space conversion matrix. Seeipu3_uapi_csc_mat_configcds: color down sample config. Seeipu3_uapi_cds_paramsshd: lens shading correction config. Seeipu3_uapi_shd_configiefd: Image enhancement filter and denoise config.ipu3_uapi_yuvp1_iefd_configyds_c0: y down scaler config.ipu3_uapi_yuvp1_yds_configchnr_c0: chroma noise reduction config.ipu3_uapi_yuvp1_chnr_configy_ee_nr: y edge enhancement and noise reduction config.ipu3_uapi_yuvp1_y_ee_nr_configyds: y down scaler config. Seeipu3_uapi_yuvp1_yds_configchnr: chroma noise reduction config. Seeipu3_uapi_yuvp1_chnr_configyds2: y channel down scaler config. Seeipu3_uapi_yuvp1_yds_configtcc: total color correction config as defined in structipu3_uapi_yuvp2_tcc_static_configanr: advanced noise reduction config.Seeipu3_uapi_anr_configawb_fr: AWB filter response config. See ipu3_uapi_awb_fr_configae: auto exposure config As specified byipu3_uapi_ae_configaf: auto focus config. As specified byipu3_uapi_af_configawb: auto white balance config. As specified byipu3_uapi_awb_config
Description
ACC refers to the HW cluster containing all Fixed Functions (FFs). Each FF implements a specific algorithm.
struct ipu3_uapi_isp_lin_vmem_params #
Linearization parameters
Definition
;
Members
lin_lutlow_gr: linearization look-up table for GR channel interpolation.lin_lutlow_r: linearization look-up table for R channel interpolation.lin_lutlow_b: linearization look-up table for B channel interpolation.lin_lutlow_gb: linearization look-up table for GB channel interpolation. lin_lutlow_gr / lin_lutlow_r / lin_lutlow_b / lin_lutlow_gb <= LIN_MAX_VALUE - 1.lin_lutdif_gr: lin_lutlow_gr[i+1] - lin_lutlow_gr[i].lin_lutdif_r: lin_lutlow_r[i+1] - lin_lutlow_r[i].lin_lutdif_b: lin_lutlow_b[i+1] - lin_lutlow_b[i].lin_lutdif_gb: lin_lutlow_gb[i+1] - lin_lutlow_gb[i].
struct ipu3_uapi_isp_tnr3_vmem_params #
Temporal noise reduction vector memory parameters
Definition
;
Members
slope: slope setting in interpolation curve for temporal noise reduction.reserved1: reservedsigma: knee point setting in interpolation curve for temporal noise reduction.reserved2: reserved
struct ipu3_uapi_isp_tnr3_params #
Temporal noise reduction v3 parameters
Definition
;
Members
knee_y1: Knee point TNR3 assumes standard deviation of Y,U and V at Y1 are TnrY1_Sigma_Y, U and V.knee_y2: Knee point TNR3 assumes standard deviation of Y,U and V at Y2 are TnrY2_Sigma_Y, U and V.maxfb_y: Max feedback gain for Ymaxfb_u: Max feedback gain for Umaxfb_v: Max feedback gain for Vround_adj_y: rounding Adjust for Yround_adj_u: rounding Adjust for Uround_adj_v: rounding Adjust for Vref_buf_select: selection of the reference frame buffer to be used.
struct ipu3_uapi_isp_xnr3_vmem_params #
Extreme noise reduction v3 vector memory parameters
Definition
;
Members
x: xnr3 parameters.a: xnr3 parameters.b: xnr3 parameters.c: xnr3 parameters.
struct ipu3_uapi_xnr3_alpha_params #
Extreme noise reduction v3 alpha tuning parameters
Definition
;
Members
y0: Sigma for Y range similarity in dark area.u0: Sigma for U range similarity in dark area.v0: Sigma for V range similarity in dark area.ydiff: Sigma difference for Y between bright area and dark area.udiff: Sigma difference for U between bright area and dark area.vdiff: Sigma difference for V between bright area and dark area.
struct ipu3_uapi_xnr3_coring_params #
Extreme noise reduction v3 coring parameters
Definition
;
Members
u0: Coring Threshold of U channel in dark area.v0: Coring Threshold of V channel in dark area.udiff: Threshold difference of U channel between bright and dark area.vdiff: Threshold difference of V channel between bright and dark area.
struct ipu3_uapi_xnr3_blending_params #
Blending factor
Definition
;
Members
strength: The factor for blending output with input. This is tuning parameterHigher values lead to more aggressive XNR operation.
struct ipu3_uapi_isp_xnr3_params #
Extreme noise reduction v3 parameters
Definition
;
Members
alpha: parameters for xnr3 alpha. Seeipu3_uapi_xnr3_alpha_paramscoring: parameters for xnr3 coring. Seeipu3_uapi_xnr3_coring_paramsblending: parameters for xnr3 blending. Seeipu3_uapi_xnr3_blending_params
struct ipu3_uapi_obgrid_param #
Optical black level compensation parameters
Definition
;
Members
gr: Grid table values for color GRr: Grid table values for color Rb: Grid table values for color Bgb: Grid table values for color GB
Description
Black level is different for red, green, and blue channels. So black level compensation is different per channel.
struct ipu3_uapi_flags #
bits to indicate which pipeline needs update
Definition
;
Members
gdc: 0 = no update, 1 = update.obgrid: 0 = no update, 1 = update.reserved1: Not used.acc_bnr: 0 = no update, 1 = update.acc_green_disparity: 0 = no update, 1 = update.acc_dm: 0 = no update, 1 = update.acc_ccm: 0 = no update, 1 = update.acc_gamma: 0 = no update, 1 = update.acc_csc: 0 = no update, 1 = update.acc_cds: 0 = no update, 1 = update.acc_shd: 0 = no update, 1 = update.reserved2: Not used.acc_iefd: 0 = no update, 1 = update.acc_yds_c0: 0 = no update, 1 = update.acc_chnr_c0: 0 = no update, 1 = update.acc_y_ee_nr: 0 = no update, 1 = update.acc_yds: 0 = no update, 1 = update.acc_chnr: 0 = no update, 1 = update.acc_ytm: 0 = no update, 1 = update.acc_yds2: 0 = no update, 1 = update.acc_tcc: 0 = no update, 1 = update.acc_dpc: 0 = no update, 1 = update.acc_bds: 0 = no update, 1 = update.acc_anr: 0 = no update, 1 = update.acc_awb_fr: 0 = no update, 1 = update.acc_ae: 0 = no update, 1 = update.acc_af: 0 = no update, 1 = update.acc_awb: 0 = no update, 1 = update.reserved3: Not used.lin_vmem_params: 0 = no update, 1 = update.tnr3_vmem_params: 0 = no update, 1 = update.xnr3_vmem_params: 0 = no update, 1 = update.tnr3_dmem_params: 0 = no update, 1 = update.xnr3_dmem_params: 0 = no update, 1 = update.reserved4: Not used.obgrid_param: 0 = no update, 1 = update.reserved5: Not used.
struct ipu3_uapi_params #
V4L2_META_FMT_IPU3_PARAMS
Definition
;
Members
use: select which parameters to apply, seeipu3_uapi_flagsacc_param: ACC parameters, as specified byipu3_uapi_acc_paramlin_vmem_params: linearization VMEM, as specified byipu3_uapi_isp_lin_vmem_paramstnr3_vmem_params: tnr3 VMEM as specified byipu3_uapi_isp_tnr3_vmem_paramsxnr3_vmem_params: xnr3 VMEM as specified byipu3_uapi_isp_xnr3_vmem_paramstnr3_dmem_params: tnr3 DMEM as specified byipu3_uapi_isp_tnr3_paramsxnr3_dmem_params: xnr3 DMEM as specified byipu3_uapi_isp_xnr3_paramsobgrid_param: obgrid parameters as specified byipu3_uapi_obgrid_param
Description
The video queue "parameters" is of format V4L2_META_FMT_IPU3_PARAMS. This is a "single plane" v4l2_meta_format using V4L2_BUF_TYPE_META_OUTPUT.
struct ipu3_uapi_params as defined below contains a lot of parameters and ipu3_uapi_flags selects which parameters to apply.