////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
// All rights reserved.
// Confidential and Proprietary - Qualcomm Technologies, Inc.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @file  camxispiqmodule.h
/// @brief TITAN IQ Module base class declarations
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

// NOWHINE FILE CP021: default arguments in functions
// NOWHINE FILE CP007: Use template for trigger 2.0

#ifndef CAMXISPIQMODULE_H
#define CAMXISPIQMODULE_H

#include "chistatsproperty.h"
#include "chitintlessinterface.h"

#include "camxcslifedefs.h"
#include "camxcslispdefs.h"
#include "camxcmdbuffermanager.h"
#include "camxdefs.h"
#include "camxformats.h"
#include "camxhal3metadatatags.h"
#include "camxhal3metadatatagtypes.h"
#include "camxhwcontext.h"
#include "camxhwenvironment.h"
#include "camxifeproperty.h"
#include "camxisphwsetting.h"
#include "camxmem.h"
#include "chiifedefs.h"
#include "chiipedefs.h"
#include "chieisdefs.h"
#include "camxpacketbuilder.h"
#include "camxsensorproperty.h"
#include "camxtitan17xdefs.h"
#include "chiiqmodulesettings.h"
#include "chiisphvxdefs.h"
#include "chipdlibinterface.h"
#include "ipe_data.h"
#include "iqcommondefs.h"
#include "camxifestripinginterface.h"
#include "camxtfestripinginterface.h"
#include "GeoLib.h"
#include "camxopestripinginterface.h"
#include "chituningmodeparam.h"
#include "GeoLib.h"
#include "camxhwltuningdump.h"
#include "camxtitan5xtuningdump.h"
#include "camxcdmdefs.h"
#include "iqsettingutil.h"
#include "chibinarylog.h"
#include "camxstatsinternalproperty.h"

CAMX_NAMESPACE_BEGIN



class  ISPIQModule;
class  ISPHWSetting;

struct IFETuningMetadata;
struct BPSTuningMetadata;
struct IPETuningMetadata;
struct TFETuningMetadata;
struct OPETuningMetadata;

#define IQMOD_LOGE(fmt, ...)  CAMX_LOG_ERROR(CamxLogGroupIQMod, "%s " fmt, m_pNodeIdentifier, ##__VA_ARGS__)
#define IQMOD_LOGW(fmt, ...)  CAMX_LOG_WARN(CamxLogGroupIQMod, "%s " fmt, m_pNodeIdentifier, ##__VA_ARGS__)
#define IQMOD_LOGI(fmt, ...)  CAMX_LOG_INFO(CamxLogGroupIQMod, "%s " fmt, m_pNodeIdentifier, ##__VA_ARGS__)
#define IQMOD_LOGV(fmt, ...)  CAMX_LOG_VERBOSE(CamxLogGroupIQMod, "%s " fmt, m_pNodeIdentifier, ##__VA_ARGS__)

const UINT DEBUG_DATA_DUMP_TRIGGER_STR_LEN = 64;
const CHAR DEBUG_DATA_DUMP_FILE_NAME[]     = "HWLDebugData.bin";

const UINT MaxBPSIQModules = 30;                                  ///< Max Number of IQ Modules
const UINT MaxCVPIQModules = 6;                                   ///< Max Number of IQ Modules

/// @brief ISP IQ Module Version Mask
static const UINT32 ISPVersionMask = 0xf0000000;

/// @brief Fixed point number with 21 fractional bits
static const UINT32 Q21 = 1 << 21;

/// @brief Fixed point number with 16 fractional bits
static const UINT32 Q16 = 1 << 16;

/// @brief Fixed point number with 14 fractional bits
static const UINT32 Q14 = 1 << 14;

/// @brief Fixed point number with 13 fractional bits
static const UINT32 Q13 = 1 << 13;

/// @brief Fixed point number with 12 fractional bits
static const UINT32 Q12 = 1 << 12;

/// @brief Fixed point number with 11 fractional bits
static const UINT32 Q11 = 1 << 11;

/// @brief Fixed point number with 8 fractional bits
static const UINT32 Q8 = 1 << 8;

/// @brief Fixed point number with 7 fractional bits
static const UINT32 Q7 = 1 << 7;

/// @brief Fixed point number with 6 fractional bits
static const UINT32 Q6 = 1 << 6;

/// @brief Fixed point number with 4 fractional bits for ica30
static const UINT32 Q4 = 1 << 4;

/// @brief Fixed point number with 3 fractional bits
static const UINT32 Q3 = 1 << 3;

/// @brief DMI Entry size, in bytes
static const UINT DMIEntrySize = 16;

/// @brief Total Bin Number of HDR10p
static const UINT32 HDR10pTotalNumberOfBins     = 1024;

/// @brief HDR10p bin size
static const UINT32 HDR10pBinSize               = 4;

typedef UINT32 IFELitePath;

static constexpr IFELitePath Gamma0Output  = 0;
static constexpr IFELitePath Gamma1Output  = 1;
static constexpr IFELitePath Gamma2Output  = 2;
typedef UINT32 IFEPath;

static const IFEPath MaxMNDSPath        = 3;    ///< Maximum paths for MNDS Output

static const IFEPath FDOutput           = 0;    ///< MNDS/RoundClamp FD outputf path
static const IFEPath FullOutput         = 1;    ///< MNDS/RoundClamp Full output path
static const IFEPath DS4Output          = 2;    ///< RoundClamp DS4 output path
static const IFEPath DS16Output         = 3;    ///< RoundClamp DS16 output path
static const IFEPath PixelRawOutput     = 4;    ///< RoundClamp pixel raw dump
static const IFEPath PDAFRawOutput      = 5;    ///< PDAF RAW Output
static const IFEPath DisplayFullOutput  = 6;    ///< MNDS/RoundClamp Display Full output path
static const IFEPath DisplayDS4Output   = 7;    ///< RoundClamp Display DS4 output path
static const IFEPath DisplayDS16Output  = 8;    ///< RoundClamp Display DS16 output path
static const IFEPath LCROutput          = 9;    ///< LCR Output Path
static const IFEPath SFERawOutput       = 10;   ///< SFE Raw Output Path
static const IFEPath SFELCROutput       = 11;   ///< SFE LCR Output
static const IFEPath SparsePDOutput     = 12;   ///< SparsePD Out
static const IFEPath BDS2Output         = 13;   ///< BDS2 Out
static const IFEPath AIOutput           = 14;   ///< AI path Out
static const IFEPath IROutputPath       = 15;   ///< IR path Out
static const IFEPath HDRStatsOutputPath = 16;   ///< HDR stats, mask/count path Out
static const IFEPath AIOutput1          = 17;   ///< AI path Out
static const IFEPath AIOutput2          = 18;   ///< AI path Out
static const IFEPath IROutput           = 19;   ///< IR path Out
static const IFEPath MaxRoundClampPath  = 20;   ///< Maximum paths for Round and Clamp output

static const UINT32 MaxStatsPorts = CSLIFEOutputStatsIHIST - CSLIFEOutputStatsHDRBE + 1
                                    + (CSLIFEOutputMax - CSLIFEOutputStatsAECBFW); ///< Maximum num of stats ports

static const UINT32 DS2Factor  = 2;    ///< Constant to calculate DS2 output with respect to Full out
static const UINT32 DS4Factor  = 4;    ///< Constant to calculate DS4 output with respect to Full out
static const UINT32 DS16Factor = 16;   ///< Constant to calculate DS16 output with respect to Full out
static const UINT32 DS64Factor = 64;   ///< Constant to calculate DS64 output with respect to Full out

static const UINT32 YUV420SubsampleFactor = 2;  ///< Subsample factor of chroma data with respect to Luma data

static const UINT32 ColorCorrectionRows     = 3;    ///< Color correction transform matrix rows
static const UINT32 ColorCorrectionColumns  = 3;    ///< Color correction transform matrix columns
static const UINT32 TotalChannels           = 4;    ///< Total IFE channels R, Gr, Gb and B

static const FLOAT IPEDownscaleThresholdMin = 1.0f;  ///< Min scale ratio above which downscaling causes IQ issues
static const FLOAT IPEDownscaleThresholdMax = 1.05f; ///< Max scale ratio below which downscaling causes IQ issues

static const FLOAT IPEUpscaleThresholdMin   = 0.95f; ///< Min scale ratio above which upscaling causes IQ issues
static const FLOAT IPEUpscaleThresholdMax   = 1.0f;  ///< Max scale ratio below which upscaling causes IQ issues

static const UINT32 OPEMaxNumStripes = 32;           ///< Considering 25MP as limit with width ~6000pixels
static const UINT   MaxCVPIQModule   = 6;            ///< Max Number of IQ Modules

static const UINT32 ProgramIndexMaxDSXDC4  = 3; ///< (DS4 generic, DSX4Y, DSX4C)
static const UINT32 ProgramIndexMaxDSXDC16 = 6; ///< (DS4 generic, DSX4Y, DSX4C, DS16 gen, DS16Y, DS16C)
static const UINT32 ProgramIndexMaxDSXDC64 = 9; ///< (DS4 generic, DSX4Y, DSX4C, DS16 gen, DS16Y, DS16C, DS64 gen, DS64Y, DS64C)
static const UINT32 ProgramIndexMaxICA     = 2; ///< (ICA1, ICA2)

static const UINT8 PDAFPixelMaskWidth  = 64; ///< PDAF Pixel Mask Width
static const UINT8 PDAFPixelMaskHeight = 64; ///< PDAF Pixel Mask Height

static const INT32 WidthDimensionFHD  = 1920;
static const INT32 HeightDimensionFHD = 1080;

static const INT32 WidthDimension4K  = 3840;
static const INT32 HeightDimension4K = 2160;

static const INT32 WidthDimension8K  = 7680;
static const INT32 HeightDimension8K = 4320;

/// @brief Color Format trigger values
static const FLOAT ColorFromat_BT601_SDR    = 0.0f;
static const FLOAT ColorFromat_BT709_SDR    = 1.0f;
static const FLOAT ColorFromat_DisP3_SDR    = 2.0f;
static const FLOAT ColorFromat_DisP3_HLG    = 3.0f;
static const FLOAT ColorFromat_BT2020_HLG   = 4.0f;
static const FLOAT ColorFromat_DisP3_HDR10  = 5.0f;
static const FLOAT ColorFromat_BT2020_HDR10 = 6.0f;

/// @brief CFA color patterns of R=0, G=1, B=2, Other(W/IR)=3
enum IFECFAPixelType
{
    R  = 0, ///< Red Color
    G  = 1, ///< Green Color
    B  = 2, ///< Blue Color
    W  = 3, ///< White or Mono Color
    IR = 3, ///< IR pixels
    O  = 0, ///< Other Color - Default value to fill not a real color
};

enum ChromaDownSample
{
    OddIndexPixelDrop = 0xAAA,      ///Configure Pix_drop_pattern reg to drop odd index pixel
    EvenIndexPixelDrop = 0x555,     ///Configure Pix_drop_pattern reg to drop even index pixel
};

static const UINT  MaxNumOEMVendorTags = 15; ///< Max number of OEM vendor tags

static const UINT  MAX_NUM_FACES = 10;       ///< max faces

/// @brief Output Data to AIDE10 IQ Module
struct AIDENOISER10OutputData
{
    aidenoiser_1_0_0::aidenoiser10_rgn_dataType* aiDenoiser10Output;  ///< AIDE10 Output Data
};

/// @brief Output Data to SWMF20 IQ Module
struct SWMFNR20OutputData
{
    swmfnr_2_0_0::swmfnr20_rgn_dataType* swmfOutData;  ///< SWMF Output Data
};

/// @brief Output Data to SWMF30 IQ Module
struct SWMFNR30OutputData
{
    swmfnr_3_0_0::swmfnr30_rgn_dataType* swmfOutData;  ///< SWMF30 Output Data
};

/// @brief Output Data to CVP10
struct CVPOutputData
{
    FLOAT             robustness_max_allowed_NCC;                                ///< robustness max allowed NCC
    FLOAT             robustness_min_allowed_tar_var;                            ///< robustness min allowed tar var
    FLOAT             robustness_meaningful_ncc_diff;                            ///< robustness meaningful ncc diff
    FLOAT             fpx_threshold;                                             ///< fpx threshold
    FLOAT             desc_match_threshold;                                      ///< desc match threshold
    FLOAT             enable_transform_confidence;                               ///< enable transform confidence
    FLOAT             transform_confidence_mapping_base;                         ///< transform confidence mapping_base
    FLOAT             transform_confidence_mapping_c1;                           ///< transform confidence mapping c1
    FLOAT             transform_confidence_mapping_c2;                           ///< transform confidence mapping c2
    FLOAT             transform_confidence_thr_to_force_identity_transform;      ///< thr to force identity transform
    FLOAT             enable_gyro_transform_confidence;                          ///< enable gyro transform confidence
    FLOAT             gyro_transform_confidence_mapping_base;                    ///< gyro transform confidence mapping_base
    FLOAT             gyro_transform_confidence_mapping_c1;                      ///< gyro transform confidence mapping c1
    FLOAT             gyro_transform_confidence_mapping_c2;                      ///< gyro transform confidence mapping c2
    UINT32            robustness_measure_dist_map[8];                            ///< robustness measure dist map
    UINT32            descriptor_Lpf;                                            ///< descriptor Lpf
    UINT32            fpx_score_shift;                                           ///< fpx score shift
    UINT32            inlier_track_enable;                                       ///< inlier track enable
    UINT32            transform_model;                                           ///< transform model
    UINT32            multi_frame_input_resolution;                              ///< multi frame input resolution
    FLOAT             video_registration_down_scale_ratio;                       ///< video registration downscale ratio
    UINT32            confidence_auto_identity_detect;                           ///< confidence value for auto identity mode
    UINT32            selfie_hdr_enable;                                         ///< if Selfie HDR is enabled
    FLOAT             selfie_hdr_face_threshold;                                 ///< Selfie HDR threshold
    UINT32            blend_all_frames;                                          ///< If blend all frames for MMF snapshots
};

static const UINT32 NumOfANRLUTs = 6;

/// @brief Node execution context that the TMC module runs
enum class NodeExecutionContext
{
    IFE,        ///< IFE     node context
    IFELITE,    ///< IFELITE node context
    BPS,        ///< BPS     node context
    OPE,        ///< OPE     node context
    IPE,        ///< IPE     node context
    CVP,        ///< CVP     node context
    TFE         ///< TFE     node context
};

static const UINT32 ScaleRatioLimit = 105;   ///< Scaling ratio limit beyond which artificats are seen

enum ISPChannel
{
    ISPChannelRed = 0,      ///< ISP red channel
    ISPChannelGreenOdd,     ///< ISP green odd channel
    ISPChannelGreenEven,    ///< ISP green even channel
    ISPChannelBlue,         ///< ISP blue channel
    ISPChannelMax           ///< Max ISP channel
};

enum IFERDIPath
{
    RDI0 = 0,   ///< RDI0 path
    RDI1,       ///< RDI1 path
    RDI2,       ///< RDI2 path
    RDI3,       ///< RDI3 path
    MaxPath         ///< Max RDI paths
};

/// @brief enumeration defining IPE path
enum class IPEPath : UINT
{
    INPUT = 0,    ///< Input
    REFERENCE,    ///< Reference
    CVPICA,       ///< CVP ICA
    MFHDR_0,      ///< MFHDR_0
    MFHDR_1,      ///< MFHDR_1
    MFHDR_2,      ///< MFHDR_2
    MFHDR_3,      ///< MFHDR_3
    TF_EXTRAPASS, ///< TF Extra pass
    BAYER,        ///< Bayer
    NPS_RGB,      ///< NPS RGB
};

/// @brief IFE Split
enum IFEStripe : UINT32
{
    IFECommonStripe = 0, ///< 0: Common Stripe
    IFELeftStripe   = 1, ///< 1: Left Stripe
    IFERightStripe  = 2, ///< 2: Right Stripe
    IFEMaxStripes   = 3, ///< 3: Max Stripes
};

/// @brief enumeration defining MFHDR pipeline stage
enum class MFHDRSTAGE : UINT32
{
    MFHDR_NONE  = 0,        ///< MFHDR None Stage
    MFHDR_PRE   = 1,        ///< MFHDR Pre Fusion Stage
    MFHDR_MERGE = 2,        ///< MFHDR Fusion Stage
    MFHDR_POST  = 3,        ///< MFHDR Post Fusion Stage
    MFHDRSTAGE_MAX = 4,     ///< MFHDR Max Stage
};

/// @brief Image Warping Grid type
enum ImageWarpGrids
{
    In2OutGrid = 0,     ///< In2Out Grid type
    Out2InGrid,         ///< Out2In Grid type
    GridMaxType         ///< Max number of LDC Grid type
};

/// @brief IPE ICA in perspective type
enum IPEICAInPerspectiveType
{
    IPEICAInPerspectiveDefault = 0,   ///< Default input perspective
    IPEICAInPerspectiveStabilize,     ///< Input perspective transform for stabilization
    IPEICAInPerspectiveMax,           ///< max type
};

/// @brief IPE ICA in grid type
enum IPEICAInGridType
{
    IPEICAInGridDefault = 0,    ///< Default input grid
    IPEICAInGridStabilize,      ///< Input grid transform for stabilization
    IPEICAInGridMax,            ///< max type
};

/// @brief IPE ICA reference perspective type
enum IPEICARefPerspectiveType
{
    IPEICARefPerspectiveDefault = 0,  ///< Default reference perspective
    IPEICARefPerspectiveMax,          ///< max type
};

/// @brief IPE ICA reference grid type
enum IPEICARefGridType
{
    IPEICARefGridDefault = 0,   ///< Default reference grid
    IPEICARefGridMax,           ///< max type
};

/// @brief IPE ICA warp data
enum IPEICAWarpDataType
{
    ICAInWarpData = 0,       ///< Warp data for Input
    ICAInStabWarpData,       ///< Stab Warp data for Input
    ICARefWarpData,          ///< Warp data for REFERENCE
    ICARefGyroAlignWarpData, ///< Gyro Align Warp data for REFERENCE
    ICATempWarpData,         ///< Temp Warp data
    ICAScratchWarpData,      ///< Scratch Warp data
};

/// @brief IPE MCTF alignment matrix type
enum IPEMCTFAlignmentType
{
    IPEMCTFAlignmentImage = 0,  ///< Image based alignemnt
    IPEMCTFAlignmentGyro,       ///< Gyro based alignemnt
    IPEMCTFAlignemntMax,        ///< max type
};

/// @brief IPE ICA vendor tag id index
enum IPEICAVendorTagIdIndex
{
    ICAInPerspectiveTransformTagIndex            = 0,      ///< ICAInPerspectiveTransform vendor tag index
    ICAInGridOut2InTransformTagIndex             = 1,      ///< ICAInGridOut2InTransform vendor tag index
    ICAInGridIn2OutTransformTagIndex             = 2,      ///< ICAInGridIn2OutTransform vendor tag index
    ICAInInterpolationParamsTagIndex             = 3,      ///< ICAInInterpolationParams vendor tag index
    ICARefPerspectiveTransformTagIndex           = 4,      ///< ICARefPerspectiveTransform vendor tag index
    ICARefGridTransformTagIndex                  = 5,      ///< ICARefGridTransform vendor tag index
    ICARefInterpolationParamsTagIndex            = 6,      ///< ICARefInterpolationParams vendor tag index
    ICAReferenceParamsTagIndex                   = 7,      ///< ICAReferenceParams vendor tag index
    ICAReferenceParamsLookAheadTagIndex          = 8,      ///< ICAReferenceParamsLookAhead vendor tag index
    ICAReferenceParamsGridTagIndex               = 9,      ///< ICAReferenceParamsGrid vendor tag index
    ICAInPerspectiveTransformLookAheadTagIndex   = 10,     ///< ICAInPerspectiveTransform vendor tag index
    ICAAlignmentPerspectiveTransformIndex        = 11,     ///< ICAPerspective Transform between 2 exposures
    ICAMaxTagIndex                               = 12,     ///< Max tag index
};

/// @brief ICAInputData
struct ICAConfigParameters
{
    IPEICAPerspectiveTransform  ICAInPerspectiveParamsArr[IPEICAInPerspectiveMax];   ///< Perspective parameters for ICA 1
    IPEICAGridTransform         ICAInGridParamsArr[IPEICAInGridMax];                 ///< Grid parameters for ICA 1
    IPEICAGridTransform         ICALD2GridParamsArr[IPEICAInGridMax];                ///< Grid parameters for LD2
    IPEICAInterpolationParams   ICAInInterpolationParams;                            ///< Interpolation parameters for ICA 1
    IPEICAPerspectiveTransform  ICARefPerspectiveParamsArr[IPEICARefPerspectiveMax]; ///< Perspective parameters for ICA 2
    IPEICAGridTransform         ICARefGridParamsArr[IPEICARefGridMax];               ///< Grid parameters for ICA 2
    IPEICAInterpolationParams   ICARefInterpolationParams;                           ///< Interpolation parameters for ICA 2
    IPEICAPerspectiveTransform  ICAReferenceParamsArr[IPEMCTFAlignemntMax];          ///< Reference (MCTF) parameters for ICA 2
    VOID*                       pCurrICAInData;                                      ///< ICA input current frame Data used by
                                                                                     ///< NCLib
    VOID*                       pPrevICAInData;                                      ///< ICA reference current frame Data
    VOID*                       pCurrICAInStabData;                                  ///< ICA input stab current frame Data
                                                                                     ///< used by NCLib
    VOID*                       pPrevICAInStabData;                                  ///< ICA input stab previous frame Data
    VOID*                       pCurWarpAssistStabData;                              ///< Current stab Warp assist data output
                                                                                     ///< from NcLib
    VOID*                       pPrevWarpAssistStabData;                             ///< Previous Warp assist data output
                                                                                     ///< from NcLib
};

static const UINT ICAReferenceNumber = 2;

/// @brief ISP color correction gains
enum ISPColorCorrectionGain
{
    ISPColorCorrectionGainsRed,         ///< Red gain
    ISPColorCorrectionGainsGreenRed,    ///< Green-Red gain
    ISPColorCorrectionGainsGreenBlue,   ///< Green-Blue gain
    ISPColorCorrectionGainsBlue,        ///< Blue gain
    ISPColorCorrectionGainsMax,         ///< Total number of gains
};

/// @brief Command buffer managers in IPE node
enum IPECmdBufferId
{
    CmdBufferFrameProcess = 0,      ///< 0: Top level firmware payload (IpeFrameProcess)
    CmdBufferStriping,              ///< 1: Striping library output (IpeStripingLibOutMultiFrame)
    CmdBufferIQSettings,            ///< 2: IQsettings within top level payload (IpeIQSettings)
    CmdBufferPreLTM,                ///< 3: generic cdm payload of all pre LTM IQ modules
    CmdBufferPostLTM,               ///< 4: generic cdm payload of all post LTM IQ modules
    CmdBufferMFHDRPreLTM,           ///< 5: generic cdm payload of all MFHDR Pre LTM IQ modules
    CmdBufferMFHDRPostLTM,          ///< 6: generic cdm payload of all MFHDR Post LTM IQ modules
    CmdBufferDMIHeader,             ///< 7: CDM headers for all DMI LUTs from IPE IQ modules
    CmdBufferIQPacket,              ///< 8: IQ Packet Manager
    CmdBufferNPS,                   ///< 9: CMD payload for NPS: ANR/TF modules
    CmdBufferDSX,                   ///< 10: CDM payload for DSX IQ module
    CmdBufferBLMemory,              ///< 11: BL Memory Command buffer used by firmware
    CmdBufferGenericBlob,           ///< 12: KMD specific buffer
    CmdBufferExtraPass,             ///< 13: Generic CDM payload for extra pass 0
    CmdBufferPreLTMMultipass,       ///< 14: generic cdm payload of pre LTM multi pass modules
    CmdBufferAIFullPass,            ///< 15: AI full pass cdm payload
    CmdBufferAIDcPass,              ///< 16: AI Dc passes cdm payload
    CmdBufferBayer,                 ///< 17: Generic cdm payload of bayer modules
    IPECmdBufferMaxIds,             ///< 18: Max number of command buffers in IPE node
};

/// @brief CDM Program Array Order : CDMProgramArrays are appended at the bottom of firmware payload (i.e. IpeFrameProcess)
/// For better coding and debugging of payload values, enforcing below order in which CDMProgramArrays shall be appended.
enum CDMProgramArrayOrder
{
    ProgramArrayANRFullPass = 0,             ///< 0: ANR Full Pass index
    ProgramArrayANRDS4,                      ///< 1: ANR DS4 Pass index
    ProgramArrayANRDS16,                     ///< 2: ANR DS16 Pass index
    ProgramArrayANRDS64,                     ///< 3: ANR DS64 Pass index
    ProgramArrayTFFullPass,                  ///< 4: TF Full Pass index
    ProgramArrayTFDS4,                       ///< 5: TF DS4 Pass index
    ProgramArrayTFDS16,                      ///< 6: TF DS16 Pass index
    ProgramArrayTFDS64,                      ///< 7: TF DS64 Pass index
    ProgramArrayPreLTM,                      ///< 8: Pre LTM data index
    ProgramArrayPostLTM,                     ///< 9: Post LTM data index
    ProgramArrayMFHDRPreLTM,                 ///< 10: MFHDR Pre LTM data index
    ProgramArrayMFHDRPostLTM,                ///< 11: MFHDR Post LTM data index
    ProgramArrayICA1,                        ///< 12; ICA1 data index
    ProgramArrayICA2,                        ///< 13; ICA1 data index
    ProgramArrayDsxDc4Addr,                  ///< 14: DSX DS4 Pass index
    ProgramArrayDsxDc16Addr,                 ///< 15: DSX DS16 Pass index
    ProgramArrayDsxDc64Addr,                 ///< 16: DSX DS64 Pass index
    ProgramArrayExtraPass0,                  ///< 17: Extra pass 0 index
    ProgramArrayExtraPass1,                  ///< 18: Extra pass 1 index
    ProgramArrayExtraPass2,                  ///< 19: Extra pass 2 index
    ProgramArrayExtraPass3,                  ///< 20: Extra pass 3 index
    ProgramArrayExtraPass4,                  ///< 21: Extra pass 4 index
    ProgramArrayExtraPass5,                  ///< 22: Extra pass 5 index
    ProgramArrayExtraPass6,                  ///< 23: Extra pass 6 index
    ProgramArrayBLURFullPass,                ///< 24: BLUR Full Pass index
    ProgramArrayBLURDS4,                     ///< 25: BLUR DS4 Pass index
    ProgramArrayBLURDS16,                    ///< 26: BLUR DS16 Pass index
    ProgramArrayLtmMpFull,                   ///< 27: LTM multipass Full index
    ProgramArrayLtmMpDc4,                    ///< 28: LTM multipass Dc4 index
    ProgramArrayLtmMpDc16,                   ///< 29: LTM multipass Dc16 index
    ProgramArrayLtmMpDc64,                   ///< 30: LTM multipass Dc64 index
    ProgramArraySBLURFullPass,               ///< 31: SBLUR Full Pass index
    ProgramArraySBLURDS4,                    ///< 32: SBLUR DS4 Pass index
    ProgramArrayAIFull,                      ///< 33: AI cdm full index
    ProgramArrayAIDc4,                       ///< 34: AI cdm Dc4 index
    ProgramArrayAIDc16,                      ///< 35: AI cdm Dc16 index
    ProgramArrayAIDc64,                      ///< 36: AI cdm Dc64 index
    ProgramArrayMACMpFull,                   ///< 37: MAC multipass Full index
    ProgramArrayMACMpDc4,                    ///< 38: MAC multipass Dc4 index
    ProgramArrayMACMpDc16,                   ///< 39: MAC multipass Dc16 index
    ProgramArrayMACMpDc64,                   ///< 40: MAC multipass Dc64 index
    ProgramArrayAIANRFullPass,               ///< 41: ANR Full Pass index
    ProgramArrayAIANRDS4,                    ///< 42: ANR DS4 Pass index
    ProgramArrayAIANRDS16,                   ///< 43: ANR DS16 Pass index
    ProgramArrayAIANRDS64,                   ///< 44: ANR DS64 Pass index
    ProgramArrayAITFFullPass,                ///< 45: TF Full Pass index
    ProgramArrayAITFDS4,                     ///< 46: TF DS4 Pass index
    ProgramArrayAITFDS16,                    ///< 47: TF DS16 Pass index
    ProgramArrayAITFDS64,                    ///< 48: TF DS64 Pass index
    ProgramArrayBayer,                       ///< 49: Bayer data index
    ProgramArrayMax,                         ///< 50: Max CDM Program Arrays mentioned in firmware payload
};

/// @brief CDM Program Order for Pre LTM
enum PreLTMCDMProgramOrder
{
    ProgramIndexPreLTMGeneric = 0,  ///< 0: Generic type of program
    ProgramIndexHNR,                ///< 1: HNR Module arry index
    ProgramIndexUVG,                ///< 2: UVG Module arry index
    ProgramIndexPreLTMGLUT,         ///< 3. PreLTM Module - Gamma DMI index
    ProgramIndexGTM,                ///< 4. PreLTM Module - GTM DMI index
    ProgramIndexLTM,                ///< 5: PreLTM Module - LTM DMI index
    ProgramIndexMaxPreLTM,          ///< 6: Max number of PreLTM Cdm Programs
};

/// @brief CDM Program Order for Pre LTM Multipass
enum PreLTMMultipassCDMProgramOrder
{
    ProgramIndexPreLTMMultipassGeneric = 0,     ///< 0: Generic type of program
    ProgramIndexSBLURFull,                      ///< 1: SbLUR Full pass data index
    ProgramIndexSBLURDc4,                       ///< 2: Sblur Dc4 pass data index
    ProgramIndexBLURFull,                       ///< 3: Blur Full pass data index
    ProgramIndexBLURDc4,                        ///< 4: Blur Dc4 data index
    ProgramIndexBLURDc16,                       ///< 5: Blur Dc16 data index
    ProgramIndexMACMpFull,                      ///< 6: MAC Full pass data index
    ProgramIndexMACMpDc4,                       ///< 7: MAC Dc4 data index
    ProgramIndexMACMpDc16,                      ///< 8: MAC Dc16 data index
    ProgramIndexMACMpDc64,                      ///< 9: MAC Dc64 data index
    ProgramIndexLTMMpFull,                      ///< 10: LTM Full data index
    ProgramIndexLTMMpDc4,                       ///< 11: LTM Dc4 data index
    ProgramIndexLTMMpDc16,                      ///< 12: LTM Dc16 data index
    ProgramIndexLTMMpDc64,                      ///< 13: LTM Dc64 data index
    ProgramIndexMaxPreLTMMultipass,             ///< 14: Max number of PreLTM multipass Cdm Programs
};

/// @brief CDM Program Order for Post LTM
enum PostLTMCDMProgramOrder
{
    ProgramIndexPostLTMGeneric = 0, ///< 0: Generic type of program
    ProgramIndexGLUT,               ///< 1: PostLTM Module - Gamma DMI program index
    ProgramIndex2DLUT,              ///< 2: PostLTM Module - 2D LUT DMI program index
    ProgramIndexASF,                ///< 3: PostLTM Module - ASF DMI program index
    ProgramIndexVSE,                ///< 4: PostLTM Module - VSE DMI program index
    ProgramIndexUpscale,            ///< 5: PostLTM Module - Upscale DMI program index
    ProgramIndexGRA,                ///< 6: PostLTM Module - GRA DMI program index
    ProgramIndexNPSGLUT,            ///< 7: PostLTM Module - NPS Gamma DMI program index
    ProgramIndexMaxPostLTM,         ///< 8: Max number of PostLTM Cdm Programs
};

/// @brief CDM Program Order for MFHDR Pre LTM
enum MFHDRPreLTMCDMProgramOrder
{
    ProgramIndexMFHDRPreLTMGeneric = 0,       ///< 0: Generic type of program
    ProgramIndexMFHDRGLUT0,                   ///< 1: Gamma_0 DMI program index
    ProgramIndexMFHDRGLUT1,                   ///< 2: Gamma_1 DMI program index
    ProgramIndexMFHDRGLUT2,                   ///< 3: Gamma_2 DMI program index
    ProgramIndexMFHDRMAC,                     ///< 4: MAC DMI program index
    ProgramIndexMFHDRGTM,                     ///< 5: GTM DMI program index
    ProgramIndexMFHDRLTM,                     ///< 6: LTM DMI program index
    ProgramIndexMaxMFHDRPreLTM,               ///< 7: Max number of PostLTM Cdm Programs
};

/// @brief CDM Program Order for MFHDR Post LTM
enum MFHDRPostLTMCDMProgramOrder
{
    ProgramIndexMFHDRPostLTMGeneric = 0, ///< 0: Generic type of program
    ProgramIndexMFHDRGLUT3,              ///< 1: Gamma_3 DMI program index
    ProgramIndexMaxMFHDRPostLTM,         ///< 2: Max number of PostLTM Cdm Programs
};
/// @brief CDM Program Order for DSX
enum DSXCDMProgramOrder
{
    ProgramIndexDSXGeneric = 0,       ///< 0: Generic type of program
    ProgramDSX4Y,                     ///< 1: DSX Module - DS4 DMI program index
    ProgramDSX4C,                     ///< 2: DSX Module - DS4 DMI program index
    ProgramDSX16Y,                    ///< 3: DSX Module - DS16 DMI program index
    ProgramDSX16C,                    ///< 4: DSX Module - DS16 DMI program index
    ProgramDSX64Y,                    ///< 5: DSX Module - DS64 DMI program index
    ProgramDSX64C,                    ///< 6: DSX Module - DS64 DMI program index
    ProgramIndexMaxDSX,               ///< 7: Max DSX Cdm Programs index
};

enum ExtraPassCDMProgramOrder
{
    ProgramExtraPassGeneric = 0,    ///< 0: Extrapass generic program index
    ProgramExtraPassICA1,           ///< 1: ICA1 data index
    ProgramExtraPassICA2,           ///< 2: ICA1 data index
    ProgramExtraPassDSX4Y,          ///< 3: DSX Module - DS4 Y DMI program index
    ProgramExtraPassDSX4C,          ///< 4: DSX Module - DS4 C DMI program index
    ProgramExtraPassGIC,            ///< 5: Bayer Module - GIC DMI program index
    ProgramExtraPassABF,            ///< 6: Bayer Module - ABF DMI program index
    ProgramExtraPassBayerGLUT,      ///< 7: Bayer Module - GLUT DMI program index
    ProgramExtraPassMax,            ///< 8: Max number of extra pass Cdm Programs
};

enum ICAProgramOrder
{
    ProgramIndexICA1 = 0,   ///< ICA program index 1
    ProgramIndexICA2,       ///< ICA program index 2
    ProgramIndexICAMax      ///< ICA program index count
};

/// @brief CDM Program Order for Bayer
enum BayerCDMProgramOrder
{
    ProgramIndexBayerGeneric = 0,  ///< 0: Generic type of program
    ProgramIndexGIC,               ///< 1: Bayer Module - GIC DMI program index
    ProgramIndexABF,               ///< 2: Bayer Module - ABF DMI program index
    ProgramIndexBayerGLUT,         ///< 3: Bayer Module - GLUT DMI program index
    ProgramIndexHDRGIC,            ///< 4: Bayer Module - HDR GIC DMI program index
    ProgramIndexHDRABF,            ///< 5: Bayer Module - HDR ABF DMI program index
    ProgramIndexBayerHDRC,         ///< 6: Bayer Module - HDRC DMI program index
    ProgramIndexBayerGTM,          ///< 7: Bayer Module - BGTM DMI program index
    ProgramIndexBayerLTM,          ///< 8: Bayer Module - BLTM DMI program index
    ProgramIndexMaxBayer,          ///< 9: Max number of Bayer Cdm Programs
};

/// @brief CDM Program Order for Bayer
enum AICDMProgramOrder
{
    ProgramIndexAIGeneric = 0,  ///< 0: Generic type of program
    ProgramIndexCMUS,           ///< 1: Bayer Module - GIC DMI program index
    ProgramIndexSTMP,           ///< 2: Bayer Module - ABF DMI program index
    ProgramIndexMaxAI,          ///< 3: Max number of Bayer Cdm Programs
};

/// @brief CDM Program Order for AI ANR TF
enum AIANRTFProgramOrder
{
    ProgramIndexAIANRTFGeneric = 0,  ///< 0: Generic type of program
    ProgramIndexAIANRFullPass,       ///< 1: AI ANR Full pass
    ProgramIndexAIANRDS4,            ///< 2: AI ANR DS4 pass
    ProgramIndexAIANRDS16,           ///< 3: AI ANR DS16 pass
    ProgramIndexAIANRDS64,           ///< 4: AI ANR DS64 pass
    ProgramIndexAITFFullPass,        ///< 5: AI TF Full pass
    ProgramIndexAITFDS4,             ///< 6: AI ANR DS4 pass
    ProgramIndexAITFDS16,            ///< 7: AI ANR DS16 pass
    ProgramIndexAITFDS64,            ///< 8: AI ANR DS64 pass
    ProgramIndexMaxAIANRTF,          ///< 9: Max number of AI ANR TF Cdm Program
};

/// @brief AI DAS
enum AIDASOrder
{
    DASIndexTone = 0,  ///< 0: AI DAS for Tone
    DASIndexColor,     ///< 1: AI DAS for Color
    DASIndexTexture,   ///< 2: AI DAS for Texture
    DASIndexMax,       ///< 3: max AI DAS
};


// FD and Full out paths are output from MNDS path, it should not exceed 2
CAMX_STATIC_ASSERT((FDOutput < 2) && (FullOutput < 2));

// DS4 and DS16 out paths are output from RoundandClamp path, it should not exceed 4
CAMX_STATIC_ASSERT((DS4Output < 4) && (DS16Output < 4));

/// @brief Bits per pixel for different formats
static const UINT32 BitWidthEight      = 8;
static const UINT32 BitWidthTen        = 10;
static const UINT32 BitWidthTweleve    = 12;
static const UINT32 BitWidthFourteen   = 14;
static const UINT32 BitWidthSixteen    = 16;
static const UINT32 BitWidthTwenty     = 20;
static const UINT32 BitWidthTwentyFour = 24;
static const UINT32 Max8BitValue   = (1 << 8) - 1;   ///< 2^8 - 1
static const UINT32 Max10BitValue  = (1 << 10) - 1;  ///< 2^10 - 1
static const UINT32 Max12BitValue  = (1 << 12) - 1;  ///< 2^12 - 1
static const UINT32 Max14BitValue  = (1 << 14) - 1;  ///< 2^14 - 1

/// @brief Command buffer managers in BPS node
enum BPSCmdBufferId
{
    BPSCmdBufferFrameProcess = 0,    ///< 0: Top level firmware payload (BpsFrameProcess)
    BPSCmdBufferStriping,            ///< 1: Striping library output (BpsStripingLibOutMultiFrame)
    BPSCmdBufferIQSettings,          ///< 2: IQsettings within top level payload (BpsIQSettings)
    BPSCmdBufferDMIHeader,           ///< 3: CDM headers for all DMI LUTs from BPS IQ modules
    BPSCmdBufferCDMProgram,          ///< 4: CDM headers for all CDM programs in BPS
    BPSCmdBufferIQPacket,            ///< 5: IQ Packet
    BPSCmdBufferBLMemory,            ///< 6: BL Memory Command buffer used by firmware
    BPSCmdBufferGenericBlob,         ///< 7: KMD specific buffer
    BPSCmdBufferMaxIds,              ///< 8: Max number of command buffers in BPS node
};

/// @brief BPS CDM Program Order
/// Order of enum should match _ProgramType of fwdefs.h
enum BPSCDMProgramOrder
{
    BPSProgramIndexGeneric = 0,      ///< 0: Generic type of program for BPS
    BPSProgramIndexPEDESTAL,         ///< 1: Pedestal DMI program index
    BPSProgramIndexLINEARIZATION,    ///< 2: Linearization DMI program index
    BPSProgramIndexBPCPDPC,          ///< 3: BPC PDPC DMI program index
    BPSProgramIndexGIC,              ///< 4: GIC DMI program index
    BPSProgramIndexABF,              ///< 5: ABF DMI program index
    BPSProgramIndexRolloff,          ///< 6: Roll off DMI program index
    BPSProgramIndexGTM,              ///< 7: GTM DMI program index
    BPSProgramIndexGLUT,             ///< 8: GLUT DMI program index
    BPSProgramIndexHNR,              ///< 9: HNR DMI program index
    BPSProgramIndexUVGamma,          ///< 10: UV GLUT DMI program index
    BPSProgramIndexLCAC,             ///< 11: LCAC DMI program index
    BPSProgramIndexBAYERLTM,         ///< 12: Bayer LTM DMI program index
    BPSProgramIndexBAYERGTM,         ///< 13: Bayer GTM DMI program index
    BPSProgramIndexPDPCBPC1D,        ///< 14: PDPC 1D DMI program index
    BPSProgramIndexFCG,              ///< 15: FCG program index
    BPSProgramIndexMax,              ///< 16: Max number of BPS Cdm Program
};

/// @brief VFE Stats Module Type
enum class ISPStatsModuleType
{
    IFEAWBBG,       ///< AWB Bayer Grid  Stats Module
    IFEBF,          ///< Bayer Focus Stats Module
    IFECAF,         ///< Contrast Focus Stats Module
    IFECS,          ///< CS Stats Module
    IFEBHist,       ///< AEC BHist stats
    IFEGTMBHist,    ///< GTM BHist stats
    IFEHDRBE,       ///< HDR BE Stats Module
    IFEHDRBHist,    ///< HDR Bayer Histogram module
    IFEIHist,       ///< Image Histogram Module
    IFERS,          ///< RS Stats Module
    IFEBayerRS,     ///< Bayer RS Stats Module
    IFETintlessBG,  ///< Tintless Bayer Grid Stats Module
    IFEAECBE,       ///< IFE AEC BE stats
    IFEAECBHist,    ///< IFE AEC BHist Stats
    IFEBFW,         ///< BFW Stst
    IFEALSCBG,      ///< ALSC Bayer Grid Stats Module
    IFEIRBG,        ///< IFE IR BG stats
    IFEIRBHist,   ///< IFE IR BHist stats

    IPEHDR10P,      ///< HDR10 Plus module in PPS
    IPEIHist,       ///< Image Histogram Module
    IPESTATSGS,     ///< GS module in PPS
    IPEStatsMIN = IPEHDR10P,  ///< IPE Stats Min
    IPEStatsMAX = IPESTATSGS, ///< IPE Stats Max

    SFEAWBBG,       ///< SFE AWB BG Stats module
    SFEBHist,       ///< SFE Bhist Stats module
    SFEBayerRS,     ///< Bayer RS Stats Module

    TFEAWBBG,       ///< AWB Bayer Grid  Stats Module
    TFEBF,          ///< Bayer Focus Stats Module
    TFEBHist,       ///< BHist stats
    TFEAECBG,       ///< AEC BG Stats Module
    TFETintlessBE,  ///< Tintless Bayer Grid Stats Module
    TFERS,          ///< RS Stats Module for TFE

    OPEIHist,       ///< Image Histogram Module
    OPERS,           ///< RS Stats Module
    IFELiteAECBG,                          ///< IFELite AEC Bayer Grid
    IFELiteBHist,                          ///< IFELite Bhist
    ISPStatsModuleTypeMax = IFELiteBHist   ///< ISPStatsModuleType max value
};

/// @brief TITAN IQ Tone map module Type
enum class ISPIQToneMapModuleVersion
{
    BPSBAYERGTM10,  ///< BPS BAYER GTM 10
    BPSBAYERLTM10,  ///< BPS BAYER LTM 10
    BPSGTM10,       ///< BPS GTM 10
    BPSGTM101,      ///< BPS GTM 101
    BPSGTM13,       ///< BPS GTM 13
    BPSWB21,        ///< BPS WB 21
    IFEBAYERGTM10,  ///< IFE BAYER GTM 10
    IFEBAYERLTM10,  ///< IFE BAYER LTM 10
    IFEBAYERLTM11,  ///< IFE BAYER LTM 11
    IFEBAYERLTM12,  ///< IFE BAYER LTM 12
    IFEGTM10,       ///< IFE GTM 10
    IFEGTM101,      ///< IFE GTM 10
    IFEGTM13,       ///< IFE GTM 13
    IFEWB21,        ///< IFE WB 21
    IPEGTM12,       ///< IPE GTM 12
    IPEGTM13,       ///< IPE GTM 13
    IPELTM13,       ///< IPE LTM 13
    IPELTM14,       ///< IPE LTM 14
    IPELTM15 ,      ///< IPE LTM 15
    IPEMFHDRGTM13,  ///< IPE MFHDR GTM 13
    IPEMFHDRLTM16,  ///< IPE MFHDR LTM 16
    IPEMFHDRLTM20,  ///< IPE MFHDR LTM 20
    IPELTM16,       ///< IPE LTM 16
    IPELTM20,       ///< IPE LTM 20
    IPEBAYERLTM12,  ///< IPE BAYER LTM 12
    IPEBAYERGTM10,  ///< IPE BAYER GTM 10
    TFEGTM12,       ///< TFE GTM 12
};

/// @brief TITAN IQ Module Type
enum class ISPIQModuleType
{
    CSIDCAMIF,             ///< CSID Camif
    IFECAMIF,              ///< Camera Interface Module of IFE
    IFECAMIFLite,          ///< Camera Interface Module of Dual PD
    IFECAMIFDualPD,        ///< Camera Interface Moudle of new 2PD
    IFECAMIFLCR,           ///< Camera Interface Module of LCR source
    IFECAMIFRDI0,          ///< Camera Interface Module of RDI 0 source
    IFECAMIFRDI1,          ///< Camera Interface Module of RDI 1 source
    IFECAMIFRDI2,          ///< Camera Interface Module of RDI 2 source
    IFECAMIFRDI3,          ///< Camera Interface Module of RDI 3 source
    IFECAMIFRDI4,          ///< Camera Interface Module of RDI 3 source
    IFECSID,               ///< CSID Module
    IFECSIDCAMIF,          ///< CSID CAMIF Module
    IFEPedestalCorrection, ///< Pedestal Correction Module of IFE
    IFEBLS,                ///< Black Level Substraction Module of IFE
    IFELinearization,      ///< Linearization Module of IFE
    IFEDemux,              ///< Demux Module of IFE
    IFEChromaUp,           ///< Chromaup Module of IFE
    IFEHDR,                ///< HDR Module of IFE
    IFEPDPC,               ///< PDAF pixel correction Module of IFE
    IFEPreLSCPDPC,         ///< PDAF pixel correction Module of IFE
    IFEPostLSCPDPC,        ///< PDAF pixel correction Module of IFE
    IFEALSCStatsPDPC,      ///< PDAF pixel correction Module of IFE
    IFEPostFCGPDPC,        ///< PDAF pixel correction Module of IFE
    IFEBPCBCC,             ///< Bad Pixel Corection Module of IFE
    IFEBPCABF,             ///< Bad Pixel Corection Module of IFE
    IFEABF,                ///< Adaptive Bayer Filter Module of IFE
    IFELSC,                ///< Lens Shading Correction of IFE
    IFEDemosaic,           ///< Demosaic Module of IFE
    IFECC,                 ///< Color Correction Module of IFE
    IFEGTM,                ///< Global Tone Mapping of IFE
    IFEGTMFD,              ///< Global Tone Mapping on FD of IFE
    IFEGamma,              ///< Gamma Correction Module of IFE
    IFECST,                ///< Color Space Transform Module of IFE
    IFEMNDS,               ///< Scaler Module of IFE
    IFEPreCrop,            ///< DS4 Pre Crop Module of IFE
    IFEDS4,                ///< DS4 Module of IFE
    IFECrop,               ///< Fov and Crop Module of IFE
    IFERoundClamp,         ///< Round and Clamp Module of IFE
    IFER2PD,               ///< R2PD Module of IFE
    IFEWB,                 ///< White Balance Module of IFE
    IFEHVX,                ///< Custom IQ module implemented in HVX
    IFEDUALPD,             ///< Dual PD HW
    IFEPDAF,               ///< PDAF Module of IFE
    IFELCR,                ///< LCR Module of IFE
    IFEFCG,                ///< Flicker Correction Gain of IFE
    IFEBC,                 ///< Binning Correction of IFE
    IFEPDPCBPC,            ///< IFE BPC and PDPC
    IFEBinCorrection,      ///< IFE Bin Correct
    IFEGIC,                ///< IFE GIC
    IFEBGTM,               ///< Bayer GTM Module of IFE
    IFEBLTM,               ///< Bayer LTM Module of IFE
    IFELCAC,               ///< IFE IFELCAC
    IFEUVGamma,            ///< IFE UV Gamma
    IFESparsePDExt,        ///< IFESparsePD
    IFEDecompand,          ///< IFE De Comand Module
    IFEHVXCompand,         ///< IFE HVX Compand Module
    IFEHVXDecompand,       ///< IFE HVX De Compand Module
    IFEChannelGain,        ///< IFE Channel Gains Module
    IFESWExtend,           ///< IFE SWExtend module used to do extended tasks
                           ///  such as sending disable bits to unused hw modules
                           ///  and all that could be imagined
    IFERemosaic,           ///< Remosaic Module of IFE
    IFEXCFAChannelGain,    ///< IFE XCFA Channel Gain Module

    SFEDemux,              ///< QCFA Demux Module of SFE
    SFEChannelGain,        ///< Channel Gain Modules of SFE
    SFELCR,                ///< LCR Module of SFE
    SFEPDPC,               ///< QCFA BPC PDPC module of SFE
    SFE1DPDPC,             ///< 1D PDPC module of SFE
    SFECompand,            ///< Companding module of SFE
    SFEDecompand,          ///< Decompanding module of SFE
    SFEHDRMerge,           ///< HDR Merge module of SFE
    SFERemosaic,           ///< Remosaic Module of SFE
    SFEQCFABin,            ///< QCFA Binning module of SFE
    SFELSC,                ///< LSC Module of SFE
    SFEFCG,                ///< Flicker Correction Gain of SFE
    SFECrop,               ///< Crop module of SFE
    SFERoundClamp,         ///< Round and Clamp Module of SFE

    IPEICA,                ///< Image Correction and Adjustment Module in NPS
    IPEDS410,              ///< New addition for ds4 iqmodule
    IPEDS411,              ///< New addition for ds4 iqmodule
    IPERaster22,           ///< Raster Module in NPS
    IPERasterPD,           ///< Raster Module in PD path in NPS
    IPEANR,                ///< Advanced Noise Reduction Module in NPS
    IPETF,                 ///< Temporal Filter Module in NPS
    IPECAC,                ///< Colour Aberration Correction Module in PPS
    IPECrop,               ///< Standalone or prescaler Crop Module in IPE
    IPEChromaUpsample,     ///< Chroma Upsampling Module
    IPECST,                ///< Color Space Transform Module
    IPELTM,                ///< Local Tone Map Module
    IPEColorCorrection,    ///< Color Correction Module in PPS
    IPEGamma,              ///< Gamma Correction Module
    IPE2DLUT,              ///< 2D LUT Module in PPS
    IPEChromaEnhancement,  ///< Chroma Enhancement Module in PPS
    IPEChromaSuppression,  ///< Chroma Suppression Module in PPS
    IPESCE,                ///< Skin Coloe Enhancement Module in PPS
    IPEASF,                ///< Adaptive Spatial Filter Module in PPS
    IPEUpscaler,           ///< Up Scaler Module in PPS
    IPEGrainAdder,         ///< Grain Adder Module in PPS
    IPEDownScaler,         ///< Down Scaler Module
    IPEFOVCrop,            ///< Fov and Crop Module after downscaler
    IPEClamp,              ///< Clamp Module
    IPEHNR,                ///< HNR module in IPE
    IPELENR,               ///< LENR module in IPE
    IPEDSX,                ///< DSX module in NPS
    IPEMFHDRMAC,           ///< MFHDR MAC module in IPE
    IPEPreMFHDRCST0,       ///< MFHDR Color Space Transform Module
    IPEPreMFHDRCST1,       ///< MFHDR Color Space Transform Module
    IPEPreMFHDRCST2,       ///< MFHDR Color Space Transform Module
    IPEPostMFHDRCST,       ///< MFHDR Color Space Transform Module
    IPEPreMFHDRGamma0,     ///< MFHDR Gamma Correction Module
    IPEPreMFHDRGamma1,     ///< MFHDR Gamma Correction Module
    IPEPreMFHDRGamma2,     ///< MFHDR Gamma Correction Module
    IPEPostMFHDRGamma,     ///< MFHDR Gamma Correction Module
    IPEMFHDRGTM,           ///< MFHDR Global Tone Map Module
    IPEMFHDRLTM,           ///< MFHDR Local Tone Map Module
    IPEUVGamma,            ///< IPE UV Gamma module in PPS
    IPEBLUR,               ///< Blur module in PPS
    IPEVSE,                ///< VSE module in PPS
    IPEJBUBLUR,            ///< JBU BLUR module in PPS
    IPEJBUVSE,             ///< JBU VSE module in PPS
    IPEGIC,                 ///< GB/GR Imbalance correction module in IPE
    IPEBPCABF,              ///< Bad Pixel Corection and Adaptive Bayer Filter Module in IPE
    IPEBLS,                 ///< Black Level Substraction Module in IPE
    IPEDemosaic,            ///< Demosaic Module in IPE
    IPEBayerColorCorrection,///< Color Correction Module in Bayer processing path in IPE
    IPEBayerGamma,          ///< Gamma Module in Bayer processing path in IPE
    IPEBayerCST,            ///< Color Space Transform Module in Bayer processing path in IPE
    IPEChromaDS,            ///< Chroma Downscale Module in IPE
    IPEPreLTMGamma,         ///< Gamma Module in pre-LTM post processing path in IPE
    IPEGTM,                 ///< Global Tone Mapping in IPE
    IPECSMCE,               ///< Chroma Suppression and Memory Color Enhancement in IPE
    IPECMUS,                ///< AI Catmap upscaler in NPS
    IPESBLUR,               ///< Shape blur module in PPS
    IPESTMP,                ///< Smooth Transition Modifier maps
    IPEWB,                  ///< WB module in PPS
    IPERGBCOMPAND,          ///< RGB compand
    IPERGBDECOMPAND,        ///< RGB decompand
    IPEHDRGIC,              ///< GIC in Bayer HDRC path
    IPEHDRBPCABF,           ///< BPCABF in Bayer HDRC path
    IPEBayerHDRC,           ///< Bayer HDRC module
    IPEBayerGTM,            ///< Bayer GTM in IPE
    IPEBayerLTM,            ///< Bayer LTM in IPE
    IPENPSGamma,            ///< IPE NPS Gamma
    IPEMIN = IPEICA,        ///< IPE Min
    IPEMAX = IPENPSGamma,   ///< IPE Max
    SWAIControl,            ///< SW AI Control for IPE
    SWHME,                  ///< HME module for QSAT
    SWAIDENOISER,           ///< AI denoiser module for IPE
    BPSPedestalCorrection, ///< Pedestal Correction Module in BPS
    BPSLinearization,      ///< Linearization Module in BPS
    BPSBPCPDPC,            ///< Bad Pixel Corection & PDPC Module in BPS
    BPSDemux,              ///< Demux Module in BPS
    BPSHDR,                ///< HDR Motion artifcat/Reconstruction module in BPS
    BPSABF,                ///< Adaptive Bayer Filter Module in BPS
    BPSLSC,                ///< Lens shading module in BPS
    BPSGIC,                ///< GB/GR Imbalance correction module in BPS
    BPSDemosaic,           ///< Demosaic Module in BPS
    BPSCC,                 ///< Color Correction Module in BPS
    BPSGTM,                ///< Global Tone Mapping in BPS
    BPSGamma,              ///< Gamma Correction Module in BPS
    BPSCST,                ///< Color Space Transform Module in BPS
    BPSChromaSubSample,    ///< Chroma Sub sampling module in BPS
    BPSHNR,                ///< HNR module in BPS
    BPSWB,                 ///< White Balance Module in BPS
    BPSAWBBG,              ///< BPS AWB BG stats
    BPSHDRBHist,           ///< HDR BHist stats
    SWNRM,                 ///< SW NRM module
    SWTMC,                 ///< SW TMC module
    SWPREF,                ///< SW Preference module
    SWVSR,                 ///< SW VSR module
    SWMF,                  ///< SW MF module
    SWPPM,                 ///< SW PPM module
    SWGD,                  ///< SW Ghost Detection Module for SFE/IPE
    BPSCHANNELGAIN,        ///< Channel gain Module in BPS
    BPSBAYERGTM,           ///< Bayer GTM in BPS
    BPSBAYERLTM,           ///< Bayer LTM in BPS
    BPSLCAC,               ///< Bayer LCAC in BPS
    BPSBC,                 ///< Bin correction module in BPS
    BPSDECOMPAND,          ///< Decompand module in BPS
    BPSBLS,                ///< Black level substraction in BPS
    BPSUVGamma,            ///< UV gamma Correction Module in BPS
    BPSBDSFour,            ///< Bayer DS Four Module in BPS
    BPSBGamma,             ///< Bayer Gamma Module in BPS
    BPSPDPCBPC1D,          ///< 1D PDPC Module in BPS
    SWAFC,                 ///< AFC SW module in BPS
    BPSFCG,                ///< Flicker Correction Gain Module in BPS

    TFECAMIF,              ///< Camera Interface Module of TFE
    TFECAMIFLITERDI0,      ///< Camera Lite Interface Module of RDI 0 source
    TFECAMIFLITERDI1,      ///< Camera Lite Interface Module of RDI 1 source
    TFECAMIFLITERDI2,      ///< Camera Lite Interface Module of RDI 2 source
    TFECAMIFPPP,           ///< Camera Interface Module of TFE PPP
    TFEChannelGains,       ///< Demux Module of TFE
    TFELRO,                ///< Lens Roll Off of TFE
    TFEPreCrop,            ///< Pre Crop Module of TFE
    TFEWBBDSDPC,           ///< WB + BDS + DPC of TFE
    TFECropRoundClamp,     ///< Crop Round and Clamp Module of TFE
    TFEPDPC,               ///< BPC+PDPC Module of TFE
    TFEWBBDS,              ///< WB + BDS Module of TFE
    TFEABF,                ///< ABF Module of TFE
    TFEBLS,                ///< BLS Module of TFE
    TFEBGLUT,              ///< BayerGamma Module of TFE
    TFEBDS4,               ///< Bayer DS4 Module of TFE
    TFECST,                ///< CST Module of TFE
    TFEAICST,              ///< CST Module of TFE in AI path
    TFEChromaDS,           ///< ChromaDs Module of TFE
    TFEMNDS,               ///< MNDS Module of TFE
    TFEDS16,               ///< DS16 Module of TFE
    TFEWB,                 ///< WB Module of TFE
    TFEBDS2,               ///< Bayer DS2 Module of TFE
    TFEGTM,                ///< GTM Module of TFE
    TFECrop,               ///< Crop Module of TFE
    TFER2PD,               ///< R2PD Module of TFE
    TFEPDAF,               ///< PDAF Module of TFE

    OPEWB,                 ///< White Balance Module in OPE
    OPEBPCABF,             ///< Bad Pixel Corection and Adaptive Bayer Filter Module in OPE
    OPEBLS,                ///< Black Level Substraction Module in OPE
    OPEDemosaic,           ///< Demosaic Module in OPE
    OPEDemux,              ///< Demux module in OPE
    OPEChromaUp,           ///< Chroma Upsample module in OPE
    OPECST,                ///< Color Space Transform Module in OPE
    OPECC,                 ///< Color Correction Module in OPE
    OPEGTM,                ///< Global Tone Mapping in OPE
    OPELTM,                ///< Local Tone Map Module in OPE
    OPEGamma,              ///< Gamma Correction Module in OPE
    OPEChromaEnhancement,  ///< ChromaEnhancement/Color Conversion Module in OPE`
    OPECSMCE,              ///< Chroma Suppression and Memory Color Enhancement in OPE
    OPESCE,                ///< Skin Color Enhancement Module in OPE
    OPEChromaDS,           ///< Chroma Downscale Module in OPE
    OPEWNR,                ///< Wavelet Noise Reduction Module in OPE
    OPEASF,                ///< Adaptive Spatial Filer Module in OPE
    OPEUpscaler,           ///< Up scaler Module in OPE
    OPEMNDS,               ///< Down scaler Module in OPE
    OPECRC,                ///< Crop Round and Clamp Module in OPE
    OPEChannelGains,       ///< Demux Module of OPE
    OPELSC,                ///< LSC Module of OPE
    OPEPRELROCRC,          ///< Pre LRO CRC Module of OPE
    PREGAMMA,              ///< Module to calculate PreGamma data for IPE
    CSIDLITECAMIF,         ///< IFELite Camif
    IFELITEBLS,            ///< Black Level Substraction Module of IFE LITE
    IFELITEGamma,          ///< Gamma Correction Module of IFE LITE

    CVPDEPTH101,           ///< CVPDEPTH101 Module of CVP
    CVPDMM,                ///< DMM Module of CVP
    CVPDMM11,              ///< DMM11 Module of CVP
    CVPDMM12,              ///< DMM12 Module of CVP
    CVPDFSSGM121,          ///< DFSSGM121 Module of CVP
    CVPDPP111,             ///< DPP111 Module of CVP
    CVPSGM,                ///< SGM module of CVP
    CVPSGM11,              ///< SGM11 module of CVP

    CVPGCE,                ///< GCE module of CVP
    CVPGCE11,              ///< GCE11 module of CVP
    CVPGCE12,              ///< GCE12 module of CVP
    CVPDME,                ///< DME module of CVP
    CVPDME31,              ///< DME31 module of CVP
    CVPDME311,             ///< DME311 module of CVP
    SWIQTHRESHOLD,         ///< Module to Get Thresholds Values
    ISPIQModuleTypeMax = SWIQTHRESHOLD     ///< Max value for ISPIQModuleType
};

enum class DynamicIFEMaskBit
{
    SWTMC,                  ///< SWTMC
    IFEHVX,                 ///< IFEHVX
    IFECAMIF,               ///< IFECAMIF
    IFEPedestalCorrection,  ///< IFEPedestalCorrection
    IFEABF,                 ///< IFEABF
    IFELinearization,       ///< IFELinearization
    IFEPDPC,                ///< IFEPDPC
    IFEDemux,               ///< IFEDemux
    IFEHDR,                 ///< IFEHDR
    IFELSC,                 ///< IFELSC
    IFEWB,                  ///< IFEWB
    IFEDemosaic,            ///< IFEDemosaic
    IFECC,                  ///< IFECC
    IFEGTM,                 ///< IFEGTM
    IFEGTMFD,               ///< IFE GTM on FD
    IFEGamma,               ///< IFEGamma
    IFECST,                 ///< IFECST
    ALSC,                   ///< ALSC
    IFEBGTM,                ///< IFE Bayer GTM
    IFEUVG,                 ///< IFE UV Gamma
    IFEBC,                  ///< IFE Binning Correction
    IFEBLTM,                ///< IFE Bayer LTM
    IFELCAC,                ///< IFE LCAC
    IFESparsePDExt,         ///< Sparse PD Module.
    SFEChannelGain,         ///< SFE Channel Gains
    IFEChannelGain,         ///< IFE Channel Gains
    IFEGIC,                 ///< IFE GIC
    SWNRM,                  ///< SWNRM
    SWPREF,                 ///< SWPREF
    IFEFCG,                 ///< IFE FCG
    SFEFCG,                 ///< SFE FCG
};

enum class DynamicTFEMaskBit
{
    SWTMC,                     ///< SWTMC
    TFECAMIF,                  ///< TFECAMIF
    TFEChannelGains,           ///< TFEChannelGains
    TFELRO,                    ///< TFELRO
    TFEPDPC,                   ///< TFEPDPC
    TFEABF,                    ///< TFEABF
    TFEBLS,                    ///< TFEBLS
    TFEBGLUT,                  ///< TFEBGLUT
    TFECST,                    ///< TFECST
    TFEWB,                     ///< TFEWB
    TFEGTM,                    ///< TFEGTM
    TFEAICST,                  ///< TFEAICST
    SWNRM,                     ///< SWNRM
};

static const UINT32 OffsetOfIFEIQModuleIndex = static_cast<UINT32>(ISPIQModuleType::CSIDCAMIF);
static const UINT32 OffsetOfSFEIQModuleIndex = static_cast<UINT32>(ISPIQModuleType::SFEDemux);
static const UINT32 OffsetOfIPEIQModuleIndex = static_cast<UINT32>(ISPIQModuleType::IPEICA);
static const UINT32 OffsetOfBPSIQModuleIndex = static_cast<UINT32>(ISPIQModuleType::BPSPedestalCorrection);

static const UINT32 OffsetOfTFEIQModuleIndex = static_cast<UINT32>(ISPIQModuleType::TFECAMIF); ///< TFE IQ module Index

static const UINT32 OffsetOfIPEStatsModuleIndex = static_cast<UINT32>(ISPStatsModuleType::IPEHDR10P);

/// @brief IFE pipeline path
enum class IFELitePipelinePath: UINT
{
    CommonPath = 0,        ///< Common/Gamma0 path of IFELite pipeline
    RDI0Path,              ///< RDI0 path
    RDI1Path,              ///< RDI1 path
    RDI2Path,              ///< RDI2 path
    RDI3Path,              ///< RDI3 path
    RDI4Path,              ///< RDI4 path
    RDI5Path,              ///< RDI5 path
    VirtualRDI0Path,       ///< Virtual RDI0 path
    VirtualRDI1Path,       ///< Virtual RDI1 path
    VirtualRDI2Path,       ///< Virtual RDI2 path
    VirtualRDI3Path,       ///< Virtual RDI3 path
    VirtualRDI4Path,       ///< Virtual RDI4 path
    VirtualRDI5Path,       ///< Virtual RDI5 path
    PrivateVirtualRDIPath, ///< Private Virtual RDI path
    GammaPath1,            ///< Gamma1 processed path
    GammaPath2,            ///< Gamma2 processed path
    IFELitePathMax,        ///< IFE Path Max
};

/// @brief IFE pipeline path
enum class IFEPipelinePath: UINT
{
    VideoFullPath = 0,     ///< Full path of IFE pipeline
    FDPath,                ///< FD path of IFE pipeline
    VideoDS4Path,          ///< DS4 path of IFE pipeline
    VideoDS16Path,         ///< DS16 path of IFE pipeline
    DisplayFullPath,       ///< Display full path of IFE pipeline
    DisplayDS4Path,        ///< Display DS4 path of IFE pipeline
    DisplayDS16Path,       ///< Display DS16 path of IFE pipeline
    CommonPath,            ///< Common path of IFE pipeline
    PixelRawDumpPath,      ///< pixel raw path of IFE pipeline
    DualPDPath,            ///< Dual PD path
    LCRPath,               ///< LCR path
    SparsePDPath,          ///< Sparse PD path
    RDI0Path,              ///< RDI0 path
    RDI1Path,              ///< RDI1 path
    RDI2Path,              ///< RDI2 path
    RDI3Path,              ///< RDI3 path
    RDI4Path,              ///< RDI4 Path
    YUVPath,               ///< Common YUV path
    AIPath1,               ///< AI 1 Path Max
    AIPath2,               ///< AI 2 Path Max
    RGBPath,               ///< RGB out path
    IRPath,                ///< IR Path
    IFEPathMax,            ///< IFE Path Max
};

/// @brief SFE pipeline path
enum SFEPipelinePath
{
    CommonPath   = 0,  ///< Common Path of SFE Pipeline
    Channel0Path = 1,  ///< Channel 0 Path of  SFE pipeline
    Channel1Path = 2,  ///< Channel 1 Path of SFE pipeline
    Channel2Path = 3,  ///< Channel 2 Path of SFE Pipeline
    PreviewPath  = 4,  ///< Preview Path of SFE Pieplien
    SnapshotPath = 5,  ///< Snapshot Path of SFE pipeline
    LCRPath      = 6,  ///< LCR Path
    IRPath       = 7,  ///< IR Path
    RDI0Path     = 8,  ///< SFE RDI0 Path
    RDI1Path     = 9,  ///< SFE RDI1 Path
    RDI2Path     = 10, ///< SFE RDI2 Path
    RDI3Path     = 11, ///< SFE RDI3 Path
    RDI4Path     = 12, ///< SFE RDI4 Path
    Stats0Path   = 13, ///< SFE Stats 0 Path of SFE Pipeline
    Stats1Path   = 14, ///< SFE Stats 1 Path of SFE Pipeline
    Stats2Path   = 15, ///< SFE Stats 2 Path of SFE Pipeline
    HDRStatsPath = 16, ///< HDR Mask or Counter Path
    SFEPathMax   = 17, ///< SFE Max Path
};

enum SFECropType
{
    PreviewCrop  = 0, ///< 0 : Preview  Crop
    SnapshotCrop = 1, ///< 1 : Snapshot Crop
    IRCrop       = 2, ///< 2 : IR Crop
    HDRStatsCrop = 3, ///< 3 : HDR Stats Crop
};

enum ICAVersion
{
    ICAVersion10 = 10,    ///< ICA Version 10
    ICAVersion20 = 20,    ///< ICA Version 20
    ICAVersion30 = 30,    ///< ICA Version 30
    ICAVersion40 = 40,    ///< ICA Version 40
    ICAVersion41 = 41,    ///< ICA Version 41
    ICAVersion43 = 43,    ///< ICA Version 43
};

static constexpr UINT IFELiteMaxNonCommonPaths = 3; ///< Max number of non-Common pipeline paths

enum class IFELiteModuleMode
{
    IFELiteNormal,          ///< IFE-Lite Normal Mode
    IFELiteInitOnly         ///< IFE-Lite Init packet only Mode
};

static const UINT IFEMaxNonCommonPaths = 17; ///< Max number of non-Common pipeline paths

enum class IFEModuleMode
{
    SingleIFENormal,    ///< Single IFE Normal Mode
    DualIFENormal       ///< Dual IFE Normal Mode
};

/// @brief structure to pack all IFE module flags
union IFEModuleFlags
{
    struct
    {
        BIT     isBayer             : 1;   ///< Bayer Sensor type
        BIT     isFDPathEnable      : 1;   ///< FD output path of IFE
        BIT     isFullPathEnable    : 1;   ///< Full output path of IFE
        BIT     isDS4PathEnable     : 1;   ///< DS4 output path of IFE
        BIT     isDS16PathEnable    : 1;   ///< DS16 output path of IFE
    };
    UINT    allFlags;
};

/// @brief IFE output paths
struct IFEOutputPath
{
    BOOL  path;   ///< Currently selected path. Can only be TRUE or FALSE
};

/// @brief DSP Mode
enum IFEDSPMode
{
    DSPModeNone = 0,          ///< No DSP mode is selected
    DSPModeOneWay,            ///< DSP mode one Way
    DSPModeRoundTrip,         ///< DSP mode Round trip
};

/// @brief DSP Mode
enum IFEFCGMUXSelect
{
    PreFCG = 0,          ///< AEC stats collected Pre FCG
    PostFCG,             ///< AEC stats collected Post FCG
};

/// @brief This structure encapsulates data for a CAMIF crop request from the sensor
struct CropInfo
{
    UINT32    firstPixel;    ///< starting pixel for CAMIF crop
    UINT32    firstLine;     ///< starting line for CAMIF crop
    UINT32    lastPixel;     ///< last pixel for CAMIF crop
    UINT32    lastLine;      ///< last line for CAMIF crop
};

/// @brief SensorAspectRatioMode
enum SensorAspectRatioMode
{
    FULLMODE,                ///< 4:3 sensor
    NON_FULLMODE,            ///< other than 4:3, it can be 16:9
};

/// @brief IFELite CSID Paths
enum IFELiteCSIDPath
{
    IFELITECSIDIPP = 0,            ///< IFELITE CSID Image Pixel Path
    IFELITECSIDRDI0,               ///< IFELITE CSID RDI0 Path
    IFELITECSIDRDI1,               ///< IFELITE CSID RDI1 Path
    IFELITECSIDRDI2,               ///< IFELITE CSID RDI2 Path
    IFELITECSIDRDI3,               ///< IFELITE CSID RDI3 Path
    IFELITECSIDRDI4,               ///< IFELITE CSID RDI4 Path
    IFELITECSIDRDI5,               ///< IFELITE CSID RDI5 Path
    IFELITEVirtualRDI0Path,        ///< IFELITE CSID virtual RDI0 Path
    IFELITEVirtualRDI1Path,        ///< IFELITE CSID virtual RDI1 Path
    IFELITEVirtualRDI2Path,        ///< IFELITE CSID virtual RDI2 Path
    IFELITEVirtualRDI3Path,        ///< IFELITE CSID virtual RDI3 Path
    IFELITEVirtualRDI4Path,        ///< IFELITE CSID virtual RDI4 Path
    IFELITEVirtualRDI5Path,        ///< IFELITE CSID virtual RDI5 Path
    IFELITEPrivateVirtualRDIPath,  ///< IFELITE CSID private virtual RDI Path
    IFELITECSIDMAX,                ///< IFELITE CSID Max  Path
};

/// @brief IFE CSID Paths
enum IFECSIDPath
{
    IFECSIDIPP = 0, ///< IFE CSID Image Pixel Path
    IFECSIDPPP,     ///< IFE CSID PDAF Pixel Path
    IFECSIDRDI0,    ///< IFE CSID RDI0 Path
    IFECSIDRDI1,    ///< IFE CSID RDI1 Path
    IFECSIDRDI2,    ///< IFE CSID RDI2 Path
    IFECSIDRDI3,    ///< IFE CSID RDI3 Path
    IFECSIDRDI4,    ///< IFE CSID RDI4 Path
    IFECSIDMAX,     ///< IFE CSID Max  Path
};

enum ISPRGBIRPattern : UINT8
{
    ISPRGBIRPattern0   = 0,
    ISPRGBIRPattern1   = 1,
    ISPRGBIRPattern2   = 2,
    ISPRGBIRPattern3   = 3,
    ISPRGBIRPattern4   = 4,
    ISPRGBIRPattern5   = 5,
    ISPRGBIRPatternMax = 6,
};

struct VPmap
{
    UINT32 virtualPort;    ///< Virtual index of RDI port
    UINT32 physicalPort;   ///< Physical index of RDI port
};


struct VirtualToPhysicalPortMap
{
    VPmap    mapTable[IFELITECSIDMAX];    ///< Map of virtual to physical
    UINT32 numPorts;                  ///< Number of RDI ports
};

/// @ brief Structure to encapsulate sensor dependent data for IFE-Lite
struct IFELiteSensorConfigData
{
    StreamDimension                sensorOut;                   ///< Sensor output info
    StreamDimension                RDIOut[IFELITECSIDMAX];      ///< Sensor output info
    FLOAT                          dGain;                       ///< Digital Gain Value
    PixelFormat                    format;                      ///< Image Format
    CropInfo                       CAMIFCrop;                   ///< CAMIF crop request from sensor
    UINT                           fps;                         ///< Current Sensor FPS
    UINT8                          CSIDBinningFactor;           ///< CSID binning factor
    UINT32                         sensorBitWidth;              ///< Sensor bit width
    FLOAT                          sensorScalingFactor;         ///< Downscaling factor of sensor
    FLOAT                          sensorBinningFactor;         ///< Sensor binning factor X
    UINT32                         fullResolutionWidth;         ///< Full resolution width
    UINT32                         fullResolutionHeight;        ///< Full resolution height
    BOOL                           isSensorModeSwitched;        ///< TRUE if sensor mode switched
    BIT                            isYUV;                       ///< Flag to indicate YUV sensor
    BOOL                           isMetadataEn;                ///< Metadata Enable
};

/// @ brief Structure to encapsulate sensor dependent data
struct ISPSensorConfigureData
{
    FLOAT                          dGain;                       ///< Digital Gain Value
    PixelFormat                    format;                      ///< Image Format
    CropInfo                       CAMIFCrop;                   ///< CAMIF crop request from sensor
    CropInfo                       CAMIFCropIPP;                ///< CAMIF IPP path crop
    CropInfo                       CAMIFCropPPP;                ///< CAMIF PPP path crop
    CropInfo                       SFEInput;                    ///< SFE Input
    CropInfo                       sensorCrop;                  ///< Sensor Crop
    StreamDimension                sensorOut;                   ///< Sensor output info
    BIT                            isBayer;                     ///< Flag to indicate Bayer sensor
    BIT                            isYUV;                       ///< Flag to indicate YUV sensor
    BIT                            isMono;                      ///< Flag to indicate Mono sensor
    BIT                            isIHDR;                      ///< Flag to indicate IHDR sensor
    BIT                            isSHDR;                      ///< Flag to indicate SHDR sensor
    FLOAT                          sensorScalingFactor;         ///< Downscaling factor of sensor
    FLOAT                          sensorBinningFactor;         ///< Sensor binning factor X
    FLOAT                          sensorBinningFactorY;        ///< Sensor binning factor Y
    UINT                           ZZHDRColorPattern;           ///< ZZHDR Color Pattern Information
    ZZHDRFirstExposurePattern      ZZHDRFirstExposure;          ///< ZZHDR First Exposure Pattern
    SensorPDAFInfo                 sensorPDAFInfo;              ///< Sensor PDAF information
    UINT32                         PDAFWidth;                   ///< PDAF Width
    UINT32                         PDAFHeight;                  ///< PDAF Height
    UINT32                         PDAFBitWidth;                ///< PDAF Bit Width
    UINT8                          bayerPattern;                ///< Sensor Bayer pattern
    UINT8                          CSIDBinningFactor;           ///< CSID binning factor
    UINT8                          SFEBinningFactor;            ///< SFE Binning Factor
    UINT32                         fullResolutionWidth;         ///< Full resolution width
    UINT32                         fullResolutionHeight;        ///< Full resolution height
    UINT32                         sensorAspectRatioMode;       ///< saved in aspectRatioInfo of SensorModeData
    CHIRectangle                   activeArrayCropWindow;       ///< sensor out based on activeArray
    SensorHDRInfo                  sensorHDRInfo;               ///< Sensor HDR Info
    UINT                           fps;                         ///< Current Sensor FPS
    UINT32                         PDAFVerticalWidth;           ///< Vertical PDAF Width
    UINT32                         PDAFVerticalHeight;          ///< Vertical PDAF Height
    UINT32                         PDAFVerticalBitWidth;        ///< Vertical PDAF Bit Width
    BayerRGBIRPattern              RGBIRPattern;                ///< RGBIR Pattern
};

/// @ brief Structure to encapsulate HVX data
struct ISPHVXConfigureData
{
    BOOL               enableHVX;       ///< Enable HVX
    StreamDimension    sensorInput;     ///< Sensor Input info
    PixelFormat        format;          ///< Image Format
    StreamDimension    HVXOut;          ///< HVX output info
    CropInfo           HVXCrop;         ///< HVX crop request
    CropInfo           origCAMIFCrop;   ///< Orig CAMIF
    CropWindow         origHALWindow;   ///< Orig Hal Window
    BOOL               DSEnabled;       ///< Down scale enabled
    HVXTapPoint        HVXtapPoint;     ///< HVX tap point
};

/// @ brief Structure to encapsulate CHI HVX interface
struct IFEHVXInfo
{
    CHIISPHVXALGORITHMCALLBACKS* pHVXAlgoCallbacks;  ///< Algo Calllback Interface for Chi to call into custom node.
    IFEDSPMode                   DSPMode;            ///< DSP mode
    ISPHVXConfigureData          HVXConfiguration;   ///< HVX configuration data
};

/// @ brief Structure to encapsulate Pixel subsample pattern
struct ISPPDDataSubsamplePattern
{
    UINT16 pixelSkipPattern; ///< Pixel Skip Pattern
    UINT16 lineSkipPattern;  ///< Line Skip pattern
};

/// @ brief Structure to encapsulate CAMIF Config data include Sabsample, will replace this structure
struct IFECAMIFInfo
{
    BOOL                      enableCAMIFSubsample;  ///< Enable CAMIF SubSample
    ISPPDDataSubsamplePattern CAMIFSubSamplePattern; ///< CAMIF subsample pattern
    CropInfo                  PDAFCAMIFCrop;         ///< PDAF Camif Crop Information
};

/// @ brief Structure to encapsulate IFE CSID format measure enables
struct FormatMeasureEnable
{
    BOOL formatMeasureEnableIPP;    ///< Enable format measure on IPP path
    BOOL formatMeasureEnableRDI;    ///< Enable format measure on RDI path
    BOOL formatMeasureEnablePPP;    ///< Enable format measure on PPP path
};

/// @ brief Structure to encapsulate IFELite Chroma Downsample emables and RDI
struct YUVFmtConversionInfo
{
    BOOL                enableDS;     ///< Enable Chroma Downsample
    IFELiteCSIDPath     lumaPath;     ///< CSID Path for Luma
    IFELiteCSIDPath     chromaPath;   ///< CSID Path for Chroma
    PixelFormat         inpFormat;    ///< Input Pixel Format YUYV, YVYU, UYVY, VYUY
    Format              outFormat;    ///< Output Pixel Format YUV420NV12 or YUV420NV21  
};

/// @brief IFE RDI Instance
enum IFERDIInstance
{
    RDIInstance0 = 0,   ///< IFE RDI Instance 0
    RDIInstance1,       ///< IFE RDI Instance 1
    RDIInstance2,       ///< IFE RDI Instance 2
    RDIInstance3,       ///< IFE RDI Instance 3
};

/// @brief List of all IFELite CAMIF Path Type
enum IFELITECAMIFPath
{
    IFELITECAMIFPXLPath = 0,   ///< Pixel Process pipeline path
    IFELITECAMIFRDI0Path,      ///< CAMIF RDI0 Pipeline path
    IFELITECAMIFRDI1Path,      ///< CAMIF RDI1 Pipeline path
    IFELITECAMIFRDI2Path,      ///< CAMIF RDI2 Pipeline path
    IFELITECAMIFRDI3Path,      ///< CAMIF RDI3 Pipeline path
    IFELITECAMIFRDI4Path,      ///< CAMIF RDI4 Pipeline path
    IFELITECAMIFRDI5Path,      ///< CAMIF RDI5 Pipeline path
    IFELITECAMIFPathMax,       ///< CAMIF Max path
};

/// @brief List of all IFE CAMIF Path Type
enum IFECAMIFPath
{
    IFECAMIFPXLPath = 0,   ///< Pixel Process pipeline path
    IFECAMIFDualPDPath,    ///< CAMIF Dual PD pipeline path
    IFECAMIFLCRPath,       ///< CAMIF LCR Pipeline path
    IFECAMIFRDI0Path,      ///< CAMIF RDI0 Pipeline path
    IFECAMIFRDI1Path,      ///< CAMIF RDI1 Pipeline path
    IFECAMIFRDI2Path,      ///< CAMIF RDI2 Pipeline path
    IFECAMIFRDI3Path,      ///< CAMIF RDI3 Pipeline path
    IFECAMIFRDI4Path,      ///< CAMIF RDI4 Pipeline path
    IFECAMIFPathMax,       ///< CAMIF Max path
};

/// @brief IFE Hardware Type List, include IFE Lite and IFE Normal
enum IFEHWTypeIds
{
    IFEHWTypeNormal = 0,   ///< Normal IFE ID
    IFEHWTypeLite,         ///< IFE Lite ID
    IFEHWTypeMax,          ///< IFE HW Type max
};

/// @ brief Structure to encapsulate All CAMIF configure data
struct IFELiteCAMIFCfgInfo
{
    BOOL                      enableCAMIFPath[IFELITECAMIFPathMax]; ///< CAMIF Path enable
};

/// @brief TFE Hardware Type List, include TFE Lite and TFE Normal
enum TFEHWTypeIds
{
    TFEHWTypeNormal = 0,   ///< Normal TFE ID
    TFEHWTypeLite,         ///< TFE Lite ID
    TFEHWTypeMax,          ///< TFE HW Type max
};

/// @ brief Structure to encapsulate All CAMIF configure data
struct IFECAMIFCfgInfo
{
    BOOL                      enableCAMIFPath[IFECAMIFPathMax]; ///< CAMIF Path enable
    IFEHWTypeIds              IFEHWType;                        ///< IFE Normal or IFE Lite
    IFECAMIFPath              CAMIFPathType;                    ///< Current Path Type
    BOOL                      enableCAMIFSubsample;             ///< Enable CAMIF Subsample
    ISPPDDataSubsamplePattern CAMIFSubsamplePattern;            ///< CAMIF subsample pattern
    CropInfo                  CAMIFCropInfo;                    ///< CAMIF Module crop information
};


/// @ brief Structure to encapsulate CSID Subsample data
struct IFECSIDExtractionInfo
{
    BOOL                      enableCSIDSubsample;  ///< Enable CSID SubSample
    ISPPDDataSubsamplePattern CSIDSubSamplePattern; ///< CSID subsample pattern
};

/// @ brief Structure to encapsulate PDAF data
struct IFEPDAFInfo
{
    BOOL                 enableSubsample;         ///< Enable PDAF SubSample
    UINT16               pixelSkipPattern;        ///< Pixel Skip Pattern
    UINT16               lineSkipPattern;         ///< Line Skip Pattern
    UINT32               bufferWidth;             ///< Width of the Buffer
    UINT32               bufferHeight;            ///< Height of the buffer
    UINT32               alignedBufferWidth;      ///< Aligned Buffer Width
    PDLibDataBufferInfo  pdafBufferInformation;   ///< Pdaf buffer information
};

/// @ brief Structure to encapsulate SparsePDExt Info
struct IFESparsePDExtInfo
{
    IFEPDAFInfo    sparsePDSubSampleInfo;     ///< Sparse PD info
    CropInfo       sparsePDCrop;              ///< PD Ext Info
    BOOL           cropEnable;                ///< Crop Enable
    BOOL           dropEnable;                ///< Drop Enable
};

struct IFELiteHALConfigData
{
    StreamDimension    stream[IFELiteMaxNonCommonPaths];       ///< HAL stream, corresponding to IFELite pixel output path
    UINT32             bitsPerPixel[IFELiteMaxNonCommonPaths]; ///< bits per pixel
    Format             format[IFELiteMaxNonCommonPaths];       ///< output pixel format
};

/// @ brief Structure to encapsulate sensor dependent data
struct ISPHALConfigureData
{
    StreamDimension    stream[MaxRoundClampPath];       ///< HAL streams, corresponding to ISP output paths DS4, DS16, Full, FD
    UINT32             bitsPerPixel[MaxRoundClampPath]; ///< bits per pixel
    Format             format[MaxRoundClampPath];       ///< output pixel format
};

/// @brief IPE has 2 main processing sections, noise processing and post processing. Within Post processing (PPS), they are
/// they are differentiated based on their position with respect to LT module as preLTM and postLTM.
enum IPEProcessingSection : UINT32
{
    IPEDefault = 0,     ///< All processing blocks in NPS and PPS
    IPENPS,             ///< Noise Processing blocks (ANR, TF etc.)
    IPEPPSPreLTM,       ///< Pre Processing section blocks before LTM (including LTM)
    IPEPPSPostLTM,      ///< Post Processing section blocks after LTM (Color correction to GRA)
    IPEPPS,             ///< Pre + Post processing blocks
    IPEMFHDRPreLTM,     ///< MFHDR processing section pre LTM blocks including LTM
    IPEMFHDRPostLTM,    ///< MFHDR processing section post LTM blocks
    IPEMFHDR,           ///< MFHDR Pre + Post LTM processing blocks
    IPEScale,           ///< Scale Section
    IPENoZoomCrop,      ///< All processing blocks except for fill zoom window
    IPEBayer,           ///< Bayer blocks
    IPEAI,              ///< AI data processing IQ blocks
    IPEInvalidSection,  ///< Invalid IPE IQ block
};

enum class BPSProcessingSection
{
    BPSAll,               ///< All processing blocks
    BPSHNR,               ///< BPS HNR processing block
    BPSLSCOut,            ///< BPS Preceding LSC processing block
    BPSPostLSC,           ///< BPS Post LSC processing block
    BPSARGBOutProcessing, ///< BPS ARGB out processing block
    BPSNone,              ///< No Processing block
    BPSInvalidSection,    ///< Invalid BPS IQ block
};

/// @brief TFE output paths
struct TFEOutputPath
{
    UINT32  path;   ///< Currently selected path. Can only be TRUE or FALSE
};

/// @brief TFE pipeline path
enum class TFEPipelinePath: UINT
{
    BayerPath = 0,    ///< Bayer path of TFE pipeline
    IdealRawPath,     ///< Ideal raw path of TFE pipeline
    CommonPath,       ///< Common path of TFE pipeline
    AIPath,           ///< AI path of TFE pipeline
    DS4Path,          ///< DS4 path of IFE pipeline
    DS16Path,         ///< DS16 path of IFE pipeline
    RDI0Path,         ///< RDI0 path
    RDI1Path,         ///< RDI1 path
    RDI2Path,         ///< RDI2 path
    PDAFPath,         ///< PDAF Path
};

static const UINT TFEMaxNonCommonPaths = 10; ///< Max number of non-Common pipeline paths

enum class TFEModuleMode
{
    SingleTFENormal,    ///< Single TFE Normal Mode
    DualTFENormal       ///< Dual TFE Normal Mode
};

/// @brief OPE pipeline path
enum class OPEPipelinePath: UINT
{
    VideoPath = 0,      ///< Video path of OPE pipeline
    DisplayPath,        ///< Display path of OPE pipeline
    CommonPath,         ///< Common path of OPE pipeline
    SecondPass,         ///< Module which needs to be executed twice
};

/// @brief BAF config
struct TFEBAFConfig
{
    UINT32 horizontalOffset;        ///< horizontal offset
    UINT32 verticalOffset;          ///< vertical offset
    UINT32 horizontalRegionNum;     ///< horizontal region number
    UINT32 verticalRegionNum;       ///< vertical region number
    UINT32 regionWidth;             ///< region width
    UINT32 regionheight;            ///< region height

    UINT32 flexiWidth[BAFMaxGridHorizontalRegions]; ///< array of width of grid
    UINT32 flexiHeight[BAFMaxGridVerticalRegions];  ///< array of height of grid
};

/// @brief OPE processing section type.
enum class OPEProcessingSection
{
    OPEAll,             ///< All processing blocks
    OPELTMDCOnly,       ///< LTM DC path
    OPENoZoomNoCrop,    ///< No Zoom No Crop
    OPEInvalidSection,  ///< Invalid IPE IQ block
};

/// @brief Instance Profile Id
enum OPEProfileId
{
    OPEProfileIdDefault = 0,    ///< All IQ Modules
    OPEProfileIdLTMDCOnly,      ///< Upto LTM module
    OPEProfileIdReprocess,      ///< Reprocess only (YUV420 input to OPE)
    OPEProfileIdNoZoomNoCrop,   ///< No Zoom No Crop
    OPEProfileIdScale,          ///< ScaleProfile
    OPEProfileIdMax             ///< Invalid
};

/// @brief Instance Processing Id
enum OPEProcessingType
{
    OPEProcessingTypeDefault = 0,   ///< No Processing Type
    OPEProcessingPreview,           ///< Preview Processing type
    OPEMFNRPostfilter,              ///< Postfilter
    OPEProcessingSnapshot,          ///< Snapshot processing type
};

/// @brief Instance Stabilization Id
enum OPEStabilizationType : UINT32
{
    OPEStabilizationTypeNone     = 0,  ///< No Stabilization
    OPEStabilizationTypeSWEIS3   = 2,  ///< SW EIS3.0
    OPEStabilizationTypeMax      = 4,  ///< Invalid/max
};

/// @brief OPE IQ Instance Property Information
struct OPEInstanceProperty
{
    OPEProfileId            profileId;                            ///< NPS/PPS/Scale
    UINT32                  stabilizationType;                    ///< SWEIS3.0
    OPEProcessingType       processingType;                       ///< Preview/other to determine chromatix mode
    BOOL                    enableCHICropInfoPropertyDependency;  ///< enable CHI crop property dependency
    UINT                    enableFOVC;                           ///< FOVC Enable
};

/// @brief Command buffer identifier for OPE
enum
{
    CSLOPECmdBufferIdBlob = 1,    ///< 1: Generic Blob configuration info
    CSLOPECmdBufferMaxIds         ///< 2: Max number of command buffers in CSLOPE node
} CSLOPECmdBufferId;

/// @brief Command buffer managers in OPE node
enum OPECmdBufferId
{
    OPECmdBufferFrameProcess = 0,    ///< 0: Top level KMD payload (CSLOPEFrameProcess)
    OPECmdBufferStripe,              ///< 1: Stripe level cmd buffer for each IQ
    OPECmdBufferFrameIQ,             ///< 2: Frame level cmd buffer for each IQ
    OPECmdBufferSingleBuffered,      ///< 3: Frame level single buffered command buffer
    OPECmdBufferDMIHeader,           ///< 4: DMI cmd header
    OPECmdBufferLTMDMIHeader,        ///< 5: LTM DMI cmd header
    OPECmdBufferLTMDCBuffer,         ///< 6: LTM DC AVG_LUT cmd header
    OPECmdBufferBlob,                ///< 7: Generic blob cmd buffer
    OPECmdBufferKMD,                 ///< 8: Cmd buffer for KMD usage
    OPECmdBufferDebug,               ///< 9: Cmd buffer for KMD debug info
    OPECmdBufferBatch,               ///< 10: Cmd buffers to be used during batch mode to enable/disable module.
    OPECmdBufferAVGLUT,              ///< 11: Cmd buffers to store LTMCDC stats read from MetaData
    OPECmdBufferMaxIds,              ///< 12: Max number of command buffers in OPE node
};

enum OPEIQProgramType
{
    OPEIQProgramTypeFrame =  0,      ///< 0: Frame level programming
    OPEIQProgramTypeStripe,          ///< 1: Stripe level programming
    OPEProgramTypeMax,               ///< 2: Max number for Program type
};

/// @brief Command buffer identifier for CRE
enum
{
    CSLCRECmdBufferIdBlob = 1,       ///< 1: CSLCREMetaGenericBlob - Generic Blob configuration info
    CSLCRECmdBufferMaxIds            ///< 2: Max number of command buffers in CSLCRE node
} CSLCRECmdBufferId;

/// @brief Command buffer managers in CRE node
enum CRECmdBufferId
{
    CRECmdBufferBlob = 1,            ///< 1: Generic blob cmd buffer
    CRECmdBufferMaxIds,              ///< 2: Max number of command buffers in CRE node
};
/// @brief Union to hold IFE pipeline core enable config
typedef union
{
    struct
    {
        BIT pedestalEnable          : 1;
        BIT linearizationEnable     : 1;
        BIT demuxEnable             : 1;
        BIT chromaUpsampleEnable    : 1;
        BIT HDRReconEnable          : 1;
        BIT HDRMACEnable            : 1;
        BIT BPCEnable               : 1;
        BIT ABFEnable               : 1;
        BIT rolloffEnable           : 1;
        BIT demosaicEnable          : 1;
        BIT BLSEnable               : 1;
        BIT PDAFEnable              : 1;
        BIT binningCorrectionEnable : 1;
        BIT CCEnable                : 1;
        BIT GTMEnable               : 1;
        BIT gammaEnable             : 1;
        BIT CSTEnable               : 1;
        BIT PDAFPathEnable          : 1;
        BIT pixelRawPathEnable      : 1;
        BIT DSPHVXTapoutConfig      : 1;
        BIT HDREnable               : 1;
        BIT FCGEnable               : 1;
        BIT IRPathEnable            : 1;
    };
    UINT    IQModulesConfig;
} IQModulesCoreEnableConfig;

/// @brief Union to hold IFE pipeline Video and Display path enable config
typedef union
{
    struct
    {
        BIT MNDSEnable                         : 1;
        BIT preMNDSCropEnable                  : 1;
        BIT CropEnable                         : 1;
        BIT DS4PostCropEnable                  : 1;
        BIT DS4PreCropEnable                   : 1;
        BIT DS16PostCropEnable                 : 1;
        BIT DS16PreCropEnable                  : 1;
        BIT DS4LumaEnable                      : 1;
        BIT DS16LumaEnable                     : 1;
        BIT DS4ChromaEnable                    : 1;
        BIT DS16ChromaEnable                   : 1;
        BIT DS4R2PDEnable                      : 1;
        BIT DS16R2PDEnable                     : 1;
        BIT RoundClampLumaCropEnable           : 1;
        BIT RoundClampLumaRoundEnable          : 1;
        BIT RoundClampLumaClampEnable          : 1;
        BIT RoundClampChromaCropEnable         : 1;
        BIT RoundClampChromaRoundEnable        : 1;
        BIT RoundClampChromaClampEnable        : 1;

        BIT DS4RoundClampLumaCropEnable        : 1;
        BIT DS4RoundClampLumaRoundEnable       : 1;
        BIT DS4RoundClampLumaClampEnable       : 1;
        BIT DS4RoundClampChromaCropEnable      : 1;
        BIT DS4RoundClampChromaRoundEnable     : 1;
        BIT DS4RoundClampChromaClampEnable     : 1;

        BIT DS16RoundClampLumaCropEnable       : 1;
        BIT DS16RoundClampLumaRoundEnable      : 1;
        BIT DS16RoundClampLumaClampEnable      : 1;
        BIT DS16RoundClampChromaCropEnable     : 1;
        BIT DS16RoundClampChromaRoundEnable    : 1;
        BIT DS16RoundClampChromaClampEnable    : 1;
    };
    UINT videoDisplayPathEnableConfig;
} ImagePathEnableConfig;

/// @brief Union to hold IFE pipeline AI path enable config
typedef union
{
    struct
    {
        BIT MNDSEnable                          : 1;
        BIT preMNDSCropEnable                   : 1;
        BIT CropEnable                          : 1;

        BIT AI1PostCropEnable                   : 1;
        BIT AI1PreCropEnable                    : 1;
        BIT AI2PostCropEnable                   : 1;
        BIT AI2PreCropEnable                    : 1;

        BIT AI1LumaEnable                       : 1;
        BIT AI2LumaEnable                       : 1;
        BIT AI1ChromaEnable                     : 1;
        BIT AI2ChromaEnable                     : 1;

        BIT AI1RoundClampLumaCropEnable         : 1;
        BIT AI1RoundClampLumaRoundEnable        : 1;
        BIT AI1RoundClampLumaClampEnable        : 1;
        BIT AI1RoundClampChromaCropEnable       : 1;
        BIT AI1RoundClampChromaRoundEnable      : 1;
        BIT AI1RoundClampChromaClampEnable      : 1;

        BIT AI2RoundClampLumaCropEnable         : 1;
        BIT AI2RoundClampLumaRoundEnable        : 1;
        BIT AI2RoundClampLumaClampEnable        : 1;
        BIT AI2RoundClampChromaCropEnable       : 1;
        BIT AI2RoundClampChromaRoundEnable      : 1;
        BIT AI2RoundClampChromaClampEnable      : 1;
    };
    UINT32 AIOUTPathEnableConfig;
} AIPathEnableConfig;


/// @brief Union to hold IFE pipeline FD path enable config
typedef union
{
    struct
    {
        BIT MNDSEnable                    : 1;
        BIT CropEnable                    : 1;
        BIT RoundClampLumaCropEnable      : 1;
        BIT RoundClampLumaRoundEnable     : 1;
        BIT RoundClampLumaClampEnable     : 1;
        BIT RoundClampChromaCropEnable    : 1;
        BIT RoundClampChromaRoundEnable   : 1;
        BIT RoundClampChromaClampEnable   : 1;
    };
    UINT frameProcessingModuleConfig;
} FDPathEnableConfig;

/// @brief Union to hold stats modules common config
typedef union
{
    struct
    {
        BIT HDRBEFieldSelect        :2;
        BIT HDRSatsSiteSelect       :1;
        BIT BhistBinUniformity      :1;
        BIT AWBBGQuadSyncEnable     :1;
        BIT colorConversionEnable   :1;
        BIT RSShiftBits             :4;
        BIT CSShiftBits             :4;
        BIT HDRBhistFieldSelect     :2;
        BIT HDRBhistChannelSelect   :1;
        BIT BhistChannelSelect      :3;
        BIT IhistChannelSelect      :2;
        BIT IHistSiteSelect         :2;
        BIT IHistShiftBits          :4;
    };
    UINT statsModulesConfig;
} StatsModulesControl;

/// @brief Union to hold IFE pipeline stats modules core enable config
typedef union
{
    struct
    {
        BIT HDRBEEnable     : 1;
        BIT HDRBhistEnable  : 1;
        BIT BAFEnable       : 1;
        BIT AWBBGEnable     : 1;
        BIT SkinBhistEnable : 1;
        BIT RSEnable        : 1;
        BIT CSEnable        : 1;
        BIT IHistEnable     : 1;
        BIT AECBGEnable     : 1;
    };
    UINT statsModulesEnableConfig;
} StatsModulesCoreEnableConfig;

/// @brief Structure to hold IFE pipeline DSP tapout selection
typedef union
{
    struct
    {
        BIT DSPSelect  : 3;
    };
    UINT DSPModuleConfig;

} DSPConfig;

/// @brief Structure to hold IFE common config
struct IFEModuleEnableConfig
{
    IQModulesCoreEnableConfig       IQModules;                  ///< IFE pipeline IQ modules enable config
    ImagePathEnableConfig           videoProcessingModules;     ///< Video frame processing modules enable config
    ImagePathEnableConfig           displayProcessingModules;   ///< Display frame processing modules enable config
    FDPathEnableConfig              FDprocessingModules;        ///< FD frame processing modules enable config
    StatsModulesControl             statsModules;               ///< Stats processing modules control config
    DSPConfig                       DSPConfig;                  ///< DSP tap out selection config
    AIPathEnableConfig              AI1ProcessingModules;       ///< AI1 frame processing modules enable config
    AIPathEnableConfig              AI2ProcessingModules;       ///< AI2 frame processing modules enable config
};

/// @brief Union to hold TFE pipeline core enable config
typedef union
{
    struct
    {
        BIT demuxEnable                  : 1;
        BIT LSCEnable                    : 1;
        BIT WBBDSDPCEnable               : 1;
        BIT PDPCEnable                   : 1;
        BIT WBBDSEnable                  : 1;
        BIT ABFEnable                    : 1;
        BIT BLSEnable                    : 1;
        BIT BDS4Enable                   : 1;
        BIT BDS2Enable                   : 1;
        BIT BGammaEnable                 : 1;
        BIT GTMEnable                    : 1;
        BIT WBEnable                     : 1;
        BIT MNDSEnable                   : 1;
        BIT ChromaDSEnable               : 1;
        BIT BDSPostCropEnable            : 1;
        BIT IdealRawEnable               : 1;
        BIT AIPathCropEnable             : 1;
        BIT DS4PathCropEnable            : 1;
        BIT DS16PathCropEnable           : 1;
        BIT FullOutRoundClampEnable      : 1;
        BIT AIPathRoundClampEnable       : 1;
        BIT DS4PathRoundClampEnable      : 1;
        BIT DS16PathRoundClampEnable     : 1;
        BIT IdealRawPathRoundClampEnable : 1;
        BIT DS4R2PDEnable                : 1;
        BIT DS16R2PDEnable               : 1;
    };
    UINT    IQModulesConfig;
} TFEIQModulesCoreEnableConfig;

/// @brief Structure to hold TFE config
struct TFEModuleEnableConfig
{
    TFEIQModulesCoreEnableConfig       IQModules;               ///< TFE pipeline IQ modules enable config
};

/// @brief MNDS state
struct MNDSState
{
    BOOL               preCropEnable;           ///< pre crop in MNDS scaler
    CropInfo           preCropInfo;             ///< Pre Crop window on MNDS Scaler
    CropWindow         cropWindow;              ///< crop window for the client requested frame
    CropInfo           CAMIFCrop;               ///< Camif crop request from sensor
    UINT32             inputWidth;              ///< Camif output width in pixel
    UINT32             inputHeight;             ///< Camif output height in pixel
    UINT32             mndsInputWidth;          ///< Input after MNDScrop (Pre-crop)
    UINT32             mndsInputHeight;         ///< Input after MNDSCrop (Pre-crop)
    UINT32             rndOptionH;              ///< Rnd Option H
    UINT32             rndOptionV;              ///< Rnd Option V
    UINT32             lumaImgSizeChange;       ///< Luma Img Size
    StreamDimension    streamDimension;         ///< FD path dimension
    IFEScalerOutput    MNDSOutput;              ///< MNDS output info fed to Crop module as input
    IFEModuleFlags     moduleFlags;             ///< MNDS module flags
};

/// @brief MNDSModuleInfo
struct MNDSModuleInfo
{
    TFEStripeMNDSv20StripingInputParams param;  ///< MNDS input parameters.
};
/// @ brief Structure to share BDS output details with Crop module
struct TFEScalerOutput
{
    StreamDimension             dimension;                ///< MNDS out put width and height
    StreamDimension             input;                    ///< MNDS input dimension
    FLOAT                       scalingFactor;            ///< MNDS input to output scaling
    CropWindow                  preCropWindow;            ///< pre crop window
    CropWindow                  modifiedCropWindow;       ///< Modified crop window
    BOOL                        preCropEnable;            ///< pre crop enable
    union
    {
        // Precrop is a part of MNDS module from version 2.0 onward.
        struct
        {
            TFEStripeMNScaleDownInputV20  mndsConfigAIY;      ///< Y config from striping for MNDS version 2.0 or 2.1
            TFEStripeMNScaleDownInputV20  mndsConfigAIC;      ///< C config from striping for MNDS version 2.0 or 2.1
            TFEStripeMNScaleDownInputV20  chromaDs2Config;    ///< C config from striping for ChromaDS version 2.0 or 2.1
            TFEStripeCrop                 preAIMNDSCropY;     ///< Y precrop for MNDS version 2.0 or 2.1
            TFEStripeCrop                 preAIMNDSCropC;     ///< C precrop for MNDS version 2.0 or 2.1
            TFEStripeCrop                 preChromaDS2Crop;   ///< C precrop for ChromaDS version 2.0 or 2.1
        } version20;
    };
};

struct TFEStripeBDSVerticalParams
{
    UINT16      inputP;                           ///< input for P MNDS
    UINT16      outputP;                          ///< output for P MNDS
    UINT32      phaseStep;                        ///< phase step for Horizontal
    INT32       phaseInitVerticalP;               ///< phase init for P MNDS
    UINT16      earlyTerminationVerticalP;        ///< early termination for P MNDS
    INT32       roundingOptionVerticalP;          ///< rounding for H P MNDS

    UINT16      inputTLTR;                        ///< input for TL TR MNDS
    UINT16      outputTLTR;                       ///< output for TL TR MNDS
    INT32       phaseInitHorizontalTLTR;          ///< phase init for TL TR MNDS
    UINT16      earlyTerminationVerticalTLTR;     ///< early termination for TL TR MNDS
    UINT16      preCropTLTRFirstLine;             ///< early termination for TL TR MNDS

    UINT16      inputBLBR;                        ///< input for BL BR MNDS
    UINT16      outputBLBR;                       ///< output for BL BR MNDS
    INT32       phaseInitHorizontalBLBR;          ///< phase init for BL BR MNDS
    UINT16      earlyTerminationVerticalBLBR;     ///< early termination for BL BR MNDS
    UINT16      preCropBLBRFirstLine;             ///< early termination for TL TR MNDS

};

/// @brief BDSModuleInfo
struct BDSModuleInfo
{
    UINT8                                   enable;               ///< BDS enable
    UINT8                                   wbEnable;             ///< BDS WB Enable
    UINT8                                   dpcEnable;            ///< BDS DPC Enable
    UINT8                                   edgeEnable;           ///< BDS EDGE Enable
    UINT8                                   bdsEnable;            ///< BDS EDGE Enable
    UINT16                                  horTLBLRoundPattern;  ///< horizontal TLBL rounding pattern
    UINT16                                  horTRBRRoundPattern;  ///< horizontal TRBR rounding pattern
    UINT16                                  verTLTRRoundPattern;  ///< vertical TLTR rounding pattern
    UINT16                                  verBLBRRoundPattern;  ///< vertical BLBR rounding pattern
    UINT16                                  horPRoundPattern;     ///< horizontal P rounding pattern
    UINT16                                  verPRoundPattern;     ///< vertical P rounding pattern
    CropWindow                              preCrop;              ///< crop window for the client requested frame
    CropWindow                              preBDS2Crop;          ///< crop window for the client requested frame
    CropWindow                              modifiedCrop;         ///< crop window for the client requested frame
    CropWindow                              modifiedBDS2Crop;     ///< BDS2 crop window for the client requested frame
    TFEStripeBDSInStructV10InputParams      bdsHorizontalParam;   ///< BDSParam_v10 horizontal
    TFEStripeBDSInStructV11InputParams      bds11HorizontalParam; ///< BDSParam_v11 horizontal
    UINT8                                   dropFirstOutputH;     ///< dropFirstOutput horizontal
    TFEStripeBDSVerticalParams              bdsVerticalParam;     ///< BDSParam_v10 vertical
    UINT8                                   dropFirstOutputV;     ///< dropFirstOutput vertical
    TFEStripeBayerDs2_4InStruct             bds4Param;            ///< bayerds4 striping input param
    TFEStripeBayerDs2_4InStruct             bds2Param;            ///< bayerds2 striping input param
    UINT16                                  verPQ2;               ///< Vertical P Q2 factor
};

/// @brief BDS state
struct BDSState
{
    CropWindow         cropWindow;          ///< crop window for the client requested frame
    CropInfo           CAMIFCrop;           ///< Camif crop request from sensor
    UINT32             inputWidth;          ///< Camif output width in pixel
    UINT32             inputHeight;         ///< Camif output height in pixel
    StreamDimension    streamDimension;     ///< path dimension
    TFEScalerOutput    bdsOutput;           ///< BDS output info fed to Crop module as input
    VOID*              pInputData;          ///< pointer to ISP input data
    BOOL               preCropEnable;       ///< Precrop enable for BDS 4/2 scaler
    CropInfo           preCropInfo;         ///< BDS4/2 pre crop request from bds output
};

/// @brief MNDSAI state
struct MNDSAIState
{
    BOOL               preCropEnable;           ///< pre crop in MNDS scaler
    CropInfo           preCropInfo;             ///< Pre Crop window on MNDS Scaler
    BOOL               preBDS2CropEnable;       ///< pre crop in BDS2 scaler
    CropWindow         cropWindow;              ///< crop window for the client requested frame
    CropWindow         modifiedCropWindow;      ///< crop window for the requested frame
    CropInfo           CAMIFCrop;               ///< Camif crop request from sensor
    UINT32             inputWidth;              ///< BDS2 output width in pixel
    UINT32             inputHeight;             ///< BDS2 output height in pixel
    UINT32             mndsInputWidth;          ///< Input after MNDScrop (Pre-crop)
    UINT32             mndsInputHeight;         ///< Input after MNDSCrop (Pre-crop)
    UINT32             rndOptionH;              ///< Rnd Option H
    UINT32             rndOptionV;              ///< Rnd Option V
    UINT32             lumaImgSizeChange;       ///< Luma Img Size
    StreamDimension    streamDimension;         ///< FD path dimension
    TFEScalerOutput    MNDSOutput;              ///< MNDS output info fed to Crop module as input
    FLOAT              preMNDSScalingFactor;    ///< Scaling which has been done before MNDS
};

/// @brief HVX state
struct HVXState
{
    UINT32             inputWidth;       ///< Input output width in pixel
    UINT32             inputHeight;      ///< Input output height in pixel
    CropInfo           cropWindow;       ///< Camif crop request
    StreamDimension    hvxOutDimension;  ///< HVX Out dimension
    FLOAT              scalingFactor;    ///< input to output scaling factor
    UINT32             overlap;          ///< OverLap
    UINT32             rightImageOffset; ///< Image Offset
};

/// @brief CROP state
struct CropState
{
    StreamDimension streamDimension;    ///< FD/Full/DS4/DS16 path dimension
    CropWindow      cropWindow;         ///< crop window for the requested frame
    CropWindow      modifiedCropWindow; ///< crop window for the requested frame
    CropWindow      cropMapWindow;      ///< crop window for map to IFE
    IFEScalerOutput scalerOutput;       ///< Scaler output dimension and scale factor
    CHIRectangle    cropInfo;           ///< output path crop info to IPE
    CHIRectangle    appliedCropInfo;    ///< crop info IFE applied
};

/// @brief Round and Clamp state
struct RoundClampState
{
    StreamDimension FDDimension;            ///< RoundClamp FD path dimension
    StreamDimension fullDimension;          ///< RoundClamp (Video) Full path dimension
    StreamDimension DS4Dimension;           ///< RoundClamp (Video) DS4 path dimension
    StreamDimension DS16Dimension;          ///< RoundClamp (Video) DS16 path dimension
    StreamDimension displayFullDimension;   ///< RoundClamp Display Full path dimension
    StreamDimension displayDS4Dimension;    ///< RoundClamp Display DS4 path dimension
    StreamDimension displayDS16Dimension;   ///< RoundClamp Display DS16 path dimension
    StreamDimension pixelRawDimension;      ///< RoundClamp PixelRaw path dimension
    IFEModuleFlags  moduleFlags;            ///< MNDS module flags
    StreamDimension AI1Dimension;           ///< RoundClamp FD path dimension
    StreamDimension AI2Dimension;           ///< RoundClamp (Video) Full path dimension
    StreamDimension IRDimension;            ///< IR path dimension
};

/// @brief Indicates how the exessive crop window should be adjusted to match output size
enum CropType
{
    CropTypeCentered = 0, ///< Crop equally from left and right
    CropTypeFromLeft,     ///< Crop from left
    CropTypeFromRight     ///< Crop from right
};

/// @brief DS4 path PreCrop Luma(Y) and Chroma(Cr) crop params
struct DS4PreCropInfo
{
    CropInfo YCrop;                 ///< Crop info for Y
    CropInfo CrCrop;                ///< Crop info for Cr
    UINT64   preDSXphaseInitLuma;   ///< preDSX_phase_init_Y;
    UINT64   preDSXphaseInitChroma; ///< preDSX_phase_init_C;
};

/// @brief DS4/16 state
struct DSState
{
    UINT32           sensorWidth;        ///< Sensow Width
    UINT32           sensorHeight;       ///< Sensor Height
    CropWindow       cropWindow;         ///< crop window for the client requested frame
    StreamDimension  DSXOutput;          ///< DSX out put width and height
    StreamDimension  DSXInput;           ///< DSX Input Width and Height
    FLOAT            DSXscaleFactor;     ///< DSX input to output scaling
    StreamDimension  MNDSOutput;         ///< MNDS module output dimension
    StreamDimension  DS4PathOutput;      ///< DS4 path output dimension
    StreamDimension  DS16PathOutput;     ///< DS16 path output dimension
    IFEModuleFlags   moduleFlags;        ///< DS4 1.0 module flags
    DS4PreCropInfo   preCropInfo;        ///< DS4 PreCrop Info
    BOOL             overWriteStripes;   ///< OverWrite Stripes
    CropType         cropType;           ///< cropType
    UINT32           bankSelect;         ///< Bank Select
};

/// @brief ABF output
struct ABFStripeOutput
{
    INT16 bx;                ///< Init_h_offset - h_center
    INT16 by;                ///< init_v_offset - v_center
    INT32 rSquareInit;       ///< bx^2+by^2;
    INT16 rSquareShift;      ///< Used to normalize r_square
};

/// @brief ABF state
struct ABFState
{
    union
    {
        ABF34InputData     dependenceData;     ///< Dependence Data for ABF34
        ABF341InputData    dependence341Data;  ///< Dependence Data for ABF341
        ABF40InputData     dependence40Data;   ///< Dependence Data for ABF40
        ABF401InputData    dependence401Data;  ///< Dependence Data for ABF401
        BPCABF41InputData  dependence41Data;   ///< Dependence Data for BPCABF41
        BPCABF411InputData dependence411Data;  ///< Dependence Data for BPCABF41
    };
    INT16 bx;                ///< Init_h_offset - h_center
    INT16 by;                ///< init_v_offset - v_center
    INT32 rSquareInit;       ///< bx^2+by^2;
    INT16 rSquareShift;      ///< Used to normalize r_square
    INT16 rSquareScale;      ///< 4095*64/(RNR_INIT_RSQUARE>>RNR_RSQUARE_SHIFT)
};

/// @brief Remosaic output
struct RemosiacStripeOutput
{
    INT16 bx;                ///< Init_h_offset - h_center
    INT16 by;                ///< init_v_offset - v_center
    INT32 rSquareInit;       ///< bx^2+by^2;
    INT16 rSquareShift;      ///< Used to normalize r_square
    INT16 rSquareScale;      ///< 4095*64/(RNR_INIT_RSQUARE>>RNR_RSQUARE_SHIFT)
};

/// @brief SFE Ouput Mux Selcetion
enum SFEOutMUXSelect
{
    SFEMUXDisable     = 0, ///< 0: Output Disable
    SFEMUXBypass      = 1, ///< 1: Bypass Output
    SFEMUXRemosaic    = 2, ///< 2: Remosaic output
    SFEMUXHDR         = 3, ///< 3: HDR Output
    SFEMUXBinning     = 4, ///< 4: Binning output
};

/// @brief SFE Exposure Channel Type
enum SFEExposureChannel
{
    ExposureChannel0   = 0,  ///< 0: Expsoure Channel 0
    ExposureChannel1   = 1,  ///< 1: Exposure Channel 1
    ExposureChannel2   = 2,  ///< 2: Exposure Channel 2
    ExposureChannelMax = 3,  ///< 3: Exposure Channel 3
};

/// @brief SFE Channel Info
struct SFEChannelInfo
{
    BOOL                  bIsActive;           ///< TRUE if Channel  Active
    FLOAT                 digitalGain;         ///< Digital Gain of Input Stream for channel
    SensorHDRExposureType channelExposureType; ///< Channel expoure Type
};

/// @brief SFE Usecase Mode
enum SFEUsecaseMode
{
    SFEUsecaseXCFA         = 1, ///< 1: SFE Configured in XCFA Mode
    SFEUsecaseXCFAHDR      = 2, ///< 2: SFE Configured in XCFA HDR Mode
    SFEUsecaseSHDR         = 3, ///< 3: SFE Configured in SHDR Mode
    SFEUsecaseBypass       = 4, ///< 4: SFE Configured in Bypass Mode
    SFEUsecaseOffline      = 5, ///< 5: SFE Configured in Offline Mode
    SFEUsecaseInlineFS     = 6, ///< 6: SFE Configured in in FS2 Mode
};

/// @brief XCFA HDR Type
enum XCFAHDRType
{
    XCFANoHDR            = 0,   ///< XCFA Invalid HDR
    XCFAPixelInterleaved = 1,   ///< XCFA Pixel Interleaved HDR
    XCFARowInterleaved   = 2,   ///< XCFA Row Interleaved HDR
};

/// @brief XCFA Type
enum XCFAType
{
    Bayer               = 0,  ///< Bayer
    QuadCFA             = 1,  ///< Quad CFA
    ThreeXThreeCFA      = 2,  ///< 3x3 CFA
    FourXFourCFA        = 3,  ///< 4x4 CFA
    RGBIR               = 4,  ///< RGBIR
    RGBWC               = 5,  ///< RGBWC
    RGBWK               = 6,  ///< RGBWK
    UnconventionalBayer = 7,  ///< Unconventional Bayer Pattern
    InvalidXCFA         = 8   ///< Invalid xcfa Pattern
};

/// @brief SFE write buffer offset in pixels for sHDR case
struct SFEWriteStart
{
    INT32 offsetInPixelsX;  ///< Offset in pixels in X direction
    INT32 offsetInPixelsY;  ///< Offset in pixels in Y direction
};

/// @brief SFE fetch buffer setting for sHDR case
struct SFEFetchInfo
{
    UINT32 readOffset;  ///< read Offset
    UINT32 writeOffset; ///< write Offset
};

/// @brief SFE Input Data
struct SFEInputData
{
    SFEChannelInfo  channelInfo[ExposureChannelMax]; ///< SFE Path Info Map
    SFEOutMUXSelect previewMUXSelect;                ///< Preview Mux Select
    SFEOutMUXSelect snapshotMUXSelect;               ///< Snapshot MUX Select
    SFEOutMUXSelect IROutputMUXSelect;               ///< Snapshot MUX Select
    SFEUsecaseMode  usecaseMode;                     ///< Usecase Mode
    XCFAType        xcfaType;                        ///< XCFA type
    XCFAHDRType     xcfaHDRType;                     ///< XCFA HDR Type
    UINT            numberOfExposures;               ///< Number Of Exposures
    UINT            numOfBayerMerge;                 ///< Number of Bayer merging
    SFEFetchInfo    fetchOffsets[IFECSIDMAX];        ///< SHDR Fetch Offset
    SFEWriteStart   startInPixels;                   ///< Start point in pixels
    UINT8           IROutputBinningFactor;           ///< IR Output BinningFactor
};

/// @brief RemosaicBin State
struct RemosaicBin201State
{
    SFEInputData             inputData;                 ///< SFE Input Data
    UINT32                   imageWidth;                ///< Image Width
    UINT32                   imageHeight;               ///< Image Height
    SensorPDAFInfo           PDAFInfo;                  ///< PDAF Info
    UINT8                    cfaPatternOffsetX;         ///< cfa pattern offset x
    UINT16                   PDAFGlobaloffsetX;         ///< PDAF Global Offset X
    UINT16                   PDAFXEnd;                  ///< PDAF X End
    UINT16                   PDAFTableXOffset;          ///< PDAF Table Offset X
};

/// @brief XCFAPDPC State
struct XCFAPDPC201State
{
    SensorPDAFInfo       PDAFInfo;          ///< PDAF Info
    UINT32               imageWidth;        ///< Image Width
    UINT32               imageHeight;       ///< Image Height
    XCFAPDPC201Stripe    stripeOut;         ///< Striping output
};

/// @brief DEMUX301 State
struct XCFADEMUX301State
{
    SFEInputData          inputData;         ///< SFE Input Data
    SensorPDAFInfo        PDAFInfo;          ///< PDAF Info
    UINT32                imageWidth;        ///< Image Width
    UINT32                imageHeight;       ///< Image Height
    XCFAPDPC201Stripe     stripeOut;         ///< Striping output
};


/// @brief CSMCE state
struct CSMCEState
{
    union
    {
        CSMCE11InputData   dependenceData;     ///< Dependence Data for CSMCE11
    };
};

/// @brief BLTM state
struct BLTMState
{
    UINT8  DCEnable;              ///< Enable Data collection
    UINT16 IPEnable;              ///< Enable Image Processing
    UINT16 horizontalSkipCnt;     ///< DS skip cnt
    UINT16 horizontalEnable;      ///< DS Horizontal Scale Enable
    UINT16 horizontalInput;       ///< Input Width n means n+1 from 8994
    UINT16 DSStartCount;          ///< DS start count, which used as early termination
    INT32  horizontalPhaseInit;   ///< DS phase init
    UINT32 horizontalPhaseStep;   ///< DS phase step
    UINT16 horizontalInterpReso;  ///< DS N/M
    UINT16 verticalEnable;        ///< DS Verical Scale Enable
    UINT16 verticalInput;         ///< Input Height n means n+1 from 8994
    INT32  verticalPhaseInit;     ///< DS phase init
    UINT32 verticalPhaseStep;     ///< DS phase step
    UINT16 verticalInterpReso;    ///< DS N/M
    UINT8  DC3dSumClear;          ///< reset 3D stats , enabled for leftmost str
    UINT8  DCInitCellNumX;        ///< Starting cell/ grid used for data collection
    UINT8  DCInitX;               ///< Starting position within starting cell for data collection x direction
    UINT8  DCConvStartCellX;      ///< Convolution start cell 0-12
    UINT8  DCConvEndCellX;        ///< Convolution end cell 0-12
    UINT16 DCXstart;              ///< Valid start pixel after ds
    UINT16 DCXend;                ///< Valid end pixel after ds <= max_strip_width-1
    UINT16 DSHorizontalSkipCnt;   ///< Pre cropping
    UINT8  DSFac;                 ///< 1/2, 1/4, 1/1 downscaled image for digital zooming
    UINT16 IPCellwidth;           ///< IP cell width
    UINT32 IPInvCellwidth;        ///< IP Inverse of cellwidth
    UINT8  IPInitCellnum;         ///< IP start on which cell
    UINT16 IPInitdx;              ///< IP start location inside initial cell
    UINT32 IPInitpx;              ///< init_pixel * inv_cellwidth
    UINT8  IPInitCellNumX;        ///< Starting cell/ grid used for image porcessing
};

/// @brief LCAC state
struct LCACState
{
    UINT32 startR2MSB;                    ///< Initial R2
    UINT32 startR2LSB;                    ///< Initial R2
    UINT32 startStepXMSB;                 ///< The initial R2 will be incremented by this step
    UINT32 startStepXLSB;                 ///< The initial R2 will be incremented by this step
    INT32  opticalCenterX;                ///< x coord of the optical center
    UINT32 inputStripWidthMinus_1;        ///< Input Strip Width;
    // UINT32 inputStripHeightMinus_1;    ///< Input Strip Height, not filled
};


/// @brief LSC state
struct LSCState
{
    union
    {
        LSC34InputData      dependenceData;     ///< Dependence Data for LSC34  Module
        LSC341InputData     dependence341Data;  ///< Dependence Data for LSC341  Module
        LSC35InputData      dependence35Data;   ///< Dependence Data for LSC35  Module
        LSC351InputData     dependence351Data;  ///< Dependence Data for LSC351 Module
        LSC36InputData      dependence36Data;   ///< Dependence Data for LSC36  Module
        LSC361InputData     dependence361Data;  ///< Dependence Data for LSC361 Module
        LSC371InputData     dependence371Data;  ///< Dependence Data for LSC371 Module
        LSC40InputData      dependence40Data;   ///< Dependence Data for LSC40  Module
        LSC401InputData     dependence401Data;  ///< Dependence Data for LSC401 Module
        LSC411InputData     dependence411Data;  ///< Dependence Data for LSC411 Module
        LSC421InputData     dependence421Data;  ///< Dependence Data for LSC421 Module
        LSC501InputData     dependence501Data;  ///< Dependence Data for LSC501 Module
    };
};

/// @brief PDPC state
struct PDPC151State
{
    PDPC151InputData   dependenceData;   ///< Dependence Data for PDPC151
    UINT8              PDAFTableXOffset; ///< PD table x offset
};

/// @brief BF state
struct BFStatsState
{
    UINT8 ROIIndexLUTBank;  ///< Index of ROI LUT bank currently selected
    UINT8 gammaLUTBank;     ///< Index of Gamma LUT bank currently selected
};

/// @brief enum identify filter type
enum class IFECAFFilterType
{
    Horizontal = 1,    ///< Horizontal filter type
    Vertical           ///< Vertical filter type
};

/// @brief Input for IFE CAF stats luma conversion configuration
struct CAFStats10LumaConversionConfigInput
{
    BOOL    forceYChannel;          ///< Flag to indicate use Y channel
    BOOL    overrideYCoefficient;   ///< Flag to override Y coeffcient
    FLOAT   ratio;                  ///< Ratio calculated by gamma downscaler algorithm
};

/// @brief Input for IFE CAF stats down scaler configuration
struct CAFStats10DownscalerConfigInput
{
    UINT  scalerRatioPower;         ///< Scale Ratio Power
};

/// @brief CAF region configuration
struct CAFFlexiGridConfig
{
    UINT32  horizontalOffset;       ///< CAF stats horizontal offset
    UINT32  verticalOffset;         ///< CAF stats vertical offset regions
    UINT32  horizontalRegionNum;    ///< CAF stats num of horizontal regions
    UINT32  verticalRegionNum;      ///< CAF stats num of vertical regionns
};

CAMX_BEGIN_PACKED

/// @brief ROI Index LUT type. Need to align in 32-bit for DMI programming
struct CAFStats10ROIIndexLUTType
{
    UINT32  height      : 13;   ///< [12:0]
    UINT32  unused1     : 1;    ///< [13:13]
    UINT32  width       : 12;   ///< [25:14]
    UINT32  unused2     : 1;    ///< [26:26]
    UINT32  top         : 14;   ///< [40:27]
    UINT32  left        : 14;   ///< [54:41]
    UINT32  regionID    : 8;    ///< [62:55]
    UINT32  outputID    : 8;    ///< [70:63]
    UINT32  needMerged  : 1;    ///< [71:71]
    UINT32  endOfBuffer : 1;    ///< [72:72]
    UINT32  regionType  : 1;    ///< [73:73]: 0: secondary region (6x6), 1: primary region (6x6)
    UINT32  unused4     : 22;   ///< [95:74]: Most significant bit side paddding to align in 32-bits
} CAMX_PACKED;

CAMX_END_PACKED

/// @brief CAF state
struct CAFStatsState
{
    UINT8                                ROIIndexLUTBank;        ///< Index of ROI LUT bank currently selected
    UINT8                                gammaLUTBank;           ///< Index of Gamma LUT bank currently selected
    CAFConfigParams                      pStatsConfig;           ///< Pointer to m_CAFStatsConfig
    CAFStats10LumaConversionConfigInput* pLumaConversionConfig;  ///< Pointer to m_lumaConversionConfigInput
    CAFStats10DownscalerConfigInput*     pDownscalerConfig;      ///< Pointer to m_downscalerConfigInput
    CAFStatsROIConfigType*               pHwROIConfig;           ///< Valid list of HW ROI config
    BOOL                                 inputConfigUpdate;      ///< Value from m_inputConfigUpdate
    BOOL                                 enableGammaLUT;         ///< Flag to indicate gamma LUT
    CAFStats10ROIIndexLUTType*           pROIDMIConfig;          ///< DMI ROI configuration
    UINT32*                              pGammaLUT;              ///< Gamma LUT
    UINT32*                              pFlexWidthLUT;          ///< Flex Width LUT
    UINT32*                              pFlexHeightLUT;         ///< Flex Height LUT
    CAFFlexiGridConfig*                  pFlexiGridConfig;       ///< Pointer to Flexi grid configuration
};

/// @brief BFW state
struct BFWStatsState
{
    UINT8 ROIIndexLUTBank;  ///< Index of ROI LUT bank currently selected
};

/// @brief Stats structutre to describe tap-out site selection
struct IFEStatsTapOut
{
    UINT32   HDRBEStatsSrcSelection;     ///< PRE_HDR: 0, POST_LSC: 1
    UINT32   HDRBHistStatsSrcSelection;  ///< PRE_HDR: 0, POST_LSC: 1
    UINT32   IHistStatsSrcSelection;     ///< PRE_GLUT: 0, POST_GLUT: 1
};

/// @ brief Structure to encapsulate IFE metadata
struct IFEMetadata
{
    IFECropInfo              cropInfo;                       ///< Remaining crop info for IPE to apply on IFE output
    IFECropInfo              appliedCropInfo;                ///< Crop info IFE applied
    ISPAWBBGStatsConfig      AWBBGStatsConfig;               ///< AWBBG Stats Config data for Parser Consumption
    ISPBFStatsConfig         BFStats;                        ///< BF configuration info
    ISPCAFStatsConfig        CAFStats;                       ///< CAF configuration info
    ISPLTMDCStatsConfig      BLTMDCStats;                    ///< BLTMDC configuration info
    ISPBFWStatsConfig        BFWStats;                       ///< BFW configuration info
    ISPBHistStatsConfig      BHistStatsConfig;               ///< BHist Stats Config data for Parser Consumption
    ISPAECBHistStatsConfig   AECBHistStatsConfig;            ///< BHist Stats Config data for Parser Consumption
    ISPIRBHistStatsConfig    IRBHistStatsConfig;             ///< BHist Stats Config data for Parser Consumption
    ISPCSStatsConfig         CSStats;                        ///< CS stats configuration for stats parser
    ISPHDRBEStatsConfig      HDRBEStatsConfig;               ///< HDRBE Stats Config data for Parser Consumption
    ISPAECBEStatsConfig      AECBEStatsConfig;               ///< AECBE Stats Config data for Parser Consumption
    ISPHDRBHistStatsConfig   HDRBHistStatsConfig;            ///< HDR BHist Stats Config data for Parser Consumption
    ISPIHistStatsConfig      IHistStatsConfig;               ///< IHist Stats Config data for Parser Consumption
    ISPRSStatsConfig         RSStats;                        ///< RS stats configuration for stats parser
    ISPTintlessBGStatsConfig tintlessBGStats;                ///< TintlessBG stats configuration for stats parser
    ISPALSCBGStatsConfig     ALSCBGStats;                    ///< ALSC stats configuration for stats parser
    UINT8                    colorCorrectionAberrationMode;  ///< color correction aberration mode
    UINT32                   edgeMode;                       ///< edge mode value
    UINT8                    noiseReductionMode;             ///< noise reduction mode value

    ISPAECBEStatsConfig      SFEAECBEStatsConfig[ExposureIndexCount];    ///< SFE AECBE Stats Config
    ISPAECBHistStatsConfig   SFEAECBHistStatsConfig[ExposureIndexCount]; ///< SFE AEC BHist Stats Config
    ISPAECBHistStatsConfig   AECIRBHistStatsConfig;          ///< IR BHist Stats Config data for Parser Consumption
    ISPIRBGStatsConfig       IRBGStatsConfig;                ///< IR BG Stats Config data for Parser Consumption
};

struct ISPInternalData;

/// @brief Structure to encapsulate IFE frame-level inter module dependent data
struct ISPFrameInternalData
{
    ISPInternalData* pFrameData; ///< Full frame ISP data
};

/// @brief Structure to encapsulate Lens shading attributes
struct LensShadingInfo
{
    DimensionCap lensShadingMapSize;                                ///< Lens Shading map size
    FLOAT        lensShadingMap[TotalChannels * MESH_ROLLOFF_SIZE]; ///< Lens Shading Map per channel
    UINT8        lensShadingMapMode;                                ///< Lens Shading map mode
    UINT8        shadingMode;                                       ///< Shading mode
};

/// @brief Tonamap point
struct IFELiteTonemapPoint
{
    FLOAT point[2]; ///< Input & output coordinates (IN, OUT), normalized from 0.0 to 1.0
};

/// @brief Tonamap point
struct ISPTonemapPoint
{
    FLOAT point[2]; ///< Input & output coordinates (IN, OUT), normalized from 0.0 to 1.0
};

struct IFELiteTonemapCurves
{
    UINT8               tonemapMode;                        ///< Tonemap mode
    INT32               curvePoints;                        ///< Number of tonemap curve points passed by framework
    IFELiteTonemapPoint tonemapCurveBlue[MaxCurvePoints];   ///< Pointer to tonemap curve blue
    IFELiteTonemapPoint tonemapCurveGreen[MaxCurvePoints];  ///< Pointer to tonemap curve green
    IFELiteTonemapPoint tonemapCurveRed[MaxCurvePoints];    ///< Pointer to tonemap curve red
};

struct ISPTonemapCurves
{
    UINT8           tonemapMode;                        ///< Tonemap mode
    INT32           curvePoints;                        ///< Number of tonemap curve points passed by framework
    ISPTonemapPoint tonemapCurveBlue[MaxCurvePoints];   ///< Pointer to tonemap curve blue
    ISPTonemapPoint tonemapCurveGreen[MaxCurvePoints];  ///< Pointer to tonemap curve green
    ISPTonemapPoint tonemapCurveRed[MaxCurvePoints];    ///< Pointer to tonemap curve red
};

/// @brief IFEWMData, contains the WM Update date
struct IFEWMData
{
    UINT32 portID;         ///< Port ID of the WM
    UINT32 hInit;          ///< Startng Pixel Offset in Pixels
    UINT32 width;          ///< Updated width of WM
    UINT32 height;         ///< Updated width of WM
    UINT32 mode;           ///< Updated mode 0x0: Line 0x1: Frame 0x2: Index
    UINT32 virtualFrameEn; ///< Virtual Frame Enable
    UINT32 packerFormat;   ///< ISP Packer Format
    UINT32 offset;         ///< offset
};

/// @brief IFEWMUpdate
struct IFEWMUpdate
{
    UINT32    numberOfWMUpdates;                ///< Number of WM updates
    IFEWMData WMData[ISPMaxOutputPorts];        ///< WM Update data
};

/// @brief TFEWMData, contains the WM Update date
struct TFEWMData
{
    UINT32 portID;         ///< Port ID of the WM
    UINT32 width;          ///< Updated width of WM
    UINT32 height;         ///< Updated width of WM
    UINT32 mode;           ///< Updated mode 0x0: Line 0x1: Frame
};

/// @brief TFEWMUpdate
struct TFEWMUpdate
{
    UINT32    numberOfWMUpdates;       ///< Number of WM updates
    TFEWMData WMData[CSLTFEPortIdMax]; ///< WM Update data
};

/// @brief IFELiteCalculatedMetadata
struct IFELiteCalculatedMetadata
{
    UINT32                  BLSblackLevelOffset;                            ///< Black level offset
};

/// @brief ISPCalculatedMetadata
struct ISPCalculatedMetadata
{
    FLOAT                   stretchGainBlue;                                ///< Stretch Gain Blue
    FLOAT                   stretchGainRed;                                 ///< Stretch Gain Red
    FLOAT                   stretchGainGreenEven;                           ///< Stretch Gain Green Even
    FLOAT                   stretchGainGreenOdd;                            ///< Stretch Gain Green Odd
    UINT32                  blackLevelResOffset;                            ///< Black level residual offset
    UINT32                  BLSblackLevelOffset;                            ///< Black level offset
    UINT32                  linearizationAppliedBlackLevel[ISPChannelMax];  ///< Dynamic Black Level
    UINT32                  demuxAppliedBlackLevel[ISPChannelMax];          ///< Dynamic Black Level
    HotPixelModeValues      hotPixelMode;                                   ///< hot pixel mode
    BOOL                    demuxEnable;                                    ///< Demux Enable
    BOOL                    BLSOffsetChanged;                               ///< Black level residual offset changed
    FLOAT                   BLStretchFactor;                                ///< Stretch factor for IFE stats prior to BLS
};

/// @brief Structure to set IFELite DMI banks update
struct IFELiteDMIBankUpdate
{
    BOOL   isValid;            ///< TRUE if the Update is Valid
    UINT32 CSIDBank;           ///< CSID DMI Bank
    UINT32 gammaBank;          ///< Gamma DMI Bank
    UINT32 BHistBank;          ///< Bhist DMI Bank
    UINT32 lensRollOffBank;    ///< LensRollOffBank
};

/// @brief Structure to set IFE DMI banks update
struct IFEDMIBankUpdate
{
    BOOL   isValid;             ///< TRUE if the Update is Valid
    UINT32 CSIDBank;            ///< CSID DMI Bank
    UINT32 pedestalBank;        ///< Pedestal DMI Bank
    UINT32 linearizaionBank;    ///< Linearization DMI Bank
    UINT32 BPCPDPCBank;         ///< BPS PDPC DMI Bank
    UINT32 ABFBank;             ///< ABF DMI Bank
    UINT32 LSCBank;             ///< LSC DMI Bank
    UINT32 GTMBank;             ///< GTM DMI Bank
    UINT32 gammaBank;           ///< Gamma DMI Bank
    UINT32 BFStatsDMIBank;      ///< BF Stats DMI Bank
    UINT32 DSXYBank;            ///< DSX Y DMI Bank
    UINT32 DSXCBank;            ///< DSX C DMI Bank
    UINT32 HDRBHistBank;        ///< HDR Bhist DMI Bank
    UINT32 BHistBank;           ///< Bhist DMI Bank
    UINT32 IHistBank;           ///< IHist DMI Bank
    UINT32 PDAFBank;            ///< PDAFBank
    UINT32 GICBank;             ///< GIC DMI bank
    UINT32 BPCABFBank;          ///< BPCABF DMI Bank
    UINT32 bayerGTMBank;        ///< Bayer GTM Dmi bank
    UINT32 bayerLTMBank;        ///< Bayer LTM Dmi bank
    UINT32 LCACBank;            ///< LCAC Dmi bank
    UINT32 AECBHistBank;        ///< AEC BHist Dmi bank
    UINT32 BFWBank;             ///< BFW Dmi bank
    UINT32 GTMFDBank;           ///< GTM FD DMI bank
    UINT32 UVGBank;             ///< UVGamma DMI Bank
    UINT32 SFEDemuxBank;        ///< SFE QCFA Demux Bank
    UINT32 SFELSC2DMIBank;      ///< SFE LSC Channel 2 DMI Bank
    UINT32 SFELSC1DMIBank;      ///< SFE LSC Channel 1 DMI Bank
    UINT32 SFELSC0DMIBank;      ///< SFE LSC Channel 0 DMI Bank
    UINT32 SFEBHist2DMIBank;    ///< SFE BHist Channel 2 DMI Bank
    UINT32 SFEBHist1DMIBank;    ///< SFE BHist Channel 1 DMI Bank
    UINT32 SFEBHist0DMIBank;    ///< SFE BHist Channel 0 DMI Bank
    UINT32 SFEHDRRemosiacBank;  ///< SFE HDR Remosaic Bank
    UINT32 SFEBPCPDPCBank;      ///< SFE BPC PDPC Bank
    UINT32 CAFStatsDMIBank;     ///< CAF Stats DMI Bank
    UINT32 preLSCPDPC1DBank;    ///< Pre LSC 1D bank
    UINT32 postLSCPDPC1DBank;   ///< Post LSC 1D bank
    UINT32 postLSCBGPDPC1DBank; ///< Post LSC to BG stats 1D bank
    UINT32 postFCGPDPC1DBank;   ///< Post LSC 1D bank
    UINT32 SFE1DPDPCC2DMIBank;  ///< SFE 1DPDPC Channel 2 DMI Bank
    UINT32 SFE1DPDPCC1DMIBank;  ///< SFE 1DPDPC Channel 1 DMI Bank
    UINT32 SFE1DPDPCC0DMIBank;  ///< SFE 1DPDPC Channel 0 DMI Bank
    UINT32 FCGBank;             ///< FCG DMI Bank
};

/// @ brief Structure to encapsulate OPE metadata
struct OPEMetadata
{
    CHIRectangle            cropInfo;                                 ///< Crop Info from input
    TMCOutputData           TMCInfo;                                  ///< TMC Info get from TFE
};

/// @brief Structure to set TFE DMI banks update
struct TFEDMIBankUpdate
{
    BOOL   isValid;           ///< TRUE if the Update is Valid
    UINT32 BHistBank;         ///< Bhist DMI Bank
    UINT32 BAFBank;           ///< BAF DMI Bank
    UINT32 lensRollOffBank;   ///< LensRollOffBank
    UINT32 BGAMMABank;        ///< Bayer Gamma Bank
    UINT32 GTMBank;           ///< GTM Bank
    UINT32 PDPCBank;          ///< PDPC Bank
    UINT32 PDAFBank;          ///< PDPC Bank
    UINT32 CSIDBank;          ///< CSID Bank
};

/// @brief ISP context info and unpacked input with context
struct ISPContextUnpackedInput
{
    ISPHWContextInfo    context;        ///< Context information
    VOID*               pUnpackedData;  ///< Unpacked register data
};

/// @brief structure to encapsulate IFE-Lite metadata
struct IFELiteMetadata
{
    ISPAECBEStatsConfig      AECBEStatsConfig;               ///< AECBE Stats Config data for Parser Consumption
    ISPAECBHistStatsConfig   AECBHistStatsConfig;            ///< BHist Stats Config data for Parser Consumption
};

/// @ brief Structure to encapsulate IFE-Lite inter module dependent data
struct IFELiteInternalData
{
    UINT8                       blackLevelLock;                                 ///< Calculated black level lock
    IFELiteMetadata             metadata;                                       ///< IFE metadata
    LensShadingInfo             lensShadingInfo;                                ///< Lens Shading attributes
};

/// @brief Structure to encapsulate IFE inter module dependent data
struct ISPInternalData
{
    FLOAT                   clamping;                                       ///< Clamping Value from Linearization Mode
    IFEScalerOutput         scalerOutput[MaxRoundClampPath];                ///< MNDS/DS4/DS16 output
    CropInfo                fullOutCrop;                                    ///< Full Luma post crop
    CropInfo                dispOutCrop;                                    ///< Display Luma post crop
    CropInfo                fdOutCrop;                                      ///< FD Luma post crop
    CropInfo                aiOutCrop;                                      ///< AI path Luma post crop
    BIT                     isVideoDS4Enable;                               ///< Bool to check if DS4 path is enabled
    BIT                     isDisplayDS4Enable;                             ///< Bool to check if Display DS4 path is enabled
    IFEModuleEnableConfig   moduleEnable;                                   ///< IFE module enable register configuration
    TFEModuleEnableConfig   tfeModuleEnable;                                ///< TFE module enable configuration
    IFEMetadata             metadata;                                       ///< IFE metadata
    UINT32                  blackLevelOffset;                               ///< Black level offset
    GammaInfo               gammaOutput;                                    ///< IFE / BPS Gamma output table
    GammaInfo*              pContextGamma;                                  ///< gamma array based on context
                                                                            ///< use in QLL case
    GTMInfo                 gtmInfo;                                        ///< IFE / BPS GTM info
    UVGammaInfo             UVGammaOutput;                                  ///< UVGamma output table
    FLOAT                   dynamicBlackLevel[ISPChannelMax];               ///< Dynamic Black Level
    LensShadingInfo         lensShadingInfo;                                ///< Lens Shading attributes
    DS4PreCropInfo          preCropInfo;                                    ///< DS4 path PreCrop module
    DS4PreCropInfo          preCropInfoDS16;                                ///< DS16 path PreCrop module
    DS4PreCropInfo          dispPreCropInfo;                                ///< DS4 display path PreCrop module
    DS4PreCropInfo          dispPreCropInfoDS16;                            ///< DS16 display path PreCrop module
    BOOL                    scalerDependencyChanged[MaxRoundClampPath];     ///< TRUE if full frame scaler dependency changed
    BOOL                    cropDependencyChanged[MaxRoundClampPath];       ///< TRUE if full frame scaler dependency changed
    BOOL                    lscDependencyChanged;                           ///< TRUE if lens roll off dependency changed
    BOOL                    PDPCDependencyChanged;                          ///< TRUE if lens PDPC dependency changed
    BOOL                    CAFDependencyChanged;                           ///< TRUE if contrast AF dependency changed
    BOOL                    bdsfourDependencyChanged;                       ///< TRUE if bdsfour dependency changed
    BOOL                    bdstwoDependencyChanged;                        ///< TRUE if bdstwo dependency changed
    Rational                CCTransformMatrix[ColorCorrectionRows][ColorCorrectionColumns]; ///< Color Correction
                                                                                            ///< transformation matrix
    UINT8                   colorCorrectionMode;                            ///< color correction mode
    ColorCorrectionGain     colorCorrectionGains;                           ///< color correction gains applied by WB
    UINT8                   blackLevelLock;                                 ///< Calculated black level lock
    UINT32                  blackLevelResOffset;                            ///< Black level residual offset
    BDSModuleInfo           bdsInfo;                                        ///< BDS module information
    HotPixelModeValues      hotPixelMode;                                   ///< hot pixel mode
    INT32                   controlPostRawSensitivityBoost;                 ///< Applied isp gain
    UINT8                   noiseReductionMode;                             ///< Noise reduction mode
    ISPTonemapCurves        toneMapData;                                    ///< tone map mode, curve points and curve
    FLOAT                   percentageOfGTM;                                ///< gtmPercentage for adrc
    IFEWMUpdate             WMUpdate;                                       ///< Max IFE Output ports per IFE.
    BOOL                    BLSOffsetChanged;                               ///< Black level residual offset changed
    MNDSModuleInfo          mndsAILuma;                                     ///< MNDS AI luma module information
    MNDSModuleInfo          mndsAIChroma;                                   ///< MNDS AI chroma information
    MNDSModuleInfo          chromaDS;                                       ///< Chroma DS2 information
    BOOL                    remosaicBinDependencyChanged;                   ///< TRUE if remosaicBin dependency changed
    BOOL                    demuxDependencyChanged;                         ///< TRUE if demux dependency changed
    AIDenoiserOutputData    aiDenoiserOutData;                              ///< output data for AIDE
    IFEFCGMUXSelect         FCGMuxSelect;                                   ///< FCG Mux Select
    BOOL                    updateSFERawFormat;                             ///< TRUE if SFE Raw port needs to be updated
    UINT32                  SFERawPortFormat;                               ///< SFE Raw port format
    FCGConfig               FCGConfig;                                      ///< FCG Channel data
    TFEWMUpdate             tfeWMUpdate;                                    ///< Max TFE Output ports per TFE.
    HMEOutputData           hMEOutData;                                     ///< output data for HME
};

/// @brief CVP Instance Profile Id
enum CVPProfileId
{
    CVPProfileIdDME = 0,            ///< DME only
    CVPProfileIdDMEwithICA,         ///< DME with ICA enabled
    CVPProfileIdICA,                ///< ICA only
    CVPProfileIdRegistration,       ///< Registration
    CVPProfileIdMFHDRPreview,       ///< DME with ICA enabled in MFHDR mode for preview
    CVPProfileIdMFHDR2Exp,          ///< DME with ICA enabled in MFHDR mode for snapshot, used for S to L in 2 Exp usecase
    CVPProfileIdMFHDR3ExpShort,     ///< DME with ICA enabled in MFHDR mode for snapshot, used for S to M in 3 Exp usecase.
    CVPProfileIdMFHDR3ExpLong,      ///< DME with ICA enabled in MFHDR mode for snapshot, used for L to M in 3 Exp usecase.
    CVPProfileIdMVWarpOnly,         ///< MVWarp only
    CVPProfileIdDFSDPP,             ///< DPS/DPP
    CVPProfileIdMax                 ///< Invalid
};

/// @brief CVP Instance Processing Id
enum CVPProcessingType
{
    CVPProcessingTypeDefault = 0,   ///< No Processing Type
    CVPProcessingTypePrefilter,     ///< Prefilter for MFNR / MFSR
    CVPProcessingTypeBlend,         ///< Blend for both MFNR / MFSR
    CVPProcessingTypeMax            ///< Invalid
};

/// @brief CVP Dme callback private data structure
struct CvpDmeCbPrivData
{
    UINT32      dmeSessionUserData;      ///< dme session user data
    VOID*       pNode;                   ///< pointer to node object
};

typedef CvpDmeCbPrivData CVPDmeCbPrivData;

//==============================================================================
/// @brief
///    Utility enum to reference DMM config strings evaDmmConfigStrings.
/// @details
///    PLEASE NOTE THAT THESE INDICES CANNOT BE ASSUMED TO BE THE INDEX OF THE
///    CONFIGS THEMSELVES. evaDmmQueryConfigIndices API has to be used to infer
///    them.
///
/// @ingroup dmm_type
//==============================================================================
enum EVADmmConfigStringIndex
{
   EVA_DMM_ACTUAL_FPS = 0,
   EVA_DMM_OPERATIONAL_FPS,
   EVA_DMM_SRC_IMAGE_INFO,
   EVA_DMM_SEC_SRC_IMAGE_INFO,
   EVA_DMM_REF_IMAGE_INFO,
   EVA_DMM_UPSCALE_VIDEO_ENABLE,
   EVA_DMM_UPSCALE_DISPLAY_ENABLE,
   EVA_DMM_INPUT_OUTPUT_ROIS,
   EVA_DMM_OUTPUT_SIZES,
   EVA_DMM_MODE,
   EVA_DMM_ALIGNMENT,
   EVA_DMM_DME_FTEXTURE_ENABLE,
   EVA_DMM_SRC_GCE_DISABLE,
   EVA_DMM_SRC_GRID_ENABLE,
   EVA_DMM_SRC_GRID_GEOMETRY,
   EVA_DMM_SEC_SRC_GRID_ENABLE,
   EVA_DMM_SEC_SRC_GRID_GEOMETRY,
   EVA_DMM_SRC_PERS_ENABLE,
   EVA_DMM_SRC_PERS_ROWS,
   EVA_DMM_SRC_PERS_COLS,
   EVA_DMM_SEC_SRC_PERS_ENABLE,
   EVA_DMM_SEC_SRC_PERS_ROWS,
   EVA_DMM_SEC_SRC_PERS_COLS,
   EVA_DMM_DME_ALIGN_CONTROL_DISABLE,
   EVA_DMM_DME_ALIGN_CONTROL_INV_MATRIX_ENABLE,
   EVA_DMM_HIGH_RES_SGM_BASIC_CONFIG,
   EVA_DMM_LOW_RES_SGM_BASIC_CONFIG,
   EVA_DMM_DETECTOR_ENABLE,
   EVA_DMM_LOGTAG,
   EVA_DMM_SAT_SCALE_FACTOR,
   EVA_DMM_GYRO_ALIGNMENT,
   EVA_DMM_ECU_CONFIG,
   EVA_DMM_DME,
   EVA_DMM_SRC_GCE,
   EVA_DMM_SEC_SRC_GCE,
   EVA_DMM_GLOBAL_ALIGN_GCE,
   EVA_DMM_LOCAL_MOTION_GCE,
   EVA_DMM_ALIGN_CONTROL,
   EVA_DMM_HIGH_RES_SGM,
   EVA_DMM_LOW_RES_SGM,
   EVA_DMM_SGM_CONF,
   EVA_DMM_MULTIFRAME_INPUT_RESOLUTION,
   EVA_DMM_ECU_PRIM_CONFIG,
   EVA_DMM_DETECTOR,
   EVA_DMM_DME_DMM_SWITCH
};

//==============================================================================
/// @brief
///    Utility enum to reference WarpExtn config strings
///    evaWarpExtnConfigStrings.
/// @details
///    PLEASE NOTE THAT THESE INDICES CANNOT BE ASSUMED TO BE THE INDEX OF THE
///    CONFIGS THEMSELVES. evaWarpExtnQueryConfigIndices API has to be used to
///    infer them.
///
/// @ingroup dmm_type
//==============================================================================
enum EVAWarpExtnConfigStringIndex
{
   EVA_WARPEXTN_ACTUAL_FPS,
   EVA_WARPEXTN_OPERATIONAL_FPS,
   EVA_WARPEXTN_INPUT_TYPE,
   EVA_WARPEXTN_NUM_OUTPUTS,
   EVA_WARPEXTN_STAGE1_INPUT_IMAGE_INFO,
   EVA_WARPEXTN_STAGE2_INPUT_IMAGE_INFO,
   EVA_WARPEXTN_STAGE1_OUTPUT1_IMAGE_INFO,
   EVA_WARPEXTN_STAGE1_OUTPUT2_IMAGE_INFO,
   EVA_WARPEXTN_STAGE2_OUTPUT1_IMAGE_INFO,
   EVA_WARPEXTN_STAGE2_OUTPUT2_IMAGE_INFO,
   EVA_WARPEXTN_IPE_ICAOUT_ROI,
   EVA_WARPEXTN_INPUT_MV_IN_ROI,
   EVA_WARPEXTN_HAVE_UPSCALE_PATH,
   EVA_WARPEXTN_IS_UPSCALE_PATH,
   EVA_WARPEXTN_SGM_SUBSAMPLE,
   EVA_WARPEXTN_GRID_ENABLE,
   EVA_WARPEXTN_GRID_GEOMETRY,
   EVA_WARPEXTN_PERSPECTIVE_ENABLE,
   EVA_WARPEXTN_PERSPECTIVE_ROWS,
   EVA_WARPEXTN_PERSPECTIVE_COLS,
   EVA_WARPEXTN_STAGE1_LMC_INPUT_WIDTH,
   EVA_WARPEXTN_STAGE1_LMC_INPUT_HEIGHT,
   EVA_WARPEXTN_STAGE2_LMC_INPUT_WIDTH,
   EVA_WARPEXTN_STAGE2_LMC_INPUT_HEIGHT,
   EVA_WARPEXTN_LOGTAG,
   EVA_WARPEXTN_UPSCALE_FACTOR,
   EVA_WARPEXTN_UPSCALE_OFFSET
};

typedef std::unordered_map<UINT32, const CHAR*> EVAConfigStringMap;

/// @brief Fence description
enum CVPSessionPriority : UINT32
{
    CVP_SESSION_PRIORITY_DME_VIDEO_PATH     = 0x8004,    ///< DME video path (EIS3)
    CVP_SESSION_PRIORITY_MF_REG_PATH        = 0x8006,    ///< MFNR/MFSR Registration
    CVP_SESSION_PRIORITY_DME_PREVIEW_PATH   = 0x8007     ///< DME preview/ regular video path and EIS2
};

/// @brief Fence description
enum CVPFences
{
    FullResImage            = 0, ///< Fence for FullResImage
    ScaledSrcImage,              ///< Fence for ScaledSrcImage
    ScaledSrcFrameCtxt,          ///< Fence for ScaledSrcFrameCtxt
    PespectiveBuffer,            ///< Fence for PespectiveBuffer
    GridBuffer,                  ///< Fence for GridBuffer
    ScaledRefImage,              ///< Fence for ScaledRefImage
    ScaledRefFrameCtxt,          ///< Fence for ScaledRefFrameCtxt
    DMEOutput                    ///< Fence for DMEOutput
};

static const UINT32 CVPSessionTypeDME = 0x8001; ///< cvp session type mask for DME usecase

/// @brief CVP Properties for ICA
/// 0 - EIS/SAT perspective transform
/// 1 - LDC/RSC/OIS Grid transform
/// 2 - GyroBased MCTF perspective transform
/// 3 - Gyro based HDR alignment perspective transform(Undistorted domain)
static const UINT CVPProperties                       = 4;

/// @brief Dmm Switch Chromatix for NclibDmmSwitch
struct EvaDmmSwitchChromatix
{
    UINT8 targetDmmPerc;                                              ///< The desired average percentage for DMM to run.
                                                                      /// 100% means system can run DMM all the time if needed
    UINT8 delta;                                                      ///< Allowed difference from the target DMM percentage.
                                                                      /// If the current DMM percentage is greater than
                                                                      /// target+delta, the decision will be switched to DME.
                                                                      /// If the percentage is less than target-delta,
                                                                      /// the decision is allowed to switch back to DMM
    UINT8 hystToDme;                                                  ///< Time hysteresis - for switching from DME to DMM.
                                                                      /// This parameter defines the number of frames needed to
                                                                      /// pass before the algorithm can switch back to DMM
    UINT8 hystToDmm;                                                  ///< Time hysteresis - for switching from DMM to DME.
                                                                      /// This parameter defines the number of frames needed to
                                                                      /// pass before the algorithm can switch back to DME
};

// DMM switch decision.
typedef enum : UINT8
{
    NCLIB_DME = 0,
    NCLIB_DMM = 1
} EVA_NCLIB_DMM_SWITCH;

/// @brief Instance Profile Id
enum IPEProfileId
{
    IPEProfileIdDefault = 0,        ///< 0  All IQ Modules except MFHDR
    IPEProfileIdNPS,                ///< 1  Noise Profile (ANR, TF, ICA1, ICA2) only
    IPEProfileIdPPS,                ///< 2  Post Processing Profile (All IQ blocks expect ANR, TF, ICA1, ICA2) only
    IPEProfileIdScale,              ///< 3  ScaleProfile (None)
    IPEProfileIdNoZoomCrop,         ///< 4  All default profile IQ Modules except fill zoom window
    IPEProfileIdIndications,        ///< 5  Profile Indications
    IPEProfileIdHDR10,              ///< 6  All IQ Modules process in HDR10 mode. Not a valid profile. need to be removed.
    IPEProfileIdICAWarpOnly,        ///< 7  Use ICA1 for grid warping
    IPEProfileIdUpscale,            ///< 8  Zoom only profile
    IPEProfileIdMFHDR,              ///< 9  NPS and MFHDR IQ modules except PPS. MFHDR & PPS is mutually exclusive
    IPEProfileIdExtraTFBlendPass,   ///< 10 Selective additional TF blend pass after main IPE processing
    IPEProfileIdPPSLTM,             ///< 11 Contains the following: Chroma Up, CST, Gamma, Chroma Enhancement, LTM
    IPEProfileIdVSEBlur,            ///< 12 Profile for default + VSE + Blur
    IPEProfileIdTemporalFilter,     ///< 13 NPS modules except ANR
    IPEProfileIdEqualization,       ///< 14 Equalization stage, include ANR, TF, HNR, LENR, VSE and DSX
    IPEProfileIdAI,                 ///< 15 AI data module includes CMUS, STMP as well
    IPEProfileIdAIBokeh,            ///< 16 AI bokeh include PPM as well
    IPEProfileId2DLUT,              ///< 17 2D LUT, contains CST, 2D LUT, CV IQ
    IPEProfileIdBayer2YUV,          ///< 18 Bayer 2 YUV only IPE. Needed for Mimas
    IPEProfileIdHDRNoisefilter,     ///< 19 Only ANR, inverse gamma with PreLTMgamma, cc,ct for sw HVX HDR.
    IPEProfileIdMax                 ///< Invalid
};

/// @brief Instance Stabilization Id
enum IPEStabilizationType : UINT32
{
    IPEStabilizationTypeNone     = 0,   ///< 0 No Stabilization
    IPEStabilizationTypeEIS2     = 2,   ///< 1 EIS2.0
    IPEStabilizationTypeEIS3     = 4,   ///< 2 EIS3.0
    IPEStabilizationMCTF         = 8,   ///< 3 Motion Controlled alignment
    IPEStabilizationTypeSWEIS2   = 16,  ///< 4 SW EIS2.0
    IPEStabilizationTypeSWEIS3   = 32,  ///< 5 SW EIS3.0
    IPEStabilizationTypeSAT      = 64,  ///< 6 SAT Transform
    IPEStabilizationTypeMax      = 128, ///< Invalid/max
};

/// @brief Instance Processing Id
enum IPEProcessingType
{
    IPEProcessingTypeDefault         = 2,               ///< 0  No Processing Type
    IPEMFNRPrefilter                 = 4,               ///< 1  Prefilter
    IPEMFNRBlend                     = 8,               ///< 2  Blend
    IPEMFNRScale                     = 16,              ///< 3  Scale
    IPEMFNRPostfilter                = 32,              ///< 4  Postfilter
    IPEProcessingPreview             = 64,              ///< 5  Preview Processing type
    IPEMFSRPrefilter                 = 128,             ///< 6  Prefilter
    IPEMFSRBlend                     = 256,             ///< 7  Blend
    IPEMFSRPostfilter                = 512,             ///< 8  Postfilter
    IPEProcessingMFHDR               = 1024,            ///< 9  IPE MFHDR
    IPEProcessingPostMFHDR           = 2048,            ///< 10 Post MFHDR
    IPEProcessingPostFusionIPE       = 4096,            ///< 11 Post Fusion IPE
    IPEMMFPrefilter                  = 8192,            ///< 12 Prefilter
    IPEMMFBlend                      = 16384,           ///< 13 Blend
    IPEMMFEqualization               = 32768,           ///< 14 Equalization
    IPEMMFPostfilter                 = 65536,           ///< 15 Postfilter
    IPEProcessingPreAI               = 131072,          ///< 16 IPE Pre AI
    IPEProcessingPreAIwithLDC        = 262144,          ///< 17 IPE AI
    IPEProcessingAI                  = 524288,          ///< 18 IPE AI
    IPEFirstCascadedMCTF             = 1048576,         ///< 19 IPE first MCTF For Cascaded MCTF
    IPESecondCascadedMCTF            = 2097152,         ///< 20 IPE second MCTF For Cascaded MCTF
    IPEProcessingTFBlend             = 4194304,         ///< 21 IPE extrapass TF Blend
    IPEProcessingLowResolutionUpscale= 8388608,         ///< 22 IPE Tele Upscale
    IPEProcessingPreHDRFusion        = 16777216,        ///< 23 Pre HDR Fusion
    IPEProcessingTypeMax             = 33554432,        ///< max type
};


/// @brief Cascaded MCTF IPE Node Property
enum CascadedMCTFIPENodePropertyType
{
    NodePropertyIPEMCTF1     = 1,   ///< IPE MCTF1
    NodePropertyIPEMCTF2     = 2,   ///< IPE MCTF2
};

/// @brief CVP Instance Property Information
struct CVPInstanceProperty
{
    CVPProfileId            profileId;                            ///< CVP profile ID
    CVPProcessingType       processingType;                       ///< CVP processing type
    UINT32                  stabilizationType;                    ///< EIS2.0/ EIS3.0 / MCTF with EIS
    MotionVectorDomain      motionVectorDomain;                   ///< Tells if EVA needs to consume LDC grid
};

/// @brief EIS usecase mode
enum ImageStabilizationMode
{
    NoEIS                    = 0, ///< no stabilization
    EIS2PreviewVideo         = 1, ///< EIS2  mode
    EIS2PreviewEIS3Video     = 2, ///< EIS2 preview and EIS3 video
    EIS2Preview4KEIS3Video   = 3, ///< EIS2 preview and 4K EIS3 video
    DMEIS2PreviewVideo       = 4, ///< Descriptor-based Motion Estimation mode.
    MaxImageStablizationMode = 5, ///< Max image stabilization mode
};

/// @brief QSAT Instance Property Information
struct QSATInstanceProperty
{
    CVPProfileId            profileId;                            ///< CVP profile ID
    CVPProcessingType       processingType;                       ///< CVP processing type
    UINT32                  stabilizationType;                    ///< EIS2.0/ EIS3.0 / MCTF with EIS
};

/// @brief IPE IQ Instance Property Information
struct IPEInstanceProperty
{
    UINT                    ipeOnlyDownscalerMode;                ///< IPE only downscaler enabled
    UINT                    ipeDownscalerWidth;                   ///< IPE only downscaler enabled width
    UINT                    ipeDownscalerHeight;                  ///< IPE only downscaler enabled height
    IPEProfileId            profileId;                            ///< NPS/PPS/Scale
    UINT32                  stabilizationType;                    ///< EIS2.0/ EIS3.0 / MCTF with EIS
    IPEProcessingType       processingType;                       ///< prefilter, blend, scale, postfilter
    BOOL                    enableCHICropInfoPropertyDependency;  ///< ensable CHI crop property dependency
    UINT                    enableFOVC;                           ///< FOVC Enable
    UINT                    frameSkipPattern;                     ///< Stats skip request pattern
    UINT                    context;                              ///< Long/ medium/ short exposure
    UINT                    cascadedMCTFIPE;                      ///< CascadedMCTF IPE
    UINT                    dynamicInputFormat;                   ///< dynamic Input format (Bayer/YUV)
};


/// @brief Instance Profile Id
enum IFEProfileId
{
    IFEProfileIdDefault = 0,    ///< 0: Real time pipeline
    IFEProfileIdOffline,        ///< 1: Offline mode
    IFEProfileIdSHDR,           ///< 2: SDHR mode
    IFEProfileIdMFHDR,          ///< 3: MFHDR mode
    IFEProfileIdInputMetadata3A,///< 4: Read 3A configuration from input meta
    IFEProfileIdStatsParse,     ///< 5: StatsParse mode
    IFEProfileIdUseSFE,         ///< 6: Use SFE
    IFEProfileIdMax,            ///< 7: Invalid
};

/// @brief Instance Profile Id
enum TFEProfileId
{
    TFEProfileIdDefault = 0,    ///< 0: Real time pipeline
    TFEProfileIdStatsParse,     ///< 1: StatsParse mode
    TFEProfileIdMax,            ///< 2: Invalid
};

/// @brief IFE IQ Property Information
struct IFEInstanceProperty
{
    UINT            IFECSIDHeight;          ///< IFE Dynamic CSID Height
    UINT            IFECSIDWidth;           ///< IFE Dynamic CSID Width
    UINT            IFECSIDLeft;            ///< IFE Dynamic CSID Left
    UINT            IFECSIDTop;             ///< IFE Dynamic CSID Top
    UINT            IFEStatsSkipPattern;    ///< IFE Stats Skip Pattern
    UINT            IFESingleOn;            ///< IFE flag to force IFE to single IFE
    IFEProfileId    profileId;              ///< realtime/offline
};

struct TFEInstanceProperty
{
    UINT                    TFECSIDHeight;       ///< TFE Dynamic CSID Height
    UINT                    TFECSIDWidth;        ///< TFE Dynamic CSID Width
    UINT                    TFECSIDLeft;         ///< TFE Dynamic CSID Left
    UINT                    TFECSIDTop;          ///< TFE Dynamic CSID Top
    UINT                    TFEStatsSkipPattern; ///< TFE Stats Skip Pattern
    UINT                    TFESingleOn;         ///< TFE flag to force TFE to single TFE
    IFEProfileId            profileId;           ///< realtime/offline
};

enum IFELiteProfileId
{
    IFELiteProfileIdDefault = 0,    ///< 0: Real time pipeline
    IFELiteProfileIdMax,            ///< 1: Invalid
};

struct IFELiteInstanceProperty
{
    UINT                IFELiteCSIDHeight;          ///< IFE Dynamic CSID Height
    UINT                IFELiteCSIDWidth;           ///< IFE Dynamic CSID Width
    UINT                IFELiteCSIDLeft;            ///< IFE Dynamic CSID Left
    UINT                IFELiteCSIDTop;             ///< IFE Dynamic CSID Top
    UINT                IFELiteStatsSkipPattern;    ///< IFE Stats Skip Pattern
    IFELiteProfileId    profileId;                  ///< realtime/offline
    UINT                IFELitePriority;            ///< stream priority
};

/// @brief IPE AI flow data
struct IPEAIMapDecodeData
{
    BOOL                        aiModDataChanged;
    AIMapDecode101UnpackedField aiModifierData[STMP_AI_MOD_MAX]; ///< AI modifiers 0: LTM, 1: LTM LCE, 2: CCM , 3: 2DLUT data
};

/// @brief IPEPipelineData, IPE pipeline configuration data
struct IPEPipelineData
{
    BOOL                 enableAICamera;                    ///< AI camera flow enable flag
    BOOL                 compressiononOutput;               ///< Compression enabled on Output
    BOOL                 isLowResolution;                   ///< Check the reolution is low or Higher for R manula control
    BOOL                 LTM_DC_Pass_Enable;                ///< DC pass enable
    BOOL                 needDSXModule;                     ///< Determines if DSX module is to be executed or not
    BOOL                 runExtraPass;                      ///< Determines if extrapass is needed to be run
    BOOL                 runExtraPassWithTFBlend;           ///< Determines if extrapass with TF constant blending is to be run
    BOOL                 extraPassBlendFactor;              ///< Extra pass TF blend factor
    UINT                 batchFrameNum;                     ///< Number of frames in a batch
    UINT                 numPasses;                         ///< number of passess
    UINT                 maxSupportedPasses;                ///< max supported number of passess
    UINT8                hasTFRefInput;                     ///< 1: TF has reference input; 0: TF has no reference input
    UINT8                isDigitalZoomEnabled;              ///< 1: digital zoom enable, 0: disable
    FLOAT                upscalingFactorMFSR;               ///< MFSR upscaling factor
    FLOAT                BGMidStatsSatRatio;                ///< AWB BG Stats Sat Ratio
    FLOAT                BGMidStatsDarkRatio;               ///< AWB BG Stats Dark Ratio
    UINT32               configIOTopology;                  ///< IPE configIO topology type
    UINT32               digitalZoomStartX;                 ///< Digital zoom horizontal start offset
    UINT32               digitalZoomStartY;                 ///< Digital zoom vertical start offset
    UINT32               ds4InputWidth;                     ///< LENR Input stream width
    UINT32               ds4InputHeight;                    ///< LENR Input stream height
    UINT32               instanceID;                        ///< instance ID;
    UINT32               numTFRefPorts;                     ///< Number of TF input Reference Ports enabled for IPE
    UINT32               realtimeFlag;                      ///< Flag for Realtime stream
    INT16                LTM_DC_Pass;                       ///< DC pass num
    const INT32*         pDeviceIndex;                      ///< Pointer to ICP device index
    VOID*                pFrameProcessData;                 ///< Pointer to firmware payload of type  IpeFrameProcessData
    VOID*                pIPEIQSettings;                    ///< Pointer to IpeIQSettings
    VOID**               ppIPEExtraPassIQSettings;          ///< Pointer to IpeExtraPassIQSettings
    VOID*                pWarpGeometryData;                 ///< Warp geometry Data
    CmdBuffer**          ppIPECmdBuffer;                    ///< Pointer to pointers of IPE command buffer managers
    DebugDataWriter*     pDebugDataWriter;                  ///< Debug data writer for dumping tuning metadata
    GeoLibParameters*    pGeoLibParameters;                 ///< Geolib Parameters;
    Format               fullInputFormat;                   ///< Imageformat
    IPEInstanceProperty  instanceProperty;                  ///< IPE Node Instance Property
    ImageDimensions      inputDimension;                    ///< Input Dimension
    ImageDimensions      marginDimension;                   ///< Margin Dimension
    ImageDimensions      fullInputDimension;                ///< Input Dimension
    ConfigICAMode        ICAMode;                           ///< ICA Mode
    UINT                 numDSXPasses;                      ///< number of DSX passes
    NcLibIcaContext*     pNcLibIcaContext;                  ///< NcLib ICA Context for LMC Params
    UINT                 ltmMinWidth;                       ///< LTM Minimal Width
    UINT                 ltmMinHeight;                      ///< LTM Minimal Height
    BOOL                 isMMFProcessingType;               ///< Flag to indicate MMF
    _ImageFormat         inputImageFWFormat[PASS_NAME_MAX]; ///< Input path image in firmware format for Full/DS4/DS16/DS64
    _ImageFormat         refImageFWFormat[PASS_NAME_MAX];   ///< Ref path image in firmware format for Full/DS4/DS16/DS64
    BOOL                 hasPrevFrameConfig;                ///< Flag to indicate whether previous frame config is available
    BOOL                 needIQSettingFromGeolib;           ///< need IQ Settings From  Geolib
    IPEAIMapDecodeData*  pAIMapDecodeData;                  ///< AI flow data
    BOOL                 isSecureMode;                      ///< Flag to indicate if instance is in secure mode
    ExposureSelect*      pMFHDRExposureMapping;             ///< HDR selection mapping table
    UINT32               currentExtrapassNumber;            ///< Current extrapass number
    UINT32               stmpInWidth;                       ///< stmp In width
    UINT32               stmpInHeight;                      ///< stmp In Height
    NCLIB_YInterpolationMode YInterpolationModeMap;         ///< Indication that input is CatMap or DepthMap
    BOOL                 needEnableHNRonRT;                 ///< Flag to indicate if HNR needs to be enabled on RT
    BOOL                 isValidAWBRforWBGains;             ///< Flag to indicate if it is a valid case to run WB or not
    BOOL                 isValidAWBRforGSStats;             ///< Flag to indicate if it is a valid case to run GS or not
    UINT64               requestIdOffsetFromLastFlush;      ///< the unique frame number for this capture request after flush
    BOOL                 isHVXHDRFeature;                   ///< Flag to indicate if HVX HDR feature mode.
    BOOL                 cascadeMCTFEnabled;                ///< Flag to indicate if cascaded MCTF is enabled
    UINT64               requestDelta;                      ///< Request Delta
};

/// @brief IPE Input Data
struct IPEExposureAlignmentData
{
    UINT32                    alignmentWidth;                  ///< Width for  IPE sHDR alignment
    UINT32                    alignmentHeight;                 ///< Height for IPE sHDR alignment
    FLOAT                     alignmentMargin;                 ///< IPE Alignment Margin
    const ImageFormat*        pImageFormat;                    ///< Input format
    UINT32                    fetchOffset;                     ///< Offset for IPE sHDR alignment
    BOOL                      isFetchOffsetValid;              ///< Is IPE sHDR alignment valid flag
    UINT32                    portID;                          ///< Port ID
};

/// @brief OverrideTransformModel, override TransformModel data
struct OverrideTransformModel
{
    BOOL                 isOverridden;                      ///< Is value overridden flag
    BOOL                 transformModel;                    ///< Value of transfrom model
};

/// @brief CVPPipelineData, CVP module data
struct CVPPipelineData
{
    VOID**                         ppCVPICAFrameCfgData;                          ///< CVP ICA frame config Data
    UINT32                         bufIndexCVPICAFrameCfgData;                    ///< EVA ICA frame config index
    UINT32                         fullInputWidth;                                ///< full Input width
    UINT32                         fullInputHeight;                               ///< full Input Height
    NcLibROI                       fullICAOutWindow;                              ///< Full ICA out zoom window
    NcLibROI                       icaInWindow;                                   ///< ICA in window
    GeoLibIcaPassMapping           icaInputData;                                  ///< ICA input Data
    NcLibGceFrameCfg*              pGCEConfig;                                    ///< GCE Config Data
    UINT32                         gceConfigLength;                               ///< Length of GCE Config Data
    NcLibGceFrameCfg*              pGCEConfigUs;                                  ///< GCE Config Data Us
    UINT32                         gceConfigLengthUs;                             ///< Length of GCE Config Data Us
    NCLIB_CONTEXT_SGM*             pSGMContextData;                               ///< SGM Context Data
    NCLIB_CONTEXT_DME              dmeContextData;                                ///< DME context data
    UINT32                         sgmContextDataLength;                          ///< Length of SGM Context Data
    NcLibIcaLmcPassParams*         pICALmcCfg;                                    ///< ICA LMC Config Data
    CVPProfileId                   profileId;                                     ///< Profile Id of CVP
    CVPProcessingType              processingType;                                ///< processing type of CVP
    BOOL                           sgmEnable;                                     ///< is SGM enable
    float                          sgmToIpeRatio;                                 ///< Requested SGM size to IPE input size
                                                                                  ///< ratio
    float                          satScaleFactor;                                ///< For SAT alignment, ratio between
                                                                                  ///< sensor FOVs
    BOOL                           isMVWarpOnly;                                  ///< is MVWarp only
    FLOAT                          downScaleRatio;                                ///< down scale ratio
    uint32_t                       dmeTunedSize;                                  ///< multi_frame_input_resolution
    NcLibGceSessionCfg*            pGCESessionConfig;                             ///< GCE Config Data
    UINT32                         gceSessionConfigLength;                        ///< Length of GCE Config Data
    UINT32                         sgmSessionConfigLength;                        ///< Length of SGM Config Data
    NcLibGceSessionCfg*            pGCESessionConfigUs;                           ///< GCE Config Data
    UINT32                         gceSessionConfigLengthUs;                      ///< Length of GCE Config Data
    VOID**                         ppEvaSgmFrameConfigInfo;                       ///< EVA SGM frame config Info
    VOID**                         ppEvaSgmFrameConfigData;                       ///< EVA SGM frame config Data
    UINT32                         bufIndexEvaSgmFrameConfig;                     ///< EVA SGM frame config index
    VOID**                         ppEvaGceFrameConfig;                           ///< EVA GCE Frame Config
    VOID**                         ppEvaGceFrameConfigData;                       ///< EVA GCE Frame Config Data
    UINT32                         bufIndexEvaGceFrameConfig;                     ///< EVA GCE frame config index
    VOID*                          pEvaSGMSessionConfig;                          ///< EVA SGM Session Config
    VOID*                          pEvaGceSessionConfig;                          ///< EVA GCE Session Config
    VOID*                          pEvaDmmSessionConfig;                          ///< EVA DMM Session Config
    VOID*                          pEvaGceSessionConfigData;                      ///< EVA GCE Session Config Data
    VOID**                         ppEvaGceFrameConfigUs;                         ///< EVA GCE Frame Config
    VOID**                         ppEvaGceFrameConfigDataUs;                     ///< EVA GCE Frame Config Data
    VOID*                          pEvaGceSessionConfigUs;                        ///< EVA GCE Session Config
    VOID*                          pEvaGceSessionConfigDataUs;                    ///< EVA GCE Session Config Data
    VOID**                         ppEvaDmmSgmAlignControlInfo;                   ///< EVA DMM SGM Align Control Info
    VOID*                          pIQModuleSettingsOutput;                       ///< IQ module settings output
    VOID*                          pEvaDepthSessionConfig;                        ///< EVA Depth Session Info
    VOID*                          pEvaDppSessionConfig;                          ///< EVA DPP Session Info
    VOID*                          pEvaDfsSgmSessionConfig;                       ///< EVA DFS Session Info
    VOID**                         ppEVADFSFrameCfg;                              ///< EVA DFS Info
    UINT32                         bufIndexEvaDFSFrameConfig;                     ///< EVA DFS Index
    VOID**                         ppEVADPPFrameCfg;                               ///< EVA DPP Info
    UINT32                         bufIndexEvaDPPFrameConfig;                     ///< EVA DPP Index
    UINT32                         bufIndexEvaDmmSgmAlignControlInfo;             ///< EVA DMM SGM Align Control Info Index
    BOOL                           isVSREnable;                                   ///< Is VSR enable
    BOOL                           isVideoMvUsPassEnable;                         ///< Video Mv upscale pass enabled
    BOOL                           isVideoMvEnable;                               ///< Video Mv enabled
    NcLibEvaMvWarpMaxSizes*        pVideoMvmaxSizes;                              ///< max EVA output sizes for MV warp pass
    NcLibImageSize                 mvVideoInSize;                                 ///< MV Video Warp in size
    FLOAT                          sgmDS;                                         ///< SGM downscale ratio
    VOID*                          pMVData;                                       ///< EVA MVWarp data
    UINT32                         alignmentMode;                                 ///< Alignment mode data
    BOOL                           isQSAT;                                        ///< Flag to indicate QSAT enabled
    BOOL                           isMFHDR;                                       ///< Flag to indicate MFHDR enabled
    BOOL                           isSelfieHDRUsecase;                            ///< Flag to indicate Selfie HDR Usecase
    BOOL                           isEISEnable;                                   ///< Flag to indicate if EIS is enabled
    UINT64                         requestId;                                     ///< Request ID for reference
    const CHAR*                    pNodeIdentifier;                               ///< Node identifier
    DMM10InputData*                pEvaDMMInput;                                  ///< EVA DMM input data
    DMM10InitializationInputData*  pEvaDMMInitData;                               ///< EVA DMM Init data
    DMM11InputData*                pEvaDMM11Input;                                ///< EVA DMM input data
    DMM11InitializationInputData*  pEvaDMM11InitData;                             ///< EVA DMM Init data
    GLOBALALIGN121InputData*       pEvaDMM12Input;                                ///< EVA DMM input data
    DMM12InitializationInputData*  pEvaDMM12InitData;                             ///< EVA DMM Init data
    NcLibEvaCalcDmmFrameIn         calcDmmFrameIn;                                ///< EVA DMM frame input data
    NcLibEvaCalcDmmSessionIn       calcDmmSessionIn;                              ///< EVA DMM session input data
    NcLibEvaCalcVideoDmmFrameIn    calcVideoDmmFrameIn;                           ///< EVA DMM video frame input data
    NcLibEvaCalcVideoDmmSessionIn  calcVideoDmmSessionIn;                         ///< EVA DMM video session input data
    UINT32                         maxBuffers;                                    ///< Max no of config Buffers
    NcLibFloat2                    mvRoiSize;                                     ///< MV Roi size
    CHIRectangle                   maxFDROIInDS4;                                 ///< The max face ROI in DS4 input image domain
    BOOL                           sgmSubsample;                                  ///< SGM subsample
    UINT32                         multi_frame_input_resolution;                  ///< DME multi frame input resolution
    NcLibIcaGridGeometry           srcGridGeometry;                               ///< Src GCE session grid geometry
    NcLibIcaGridGeometry           mfhdrSrcGridGeometry;                          ///< MFHDR Src GCE session grid geometry
    NcLibIcaGridGeometry           mfhdrSecSrcGridGeometry;                       ///< MFHDR Sec Src GCE session grid geometry
    NcLibIcaGridGeometry           qsatSrcGridGeometry;                           ///< QSAT Src GCE session grid geometry
    NcLibIcaGridGeometry           qsatSecSrcGridGeometry;                        ///< QSAT Sec Src GCE session grid geometry
    BOOL                           isMfhdrMctfAlign;                              ///< Is MFHDR MCTF alignment needed
    OverrideTransformModel         overrideTransformModelinDME;                   ///< Override transfrom model
    FLOAT                          absoluteMotion;                                ///< Absolute Motion
};

static const UINT MFSRDownscaleRatioShift           = 1;           ///< Currently the MFSR crop ratio is 2x,
                                                                   ///  so we need to right shift 1 bit to achieve it
static const UINT MaxIndexRegInputResolutionMap     = 8;

/// @brief Structure for registration input resolution info
struct RegInputResolutionInfo
{
    UINT32  width;      ///<    Width
    UINT32  height;     ///<    Height
};

/// @brief The mapping table of registration input resolution from tuning XML
static const RegInputResolutionInfo RegInputResolutionMap[]
{
    { 1920, 1440 },     ///<    Registration input resolution: 1440p
    { 1920, 1280 },     ///<    Registration input resolution: 1280p
    { 1920, 1080 },     ///<    Registration input resolution: 1080p
    { 1280, 960 },      ///<    Registration input resolution: 960p
    { 1280, 720 },      ///<    Registration input resolution: 720p
    { 1024, 768 },      ///<    Registration input resolution: 768p
    { 960,  540 },      ///<    Registration input resolution: 540p
    { 640,  480 },      ///<    Registration input resolution: 480p
};

/// @brief OPE IQ Modules index
enum OPEIQModulesIndex
{
    IndexWB = 0,              ///< 0:  WB
    IndexBPCABF,              ///< 1:  BPCABF
    IndexBLS,                 ///< 2:  BLS
    IndexDemosaic,            ///< 3:  Demosaic
    IndexDemux,               ///< 4:  Demux
    IndexChromaUp,            ///< 5:  ChromaUp
    IndexCST,                 ///< 6:  CST
    IndexCC,                  ///< 7:  CC
    IndexGTM,                 ///< 8:  GTM
    IndexLTMCommonPath,       ///< 9:  LTM Common Path
    IndexLTMSecondPass,       ///< 10:  LTM Second Pass
    IndexGamma,               ///< 11: Gamma
    IndexChromaEnhancement,   ///< 12: CV
    IndexCSMCE,               ///< 13: CSMCE
    IndexSCE,                 ///< 14: SCE
    IndexChromaDS,            ///< 15: ChromaDS
    IndexWNR,                 ///< 16: WNR
    IndexASF,                 ///< 17: ASF
    IndexUpscaler,            ///< 18: Upscaler
    IndexMNDS,                ///< 19: MNDS
    IndexCRCCommon,           ///< 20: CRC Common
    IndexCRCDisplay,          ///< 21: CRC Display
    IndexCRCVideo,            ///< 22: CRC Video
    IndexRS,                  ///< 23: RS
    IndexIHist,               ///< 24: BPCABF
    IndexLSC,                 ///< 25: LSC
    IndexPreCropLRO,          ///< 26: Pre Crop LRO
    IndexMax,                 ///< 27: Max
};

struct OPEIQModuleParameters
{
    UINT32  isEnabled;                                  ///< Is Module enabled
    BOOL    skipModuleProcessing;                       ///< Skip Processing of module
};

struct OPEIQSettings
{
    OPEIQModuleParameters      moduleParameters[IndexMax];    ///< Module Params
};

/// @brief OPEPipelineData, OPE pipeline configuration data
/// @todo (CAMX-4909) Update the stucture params as needed. Remove the unnecessary ones
struct OPEPipelineData
{
    const INT32*         pDeviceIndex;              ///< Pointer to OPE device index
    CmdBuffer**          ppOPECmdBuffer;            ///< Pointer to pointers of OPE command buffer managers
    UINT32*              p32bitDMIBufferAddr;       ///< Pointer to the 32 bit DMI Buffer
    OPEIQSettings*       pOPEIQSettings;            ///< Pointer to OPEIQSettings
    OPEPipelinePath      modulePath;                ///< Parameter to indicate pipeline path
    UINT                 batchFrameNum;             ///< Number of frames in a batch
    UINT                 numPasses;                 ///< number of passess
    UINT8                isDigitalZoomEnabled;      ///< 1: digital zoom enable, 0: disable
    UINT32               configIOTopology;          ///< OPE configIO topology type
    UINT32               digitalZoomStartX;         ///< Digital zoom horizontal start offset
    UINT32               digitalZoomStartY;         ///< Digital zoom vertical start offset
    UINT32               instanceID;                ///< instance ID;
    UINT32               realtimeFlag;              ///< Flag for Realtime stream
    Format               fullInputFormat;           ///< Imageformat
    OPEInstanceProperty  instanceProperty;          ///< OPE Node Instance Property
    ImageDimensions      inputDimension;            ///< Input Dimension
    MarginRequest        margin;                    ///< Margin
    BOOL                 isLowResolution;           ///< Check the reolution is low or Higher for R manual control
    INT16                LTM_DC_Pass;               ///< DC pass num
    BOOL                 LTM_DC_Pass_Enable;        ///< DC pass enable
    DebugDataWriter*     pDebugDataWriter;          ///< Debug data writer for dumping tuning metadata
    BOOL                 hasInputCropDelta;         ///< Delta between last and current crop info
    BOOL                 isCDSSnapshotEnabled;      ///< Is CDS Snapshot feature enabled
};

/// @brief Dual IFE stripe Id
enum DualIFEStripeId
{
    DualIFEStripeIdLeft = 0,    ///< Left stripe
    DualIFEStripeIdRight        ///< Right stripe
};

/// @brief Dual IFE impact for an IQ module
struct IQModuleDualIFEData
{
    BOOL dualIFESensitive;      ///< Indicates if the IQ module is affected by dual IFE mode
    BOOL dualIFEDMI32Sensitive; ///< Indicates if the left and right stripes needs separate DMI32 tables
    BOOL dualIFEDMI64Sensitive; ///< Indicates if the left and right stripes needs separate DMI64 tables
};

/// @brief IFELitePipelineData
struct IFELitePipelineData
{
    BOOL                        programCAMIF;               ///< Set to True, if need to program CAMIF
    ISPIQModuleType             IFELiteModuleType;          ///< IFE pipeline moudule Type
    ISPStatsModuleType          IFELiteStatsModuleType;     ///< IFE pipeline moudule Type
    IFELitePipelinePath         IFELiteDataPath;            ///< IFE pipeline path
    UINT                        numBatchedFrames;           ///< Number of Frames in the batch mode, otherwise it is 1
    DebugDataWriter*            pDebugDataWriter;           ///< Debug data writer for dumping tuning metadata
    IFEDefaultModuleConfig*     pDefaultConfig;             ///< Pointer to default Module Config
};

/// @brief IFEDualPDPipelineData
struct IFEDualPDPipelineData
{
    BOOL             programCAMIFLite;   ///< Set to True, if need to program CAMIF
    UINT             numBatchedFrames;   ///< Number of Frames in the batch mode, otherwise it is 1
};

/// @brief BltmLut, Bayer LTM average lut data
struct BltmLut
{
    BOOL              isValid;         ///< Bayer LTM average lut validity
    LTMDCStatsOutput  bltmAvgLut;      ///< Bayer LTM average lut
};

/// @brief BPSPipelineData, BPS pipeline configuration data
struct BPSPipelineData
{
    VOID*               pIQSettings;                ///< Pointer to FW BPS IQ settings structure
    CmdBuffer**         ppBPSCmdBuffer;             ///< Pointer to pointers of BPS command buffer managers
    const INT32*        pDeviceIndex;               ///< Pointer to ICP device index
    UINT32              width;                      ///< Stream width in pixels
    UINT32              height;                     ///< Stream Height in pixels
    UINT32              pipelineBayerBitWidth;      ///< Waipio Bayer pipeline width
    UINT32              pipelinePostBayerBitWidth;  ///< Waipio post Bayer pipeline width
    UINT32*             pBPSPathEnabled;            ///< Active BPS input/output info.
    DebugDataWriter*    pDebugDataWriter;           ///< Debug data writer for dumping tuning metadata
    BltmLut             bltmLutInfo;                ///< Avg BLTM LUT
    SFECompandInfo      SFECompandInfo;             ///< SFE Compand info
};

/// @brief Dual TFE stripe Id
enum DualTFEStripeId
{
    DualTFEStripeIdLeft = 0,    ///< Left stripe
    DualTFEStripeIdRight        ///< Right stripe
};

struct IQModuleDualTFEData
{
    BOOL dualTFESensitive;      ///< Indicates if the IQ module is affected by dual TFE mode
    BOOL dualTFEDMI32Sensitive; ///< Indicates if the left and right stripes needs separate DMI32 tables
};

/// @brief TFEPipelineData
struct TFEPipelineData
{
    BOOL             programCAMIF;       ///< Set to True, if need to program CAMIF
    TFEModuleMode    moduleMode;         ///< TFE IQ Module Operation Mode Single TFE/ Dual TFE
    UINT             reserved;           ///< TFE pipeline configuration data
    ISPIQModuleType  TFEModuleType;      ///< TFE pipeline moudule Type
    TFEPipelinePath  TFEPath;            ///< TFE pipeline path
    UINT             numBatchedFrames;   ///< Number of Frames in the batch mode, otherwise it is 1
    DebugDataWriter* pDebugDataWriter;   ///< Debug data writer for dumping tuning metadata
};

/// @brief ISPAlgoStatsData, Contains the stats data required by ISP algorithms
struct ISPAlgoStatsData
{
    ParsedBHistStatsOutput*      pParsedBHISTStats;                 ///< Parsed BHIST stats
    ParsedIHistStatsOutput*      pParsedIHISTStats;                 ///< Parsed IHIST stats
    ParsedTintlessBGStatsOutput* pParsedTintlessBGStats;            ///< Parsed tintless BG stats
    ParsedTintlessBGStatsOutput* pParsedTintlessBGStatMFHDR[3];     ///< Parsed tintless BG stats for MFHDR
                                                                    ///  with #CHIEXPOSURETYPE enum (Long, Mid, Short)
    ParsedALSCBGStatsOutput*     pParsedALSCBGStats;                ///< Parsed ALSC BG stats
    ParsedAWBBGStatsOutput*      pParsedAWBBGStats;                 ///< Parsed AWB BGStats
    ParsedALSCBGStatsOutput*     pParsedALSCBGStatsMFHDR[3];        ///< Parsed ALSC BG stats for MFHDR
                                                                    ///  with #CHIEXPOSURETYPE enum (Long, Mid, Short)
    ISPTintlessBGStatsConfig     tintlessBGConfig;                  ///< TintlessBG config
    ISPALSCBGStatsConfig         ALSCBGConfig;                      ///< ALSCBG config
    ISPBHistStatsConfig          BHistConfig;                       ///< BHIST config
    ISPIHistStatsConfig          IHistConfig;                       ///< IHIST config
    ParsedHDRBHistStatsOutput*   pParsedHDRBHISTStats;              ///< Parsed HDR BHIST stats
    ParsedHDRBEStatsOutput*      pParsedHDRBEStats;                 ///< Parsed HDR BE stats
    ParsedHDRBEStatsOutput*      pParsedHDRBEStatsSHDR[2];          ///< Parsed HDR BE stats for SHDR
    ParsedBHistStatsOutput*      pParsedAECBHISTStats;              ///< Parsed AEC BHIST stats
    ISPAECBHistStatsConfig       AECBHistConfig;                    ///< AEC BHIST config
    IFELTMDCStatsOutput*         pLTMStatsDC;                       ///< LTM Stats Data collection
    ParsedBEStatsOutput*         pParsedAECBEStats[2];              ///< Parsed AECBE stats for Ghost Detection
    ParsedBEStatsOutput*         pDefaultParsedAECBEStats;          ///< Parsed AECBE stats
    ISPRSStatsConfig             RSStatsConfig;                     ///< RS Stats config
    ParsedRSStatsOutput*         pParsedRSStats;                    ///< Parsed RS stats
    ParsedRSStatsOutput*         pParsedRSStatsMFHDR[3];            ///< Parsed RS stats for MFHDR
    IFELTMDCHistStatsOutput*     pLTMStatsDCHist;                   ///< LTM Stats Data collection                                                       ///  with #CHIEXPOSURETYPE enum (Long, Mid, Short)
};

/// @brief IFELite input configuration per frame
struct IFELiteFrameConfig
{
    AECFrameControl           AECUpdateData;                          ///< AEC_Update_Data
    AECStatsControl           AECStatsUpdateData;                     ///< AEC stats module config data
    AWBFrameControl           AWBUpdateData;                          ///< AWB_Update_Data
    AWBStatsControl           AWBStatsUpdateData;                     ///< AWB stats Update Data
    CropInfo                  CAMIFCrop;                              ///< CAMIF crop request from sensor
    IFELiteCAMIFCfgInfo       CAMIFConfigInfo;                        ///< CAMIF configure Info for all path
    UINT32                    BLSblackLevelOffset;                    ///< Black level offset
    PixelFormat               format;                                 ///< Image Format from sensor
    StreamDimension           stream[IFELiteMaxNonCommonPaths];       ///< Stream dimensions per stripe
    LSCState                  stateLSC;                               ///< LSC state
};

/// @brief ISP input configuration per stripe
struct ISPStripeConfig
{
    CropInfo            CAMIFCrop;                              ///< CAMIF crop request from sensor
    CropInfo            CAMIFCropIPP;                           ///< CAMIF IPP path crop
    CropInfo            CAMIFCropPPP;                           ///< CAMIF PPP path crop
    CropInfo            SFEInput;                               ///< SFE Input Crop
    CropWindow          HALCrop[MaxRoundClampPath];             ///< Crop region from the client per stripe
    StreamDimension     stream[MaxRoundClampPath];              ///< Stream dimensions per stripe
    AECFrameControl     AECUpdateData;                          ///< AEC_Update_Data
    AECStatsControl     AECStatsUpdateData;                     ///< AEC stats module config data
    AWBFrameControl     AWBUpdateData;                          ///< AWB_Update_Data
    AWBStatsControl     AWBStatsUpdateData;                     ///< AWB stats Update Data
    AFFrameControl      AFUpdateData;                           ///< AF_Update_Data
    AFStatsControl      AFStatsUpdateData;                      ///< AF stats Update Data
    AFDStatsControl     AFDStatsUpdateData;                     ///< AFD_Update_Data

    AFDStatsControl     AFDContextStatsUpdateData[MaxNumOfInputExposures];    ///< AFD_Context_Update_Data

    CSStatsControl      CSStatsUpdateData;                      ///< CS Stats update data
    IHistStatsControl   IHistStatsUpdateData;                   ///< IHist stats module config data
    PDHwConfig          pdHwConfig;                             ///< PD HW Config Data
    HVXState            stateHVX;                               ///< HVX state
    MNDSState           stateMNDS[IFEMaxNonCommonPaths];        ///< MNDS state
    MNDSAIState         stateMNDSAI[TFEMaxNonCommonPaths];      ///< MNDS AI state
    CropState           stateCrop[IFEMaxNonCommonPaths];        ///< Crop state
    RoundClampState     stateRoundClamp[IFEMaxNonCommonPaths];  ///< Round and clamp state
    DSState             stateDS[IFEMaxNonCommonPaths];          ///< DS4/16 state
    ABFState            stateABF;                               ///< ABF state
    ABFStripeOutput     ABFoutput;                              ///< ABF stripe output data (replace stateABF Titan680)

    RemosiacStripeOutput remosaicOutput;                        ///< Remosaic output

    BDSState            stateBDS[TFEMaxNonCommonPaths];         ///< BDS state
    CSMCEState          stateCSMCE;                             ///< CSMCE state
    LSCState            stateLSC;                               ///< LSC state
    BFStatsState        stateBF;                                ///< BF stats persistent data over multiple frames
    CAFStatsState       stateCAF;                               ///< CAF state
    BFWStatsState       stateBFW;                               ///< BFW Stats
    PDPC151State        statePDPC;                              ///< PDPC state
    PDPC151State        statePostLSCPDPC;                       ///< Post LSC PDPC state
    BLTMState           stateBLTM;                              ///< BLTM Stats
    LCACState           stateLCAC;                              ///< LCAC Stats
    UINT32              stripeId;                               ///< Zero-indexed stripe identifier
    CropType            cropType;                               ///< Crop type
    StreamDimension     stats[MaxStatsPorts];                   ///< Stats output dimensions per stripe
    ISPAlgoStatsData    statsDataForISP;                        ///< Stats data for ISP
    /// @note This will point to a common area where all IFE stripes see the same data. Only dual-insensitive IQ modules
    ///       may write into it, but all module may read from it.
    ISPFrameInternalData*      pFrameLevelData;                ///< Frame-level internal ISP data
    IFEStripeInterfaceOutput*  pStripeOutput;                  ///< Stripe config from striping lib
    TFEStripeInterfaceOutput*  pTFEStripeOutput;               ///< TFE Stripe config from striping lib
    BOOL                       overwriteStripes;               ///< Overwrite module calculation using striping lib
    IFECAMIFInfo               CAMIFSubsampleInfo;             ///< Camif subsample Info for Pdaf
    IFECSIDExtractionInfo*     pCSIDSubsampleInfo;             ///< Pointer to the CSID SubSample Info
    IFECAMIFCfgInfo*           pCAMIFConfigInfo;               ///< Pointer to Camif configure Info for all path
    CropInfo                   SFEPreviewCropInfo;             ///< Preview Crop info for SFE
    CropInfo                   SFESnapshotCropInfo;            ///< SFE Snapshot Crop Info
    CropInfo                   SFEIRCropInfo;                  ///< SFE IR Crop Info
    BOOL                       isTLBGStatsBinned;              ///< TinglessBG Stats is generated based on CSID binned frame
    BOOL                       isALSCBGStatsBinned;            ///< TinglessBG Stats is generated based on CSID binned frame
    IFESparsePDExtInfo         sparsePDExtInfo;                ///< Pointer to the SparsePD subsample info.
    ISPRSStatsConfig           RSStatsConfig;                  ///< RS configuration information
    RemosaicBin201State        stateSFERemosaicBin;            ///< SFE RemosaicBin state
    XCFAPDPC201State           statePDPC201;                   ///< SFE PDPC201 state
    XCFADEMUX301State          stateDEMUX301;                  ///< SFE DEMUX301 state
    NcLibWarpGrid              EISshortToLongAlign;            ///< SFE GD EIS data
};

/// @brief List of framework tags
static UINT32 ISPMetadataTags[] =
{
    BlackLevelLock                  ,
    ColorCorrectionAberrationMode   ,
    ColorCorrectionGains            ,
    ColorCorrectionMode             ,
    ColorCorrectionTransform        ,
    ControlAEMode                   ,
    ControlAWBMode                  ,
    ControlMode                     ,
    ControlPostRawSensitivityBoost  ,
    NoiseReductionMode              ,
    ShadingMode                     ,
    StatisticsHotPixelMapMode       ,
    StatisticsLensShadingMapMode    ,
    TonemapMode                     ,
    TonemapCurveBlue                ,
    TonemapCurveGreen               ,
    TonemapCurveRed                 ,
    ScalerCropRegion                ,
};

/// @brief OPE input configuration per stripe
/// @todo (CAMX-4909) Update the stucture params as needed. Remove the unnecessary ones
struct OPEStripeConfig
{
    CropWindow          HALCrop[MaxRoundClampPath];             ///< Crop region from the client per stripe
    StreamDimension     stream[MaxRoundClampPath];              ///< Stream dimensions per stripe
    AECFrameControl     AECUpdateData;                          ///< AEC_Update_Data
    AECStatsControl     AECStatsUpdateData;                     ///< AEC stats module config data
    AWBFrameControl     AWBUpdateData;                          ///< AWB_Update_Data
    AWBStatsControl     AWBStatsUpdateData;                     ///< AWB stats Update Data
    AFFrameControl      AFUpdateData;                           ///< AF_Update_Data
    AFStatsControl      AFStatsUpdateData;                      ///< AF stats Update Data
    AFDStatsControl     AFDStatsUpdateData;                     ///< AFD_Update_Data
    CSStatsControl      CSStatsUpdateData;                      ///< CS Stats update data
    IHistStatsControl   IHistStatsUpdateData;                   ///< IHist stats module config data
    MNDSState           stateMNDS[IFEMaxNonCommonPaths];        ///< MNDS state
    CropState           stateCrop[IFEMaxNonCommonPaths];        ///< Crop state
    RoundClampState     stateRoundClamp[IFEMaxNonCommonPaths];  ///< Round and clamp state
    ABFState            stateABF;                               ///< ABF state
    CSMCEState          stateCSMCE;                             ///< CSMCE state
    OPEIQProgramType    IQProgramType;                          ///< Indicates frame/stripe level programming
    UINT32              stripeId;                               ///< Zero-indexed stripe identifier
    CropType            cropType;                               ///< Crop type
    StreamDimension     stats[MaxStatsPorts];                   ///< Stats output dimensions per stripe
    LSCState            stateLSC;                               ///< LSC state
    /// @note This will point to a common area where all IFE stripes see the same data. Only dual-insensitive IQ modules
    ///       may write into it, but all module may read from it.
    ISPFrameInternalData*   pFrameLevelData;                    ///< Frame-level internal ISP data
    BOOL                    overwriteStripes;                   ///< Overwrite module calculation using striping lib

    ISPTintlessBGStatsConfig           tintlessBGConfig;        ///< TintlessBG config
    ParsedTintlessBGStatsOutput*       pParsedTintlessBGStats;  ///< Parsed tintless BG stats
    OPEStripeInterfaceInput            stripingInput;           ///< Stripe config to striping lib
    OPEStripeInterfaceOutputPerFrame   stripingOutput;          ///< Stripe config from striping lib
};

static const UINT NumISPMetadataTags = sizeof(ISPMetadataTags)/sizeof(UINT32);   ///< Number of vendor tags

static const UINT8 ISPMetadataTagReqOffset[NumISPMetadataTags] = { 0 };

/// @brief Framework tags requiring fer frame update by ISP
static const UINT ISPMetadataOutputTags[] =
{
    BlackLevelLock,
    ColorCorrectionAberrationMode,
    ColorCorrectionGains,
    ColorCorrectionMode,
    ColorCorrectionTransform,
    ControlPostRawSensitivityBoost,
    NoiseReductionMode,
    ShadingMode,
    StatisticsHotPixelMapMode,
    StatisticsLensShadingMapMode,
    ScalerCropRegion,
    TonemapMode,
    TonemapCurveBlue,
    TonemapCurveGreen,
    TonemapCurveRed,
};

static const UINT NumISPMetadataOutputTags = sizeof(ISPMetadataOutputTags) / sizeof(UINT32);   ///< Number of output vendor tags


/// @brief Color correction transform matrix
struct ISPColorCorrectionTransform
{
    CamxRational transformMatrix[ColorCorrectionRows][ColorCorrectionColumns];  ///< Color correction transform matrix
};

/// @brief Color correction gains
struct ISPColorCorrectionGains
{
    FLOAT gains[ISPColorCorrectionGainsMax];    ///< RGbGrB gains
};

/// @brief TMC data
struct ISPTMCInputData
{
    ParsedBHistStatsOutput*      pParsedBHISTStatsFromExposure[3];       ///< TMC parsed BHIST stats output upto 3-exposures
                                                                         ///  0: Long, 1: Mid, 2: Short
    ParsedAWBBGStatsOutput*      pParsedAWBBGStatsFromExposure[3];       ///< TMC parsed AWB BG stats output upto 3-exposures
                                                                         ///  0: Long, 1: Mid, 2: Short
    ParsedTintlessBGStatsOutput* pParsedTintlessBGStatsFromExposure[3];  ///< parsed TintlessBG stats output upto 3 exposures
                                                                         ///  0: Long, 1: Mid, 2: Short
    BOOL                         isValidAfterFlush;                      ///< Parsed stats are valid if request offset ID is
                                                                         ///  greater than maximum pipeline delay
};

struct GMOStatisticsOut
{
    FLOAT                           mv_sum_x;     ///< Sum motion x axis. units are pixels in dsXImageSize
    FLOAT                           mv_sum_y;     ///< Sum motion y axis. units are pixels in dsXImageSize
    UINT32                          mv_num;       ///< Num of MV's
    NcLibPerspTransformSingle       gmoMatrix;    ///< gmoMatrix defined on size of dsXImageSize
};

/// @brief IFELite tags
struct IFELiteHALTagsData
{
    UINT8                       blackLevelLock;                 ///< black level lock value
    UINT8                       controlAEMode;                  ///< AE mode
    UINT8                       controlAWBMode;                 ///< AWB mode
    UINT8                       controlAWBLock;                 ///< AWB lock
    UINT8                       controlAECLock;                 ///< AEC lock
    UINT8                       controlMode;                    ///< main control mode switch
    UINT8                       colorCorrectionMode;            ///< color correction mode
    IFELiteTonemapCurves        tonemapCurves[3];               ///< tonemap curves points to support 3 Gamma path
    UINT8                       statisticsLensShadingMapMode;   ///< lens shading map mode
    BOOL                        isStreamCropEnable;             ///< Per Stream Crop Feature Enabled/Disable
    const std::unordered_map<IFELitePipelinePath, CropWindow>*
                                pStreamCropMap;                 ///< path map to crop region per stream
    UINT8                       shadingMode;                    ///< shading mode
};

/// @brief ISP tags
struct ISPHALTagsData
{
    UINT8                       blackLevelLock;                 ///< black level lock value
    UINT8                       colorCorrectionAberrationMode;  ///< color correction aberration mode
    ColorCorrectionGain         colorCorrectionGains;           ///< color correction gains
    UINT8                       colorCorrectionMode;            ///< color correction mode
    ISPColorCorrectionTransform colorCorrectionTransform;       ///< color correction transform matrix
    UINT8                       controlAEMode;                  ///< AE mode
    UINT8                       controlAWBMode;                 ///< AWB mode
    UINT8                       controlAWBLock;                 ///< AWB lock
    UINT8                       controlAECLock;                 ///< AEC lock
    UINT8                       controlMode;                    ///< main control mode switch
    INT32                       controlPostRawSensitivityBoost; ///< Raw sensitivity boost control
    HotPixelModeValues          hotPixelMode;                   ///< hot pixel mode
    UINT8                       noiseReductionMode;             ///< noise reduction mode
    UINT8                       shadingMode;                    ///< shading mode
    UINT8                       statisticsHotPixelMapMode;      ///< hot pixel map mode
    UINT8                       statisticsLensShadingMapMode;   ///< lens shading map mode
    ISPTonemapCurves            tonemapCurves;                  ///< tonemap curves points
    CropWindow                  HALCrop;                        ///< HAL crop window for zoom
    INT32                       saturation;                     ///< saturation value
    UINT32                      edgeMode;                       ///< edge mode value
    UINT8                       controlVideoStabilizationMode;  ///< EIS mode value
    FLOAT                       sharpness;                      ///< sharpness value
    UINT8                       contrastLevel;                  ///< contrast level value
    LtmConstrast                ltmContrastStrength;            ///< ltmContrastStrength value
};

/// @brief IFE IQ module enable
struct IFEIQModuleEnable
{
    BIT pedestal;   ///< Pedestal enable bit
    BIT rolloff;    ///< rolloff enable bit
    BIT BAF;        ///< BAF enable bit
    BIT CAF;        ///< CAF enable bit
    BIT BGTintless; ///< BGTintless enable bit
    BIT BGAWB;      ///< BGAWB enable bit
    BIT BE;         ///< BE enable bit
    BIT PDAF;       ///< PDAF enable bit
    BIT HDR;        ///< HDR enable bit
    BIT BPC;        ///< BPC enable bit
    BIT ABF;        ///< ABF enable bit
    BIT BGALSC;     ///< BGALSC enable bit
};

/// @brief IFE Dual-IFE Index/ID
enum DualIFEIndex
{
    IFECommonIndex  = 0,                ///< Default / Common index for IFE
    IFELeftIndex    = IFECommonIndex,   ///< Left index for IFE
    IFERightIndex,                      ///< Right index for IFE
    IFEMaxIndex,                        ///< Total number of index available for IFE
};

/// @brief TFE Dual-TFE Index/ID
enum DualTFEIndex
{
    TFECommonIndex  = 0,                ///< Default / Common index for TFE
    TFELeftIndex    = TFECommonIndex,   ///< Left index for TFE
    TFERightIndex,                      ///< Right index for TFE
    TFEMaxIndex,                        ///< Total number of index available for TFE
};

/// @brief Striping input
struct IFEStripingInput
{
    IFEIQModuleEnable       enableBits;     ///< Enable bits
    IFEStripeInterfaceInput stripingInput;  ///< Striping library's input
};

/// @brief TFE IQ module enable
struct TFEIQModuleEnable
{
    BIT rolloff;    ///< rolloff enable bit
    BIT BAF;        ///< BAF enable bit
    BIT BETintless; ///< BETintless enable bit
    BIT BGAWB;      ///< BGAWB enable bit
    BIT BGAEC;      ///< BEABE enable bit
    BIT PDAF;       ///< PDAF enable bit
};

/// @brief Striping input
struct TFEStripingInput
{
    TFEIQModuleEnable        enableBits;     ///< Enable bits
    TFEStripeInterfaceInput  stripingInput;  ///< TFE Striping library's input
};

/// @brief ISP Titan HW version
enum ISPHWTitanVersion
{
    ISPHwTitanInvalid = 0x0,       ///< Invalid Titan HW version
    ISPHwTitan170     = 0x1,       ///< Titan HW version for SDM845/SDM710/SDM670 only
    ISPHwTitan175     = 0x2,       ///< Titan HW version for SDM855 (SM8150) only
    ISPHwTitan150     = 0x4,       ///< Titan HW version for SDM640 (SM6150) only.
    ISPHwTitan480     = 0x8,       ///< Spectra HW version 480
    ISPHwTitan580     = 0x10,      ///< Spectra HW version 580
    ISPHwTitan680     = 0x20,      ///< Spectra HW Version 680
    ISPHwTitan540     = 0x40,      ///< Spectra HW Version 540
    ISPHwTitan545     = 0x80,      ///< Spectra HW Version 545
    ISPHwTitan640     = 0x100,     ///< Spectra HW Version 640
    ISPHwTitan780     = 0x200,     ///< Spectra HW Version 780
    ISPHwTitan880     = 0x400,     ///< Spectra HW Version 880
    ISPHwTitan670     = 0x800,     ///< Spectra HW Version 670
    ISPHwTitan860     = 0x1000,     ///< Spectra HW Version 860
    ISPHwTitan665     = 0x2000,     ///< Spectra HW Version 665
    ISPHwTitan690     = 0x4000,     ///< Spectra HW Version 690
    ISPHwTitan692     = 0x8000,     ///< Spectra HW Version 692
};

/// @brief IPE data needed by Geolib IQ module
struct GeolibIPEdata
{
    BOOL                      isIPESIMOMode;                              ///< IPE simo enabled for the instance
    INT32                     fullOutputWidth;                            ///< Width of the full output image in pixels.
    INT32                     fullOutputHeight;                           ///< Height of the full output image in pix
    StabilizationMargin       stabilizationMargin;                        ///< ICA margin Dimensions
};

/// @brief Blur config info
struct BlurConfigInfo
{
    BOOL        manualBlurConfig;                     ///< enable manual blur config or not
    UINT8       blurShape;                            ///< blur shape of blurConfig
    FLOAT       blurStrength;                         ///< blur strength of blurConfig
    FLOAT       blurFocusDistance;                    ///< blur focusDistance of blurConfig
    UINT8       blurEffect;                           ///< blur effect: blur only or blur+luma, or blur+chorma
    FLOAT       blurChromaSuppressionU;               ///< blur chromaSuppressionU of blurConfig
    FLOAT       blurChromaSuppressionV;               ///< blur chromaSuppressionV of blurConfig
    FLOAT       blurSuppressionStrength;              ///< blur strength of blurConfig suppression
};

/// @brief AFC Input Data
struct AFCInputData
{
    // AFC/FCG input parameters
    BOOL                  enableFCG;                                 ///< Flag to enable/disable SW AFC and FCG IQ module
    AECFrameControl*      pAECFrameControl;                          ///< Points to the AEC Frame Control
    AFFrameInformation*   pAFFrameInfo;                              ///< Points to the AF frame information
    AFDFrameInfo*         pAFDFrameInfo;                             ///< Points to the AFD frame information
    AECFrameInformation*  pAECFrameInfoArray[ExposureIndexCount];    ///< Points to the AEC Frame Information
    AFDFrameControl*      pAFDFrameControlArray[ExposureIndexCount]; ///< Points to the AFD frame control information
    UINT64                timeStampInfo[ExposureIndexCount];         ///< Points to frame timestamps
    FLOAT                 rowSumTime[ExposureIndexCount];            ///< Points to RowSum time
    SensorMode*           pSensorMode;                               ///< Points to the Sensor mode information
    FLOAT                 curFPS;                                    ///< Number of frames per second in the current use case.
    UINT32                frameExpType;                              ///< Current exposure type index
    UINT32                numOfExposures;                            ///< Number of exposure frames
    DebugData             AFCdebugData;                              ///< AFC DebugData
    StatisticsAntibanding AFDMode;                                   ///< AFD mode
    VOID*                 pAFCAlgoFCGConfigArray;                    ///< Points to the FCG config (#AFCAlgoFCGConfig) array
                                                                     ///  of enum type #statsExposureIndex
};

/// @brief IPE Metadata
struct IPEMetadata
{
    UINT                            mfFrameNum;                         ///< frame number for MFNR/MFSR blending
    UINT                            modeIndex;                          ///< Sensor mode index
    UINT                            numBatchedFrames;                   ///< Number of frames batched in this request
    UINT                            parentNodeId;                       ///< Used for IPE metadata
    UINT32                          adjustedFullWidth;                  ///< adjusted Full width
    UINT32                          adjustedFullHeight;                 ///< adjusted Full height
    UINT32                          currentCameraId;                    ///< current CameraId
    UINT32                          hdrFeatureMode;                     ///< hdr feature mode
    UINT32                          numHDRExpFrames;                    ///< hdr feature number of exposure frame inputs
    UINT32                          numberOfCamerasRunning;             ///< number Of Cameras Running
    UINT32                          numOfFrames;                        ///< Number of frames used in MFNR/MFSR case
    UINT32                          QLLEnable;                          ///< QLL Mode
    UINT32                          sensorID;                           ///< Sensor ID Number
    UINT64                          frameNum;                           ///< Used for IPE metadata
    BOOL                            disableZoomCrop;                    ///< disable Zoom Crop status
    BOOL                            isAFDControlEnable;                 ///< AFD Mode Enabled/detected
    BOOL                            isFenceErrorDump;                   ///< Used for IPE metadata dump
    BOOL                            isMasterCamera;                     ///< isMaster Camera
    BOOL                            isMultiCameraUsecase;               ///< MultiCamera Usecase
    BOOL                            isDSXGeneration;                    ///< Flag indicating a DSX generation
    FLOAT                           fieldOfViewCompensationFactor;      ///< field Of View Compensation Factor

    TMCOutputData                   TMCInfo;                                             ///< TMC Info get from IFE/BPS
    Cascade2DLUTControl             cascade2DLUTControl;                                 ///< Cascade 2D LUT pass control.
    CHIRectangle                    origCropInfo;                                        ///< Crop Info from input
    CHIRectangle                    cropInfo;                                            ///< Crop Info for apply
    CHIRectangle                    extraPassCropInfo;                                   ///< Crop Info from input
    CHIRectangle                    mainPassCropInfo;                                    ///< Crop Info from input
    UINT32                          genericPassWidth;                                    ///< Generic pass width
    UINT32                          genericPassheight;                                   ///< Generic pass height
    GammaInfo                       gammaOutput;                                         ///<  IFE / BPS Gamma output table
    UVGammaInfo                     uvgammaOutput;                                       ///< IFE / BPS UVGamma output table
    GeoLibParameters                geolibData;                                          ///< Geo library data
    GeolibIPEdata                   geolibmoduledata;                                    ///< IPE data needed by geolib IQ
    GTMInfo                         gtmInfo;                                             ///< IFE / BPS GTM info
    IntermediateDimensions          intermediateDimension;                               ///< IntermediateDimension Data
    IPEICAPerspectiveTransform      ICAInPerspectiveParamsArr[IPEICAInPerspectiveMax];   ///< Perspective parameters for ICA1
    IPEICAGridTransform*            pICAInGridParamsArr;                                 ///< Grid parameters for ICA1
    IPEICAInterpolationParams       ICAInInterpolationParams;                            ///< Interpolation parameters for ICA1
    IPEICAPerspectiveTransform      ICARefPerspectiveParamsArr[IPEICARefPerspectiveMax]; ///< Perspective parameters for ICA2
    IPEICAGridTransform*            pICARefGridParamsArr;                                ///< Grid parameters for ICA 2
    IPEICAInterpolationParams       ICARefInterpolationParams;                           ///< Interpolation parameters for ICA2
    IPEICAPerspectiveTransform      ICAReferenceParamsArr[IPEMCTFAlignemntMax];          ///< Referenc(MCTF)parameters for ICA2
    IPEICAGridTransform*            pS2LICAInGridParams;                                 ///< Grid parameters for S2L alignment
    IPEICAGridTransform*            pL2SBayerICAInGridParams;                            ///< Grid parameters for L2S alignment
    RefCropWindowSize               refCropWindow;                                       ///< Ref Crop Info
    SeamlessInSensorState           seamlessInSensorState;                               ///< Seamless in-sensor control state
    StreamCropInfo                  streamCropInfo;                                      ///< Stream crop info on full input
    FLOAT                           catmapNormalizationRatioW;                           ///< catmap normorlization on width
    FLOAT                           catmapNormalizationRatioH;                           ///< catmap normorlization on height
    DebugData*                      pDebugDataPartial;                                   ///< Point to DebugDataPartial
    NRMConfigs*                     pFusionNRMConfigs[MFHDR_EXPOSURE_MAX];               ///< NRM Configuration
    NRMConfigs*                     pNRMConfigs;                                         ///< NRM Configuration
    const SensorMode*               pSensorMode;                                         ///< Sensor mode
    AWBRStatsControl*               pAWBRStatsUpdateData;                                ///< Pointer to the AWB-R stats data
    AWBROutput                      AWBROutputData;                                      ///< AWB-R output data
    GSStatsConfig*                  pAppliedGSStatsConfig;                               ///< Applied GS stats config
    BOOL                            gmoStatsCalcNeeded;                                  ///< Flag for GMO stats need calc
    GMOStatisticsOut                gmoStaticsOut;                                       ///< GMO stats out
    FLOAT                           motionIndication;                                    ///< Motion indication
    UINT64                          sofTimestamp;                                        ///< SOF timestamp in frame process
    IFEScalerOutput                 scalerOutput;                                        ///< IFE scale ratio
    PreferenceConfigs*              pPREFConfigs;                                        ///< Preference Configuration
    WindowRegionCropF               eisOutCropFOV;                                       ///< EIS output crop FOV
    WBandGTMOutputForTMC            wBandGTMOutputForTMC;                                ///< wBandGTMOutputForTMC
    BlurConfigInfo                  blurConfigInfo;                                      ///< blur config info
};

/// @brief IFE default module configuration
struct IFEDefaultModuleConfig
{
    UINT32 bayerPipelineBitWidth;               ///< Bayer Pipeline Bit width
    UINT32 postBayerPipelineBitWidth;           ///< Post bayer Block IFE pipeline Bitwidth
    UINT32 preProcessingBayerPipelineBitWidth;  ///< PreProcessing Bayer IFE pipeline Bitwidth
    UINT32 RSStatsHorizRegions;                 ///< RS stats Max horizontal region
    UINT32 RSStatsVertRegions;                  ///< RS stats Max vertical region
    UINT32 CSStatsHorizRegions;                 ///< CS stats Max horizontal region
    UINT32 CSStatsVertRegions;                  ///< CS stats Max horizontal region
};

struct IFEPipelineData
{
    BOOL                    programCAMIF;       ///< Set to True, if need to program CAMIF
    IFEModuleMode           moduleMode;         ///< IFE IQ Module Operation Mode Single IFE/ Dual IFE
    UINT                    reserved;           ///< IFE pipeline configuration data
    ISPIQModuleType         IFEModuleType;      ///< IFE pipeline moudule Type
    ISPStatsModuleType      IFEStatsModuleType; ///< IFE pipeline moudule Type
    IFEPipelinePath         IFEPath;            ///< IFE pipeline path
    SFEPipelinePath         SFEPath;            ///< SFE pipeline path
    UINT                    numBatchedFrames;   ///< Number of Frames in the batch mode, otherwise it is 1
    IFEDefaultModuleConfig* pDefaultConfig;     ///< Pointer to default Module Config
    DebugDataWriter*        pDebugDataWriter;   ///< Debug data writer for dumping tuning metadata
    BOOL                    isDMEIS2;           ///< Is dynamic margin EIS2 mode
    BOOL                    isOffline;              ///< Is offline mode
};

/// @brief ppm FD input data
struct PPMFDInput
{
    UINT32 imageWidth;                     ///< Image width on which FD data is mentioned
    UINT32 imageHeight;                    ///< Image height on which FD data is mentioned
    UINT32 faceWidth[MAX_NUM_FACES];      ///< Face Radius
    UINT32 faceHeight[MAX_NUM_FACES];     ///< Face Radius
    UINT64 frameNumber;                   ///< Number of the frame that is assocoated with requestId
    UINT32 confidence[MAX_FACE_NUM];      ///< Confidence of each face
    INT32  rollAngle[MAX_FACE_NUM];       ///< Roll angle of each face
};

/// @brief OEM custom stat data
struct OEMStatInfo
{
    UINT32 vendorTagId;     ///< OEM Vendor Tag ID
    VOID*  pOEMStatData;    ///< OEM Stat Data
};

/// @brief ISPInputData
struct IPEenablePorts
{
    BOOL                    enableVideoPort;               ///< Boolean flag for video hardware portID
    BOOL                    enableDisplayPort;             ///< Boolean flag for display hardware portID
    BOOL                    enableAppPort;                 ///< Boolean flag for app hardware portID
    BOOL                    enableMFHDRIPE;                ///< Boolean flag for MFHDR
    BOOL                    capabilityMultiPassMAC;        ///< Boolean flag for m_capabilityMultiPassMAC
    BOOL                    isInput10BitFormat;            ///< Boolean flag for input image buffer
    BOOL                    isVideoOutput10BitFormat;      ///< Boolean flag for video output image buffer
    BOOL                    isDisplayOutput10BitFormat;    ///< Boolean flag for display output image buffer
    BOOL                    isAppOutput10BitFormat;        ///< Boolean flag for app output image buffer
    BOOL                    isMFHDROutput10BitFormat;      ///< Boolean flag for MFHDR output image buffer
    BOOL                    isVideoOutputCatmapFormat;     ///< Boolean flag for video output image buffer
    BOOL                    isDisplayOutputCatmapFormat;   ///< Boolean flag for display output image buffer
    BOOL                    isAppOutputCatmapFormat;       ///< Boolean flag for app output image buffer
    BOOL                    capabilityBayerHDR;            ///< Boolean flag for m_capabilityBayerHDR
};

// @brief IQ Control for OEM
struct IQControl
{
    BOOL    isOverwrite;            ///< If OEM want to overwrite IQ module with their own configuration
    BOOL    isLastValidUsed;        ///< If skip applying IQ module and use the last valid data in register
    BOOL    isCalculatedNoApply;    ///< If calculate IQ settings but no apply to register
    BOOL    isPublish;              ///< Flag to indicate OEM want publish IQ module information
};

/// @brief OEM IQ Control in IPE node
struct IPEOEMIQCtrl
{
    IQControl              gammaCtrl;        ///< Gamma control in IPE node
    IQControl              ccmCtrl;          ///< CCM control in IPE node
    IQControl              asfCtrl;          ///< ASF control in IPE node
    IQControl              triggerDataCtrl;  ///< TriggerData control in IPE node
    IQControl              wbCtrl;           ///< WB control in IPE node
};

/// @brief OEM IQ Control in IFE node
struct IFEOEMIQCtrl
{
    IQControl            wbCtrl;           ///< WB control in IFE node
    IQControl            ccmCtrl;          ///< CCM control in IFE node
    IQControl            blsCtrl;          ///< BLS control in IFE node
    IQControl            lscCtrl;          ///< LSC control in IFE node
    IQControl            triggerDataCtrl;  ///< TriggerData control in IFE node
    IQControl            demuxBLSCtrl;     ///< Demux BLS control in IFE node
    IQControl            gtmCtrl;          ///< GTM control in IFE node
    IQControl            calibTableCtrl;   ///< LSC calibration table overwrite control
    IQControl            lscFCCtrl;        ///< LSC fast converge control
};

/// @brief OEM IQ Control in BPS node
struct BPSOEMIQCtrl
{
    IQControl            wbCtrl;           ///< WB control in BPS node
    IQControl            ccmCtrl;          ///< CCM control in BPS node
    IQControl            blsCtrl;          ///< BLS control in BPS node
    IQControl            lscCtrl;          ///< LSC control in BPS node
    IQControl            triggerDataCtrl;  ///< TriggerData control in BPS node
    IQControl            cgCtrl;           ///< CG control in BPS node
    IQControl            gtmCtrl;          ///< GTM control in BPS node
    IQControl            calibTableCtrl;   ///< LSC calibration table overwrite control
    IQControl            lscFCCtrl;        ///< LSC fast converge control
    IQControl            gammaCtrl;        ///< Gamma control in BPS node
};

/// @brief OEM IQ Control for HW Node
struct OEMIQControl
{
    union
    {
        IPEOEMIQCtrl    IPEOEMIQCtrl;           ///< control structure for OEM to control IQ Module in IPE Node
        IFEOEMIQCtrl    IFEOEMIQCtrl;           ///< control structure for OEM to control IQ Module in IFE Node
        BPSOEMIQCtrl    BPSOEMIQCtrl;           ///< control structure for OEM to control IQ Module in BPS Node
    };
};

/// @brief CC131 sub cmd list input data
struct CC131SubCmdListInput
{
    BOOL                moduleEnable;             ///< Flag to indicate if IQ module is enabled
    CC131ManualSetting  cc131ManualSetting;       ///< CCM131 Manual Setting Data
};

/// @brief Define OEM LSC Modes
enum LSCModeType
{
    LSCMeshTableOnly = 0,                       ///< Overwrite MeshTable Only
    LSCSensorDataOnly,                          ///< Overwrite SensorData Only
    LSCModeMax,
};

/// @brief Define OEM Gamma Modes
enum GammaModeType
{
    GammaToneMapCurvesOnly = 0,                 ///< Overwrite ToneMap Only
    GammaWeightOnly,                            ///< Overwrite Weight Only
    GammaModeMax
};

/// @brief Defines Float with Valid Type
struct ValidFLOAT
{
    BOOL                isValid;
    FLOAT               data;
};

/// @brief OEM MeshTable for LSC
struct LSCMeshTableInputData
{
    UINT16*             pOEMLSCMeshTable;                  ///< pointer to OEM lsc mesh table for lsc overwrite
};

/// @brief OEM Senor Input for LSC
struct LSCSensorInputData
{
    UINT32              sensorFullResolutionWidth;         ///< Sensor active array width
    UINT32              sensorFullResolutionHeight;        ///< Sensor active array height
    UINT32              imageWidth;                        ///< Image Width
    UINT32              imageHeight;                       ///< Image Height
    UINT32              sensorOffsetX;                     ///< Current Sensor Image Output horizontal offset
    UINT32              sensorOffsetY;                     ///< Current Sensor Image Output vertical offset
    UINT32              scale;                             ///< Include Sensor scalei*Binning*CSID&SFE Binning
};

// @brief OEM Weight for Gamma
struct GammaWeightInputData
{
    BOOL                enableGammaWeight;                 ///< Flag to indicate Gamma Table Weight is eanbled/disabled
    UINT                numOfGammaWeights;                 ///< Number of Gamma Weights
    FLOAT*              pGammaWeightForR;                  ///< Pointer to Gamma Weight for R
    FLOAT*              pGammaWeightForG;                  ///< Pointer to Gamma Weight for G
    FLOAT*              pGammaWeightForB;                  ///< Pointer to Gamma Weight for B
};

/// @brief OEM TriggerData for Trigger
struct TriggerDataInputData
{
    ValidFLOAT          DRCGain;                           ///< DRCGain for TriggerData
    ValidFLOAT          DRCGainDark;                       ///< DRCGainDark for TriggerData
    ValidFLOAT          AECSensitivity;                    ///< AEC Sensitivity for TriggerData
};

struct ManualCurveInfo
{
    DOUBLE         YratioBase[YRatioGTMLUTSize + 1];    ///< manual curve
    FLOAT          CurveStrength;                       ///< manual curve strength
};

/// @brief OEM GTM manual curve Data
struct GTMInputData
{
    BOOL                    enableModuleLog;            ///< enable manual curve module log
    BOOL                    IsInitialized;              ///< manual curve is initialized
    VOID*                   pManualCurveInfo;           ///< manual curve YratiBase & strength
};

/// @brief LSC calibbration Table
struct LSCCalibInput
{
    UINT32 numberOfLightSrc;
    FLOAT  (*pCalibB)[HWRollOffTableSize];
    FLOAT  (*pCalibR)[HWRollOffTableSize];
    FLOAT  (*pCalibGB)[HWRollOffTableSize];
    FLOAT  (*pCalibGR)[HWRollOffTableSize];
};

/// @brief OEM WB weight data
struct WBData
{
    FLOAT                   resGGain;            ///< WB G gain
    FLOAT                   resBGain;            ///< WB B gain
    FLOAT                   resRGain;            ///< WB R gain
};

/// @brief OEM IQ Control input data for HW Node
struct OEMIQControlInputData
{
    FLOAT*                  pInputDigitalGain;          ///< OEM input digital gain
    FLOAT*                  pOutputDigitalGain;         ///< OEM output digital gain
    BOOL                    isTintlessDisabled;         ///< OEM force disable tintless
    FLOAT*                  pFaceLevel;                 ///< OEM face level
    BOOL*                   uvGammaEnable;              ///< OEM uv gamma enable/disable control
    LSCModeType             LSCMode;                    ///< Indicates LSC Mode
    LSCMeshTableInputData*  pLSCSMeshTableData;         ///< pointer to OEM MeshTable Data for LSC
    LSCSensorInputData*     pLSCSensorData;             ///< pointer to OEM Sensor Data for LSC
    ASFWeightInputData*     pASFWeightData;             ///< pointer to OEM Weight Data for ASF
    ASFSharpnessInputData*  pASFSharpnessData;          ///< pointer to OEM sharpness Data for ASF
    GammaModeType           GammaMode;                  ///< Indicates Gamma Mode
    GammaWeightInputData*   pGammaWeightData;           ///< pointer to OEM Weight Data for Gamma
    TriggerDataInputData*   pTriggerData;               ///< pointer to OEM TriggerData for Trigger
    GTMInputData            gtmInput;                   ///< OEM gtm input data for IFE/BPS
    LSCCalibInput           LSCCalibrationInput;        ///< LSC calibration Table
    BOOL                    isLSCFastConverge;          ///< LSC fast converge flag
    WBData                  wbData;                     ///< OEM WB data
};

/// @brief ISPCommonInputData : Data shared by all nodes. Only pointers allowed in this structure except IQ trigger data
struct ISPCommonInputData
{
    AECFrameControl*             pAECUpdateData;               ///< Pointer to the AEC_Update_Data
    AECStatsControl*             pAECStatsUpdateData;          ///< Pointer to the AEC stats Update Data
    AWBFrameControl*             pAWBUpdateData;               ///< Pointer to the AWB_Update_Data
    AWBStatsControl*             pAWBStatsUpdateData;          ///< Pointer to the AWB stats Update_Data
    CmdBuffer*                   pCmdBuffer;                   ///< Pointer to the Command Buffer Object
    CmdBuffer*                   p32bitDMIBuffer;              ///< Pointer to the 32 bit DMI Buffer Manager
    UINT32*                      p32bitDMIBufferAddr;          ///< Pointer to the 32 bit DMI Buffer
    CmdBuffer*                   pDMICmdBuffer;                ///< Pointer to the CDM packets of LUT DMI buffers
    UINT64                       frameNum;                     ///< the unique frame number for this capture request
    UINT32                       titanVersion;                 ///< titan version
    HwContext*                   pHwContext;                   ///< Pointer to the Hardware Context
    TuningDataManager*           pTuningDataManager;           ///< Tuning data manager
    ChiTuningModeParameter*      pTuningData;                  ///< pointer to tuning data selectors
    BOOL                         tuningModeChanged;            ///< TRUE: tuning mode parameter(s) changed; FALSE: Otherwise
    ISPIQTriggerData             triggerData;                  ///< Interpolation library Trigger Data
    BOOL                         forceTriggerUpdate;           ///< Force Trigger Update
    VOID*                        pOEMIQSetting;                ///< Pointer to the OEM IQ Interpolation Data
    VOID*                        pLibInitialData;              ///< Customtized Library initial data block
    UINT32                       BLSblackLevelOffset;          ///< Black level offset
    PixelFormat                  format;                       ///< Image Format from sensor
    BayerRGBIRPattern            RGBIRPattern;                 ///< RGB IR Pattern 

    // Trigger 2.0
    std::vector<FLOAT>           InputTrigger;                 ///< Input Trigger Vector
    std::vector<FLOAT>           CurrentAppliedTrigger;        ///< Current Trigger Vector
};

struct IFELiteInputData
{
    ISPCommonInputData            commonData;                  ///< Common input to ISP
    IFELiteFrameConfig*           pFrameConfig;                ///< Points to ISP input configuration
    IFELiteHALConfigData          HALData;                     ///< Configuration Data from HAL/App
    IFELiteHALTagsData*           pHALTagsData;                ///< HAL framework tag
    IFELiteSensorConfigData*      pSensorData;                 ///< Configuration Data from Sensor Module
    const StaticSettings*         pStaticSettings;             ///< Pointer to HwEnvironment Static Settings
    const EEPROMOTPData*          pOTPData;                    ///< OTP Calibration Data
    BOOL                          useHardcodedRegisterValues;  ///< TRUE: Use hardcoded reg.values; FALSE:
                                                               ///< Use calculate settings
    BOOL                          dumpRegConfig;               ///< Dump IQ
    BOOL                          isInitPacket;                ///< TRUE if Init Packet Settings
    IFETuningMetadata*            pIFETuningMetadata;          ///< Metadata for IFE tuning support
    VOID*                         pBankUpdate;                 ///< DMI Bank Update
    IFELiteInternalData*          pCalculatedData;             ///< Data Calculated by IQ Module
    IFELiteCalculatedMetadata*    pCalculatedMetadata;         ///< Data Calculated by IQ Modules
    IFELitePipelineData*          pPipelineIFELiteData;        ///< IFE-Lite pipeline settings
    FormatMeasureEnable*          pFormatMeasureEnableInfo;    ///< Flags to indicate if format measure is enabled on CSID paths
    BOOL*                         pIsRDIPixelData;             ///< Flags to indicate if RDI pixel data
    ISPTintlessBGStatsConfig*     pTintlessBGConfig;           ///< TintlessBG config
    ParsedTintlessBGStatsOutput*  pParsedTintlessBGStats;      ///< Parsed tintless BG stats
    BOOL                          registerBETEn;               ///< BET enabled
    UINT32                        bitWidth;                    ///< ISP output bit width based on ISP output format
    IFELitePipelinePath           modulePath;                  ///< IFE-Lite pipeline path for module
    struct VirtualToPhysicalPortMap* pVirtualtoPhysicalPortMap; ///< To store Virtual to Physcial Map
    YUVFmtConversionInfo*         pYUVFmtConversion;             ///< To store YUV422 to YUV420 Format Conversion
};

/// @brief ISPInputData
struct ISPInputData
{
    AECFrameControl*        pAECUpdateData;               ///< Pointer to the AEC_Update_Data
    AECStatsControl*        pAECStatsUpdateData;          ///< Pointer to the AEC stats Update Data
    AWBFrameControl*        pAWBUpdateData;               ///< Pointer to the AWB_Update_Data
    AWBStatsControl*        pAWBStatsUpdateData;          ///< Pointer to the AWB stats Update_Data
    AFFrameControl*         pAFUpdateData;                ///< Pointer to the AF_Update_Data
    AFStatsControl*         pAFStatsUpdateData;           ///< Pointer to the AF stats Update_Data
    AFDStatsControl*        pAFDStatsUpdateData;          ///< Pointer to AFD stats update data

    AFDStatsControl*        pAFDContextStatsUpdateData[MaxNumOfInputExposures];    ///< Pointer to AFD stats update data

    CSStatsControl*         pCSStatsUpdateData;           ///< Pointer to CS stats update data
    IHistStatsControl*      pIHistStatsUpdateData;        ///< Pointer to IHist stat config update data
    PDHwConfig*             pPDHwConfig;                  ///< Pointer to PD HW Config Data
    CmdBuffer*              pCmdBuffer;                   ///< Pointer to the Command Buffer Object
    CmdBuffer*              p32bitDMIBuffer;              ///< Pointer to the 32 bit DMI Buffer Manager
    CmdBuffer*              p32bitDMIBuffer2;             ///< Pointer to the second 32 bit DMI Buffer Manager
    UINT32*                 p32bitDMIBufferAddr;          ///< Pointer to the 32 bit DMI Buffer
    CmdBuffer*              p64bitDMIBuffer;              ///< Pointer to the 64 bit DMI Buffer Manager
    UINT32*                 p64bitDMIBufferAddr;          ///< Pointer to the 64 bit DMI Buffer
    CmdBuffer*              pDMICmdBuffer;                ///< Pointer to the CDM packets of LUT DMI buffers
    UINT32*                 pDMIBufferAddr;               ///< Pointer to the DMI Buffer
    UINT32                  sensorID;                     ///< Sensor ID Number
    ISPSensorConfigureData  sensorData;                   ///< Configuration Data from Sensor Module
    ISPHALConfigureData     HALData;                      ///< Configuration Data from HAL/App
    ISPHALTagsData*         pHALTagsData;                 ///< HAL framework tag
    ISPStripeConfig*        pStripeConfig;                ///< Points to ISP input configuration
    ISPInternalData*        pCalculatedData;              ///< Data Calculated by IQ Modules
    IFEPipelineData         pipelineIFEData;              ///< IFE pipeline settings
    TFEPipelineData         pipelineTFEData;              ///< TFE pipeline settings
    IFEPipelinePath         modulePath;                   ///< IFE pipeline path for module
    BOOL                    offCenterCrop;                ///< Boolean flag to indicate offcenter crop
    UINT                    IPEPipelinePath;              ///< IPE pipeline path of coming node, IFE/BPS
    IFEDualPDPipelineData   dualPDPipelineData;           ///< DualPD pipeline data value
    IPEPipelineData         pipelineIPEData;              ///< Data Needed by IPE IQ Modules
    BPSPipelineData         pipelineBPSData;              ///< Data Needed by BPS IQ Modules
    CVPPipelineData         pipelineCVPData;              ///< Data needed by CVP IQ modules
    OPEPipelineData         pipelineOPEData;              ///< Data Needed by OPE IQ Modules
    OPEStripeConfig*        pOPEStripeConfig;             ///< Points to OPE stripe configuration
    TuningDataManager*      pTuningDataManager;           ///< Tuning data manager
    HwContext*              pHwContext;                   ///< Pointer to the Hardware Context
    UINT64                  frameNum;                     ///< the unique frame number for this capture request
    UINT64                  inSensorZoomSwitchReqID;      ///< Unique request id where InSensor Zoom Switch Happens
    UINT64                  requestIdOffsetFromLastFlush; ///< Request id offset of last flush
    VOID*                   pOEMIQSetting;                ///< Pointer to the OEM IQ Interpolation Data
    VOID*                   pOnlineTuningSetting;         ///< Pointer to the OEM IQ Configuration Interpolation Data
    VOID*                   pLibInitialData;              ///< Customtized Library initial data block
    DualIFEIndex            IFEIndex;                     ///< Helper to match the data to an IFE, single IFE should use zero
    DualTFEIndex            TFEIndex;                     ///< Helper to match the data to an TFE, single TFE should use zero
    IFEStripingInput*       pStripingInput;               ///< Striping library's input
    TFEStripingInput*       pTFEStripingInput;            ///< TFEStriping library's input
    IFETuningMetadata*      pIFETuningMetadata;           ///< Metadata for IFE tuning support
    BPSTuningMetadata*      pBPSTuningMetadata;           ///< Metadata for BPS tuning support
    IPETuningMetadata*      pIPETuningMetadata;           ///< Metadata for IPE tuning support
    TFETuningMetadata*      pTFETuningMetadata;           ///< Metadata for TFE tuning support
    DebugDataWriter*        pDebugDataWriter;             ///< Debug data writer for dumping tuning metadata
    OPETuningMetadata*      pOPETuningMetadata;           ///< Metadata for OPE tuning support
    ChiTuningModeParameter* pTuningData;                  ///< pointer to tuning data selectors
    BOOL                    tuningModeChanged;            ///< TRUE: tuning mode parameter(s) changed; FALSE: Otherwise
    const EEPROMOTPData*    pOTPData;                     ///< OTP Calibration Data
    UINT16                  numberOfLED;                  ///< Number of LED
    ISPIQTriggerData        triggerData;                  ///< Interpolation library Trigger Data
    BOOL                    disableManual3ACCM;           ///< Override to disable manual 3A CCM
    FLOAT                   LEDFirstEntryRatio;           ///< First Entry Ratio for Dual LED
    FLOAT                   lensPosition;                 ///< lens position value
    FLOAT                   lensZoom;                     ///< lens zoom value
    FLOAT                   instance;                     ///< Cascade IQ instance ID value
    FLOAT                   colorFormat;                  ///< color format value
    FLOAT                   postScaleRatio;               ///< post scale ratio
    FLOAT                   preScaleRatio;                ///< pre Scale Ratio
    ICAConfigParameters     ICAConfigData;                ///< ICA Inputdata
    UINT64                  parentNodeID;                 ///< whether it comes from IFE or BPS
    UINT                    opticalCenterX;               ///< Optical center X
    UINT                    opticalCenterY;               ///< Optical center Y
    UINT64                  minRequiredSingleIFEClock;    ///< Minimum IFE clock needed to process current mode
    UINT64                  minRequiredSingleTFEClock;    ///< Minimum TFE clock needed to process current mode
    UINT64                  leftIFEClockHz;               ///< IFE clock rate for Left IFE. Populated for only Single IFE
    UINT64                  rightIFEClockHz;              ///< IFE clock rate for Right IFE. Only valid if dual IFEs in use
    UINT64                  leftCornerIFEClockHz;         ///< Corner IFE clock rate for Left IFE.
    UINT64                  rightCornerIFEClockHz;        ///< Corner IFE clock rate for Right IFE.
    UINT32                  sensorBitWidth;               ///< Sensor bit width
    BOOL                    haveBitWidthSwitch;           ///< need to support Bit Width switch or not
    UINT32                  resourcePolicy;               ///< Prefered resource vs power trade-off
    ISPHVXConfigureData     HVXData;                      ///< HVX configuration data
    struct FDData           fDData;                       ///< FD Data
    BOOL                    isMulticameraUsecase;         ///< Is this a multicamera usecase
    BOOL                    skipTintlessProcessing;       ///< Skip Tintless Algo Processing
    BOOL                    onlyAWBGainChangedEnable;     ///< enable AWB Gain changed only and then calculate AWB only
    BOOL                    parseStatsSkip;               ///< Stats parse skip stats parsering
    BOOL                    useHardcodedRegisterValues;   ///< TRUE: Use hardcoded reg. values; FALSE: Use calculate settings
    BOOL                    enableIFEDualStripeLog;       ///< TRUE: Enable Dual IFE Stripe In/Out info
    UINT64                  dumpRegConfig;                ///< Dump IFE IQ
    UINT32                  regOffsetIndex;               ///< index of IFE register offset
    UINT64                  SFEDumpRegConfig;             ///< Dump IQ in SFE pipeline
    UINT32                  SFERegOffsetIndex;            ///< index of SFE register offset
    UINT64                  dumpRegStatsConfig;           ///< Dump Stats module reg
    UINT32                  regStatsOffsetIndex;          ///< index of register offset of stats module
    UINT32                  requestQueueDepth;            ///< Depth of the request queue
    VOID*                   pBetDMIAddr;                  ///< BET DNI Debug address
    BOOL                    registerBETEn;                ///< BET enabled
    UINT32                  alignmentModeData;            ///< Indicate alignment mode, Transform(DME)/MotionMap(DMM)
    BOOL                    MFNRBET;                      ///< BET enabled
    UINT32                  forceIFEflag;                 ///< Flag to force IFE to single IFE
    UINT32                  icaVersion;                   ///< ica version
    UINT32                  forceTFEflag;                 ///< Flag to force TFE to single TFE
    const IFEOutputPath*    pIFEOutputPathInfo;           ///< Pointer to IFEOutputPath data of array in IFE node
    const std::unordered_map<UINT32, BOOL>*
                            pCSLOutputPathEnabled;        ///< Pointer to CSLOutputPathEnabled map
    UINT32                  maxOutputWidthFD;             ///< Max Supported FD Output Width
    UINT32                  maxOutputWidthMNDS;           ///< Max Supported MNDS Output Width
    BOOL                    isHDR10On;                    ///< Flag for HDR10

    BOOL                             bIsMFHDRMode;        ///< TRUE if MFHDR mode
    BOOL                             bIsMFHDRSplit;       ///< if bIsMFHDRMode=TRUE: TRUE if MFHDR split, FALSE if Unified HDR
    IFEInstanceSubmittedRequestInfo* pIFESyncInfo;        ///< IFE Instance Sync Info
    BOOL                             bSkipProgrammingHW;  ///< TRUE if the HW Programming needs to be skipped

    UINT32                  titanVersion;                 ///< titan version
    UINT32                  bitWidth;                     ///< ISP output bit width based on ISP output format
    UINT                    maximumPipelineDelay;         ///< Maximum Pipeline delay
    BOOL                    forceTriggerUpdate;           ///< Force Trigger Update
    CmdBufferManager**      ppCmdBufferManager;           ///< Pointer to the pointer of Ommand Buffer Manager
    BOOL                    isPrepareStripeInputContext;  ///< Flag to indicate prepare striping input context call
    IFEStatsTapOut          statsTapOut;                  ///< Stats tap-out information
    CSIDBinningInfo         csidBinningInfo;              ///< CSID binning information
    BOOL                    RDIOnlyCase;                  ///< RDI only Use cases
    UINT                    FPS;                          ///< Current FPS.
    BOOL                    isInitPacket;                 ///< TRUE if Init Packet Settings
    BOOL                    isSensorModeSwitched;         ///< TRUE if sensor mode switched
    BOOL                    isPipelineWarmedUpState;      ///< Flag to indicate if the pipeline is in warmed-up state or not
    SeamlessInSensorState   seamlessInSensorState;        ///< Seamless in-sensor control state
    IFEStripeInterface*     pIFEStripeInterface;          ///< IFE striping interface
    ISPCalculatedMetadata*  pCalculatedMetadata;          ///< Data Calculated by IQ Modules
    IFEInstanceProperty     IFENodeInstanceProperty;      ///< varaible to hold the node instance properties
    BOOL*                   pFrameBased;                  ///< Update the WM config type
    BOOL*                   pIsRDIPixelData;              ///< Flags to indicate if RDI pixel data
    BOOL*                   pIsRDIPDAFData;               ///< Flags to indicate if RDI pdaf data
    BOOL*                   pIsRDIMetaData;               ///< Flags to indicate if RDI Meta data
    BOOL*                   pIsRDIPDAFVerticalData;       ///< Flags to indicate if RDI pdaf vertical data
    FormatMeasureEnable*    pFormatMeasureEnableInfo;     ///< Flags to indicate if format measure is enabled on CSID paths
    StreamDimension*        pRDIStreams;                  ///< RDI Stream dimensions
    CropWindow              originalHALCrop;              ///< Original HAL crop request
    CropWindow              rawStreamHALCrop;             ///< Raw Stream HAL crop request
    CropWindow              perPortDisplayCrop;           ///< Display port Crop Info (overrided)
    CropWindow              perPortVideoCrop;             ///< Video port Crop Info (overrided)
    CropWindow              perPortFDCrop;                ///< FD port Crop Info (overrided)
    UINT                    IFEDynamicEnableMask;         ///< IFE Dynamic Enable Mask
    UINT                    TFEDynamicEnableMask;         ///< TFE Dynamic Enable Mask
    UINT32                  IFEPixelRawPort;              ///< IFE raw pixel port that is enabled
    VOID*                   pBankUpdate;                  ///< TFE/IFE DMI Bank Update
    UINT64                  DSXWidth;                     ///< IPE DSX full width
    UINT64                  DSXHeight;                    ///< IPE DSX full height
    ISPTMCInputData         TMCInputData;                 ///< TMC data for ParsedBHISTStatsOutput for IPE node use
    BOOL                    PDAFDisable;                  ///< Pdaf disable
    BOOL                    reinitPDPath;                 ///< Reinit Pdaf Path
    BOOL                    tintlessALSCTableScale;       ///< Enable Table Scaling
    BOOL                    tintlessALSCDisable;          ///< Disable tintless and ALSC
    BOOL                    tintlessLSCTableScale;        ///< Enable LSC Table Scaling
    BOOL                    tintlessLSCDisable;           ///< Disable tintless and LSC
    const ISPStaticSettings*
                            pStaticSettings;              ///< Pointer to ISP Static Settings
    IFEAcquiredHWInfo*      pIFEAcquiredHWInfo;           ///< Pointer to Acquired IFE HW Information
    CaptureRequestCropRegions  cropRegions;               ///< Crop Regions
    BOOL                    useGeoLib;                    ///< Flag to Indicate UseGeoLib
    IPEMetadata*            pIPEMetadata;                 ///< point to metadata for transfer the addr of m_IPEMetadata
                                                          ///< so can converge meta. to avoid big change
                                                          ///< like GetCameraInfo and so on

    IPEExposureAlignmentData  IPEAlignmentData;            ///< IPE Input data

    FLOAT                   blendConfidence;               ///< SW MFNR Blend confidence
    FLOAT                   adjustmentFactor;              ///< SW MFNR Adjustment factor
    BOOL                    bIsSFEEnabled;                 ///< TRUE if SFE enabled
    SFEInputData            SFEData;                       ///< SFE Input data
    BOOL                    bIsPDAFType3MaskValid;         ///< TRUE if the sensor is in TYpe3 PDAF Mode
    UINT64                  PDAFMask[PDAFPixelMaskHeight]; ///< PDAF Pixel Mask
    BOOL                    bIsSFEHDREnabled;              ///< Is SFE HDR enabled
    BOOL                    bIsSFERemosaicEnabled;         ///< Is SFE Remosaic enabled
    UINT32                  SFERawPackerFormat;            ///< SFE Raw Packer Format
    SFECompandInfo          SFECompandInfo;                ///< SFE Compand info

    UINT32                  numICAInGrid;                 ///< Number of ICA input grids
    UINT32                  mfhdrStage;                   ///< mfhdr stages
    ChiContextType          frameContextType;             ///< Exposure based node context type
    ISPContextIndex         moduleContextIndex;           ///< Exposure context index to select internal modules context
    BOOL                    notifyALSCEnabled;            ///< Notify IFE AWB BG stats module that ALSC is enabled
    BOOL                    statsSkipFrame;               ///< Flag indicate that stats data should be skip for this frame
    VOID*                   pGeolibConfig;                ///< pointer to geolib config
    VOID*                   pDmmSizes;                    ///< pointer to EVA output sizes
    FLOAT                   vseBlurStrengthFactor;        ///< blur strength factor for vse module
    FLOAT                   vseMinFocusDisparity;         ///< min focus disparity for vse module
    FLOAT                   vseMaxFocusDisparity;         ///< max focus disparity for vse module
    BOOL                    isMapLutInput;                ///< map lut input avialable for vse
    UINT8*                  pMapLUT;                      ///< maplut for vse
    BOOL                    blurEffect;                   ///< true for blur effect and false for other effects
    FLOAT                   blurStrengthFactor;           ///< blur strength factor for blur module
    FLOAT                   minFocusDisparity;            ///< min focus disparity for blur module
    FLOAT                   maxFocusDisparity;            ///< max focus disparity for blur module
    FLOAT                   focusedDisparity;             ///< focused disparity for blur module
    VOID*                   pJBUUnpackedRegData;          ///< JBU unpacked data for BLUR / VSE
    UINT32                  tfTestMode;                   ///< TF test mode
    ChiHDRFeatureMode       hdrMode;                      ///< HDR Mode
    BOOL                    isConcurrentCamera;           ///< true for Concurrent camera case
    UINT8                   finalDAS[DASIndexMax];        ///< final DAS value for Tone, Color, Texture
    UINT8                   segOutDAS;                    ///< Global confidence from segmentation net
    UINT8                   swDAS;                        ///< AI strength from user interface
    UINT32                  segFrameOrientation;          ///< AI segmentation frame orientation
    // Trigger 2.0
    std::vector<FLOAT>      InputTrigger;           ///< Input Trigger Vector
    std::vector<FLOAT>      CurrentAppliedTrigger;  ///< Current Trigger Vector

    // PRE Gamma
    BOOL                    isGammaPreCalculated;          ///< Pre Gamma Calculated
    FLOAT                   gammaTable[Gamma15TableSize];  ///< Pre Calculated Gamma Table

    UINT32                  maxTFEOutputWidthFull;         ///< Max Supported FD Output Width
    UINT32                  maxTFEOutputHeightFull;        ///< Max Supported FD Output Width
    UINT32                  maxTFEOutputWidthAI;           ///< Max Supported FD Output Width
    UINT32                  maxTFEOutputHeightAI;          ///< Max Supported FD Output Width
    UINT32                  currCameraID;                  ///< current Camera ID
    BOOL                    isAEBEnabled;                  ///< AEB Enabled/Disabled
    BOOL                    isAEBMergeEnabled;             ///< Is AEB Merge Enabled/Disabled.
    BOOL                    bDontExecuteTMC;               ///< Dont execute TMC
    SWGDOutput*             pSWGDOutput;                   ///< SW GD output for SFE or IPE MAC
    BOOL                    enableADRCpath;                ///< Dont execute TMC
    IPEenablePorts          enablePorts;                   ///< Clamp params helper struct
    BOOL                    isAIDEenabled;                 ///< Flag to indicate AIDE
                                                           ///< is enabled/Disabled
    BOOL                    isAIenabled;                   ///< Flag to indicate AI is enabled/not
    BOOL                    isAnchorKneeUsed;              ///< flag to indicate whether use Anchork knee for LTM
    UINT32                  leftStripeWidth;               ///< left stripe width
    // OEM will deliver own stat info via vendor tag
    OEMStatInfo             OEMStatInfoData[MaxNumOEMVendorTags]; ///< OEM Stat data
    BOOL                    enableRDIPDFormatMeasure;      ///< Enable RDI PD Format Measure
    BOOL                    SFECropEnable;                 ///< SFE Crop enable
    FlashModeValues         flashMode;                     ///< current flash mode
    BOOL                    isCGCOverrideNeeded;           ///< Two Exp Usecases
    BOOL                    bIsPDAFType3;                  ///< PDAF Type 3
    UINT32                  WBCHGain[WBCHGainSize];        ///< WB green/blue/red channel gain
    UINT                    sBlurMode;                     ///< input Sblur workmode from user
    UINT                    sBlurShape;                    ///< input Sblur shape from user
    BOOL                    fdEnable;                      ///< FD enable
    PPMFDInput              ppmFDData;                     ///< PPM FD data
    BOOL                    isIFEDSXAUXBokeh;              ///< AUX cam: TRUE in Bokeh mode, DSX use variable scale ratio.
    BOOL                    isBlurModeOn;                  ///< Is Blur mode on
    BOOL                    isSFEDemuxBypassReq;           ///< is SFE Demux bypass required
    BOOL                    isRealTime;                    ///< is Real Time
    OEMIQControl*           pOEMIQControl;                 ///< pointer to OEM control IQ module flags
    OEMIQControlInputData*  pOEMIQControlInputData;        ///< pointer to OEM config IQ module data
    UINT8*                  pCFAArray;                     ///< Pointer to input CFA
    AFCInputData*           pAFCInputData;                 ///< point to AFC algorithm Input data required for FCG
    StreamHDRMode           streamHdrMode;                 ///< stream HDR mode, None/HDR10/HLG/HDR10p etc
    ColorSpace              streamColorSpace;              ///< Stream color space read from ImageFormat
    const ImageFormat*      pCurrentInputFormat;           ///< Current Input format
    BOOL                    runInterpolation;              ///< run Interpolation in IQmodule
    BOOL                    previousRunInterpolation;      ///< run Interpolation in IQmodule previously
    std::unordered_map<INT, FLOAT>* pTriggerThreshold;     ///< Pointer to trigger threshold map
    VOID*                   pDCStatsRawBuffer;             ///< DC stats Raw Buffer
    BOOL                    bIsDCStatsInputEable;          ///< Disabled when there is no DC stats input port or
                                                           /// buffer delay not met
    BOOL                    bIsOfflineIFE;                 ///< Boolean value indicate if IFE is running in offline mode
    BOOL                    bIsBET;                        ///< Boolean value to indicate that it is a BET iteration
};

/// @brief IQ Library specific data
struct IQLibInitialData
{
    BOOL                    isSucceed;      ///< Indicator if the initialization is succeed
    VOID*                   pLibData;       ///< Pointer to the library data
    ChiTuningModeParameter* pTuningData;    ///< pointer to tuning data selectors
};

/// @brief IFELiteModuleCreateData
struct IFELiteModuleCreateData
{
    ISPIQModule*        pModule;                ///< Pointer to the created IQ Module
    IFELitePipelineData pipelineData;           ///< VFE pipeline setting
    const CHAR*         pNodeIdentifier;        ///< String identifier for the Node that creating this IQ Module object
    UINT32              titanVersion;           ///< Titan Version
};

/// @brief IFEModuleCreateData
struct IFEModuleCreateData
{
    ISPIQModule*    pModule;                ///< Pointer to the created IQ Module
    IFEPipelineData pipelineData;           ///< VFE pipeline setting
    const CHAR*     pNodeIdentifier;        ///< String identifier for the Node that creating this IQ Module object
    ISPInputData    initializationData;     ///< default values to configure the modules
    IFEHVXInfo*     pHvxInitializeData;     ///< Values from CHI about algo information
    UINT32          titanVersion;           ///< Titan Version
    IFEHWTypeIds    IFEHWType;             ///< IFE HW type
    BOOL            isMFHDRMultiContext;    ///< Set for MFHDR multi-context
    BOOL            isDualIFE;              ///< Set for Dual-IFE usecase
};

/// @brief IPE IQ Module HW Version
struct IPEIQHWVersion
{
    UINT32 hwICAVersion;               ///< ICA Module Version
    UINT32 hwDLUTVersion;              ///< DLUT Module Version
    UINT32 hwANRVersion;               ///< ANR Module Version
    UINT32 hwTFVersion;                ///< TF Module Version
    UINT32 hwCACVersion;               ///< CAC Module Version
    UINT32 hwCSTVersion;               ///< CST Module Version
    UINT32 hwLTMVersion;               ///< LTM Module Version
    UINT32 hwColorCorrectionVersion;   ///< Color Correction Module Version
    UINT32 hwGammaVersion;             ///< Gamma Module Version
    UINT32 hwChromaEnhancementVersion; ///< ChromaEnhancement Module Version
    UINT32 hwChromaSuppressionVersion; ///< ChromasSuppression Module Version
    UINT32 hwSCEVersion;               ///< SCE Module Version
    UINT32 hwASFVersion;               ///< ASF Module Version
    UINT32 hwUpscalerVersion;          ///< Up Scaler Module Version
    UINT32 hwGrainAdderVersion;        ///< Grain Addr Version
    UINT32 hwHNRVersion;               ///< IPE HNR HW Version
    UINT32 hwLENRVersion;              ///< IPE LENR HW Version
};

/// @brief IPEModuleCreateData
struct IPEModuleCreateData
{
    ISPIQModule*    pModule;            ///< Pointer to the created IQ Module
    ISPInputData    initializationData; ///< Default values to configure the modules
    IPEPath         path;               ///< IPE path information
    const CHAR*     pNodeIdentifier;    ///< String identifier for the Node that creating this IQ Module object
    IPEIQHWVersion  moduleVersion;      ///< ISP IQ module version
    UINT32          titanVersion;       ///< Titan Version
    ISPIQModuleType iqModuleType;       ///< ISP IQ Module Type
    IQConfigTimes   configTimes;        ///< IQ setting config on Init/PerFrame/AlternateFrame
};

/// @brief BPSModuleCreateData
struct BPSModuleCreateData
{
    ISPIQModule*    pModule;            ///< Pointer to the created IQ Module
    ISPInputData    initializationData; ///< Default values to configure the modules
    const CHAR*     pNodeIdentifier;    ///< String identifier for the Node that creating this IQ Module object
    UINT32          titanVersion;       ///< Titan Version
};

/// @brief CVPModuleCreateData
struct CVPModuleCreateData
{
    ISPIQModule*    pModule;            ///< Pointer to the created IQ Module
    ISPInputData    initializationData; ///< Default values to configure the modules
    const CHAR*     pNodeIdentifier;    ///< String identifier for the Node that creating this IQ Module object
    UINT32          titanVersion;       ///< Titan Version
};

/// @brief TFE IQ Module HW Version
struct TFEIQHWVersion
{
    UINT32 hwCAMIFVersion;               ///< CAMIF HW Version
    UINT32 hwCAMIFLiteVersion;           ///< CMAIF Lite HW Version
    UINT32 hwChannelGainsVersion;        ///< Demux HW Version
    UINT32 hwLROVersion;                 ///< Lens Roll Off HW Version
    UINT32 hwPreCropVersion;             ///< PreCrop HW Version
    UINT32 hwWBVersion;                  ///< WB HW Version
    UINT32 hwBDSDPCVersion;              ///< BDS + DPC HW Version
    UINT32 hwCropRoundClampVersion;      ///< Crop Round Clamp HW Version
    UINT32 hwWBBDSVersion;               ///< BDS + WB HW Version
    UINT32 hwBPCPDPCVersion;             ///< BPCPDPC HW Version
    UINT32 hwABFVersion;                 ///< ABF HW Version
    UINT32 hwBLSVersion;                 ///< BLS HW Version
    UINT32 hwBayerGammaVersion;          ///< GLUT HW Version
    UINT32 hwBDS4Version;                ///< BDS4 HW Version
    UINT32 hwBDS2Version;                ///< BDS2 HW Version
    UINT32 hwCSTVersion;                 ///< CST HW Version
    UINT32 hwMNDSVersion;                ///< MNDS HW Version
    UINT32 hwGTMVersion;                 ///< GTM HW Version
    UINT32 hwDS16Version;                ///< DS16 HW Version
    UINT32 hwCropVersion;                ///< Crop HW Version
    UINT32 hwPDAFVersion;                ///< PDAF HW Version
};

/// @brief TFEModuleCreateData
struct TFEModuleCreateData
{
    ISPIQModule*    pModule;               ///< Pointer to the created IQ Module
    TFEPipelineData pipelineData;          ///< TFE pipeline setting
    ISPInputData    initializationData;    ///< default values to configure the modules
    TFEIQHWVersion  moduleVersion;         ///< ISP IQ module version
    const CHAR*     pNodeIdentifier;       ///< String identifier for the Node that creating this IQ Module object
    UINT32          titanVersion;          ///< CSL version of target
    BOOL            isMFHDRMultiContext;   ///< Set for MFHDR multi-context
    BOOL            isDualTFE;             ///< Set for Dual-TFE usecase
};

/// @brief OPE IQ Module HW Version
struct OPEIQHWVersion
{
    UINT32 hwWBVersion;                ///< WB HW Version
    UINT32 hwABFBPCVersion;            ///< ABF HW Version
    UINT32 hwBLSVersion;               ///< BLS HW Version
    UINT32 hwDemosaicVersion;          ///< Demosaic HW Version
    UINT32 hwColorCorrectionVersion;   ///< Color Correction Module Version
    UINT32 hwGTMVersion;               ///< GTM HW Version
    UINT32 hwLTMVersion;               ///< LTM Module Version
    UINT32 hwGammaVersion;             ///< Gamma HW Version
    UINT32 hwCSTVersion;               ///< CST HW Version
    UINT32 hwChromaSuppressionVersion; ///< ChromasSuppression Module Version
    UINT32 hwChromaEnhancementVersion; ///< ChromaEnhancement Module Version
    UINT32 hwSCEVersion;               ///< SCE Module Version
    UINT32 hwPreCropVersion;           ///< Crop HW Version
    UINT32 hwDSVersion;                ///< Chroma DS HW Version
    UINT32 hwWNRVersion;               ///< IPE HNR HW Version
    UINT32 hwASFVersion;               ///< ASF Module Version
    UINT32 hwUpscalerVersion;          ///< Up Scaler Module Version
    UINT32 hwMNDSVersion;              ///< MNDS HW Version
    UINT32 hwCropVersion;              ///< Crop HW Version
    UINT32 hwRoundClampVersion;        ///< Round Clamp HW Version
};

/// @brief OPEModuleCreateData
struct OPEModuleCreateData
{
    ISPIQModule*    pModule;            ///< Pointer to the created IQ Module
    ISPInputData    initializationData; ///< Default values to configure the modules
    OPEPipelinePath path;               ///< OPE path information
    const CHAR*     pNodeIdentifier;    ///< String identifier for the Node that creating this IQ Module object
    OPEIQHWVersion  moduleVersion;      ///< ISP IQ module version
};

struct IPEIQModuleData
{
    IPEPath path;                            ///< IPE Path information
    UINT    offsetPass[PASS_NAME_MAX];       ///< Offset where pass information starts for multipass used by ANR
    UINT    singlePassCmdLength;             ///< The length of the Command List, in bytes used by ANR
    UINT    DSXoffsets[PASS_NAME_DC_64 * 2]; ///< DSX offsets
    UINT    offsetPassBLUR[PASS_NAME_MAX];   ///< BLUR offsets since these needs to be given through SBLUR
    UINT    singlePassCmdLengthBLUR;         ///< BLUR length of command list, since it is given through SBLUR
};

struct IQModuleCmdBufferParam
{
    CmdBufferManagerParam*  pCmdBufManagerParam;    ///< Pointer to the Cmd Buffer Manager params to be filled by IQ Modules
    UINT32                  numberOfCmdBufManagers; ///< Number Of Command Buffers created to be filled by IQ modules
};

/// @brief OPE default module configuration
struct OPEDefaultModuleConfig
{
    UINT32 RSStatsHorizRegions; ///< RS stats Max horisontal region
    UINT32 RSStatsVertRegions;  ///< RS stats Max vertical region
};

static const UINT32 QuadCFASize     = 4;
static const UINT32 ThreeX3CFASize  = 6;
static const UINT32 FourX4CFASize   = 8;
static const UINT32 RGBWSize        = 4;
static const UINT32 RGBIRSize       = 4;

static const UINT32 UnconventionalBayerSize = 4;

/// @ brief Color Channel count
enum ColorChannelCount
{
    ThreeChannels = 3,   ///< R/G/B channels
    FourChannels  = 4,   ///< R/G/B/ IR or W Channels
};

/// @brief CFA Binning Location
struct CFABinningLocation
{
    UINT8  xStart;  ///< xStart Location.
    UINT8  yStart;  ///< yStart Location.
};

/// @ brief Binning ratio's
enum BinRatios
{
    bin2x2 = 0,   ///< 2x2 Binning
    bin3x3 = 1,   ///< 3x3 Binning
    bin4x4 = 2,   ///< 4x4 Binning
};

///< @brief Color Array for default GRGB pattern
static const UINT8 QuadCFAColorArray[8 * 8] =
{
    G, G, R, R, O, O, O, O,
    G, G, R, R, O, O, O, O,
    B, B, G, G, O, O, O, O,
    B, B, G, G, O, O, O, O,
    O, O, O, O, O, O, O, O,
    O, O, O, O, O, O, O, O,
    O, O, O, O, O, O, O, O,
    O, O, O, O, O, O, O, O,
};


///< @brief Color Array for default GRGB pattern
static const UINT8 ThreeX3CFAColorArray_GRBG[8 * 8] =
{
    G, G, G, R, R, R, O, O,
    G, G, G, R, R, R, O, O,
    G, G, G, R, R, R, O, O,
    B, B, B, G, G, G, O, O,
    B, B, B, G, G, G, O, O,
    B, B, B, G, G, G, O, O,
    O, O, O, O, O, O, O, O,
    O, O, O, O, O, O, O, O,
};

///< @brief Color Array for default GBRG pattern
static const UINT8 ThreeX3CFAColorArray_GBRG[8 * 8] =
{
    G, G, G, B, B, B, O, O,
    G, G, G, B, B, B, O, O,
    G, G, G, B, B, B, O, O,
    R, R, R, G, G, G, O, O,
    R, R, R, G, G, G, O, O,
    R, R, R, G, G, G, O, O,
    O, O, O, O, O, O, O, O,
    O, O, O, O, O, O, O, O,
};

///< @brief Color Array for default RGGB pattern
static const UINT8 ThreeX3CFAColorArray_RGGB[8 * 8] =
{
    R, R, R, G, G, G, O, O,
    R, R, R, G, G, G, O, O,
    R, R, R, G, G, G, O, O,
    G, G, G, B, B, B, O, O,
    G, G, G, B, B, B, O, O,
    G, G, G, B, B, B, O, O,
    O, O, O, O, O, O, O, O,
    O, O, O, O, O, O, O, O,
};

///< @brief Color Array for default BGGR pattern
static const UINT8 ThreeX3CFAColorArray_BGGR[8 * 8] =
{
    B, B, B, G, G, G, O, O,
    B, B, B, G, G, G, O, O,
    B, B, B, G, G, G, O, O,
    G, G, G, R, R, R, O, O,
    G, G, G, R, R, R, O, O,
    G, G, G, R, R, R, O, O,
    O, O, O, O, O, O, O, O,
    O, O, O, O, O, O, O, O,
};

///< @brief Color Array for default GRGB pattern
static const UINT8 FourX4CFAColorArray[8*8] =
{
    G, G, G, R, R, R, R, G,
    G, G, G, R, R, R, R, G,
    G, G, G, R, R, R, R, G,
    B, B, B, G, G, G, G, B,
    B, B, B, G, G, G, G, B,
    B, B, B, G, G, G, G, B,
    B, B, B, G, G, G, G, B,
    G, G, G, R, R, R, R, G,
};

///< @brief Color Array for default Pattern
static const UINT8 UnconventionalBayerColorArray[8 * 8] =
{
    G, R, G, B, O, O, O, O,
    R, G, B, G, O, O, O, O,
    G, B, G, R, O, O, O, O,
    B, G, R, G, O, O, O, O,
    O, O, O, O, O, O, O, O,
    O, O, O, O, O, O, O, O,
    O, O, O, O, O, O, O, O,
    O, O, O, O, O, O, O, O,
};

///< @brief Color Array for default RGBW-C Pattern
static const UINT8 RGBWCColorArray[8 * 8] =
{
    G, W, G, W, O, O, O, O,
    W, R, W, B, O, O, O, O,
    G, W, G, W, O, O, O, O,
    W, B, W, R, O, O, O, O,
    O, O, O, O, O, O, O, O,
    O, O, O, O, O, O, O, O,
    O, O, O, O, O, O, O, O,
    O, O, O, O, O, O, O, O,
};

///< @brief Color Array for default RGBW-K Pattern
static const UINT8 RGBWKColorArray[8 * 8] =
{
    R, W, G, W, O, O, O, O,
    W, R, W, G, O, O, O, O,
    G, W, B, W, O, O, O, O,
    W, G, W, B, O, O, O, O,
    O, O, O, O, O, O, O, O,
    O, O, O, O, O, O, O, O,
    O, O, O, O, O, O, O, O,
    O, O, O, O, O, O, O, O,
};

///< @brief Color Array for default RGIR  Pattern
static const UINT8 RGBIRColorArray[8 * 8] =
{
    G,  R, G,  B, O, O, O, O,
    IR, G, IR, G, O, O, O, O,
    G,  B, G,  R, O, O, O, O,
    IR, G, IR, G, O, O, O, O,
    O,  O, O,  O, O, O, O, O,
    O,  O, O,  O, O, O, O, O,
    O,  O, O,  O, O, O, O, O,
    O,  O, O,  O, O, O, O, O,
};


///< @brief QCFA Binning Location
static const CFABinningLocation QCFABinLocation[16] =
{
    {4, 4}, {4, 4}, {4, 4}, {4, 4},
    {0, 0}, {0, 0}, {0, 0}, {0, 0},
    {0, 0}, {0, 0}, {0, 0}, {0, 0},
    {0, 0}, {0, 0}, {0, 0}, {0, 0},
};


///< @brief HexCFA Binning Location
static const CFABinningLocation ThreeX3CFABinLocation[16] =
{
    {0, 0}, {0, 0}, {0, 0}, {0, 0},
    {2, 2}, {3, 2}, {0, 0}, {2, 3},
    {3, 3}, {0, 0}, {0, 0}, {0, 0},
    {0, 0}, {0, 0}, {0, 0}, {0, 0},
};

///< @brief FourX4CFA Binning 2 Location
static const CFABinningLocation FourX4CFABin2Location[16] =
{
    {4, 4}, {4, 4}, {4, 4}, {4, 4},
    {4, 4}, {4, 4}, {4, 4}, {4, 4},
    {4, 4}, {4, 4}, {4, 4}, {4, 4},
    {4, 4}, {4, 4}, {4, 4}, {4, 4},
};

///< @brief FourX4CFA Binning 4 Location
static const CFABinningLocation FourX4CFABin4Location[16] =
{
    {0, 0}, {0, 0}, {0, 0}, {0, 0},
    {0, 0}, {3, 3}, {0, 0}, {3, 3},
    {0, 0}, {0, 0}, {0, 0}, {0, 0},
    {0, 0}, {3, 3}, {0, 0}, {3, 3},
};

///< @brief Output Color for FourX4CFA Binning 2 GRBG
static const UINT8 FourX4CFABin2CFAColorGRBG[16] =
{
    G, G, R, R,
    G, G, R, R,
    B, B, G, G,
    B, B, G, G,
};

///< @brief Output Color for FourX4CFA Binning 2 RGGB
static const UINT8 FourX4CFABin2CFAColorRGGB[16] =
{
    R, R, G, G,
    R, R, G, G,
    G, G, B, B,
    G, G, B, B,
};

///< @brief Output Color for FourX4CFA Binning 2 BGGR
static const UINT8 FourX4CFABin2CFAColorBGGR[16] =
{
    B, B, G, G,
    B, B, G, G,
    G, G, R, R,
    G, G, R, R,
};

///< @brief Output Color for FourX4CFA Binning 2 GBRG
static const UINT8 FourX4CFABin2CFAColorGBRG[16] =
{
    G, G, B, B,
    G, G, B, B,
    R, R, G, G,
    R, R, G, G,
};

enum class IQModuleDumpType
{
    IQModuleBLS         = 0,
    IQModuleDemux       = 1,
    IQModuleBPCABF      = 2,
    IQModuleGamma       = 3,
    IQModuleCST         = 4,
    IQModuleLSC         = 5,
    IQModuleLTM         = 6,
    IQModuleGTM         = 7,
    IQModulePDPC        = 8,
    IQModuleWB          = 9,
    IQModuleFCG         = 10,
    IQModuleChannelGain = 11,
    IQModuleHNR         = 12,
    IQModuleASF         = 13,
    IQModuleANR         = 14,
    IQModuleLENR        = 15,
    IQModuleTF          = 16,
    IQModuleTMC         = 17,
    IQModuleCC          = 18,
    MaxIQModuleDumpTypes
};

static const ISPIQModuleType IQModuleBLSTypes[] =
{
    ISPIQModuleType::IFEBLS,                ///< Black Level Substraction Module of IFE
    ISPIQModuleType::IPEBLS,                 ///< Black Level Substraction Module in IPE
    ISPIQModuleType::BPSBLS,                ///< Black level substraction in BPS
    ISPIQModuleType::TFEBLS,                ///< BLS Module of TFE
    ISPIQModuleType::OPEBLS,                ///< Black Level Substraction Module in OPE
    ISPIQModuleType::IFELITEBLS,            ///< Black Level Substraction Module of IFE LITE
};

static const ISPIQModuleType IQModuleDemuxTypes[] =
{
    ISPIQModuleType::IFEDemux,              ///< Demux Module of IFE
    ISPIQModuleType::SFEDemux,              ///< QCFA Demux Module of SFE
    ISPIQModuleType::BPSDemux,              ///< Demux Module in BPS
    ISPIQModuleType::OPEDemux,              ///< Demux module in OPE
};

static const ISPIQModuleType IQModuleBPCABFTypes[] =
{
    ISPIQModuleType::IFEBPCABF,             ///< Bad Pixel Corection Module of IFE
    ISPIQModuleType::IPEBPCABF,             ///< Bad Pixel Corection and Adaptive Bayer Filter Module in IPE
    ISPIQModuleType::IPEHDRBPCABF,          ///< BPCABF in Bayer HDRC path
    ISPIQModuleType::OPEBPCABF,             ///< Bad Pixel Corection and Adaptive Bayer Filter Module in OPE
};

static const ISPIQModuleType IQModuleGammaTypes[] =
{
    ISPIQModuleType::IFEGamma,              ///< Gamma Correction Module of IFE
    ISPIQModuleType::IFEUVGamma,            ///< IFE UV Gamma
    ISPIQModuleType::IPEGamma,              ///< Gamma Correction Module
    ISPIQModuleType::IPEPreMFHDRGamma0,     ///< MFHDR Gamma Correction Module
    ISPIQModuleType::IPEPreMFHDRGamma1,     ///< MFHDR Gamma Correction Module
    ISPIQModuleType::IPEPreMFHDRGamma2,     ///< MFHDR Gamma Correction Module
    ISPIQModuleType::IPEPostMFHDRGamma,     ///< MFHDR Gamma Correction Module
    ISPIQModuleType::IPEUVGamma,            ///< IPE UV Gamma module in PPS
    ISPIQModuleType::IPEBayerGamma,         ///< Gamma Module in Bayer processing path in IPE
    ISPIQModuleType::IPEPreLTMGamma,        ///< Gamma Module in pre-LTM post processing path in IPE
    ISPIQModuleType::IPENPSGamma,           ///< NPS Gamma module in pre-LTM post processing path in IPE
    ISPIQModuleType::BPSGamma,              ///< Gamma Correction Module in BPS
    ISPIQModuleType::BPSUVGamma,            ///< UV gamma Correction Module in BPS
    ISPIQModuleType::BPSBGamma,             ///< Bayer Gamma Module in BPS
    ISPIQModuleType::OPEGamma,              ///< Gamma Correction Module in OPE
    ISPIQModuleType::IFELITEGamma,          ///< Gamma Correction Module of IFE LITE
};

static const ISPIQModuleType IQModuleCSTTypes[] =
{
    ISPIQModuleType::IFEALSCStatsPDPC,      ///< PDAF pixel correction Module of IFE
    ISPIQModuleType::IFECST,                ///< Color Space Transform Module of IFE
    ISPIQModuleType::IPECST,                ///< Color Space Transform Module
    ISPIQModuleType::IPEPreMFHDRCST0,       ///< MFHDR Color Space Transform Module
    ISPIQModuleType::IPEPreMFHDRCST1,       ///< MFHDR Color Space Transform Module
    ISPIQModuleType::IPEPreMFHDRCST2,       ///< MFHDR Color Space Transform Module
    ISPIQModuleType::IPEPostMFHDRCST,       ///< MFHDR Color Space Transform Module
    ISPIQModuleType::IPEBayerCST,           ///< Color Space Transform Module in Bayer processing path in IPE
    ISPIQModuleType::BPSCST,                ///< Color Space Transform Module in BPS
    ISPIQModuleType::TFECST,                ///< CST Module of TFE
    ISPIQModuleType::TFEAICST,              ///< CST Module of TFE in AI path
    ISPIQModuleType::OPECST,                ///< Color Space Transform Module in OPE
};

static const ISPIQModuleType IQModuleLSCType[] =
{
    ISPIQModuleType::IFELSC,                ///< Lens Shading Correction of IFE
    ISPIQModuleType::SFELSC,                ///< LSC Module of SFE
    ISPIQModuleType::BPSLSC,                ///< Lens shading module in BPS
    ISPIQModuleType::OPELSC,                ///< LSC Module of OPE
};

static const ISPIQModuleType IQModuleLTMTypes[] =
{
    ISPIQModuleType::IFEBLTM,               ///< Bayer LTM Module of IFE
    ISPIQModuleType::IPELTM,                ///< Local Tone Map Module
    ISPIQModuleType::IPEMFHDRLTM,           ///< MFHDR Local Tone Map Module
    ISPIQModuleType::IPEPreLTMGamma,        ///< Gamma Module in pre-LTM post processing path in IPE
    ISPIQModuleType::IPEBayerLTM,           ///< Bayer LTM in IPE
    ISPIQModuleType::BPSBAYERLTM,           ///< Bayer LTM in BPS
    ISPIQModuleType::OPELTM,                ///< Local Tone Map Module in OPE
};

static const ISPIQModuleType IQModuleGTMTypes[] =
{
    ISPIQModuleType::IFEGTM,                ///< Global Tone Mapping of IFE
    ISPIQModuleType::IFEGTMFD,              ///< Global Tone Mapping on FD of IFE
    ISPIQModuleType::IFEBGTM,               ///< Bayer GTM Module of IFE
    ISPIQModuleType::IPEMFHDRGTM,           ///< MFHDR Global Tone Map Module
    ISPIQModuleType::IPEGTM,                ///< Global Tone Mapping in IPE
    ISPIQModuleType::IPEBayerGTM,           ///< Bayer GTM in IPE
    ISPIQModuleType::BPSGTM,                ///< Global Tone Mapping in BPS
    ISPIQModuleType::BPSBAYERGTM,           ///< Bayer GTM in BPS
    ISPIQModuleType::TFEGTM,                ///< GTM Module of TFE
    ISPIQModuleType::OPEGTM,                ///< Global Tone Mapping in OPE
};

static const ISPIQModuleType IQModulePDPCTypes[] =
{
    ISPIQModuleType::IFEPDPC,               ///< PDAF pixel correction Module of IFE
    ISPIQModuleType::IFEPreLSCPDPC,         ///< PDAF pixel correction Module of IFE
    ISPIQModuleType::IFEPostLSCPDPC,        ///< PDAF pixel correction Module of IFE
    ISPIQModuleType::IFEALSCStatsPDPC,      ///< PDAF pixel correction Module of IFE
    ISPIQModuleType::IFEPostFCGPDPC,        ///< PDAF pixel correction Module of IFE
    ISPIQModuleType::IFEPDPCBPC,            ///< IFE BPC and PDPC
    ISPIQModuleType::SFEPDPC,               ///< QCFA BPC PDPC module of SFE
    ISPIQModuleType::SFE1DPDPC,             ///< 1D PDPC module of SFE
    ISPIQModuleType::BPSBPCPDPC,            ///< Bad Pixel Corection & PDPC Module in BPS
    ISPIQModuleType::BPSPDPCBPC1D,          ///< 1D PDPC Module in BPS
    ISPIQModuleType::TFEPDPC,               ///< BPC+PDPC Module of TFE
};

static const ISPIQModuleType IQModuleWBTypes[] =
{
    ISPIQModuleType::IFEWB,                 ///< White Balance Module of IFE
    ISPIQModuleType::IPEWB,                  ///< WB module in PPS
    ISPIQModuleType::BPSWB,                 ///< White Balance Module in BPS
    ISPIQModuleType::BPSAWBBG,              ///< BPS AWB BG stats
    ISPIQModuleType::TFEWBBDSDPC,           ///< WB + BDS + DPC of TFE
    ISPIQModuleType::TFEWBBDS,              ///< WB + BDS Module of TFE
    ISPIQModuleType::TFEWB,                 ///< WB Module of TFE
    ISPIQModuleType::OPEWB,                 ///< White Balance Module in OPE
};

static const ISPIQModuleType IQModuleFCGTypes[] =
{
    ISPIQModuleType::IFEFCG,                ///< Flicker Correction Gain of IFE
    ISPIQModuleType::SFEFCG,                ///< Flicker Correction Gain of SFE
    ISPIQModuleType::BPSFCG,                ///< Flicker Correction Gain Module in BPS
};

static const ISPIQModuleType IQModuleChannelGainTypes[] =
{
    ISPIQModuleType::IFEChannelGain,        ///< IFE Channel Gains Module
    ISPIQModuleType::SFEChannelGain,        ///< Channel Gain Modules of SFE
    ISPIQModuleType::TFEChannelGains,       ///< Demux Module of TFE
    ISPIQModuleType::OPEChannelGains,       ///< Demux Module of OPE
};

static const ISPIQModuleType IQModuleHNRTypes[] =
{
    ISPIQModuleType::IPEHNR,                ///< HNR module in IPE
    ISPIQModuleType::BPSHNR,                ///< HNR module in BPS
};

static const ISPIQModuleType IQModuleASFTypes[] =
{
    ISPIQModuleType::IPEASF,                ///< Adaptive Spatial Filter Module in PPS
    ISPIQModuleType::OPEASF,                ///< Adaptive Spatial Filer Module in OPE

};

static const ISPIQModuleType IQModuleANRTypes[] =
{
    ISPIQModuleType::IPEANR,                ///< Advanced Noise Reduction Module in NPS
};

static const ISPIQModuleType IQModuleLENRTypes[] =
{
    ISPIQModuleType::IPELENR,               ///< LENR module in IPE
};

static const ISPIQModuleType IQModuleTFTypes[] =
{
    ISPIQModuleType::IPETF,                 ///< Temporal Filter Module in NPS
};

static const ISPIQModuleType IQModuleTMCTypes[] =
{
    ISPIQModuleType::SWTMC,                 ///< SW TMC module
};

static const ISPIQModuleType IQModuleCCTypes[] =
{
    ISPIQModuleType::IFECC,                   ///< Color Correction Module of IFE
    ISPIQModuleType::IPEColorCorrection,      ///< Color Correction Module in PPS
    ISPIQModuleType::IPEBayerColorCorrection, ///< Color Correction Module in Bayer processing path in IPE
    ISPIQModuleType::BPSCC,                   ///< Color Correction Module in BPS
    ISPIQModuleType::OPECC,                   ///< Color Correction Module in OPE
};

/// @brief BPS IQ Module Information
struct BPSIQModuleInfo
{
    ISPIQModuleType moduleType;                                   ///< IQ Module Type
    BOOL            isEnabled;                                    ///< Module Available or not
    CamxResult      (*IQCreate)(BPSModuleCreateData* pInputData); ///< Static create fuction of this IQ Module
    UINT32          moduleVersion;                                ///< Module version of the IQ module
};

/// @brief BPS Capability Information
struct BPSIQModuleList
{
    UINT             numBPSIQModules;                             ///< Number of BPS IQ Modules
    BPSIQModuleInfo* pBPSIQModule[MaxBPSIQModules];               ///< List of BPS IQ Module
};

/// @brief CVP IQ Module Information
struct CVPIQModuleInfo
{
    ISPIQModuleType moduleType;                                   ///< IQ Module Type
    BOOL            isEnabled;                                    ///< Module Available or not
    CamxResult      (*IQCreate)(CVPModuleCreateData* pInputData); ///< Static create fuction of this IQ Module
    UINT32          moduleVersion;                                ///< Module version of the IQ module
};

/// @brief CVP Capability Information
struct CVPIQModuleList
{
    UINT             numBPSIQModules;                             ///< Number of BPS IQ Modules
    CVPIQModuleInfo* pCVPIQModule[MaxBPSIQModules];               ///< List of BPS IQ Module
};

/// @brief IFE IQ Module Information
struct IFEIQModuleInfo
{
    ISPIQModuleType   moduleType;                                      ///< IQ Module Type
    union
    {
        IFEPipelinePath IFEPath;                                       ///< IFE Path
        SFEPipelinePath SFEPath;                                       ///< SFE Path
    } PipelinePath;
    UINT8             installed;                                       ///< Module Available or not on particular chipset
    CamxResult        (*IQCreate)(IFEModuleCreateData* pInputData);    ///< Static create fuction of this IQ Module
};

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Base Class for all the ISP IQModule
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class ISPIQModule
{
public:

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// CheckBound
    ///
    /// @brief  Check bound enum index
    ///
    /// @param  nIndex index of the enum value
    /// @param  nMax   max enum value
    /// @param  pStr   name of the enum
    ///
    /// @return Index Enum
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static CAMX_INLINE_FORCE UINT32 CheckBound(const UINT32 nIndex, const UINT32 nMax, const char* pStr)
    {
        UINT32 nReturn = nIndex;
        if (nIndex > nMax)
        {
            CAMX_ASSERT(false);
            nReturn = nMax;
        }
        return nReturn;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// Execute
    ///
    /// @brief  Execute process capture request to configure individual image quality module
    ///
    /// @param  pInputData Pointer to the Inputdata
    ///
    /// @return CamxResultSuccess if successful.
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CamxResult Execute(
        ISPInputData* pInputData) = 0;

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //// Execute
    /////
    ///// @brief  Execute process capture request to configure individual image quality module
    /////
    ///// @param  pInputData Pointer to the Inputdata
    /////
    ///// @return CamxResultSuccess if successful.
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CamxResult Execute(             // NOWHINE CP028 <- overloading
            VOID* pInputData)
    {
        CAMX_UNREFERENCED_PARAM(pInputData);
        return CamxResultSuccess;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// PrepareStripingParameters
    ///
    /// @brief  Prepare striping parameters for striping lib
    ///
    /// @param  pInputData Pointer to the Inputdata
    ///
    /// @return CamxResultSuccess if successful.
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CamxResult PrepareStripingParameters(
        ISPInputData* pInputData)
    {
        CAMX_UNREFERENCED_PARAM(pInputData);
        return CamxResultSuccess;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// FillCmdBufferManagerParams
    ///
    /// @brief  Fills the command buffer manager params needed by IQ Module
    ///
    /// @param  pInputData Pointer to the IQ Module Input data structure
    /// @param  pParam     Pointer to the structure containing the command buffer manager param to be filled by IQ Module
    ///
    /// @return CamxResultSuccess if successful
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CamxResult FillCmdBufferManagerParams(
       const ISPInputData*     pInputData,
       IQModuleCmdBufferParam* pParam)
    {
        CAMX_UNREFERENCED_PARAM(pInputData);
        CAMX_UNREFERENCED_PARAM(pParam);
        return CamxResultSuccess;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetRegCmd
    ///
    /// @brief  Retrieve the buffer of the register value
    ///
    /// @return Pointer of the register buffer
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual VOID* GetRegCmd()
    {
        return NULL;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetDualIFEData
    ///
    /// @brief  Provides information on how dual IFE mode affects the IQ module
    ///
    /// @param  pDualIFEData Pointer to dual IFE data the module will fill in
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual VOID GetDualIFEData(
        IQModuleDualIFEData* pDualIFEData)
    {
        CAMX_ASSERT(NULL != pDualIFEData);

        pDualIFEData->dualIFESensitive      = FALSE;
        pDualIFEData->dualIFEDMI32Sensitive = FALSE;
        pDualIFEData->dualIFEDMI64Sensitive = FALSE;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetDualTFEData
    ///
    /// @brief  Provides information on how dual TFE mode affects the IQ module
    ///
    /// @param  pDualTFEData Pointer to dual TFE data the module will fill in
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual VOID GetDualTFEData(
        IQModuleDualTFEData* pDualTFEData)
    {
        CAMX_ASSERT(NULL != pDualTFEData);

        pDualTFEData->dualTFESensitive      = FALSE;
        pDualTFEData->dualTFEDMI32Sensitive = FALSE;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetHVXInputResolution
    ///
    /// @brief  Get HVX Input Resiolution
    ///
    /// @param  pHVXConfigureData Pointer to the HVXConfigureData
    ///
    /// @return CamxResultSuccess if successful.
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CamxResult GetHVXInputResolution(
        ISPHVXConfigureData* pHVXConfigureData)
        {
            CAMX_UNREFERENCED_PARAM(pHVXConfigureData);
            return CamxResultSuccess;
        }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// UnInitialize
    ///
    /// @brief  Uniintialize HVX
    ///
    /// @return CamxResultSuccess if successful.
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CamxResult UnInitialize()
    {
        return CamxResultSuccess;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// FinalizeInitConfiguration
    ///
    /// @brief  Finalize HVX Init Configuration After Getting Acquired IFE HW Information
    ///
    /// @param  pInputData Pointer to the Inputdata
    ///
    /// @return CamxResultSuccess if successful.
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CamxResult FinalizeInitConfiguration(
        ISPInputData * pInputData)
    {
        CAMX_UNREFERENCED_PARAM(pInputData);
        return CamxResultSuccess;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// PrepareHVXStreaming
    ///
    /// @brief  Opens DSP library, sets HVX configuration and starts DSP streaming.
    ///
    /// @return CamxResultSuccess if successful.
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CamxResult PrepareHVXStreaming()
    {
        return CamxResultSuccess;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// InitConfiguration
    ///
    /// @brief  Initialize HVX Configuration
    ///
    /// @return CamxResultSuccess if successful.
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CamxResult InitConfiguration()
    {
        return CamxResultSuccess;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetHVXTapPoint
    ///
    /// @brief  GetHVXTapPoint
    ///
    /// @return HVXTapPoint
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CAMX_INLINE HVXTapPoint GetHVXTapPoint()
    {
        return IFEBEGINNING ;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetOPEStripeSensitiveData
    ///
    /// @brief  Provides information if OPE IQ block is stripe sensitive
    ///
    /// @param  pStripeSensitive Pointer to stripe sensitive data the module will fill in
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual VOID GetOPEStripeSensitiveData(
        BOOL* pStripeSensitive)
    {
        *pStripeSensitive = FALSE;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// CheckAndUpdateChromatixData
    ///
    /// @brief  Check and update the chromatix data and return if it changed
    ///
    /// @param  pInputData Pointer to the ISP input data
    ///
    /// @return BOOL flag indicating if the chromatix pointer as changed
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual BOOL CheckAndUpdateChromatixData(
        ISPInputData* pInputData)
    {
        CAMX_UNREFERENCED_PARAM(pInputData);
        return CamxResultSuccess;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetLRMERegNum
    ///
    /// @brief  Return LRME Reg Num.  This call is to be removed
    ///
    /// @return Max Trigger Number
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static UINT GetLRMERegNum();

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetMaxEnumTrigger
    ///
    /// @brief  API function. Get Max Trigger Number
    ///
    /// @return Max Trigger Number
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static INT GetMaxEnumTrigger();

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// ConfigPreCrop
    ///
    /// @brief  Pre Crop if TFE output dimensions are beyond scaler capability
    ///
    /// @param  pInputData         Pointer to the ISP input data
    /// @param  pState             Pointer to the BDS state
    /// @param  pCropScaleFactor   Pointer to crop Scaling Factor
    /// @param  pOutputWidth       Pointer to Output Width
    /// @param  pOutputHeight      Pointer to Input Width
    /// @param  pPreCropWindow     Pointer to pre crop window
    /// @param  scaleRatioLimit    BDS scaleRatioLimit
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static VOID ConfigPreCrop(
        ISPInputData* pInputData,
        BDSState*     pState,
        UINT32*       pCropScaleFactor,
        UINT32*       pOutputWidth,
        UINT32*       pOutputHeight,
        CropWindow*   pPreCropWindow,
        UINT32        scaleRatioLimit);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// IQSettingModuleUninitialize
    ///
    /// @brief  Uninitialize IQ Setting Module
    ///
    /// @param  pData Pointer to the IQ Library Data
    ///
    /// @return return CamxResult
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static CamxResult IQSettingModuleUninitialize(
        IQLibInitialData* pData);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetTMCVersion
    ///
    /// @brief  Get teh TMC version supported on that chiopset
    ///
    /// @param  chipsetVersion      Chipset version
    ///
    /// @return SWTMCVersion TMC version associated with that chipset
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static SWTMCVersion GetTMCVersion(
        UINT32 chipsetVersion);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// IQSetupTriggerData
    ///
    /// @brief  Setup Trigger Data for current frame
    ///
    /// @param  pInputData          Pointer to the input data from Node
    /// @param  pNode               Pointer to the Node which calls this function
    /// @param  isRealTime          Realtime or offline
    /// @param  pIQOEMTriggerData   Pointer to tuning metadata, to be use by OEM to fill trigger data from vendor tags.
    /// @param  dump                Dump triggers.
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static VOID IQSetupTriggerData(
        ISPInputData*           pInputData,
        Node*                   pNode,
        BOOL                    isRealTime,
        ISPIQTuningDataBuffer*  pIQOEMTriggerData,
        BOOL                    dump=FALSE);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// IQSetupOEMStatData
    ///
    /// @brief  Setup OEM Stat Data for current frame
    ///
    /// @param  pInputData          Pointer to the input data from Node
    /// @param  pNode               Pointer to the Node which calls this function
    /// @param  isRealTime          Realtime or offline
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static VOID IQSetupOEMStatData(
        ISPInputData*   pInputData,
        Node*           pNode,
        BOOL            isRealTime);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// IQSettingModuleInitialize
    ///
    /// @brief  Initiate IQ Setting Module
    ///
    /// @param  pData Pointer to the IQ Library Data
    ///
    /// @return return CamxResult
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static CamxResult IQSettingModuleInitialize(
        IQLibInitialData* pData);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// SetupGenericTrigger
    ///
    /// @brief  API function. For Trigger2.0, setup the generic trigger
    ///
    /// @param  pInputData              Pointer to the ISPInputData
    /// @param  rCurrentAppliedTrigger  Reference previous trigger value
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static VOID SetupGenericTrigger(
        ISPInputData*       pInputData,
        std::vector<FLOAT>& rCurrentAppliedTrigger);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetEnableADRCPathSetting
    ///
    /// @brief  Get Enable ADRC Path setting
    ///
    /// @param  pInputData            Pointer to ISP input data
    /// @param  pNode                 Pointer to CAMX node
    ///
    /// @return Sucess when get the Enable ADRC Path setting metadata; otherewise fail
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static CamxResult GetEnableADRCPathSetting(
        ISPInputData* pInputData,
        Node*         pNode);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// IQSetHardwareVersion
    ///
    /// @brief  Set hardware specific version.
    ///
    /// @param  titanVersion    variable holding titan version.
    /// @param  hardwareVersion variable holding hardware version.
    ///
    /// @return return  BOOL
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static BOOL IQSetHardwareVersion(
        UINT32 titanVersion, UINT32 hardwareVersion);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// IQSetTuningMemoryOptimizationHook
    ///
    /// @brief  Set tuning memory optimization hook.
    ///
    /// @param  pTuningMemoryOptimizationHook    Function pointer to point tuning memory optimization
    ///
    /// @return return  None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static VOID IQSetTuningMemoryOptimizationHook(
        VOID* pTuningMemoryOptimizationHook);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetGTMPercentageIfTMCEnabled
    ///
    /// @brief  get TMC version and GTM percentage
    ///
    /// @param  pInputData          Pointer to the input data from Node
    /// @param  pGtmPercentage      Pointer to update GTM tuning percentage
    /// @param  TMCVersion          TMC Version
    ///
    /// @return BOOL return TRUE if TMC is enabled else FALSE
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static BOOL GetGTMPercentageIfTMCEnabled(
        const ISPInputData* pInputData,
        FLOAT*              pGtmPercentage,
        SWTMCVersion        TMCVersion);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// IQTriggerDataDump
    ///
    /// @brief  Dump IQ Trigger Data
    ///
    /// @param  pTriggerData  Pointer to the IQ Trigger Data
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static VOID IQTriggerDataDump(
        ISPIQTriggerData* pTriggerData);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// DumpICAGrid
    ///
    /// @brief  Dump ICA Grid
    ///
    /// @param  pFileName     Log File Handler
    /// @param  pWarpGridData Pointer to ICA Grid
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static VOID DumpICAGrid(
        FILE*               pFileName,
        const NcLibIcaGrid* pWarpGridData);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// NodeLevelDataBinaryDump
    ///
    /// @brief  Binary Dump common part of data for nodes.
    ///
    /// @param  pInputData Pointer to the ISP input data
    /// @param  pFd        File Descriptor of logging file
    ///
    /// @return CamxResultSuccess if successful
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static CamxResult NodeLevelDataBinaryDump(
        ISPInputData* pInputData,
        FILE*         pFd);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// DumpIQLevelData
    ///
    /// @brief  Dump IQ debug data to bin file for parsing
    ///
    /// @param  pInputData Pointer to the ISP input data
    /// @param  pFd        File Descriptor of logging file
    ///
    /// @return CamxResultSuccess if successful
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CamxResult DumpIQLevelData(
        ISPInputData* pInputData,
        FILE*         pFd)
    {
        // return success if the module doesn't need to dump any data
        CAMX_UNREFERENCED_PARAM(pInputData);
        CAMX_UNREFERENCED_PARAM(pFd);
        return CamxResultSuccess;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetIQCmdLength
    ///
    /// @brief  Get the Command Size
    ///
    /// @return Length of the command list
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE UINT GetIQCmdLength()
    {
        return m_cmdLength;
    };

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetIQModulePerStripeCmdLength
    ///
    /// @brief  Get the Command Size of each IQ module per stripe
    ///
    /// @return Length of the command list
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE UINT GetIQModulePerStripeCmdLength()
    {
        return m_stripeCmdLength;
    };

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// Get32bitDMILength
    ///
    /// @brief  Get the 32 bit DMI Size
    ///
    /// @return Length of the DMI list
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE UINT32 Get32bitDMILength()
    {
        return m_32bitDMILength;
    };

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// Set32bitDMIBufferOffset
    ///
    /// @brief  Set Offset in 32bit DMI buffer
    ///
    /// @param  offset The 64-bit DMI buffer offset.
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE VOID Set32bitDMIBufferOffset(
        UINT offset)
    {
        m_32bitDMIBufferOffsetDword = offset;

        return;
    };

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// Get64bitDMILength
    ///
    /// @brief  Get the 64 bit DMI Size
    ///
    /// @return Length of the DMI list
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE UINT32 Get64bitDMILength()
    {
        return m_64bitDMILength;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// Set64bitDMIBufferOffset
    ///
    /// @brief  Set Offset in 64bit DMI buffer
    ///
    /// @param  offset The 64-bit DMI buffer offset.
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE VOID Set64bitDMIBufferOffset(
        UINT offset)
    {
        m_64bitDMIBufferOffsetDword = offset;

        return;
    };

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetVersion
    ///
    /// @brief  Get the HW version
    ///
    /// @return HW version
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE virtual UINT32 GetVersion()
    {
        return 0;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetNumLUT
    ///
    /// @brief  Get the number of Look Up Tables in IQ block
    ///
    /// @return Number of tables
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE UINT GetNumLUT()
    {
        return m_numLUT;
    };

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetLUTOffset
    ///
    /// @brief  Get the offset where DMI CDM command for IQ module is present within DMI header cmd buffer
    ///
    /// @return Offset of LUT DMI header
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE UINT GetLUTOffset()
    {
        return m_offsetLUT;
    };

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetRegOffset
    ///
    /// @brief  Get the offset where CDM command for IQ module is present within generic common register cmd buffer
    ///
    /// @return Offset of register write
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE UINT GetRegOffset()
    {
        return m_offsetReg;
    };

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetRegOffsetBLUR
    ///
    /// @brief  Get the offset where CDM command for IQ module is present within generic common register cmd buffer
    ///
    /// @return Offset of register write
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE UINT GetRegOffsetBLUR()
    {
        return m_offsetRegBLUR;
    };

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetIQCmdLengthBLUR
    ///
    /// @brief  Get the BLUR Command Size
    ///
    /// @return Length of the command list
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE UINT GetIQCmdLengthBLUR()
    {
        return m_cmdLengthBLUR;
    };

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetNumLUTBLUR
    ///
    /// @brief  Get the number of BLUR Look Up Tables in IQ block
    ///
    /// @return Number of tables
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE UINT GetNumLUTBLUR()
    {
        return m_numLUTBLUR;
    };

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// IsSFEHDRMode
    ///
    /// @brief  Returns TRUE if the SFE Usecase Mode is HDR
    ///
    /// @param  SFEMode  SFE Operating Mode
    ///
    /// @return BOOL
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE BOOL IsSFEHDRMode(
        SFEUsecaseMode SFEMode)
    {
        BOOL bIsHDRMode = FALSE;

        if ((SFEUsecaseSHDR    == SFEMode) ||
            (SFEUsecaseXCFAHDR == SFEMode))
        {
            bIsHDRMode = TRUE;
        }

        return bIsHDRMode;
    };

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// IsSFEQCFAMode
    ///
    /// @brief  Returns TRUE if the SFE Usecase Mode is QCFA
    ///
    /// @param  pSFEInputData Pointer to SFE Input Data
    ///
    /// @return BOOL
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE BOOL IsSFEQCFAMode(
        SFEInputData* pSFEInputData )
    {
        BOOL bIsQCFAMode = FALSE;

        if ((SFEUsecaseXCFA == pSFEInputData->usecaseMode) &&
            (QuadCFA        == pSFEInputData->xcfaType))
        {
            bIsQCFAMode = TRUE;
        }

        return bIsQCFAMode;
    };

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetIQType
    ///
    /// @brief  Get the Type of this Module
    ///
    /// @return module type
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE ISPIQModuleType GetIQType()
    {
        return m_type;
    };

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetIQName
    ///
    /// @brief  Get the Name of this Module
    ///
    /// @return module name
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    const CHAR* GetIQName()
    {
        const CHAR* pName;

        switch (m_type)
        {
            case ISPIQModuleType::IFECAMIF:
                pName = "IFECAMIF";
                break;

            case ISPIQModuleType::CSIDCAMIF:
                pName = "CSIDCAMIF";
                break;

            case ISPIQModuleType::IFECAMIFLite:
                pName = "IFECAMIFLite";
                break;

            case ISPIQModuleType::IFECAMIFDualPD:
                pName = "IFECAMIFDualPD";
                break;

            case ISPIQModuleType::IFECAMIFLCR:
                pName = "IFECAMIFLCR";
                break;

            case ISPIQModuleType::IFECAMIFRDI0:
                pName = "IFECAMIFRDI0";
                break;

            case ISPIQModuleType::IFECAMIFRDI1:
                pName = "IFECAMIFRDI1";
                break;

            case ISPIQModuleType::IFECAMIFRDI2:
                pName = "IFECAMIFRDI2";
                break;

            case ISPIQModuleType::IFECAMIFRDI3:
                pName = "IFECAMIFRDI3";
                break;

            case ISPIQModuleType::IFECSID:
                pName = "IFECSID";
                break;

            case ISPIQModuleType::IFEPedestalCorrection:
                pName = "IFEPedestalCorrection";
                break;

            case ISPIQModuleType::IFEBLS:
                pName = "IFEBLS";
                break;

            case ISPIQModuleType::IFELinearization:
                pName = "IFELinearization";
                break;

            case ISPIQModuleType::IFEDemux:
                pName = "IFEDemux";
                break;

            case ISPIQModuleType::IFEHDR:
                pName = "IFEHDR";
                break;

            case ISPIQModuleType::IFEPDPC:
                pName = "IFEPDPC";
                break;

            case ISPIQModuleType::IFEBPCBCC:
                pName = "IFEBPCBCC";
                break;

            case ISPIQModuleType::IFEABF:
                pName = "IFEABF";
                break;

            case ISPIQModuleType::IFELSC:
                pName = "IFELSC";
                break;

            case ISPIQModuleType::IFEDemosaic:
                pName = "IFEDemosaic";
                break;

            case ISPIQModuleType::IFECC:
                pName = "IFECC";
                break;

            case ISPIQModuleType::IFEGTM:
                pName = "IFEGTM";
                break;

            case ISPIQModuleType::IFEGamma:
                pName = "IFEGamma";
                break;

            case ISPIQModuleType::IFECST:
                pName = "IFECST";
                break;

            case ISPIQModuleType::IFEMNDS:
                pName = "IFEMNDS";
                break;

            case ISPIQModuleType::IFEPreCrop:
                pName = "IFEPreCrop";
                break;

            case ISPIQModuleType::IFEDS4:
                pName = "IFEDS4";
                break;

            case ISPIQModuleType::IFECrop:
                pName = "IFECrop";
                break;

            case ISPIQModuleType::IFERoundClamp:
                pName = "IFERoundClamp";
                break;

            case ISPIQModuleType::IFER2PD:
                pName = "IFER2PD";
                break;

            case ISPIQModuleType::IFEWB:
                pName = "IFEWB";
                break;

            case ISPIQModuleType::IFEHVX:
                pName = "IFEHVX";
                break;

            case ISPIQModuleType::IFEDUALPD:
                pName = "IFEDUALPD";
                break;

            case ISPIQModuleType::IFEPDAF:
                pName = "IFEPDAF";
                break;

            case ISPIQModuleType::IFELCR:
                pName = "IFELCR";
                break;

            case ISPIQModuleType::IFEBC:
                pName = "IFEBC";
                break;

            case ISPIQModuleType::IFEPDPCBPC:
                pName = "IFEPDPCBPC";
                break;

            case ISPIQModuleType::IFEBinCorrection:
                pName = "IFEBinCorrection";
                break;

            case ISPIQModuleType::IFEGIC:
                pName = "IFEGIC";
                break;

            case ISPIQModuleType::IFEBGTM:
                pName = "IFEBGTM";
                break;

            case ISPIQModuleType::IFEBLTM:
                pName = "IFEBLTM";
                break;

            case ISPIQModuleType::IFELCAC:
                pName = "IFELCAC";
                break;

            case ISPIQModuleType::IFEUVGamma:
                pName = "IFEUVGamma";
                break;

            case ISPIQModuleType::IFESparsePDExt:
                pName = "IFESparsePDExt";
                break;

            case ISPIQModuleType::IFEDecompand:
                pName = "IFEDecompand";
                break;

            case ISPIQModuleType::IFEHVXCompand:
                pName = "IFEHVXCompand";
                break;

            case ISPIQModuleType::IFEHVXDecompand:
                pName = "IFEHVXDecompand";
                break;

            case ISPIQModuleType::IFEChannelGain:
                pName = "IFEChannelGain";
                break;

            case ISPIQModuleType::IFEPreLSCPDPC:
                pName = "IFEPreLSCPDPC";
                break;

            case ISPIQModuleType::IFEPostLSCPDPC:
                pName = "IFEPostLSCPDPC";
                break;

            case ISPIQModuleType::IFEALSCStatsPDPC:
                pName = "IFEALSCStatsPDPC";
                break;

            case ISPIQModuleType::IFEPostFCGPDPC:
                pName = "IFEPostFCGPDPC";
                break;

            case ISPIQModuleType::IFEBPCABF:
                pName = "IFEBPCABF";
                break;

            case ISPIQModuleType::IFEGTMFD:
                pName = "IFEGTMFD";
                break;

            case ISPIQModuleType::IFEFCG:
                pName = "IFEFCG";
                break;

            case ISPIQModuleType::IFESWExtend:
                pName = "IFESWExtend";
                break;

            case ISPIQModuleType::IFERemosaic:
                pName = "IFERemosaic";
                break;

            case ISPIQModuleType::IFEXCFAChannelGain:
                pName = "IFEXCFAChannelGain";
                break;

            case ISPIQModuleType::SWGD:
                pName = "SWGD";
                break;

            case ISPIQModuleType::SFEDemux:
                pName = "SFEDemux";
                break;

            case ISPIQModuleType::SFEChannelGain:
                pName = "SFEChannelGain";
                break;

            case ISPIQModuleType::SFELCR:
                pName = "SFELCR";
                break;

            case ISPIQModuleType::SFEPDPC:
                pName = "SFEPDPC";
                break;

            case ISPIQModuleType::SFE1DPDPC:
                pName = "SFE1DPDPC";
                break;

            case ISPIQModuleType::SFECompand:
                pName = "SFECompand";
                break;

            case ISPIQModuleType::SFEDecompand:
                pName = "SFEDecompand";
                break;

            case ISPIQModuleType::SFEHDRMerge:
                pName = "SFEHDRMerge";
                break;

            case ISPIQModuleType::SFERemosaic:
                pName = "SFERemosaic";
                break;

            case ISPIQModuleType::SFEQCFABin:
                pName = "SFEQCFABin";
                break;

            case ISPIQModuleType::SFELSC:
                pName = "SFELSC";
                break;

            case ISPIQModuleType::SFECrop:
                pName = "SFECrop";
                break;

            case ISPIQModuleType::SFERoundClamp:
                pName = "SFERoundClamp";
                break;

            case ISPIQModuleType::SFEFCG:
                pName = "SFEFCG";
                break;

            case ISPIQModuleType::IPEICA:
                pName = "IPEICA";
                break;

            case ISPIQModuleType::IPEDS410:
                pName = "IPEDS410";
                break;

            case ISPIQModuleType::IPEDS411:
                pName = "IPEDS411";
                break;

            case ISPIQModuleType::IPERaster22:
                pName = "IPERaster22";
                break;

            case ISPIQModuleType::IPERasterPD:
                pName = "IPERasterPD";
                break;

            case ISPIQModuleType::IPEANR:
                pName = "IPEANR";
                break;

            case ISPIQModuleType::IPETF:
                pName = "IPETF";
                break;

            case ISPIQModuleType::IPECAC:
                pName = "IPECAC";
                break;

            case ISPIQModuleType::IPECrop:
                pName = "IPECrop";
                break;

            case ISPIQModuleType::IPEChromaUpsample:
                pName = "IPEChromaUpsample";
                break;

            case ISPIQModuleType::IPECST:
                pName = "IPECST";
                break;

            case ISPIQModuleType::IPELTM:
                pName = "IPELTM";
                break;

            case ISPIQModuleType::IPEColorCorrection:
                pName = "IPEColorCorrection";
                break;

            case ISPIQModuleType::IPEGamma:
                pName = "IPEGamma";
                break;

                case ISPIQModuleType::IPENPSGamma:
                pName = "IPENPSGamma";
                break;

            case ISPIQModuleType::IPE2DLUT:
                pName = "IPE2DLUT";
                break;

            case ISPIQModuleType::IPEChromaEnhancement:
                pName = "IPEChromaEnhancement";
                break;

            case ISPIQModuleType::IPEChromaSuppression:
                pName = "IPEChromaSuppression";
                break;

            case ISPIQModuleType::IPESCE:
                pName = "IPESCE";
                break;

            case ISPIQModuleType::IPEASF:
                pName = "IPEASF";
                break;

            case ISPIQModuleType::IPEUpscaler:
                pName = "IPEUpscaler";
                break;

            case ISPIQModuleType::IPEGrainAdder:
                pName = "IPEGrainAdder";
                break;

            case ISPIQModuleType::IPEDownScaler:
                pName = "IPEDownScaler";
                break;

            case ISPIQModuleType::IPEFOVCrop:
                pName = "IPEFOVCrop";
                break;

            case ISPIQModuleType::IPEClamp:
                pName = "IPEClamp";
                break;

            case ISPIQModuleType::IPEHNR:
                pName = "IPEHNR";
                break;

            case ISPIQModuleType::IPELENR:
                pName = "IPELENR";
                break;

            case ISPIQModuleType::IPEDSX:
                pName = "IPEDSX";
                break;

            case ISPIQModuleType::IPEMFHDRMAC:
                pName = "IPEMFHDRMAC";
                break;

            case ISPIQModuleType::IPESTMP:
                pName = "IPESTMP";
                break;

            case ISPIQModuleType::IPECMUS:
                pName = "IPECMUS";
                break;

            case ISPIQModuleType::SWAIControl:
                pName = "SWAIControl";
                break;

            case ISPIQModuleType::SWPPM:
                pName = "SWPPM";
                break;

            case ISPIQModuleType::IPERGBCOMPAND:
                pName = "IPERGBCOMPAND";
                break;

            case ISPIQModuleType::IPERGBDECOMPAND:
                pName = "IPERGBDECOMPAND";
                break;

            case ISPIQModuleType::IPEPreMFHDRCST0:
                pName = "IPEPreMFHDRCST0";
                break;

            case ISPIQModuleType::IPEPreMFHDRCST1:
                pName = "IPEPreMFHDRCST1";
                break;

            case ISPIQModuleType::IPEPreMFHDRCST2:
                pName = "IPEPreMFHDRCST2";
                break;

            case ISPIQModuleType::IPEPostMFHDRCST:
                pName = "IPEPostMFHDRCST";
                break;

            case ISPIQModuleType::IPEPreMFHDRGamma0:
                pName = "IPEPreMFHDRGamma0";
                break;

            case ISPIQModuleType::IPEPreMFHDRGamma1:
                pName = "IPEPreMFHDRGamma1";
                break;

            case ISPIQModuleType::IPEPreMFHDRGamma2:
                pName = "IPEPreMFHDRGamma2";
                break;

            case ISPIQModuleType::IPEPostMFHDRGamma:
                pName = "IPEPostMFHDRGamma";
                break;

            case ISPIQModuleType::IPEMFHDRGTM:
                pName = "IPEMFHDRGTM";
                break;

            case ISPIQModuleType::IPEMFHDRLTM:
                pName = "IPEMFHDRLTM";
                break;

            case ISPIQModuleType::IPEUVGamma:
                pName = "IPEUVGamma";
                break;

            case ISPIQModuleType::IPEBLUR:
                pName = "IPEBLUR";
                break;

            case ISPIQModuleType::IPESBLUR:
                pName = "IPESBLUR";
                break;

            case ISPIQModuleType::IPEVSE:
                pName = "IPEVSE";
                break;

            case ISPIQModuleType::IPEJBUBLUR:
                pName = "IPEJBUBLUR";
                break;

            case ISPIQModuleType::IPEJBUVSE:
                pName = "IPEJBUVSE";
                break;

            case ISPIQModuleType::IPEWB:
                pName = "IPEWB";
                break;

            case ISPIQModuleType::BPSPedestalCorrection:
                pName = "BPSPedestalCorrection";
                break;

            case ISPIQModuleType::BPSLinearization:
                pName = "BPSLinearization";
                break;

            case ISPIQModuleType::BPSBPCPDPC:
                pName = "BPSBPCPDPC";
                break;

            case ISPIQModuleType::BPSDemux:
                pName = "BPSDemux";
                break;

            case ISPIQModuleType::BPSHDR:
                pName = "BPSHDR";
                break;

            case ISPIQModuleType::BPSABF:
                pName = "BPSABF";
                break;

            case ISPIQModuleType::BPSLSC:
                pName = "BPSLSC";
                break;

            case ISPIQModuleType::BPSGIC:
                pName = "BPSGIC";
                break;

            case ISPIQModuleType::BPSDemosaic:
                pName = "BPSDemosaic";
                break;

            case ISPIQModuleType::BPSCC:
                pName = "BPSCC";
                break;

            case ISPIQModuleType::BPSGTM:
                pName = "BPSGTM";
                break;

            case ISPIQModuleType::BPSGamma:
                pName = "BPSGamma";
                break;

            case ISPIQModuleType::BPSCST:
                pName = "BPSCST";
                break;

            case ISPIQModuleType::BPSChromaSubSample:
                pName = "BPSChromaSubSample";
                break;

            case ISPIQModuleType::BPSHNR:
                pName = "BPSHNR";
                break;

            case ISPIQModuleType::BPSWB:
                pName = "BPSWB";
                break;

            case ISPIQModuleType::BPSAWBBG:
                pName = "BPSAWBBG";
                break;

            case ISPIQModuleType::BPSHDRBHist:
                pName = "BPSHDRBHist";
                break;

            case ISPIQModuleType::SWNRM:
                pName = "SWNRM";
                break;

            case ISPIQModuleType::SWPREF:
                pName = "SWPREF";
                break;

            case ISPIQModuleType::SWTMC:
                pName = "SWTMC";
                break;

            case ISPIQModuleType::SWVSR:
                pName = "SWVSR";
                break;

            case ISPIQModuleType::SWMF:
                pName = "SWMF";
                break;

            case ISPIQModuleType::BPSCHANNELGAIN:
                pName = "BPSCHANNELGAIN";
                break;

            case ISPIQModuleType::BPSBAYERGTM:
                pName = "BPSBAYERGTM";
                break;

            case ISPIQModuleType::BPSBAYERLTM:
                pName = "BPSBAYERLTM";
                break;

            case ISPIQModuleType::BPSLCAC:
                pName = "BPSLCAC";
                break;

            case ISPIQModuleType::BPSBC:
                pName = "BPSBC";
                break;

            case ISPIQModuleType::BPSDECOMPAND:
                pName = "BPSDECOMPAND";
                break;

            case ISPIQModuleType::BPSBLS:
                pName = "BPSBLS";
                break;

            case ISPIQModuleType::BPSUVGamma:
                pName = "BPSUVGamma";
                break;

            case ISPIQModuleType::TFECAMIF:
                pName = "TFECAMIF";
                break;

            case ISPIQModuleType::TFECAMIFLITERDI0:
                pName = "TFECAMIFLITERDI0";
                break;

            case ISPIQModuleType::TFECAMIFLITERDI1:
                pName = "TFECAMIFLITERDI1";
                break;

            case ISPIQModuleType::TFECAMIFLITERDI2:
                pName = "TFECAMIFLITERDI2";
                break;

            case ISPIQModuleType::TFECAMIFPPP:
                pName = "TFECAMIFPPP";
                break;

            case ISPIQModuleType::TFEChannelGains:
                pName = "TFEChannelGains";
                break;

            case ISPIQModuleType::TFELRO:
                pName = "TFELRO";
                break;

            case ISPIQModuleType::TFEPreCrop:
                pName = "TFEPreCrop";
                break;

            case ISPIQModuleType::TFEWBBDSDPC:
                pName = "TFEWBBDSDPC";
                break;

            case ISPIQModuleType::TFECropRoundClamp:
                pName = "TFECropRoundClamp";
                break;

            case ISPIQModuleType::TFEPDPC:
                pName = "TFEPDPC";
                break;

            case ISPIQModuleType::TFEWBBDS:
                pName = "TFEWBBDS";
                break;

            case ISPIQModuleType::TFEABF:
                pName = "TFEABF";
                break;

            case ISPIQModuleType::TFEBLS:
                pName = "TFEBLS";
                break;

            case ISPIQModuleType::TFEBGLUT:
                pName = "TFEBGLUT";
                break;

            case ISPIQModuleType::TFEBDS4:
                pName = "TFEBDS4";
                break;

            case ISPIQModuleType::TFECST:
                pName = "TFECST";
                break;

            case ISPIQModuleType::TFEAICST:
                pName = "TFEAICST";
                break;

            case ISPIQModuleType::TFEChromaDS:
                pName = "TFEChromaDS";
                break;

            case ISPIQModuleType::TFEMNDS:
                pName = "TFEMNDS";
                break;

            case ISPIQModuleType::TFEDS16:
                pName = "TFEDS16";
                break;

            case ISPIQModuleType::TFEWB:
                pName = "TFEWB";
                break;

            case ISPIQModuleType::TFEBDS2:
                pName = "TFEBDS2";
                break;

            case ISPIQModuleType::TFEGTM:
                pName = "TFEGTM";
                break;

            case ISPIQModuleType::TFECrop:
                pName = "TFECrop";
                break;

            case ISPIQModuleType::TFER2PD:
                pName = "TFER2PD";
                break;

            case ISPIQModuleType::OPEWB:
                pName = "OPEWB";
                break;

            case ISPIQModuleType::OPEBPCABF:
                pName = "OPEBPCABF";
                break;

            case ISPIQModuleType::OPEBLS:
                pName = "OPEBLS";
                break;

            case ISPIQModuleType::OPEDemosaic:
                pName = "OPEDemosaic";
                break;

            case ISPIQModuleType::OPEDemux:
                pName = "OPEDemux";
                break;

            case ISPIQModuleType::OPEChromaUp:
                pName = "OPEChromaUp";
                break;

            case ISPIQModuleType::OPECST:
                pName = "OPECST";
                break;

            case ISPIQModuleType::OPECC:
                pName = "OPECC";
                break;

            case ISPIQModuleType::OPEGTM:
                pName = "OPEGTM";
                break;

            case ISPIQModuleType::OPELTM:
                pName = "OPELTM";
                break;

            case ISPIQModuleType::OPEGamma:
                pName = "OPEGamma";
                break;

            case ISPIQModuleType::OPEChromaEnhancement:
                pName = "OPEChromaEnhancement";
                break;

            case ISPIQModuleType::OPECSMCE:
                pName = "OPECSMCE";
                break;

            case ISPIQModuleType::OPESCE:
                pName = "OPESCE";
                break;

            case ISPIQModuleType::OPEChromaDS:
                pName = "OPEChromaDS";
                break;

            case ISPIQModuleType::OPEWNR:
                pName = "OPEWNR";
                break;

            case ISPIQModuleType::OPEASF:
                pName = "OPEASF";
                break;

            case ISPIQModuleType::OPEUpscaler:
                pName = "OPEUpscaler";
                break;

            case ISPIQModuleType::OPEMNDS:
                pName = "OPEMNDS";
                break;

            case ISPIQModuleType::OPECRC:
                pName = "OPECRC";
                break;

            case ISPIQModuleType::IFELITEBLS:
                pName = "IFELITEBLS";
                break;

            case ISPIQModuleType::IFELITEGamma:
                pName = "IFELITEGamma";
                break;

            case ISPIQModuleType::CVPDEPTH101:
                pName = "CVPDEPTH101";
                break;

            case ISPIQModuleType::CVPDMM:
                pName = "CVPDMM";
                break;

            case ISPIQModuleType::CVPDMM11:
                pName = "CVPDMM11";
                break;

            case ISPIQModuleType::CVPDMM12:
                pName = "CVPDMM12";
                break;

            case ISPIQModuleType::CVPDFSSGM121:
                pName = "CVPDFSSGM121";
                break;

            case ISPIQModuleType::CVPDPP111:
                pName = "CVPDPP111";
                break;

            case ISPIQModuleType::CVPSGM:
                pName = "CVPSGM";
                break;

            case ISPIQModuleType::CVPSGM11:
                pName = "CVPSGM11";
                break;

            case ISPIQModuleType::CVPGCE:
                pName = "CVPGCE";
                break;

            case ISPIQModuleType::CVPGCE11:
                pName = "CVPGCE11";
                break;

            case ISPIQModuleType::CVPGCE12:
                pName = "CVPGCE12";
                break;

            case ISPIQModuleType::CVPDME:
                pName = "CVPDME";
                break;

            case ISPIQModuleType::CVPDME31:
                pName = "CVPDME31";
                break;

            case ISPIQModuleType::IPEGIC:
                pName = "IPEGIC";
                break;

            case ISPIQModuleType::IPEBPCABF:
                pName = "IPEBPCABF";
                break;

            case ISPIQModuleType::IPEBLS:
                pName = "IPEBLS";
                break;

            case ISPIQModuleType::IPEDemosaic:
                pName = "IPEDemosaic";
                break;

            case ISPIQModuleType::IPEBayerColorCorrection:
                pName = "IPEBayerColorCorrection";
                break;

            case ISPIQModuleType::IPEBayerGamma:
                pName = "IPEBayerGamma";
                break;

            case ISPIQModuleType::IPEBayerCST:
                pName = "IPEBayerCST";
                break;

            case ISPIQModuleType::IPEChromaDS:
                pName = "IPEChromaDS";
                break;

            case ISPIQModuleType::IPEPreLTMGamma:
                pName = "IPEPreLTMGamma";
                break;

            case ISPIQModuleType::IPEGTM:
                pName = "IPEGTM";
                break;

            case ISPIQModuleType::IPECSMCE:
                pName = "IPECSMCE";
                break;

            case ISPIQModuleType::IPEHDRGIC:
                pName = "IPEHDRGIC";
                break;

            case ISPIQModuleType::IPEHDRBPCABF:
                pName = "IPEHDRBPCABF";
                break;

            case ISPIQModuleType::IPEBayerHDRC:
                pName = "IPEBayerHDRC";
                break;

            case ISPIQModuleType::IPEBayerGTM:
                pName = "IPEBayerGTM";
                break;

            case ISPIQModuleType::IPEBayerLTM:
                pName = "IPEBayerLTM";
                break;

            case ISPIQModuleType::SWIQTHRESHOLD:
                pName = "SWIQTHRESHOLD";
                break;

            default:
                pName = "Not recognized";
                break;
        }
        return pName;
    };

	////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// IsSkipCalc
    ///
    /// @brief  Cheking if IQ calculate is skipped base on calcFrequency
    ///
    /// @param  configTimes		  IQ config times
    /// @param  frameNum			  frame index
    ///
    /// @return BOOL	  TRUE: isSkiped is enable, FALSE: Otherwise
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE_FORCE BOOL IsSkipCalc(
      const IQConfigTimes configTimes,
      const UINT32 frameNum)
    {
        BOOL isSkiped = FALSE;

        switch (configTimes)
        {
           case ConfigOnce:
             isSkiped = (1 == frameNum) ? FALSE : TRUE;
             break;
           case ConfigPerFrame:
             isSkiped = FALSE;
             break;
           case ConfigAlternateFrame:
             isSkiped = (1 == frameNum % configTimes) ? FALSE : TRUE;
             break;
           default:
             break;
        }

        CAMX_LOG_VERBOSE(CamxLogGroupIQMod, "configTimes %d, frameNum %d, isSkiped %d",
             configTimes, frameNum, isSkiped);

        return isSkiped;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// IsDumpRegConfig
    ///
    /// @brief  Cheking if IQ dump register configure is enable
    ///
    /// @param  dumpRegConfigMask       dump mask
    /// @param  offsetOfIQModuleIndex   index begin of IQ modules
    ///
    /// @return BOOL    TRUE: Dump is enable, FALSE: Otherwise
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE BOOL IsDumpRegConfig(
        UINT64 dumpRegConfigMask,
        UINT32 offsetOfIQModuleIndex) const
    {
        return (0 != (dumpRegConfigMask & (1ULL << (static_cast<UINT32>(m_type) - offsetOfIQModuleIndex))));
    }


    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetModuleData
    ///
    /// @brief  Get IQ module specific data
    ///
    /// @param  pModuleData    Pointer pointing to Module specific data
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CAMX_INLINE VOID GetModuleData(
        VOID* pModuleData)
    {
        CAMX_UNREFERENCED_PARAM(pModuleData);
        return;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetIQModulePath
    ///
    /// @brief  Get IQ module specific path
    ///
    /// @return Module path
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual UINT16 GetIQModulePath()
    {
        return 0;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// Destroy
    ///
    /// @brief  Destroy the object
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE VOID Destroy()
    {
        CAMX_DELETE this;
    };

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// IsTuningModeDataChanged
    ///
    /// @brief  Determine if there is/are change(s) between the current and previously sets fo tuning mode/selector data
    ///
    /// @param  pCurrTuningModeParams   Pointer to current  tuning mode data
    /// @param  pPrevTuningModeParams   Pointer to previous tuning mode data
    ///
    /// @return BOOL    TRUE: Changed, FALSE: Otherwise
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static CAMX_INLINE BOOL IsTuningModeDataChanged(
        const ChiTuningModeParameter* pCurrTuningModeParams,
        const ChiTuningModeParameter* pPrevTuningModeParams)
    {
        CAMX_STATIC_ASSERT_MESSAGE((static_cast<UINT32>(ChiModeType::Effect) == (MaxTuningMode - 1)),
            "Tuning Mode Structured Changed");

        BOOL tuningModeChanged = FALSE;

        if (NULL != pCurrTuningModeParams)
        {
            if (NULL != pPrevTuningModeParams)
            {
                tuningModeChanged = (0 != Utils::Memcmp(pCurrTuningModeParams,
                                                        pPrevTuningModeParams,
                                                        sizeof(ChiTuningModeParameter)));
            }
            // Always treat the initial mode as changed
            else
            {
                tuningModeChanged = TRUE;
            }
        }
        else
        {
            CAMX_LOG_ERROR(CamxLogGroupISP, "Invalid pointer to current tuning mode parameters (%p)", pCurrTuningModeParams);
        }

        return tuningModeChanged;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// DumpTuningModeData
    ///
    /// @brief  Dump tuning data
    ///
    /// @param  pTuningData         Pointer to tuning mode data
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static CAMX_INLINE VOID DumpTuningModeData(
        const ChiTuningModeParameter* pTuningData)
    {
        if (NULL != pTuningData)
        {
            CAMX_LOG_VERBOSE(CamxLogGroupISP,
                             "Default %d, Sensor %d, Usecase %d, Feature1 %d, Feature2 %d, Scene %d, Effect %d",
                             pTuningData->TuningMode[0].subMode.value,
                             pTuningData->TuningMode[1].subMode.value,
                             pTuningData->TuningMode[2].subMode.usecase,
                             pTuningData->TuningMode[3].subMode.feature1,
                             pTuningData->TuningMode[4].subMode.feature2,
                             pTuningData->TuningMode[5].subMode.scene,
                             pTuningData->TuningMode[6].subMode.effect);
        }
    };

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetSWMF30Data
    ///
    /// @brief  get SWMF specific parsed data from sw chromatix.
    ///
    /// @param  pInputData Pointer to the ISP Input Data.
    /// @param  pMFoutData Pointer to the MF30 parsed output.
    /// @param  pMF30Input Pointer to the SWMFNR30InputData.
    ///
    /// @return return  BOOL
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static BOOL GetSWMF30Data(
        ISPInputData*                        pInputData,
        SWMFNR30OutputData*                  pMFoutData,
        SWMFNR30InputData*                   pMF30Input);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// TranslateFormatToISPImageFormat
    ///
    /// @brief  Utility to Translate Camx formats to IFE formats
    ///
    /// @param  format              Camx Format
    /// @param  CSIDecodeBitWidth   CSID decode Bit witdth value
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static UINT32 TranslateFormatToISPImageFormat(
        CamX::Format format,
        UINT8        CSIDecodeBitWidth);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// TranslateBitDepthToCSIDecodeFormat
    ///
    /// @brief  Helper method to map plain bit width to CSI decode format information for ISP.
    ///
    /// @param  bitWidth    the MIPI bit width
    ///
    /// @return CSID decode format
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static UINT8 TranslateBitDepthToCSIDecodeFormat(
        const UINT32 bitWidth);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetAIDenoiser10Data
    ///
    /// @brief  get AIDE specific parsed data from sw chromatix.
    ///
    /// @param  pInputData   Pointer to the ISP Input Data.
    /// @param  pAIDEoutData Pointer to the AIDE10 parsed output.
    /// @param  pAIDE10Input Pointer to the AIDE10InputData.
    ///
    /// @return return  BOOL
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static BOOL GetAIDenoiser10Data(
        ISPInputData*                        pInputData,
        AIDENOISER10OutputData*              pAIDEoutData,
        AIDENOISER10InputData*               pAIDE10Input);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetPixelFormat
    ///
    /// @brief  Convert Camx sensor pixel format based on common lib definition
    ///
    /// @param  pPixelFormat  Point to the Camx Pixel Format
    /// @param  pBayerPattern Point to the Bayer Pattern of the Sensor Input
    ///
    /// @return CamxResult
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static CamxResult GetPixelFormat(
        const PixelFormat*  pPixelFormat,
        UINT8*              pBayerPattern);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// LRMECalculateSetting
    ///
    /// @brief  Trigger LRME Calculation
    ///
    /// @param  pInput  Pointer to LRME input data
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static CamxResult LRMECalculateSetting(
           LRMEInputData* pInput);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// IsOPELTMSecondPass
    ///
    /// @brief  Check if OPE LTM Module Pass is second Pass
    ///
    /// @param  pIQModule Pointer to IQ module
    ///
    /// @return True or False
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static BOOL IsOPELTMSecondPass(
        ISPIQModule* pIQModule);


    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// DumpTuningModeForModule
    ///
    /// @brief  Dump Tuning info for debug
    ///
    /// @param  pNodeIdentifier Pointer to the node identifier
    /// @param  pChromatix      Pointer to the chromatix data
    /// @param  m_moduleEnable  module enable flag
    /// @param  dumpAlways      dump status for tuning mode data
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE VOID DumpTuningModeForModule(
        const CHAR* pNodeIdentifier,
        ParameterModule* pChromatix,
        BOOL  m_moduleEnable,
        BOOL  dumpAlways = FALSE)
    {
        if (NULL != pChromatix)
        {
            if (FALSE == dumpAlways)
            {
                CAMX_LOG_VERBOSE(CamxLogGroupIQMod, "%s, enable flag change from %d, mode %d submode %d",
                    pNodeIdentifier,
                    m_moduleEnable,
                    pChromatix->Mode.Mode.Mode,
                    pChromatix->Mode.Mode.SubMode);
            }
            else
            {
                CAMX_LOG_ERROR(CamxLogGroupIQMod, "%s, enable flag change from %d, mode %d submode %d",
                    pNodeIdentifier,
                    m_moduleEnable,
                    pChromatix->Mode.Mode.Mode,
                    pChromatix->Mode.Mode.SubMode);
            }
        }
        else
        {
            CAMX_LOG_ERROR(CamxLogGroupIQMod, "%s, Invalid chromatix", pNodeIdentifier);
        }
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// SetupTrigger
    ///
    /// @brief  Setup Trigger 2.0 Index Table
    ///
    /// @param  pChromatix      Pointer to the trigger types from chromatix data
    /// @param  rTriggerIndex   Trigger index vector
    /// @param  rMaxNonLeafNode Reference value to the memory that common library required
    ///
    /// @return CamxResult      CamxResultSuccess if setup trigger successfully; otherwise failed
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    template <class T>
    CamxResult SetupTrigger(
        T*                  pChromatix,
        std::vector<INT>&   rTriggerIndex,
        UINT32&             rMaxNonLeafNode)
    {
        CamxResult  result = CamxResultSuccess;

        ispglobalelements::trigger_types* pControlVariables =
            static_cast<ispglobalelements::trigger_types*>(pChromatix->control_variables.control_var_type);

        rTriggerIndex.clear();

        for (UINT32 i = 0; i < pChromatix->control_variables.control_var_typeCount; i++)
        {
            rTriggerIndex.push_back(static_cast<INT32>(*pControlVariables));
            pControlVariables++;
        }

        result = IQSettingUtils::UpdateTreeParams(rMaxNonLeafNode, rTriggerIndex);

        return result;
    }


    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetTriggerRegionData
    ///
    /// @brief  Get pointer of trigger 2.0 region data
    ///
    /// @param  pTriggerType            Pointer to the trigger types from chromatix data
    /// @param  controlVarTypeCount     Counts of trigger type
    ///
    /// @return T2*                     Pointer to region data
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // NOWHINE CP007 : Shared file with system team so uses non-CamX file naming
    template <class T>
    static __inline T* GetTriggerRegion(
        T*              pTriggerType,
        UINT32          controlVarTypeCount)
    {
        for (UINT32 count = 0; count < controlVarTypeCount - 1; count++)
        {
            pTriggerType = pTriggerType->trigger;
        }

        return pTriggerType;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetTriggerRegionData
    ///
    /// @brief  Get pointer of trigger 2.0 region data
    ///
    /// @param  pTriggerType            Pointer to the trigger types from chromatix data
    /// @param  controlVarTypeCount     Counts of trigger type
    ///
    /// @return T2*                     Pointer to region data
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    template <class T>
    static T* GetTriggerRegionData(
        T*              pTriggerType,
        UINT32          controlVarTypeCount)
    {
        for (UINT32 count = 0; count < controlVarTypeCount - 1; count++)
        {
            pTriggerType = pTriggerType->trigger;
        }

        return pTriggerType;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// FillIQModuleDMIDumps
    ///
    /// @brief  Fill DMI reg dump info
    ///
    /// @param rDMIRegDumpVector    Reference to a vector to fill in the DMI dumps
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    VOID FillIQModuleDMIDumps(
        std::vector<ISPRegDumpInfo>& rDMIRegDumpVector)
    {
        if (NULL != m_pHWSetting)
        {
            m_pHWSetting->FillHWSettingDMIDumps(rDMIRegDumpVector);
        }
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// DumpInputTrigger
    ///
    /// @brief  Dump Input Trigger Data
    ///
    /// @param  pInputData             Pointer to the Input Data
    /// @param  identifierString       Pointer to identifierString
    /// @param  dumpInputTriggerIQType Indicates which IQType to dump
    /// @param  dumpInputTriggerMask   Indicates which Trigger Value to dump
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    VOID DumpInputTrigger(
        ISPInputData*  pInputData,
        const CHAR*    identifierString,
        UINT64         dumpInputTriggerIQType,
        UINT64         dumpInputTriggerMask)
    {
        CHAR                   identifier[128];

        const ISPIQModuleType* IQModuleTypes             = NULL;
        UINT                   sizeOfIQModuleTypes       = 0;
        BOOL                   enableDump                = FALSE;

        const UINT32           customTriggerTypes        = 4;
        const UINT32           numOfCustomTrigger        =
            (static_cast<UINT32>(EnumTrigger::MaxEnumTrigger) - static_cast<UINT32>(EnumTrigger::custom_aec1))
            / customTriggerTypes;
        const UINT64           allIQTypes                = 0xFFFFF;
        UINT32                 maxIQModuleDumpTypes      = static_cast<UINT32>(IQModuleDumpType::MaxIQModuleDumpTypes);

        CHAR                   output[MaxStringLength];
        CHAR                   temp[MaxStringLength64];

        if (dumpInputTriggerIQType >= allIQTypes)
        {
            enableDump           = TRUE;
            maxIQModuleDumpTypes = 0;
        }

        for (UINT32 type = 0; type < maxIQModuleDumpTypes; type++)
        {
            if (0 != (dumpInputTriggerIQType & (1 << type)))
            {
                switch (type)
                {
                    case static_cast<UINT32>(IQModuleDumpType::IQModuleBLS):
                        IQModuleTypes       = IQModuleBLSTypes;
                        sizeOfIQModuleTypes = CAMX_ARRAY_SIZE(IQModuleBLSTypes);
                        break;
                    case static_cast<UINT32>(IQModuleDumpType::IQModuleDemux):
                        IQModuleTypes       = IQModuleDemuxTypes;
                        sizeOfIQModuleTypes = CAMX_ARRAY_SIZE(IQModuleDemuxTypes);
                        break;
                    case static_cast<UINT32>(IQModuleDumpType::IQModuleBPCABF):
                        IQModuleTypes       = IQModuleBPCABFTypes;
                        sizeOfIQModuleTypes = CAMX_ARRAY_SIZE(IQModuleBPCABFTypes);
                        break;
                    case static_cast<UINT32>(IQModuleDumpType::IQModuleGamma):
                        IQModuleTypes       = IQModuleGammaTypes;
                        sizeOfIQModuleTypes = CAMX_ARRAY_SIZE(IQModuleGammaTypes);
                        break;
                    case static_cast<UINT32>(IQModuleDumpType::IQModuleCST):
                        IQModuleTypes       = IQModuleCSTTypes;
                        sizeOfIQModuleTypes = CAMX_ARRAY_SIZE(IQModuleCSTTypes);
                        break;
                    case static_cast<UINT32>(IQModuleDumpType::IQModuleLSC):
                        IQModuleTypes       = IQModuleLSCType;
                        sizeOfIQModuleTypes = CAMX_ARRAY_SIZE(IQModuleLSCType);
                        break;
                    case static_cast<UINT32>(IQModuleDumpType::IQModuleLTM):
                        IQModuleTypes       = IQModuleLTMTypes;
                        sizeOfIQModuleTypes = CAMX_ARRAY_SIZE(IQModuleLTMTypes);
                        break;
                    case static_cast<UINT32>(IQModuleDumpType::IQModuleGTM):
                        IQModuleTypes       = IQModuleGTMTypes;
                        sizeOfIQModuleTypes = CAMX_ARRAY_SIZE(IQModuleGTMTypes);
                        break;
                    case static_cast<UINT32>(IQModuleDumpType::IQModulePDPC):
                        IQModuleTypes       = IQModulePDPCTypes;
                        sizeOfIQModuleTypes = CAMX_ARRAY_SIZE(IQModulePDPCTypes);
                        break;
                    case static_cast<UINT32>(IQModuleDumpType::IQModuleWB):
                        IQModuleTypes       = IQModuleWBTypes;
                        sizeOfIQModuleTypes = CAMX_ARRAY_SIZE(IQModuleWBTypes);
                        break;
                    case static_cast<UINT32>(IQModuleDumpType::IQModuleFCG):
                        IQModuleTypes       = IQModuleFCGTypes;
                        sizeOfIQModuleTypes = CAMX_ARRAY_SIZE(IQModuleFCGTypes);
                        break;
                    case static_cast<UINT32>(IQModuleDumpType::IQModuleChannelGain):
                        IQModuleTypes       = IQModuleChannelGainTypes;
                        sizeOfIQModuleTypes = CAMX_ARRAY_SIZE(IQModuleChannelGainTypes);
                        break;
                    case static_cast<UINT32>(IQModuleDumpType::IQModuleHNR):
                        IQModuleTypes       = IQModuleHNRTypes;
                        sizeOfIQModuleTypes = CAMX_ARRAY_SIZE(IQModuleHNRTypes);
                        break;
                    case static_cast<UINT32>(IQModuleDumpType::IQModuleASF):
                        IQModuleTypes       = IQModuleASFTypes;
                        sizeOfIQModuleTypes = CAMX_ARRAY_SIZE(IQModuleASFTypes);
                        break;
                    case static_cast<UINT32>(IQModuleDumpType::IQModuleANR):
                        IQModuleTypes       = IQModuleANRTypes;
                        sizeOfIQModuleTypes = CAMX_ARRAY_SIZE(IQModuleANRTypes);
                        break;
                    case static_cast<UINT32>(IQModuleDumpType::IQModuleLENR):
                        IQModuleTypes       = IQModuleLENRTypes;
                        sizeOfIQModuleTypes = CAMX_ARRAY_SIZE(IQModuleLENRTypes);
                        break;
                    case static_cast<UINT32>(IQModuleDumpType::IQModuleTF):
                        IQModuleTypes       = IQModuleTFTypes;
                        sizeOfIQModuleTypes = CAMX_ARRAY_SIZE(IQModuleTFTypes);
                        break;
                    case static_cast<UINT32>(IQModuleDumpType::IQModuleTMC):
                        IQModuleTypes       = IQModuleTMCTypes;
                        sizeOfIQModuleTypes = CAMX_ARRAY_SIZE(IQModuleTMCTypes);
                        break;
                    case static_cast<UINT32>(IQModuleDumpType::IQModuleCC):
                        IQModuleTypes       = IQModuleCCTypes;
                        sizeOfIQModuleTypes = CAMX_ARRAY_SIZE(IQModuleCCTypes);
                        break;
                    default:
                        IQModuleTypes     = NULL;
                        sizeOfIQModuleTypes = 0;
                }

                for (UINT32 index = 0; index < sizeOfIQModuleTypes; index++)
                {
                    if (GetIQType() == IQModuleTypes[index])
                    {
                        enableDump = TRUE;
                        break;
                    }
                }
            }

            if (TRUE == enableDump)
            {
                break;
            }
        }

        if (TRUE == enableDump)
        {
            OsUtils::SNPrintF(identifier, sizeof(identifier), "%s, IQName %s(%d), ReqId %" PRIu64 " :",
                          identifierString, GetIQName(), GetIQType(), pInputData->frameNum);

            if (0 != (dumpInputTriggerMask & (static_cast<UINT64>(1) << static_cast<UINT32>(EnumTrigger::lux_idx))))
            {
                CAMX_LOG_INFO(CamxLogGroupIQMod, "%s lux_idx = %f", identifier,
                           pInputData->InputTrigger[static_cast<UINT32>(EnumTrigger::lux_idx)]);
            }
            if (0 != (dumpInputTriggerMask & (static_cast<UINT64>(1) << static_cast<UINT32>(EnumTrigger::gain))))
            {
                CAMX_LOG_INFO(CamxLogGroupIQMod, "%s gain = %f", identifier,
                           pInputData->InputTrigger[static_cast<UINT32>(EnumTrigger::gain)]);
            }
            if (0 != (dumpInputTriggerMask & (static_cast<UINT64>(1) << static_cast<UINT32>(EnumTrigger::drc_gain))))
            {
                CAMX_LOG_INFO(CamxLogGroupIQMod, "%s drc_gain = %f", identifier,
                           pInputData->InputTrigger[static_cast<UINT32>(EnumTrigger::drc_gain)]);
            }
            if (0 != (dumpInputTriggerMask & (static_cast<UINT64>(1) << static_cast<UINT32>(EnumTrigger::exp_time_ratio))))
            {
                CAMX_LOG_INFO(CamxLogGroupIQMod, "%s exp_time_ratio = %f", identifier,
                           pInputData->InputTrigger[static_cast<UINT32>(EnumTrigger::exp_time_ratio)]);
            }
            if (0 != (dumpInputTriggerMask & (static_cast<UINT64>(1) << static_cast<UINT32>(EnumTrigger::exp_gain_ratio))))
            {
                CAMX_LOG_INFO(CamxLogGroupIQMod, "%s exp_gain_ratio = %f", identifier,
                           pInputData->InputTrigger[static_cast<UINT32>(EnumTrigger::exp_gain_ratio)]);
            }
            if (0 != (dumpInputTriggerMask &
                     (static_cast<UINT64>(1) << static_cast<UINT32>(EnumTrigger::aec_exp_sensitivity_ratio))))
            {
                CAMX_LOG_INFO(CamxLogGroupIQMod, "%s aec_exp_sensitivity_ratio = %f",
                           identifier, pInputData->InputTrigger[static_cast<UINT32>(EnumTrigger::aec_exp_sensitivity_ratio)]);
            }
            if (0 != (dumpInputTriggerMask & (static_cast<UINT64>(1) << static_cast<UINT32>(EnumTrigger::cct))))
            {
                CAMX_LOG_INFO(CamxLogGroupIQMod, "%s cct = %f", identifier,
                           pInputData->InputTrigger[static_cast<UINT32>(EnumTrigger::cct)]);
            }
            if (0 != (dumpInputTriggerMask & (static_cast<UINT64>(1) << static_cast<UINT32>(EnumTrigger::hdr_mode))))
            {
                CAMX_LOG_INFO(CamxLogGroupIQMod, "%s hdr_mode = %f", identifier,
                           pInputData->InputTrigger[static_cast<UINT32>(EnumTrigger::hdr_mode)]);
            }
            if (0 != (dumpInputTriggerMask & (static_cast<UINT64>(1) << static_cast<UINT32>(EnumTrigger::lens_position))))
            {
                CAMX_LOG_INFO(CamxLogGroupIQMod, "%s lens_position = %f", identifier,
                           pInputData->InputTrigger[static_cast<UINT32>(EnumTrigger::lens_position)]);
            }
            if (0 != (dumpInputTriggerMask & (static_cast<UINT64>(1) << static_cast<UINT32>(EnumTrigger::lens_zoom))))
            {
                CAMX_LOG_INFO(CamxLogGroupIQMod, "%s lens_zoom = %f", identifier,
                           pInputData->InputTrigger[static_cast<UINT32>(EnumTrigger::lens_zoom)]);
            }
            if (0 != (dumpInputTriggerMask & (static_cast<UINT64>(1) << static_cast<UINT32>(EnumTrigger::led_sensitivity))))
            {
                CAMX_LOG_INFO(CamxLogGroupIQMod, "%s led_sensitivity = %f", identifier,
                           pInputData->InputTrigger[static_cast<UINT32>(EnumTrigger::led_sensitivity)]);
            }
            if (0 != (dumpInputTriggerMask & (static_cast<UINT64>(1) << static_cast<UINT32>(EnumTrigger::ife_scale_ratio))))
            {
                CAMX_LOG_INFO(CamxLogGroupIQMod, "%s ife_scale_ratio = %f", identifier,
                           pInputData->InputTrigger[static_cast<UINT32>(EnumTrigger::ife_scale_ratio)]);
            }
            if (0 != (dumpInputTriggerMask & (static_cast<UINT64>(1) << static_cast<UINT32>(EnumTrigger::effective_gain))))
            {
                CAMX_LOG_INFO(CamxLogGroupIQMod, "%s effective_gain = %f", identifier,
                           pInputData->InputTrigger[static_cast<UINT32>(EnumTrigger::effective_gain)]);
            }
            if (0 != (dumpInputTriggerMask &
                     (static_cast<UINT64>(1) << static_cast<UINT32>(EnumTrigger::pre_nr_scale_ratio))))
            {
                CAMX_LOG_INFO(CamxLogGroupIQMod, "%s pre_nr_scale_ratio = %f", identifier,
                           pInputData->InputTrigger[static_cast<UINT32>(EnumTrigger::pre_nr_scale_ratio)]);
            }
            if (0 != (dumpInputTriggerMask &
                     (static_cast<UINT64>(1) << static_cast<UINT32>(EnumTrigger::post_nr_scale_ratio))))
            {
                CAMX_LOG_INFO(CamxLogGroupIQMod, "%s post_nr_scale_ratio = %f", identifier,
                           pInputData->InputTrigger[static_cast<UINT32>(EnumTrigger::post_nr_scale_ratio)]);
            }
            if (0 != (dumpInputTriggerMask & (static_cast<UINT64>(1) << static_cast<UINT32>(EnumTrigger::sr_scale_ratio))))
            {
                CAMX_LOG_INFO(CamxLogGroupIQMod, "%s sr_scale_ratio = %f", identifier,
                           pInputData->InputTrigger[static_cast<UINT32>(EnumTrigger::sr_scale_ratio)]);
            }
            if (0 != (dumpInputTriggerMask &
                     (static_cast<UINT64>(1) << static_cast<UINT32>(EnumTrigger::total_scale_ratio))))
            {
                CAMX_LOG_INFO(CamxLogGroupIQMod, "%s total_scale_ratio = %f", identifier,
                           pInputData->InputTrigger[static_cast<UINT32>(EnumTrigger::total_scale_ratio)]);
            }
            if (0 != (dumpInputTriggerMask &
                     (static_cast<UINT64>(1) << static_cast<UINT32>(EnumTrigger::t2t3_aec_exp_sensitivity_ratio))))
            {
                CAMX_LOG_INFO(CamxLogGroupIQMod, "%s t2t3_aec_exp_sensitivity_ratio = %f", identifier,
                           pInputData->InputTrigger[static_cast<UINT32>(EnumTrigger::t2t3_aec_exp_sensitivity_ratio)]);
            }
            if (0 != (dumpInputTriggerMask &
                     (static_cast<UINT64>(1) << static_cast<UINT32>(EnumTrigger::t1t2_aec_exp_sensitivity_ratio))))
            {
                CAMX_LOG_INFO(CamxLogGroupIQMod, "%s t1t2_aec_exp_sensitivity_ratio = %f", identifier,
                           pInputData->InputTrigger[static_cast<UINT32>(EnumTrigger::t1t2_aec_exp_sensitivity_ratio)]);
            }
            if (0 != (dumpInputTriggerMask & (static_cast<UINT64>(1) << static_cast<UINT32>(EnumTrigger::instance))))
            {
                CAMX_LOG_INFO(CamxLogGroupIQMod, "%s instance = %f", identifier,
                           pInputData->InputTrigger[static_cast<UINT32>(EnumTrigger::instance)]);
            }
            if (0 != (dumpInputTriggerMask & (static_cast<UINT64>(1) << static_cast<UINT32>(EnumTrigger::color_format))))
            {
                CAMX_LOG_INFO(CamxLogGroupIQMod, "%s color_format = %f", identifier,
                           pInputData->InputTrigger[static_cast<UINT32>(EnumTrigger::color_format)]);
            }
            if (0 != (dumpInputTriggerMask & (static_cast<UINT64>(1) << static_cast<UINT32>(EnumTrigger::led_idx))))
            {
                CAMX_LOG_INFO(CamxLogGroupIQMod, "%s led_idx = %f", identifier,
                           pInputData->InputTrigger[static_cast<UINT32>(EnumTrigger::led_idx)]);
            }
            if (0 != (dumpInputTriggerMask & (static_cast<UINT64>(1) << static_cast<UINT32>(EnumTrigger::numberOfLED))))
            {
                CAMX_LOG_INFO(CamxLogGroupIQMod, "%s numberOfLED = %f", identifier,
                           pInputData->InputTrigger[static_cast<UINT32>(EnumTrigger::numberOfLED)]);
            }
            if (0 != (dumpInputTriggerMask &
                     (static_cast<UINT64>(1) << static_cast<UINT32>(EnumTrigger::LEDFirstEntryRatio))))
            {
                CAMX_LOG_INFO(CamxLogGroupIQMod, "%s LEDFirstEntryRatio = %f", identifier,
                           pInputData->InputTrigger[static_cast<UINT32>(EnumTrigger::LEDFirstEntryRatio)]);
            }
            if ((0 != (dumpInputTriggerMask & (static_cast<UINT64>(1) << static_cast<UINT32>(EnumTrigger::custom_aec1)))))
            {
                Utils::Memset(output, 0, sizeof(output));

                // The size of custom aec trigger may increase
                for (UINT32 idx = 0 ; idx < numOfCustomTrigger; idx++)
                {
                    OsUtils::SNPrintF(temp, sizeof(temp), " %f", pInputData->InputTrigger[static_cast<UINT32>(EnumTrigger::custom_aec1) + idx * customTriggerTypes]);
                    OsUtils::StrLCat(output, temp, sizeof(output));
                }
                CAMX_LOG_INFO(CamxLogGroupIQMod, "%s custom_aec =%s", identifier, output);
            }
            if ((0 != (dumpInputTriggerMask & (static_cast<UINT64>(1) << static_cast<UINT32>(EnumTrigger::custom_awb1)))))
            {
                Utils::Memset(output, 0, sizeof(output));

                // The size of custom awb trigger may increase.
                for (UINT32 idx = 0 ; idx < numOfCustomTrigger; idx++)
                {
                    OsUtils::SNPrintF(temp, sizeof(temp), " %f", pInputData->InputTrigger[static_cast<UINT32>(EnumTrigger::custom_awb1) + idx * customTriggerTypes]);
                    OsUtils::StrLCat(output, temp, sizeof(output));
                }
                CAMX_LOG_INFO(CamxLogGroupIQMod, "%s custom_awb =%s", identifier, output);
            }
            if ((0 != (dumpInputTriggerMask & (static_cast<UINT64>(1) << static_cast<UINT32>(EnumTrigger::custom_af1)))))
            {
                Utils::Memset(output, 0, sizeof(output));

                // The size of custom af trigger may increase.
                for (UINT32 idx = 0 ; idx < numOfCustomTrigger; idx++)
                {
                    OsUtils::SNPrintF(temp, sizeof(temp), " %f", pInputData->InputTrigger[static_cast<UINT32>(EnumTrigger::custom_af1) + idx * customTriggerTypes]);
                    OsUtils::StrLCat(output, temp, sizeof(output));
                }
                CAMX_LOG_INFO(CamxLogGroupIQMod, "%s custom_af =%s", identifier, output);
            }
            if ((0 != (dumpInputTriggerMask &
                      (static_cast<UINT64>(1) << static_cast<UINT32>(EnumTrigger::custom_reserved1)))))
            {
                Utils::Memset(output, 0, sizeof(output));

                // The size of custom reserved trigger may increase.
                for (UINT32 idx = 0 ; idx < numOfCustomTrigger; idx++)
                {
                    OsUtils::SNPrintF(temp, sizeof(temp), " %f", pInputData->InputTrigger[static_cast<UINT32>(EnumTrigger::custom_reserved1) + idx * customTriggerTypes]);
                    OsUtils::StrLCat(output, temp, sizeof(output));
                }
                CAMX_LOG_INFO(CamxLogGroupIQMod, "%s custom_reserved =%s", identifier, output);
            }
        }
    }

protected:
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// ConfigureXCFABinROI
    ///
    /// @brief  Configure XCFA Binning ROI pattern  Pixel Interleaved mode.
    ///
    /// @param  pInputData Pointer to the Input Data
    /// @param  pRoiXY     Pointer to binning ROI
    ///
    /// @return CamxResultSuccess if successful
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE CamxResult ConfigureXCFABinROI(
        ISPInputData* pInputData,
        UINT8        (&pRoiXY)[16][2])
    {
        CamxResult result   = CamxResultSuccess;

        if ((NULL != pInputData))
        {
            XCFAType xcfaType = pInputData->SFEData.xcfaType;
            switch (xcfaType)
            {
                case XCFAType::QuadCFA:
                    for (UINT i =0; i < MaxDirectBinArray; i++)
                    {
                        pRoiXY[i][0] = QCFABinLocation[i].xStart;
                        pRoiXY[i][1] = QCFABinLocation[i].yStart;
                    }
                    break;

                case XCFAType::ThreeXThreeCFA:

                    for (UINT i =0; i < MaxDirectBinArray; i++)
                    {
                        pRoiXY[i][0] = ThreeX3CFABinLocation[i].xStart;
                        pRoiXY[i][1] = ThreeX3CFABinLocation[i].yStart;
                    }
                    break;

                case XCFAType::FourXFourCFA:
                    for (UINT i =0; i < MaxDirectBinArray; i++)
                    {
                        pRoiXY[i][0] = FourX4CFABin4Location[i].xStart;
                        pRoiXY[i][1] = FourX4CFABin4Location[i].yStart;
                    }
                    break;

                default:
                    break;
            }
        }
        else
        {
            result = CamxResultEInvalidArg;
        }
        return result;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// ConfigureXCFABinOutputPattern
    ///
    /// @brief  Configure XCFA Binning output pattern  Pixel Interleaved mode.
    ///
    /// @param  pInputData         Pointer to the Input Data
    /// @param  pBinOutputPattern  Pointer to binning output pattern
    ///
    /// @return CamxResultSuccess if successful
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE CamxResult ConfigureXCFABinOutputPattern(
        ISPInputData* pInputData,
        UINT8*        pBinOutputPattern)
    {
        CamxResult result   = CamxResultSuccess;

        if ((NULL != pInputData))
        {
            XCFAType xcfaType = pInputData->SFEData.xcfaType;
            switch (xcfaType)
            {
                case XCFAType::QuadCFA:
                    // Based on HPG we need to set only for 0,1,2 and 3 array.
                    pBinOutputPattern[0] = G;
                    pBinOutputPattern[1] = R;
                    pBinOutputPattern[2] = B;
                    pBinOutputPattern[3] = G;
                    break;

                case XCFAType::ThreeXThreeCFA:
                    // Based on HPG we need to set only for 4,5,7 and 8 array.
                    if (PixelFormat::BayerGRBG == pInputData->sensorData.format)
                    {
                        pBinOutputPattern[4] = G;
                        pBinOutputPattern[5] = R;
                        pBinOutputPattern[7] = B;
                        pBinOutputPattern[8] = G;
                    }
                    else if (PixelFormat::BayerBGGR == pInputData->sensorData.format)
                    {
                        pBinOutputPattern[4] = B;
                        pBinOutputPattern[5] = G;
                        pBinOutputPattern[7] = G;
                        pBinOutputPattern[8] = R;
                    }
                    else if (PixelFormat::BayerRGGB == pInputData->sensorData.format)
                    {
                        pBinOutputPattern[4] = R;
                        pBinOutputPattern[5] = G;
                        pBinOutputPattern[7] = G;
                        pBinOutputPattern[8] = B;
                    }
                    else if (PixelFormat::BayerGBRG == pInputData->sensorData.format)
                    {
                        pBinOutputPattern[4] = G;
                        pBinOutputPattern[5] = B;
                        pBinOutputPattern[7] = R;
                        pBinOutputPattern[8] = G;
                    }
                    break;

                case XCFAType::FourXFourCFA:
                    // Based on HPG Set for 5,7.13,15th array
                    pBinOutputPattern[5]  = G;
                    pBinOutputPattern[7]  = R;
                    pBinOutputPattern[13] = B;
                    pBinOutputPattern[15] = G;
                    break;

                case XCFAType::RGBWK:
                case XCFAType::RGBWC:
                    pBinOutputPattern[0] = G;
                    pBinOutputPattern[1] = R;
                    pBinOutputPattern[2] = B;
                    pBinOutputPattern[3] = W;
                    break;

                case XCFAType::UnconventionalBayer:
                    pBinOutputPattern[0] = G;
                    pBinOutputPattern[1] = R;
                    pBinOutputPattern[2] = B;
                    break;

                case XCFAType::RGBIR:
                    pBinOutputPattern[0] = G;
                    pBinOutputPattern[1] = R;
                    pBinOutputPattern[2] = B;
                    pBinOutputPattern[3] = IR;
                    break;

                default:
                    break;
            }
        }
        else
        {
            result = CamxResultEInvalidArg;
        }

        return result;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// ConfigureColorArray
    ///
    /// @brief  Configure Color Array for Pixel Interleaved mode.
    ///
    /// @param  pInputData  Pointer to the Input Data
    /// @param  pCFAData    Pointer to the CFA Data
    /// @param  pNumColors  Pointer to Number of colors
    ///
    /// @return CamxResultSuccess if successful
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE CamxResult ConfigureColorArray(
        ISPInputData*  pInputData,
        XCFAInputData* pCFAData,
        UINT8*         pNumColors = NULL)
    {
        CamxResult result   = CamxResultSuccess;
        XCFAType   xcfaType;

        UINT32 sizeofCFAPattern = 0;

        if (NULL != pNumColors)
        {
            *pNumColors = ColorChannelCount::ThreeChannels;
        }

        CAMX_LOG_VERBOSE(CamxLogGroupISP, "XCFA Type %d", pInputData->SFEData.xcfaType);

        if (NULL != pInputData)
        {
            xcfaType = pInputData->SFEData.xcfaType;
            switch (xcfaType)
            {
                case XCFAType::QuadCFA:
                    // default is GRBG
                    Utils::Memcpy(pCFAData->cfaArray, QuadCFAColorArray,
                                  sizeof(UINT8) * MaxColorArray);
                    sizeofCFAPattern = QuadCFASize;

                    if (NULL != pNumColors)
                    {
                        *pNumColors = ColorChannelCount::ThreeChannels;
                    }

                    break;

                case XCFAType::ThreeXThreeCFA:
                    // default is GRBG

                    sizeofCFAPattern = ThreeX3CFASize;

                    if (NULL != pNumColors)
                    {
                        *pNumColors = ColorChannelCount::ThreeChannels;
                    }

                    pCFAData->repeatCycle = sizeofCFAPattern;

                    pCFAData->cfaPatternOffsetX = 0;
                    pCFAData->cfaPatternOffsetY = 0;

                    if (PixelFormat::BayerGRBG == pInputData->sensorData.format)
                    {
                        Utils::Memcpy(pCFAData->cfaArray, ThreeX3CFAColorArray_GRBG,
                                  sizeof(UINT8) * MaxColorArray);
                    }
                    else if (PixelFormat::BayerBGGR == pInputData->sensorData.format)
                    {
                        Utils::Memcpy(pCFAData->cfaArray, ThreeX3CFAColorArray_BGGR,
                                  sizeof(UINT8) * MaxColorArray);
                    }
                    else if (PixelFormat::BayerRGGB == pInputData->sensorData.format)
                    {
                        Utils::Memcpy(pCFAData->cfaArray, ThreeX3CFAColorArray_RGGB,
                                  sizeof(UINT8) * MaxColorArray);
                    }
                    else if (PixelFormat::BayerGBRG == pInputData->sensorData.format)
                    {
                        Utils::Memcpy(pCFAData->cfaArray, ThreeX3CFAColorArray_GBRG,
                                  sizeof(UINT8) * MaxColorArray);
                    }

                    break;

                case XCFAType::FourXFourCFA:
                    // default is GRBG
                    Utils::Memcpy(pCFAData->cfaArray, FourX4CFAColorArray,
                                  sizeof(UINT8) * MaxColorArray);
                    sizeofCFAPattern = FourX4CFASize;
                    if (NULL != pNumColors)
                    {
                        *pNumColors = ColorChannelCount::ThreeChannels;
                    }
                    break;
                case XCFAType::RGBIR:
                    Utils::Memcpy(pCFAData->cfaArray, pInputData->pCFAArray,
                                  sizeof(UINT8) * MaxColorArray);
                    sizeofCFAPattern = RGBIRSize;
                    if (NULL != pNumColors)
                    {
                        *pNumColors = ColorChannelCount::FourChannels;
                    }
                    break;
                case XCFAType::RGBWC:
                    Utils::Memcpy(pCFAData->cfaArray, pInputData->pCFAArray,
                                  sizeof(UINT8) * MaxColorArray);
                    sizeofCFAPattern = RGBWSize;
                    if (NULL != pNumColors)
                    {
                        *pNumColors = ColorChannelCount::FourChannels;
                    }
                    break;
                case XCFAType::RGBWK:
                    Utils::Memcpy(pCFAData->cfaArray, pInputData->pCFAArray,
                                  sizeof(UINT8) * MaxColorArray);
                    sizeofCFAPattern = RGBWSize;

                    if (NULL != pNumColors)
                    {
                        *pNumColors = ColorChannelCount::FourChannels;
                    }
                    break;
                case XCFAType::UnconventionalBayer:
                    Utils::Memcpy(pCFAData->cfaArray, UnconventionalBayerColorArray,
                                  sizeof(UINT8) * MaxColorArray);
                    sizeofCFAPattern = UnconventionalBayerSize;
                    if (NULL != pNumColors)
                    {
                        *pNumColors = ColorChannelCount::ThreeChannels;
                    }
                    break;
                default:
                    break;
            }


            CAMX_LOG_VERBOSE(CamxLogGroupISP, "CFA Pattern");
            for (UINT32 cnt = 0; cnt < MaxColorArray; cnt += 8)
            {
                CAMX_LOG_VERBOSE(CamxLogGroupISP, "%d %d %d %d %d %d %d %d",
                              pCFAData->cfaArray[cnt], pCFAData->cfaArray[cnt+1],
                              pCFAData->cfaArray[cnt+2], pCFAData->cfaArray[cnt+3],
                              pCFAData->cfaArray[cnt+4], pCFAData->cfaArray[cnt+5],
                              pCFAData->cfaArray[cnt+6], pCFAData->cfaArray[cnt+7]);
            }

            if (NULL != pNumColors)
            {
                CAMX_LOG_VERBOSE(CamxLogGroupISP, "pNumColors %d sizeofCFAPattern %d", *pNumColors, sizeofCFAPattern);
            }

            // Offset X and Y need to be Even , for ThreexThree CFA this value becomes Odd.
            if ((0 != sizeofCFAPattern) && (ThreeX3CFASize != sizeofCFAPattern))
            {
                pCFAData->repeatCycle = sizeofCFAPattern;

                if (PixelFormat::BayerGRBG == pInputData->sensorData.format)
                {
                    pCFAData->cfaPatternOffsetX = 0;
                    pCFAData->cfaPatternOffsetY = 0;
                }
                else if (PixelFormat::BayerBGGR == pInputData->sensorData.format)
                {
                    // Rotate default array Y direction by 2/3/4 to get BGGR
                    pCFAData->cfaPatternOffsetX = 0;
                    pCFAData->cfaPatternOffsetY = sizeofCFAPattern/2;
                }
                else if (PixelFormat::BayerRGGB == pInputData->sensorData.format)
                {
                    // Rotate default array X direction by 2/3/4 to get RGGB
                    pCFAData->cfaPatternOffsetX = sizeofCFAPattern/2;
                    pCFAData->cfaPatternOffsetY = 0;
                }
                else if (PixelFormat::BayerGBRG == pInputData->sensorData.format)
                {
                    // Rotate default array X direction by 2/3/4 and in Y direction by 2 to get GBRG
                    pCFAData->cfaPatternOffsetX = sizeofCFAPattern/2;
                    pCFAData->cfaPatternOffsetY = sizeofCFAPattern/2;
                }
                else
                {
                    /// TBD: Need to check differnt patterns on RGBIR/RGBW
                    pCFAData->cfaPatternOffsetX = 0;
                    pCFAData->cfaPatternOffsetY = 0;
                }
            }
        }
        else
        {
            result   = CamxResultEInvalidArg;
            CAMX_LOG_ERROR(CamxLogGroupISP, "InputData is NULL");
        }

        return result;

    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// ConvertGamma15ArrayToGamma16Array
    ///
    /// @brief  Convert Gamma15 array into Gamma16 array
    ///
    /// @param  pGamma15Array      Gamma15 array
    /// @param  gamma15Size        Gamma15 array size
    /// @param  pGamma16Array      Gamma16 array
    /// @param  gamma16Size        Gamma16 array size
    ///
    /// @return CamxResult Success if size is correct
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static CamxResult ConvertGamma15ArrayToGamma16Array(
            UINT32* pGamma15Array,
            UINT32  gamma15Size,
            UINT32* pGamma16Array,
            UINT32  gamma16Size)
    {
        if ((NULL == pGamma15Array)                         ||
            (NumberOfGammaEntriesPerLUT  != gamma16Size)    ||
            (NULL == pGamma16Array)                         ||
            (GAMMA15LUT_NUM_ENTRIES_PER_CHANNEL != gamma15Size))
        {
            return CamxResultEInvalidArg;
        }

        UINT32 j = 0;
        for (UINT32 i = 0; i < gamma15Size; i++)
        {
            if (i % 4 == 0)
            {
                pGamma16Array[j] = (pGamma15Array[i] & ((1 << 12) - 1)) >> 2;
                j++;
            }
        }
        return CamxResultSuccess;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetStaticSettings
    ///
    /// @brief  Helper method to return ISP static settings pointer.
    ///
    /// @return ISPStaticSettings*
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    const ISPStaticSettings* GetStaticSettings() const
    {
        return m_pISPStaticSettings;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetHwStaticSettings
    ///
    /// @brief  Helper method to return the Hw settings pointer.
    ///
    /// @return Titan17xStaticSettings*
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    const Titan17xStaticSettings* GetHwStaticSettings() const
    {
        return HwEnvironment::GetInstance()->GetHwStaticSettings();
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// ~ISPIQModule
    ///
    /// @brief  Destructor
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual ~ISPIQModule() = default;

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// ISPIQModule
    ///
    /// @brief  Constructor
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ISPIQModule();

    ISPHWSetting*   m_pHWSetting;                           ///< Pointer to the HW Setting Class
    ISPIQModuleType m_type;                                 ///< IQ Module Type
    BOOL            m_dynamicEnable;                        ///< Flag to indicate if this module is enabled dynamically
    BOOL            m_moduleEnable;                         ///< Flag to indicate if this module is enabled
    BOOL            m_dsBPCEnable;                          ///< Flag to indicate if DSBPC module is enabled
    UINT            m_cmdLength;                            ///< The length of the Command List, in dwords
    UINT            m_32bitDMILength;                       ///< The length of the 32 bit DMI Table, in dwords
    UINT            m_32bitDMIBufferOffsetDword;            ///< Offset to the 32bit DMI buffer, in Dword
    UINT            m_64bitDMILength;                       ///< The length of the 64 bit DMI Table, in Dword
    UINT            m_64bitDMIBufferOffsetDword;            ///< Offset to the 64bit DMI buffer, in Dword
    UINT            m_numLUT;                               ///< The number of look up tables
    UINT            m_offsetLUT;                            ///< Offset where DMI header starts for LUTs
    UINT            m_offsetReg;                            ///< Offset where Reg write header starts for reg
    UINT            m_stripeCmdLength;                      ///< The length of the Command List per stripe, in dwords
    SFEUsecaseMode  m_SFEUsecaseMode;                       ///< SFE Usecase Mode
    XCFAType        m_XCFAType;                             ///< XCFA Type
    VOID*           m_pState[IFEMaxIndex][MaxContextIndex]; ///< Pointer to state data
    const CHAR*     m_pNodeIdentifier;                      ///< String identifier of node associated
    ISPVersion      m_ISPVersion;                           ///< ISP Version

    IFEDefaultModuleConfig* m_pDefaultConfig;               ///< Pointer to default Module Config
    std::vector<INT>        m_triggerIndex;                 ///< Trigger Index Vector
    ISPHWSettingPBIface     m_pbIFace;                      ///< Packet Builder IFace

    UINT            m_cmdLengthBLUR;                        ///< Length of BLUR Command List
    UINT            m_numLUTBLUR;                           ///< The number of BLUR look up tables
    UINT            m_offsetRegBLUR;                        ///< Offset where BLUR Reg write header starts for reg

    VOID*           m_pStateTFE[TFEMaxIndex][MaxContextIndex];       ///< Pointer to state data for TFE Modules
    VOID*           m_pDependenceData[TFEMaxIndex][MaxContextIndex]; ///< Pointer to Dependence data for TFE Modules

    const ISPStaticSettings*    m_pISPStaticSettings;       ///< Pointer to the ISP static settings common to camx-lib

private:
    ISPIQModule(const ISPIQModule&)            = delete;    ///< Disallow the copy constructor
    ISPIQModule& operator=(const ISPIQModule&) = delete;    ///< Disallow assignment operator
};

CAMX_NAMESPACE_END


#endif // CAMXISPIQMODULE_H
