feat(isp): support ISP DPC, add tests and use it in multi pipeline example

This commit is contained in:
gaoxu
2026-08-19 09:30:36 +08:00
committed by Gao Xu
parent 57f61e7933
commit 12174eb90e
30 changed files with 3693 additions and 7 deletions
+44
View File
@@ -414,6 +414,50 @@ typedef union {
uint32_t val; ///< 32-bit color saturation value
} isp_color_saturation_t;
/*---------------------------------------------------------------
DPC
---------------------------------------------------------------*/
#define ISP_DPC_RATIO_INT_BITS 1
#define ISP_DPC_RATIO_DEC_BITS 4
#define ISP_DPC_RATIO_RES_BITS 27
#define ISP_DPC_RATIO_MAX (1U << ISP_DPC_RATIO_DEC_BITS)
#define ISP_DPC_DEVIATION_FACTOR_INT_BITS 1
#define ISP_DPC_DEVIATION_FACTOR_DEC_BITS 5
#define ISP_DPC_DEVIATION_FACTOR_RES_BITS 26
#define ISP_DPC_DEVIATION_FACTOR_MAX (1U << ISP_DPC_DEVIATION_FACTOR_DEC_BITS)
/**
* @brief ISP DPC first-stage ratio
*
* @note Value = integer + decimal / ISP_DPC_RATIO_MAX. Range 0 ~ 1.
* Fractional values use integer 0 and decimal 0 ~ (ISP_DPC_RATIO_MAX - 1);
* 1.0 uses integer 1 and decimal 0.
*/
typedef union {
struct {
uint32_t decimal: ISP_DPC_RATIO_DEC_BITS; ///< Decimal part
uint32_t integer: ISP_DPC_RATIO_INT_BITS; ///< Integer part
uint32_t reserved: ISP_DPC_RATIO_RES_BITS; ///< Reserved
};
uint32_t val; ///< 32-bit first-stage ratio register value
} isp_dpc_ratio_t;
/**
* @brief ISP DPC second-stage deviation factor
*
* @note Value = integer + decimal / ISP_DPC_DEVIATION_FACTOR_MAX. Range 0 ~ 1.
* Fractional values use integer 0 and decimal 0 ~ (ISP_DPC_DEVIATION_FACTOR_MAX - 1);
* 1.0 uses integer 1 and decimal 0.
*/
typedef union {
struct {
uint32_t decimal: ISP_DPC_DEVIATION_FACTOR_DEC_BITS; ///< Decimal part
uint32_t integer: ISP_DPC_DEVIATION_FACTOR_INT_BITS; ///< Integer part
uint32_t reserved: ISP_DPC_DEVIATION_FACTOR_RES_BITS; ///< Reserved
};
uint32_t val; ///< 32-bit deviation factor register value
} isp_dpc_deviation_factor_t;
/*---------------------------------------------------------------
LSC
---------------------------------------------------------------*/