2.13.4. V4L2_META_FMT_RK_ISP1_PARAMS (‘rk1p’), V4L2_META_FMT_RK_ISP1_STAT_3A (‘rk1s’)¶
2.13.4.1. Configuration parameters¶
The configuration parameters are passed to the
rkisp1_params metadata output video node, using
the v4l2_meta_format interface. The buffer contains
a single instance of the C structure rkisp1_params_cfg defined in
rkisp1-config.h. So the structure can be obtained from the buffer by:
struct rkisp1_params_cfg *params = (struct rkisp1_params_cfg*) buffer;
2.13.4.2. 3A and histogram statistics¶
The ISP1 device collects different statistics over an input Bayer frame.
Those statistics are obtained from the rkisp1_stats
metadata capture video node,
using the v4l2_meta_format interface. The buffer contains a single
instance of the C structure rkisp1_stat_buffer defined in
rkisp1-config.h. So the structure can be obtained from the buffer by:
struct rkisp1_stat_buffer *stats = (struct rkisp1_stat_buffer*) buffer;
The statistics collected are Exposure, AWB (Auto-white balance), Histogram and
AF (Auto-focus). See rkisp1_stat_buffer for details of the statistics.
The 3A statistics and configuration parameters described here are usually consumed and produced by dedicated user space libraries that comprise the important tuning tools using software control loop.
2.13.4.3. rkisp1 uAPI data types¶
-
enum rkisp1_cif_isp_version¶
ISP variants
Constants
RKISP1_V10Used at least in RK3288 and RK3399.
RKISP1_V11Declared in the original vendor code, but not used. Same number of entries in grids and histogram as v10.
RKISP1_V12Used at least in RK3326 and PX30.
RKISP1_V13Used at least in RK1808. Same number of entries in grids and histogram as v12.
RKISP1_V_IMX8MPUsed in at least i.MX8MP. Same number of entries in grids and histogram as v10.
-
enum rkisp1_cif_isp_exp_ctrl_autostop¶
stop modes
Constants
RKISP1_CIF_ISP_EXP_CTRL_AUTOSTOP_0continuous measurement
RKISP1_CIF_ISP_EXP_CTRL_AUTOSTOP_1stop measuring after a complete frame
-
enum rkisp1_cif_isp_exp_meas_mode¶
Exposure measure mode
Constants
RKISP1_CIF_ISP_EXP_MEASURING_MODE_0Y = 16 + 0.25R + 0.5G + 0.1094B
RKISP1_CIF_ISP_EXP_MEASURING_MODE_1Y = (R + G + B) x (85/256)
-
struct rkisp1_cif_isp_window¶
measurement window.
Definition:
struct rkisp1_cif_isp_window {
__u16 h_offs;
__u16 v_offs;
__u16 h_size;
__u16 v_size;
};
Members
h_offsthe horizontal offset of the window from the left of the frame in pixels.
v_offsthe vertical offset of the window from the top of the frame in pixels.
h_sizethe horizontal size of the window in pixels
v_sizethe vertical size of the window in pixels.
Description
Measurements are calculated per window inside the frame. This struct represents a window for a measurement.
-
struct rkisp1_cif_isp_bls_fixed_val¶
BLS fixed subtraction values
Definition:
struct rkisp1_cif_isp_bls_fixed_val {
__s16 r;
__s16 gr;
__s16 gb;
__s16 b;
};
Members
rFixed (signed!) subtraction value for Bayer pattern R
grFixed (signed!) subtraction value for Bayer pattern Gr
gbFixed (signed!) subtraction value for Bayer pattern Gb
bFixed (signed!) subtraction value for Bayer pattern B
Description
The values will be subtracted from the sensor values. Therefore a negative value means addition instead of subtraction!
-
struct rkisp1_cif_isp_bls_config¶
Configuration used by black level subtraction
Definition:
struct rkisp1_cif_isp_bls_config {
__u8 enable_auto;
__u8 en_windows;
struct rkisp1_cif_isp_window bls_window1;
struct rkisp1_cif_isp_window bls_window2;
__u8 bls_samples;
struct rkisp1_cif_isp_bls_fixed_val fixed_val;
};
Members
enable_autoAutomatic mode activated means that the measured values are subtracted. Otherwise the fixed subtraction values will be subtracted.
en_windowsenabled window
bls_window1Measurement window 1 size
bls_window2Measurement window 2 size
bls_samplesSet amount of measured pixels for each Bayer position (A, B,C and D) to 2^bls_samples.
fixed_valFixed subtraction values
-
struct rkisp1_cif_isp_dpcc_methods_config¶
DPCC methods set configuration
Definition:
struct rkisp1_cif_isp_dpcc_methods_config {
__u32 method;
__u32 line_thresh;
__u32 line_mad_fac;
__u32 pg_fac;
__u32 rnd_thresh;
__u32 rg_fac;
};
Members
methodMethod enable bits (RKISP1_CIF_ISP_DPCC_METHODS_SET_*)
line_threshLine threshold (RKISP1_CIF_ISP_DPCC_LINE_THRESH_*)
line_mad_facLine Mean Absolute Difference factor (RKISP1_CIF_ISP_DPCC_LINE_MAD_FAC_*)
pg_facPeak gradient factor (RKISP1_CIF_ISP_DPCC_PG_FAC_*)
rnd_threshRank Neighbor Difference threshold (RKISP1_CIF_ISP_DPCC_RND_THRESH_*)
rg_facRank gradient factor (RKISP1_CIF_ISP_DPCC_RG_FAC_*)
Description
This structure stores the configuration of one set of methods for the DPCC algorithm. Multiple methods can be selected in each set (independently for the Green and Red/Blue components) through the method field, the result is the logical AND of all enabled methods. The remaining fields set thresholds and factors for each method.
-
struct rkisp1_cif_isp_dpcc_config¶
Configuration used by DPCC
Definition:
struct rkisp1_cif_isp_dpcc_config {
__u32 mode;
__u32 output_mode;
__u32 set_use;
struct rkisp1_cif_isp_dpcc_methods_config methods[RKISP1_CIF_ISP_DPCC_METHODS_MAX];
__u32 ro_limits;
__u32 rnd_offs;
};
Members
modeDPCC mode (RKISP1_CIF_ISP_DPCC_MODE_*)
output_modeInterpolation output mode (RKISP1_CIF_ISP_DPCC_OUTPUT_MODE_*)
set_useMethods sets selection (RKISP1_CIF_ISP_DPCC_SET_USE_*)
methodsMethods sets configuration
ro_limitsRank order limits (RKISP1_CIF_ISP_DPCC_RO_LIMITS_*)
rnd_offsDifferential rank offsets for rank neighbor difference (RKISP1_CIF_ISP_DPCC_RND_OFFS_*)
Description
Configuration used by Defect Pixel Cluster Correction. Three sets of methods can be configured and selected through the set_use field. The result is the logical OR of all enabled sets.
-
struct rkisp1_cif_isp_gamma_corr_curve¶
gamma curve point definition y-axis (output).
Definition:
struct rkisp1_cif_isp_gamma_corr_curve {
__u16 gamma_y[RKISP1_CIF_ISP_DEGAMMA_CURVE_SIZE];
};
Members
gamma_ythe values for the y-axis of gamma curve points. Each value is 12 bit.
Description
The reset values define a linear curve which has the same effect as bypass. Reset values are: gamma_y[0] = 0x0000, gamma_y[1] = 0x0100, ... gamma_y[15] = 0x0f00, gamma_y[16] = 0xfff
-
struct rkisp1_cif_isp_gamma_curve_x_axis_pnts¶
De-Gamma Curve definition x increments (sampling points). gamma_dx0 is for the lower samples (1-8), gamma_dx1 is for the higher samples (9-16). The reset values for both fields is 0x44444444. This means that each sample is 4 units away from the previous one on the x-axis.
Definition:
struct rkisp1_cif_isp_gamma_curve_x_axis_pnts {
__u32 gamma_dx0;
__u32 gamma_dx1;
};
Members
gamma_dx0gamma curve sample points definitions. Bits 0:2 for sample 1. Bit 3 unused. Bits 4:6 for sample 2. bit 7 unused ... Bits 28:30 for sample 8. Bit 31 unused
gamma_dx1gamma curve sample points definitions. Bits 0:2 for sample 9. Bit 3 unused. Bits 4:6 for sample 10. bit 7 unused ... Bits 28:30 for sample 16. Bit 31 unused
-
struct rkisp1_cif_isp_sdg_config¶
Configuration used by sensor degamma
Definition:
struct rkisp1_cif_isp_sdg_config {
struct rkisp1_cif_isp_gamma_corr_curve curve_r;
struct rkisp1_cif_isp_gamma_corr_curve curve_g;
struct rkisp1_cif_isp_gamma_corr_curve curve_b;
struct rkisp1_cif_isp_gamma_curve_x_axis_pnts xa_pnts;
};
Members
curve_rgamma curve point definition axis for red
curve_ggamma curve point definition axis for green
curve_bgamma curve point definition axis for blue
xa_pntsx axis increments
-
struct rkisp1_cif_isp_lsc_config¶
Configuration used by Lens shading correction
Definition:
struct rkisp1_cif_isp_lsc_config {
__u16 r_data_tbl[RKISP1_CIF_ISP_LSC_SAMPLES_MAX][RKISP1_CIF_ISP_LSC_SAMPLES_MAX];
__u16 gr_data_tbl[RKISP1_CIF_ISP_LSC_SAMPLES_MAX][RKISP1_CIF_ISP_LSC_SAMPLES_MAX];
__u16 gb_data_tbl[RKISP1_CIF_ISP_LSC_SAMPLES_MAX][RKISP1_CIF_ISP_LSC_SAMPLES_MAX];
__u16 b_data_tbl[RKISP1_CIF_ISP_LSC_SAMPLES_MAX][RKISP1_CIF_ISP_LSC_SAMPLES_MAX];
__u16 x_grad_tbl[RKISP1_CIF_ISP_LSC_SECTORS_TBL_SIZE];
__u16 y_grad_tbl[RKISP1_CIF_ISP_LSC_SECTORS_TBL_SIZE];
__u16 x_size_tbl[RKISP1_CIF_ISP_LSC_SECTORS_TBL_SIZE];
__u16 y_size_tbl[RKISP1_CIF_ISP_LSC_SECTORS_TBL_SIZE];
__u16 config_width;
__u16 config_height;
};
Members
r_data_tblsample table red
gr_data_tblsample table green (red)
gb_data_tblsample table green (blue)
b_data_tblsample table blue
x_grad_tblgradient table x
y_grad_tblgradient table y
x_size_tblsize table x
y_size_tblsize table y
config_widthnot used at the moment
config_heightnot used at the moment
-
struct rkisp1_cif_isp_ie_config¶
Configuration used by image effects
Definition:
struct rkisp1_cif_isp_ie_config {
__u16 effect;
__u16 color_sel;
__u16 eff_mat_1;
__u16 eff_mat_2;
__u16 eff_mat_3;
__u16 eff_mat_4;
__u16 eff_mat_5;
__u16 eff_tint;
};
Members
effectvalues from ‘enum v4l2_colorfx’. Possible values are: V4L2_COLORFX_SEPIA, V4L2_COLORFX_SET_CBCR, V4L2_COLORFX_AQUA, V4L2_COLORFX_EMBOSS, V4L2_COLORFX_SKETCH, V4L2_COLORFX_BW, V4L2_COLORFX_NEGATIVE
color_selbits 0:2 - colors bitmask (001 - blue, 010 - green, 100 - red). bits 8:15 - Threshold value of the RGB colors for the color selection effect.
eff_mat_13x3 Matrix Coefficients for Emboss Effect 1
eff_mat_23x3 Matrix Coefficients for Emboss Effect 2
eff_mat_33x3 Matrix Coefficients for Emboss 3/Sketch 1
eff_mat_43x3 Matrix Coefficients for Sketch Effect 2
eff_mat_53x3 Matrix Coefficients for Sketch Effect 3
eff_tintChrominance increment values of tint (used for sepia effect)
-
struct rkisp1_cif_isp_cproc_config¶
Configuration used by Color Processing
Definition:
struct rkisp1_cif_isp_cproc_config {
__u8 c_out_range;
__u8 y_in_range;
__u8 y_out_range;
__u8 contrast;
__u8 brightness;
__u8 sat;
__u8 hue;
};
Members
c_out_rangeChrominance pixel clipping range at output. (0 for limit, 1 for full)
y_in_rangeLuminance pixel clipping range at output.
y_out_rangeLuminance pixel clipping range at output.
contrast00~ff, 0.0~1.992
brightness80~7F, -128~+127
satsaturation, 00~FF, 0.0~1.992
hue80~7F, -90~+87.188
-
struct rkisp1_cif_isp_awb_meas_config¶
Configuration for the AWB statistics
Definition:
struct rkisp1_cif_isp_awb_meas_config {
struct rkisp1_cif_isp_window awb_wnd;
__u32 awb_mode;
__u8 max_y;
__u8 min_y;
__u8 max_csum;
__u8 min_c;
__u8 frames;
__u8 awb_ref_cr;
__u8 awb_ref_cb;
__u8 enable_ymax_cmp;
};
Members
awb_wndwhite balance measurement window (in pixels)
awb_modethe awb meas mode. From enum rkisp1_cif_isp_awb_mode_type.
max_yonly pixels values < max_y contribute to awb measurement, set to 0 to disable this feature
min_yonly pixels values > min_y contribute to awb measurement
max_csumChrominance sum maximum value, only consider pixels with Cb+Cr, smaller than threshold for awb measurements
min_cChrominance minimum value, only consider pixels with Cb/Cr each greater than threshold value for awb measurements
framesnumber of frames - 1 used for mean value calculation (ucFrames=0 means 1 Frame)
awb_ref_crreference Cr value for AWB regulation, target for AWB
awb_ref_cbreference Cb value for AWB regulation, target for AWB
enable_ymax_cmpenable Y_MAX compare (Not valid in RGB measurement mode.)
-
struct rkisp1_cif_isp_awb_gain_config¶
Configuration used by auto white balance gain
Definition:
struct rkisp1_cif_isp_awb_gain_config {
__u16 gain_red;
__u16 gain_green_r;
__u16 gain_blue;
__u16 gain_green_b;
};
Members
gain_redgain value for red component.
gain_green_rgain value for green component in red line.
gain_bluegain value for blue component.
gain_green_bgain value for green component in blue line.
Description
All fields in this struct are 10 bit, where: 0x100h = 1, unsigned integer value, range 0 to 4 with 8 bit fractional part.
out_data_x = ( AWB_GAIN_X * in_data + 128) >> 8
-
struct rkisp1_cif_isp_flt_config¶
Configuration used by ISP filtering
Definition:
struct rkisp1_cif_isp_flt_config {
__u32 mode;
__u8 grn_stage1;
__u8 chr_h_mode;
__u8 chr_v_mode;
__u32 thresh_bl0;
__u32 thresh_bl1;
__u32 thresh_sh0;
__u32 thresh_sh1;
__u32 lum_weight;
__u32 fac_sh1;
__u32 fac_sh0;
__u32 fac_mid;
__u32 fac_bl0;
__u32 fac_bl1;
};
Members
modeISP_FILT_MODE register fields (from enum rkisp1_cif_isp_flt_mode)
grn_stage1Green filter stage 1 select (range 0x0...0x8)
chr_h_modeChroma filter horizontal mode
chr_v_modeChroma filter vertical mode
thresh_bl0If thresh_bl1 < sum_grad < thresh_bl0 then fac_bl0 is selected (blurring th)
thresh_bl1If sum_grad < thresh_bl1 then fac_bl1 is selected (blurring th)
thresh_sh0If thresh_sh0 < sum_grad < thresh_sh1 then thresh_sh0 is selected (sharpening th)
thresh_sh1If thresh_sh1 < sum_grad then thresh_sh1 is selected (sharpening th)
lum_weightParameters for luminance weight function.
fac_sh1filter factor for sharp1 level
fac_sh0filter factor for sharp0 level
fac_midfilter factor for mid level and for static filter mode
fac_bl0filter factor for blur 0 level
fac_bl1filter factor for blur 1 level (max blur)
Description
All 4 threshold fields (thresh_*) are 10 bits. All 6 factor fields (fac_*) are 6 bits.
-
struct rkisp1_cif_isp_bdm_config¶
Configuration used by Bayer DeMosaic
Definition:
struct rkisp1_cif_isp_bdm_config {
__u8 demosaic_th;
};
Members
demosaic_ththreshold for bayer demosaicing texture detection
-
struct rkisp1_cif_isp_ctk_config¶
Configuration used by Cross Talk correction
Definition:
struct rkisp1_cif_isp_ctk_config {
__u16 coeff[3][3];
__u16 ct_offset[3];
};
Members
coeffcolor correction matrix. Values are 11-bit signed fixed-point numbers with 4 bit integer and 7 bit fractional part, ranging from -8 (0x400) to +7.992 (0x3FF). 0 is represented by 0x000 and a coefficient value of 1 as 0x080.
ct_offsetRed, Green, Blue offsets for the crosstalk correction matrix
-
struct rkisp1_cif_isp_goc_config¶
Configuration used by Gamma Out correction
Definition:
struct rkisp1_cif_isp_goc_config {
__u32 mode;
__u16 gamma_y[RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES];
};
Members
modegoc mode (from enum rkisp1_cif_isp_goc_mode)
gamma_ygamma out curve y-axis for all color components
Description
The number of entries of gamma_y depends on the hardware revision as is reported by the hw_revision field of the struct media_device_info that is returned by ioctl MEDIA_IOC_DEVICE_INFO.
V10 has RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V10 entries, V12 has RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V12 entries. RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES is equal to the maximum of the two.
-
struct rkisp1_cif_isp_hst_config¶
Configuration for Histogram statistics
Definition:
struct rkisp1_cif_isp_hst_config {
__u32 mode;
__u8 histogram_predivider;
struct rkisp1_cif_isp_window meas_window;
__u8 hist_weight[RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE];
};
Members
modehistogram mode (from enum rkisp1_cif_isp_histogram_mode)
histogram_predividerprocess every stepsize pixel, all other pixels are skipped
meas_windowcoordinates of the measure window
hist_weightweighting factor for sub-windows
Description
The number of entries of hist_weight depends on the hardware revision as is reported by the hw_revision field of the struct media_device_info that is returned by ioctl MEDIA_IOC_DEVICE_INFO.
V10 has RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V10 entries, V12 has RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V12 entries. RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE is equal to the maximum of the two.
-
struct rkisp1_cif_isp_aec_config¶
Configuration for Auto Exposure statistics
Definition:
struct rkisp1_cif_isp_aec_config {
__u32 mode;
__u32 autostop;
struct rkisp1_cif_isp_window meas_window;
};
Members
modeExposure measure mode (from
enum rkisp1_cif_isp_exp_meas_mode)autostopstop mode (from
enum rkisp1_cif_isp_exp_ctrl_autostop)meas_windowcoordinates of the measure window
-
struct rkisp1_cif_isp_afc_config¶
Configuration for the Auto Focus statistics
Definition:
struct rkisp1_cif_isp_afc_config {
__u8 num_afm_win;
struct rkisp1_cif_isp_window afm_win[RKISP1_CIF_ISP_AFM_MAX_WINDOWS];
__u32 thres;
__u32 var_shift;
};
Members
num_afm_winmax RKISP1_CIF_ISP_AFM_MAX_WINDOWS
afm_wincoordinates of the meas window
thresthreshold used for minimizing the influence of noise
var_shiftthe number of bits for the shift operation at the end of the calculation chain.
-
enum rkisp1_cif_isp_dpf_gain_usage¶
dpf gain usage
Constants
RKISP1_CIF_ISP_DPF_GAIN_USAGE_DISABLEDdon’t use any gains in preprocessing stage
RKISP1_CIF_ISP_DPF_GAIN_USAGE_NF_GAINSuse only the noise function gains from registers DPF_NF_GAIN_R, ...
RKISP1_CIF_ISP_DPF_GAIN_USAGE_LSC_GAINSuse only the gains from LSC module
RKISP1_CIF_ISP_DPF_GAIN_USAGE_NF_LSC_GAINSuse the noise function gains and the gains from LSC module
RKISP1_CIF_ISP_DPF_GAIN_USAGE_AWB_GAINSuse only the gains from AWB module
RKISP1_CIF_ISP_DPF_GAIN_USAGE_AWB_LSC_GAINSuse the gains from AWB and LSC module
RKISP1_CIF_ISP_DPF_GAIN_USAGE_MAXupper border (only for an internal evaluation)
-
enum rkisp1_cif_isp_dpf_rb_filtersize¶
Red and blue filter sizes
Constants
RKISP1_CIF_ISP_DPF_RB_FILTERSIZE_13x9red and blue filter kernel size 13x9 (means 7x5 active pixel)
RKISP1_CIF_ISP_DPF_RB_FILTERSIZE_9x9red and blue filter kernel size 9x9 (means 5x5 active pixel)
-
enum rkisp1_cif_isp_dpf_nll_scale_mode¶
dpf noise level scale mode
Constants
RKISP1_CIF_ISP_NLL_SCALE_LINEARuse a linear scaling
RKISP1_CIF_ISP_NLL_SCALE_LOGARITHMICuse a logarithmic scaling
-
struct rkisp1_cif_isp_dpf_nll¶
Noise level lookup
Definition:
struct rkisp1_cif_isp_dpf_nll {
__u16 coeff[RKISP1_CIF_ISP_DPF_MAX_NLF_COEFFS];
__u32 scale_mode;
};
Members
coeffNoise level Lookup coefficient
scale_modedpf noise level scale mode (from
enum rkisp1_cif_isp_dpf_nll_scale_mode)
-
struct rkisp1_cif_isp_dpf_rb_flt¶
Red blue filter config
Definition:
struct rkisp1_cif_isp_dpf_rb_flt {
__u32 fltsize;
__u8 spatial_coeff[RKISP1_CIF_ISP_DPF_MAX_SPATIAL_COEFFS];
__u8 r_enable;
__u8 b_enable;
};
Members
fltsizeThe filter size for the red and blue pixels (from
enum rkisp1_cif_isp_dpf_rb_filtersize)spatial_coeffSpatial weights
r_enableenable filter processing for red pixels
b_enableenable filter processing for blue pixels
-
struct rkisp1_cif_isp_dpf_g_flt¶
Green filter Configuration
Definition:
struct rkisp1_cif_isp_dpf_g_flt {
__u8 spatial_coeff[RKISP1_CIF_ISP_DPF_MAX_SPATIAL_COEFFS];
__u8 gr_enable;
__u8 gb_enable;
};
Members
spatial_coeffSpatial weights
gr_enableenable filter processing for green pixels in green/red lines
gb_enableenable filter processing for green pixels in green/blue lines
-
struct rkisp1_cif_isp_dpf_gain¶
Noise function Configuration
Definition:
struct rkisp1_cif_isp_dpf_gain {
__u32 mode;
__u16 nf_r_gain;
__u16 nf_b_gain;
__u16 nf_gr_gain;
__u16 nf_gb_gain;
};
Members
modedpf gain usage (from
enum rkisp1_cif_isp_dpf_gain_usage)nf_r_gainNoise function Gain that replaces the AWB gain for red pixels
nf_b_gainNoise function Gain that replaces the AWB gain for blue pixels
nf_gr_gainNoise function Gain that replaces the AWB gain for green pixels in a red line
nf_gb_gainNoise function Gain that replaces the AWB gain for green pixels in a blue line
-
struct rkisp1_cif_isp_dpf_config¶
Configuration used by De-noising pre-filter
Definition:
struct rkisp1_cif_isp_dpf_config {
struct rkisp1_cif_isp_dpf_gain gain;
struct rkisp1_cif_isp_dpf_g_flt g_flt;
struct rkisp1_cif_isp_dpf_rb_flt rb_flt;
struct rkisp1_cif_isp_dpf_nll nll;
};
Members
gainnoise function gain
g_fltgreen filter config
rb_fltred blue filter config
nllnoise level lookup
-
struct rkisp1_cif_isp_dpf_strength_config¶
strength of the filter
Definition:
struct rkisp1_cif_isp_dpf_strength_config {
__u8 r;
__u8 g;
__u8 b;
};
Members
rfilter strength of the RED filter
gfilter strength of the GREEN filter
bfilter strength of the BLUE filter
-
struct rkisp1_cif_isp_isp_other_cfg¶
Parameters for some blocks in rockchip isp1
Definition:
struct rkisp1_cif_isp_isp_other_cfg {
struct rkisp1_cif_isp_dpcc_config dpcc_config;
struct rkisp1_cif_isp_bls_config bls_config;
struct rkisp1_cif_isp_sdg_config sdg_config;
struct rkisp1_cif_isp_lsc_config lsc_config;
struct rkisp1_cif_isp_awb_gain_config awb_gain_config;
struct rkisp1_cif_isp_flt_config flt_config;
struct rkisp1_cif_isp_bdm_config bdm_config;
struct rkisp1_cif_isp_ctk_config ctk_config;
struct rkisp1_cif_isp_goc_config goc_config;
struct rkisp1_cif_isp_dpf_config dpf_config;
struct rkisp1_cif_isp_dpf_strength_config dpf_strength_config;
struct rkisp1_cif_isp_cproc_config cproc_config;
struct rkisp1_cif_isp_ie_config ie_config;
};
Members
dpcc_configDefect Pixel Cluster Correction config
bls_configblack level subtraction config
sdg_configsensor degamma config
lsc_configLens Shade config
awb_gain_configAuto White balance gain config
flt_configfilter config
bdm_configdemosaic config
ctk_configcross talk config
goc_configgamma out config
dpf_configDe-noising pre-filter config
dpf_strength_configdpf strength config
cproc_configcolor process config
ie_configimage effects config
-
struct rkisp1_cif_isp_isp_meas_cfg¶
Rockchip ISP1 Measure Parameters
Definition:
struct rkisp1_cif_isp_isp_meas_cfg {
struct rkisp1_cif_isp_awb_meas_config awb_meas_config;
struct rkisp1_cif_isp_hst_config hst_config;
struct rkisp1_cif_isp_aec_config aec_config;
struct rkisp1_cif_isp_afc_config afc_config;
};
Members
awb_meas_configauto white balance config
hst_confighistogram config
aec_configauto exposure config
afc_configauto focus config
-
struct rkisp1_params_cfg¶
Rockchip ISP1 Input Parameters Meta Data
Definition:
struct rkisp1_params_cfg {
__u32 module_en_update;
__u32 module_ens;
__u32 module_cfg_update;
struct rkisp1_cif_isp_isp_meas_cfg meas;
struct rkisp1_cif_isp_isp_other_cfg others;
};
Members
module_en_updatemask the enable bits of which module should be updated
module_ensmask the enable value of each module, only update the module which correspond bit was set in module_en_update
module_cfg_updatemask the config bits of which module should be updated
measmeasurement config
othersother config
-
struct rkisp1_cif_isp_awb_meas¶
AWB measured values
Definition:
struct rkisp1_cif_isp_awb_meas {
__u32 cnt;
__u8 mean_y_or_g;
__u8 mean_cb_or_b;
__u8 mean_cr_or_r;
};
Members
cntWhite pixel count, number of “white pixels” found during last measurement
mean_y_or_gMean value of Y within window and frames, Green if RGB is selected.
mean_cb_or_bMean value of Cb within window and frames, Blue if RGB is selected.
mean_cr_or_rMean value of Cr within window and frames, Red if RGB is selected.
-
struct rkisp1_cif_isp_awb_stat¶
statistics automatic white balance data
Definition:
struct rkisp1_cif_isp_awb_stat {
struct rkisp1_cif_isp_awb_meas awb_mean[RKISP1_CIF_ISP_AWB_MAX_GRID];
};
Members
awb_meanMean measured data
-
struct rkisp1_cif_isp_bls_meas_val¶
BLS measured values
Definition:
struct rkisp1_cif_isp_bls_meas_val {
__u16 meas_r;
__u16 meas_gr;
__u16 meas_gb;
__u16 meas_b;
};
Members
meas_rMean measured value for Bayer pattern R
meas_grMean measured value for Bayer pattern Gr
meas_gbMean measured value for Bayer pattern Gb
meas_bMean measured value for Bayer pattern B
-
struct rkisp1_cif_isp_ae_stat¶
statistics auto exposure data
Definition:
struct rkisp1_cif_isp_ae_stat {
__u8 exp_mean[RKISP1_CIF_ISP_AE_MEAN_MAX];
struct rkisp1_cif_isp_bls_meas_val bls_val;
};
Members
exp_meanMean luminance value of block xx
bls_valBLS measured values
Description
The number of entries of exp_mean depends on the hardware revision as is reported by the hw_revision field of the struct media_device_info that is returned by ioctl MEDIA_IOC_DEVICE_INFO.
V10 has RKISP1_CIF_ISP_AE_MEAN_MAX_V10 entries, V12 has RKISP1_CIF_ISP_AE_MEAN_MAX_V12 entries. RKISP1_CIF_ISP_AE_MEAN_MAX is equal to the maximum of the two.
Image is divided into 5x5 blocks on V10 and 9x9 blocks on V12.
-
struct rkisp1_cif_isp_af_meas_val¶
AF measured values
Definition:
struct rkisp1_cif_isp_af_meas_val {
__u32 sum;
__u32 lum;
};
Members
sumsharpness value
lumluminance value
-
struct rkisp1_cif_isp_af_stat¶
statistics auto focus data
Definition:
struct rkisp1_cif_isp_af_stat {
struct rkisp1_cif_isp_af_meas_val window[RKISP1_CIF_ISP_AFM_MAX_WINDOWS];
};
Members
windowAF measured value of window x
Description
The module measures the sharpness in 3 windows of selectable size via register settings(ISP_AFM_*_A/B/C)
-
struct rkisp1_cif_isp_hist_stat¶
statistics histogram data
Definition:
struct rkisp1_cif_isp_hist_stat {
__u32 hist_bins[RKISP1_CIF_ISP_HIST_BIN_N_MAX];
};
Members
hist_binsmeasured bin counters. Each bin is a 20 bits unsigned fixed point type. Bits 0-4 are the fractional part and bits 5-19 are the integer part.
Description
The window of the measurements area is divided to 5x5 sub-windows for V10 and to 9x9 sub-windows for V12. The histogram is then computed for each sub-window independently and the final result is a weighted average of the histogram measurements on all sub-windows. The window of the measurements area and the weight of each sub-window are configurable using struct rkisp1_cif_isp_hst_config.
The histogram contains 16 bins in V10 and 32 bins in V12.
The number of entries of hist_bins depends on the hardware revision as is reported by the hw_revision field of the struct media_device_info that is returned by ioctl MEDIA_IOC_DEVICE_INFO.
V10 has RKISP1_CIF_ISP_HIST_BIN_N_MAX_V10 entries, V12 has RKISP1_CIF_ISP_HIST_BIN_N_MAX_V12 entries. RKISP1_CIF_ISP_HIST_BIN_N_MAX is equal to the maximum of the two.
-
struct rkisp1_cif_isp_stat¶
Rockchip ISP1 Statistics Data
Definition:
struct rkisp1_cif_isp_stat {
struct rkisp1_cif_isp_awb_stat awb;
struct rkisp1_cif_isp_ae_stat ae;
struct rkisp1_cif_isp_af_stat af;
struct rkisp1_cif_isp_hist_stat hist;
};
Members
awbstatistics data for automatic white balance
aestatistics data for auto exposure
afstatistics data for auto focus
histstatistics histogram data
-
struct rkisp1_stat_buffer¶
Rockchip ISP1 Statistics Meta Data
Definition:
struct rkisp1_stat_buffer {
__u32 meas_type;
__u32 frame_id;
struct rkisp1_cif_isp_stat params;
};
Members
meas_typemeasurement types (RKISP1_CIF_ISP_STAT_* definitions)
frame_idframe ID for sync
paramsstatistics data