mirror of
https://github.com/raspberrypi/userland.git
synced 2025-12-06 04:49:12 +00:00
isp: Allow setting Black Level for all 3 channels (whilst still preserving the old single channel method).
The new 3-channel method wants 16-bit black levels whereas the single-channel method uses native sensor bit depth. This does lead to some slightly awkward code; please refer to the inline comments for the conventions used.
This commit is contained in:
committed by
popcornmix
parent
b1dc4cb6a7
commit
b8fa9560f9
@@ -141,7 +141,7 @@ enum {
|
||||
MMAL_PARAMETER_JPEG_RESTART_INTERVAL, /**< Takes a @ref MMAL_PARAMETER_UINT32_T */
|
||||
MMAL_PARAMETER_CAMERA_ISP_BLOCK_OVERRIDE, /**< Takes a @ref MMAL_PARAMETER_UINT32_T */
|
||||
MMAL_PARAMETER_LENS_SHADING_OVERRIDE, /**< Takes a @ref MMAL_PARAMETER_LENS_SHADING_T */
|
||||
MMAL_PARAMETER_BLACK_LEVEL, /**< Takes a @ref MMAL_PARAMETER_UINT32_T */
|
||||
MMAL_PARAMETER_BLACK_LEVEL, /**< Takes a @ref MMAL_PARAMETER_UINT32_T or @ref MMAL_PARAMETER_BLACK_LEVEL_T */
|
||||
MMAL_PARAMETER_RESIZE_PARAMS, /**< Takes a @ref MMAL_PARAMETER_RESIZE_T */
|
||||
MMAL_PARAMETER_CROP, /**< Takes a @ref MMAL_PARAMETER_CROP_T */
|
||||
MMAL_PARAMETER_OUTPUT_SHIFT, /**< Takes a @ref MMAL_PARAMETER_INT32_T */
|
||||
@@ -994,4 +994,13 @@ typedef struct MMAL_PARAMETER_CUSTOM_CCM_T {
|
||||
MMAL_PARAMETER_CCM_T ccm; /**< CCM to be used. */
|
||||
} MMAL_PARAMETER_CUSTOM_CCM_T;
|
||||
|
||||
typedef struct MMAL_PARAMETER_BLACK_LEVEL_T {
|
||||
MMAL_PARAMETER_HEADER_T hdr;
|
||||
|
||||
MMAL_BOOL_T enable; /**< Enable denoise parameters. */
|
||||
uint16_t black_level_r; /**< Black level of red channel (out of 16 bits). */
|
||||
uint16_t black_level_g; /**< Black level of green channel (out of 16 bits). */
|
||||
uint16_t black_level_b; /**< Black level of blue channel (out of 16 bits). */
|
||||
} MMAL_PARAMETER_BLACK_LEVEL_T;
|
||||
|
||||
#endif /* MMAL_PARAMETERS_CAMERA_H */
|
||||
|
||||
@@ -2736,5 +2736,20 @@ Used by the MMAL framework predominantly.
|
||||
Superceded by OMX_IndexParamMinimumAlignment.
|
||||
*/
|
||||
|
||||
/* OMX_IndexParamBrcmBlackLevel: Manual black level parameters. */
|
||||
/*
|
||||
Configures the black level within the ISP pipeline.
|
||||
*/
|
||||
typedef struct OMX_PARAM_BLACKLEVELTYPE {
|
||||
OMX_U32 nSize;
|
||||
OMX_VERSIONTYPE nVersion;
|
||||
|
||||
OMX_BOOL bEnabled; /**< Enable black level subtraction */
|
||||
OMX_U16 nBlackLevelR; /**< Black level of red channel */
|
||||
OMX_U16 nBlackLevelG; /**< Black level of green channel */
|
||||
OMX_U16 nBlackLevelB; /**< Black level of blue channel */
|
||||
OMX_U16 nBitDepth; /**< Bit depth - refer to comments in code where used */
|
||||
} OMX_PARAM_BLACKLEVELTYPE;
|
||||
|
||||
#endif
|
||||
/* File EOF */
|
||||
|
||||
@@ -531,7 +531,7 @@ typedef enum OMX_INDEXTYPE {
|
||||
OMX_IndexParamBrcmIspBlockOverride, /**< reference: OMX_PARAM_U32TYPE */
|
||||
OMX_IndexParamBrcmSupportsUnalignedSliceheight, /**< reference: OMX_CONFIG_PORTBOOLEANTYPE */
|
||||
OMX_IndexParamBrcmLensShadingOverride, /**< reference: OMX_PARAM_LENSSHADINGOVERRIDETYPE */
|
||||
OMX_IndexParamBrcmBlackLevel, /**< reference: OMX_PARAM_U32TYPE */
|
||||
OMX_IndexParamBrcmBlackLevel, /**< reference: OMX_PARAM_BLACKLEVELTYPE */
|
||||
OMX_IndexParamOutputShift, /**< reference: OMX_PARAM_S32TYPE */
|
||||
OMX_IndexParamCcmShift, /**< reference: OMX_PARAM_S32TYPE */
|
||||
OMX_IndexParamCustomCcm, /**< reference: OMX_PARAM_CUSTOMCCMTYPE */
|
||||
|
||||
Reference in New Issue
Block a user