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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @file  camxisppipeline.h
/// @brief ISP pipeline Base Class
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#ifndef CAMXISPPIPELINE_H
#define CAMXISPPIPELINE_H


#include <list>
#include "camxcslispdefs.h"
#include "camxdefs.h"
#include "camxhwcontext.h"
#include "camxispiqmodule.h"
#include "camxispstatsmodule.h"
#include "camxcslifedefs.h"
#include "camxcslicpdefs.h"
#include "ipdefs.h"

CAMX_NAMESPACE_BEGIN

// Forward declartion
struct IFEConfigInfo;
struct IQOEMTuningMetadata;

static const UINT ICA_MODE_DISABLED  = 0;    ///< IPE ICA mode disabled
static const UINT ICA_MODE_ENABLED   = 1;    ///< IPE ICA mode enabled
static const UINT ICA_MODE_MAX       = 2;    ///< IPE ICA mode max

/// @brief The Software VSR version
enum SWVSRVersion
{
    SWVSRNone,            ///< Software VSR none version
    SWVSR11,              ///< Software VSR version 1.1
    SWVSR12,              ///< Software VSR version 1.2
    SWVSR13,              ///< Software VSR version 1.3
};

/// @brief The CascadedMCTF version
enum CascadedMCTFVersion
{
    CascadedMCTFNone,            ///< Cascaded MCTF none version
    CascadedMCTF12,              ///< Cascaded MCTF version 1.2
};

/// @brief The update method for IPE IQ module list
enum class UpdateMethodIPEIQModuleList : UINT32
{
    UpdateIPEMFHDRExpFrom2To3,              ///< Switch the IPE IQ module list from 2 exposures to 3 exposures
};

/// @brief Instance Profile Id
enum BPSProfileId
{
    BPSProfileIdDefault        = 0, ///< All IQ Modules
    BPSProfileIdPrefilter      = 1, ///< Pre Filter
    BPSProfileIdBlend          = 2, ///< Blend
    BPSProfileIdBlendPost      = 3, ///< BlendPost
    BPSProfileIdHNR            = 4, ///< HNR Only
    BPSProfileIdIdealRawOutput = 5, ///< Ideal raw Output
    BPSProfileIdIdealRawInput  = 6, ///< Ideal raw Input
    BPSProfileIdStatsOnly      = 7, ///< Stats only
    BPSProfileIdUnpacker       = 8, ///< Unpacker, No IQ module
    BPSProfileIdMax            = 9, ///< Invalid
};

/// @brief Instance Processing Type
enum BPSProcessingType
{
    BPSProcessingDefault = 0, ///< Default BPS topology             = 0
    BPSProcessingMFNR,        ///< BPS node in MFNR topology        = 1
    BPSProcessingMFSR,        ///< BPS node in MFSR topology        = 2
    BPSProcessingRealtime,    ///< BPS node in realtime topology    = 3
    BPSProcessingQLL,         ///< BPS node in QLL topology         = 4
    BPSProcessingMMF,         ///< BPS node in MMF topology         = 5
    BPSProcessingUnpacker,    ///< BPS node in Unpacker topology    = 6
    BPSProcessingMax,         ///< Invalid
};

/// @brief IFE supported dimension information
struct IFESupportedDimension
{
    UINT32 maxOutputWidthFull;      ///< IFE Max Output width Full
    UINT32 maxOutputWidthFD;        ///< IFE Max Output width FD
    UINT32 maxOutputHeightFD;       ///< IFE Max Output Height FD
    UINT32 maxOutputWidthFDTalos;   ///< IFE Max Output width FD Talos
    UINT32 maxOutputHeightFDTalos;  ///< IFE Max Output Height FD Talos
    UINT32 maxOutputHeight;         ///< IFE Max Output Height
    UINT32 maxOutputWidthRDIOnly;   ///< IFE Max Output Width RDI Only
    UINT32 maxOutputHeightRDIOnly;  ///< IFE Max Output Height RDI Only
    UINT32 maxOutputWidthMNDS;      ///< IFE Max Output Width MNDS
};

/// @brief BPS supported dimension information
struct BPSSupportedDimension
{
    UINT32 minInputWidth;            ///< BPS Min Input width
    UINT32 minInputHeight;           ///< BPS Min Input Height
    UINT32 maxInputWidth;            ///< BPS Max Input width
    UINT32 maxInputHeight;           ///< BPS Max Input Height
};

/// @brief CRE supported dimension information
struct CRESupportedDimension
{
    UINT32 minInputWidth;            ///< CRE Min Input width
    UINT32 minInputHeight;           ///< CRE Min Input Height
    UINT32 maxInputWidth;            ///< CRE Max Input width
    UINT32 maxInputHeight;           ///< CRE Max Input Height

    UINT32 minOutputWidth;           ///< CRE Min Output width
    UINT32 minOutputHeight;          ///< CRE Min Output Height
    UINT32 maxOutputWidth;           ///< CRE Max Output width
    UINT32 maxOutputHeight;          ///< CRE Max Output Height
};

/// @brief IFELite IQ Module Information
struct IFELiteIQModuleInfo
{
    ISPIQModuleType     moduleType;                                       ///< IQ Module Type
    IFELitePipelinePath IFELitePath;                                      ///< IFELite Path
    UINT8               installed;                                        ///< Module Available or not on particular chipset
    CamxResult          (*IQCreate)(IFELiteModuleCreateData* pInputData); ///< Static create fuction of this IQ Module
};

/// @brief IFELite Stats Module Information
struct IFELiteStatsModuleInfo
{
    ISPStatsModuleType  moduleType;                                               ///< Stats Module Name
    IFELitePipelinePath IFELitePath;                                              ///< IFELite Path
    UINT8               installed;                                                ///< Module Available or not on chipset
    CamxResult          (*StatsCreate)(IFELiteStatsModuleCreateData* pInputData); ///< Static create fuction of this Stats Module
};

/// @brief IFE Stats Capability
struct IFEStatsCapability
{
    UINT32 AECBEStatsWidth;           ///< AEC BE stats width
    UINT32 AECBEStatsHeight;          ///< AEC BE stats height
    UINT32 AWBBGStatsWidth;           ///< AWB BG stats width
    UINT32 AWBBGStatsHeight;          ///< AWB BG stats height
    UINT32 BayerRS16StatsWidth;       ///< Bayer RS16 stats width
    UINT32 BayerRS16StatsHeight;      ///< Bayer RS16 stats height
    UINT32 BFHistStatsWidth;          ///< BF stats width
    UINT32 BFHistStatsHeight;         ///< BF stats height
    UINT32 BFWStatsWidth;             ///< BFW stats width
    UINT32 BFWStatsRegion;            ///< BFW stats height
    UINT32 BFStats25Width;            ///< BFW 25 stats Width
    UINT32 BFStats25Height;           ///< BFW 25 stats height
    UINT32 BHistStatsWidth;           ///< BHist stats width
    UINT32 BHistStatsHeight;          ///< BHist stats height
    UINT32 CAFStatsWidth;             ///< CFA stats width
    UINT32 CAFStatsHeight;            ///< CFA stats height
    UINT32 CSStatsWidth;              ///< CS stats width
    UINT32 CSStatsHeight;             ///< CS stats height
    UINT32 HDRBEStatsWidth;           ///< HDR BE stats width
    UINT32 HDRBEStatsHeight;          ///< HDR BE stats height
    UINT32 HDRBHistStatsWidth;        ///< HDR BHist stats width
    UINT32 HDRBHistStatsHeight;       ///< HDR BHist stats height
    UINT32 IHistStatsWidth;           ///< IHist stats width
    UINT32 IHistStatsHeight;          ///< IHist stats height
    UINT32 TintlessBGStatsWidth;      ///< Tintless BG stats width
    UINT32 TintlessBGStatsHeight;     ///< Tintless BG stats height
    UINT32 RSStatsWidth;              ///< RS stats width
    UINT32 RSStatsHeight;             ///< RS stats height
    UINT32 LTMDCStatsWidth;           ///< LTMDC stats width
    UINT32 LTMDCStatsHeight;          ///< LTMDC stats height
    UINT32 IFELiteBG16StatsWidth;     ///< IFE Lite BG stats width
    UINT32 IFELiteBG16StatsHeight;    ///< IFE Lite BG stats height
    UINT32 ALSCBGStatsWidth;          ///< IFE ALSC BG stats width
    UINT32 ALSCBGStatsHeight;         ///< IFE ALSC BG stats height
};

struct IFELiteCapabilityInfo
{
    UINT                    numIFELiteIQModule;              ///< Number of IQ Modules
    IFELiteIQModuleInfo*    pIFELiteIQModuleList;            ///< List of IQ Module
    UINT                    numIFELiteStatsModule;           ///< Number of Stats Modules
    IFELiteStatsModuleInfo* pIFELiteStatsModuleList;         ///< List of Stats Module
};

/// @brief IFE Capability Information
struct IFECapabilityInfo
{
    UINT                numIFEIQModule;              ///< Number of IQ Modules
    IFEIQModuleInfo*    pIFEIQModuleList;            ///< List of IQ Module
    UINT                numIFEStatsModule;           ///< Number of Stats Modules
    IFEStatsModuleInfo* pIFEStatsModuleList;         ///< List of Stats Module
    UINT                numRDILinkPerIFE;            ///< Number of RDI Link per IFE
    UINT                numIFE;                      ///< Number of IFE
    UINT32              UBWCSupportedVersionMask;    ///< UBWC supported version
    UBWCLossyMode       UBWCLossySupport;            ///< UBWC Lossy supported
    UINT32              lossy10bitWidth;             ///< Lossy 10 bit width
    UINT32              lossy10bitHeight;            ///< Lossy 10 bit height
    UINT32              lossy8bitWidth;              ///< Lossy 8 bit width
    UINT32              lossy8bitHeight;             ///< Lossy 8 bit height
    UINT32              ICAVersion;                  ///< ICA version;
    BOOL                LDCSupport;                  ///< LDC supported version
    IFEStatsCapability  IFEStatsCapability;          ///< IFE stats capability
};

/// @brief IFE common Config
struct IFECommonConfig
{
    FLOAT           throughPut;          ///< IFE/SFE Throttle Config
    SFEUsecaseMode  SFEMode;             ///< SFE Usecase Mode
    XCFAType        XCFAtype;            ///< XCFA Type
    BOOL            bIsSFEEnabled;       ///< TRUE if SFE is enabled
    SFEOutMUXSelect previewMuxSelect;    ///< Preview Mux Select
    SFEOutMUXSelect snapshotMuxSelect;   ///< Snapshot Mux select
    SFEOutMUXSelect IROutputMuxSelect;   ///< Snapshot Mux select
    UINT            numberOfExposures;   ///< Number of Exposures
    IFECoreConfig*  pIFECoreConfig;      ///< Pointer to IFE Core Config
    IFEStatsTapOut* pStatsTapOut;        ///< Pointer to the stats tapout
    IFEDSPMode      DSPMode;             ///< IFE DSP mode
    BOOL            bIsYUVSensor;        ///< TRUE if YUV sensor
    UINT32          numBatchedFrames;    ///< Usecase number of batched frames
    BOOL            FSModeEnabled;       ///< Indicates Fast Shutter Mode.
    UINT32          IFEPixelRawPort;     ///< IFE raw pixel port that is enabled
    UINT32          IFEPixelRawFormat;	 ///< IFE pixel raw path format
    BOOL            bIsPDAFenable;       ///< TRUE if PD is enabled
    BOOL            bIsLCRenable;        ///< TRUE if LCR is enabled
    IFEFCGMUXSelect FCGMuxSelect;        ///< FCG Mux Select
    BOOL            isSFEDemuxBypassReq; ///< TRUE if demux need to be bypassed
};

/// @brief BPS pass name capability information
struct BpsPassNameCapability
{
    BpsPassName       passName;                                   ///< BPS pass name
    BOOL              passSupported;                              ///< pass supported or not
};

/// @brief ISP bayer width
struct Bayerwidth
{
    UINT32 blsBitWidth;                       ///< BLS pipeline bit width
    UINT32 channelGainBitWidth;               ///< Channel gain pipeline bit width
};


/// @brief BPS Capability Information
struct BPSCapabilityInfo
{
    UINT32                  UBWCSupportedVersionMask;                      ///< UBWC supported version
    UBWCLossyMode           UBWCLossySupport;                              ///< UBWC lossy support
    UINT32                  ICAVersion;                                    ///< ICA version;
    BOOL                    LDCSupport;                                    ///< LDC supported version
    SWTMCVersion            tmcversion;                                    ///< TMC version
    FLOAT                   frameCyclesMaxPerSecond;                       ///< Max pixel throughput per second
    BOOL                    isSRSupprted;                                  ///< if bps supports the SR
    FLOAT                   maxB2YSrScaling;                               ///< Max SR with HDR / B2Y
    BpsPassNameCapability*  pBpsPassNameCapability;                        ///< List of capable BPS passes for this hw version
    UINT                    maxHWOutputPort;                               ///< Max Hardware Output Port
    UINT                    maxHWInputPort;                                ///< Max Hardware Input Port
    BPSProfileId            supportedProfiles[BPSProfileIdMax+1];          ///< Supported Profiles
    BPSProcessingType       supportedProcessingType[BPSProcessingMax+1];   ///< Supported ProcessingType
    BOOL                    enableFWCmdRegionMap;                          ///< Enable Memory map region for BPS
    Bayerwidth              bayerBitWidth;                                 ///< BLS and Channel gain bit width
};

/// @brief EVA Capability Information
struct EVACapabilityInfo
{
    UINT                      minInputWidth;          ///< Min input width that EVA can take
    UINT                      minInputHeight;         ///< Min input height that EVA can take
    UINT                      maxInputWidth;          ///< Max input width that EVA can take
    UINT                      maxInputHeight;         ///< Max input height that EVA can take
    UINT                      optimalInputWidth;      ///< Max input width that EVA can take
    UINT                      optimalInputHeight;     ///< Max input height that EVA can take
    UINT                      minDMEInputWidth;       ///< Min DME input width that EVA can take
    UINT                      minDMEInputHeight;      ///< Min DME input height that EVA can take
    UINT                      ecuGammaTableSize;      ///< The EVA ECU Gamma table size
    UINT                      ecuGammaBpp;            ///< The BPP of ECU Gamma
    UINT                      ecuIGammaTableSize;     ///< The EVA ECU IGamma table size
    UINT                      ecuGainOffset;          ///< The Gain offset of ECU for EVA
    CVPProfileId              profileId;              ///< Instance profile ID
    UINT32                    titanVersion;           ///< Titan version
    UINT32                    nodeID;                 ///< QSAT or EVA
    BOOL                      isMvUsPassNeeded;       ///< Check upscale pass needed for VSR
    const CVPIQModuleInfo*    pEVAIQModuleList;       ///< List of IQ Module
    UINT                      numEVAIQModules;        ///< Number of IQ Modules

    const EVAConfigStringMap*        pEVADmmConfigStrings;          ///< DMM config string map
    const EVAConfigStringMap*        pEVAWarpExtnConfigStrings;     ///< Warp extension config string map
};

/// @brief IPE IQ Module Information
struct IPEIQModuleInfo
{
    ISPIQModuleType   moduleType;                                   ///< IQ Module Type
    IPEPath           path;                                         ///< IPE path indicating IQ module flow
    BOOL              installed;                                    ///< Module Available or not
    CamxResult        (*IQCreate)(IPEModuleCreateData* pInputData); ///< Static create fuction of this IQ Module
};

/// @brief IPE Stats Module Information
struct IPEStatsModuleInfo
{
    ISPStatsModuleType moduleType;                                           ///< Stats Module Type
    IPEPath            path;                                                 ///< IPE path indicating Stats module flow
    BOOL               installed;                                            ///< Module Available or not
    UINT32             statsModuleOutputPort;                                ///< Stats module output port number
    CamxResult         (*StatsCreate)(IPEStatsModuleCreateData* pInputData); ///< Static create fuction of this Stats Module
};

/// @brief IPE ICA transofrm info
struct IPEICATransformInfo
{
    BOOL             isEnable;                  ///< Transform enable flag
    CamxMetadataType metaDataType;              ///< Metadata type
    UINT             portSpecificMetaPortId;    ///< Input port id if metdata type is PSM
    UINT8            ICATagIndex;               ///< ICA tag index
};

/// @brief IPE ICA usecase info
struct IPEICAUsecaseInfo
{
    UINT32              usecaseMask;            ///< Usecase Mask
    IPEICATransformInfo inGrid;                 ///< Input grid transform info
    IPEICATransformInfo inPerspective;          ///< Input perspective transform info
    IPEICATransformInfo inGridStabilize;        ///< Input grid stabilization transform info
    IPEICATransformInfo inPerspectiveStabilize; ///< Input perspective stabilization transform info
    IPEICATransformInfo refGrid;                ///< Ref Grid transform info
    IPEICATransformInfo refPerspective;         ///< Ref perspective transform info
    IPEICATransformInfo referenceMCTFImage;     ///< Reference MCTF Image alignement
    IPEICATransformInfo referenceMCTFGyro;      ///< Reference MCTF gyro alignement
};

/// @brief IPE ICA usecase selection data
struct IPEICAUsecaseSelectionData
{
    BOOL    isLoopbackPortEnabled;              ///< Is Loop back port enalbe flag
    BOOL    isNonEISLDCGridEnabled;             ///< Is Non EIS LDC grid enabled flag
    BOOL    isStabilizationTypeSAT;             ///< Is stabilization type SAT
    BOOL    isStabilizationTypeEIS2;            ///< Is stabilization type EIS2
    BOOL    isStabilizationTypeEIS3;            ///< Is stabilization type EIS3
    BOOL    isBlendWithNPS;                     ///< Is MFSR/MFNR blending mode with NPS
    BOOL    isPostfilterWithNPS;                ///< Is MFSR/MFNR post filter with NPS
    BOOL    isRealtimeIPE;                      ///< Is realtime IPE
    UINT32  numMFHDRExposure;                   ///< Num exposures in MFHDR
    BOOL    isOEMICASettingEnabled;             ///< Is OEM ICA setting enabled
    BOOL    isTFIOnlyPortEnabled;               ///< Is TFI Only IPE Port is enabled
    BOOL    isANROnlyPortEnabled;               ///< Is ANR Only IPE Port is enabled
};

/// @brief IPE node buffer negotiation support data struct
struct IPEBufferNegotiationSupportData
{
    IPEProfileId          profileId;            ///< IPE node instance identifier using profile Id
    std::vector<UINT>     portList;             ///< negotiation supported ports List for given profile
    BOOL                  canNegotiate;         ///< flag to indiciate IPE node instance of given profile can do negotiation
};

/// @brief IPE node buffer negotiation support data struct
struct IPEBWClientSupportData
{
    BOOL                  clientEnable;         ///< flag to indicate if the clent is supported for titan version
    BOOL                  inputClient;          ///< flag to indiciate that the client is to be considered for input BW
    BOOL                  refClient;            ///< flag to indiciate that the client is to be considered for ref BW
};

/// @brief IPE Capability Information
struct IPECapabilityInfo
{
    const IPEIQModuleInfo*    pIPEIQModuleList;                       ///< List of IQ Module
    UINT                      numIPEIQModules;                        ///< Number of IQ Modules
    const IPEIQModuleInfo*    pIPEExtraPassIQModuleList;              ///< List of extra pass IQ Module
    UINT                      numIPEExtraPassIQModules;               ///< Number of extra pass IQ Modules
    const IPEIQModuleInfo*    pIPEUpScaleExtraPassIQModuleList;       ///< List of upscale extra pass IQ Module
    UINT                      numUpScaleIPEExtraPassIQModules;        ///< Number of upsclae extra pass IQ Modules
    const IPEIQModuleInfo*    pIPEDSScaleExtraPassIQModuleList;       ///< List of DS scale extra pass IQ Module
    UINT                      numDSScaleIPEExtraPassIQModules;        ///< Number DS scale extra pass of IQ Modules
    const IPEIQModuleInfo*    pIPEB2YUVExtraPassIQModuleList;         ///< List of B2YUV extra pass IQ Module
    UINT                      numB2YUVIPEExtraPassIQModules;          ///< Number B2YUV extra pass of IQ Modules
    const IPEIQModuleInfo*    pIPEICAOnlyExtraPassIQModuleList;       ///< List of ICAOnly extra pass IQ Module
    UINT                      numICAOnlyIPEExtraPassIQModules;        ///< Number ICAOnly extra pass of IQ Modules
    const IPEIQModuleInfo*    pIPEAIProcessingExtraPassIQModuleList;  ///< List of AIProcesing extra pass IQ Module
    UINT                      numAIProcessingIPEExtraPassIQModules;   ///< Number AIProcesing extra pass of IQ Modules
    const IPEIQModuleInfo*    pIPEAIBokehProcessingExtraPassIQModuleList;  ///< List of AIProcesing extra pass IQ Module
    UINT                      numAIBokehProcessingIPEExtraPassIQModules;   ///< Number AIProcesing extra pass of IQ Modules
    const IPEIQModuleInfo*    pIPE2DLUTExtraPassIQModuleList;              ///< List of 2D LUT extra pass IQ Module
    UINT                      num2DLUTIPEExtraPassIQModules;               ///< Number 2D LUT extra pass of IQ Modules
    const IPEStatsModuleInfo* pIPEStatsModuleList;                    ///< List of Stats Module
    UINT                      numIPEStatsModules;                     ///< Number of Stats Modules
    UINT                      numIPE;                                 ///< Number of IPE
    UINT                      maxOutputPorts;                         ///< Max number of output ports supported
    UINT                      maxInputPorts;                          ///< Max number of input ports supported
    UINT                      maxInputWidth[ICA_MODE_MAX];            ///< Max IPE input  width
    UINT                      maxInputHeight[ICA_MODE_MAX];           ///< Max IPE input  height
    UINT                      maxOutputWidth;                         ///< Max IPE output width
    UINT                      maxOutputHeight;                        ///< Max IPE output height
    UINT                      minInputWidth;                          ///< Min IPE input  width
    UINT                      minInputHeight;                         ///< Min IPE input  height
    UINT                      minOutputWidth;                         ///< Min IPE output width
    UINT                      minOutputHeight;                        ///< Min IPE output width
    UINT                      minOutputWidthUBWC10bit;                ///< Min IPE output width for UBWC 10 bit format
    UINT                      minOutputHeightUBWC10bit;               ///< Min IPE output height for UBWC 10 bit format
    UINT                      minOutputWidthUBWC8bit;                 ///< Min IPE output width for UBWC 8 bit format
    UINT                      minOutputHeightUBWC8bit;                ///< Min IPE output height for UBWC 8 bit format
    UBWCLossyMode             UBWCLossySupport;                       ///< UBWC Lossy supported
    UINT32                    UBWCSupportedVersionMask;               ///< UBWC supported version
    UINT32                    lossy10bitWidth;                        ///< Lossy 10 bit width
    UINT32                    lossy10bitHeight;                       ///< Lossy 10 bit height
    UINT32                    lossy8bitWidth;                         ///< Lossy 8 bit width
    UINT32                    lossy8bitHeight;                        ///< Lossy 8 bit height
    UINT32                    ICAVersion;                             ///< ICA version;
    UINT32                    ICAGridGeometryRows;                    ///< Grid geometry rows
    UINT32                    ICAGridGeometryColumns;                 ///< Grid geometry columns
    UINT32                    ICAUpscaleLimit;                        ///< ICA upscale limitaion
    BOOL                      disableLENRDS4Buffer;                   ///< LENR supported version
    BOOL                      LENRSupport;                            ///< LENR supported version
    BOOL                      referenceLookaheadTransformSupported;   ///< Ref Lookahead Transform support
    BOOL                      swStriping;                             ///< Striping done in UMD
    BOOL                      LDCSupport;                             ///< LDC supported version
    BOOL                      MFHDRSupport;                           ///< MFHDR supported platform
    BOOL                      HVXSHDRSupport;                         ///< HVX SHDR supported platform
    BOOL                      isPostfilterWithBlend;                  ///< Flag to check if MFNR Postfilter has Blend stage
    BOOL                      IPEDSXSupport;                          ///< Flag to check if IPE has DSX in the plaform
    BOOL                      virtualIOPorts;                         ///< Flag to check if platform has node virtual port support
    FLOAT                     realtimeClockEfficiencyNoOverhead;      ///< realtime clock Efficiency no overhead
    FLOAT                     nonrealtimeClockEfficiencyNoOverhead;   ///< non real time clock Efficiency no overhead
    FLOAT                     realtimeClockEfficiencyOverhead;        ///< realtime clock Efficiency overhead
    FLOAT                     nonrealtimeClockEfficiencyOverhead;     ///< non real time clock Efficiency Overhead
    BOOL                      hasMFlimit;                             ///< Flag to check MF processing resolution limit
    UINT                      numIPEICAUsecases;                      ///< Number of ICA usecase
    FLOAT                     maxDownScaleThreshold;                  ///< Max scaleratio below which downscale causes IQ issues
    FLOAT                     minUpscaleThreshold;                    ///< Min scaleratio above which upscale causes IQ issues
    IPEICAUsecaseInfo*        pIPEICAUsecaseList;                     ///< IPE ICA usecase list
    BOOL                      supportQLL;                             ///< whether support QLL library
    FLOAT                     nonrealtimeFrameCyclesMaxPerSecond;     ///< max pixel throughput per second
    IPEProfileId              profileId;                              ///< IPE Profile ID to pick corresponding pipeline
    UINT                      minLTMWidth;                            ///< min LTM Width
    UINT                      minLTMHeight;                           ///< min LTM Height
    BOOL                      bayerSupport;                           ///< Flag to indicate if the platform supports bayer input
    UINT                      maxHWOutputPort;                        ///< Max Hardware Output Port
    UINT                      maxHWInputPort;                         ///< Max Hardware Input Port
    BOOL                      iFOVCSupported;                         ///< support iFOVC
    BOOL                      sharedPPSLTM;                           ///< common LTM CLC to use same program type
    BOOL                      sharedPPSGLUT;                          ///< common GLUT CLC to use same program type
    UINT                      stripeLength;                           ///< Stripe Length
    BOOL                      multiPassLTM;                           ///< Multi Pass LTM support flag
    BOOL                      isPPSPathSupportTFRefOutput;            ///< Flag to indicate PPS path can output to TF Ref out
    BOOL                      internalDSSupport;                      ///< Flag to indicate if the platform supports internal downscale
    BOOL                      multiPassMAC;                           ///< Multi Pass MAC support flag
    BOOL                      AICameraSupport;                        ///< AI camera support
    BOOL                      AICamSceneModeSupport;                  ///< AICam scene mode support
    BOOL                      AICameraZoomSupport;                    ///< AI camera zoom support
    BOOL                      shapeBLUR;                              ///< shape blur support
    BOOL                      MMFSupported;                           ///< Flag to indicate if MMF is supported

    std::map<UINT, std::unordered_set<UINT>> supportedFormatsPerPort; ///< List of supported formats per port

    std::vector<IPEBWClientSupportData> bwFetchClientSupport;         ///< List of supported fetch clients
    std::vector<IPEBWClientSupportData> bwWriteClientSupport;         ///< List of supported write clients

    BOOL                      enableFWCmdRegionMap;                   ///< Enable Memory map region
    FLOAT                     CDMProgOverhead;                        ///< CDM program overhead
    FLOAT                     fwOverheadHFR;                          ///< FW overhead for HFR usecases
    BOOL                      HNREnableOnRT;                          ///< Enable HNR on real time
    UINT32                    muxMode;                                ///< Mux mode

    DebugDataTagType          debugDataTagType;                       ///< Debug Data Tag Type
    SIZE_T                    debugDataLength;                        ///< Debug Data length
    UINT32                    apiVersion;                             ///< FW API version

    SWVSRVersion              VSRVersion;                             ///< SW VSR Version
    CascadedMCTFVersion       cascadedMCTFVersion;                    ///< Cascaded MCTF Version

    BOOL                      fillFirmwareDataFromIQModule;           ///< Fill firmware data from IQModule
    UINT                      IPEPipelinePathRealtime;                ///< IPE pipeline path
    BOOL                      colorFormatTriggerSupported;            ///< flag to indicate if color format trigger supported
    BOOL                      hasBayerHDR;                            ///< has Bayer HDR MAC
    BOOL                      selfDetectUltraLowLightCondition;       ///< IPE node Detect ultra low light condition.
    BOOL                      isLTMDCStatsBufferNeeded;               ///< Needs LTM DC stats buffer
    BOOL                      IsNoZoomSupport;                        ///< Is not support zoom
};

/// @brief TFE IQ Module Information
struct TFEIQModuleInfo
{
    ISPIQModuleType   moduleType;                                      ///< IQ Module Type
    TFEPipelinePath   TFEPath;                                         ///< TFE pipeline path
    UINT8             installed;                                       ///< Module Available or not on particular chipset
    CamxResult        (*IQCreate)(TFEModuleCreateData* pInputData);    ///< Static create fuction of this IQ Module
};

/// @brief TFE Stats Module Information
struct TFEStatsModuleInfo
{
    ISPStatsModuleType moduleType;                                              ///< Stats Module Name
    UINT8              installed;                                               ///< Module Available or not on chipset
    UINT64             statsModuleOutputPorts;                                  ///< TFEStatsModuleOutputPorts
    CamxResult         (*StatsCreate)(TFEStatsModuleCreateData* pInputData);    ///< Static create fuction of this Stats Module
};

/// @brief TFE Capability Information
struct TFECapabilityInfo
{
    UINT                numTFEIQModule;            ///< Number of IQ Modules
    TFEIQModuleInfo*    pTFEIQModuleList;          ///< List of IQ Module
    UINT                numTFEStatsModule;         ///< Number of Stats Modules
    TFEStatsModuleInfo* pTFEStatsModuleList;       ///< List of Stats Module
    UINT                numRDILinkPerTFE;          ///< Number of RDI Link per TFE
    UINT                numTFE;                    ///< Number of TFE
    UINT                maxFullOutputWidth;        ///< Max BDS output width
    UINT                maxFullOutputHeight;       ///< Max BDS output height
    UINT                maxAIOutputWidth;          ///< Max AI output width
    UINT                maxAIOutputHeight;         ///< Max AI output height
    UINT                tfePipelineStatsBitWidth;  ///< TFE pipeline stats bit width
    UINT                minOutputWidth;            ///< Min input width
    UINT                minOutputHeight;           ///< Max input height
    UINT                maxOutputWidthRDIOnly;     ///< Max RDI output width
    UINT                maxOutputHeightRDIOnly;    ///< Max RDI output width
    UINT                maxOutputIdealRawWidth;    ///< Max IdealRAW output width
    UINT                maxOutputIdealRawHeight;   ///< Max IdealRAW output height
    UINT                maxDownscaleLimit;         ///< Max Downscale limit
    UINT                ds4Serializer;             ///< Serializer configuration for DS4 path
    UINT                ds16Serializer;            ///< Serializer configuration for DS16 path
    UINT                aiSerializer;              ///< Serializer configuration for AI path
    UINT                aiPathDisable;             ///< AI path power saving mode
    UINT                lcrDisable;                ///< LCR disabled
    UINT                pdafPathEnable;            ///< PDHW path enabled
};

/// @brief IPE IQ Module Information
struct OPEIQModuleInfo
{
    ISPIQModuleType   moduleType;                                   ///< IQ Module Type
    OPEPipelinePath   path;                                         ///< OPE path indicating if it is input or reference
    BOOL              installed;                                    ///< Module Available or not
    CamxResult        (*IQCreate)(OPEModuleCreateData* pInputData); ///< Static create fuction of this IQ Module
};

/// @brief OPE Stats Module Information
struct OPEStatsModuleInfo
{
    ISPStatsModuleType moduleType;                                              ///< Stats Module Name
    UINT8              installed;                                               ///< Module Available or not on chipset
    CamxResult         (*StatsCreate)(OPEStatsModuleCreateData* pInputData);    ///< Static create fuction of this Stats Module
};

/// @brief OPE Capability Information
struct OPECapabilityInfo
{
    OPEIQModuleInfo*    pOPEIQModuleList;                            ///< List of IQ Module
    OPEStatsModuleInfo* pOPEStatsModuleList;                         ///< List of Stats Module
    UINT                numOPEIQModules;                             ///< Number of IQ Modules
    UINT                numOPEStatsModules;                          ///< Number of Stats Modules
    UINT                numOPE;                                      ///< Number of OPE
    UINT                maxInputWidth;                               ///< Max OPE input  width
    UINT                maxInputHeight;                              ///< Max OPE input  height
    UINT                maxOutputWidth;                              ///< Max OPE output width
    UINT                maxOutputHeight;                             ///< Max OPE output height
    UINT                minInputWidth;                               ///< Min OPE input  width
    UINT                minInputHeight;                              ///< Min OPE input  height
    UINT                minOutputWidth;                              ///< Min OPE output width
    UINT                minOutputHeight;                             ///< Min OPE output width
    FLOAT               maxUpscale;                                  ///< Max upscale limit
    FLOAT               maxDownscale;                                ///< Max downscale limit
    FLOAT               realtimeClockEfficiency;                     ///< realtime clock Efficiency
    FLOAT               nonrealtimeClockEfficiency;                  ///< non real time clock Efficiency
};

/// @brief CRE Capability Information
struct CRECapabilityInfo
{
    FLOAT               realtimeClockEfficiency;                     ///< realtime clock Efficiency
    FLOAT               nonrealtimeClockEfficiency;                  ///< non real time clock Efficiency
};

/// @brief pipeline type
typedef enum
{
    ISPPipelineIFE = 0,    ///< IFE Pipeline
    ISPPipelineIFELite,    ///< IFELite Pipeline
    ISPPipelineCSID,       ///< CSID Pipeline
    ISPPipelineSFE,        ///< SFE Pipeline
    ISPPipelineIPE,        ///< IPE Pipeline
    ISPPipelineBPS,        ///< BPS Pipeline
    ISPPipelineCRE,        ///< CRE Pipeline
    ISPPipelineTFE,        ///< TFE Pipeline
    ISPPipelineOPE,        ///< OPE Pipeline
    ISPPipelineEVA,        ///< EVA Pipeline
    ISPPipelineInvalid,    ///< Invalid Pipeline
} ISPPipelineType;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Base Class for all the ISP Pipeline setup
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class ISPPipeline
{
public:
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// CreateISPPipeline
    ///
    /// @brief  Create proper ISP Pipeline class per version number
    ///
    /// @param  titanVersion    Chipset Version
    /// @param  type            Pipeline Type
    ///
    /// @return TRUE if supported
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static ISPPipeline* CreateISPPipeline(
        UINT32 titanVersion,
        ISPPipelineType type);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// AllocateTuningMetaData
    ///
    /// @brief  Allocate tuning metadata memory
    ///
    /// @param  ppTuningMetadata          Pointer to allocated tuning meta data pointer
    /// @param  ppDebugDataWriter         Pointer to DebugDataWriter
    /// @param  ppIQOEMTuningMetadata     Pointer to OEMTuningMetadata
    /// @param  ppIQOEMTuningMetadata     Pointer to OEMTuningMetadata
    ///
    /// @return CamxResult
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static CamxResult AllocateTuningMetaData(
        VOID**                ppTuningMetadata,
        DebugDataWriter**     ppDebugDataWriter,
        IQOEMTuningMetadata** ppIQOEMTuningMetadata,
        ISPPipelineType       type);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// isValidBPSFormat
    ///
    /// @brief  method to check if format is supported or not
    ///
    /// @param  firmwarePortId  port id for which format is checked
    /// @param  format          format to be checked
    ///
    /// @return TRUE if supported
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual BOOL isValidBPSFormat(
        BPS_IO_IMAGES firmwarePortId,
        Format format);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetModuleList
    ///
    /// @brief  Function to be implemented to get the pipleine capability
    ///
    /// @param  pIQmoduleInfo structure into which capability info is filled
    ///
    /// @return CamxResult
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CamxResult GetModuleList(
                BPSIQModuleList* pIQmoduleInfo)
    {
        CAMX_UNREFERENCED_PARAM(pIQmoduleInfo);

        return CamxResultSuccess;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetModuleListForMode
    ///
    /// @brief  Function to be implemented to get the pipleine capability in mode requested
    ///
    /// @param  pIQmoduleInfo structure into which capability info is filled
    /// @param  mode          returns the capability in this mode
    ///
    /// @return CamxResult
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CamxResult GetModuleListForMode(
                BPSIQModuleList* pIQmoduleInfo,
                UINT32 mode);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetNcLibCalcMvWarpSizes
    ///
    /// @brief  Calculate sizes of MV Warp outputs: 2 GCEs, up to 2 outputs each
    ///
    /// @param  fullIpeOut     Full out size of the ICA that will apply this DMM transform, at DZ=1.
    /// @param  inSize         MV Warp input size in samples, normally SGM output size returned by EVA SW evaInitDmm:
    /// @param  isMmf          true MMF/MFNR/MFSR usecase, false for MSTF/MFHDR/QSAT
    /// @param  haveMvUsPass   Whether an MV upscaling GCE pass is added after this MV Warp
    /// @param  outSizes       Array of 4 output structs. Will be filled with sizes of each MVWarp output.
    /// @param  outputsNumber  On input: size of outSizes array. On output: max number of outputs produced by this MV warp.
    ///
    /// @return Pointer to the concrete IPENode object
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual int32_t GetNcLibCalcMvWarpSizes(
        NcLibImageSize fullIpeOut,
        NcLibImageSize inSize,
        BOOL isMmf,
        BOOL haveMvUsPass,
        NcLibImageSize* outSizes,
        uint32_t* outputsNumber)
    {
        CAMX_UNREFERENCED_PARAM(fullIpeOut);
        CAMX_UNREFERENCED_PARAM(inSize);
        CAMX_UNREFERENCED_PARAM(isMmf);
        CAMX_UNREFERENCED_PARAM(haveMvUsPass);
        CAMX_UNREFERENCED_PARAM(outSizes);
        CAMX_UNREFERENCED_PARAM(outputsNumber);
        return 0;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// InitializeNclibDmmSwitchContext
    ///
    /// @brief  One time context initialization for DmmSwitch (Context should be passed to NcLibDmmSwitch)
    ///
    /// @param  ppDmmSwitchContext      Pointer to context to be initialized
    /// @param  windowSeconds           History size in seconds (chromatix field)
    /// @param  fps                     EVA/DMM/DME fps
    /// @param  enableExternalControl   Enable external indicator to enable/disable DMM (chromatix field)
    ///
    /// @return CamxResult
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual int32_t InitializeNclibDmmSwitchContext(
        VOID** ppDmmSwitchContext,
        UINT32 windowSeconds,
        UINT32 fps,
        BOOL   enableExternalControl)
    {
        CAMX_UNREFERENCED_PARAM(ppDmmSwitchContext);
        CAMX_UNREFERENCED_PARAM(windowSeconds);
        CAMX_UNREFERENCED_PARAM(fps);
        CAMX_UNREFERENCED_PARAM(enableExternalControl);
        return 0;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// DeInitializeNclibDmmSwitchContext
    ///
    /// @brief  One time de-initialization following DmmSwitch
    ///
    /// @param  ppDmmSwitchContext       Pointer to DMM Switch context to be DeInitialized
    ///
    /// @return CamxResult
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CamxResult DeInitializeNclibDmmSwitchContext(
        VOID**  ppDmmSwitchContext)
    {
        CAMX_UNREFERENCED_PARAM(ppDmmSwitchContext);
        return CamxResultSuccess;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// RunNclibDmmSwitch
    ///
    /// @brief  One time context initialization for DmmSwitch (Context should be passed to NcLibDmmSwitch)
    ///
    /// @param  pDmmSwitchContext       Pointer to context to be initialized
    /// @param  rChx                    Reference to DmmSwitchChromatix struct
    /// @param  externalControl         True to force DMM shut off
    /// @param  evaDetector             EVA detector result, 1 for DMM and 0 for DME
    /// @param  rNclibDecision          Reference to Nclib decision 1 for DMM and 0 for DME only
    ///
    /// @return CamxResult
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CamxResult RunNclibDmmSwitch(
        VOID*                        pDmmSwitchContext,
        EvaDmmSwitchChromatix&       rChx,
        BOOL                         externalControl,
        UINT8                        evaDetector,
        EVA_NCLIB_DMM_SWITCH&        rNclibDecision)
    {
        CAMX_UNREFERENCED_PARAM(pDmmSwitchContext);
        CAMX_UNREFERENCED_PARAM(rChx);
        CAMX_UNREFERENCED_PARAM(externalControl);
        CAMX_UNREFERENCED_PARAM(evaDetector);
        CAMX_UNREFERENCED_PARAM(rNclibDecision);
        return CamxResultSuccess;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// FetchPipelineCapability
    ///
    /// @brief  Update the ISP pipeline capability
    ///
    /// @return Poiter to the Capbility Structure
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE VOID* FetchPipelineCapability()
    {
        return m_pCapability;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetLibVersion
    ///
    /// @brief  Get library version
    ///
    /// @param  titanVersion    Chipset Version
    /// @param  pLibVersionInfo Library version info
    /// @param  size            Library version info
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static VOID GetLibVersion(
        UINT32      titanVersion,
        VOID*       pLibVersionInfo,
        UINT        size);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// SetPipelineCapability
    ///
    /// @brief  Helper method to set PipelineCapability
    ///
    /// @param  pCapability Pointer to the Capability Structure
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE VOID SetPipelineCapability(
        VOID* pCapability)
    {
        m_pCapability = pCapability;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// ProgramIQModuleEnableConfig
    ///
    /// @brief  Reprogram the Module enable settings for the IQ Modules
    ///
    /// @param  pInputData          Pointer to the input data
    /// @param  pISPData            Pointer to the ISP internal data
    /// @param  pIFEOutputPathInfo  Pointer to the IFE output path data
    ///
    /// @return CamxResult True on successful execution else False on failure
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CamxResult ProgramIQModuleEnableConfig(
        ISPInputData*       pInputData,
        ISPInternalData*    pISPData,
        IFEOutputPath*      pIFEOutputPathInfo)
    {
        CAMX_UNREFERENCED_PARAM(pInputData);
        CAMX_UNREFERENCED_PARAM(pISPData);
        CAMX_UNREFERENCED_PARAM(pIFEOutputPathInfo);
        return CamxResultSuccess;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetISPIQModulesOfType
    ///
    /// @brief  Get ISP IQ module
    ///
    /// @param  moduleType  Module type
    /// @param  pModuleInfo Pointer to the module info
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual VOID GetISPIQModulesOfType(
        ISPIQModuleType moduleType,
        VOID*           pModuleInfo)
    {
        CAMX_UNREFERENCED_PARAM(moduleType);
        CAMX_UNREFERENCED_PARAM(pModuleInfo);
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// DumpTuningMetadata
    ///
    /// @brief  Helper to publish tuning metadata
    ///
    /// @param  pInputData          Pointer to the input data
    /// @param  pDebugDataWriter    Pointer to tuning-data writer
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual VOID DumpTuningMetadata(
        ISPInputData*       pInputData,
        DebugDataWriter*    pDebugDataWriter)
    {
        CAMX_UNREFERENCED_PARAM(pInputData);
        CAMX_UNREFERENCED_PARAM(pDebugDataWriter);
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// FillFlushConfig
    ///
    /// @brief  Helper function to fill the Flush Config
    ///
    /// @param  pCmdBuffer Pointer to the command buffer
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual VOID FillFlushConfig(
        CmdBuffer*  pCmdBuffer)
    {
        CAMX_UNREFERENCED_PARAM(pCmdBuffer);
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetICPClockAndBandWidthConfigurationVersion
    ///
    /// @brief  Helper to Get BandWidth configuration
    ///
    /// @return ICPBWconfiguration
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual UINT32 GetICPClockAndBandWidthConfigurationVersion()
    {
        return CSLICPGenericBlobCmdBufferClkV2;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// SetupCoreConfig
    ///
    /// @brief  Helper function to setup Core Config
    ///
    /// @param  pCmdBuffer      Pointer to the command buffer
    /// @param  pStatsTapOut    Pointer to stats tap-out config
    /// @param  pCfg            Pointer to the Core Config Structure
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CamxResult SetupCoreConfig(
        CmdBuffer*      pCmdBuffer,
        IFEStatsTapOut* pStatsTapOut,
        VOID*           pCfg)
    {
        CAMX_UNREFERENCED_PARAM(pCmdBuffer);
        CAMX_UNREFERENCED_PARAM(pStatsTapOut);
        CAMX_UNREFERENCED_PARAM(pCfg);

        return CamxResultSuccess;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// UpdateModuleConfig
    ///
    /// @brief  Helper function to update module Config data
    ///
    /// @param  pCmdBuffer      Pointer to the command buffer
    /// @param  portID          Port ID
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CamxResult UpdateModuleConfig(
        CmdBuffer*      pCmdBuffer,
        UINT            portID)
    {
        CAMX_UNREFERENCED_PARAM(pCmdBuffer);
        CAMX_UNREFERENCED_PARAM(portID);

        return CamxResultSuccess;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// FillCGCConfig
    ///
    /// @brief  Helper function to fill the CGC Config
    ///
    /// @param  pInputData Pointer to the Input data
    /// @param  pCmdBuffer Pointer to the command buffer
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual VOID FillCGCConfig(
        ISPInputData* pInputData,
        CmdBuffer*    pCmdBuffer)
    {
        CAMX_UNREFERENCED_PARAM(pCmdBuffer);
        CAMX_UNREFERENCED_PARAM(pInputData);
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// UpdateWMConfig
    ///
    /// @brief  Helper function to Update WM Config
    ///
    /// @param  pCmdBuffer      Pointer to the command buffer
    /// @param  pCalculatedData Pointer to the ISPInetnalData Structure
    ///
    /// @return CamxResultSuccess if success
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CamxResult UpdateWMConfig(
        CmdBuffer*       pCmdBuffer,
        ISPInternalData* pCalculatedData)
    {
        CAMX_UNREFERENCED_PARAM(pCmdBuffer);
        CAMX_UNREFERENCED_PARAM(pCalculatedData);

        return CamxResultSuccess;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// HardCodeSettings
    ///
    /// @brief  Helper function to HardCode Settings
    ///
    /// @param  pCmdBuffer Pointer to the command buffer
    ///
    /// @return CamxResultSuccess if success
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CamxResult HardCodeSettings(
        CmdBuffer* pCmdBuffer)
    {
        CAMX_UNREFERENCED_PARAM(pCmdBuffer);
        return CamxResultSuccess;
    }


    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetISPAcquireInputInfoVersion
    ///
    /// @brief  Helper Function to Get ISPAcquireInputVersion
    ///
    /// @return UINT32
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CAMX_INLINE UINT32 GetISPAcquireInputInfoVersion()
    {
        return ISPAcquireInputVersion1;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetISPAcquireCommonInfoVersion
    ///
    /// @brief  Helper Function to Get ISPAcquireInputVersion
    ///
    /// @return UINT32
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CAMX_INLINE UINT32 GetISPAcquireCommonInfoVersion()
    {
        return ISPAcquireCommonVersion1;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetAcquireHWStructVersion
    ///
    /// @brief  Helper Function to Get ISPAcquireInputVersion
    ///
    /// @return UINT32
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CAMX_INLINE UINT32 GetAcquireHWStructVersion()
    {
        return CSLAcquiredDeviceVersion1;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetIFEDefaultConfig
    ///
    /// @brief  Helper to populate default IFE configuration for IFE modules
    ///
    /// @param  pDefaultData    Pointer to the data to be use as default for IFE modules that differ from version to version
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual VOID GetIFEDefaultConfig(
        IFEDefaultModuleConfig* pDefaultData)
    {
        CAMX_UNREFERENCED_PARAM(pDefaultData);
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetOPEDefaultConfig
    ///
    /// @brief  Helper to populate default OPE configuration for OPE modules
    ///
    /// @param  pDefaultData    Pointer to the data to be use as default for OPE modules that differ from version to version
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual VOID GetOPEDefaultConfig(
        OPEDefaultModuleConfig* pDefaultData)
    {
        CAMX_UNREFERENCED_PARAM(pDefaultData);
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetCapability
    ///
    /// @brief  virtual method to get the isp pipeline capability
    ///
    /// @param  pCapabilityInfo Pointer to the structure into which capability info is filled
    ///
    /// @return CamxResult
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CamxResult GetCapability(
        VOID* pCapabilityInfo)
    {
        CAMX_UNREFERENCED_PARAM(pCapabilityInfo);

        return CamxResultSuccess;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetPDHWCapability
    ///
    /// @brief  virtual method to get the isp pipeline PDHW capability
    ///
    /// @param  pCapabilityInfo Pointer to the structure into which capability info is filled
    /// @param  profileID       IFE node profile
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual VOID GetPDHWCapability(
        AFHWAvailablity* pCapabilityInfo,
        IFEProfileId     profileID)
    {
        CAMX_UNREFERENCED_PARAM(profileID);

        if (NULL != pCapabilityInfo)
        {
            pCapabilityInfo->isDualPDHwAvailable            = FALSE;
            pCapabilityInfo->isLCRHwAvailable               = FALSE;
            pCapabilityInfo->isSparsePDHwAvailable          = FALSE;
            pCapabilityInfo->isT3PDPixelExtractorAvailable  = FALSE;
            pCapabilityInfo->PDHWVersion                    = PDHWVersionInvalid;
        }
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetCAFHWCapability
    ///
    /// @brief  virtual method to get the isp pipeline CAF HW capability
    ///
    /// @param  pCapabilityInfo Pointer to the structure into which capability info is filled
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual VOID GetCAFHWCapability(
        AFHWAvailablity* pCapabilityInfo)
    {
        if (NULL != pCapabilityInfo)
        {
            pCapabilityInfo->isCAFHwAvailable = FALSE;
            pCapabilityInfo->windowType       = AFFloatingWindow;
        }
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// StopPathAtCSIDFrameBoundary
    ///
    /// @brief  virtual method to Stop CSID at Frame boundary
    ///
    /// @param  pathInfo       IFE Output Path
    /// @param  pCmdBuffer     Pointer to the command buffer
    ///
    /// @return CamxResult
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CamxResult StopPathAtCSIDFrameBoundary(
        UINT       pathInfo,
        CmdBuffer* pCmdBuffer)
    {
        CAMX_UNREFERENCED_PARAM(pathInfo);
        CAMX_UNREFERENCED_PARAM(pCmdBuffer);

        return CamxResultSuccess;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// ResumePathAtCSIDFrameBoundary
    ///
    /// @brief  virtual method to Stop CSID at Frame boundary
    ///
    /// @param  pathInfo       IFE Output Path
    /// @param  pCmdBuffer     Pointer to the command buffer
    ///
    /// @return CamxResult
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CamxResult ResumePathAtCSIDFrameBoundary(
        UINT       pathInfo,
        CmdBuffer* pCmdBuffer)
    {
        CAMX_UNREFERENCED_PARAM(pathInfo);
        CAMX_UNREFERENCED_PARAM(pCmdBuffer);

        return CamxResultSuccess;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// SetupFlushRegDump
    ///
    /// @brief  virtual method to setup ISP Register Dump structures
    ///
    /// @param  pFlushBuffer Pointer to the flush dump Buffer
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual VOID SetupFlushRegDump(
        VOID* pFlushBuffer)
    {
        CAMX_UNREFERENCED_PARAM(pFlushBuffer);
        return;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// ParseFlushRegDump
    ///
    /// @brief  virtual method to parse ISP Register Dump structures
    ///
    /// @param  pFlushBuffer Pointer to the flush dump Buffer
    /// @param  pBankUpdate  Pointer to the DMI Bank Update
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual VOID ParseFlushRegDump(
        VOID*             pFlushBuffer,
        VOID*             pBankUpdate)
    {
        CAMX_UNREFERENCED_PARAM(pFlushBuffer);
        CAMX_UNREFERENCED_PARAM(pBankUpdate);
        return;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// UpdateDMIBankSelectValue
    ///
    /// @brief  virtual method to update DMI bank select to a given value
    ///
    /// @param  pBankUpdate     Pointer to the DMI Bank Update
    /// @param  isBankValueZero True if the DMI bank to be updated to bank zero
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual VOID UpdateDMIBankSelectValue(
        VOID* pBankUpdate,
        BOOL  isBankValueZero)
    {
        CAMX_UNREFERENCED_PARAM(pBankUpdate);
        CAMX_UNREFERENCED_PARAM(isBankValueZero);
        return;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// SetupHangRegDump
    ///
    /// @brief  virtual method to setup ISP Register Dump structures
    ///
    /// @param  pHangBuffer     Pointer to the hang dump Buffer
    /// @param  p_mode          IFE/TFE mode
    /// @param  isPerFrameDump  indicator for per frame dump
    /// @param  pBufferOffset   Pointer to the buffer Offset
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual VOID SetupHangRegDump(
        VOID*         pHangBuffer,
        VOID*         p_mode,
        BOOL          isPerFrameDump,
        UINT32*       pBufferOffset)
    {
        CAMX_UNREFERENCED_PARAM(pHangBuffer);
        CAMX_UNREFERENCED_PARAM(isPerFrameDump);
        CAMX_UNREFERENCED_PARAM(p_mode);
        CAMX_UNREFERENCED_PARAM(pBufferOffset);

        return;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// ParseHangRegDump
    ///
    /// @brief  Helper method to parse ISP Register Dump structures
    ///
    /// @param  pHangBuffer Pointer to the flush dump Buffer
    /// @param  pMode       IFE/TFE mode
    /// @param  leftHangFd  file descriptor fd for left Stripe
    /// @param  rightHangFd file descriptor fd for right Stripe
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual VOID ParseHangRegDump(
        VOID* pHangBuffer,
        VOID* pMode,
        INT   leftHangFd,
        INT   rightHangFd)
    {
        CAMX_UNREFERENCED_PARAM(pHangBuffer);
        CAMX_UNREFERENCED_PARAM(pMode);
        CAMX_UNREFERENCED_PARAM(leftHangFd);
        CAMX_UNREFERENCED_PARAM(rightHangFd);
        return;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetFlushDumpBufferSize
    ///
    /// @brief  Helper method to return size of the Flush Bump
    ///
    /// @return Size of the Dump buffer
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    UINT32 GetFlushDumpBufferSize()
    {
        return m_flushDumpBufferSizeBytes;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// SetFlushDumpBufferSize
    ///
    /// @brief  Helper method to set Flush Dump Buffer Size
    ///
    /// @param  sizeBytes size of the buffer in bytes
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    VOID SetFlushDumpBufferSize(
        UINT32 sizeBytes)
    {
        m_flushDumpBufferSizeBytes = sizeBytes;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// IFEPartialTileInfo
    ///
    /// @brief  Helper method to set IFE Partial Tile Regs
    ///
    /// @param  rIFELeftPartialTileShift  holds the value of Left Partial Tile Shift
    /// @param  rIFELeftPartialTileMask   holds the value of Left Partial Tile Mask
    /// @param  rIFERightPartialTileShift holds the value of Right Partial Tile Shift
    /// @param  rIFERightPartialTileMask  holds the value of Right Partial Tile Mask
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static VOID IFEPartialTileInfo(
        UINT& rIFELeftPartialTileShift,
        UINT& rIFELeftPartialTileMask,
        UINT& rIFERightPartialTileShift,
        UINT& rIFERightPartialTileMask);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetHangDumpBufferSize
    ///
    /// @brief  Helper method to return size of the Hang Dump
    ///
    /// @return Size of the Dump buffer
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    UINT32 GetHangDumpBufferSize()
    {
        return m_hangDumpBufferSizeBytes;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// SetRegisterDumpIndex
    ///
    /// @brief  Helper method to set Register Dump Index
    ///
    /// @param  leftRegDumpIndex  Left register dump Index
    /// @param  rightRegDumpIndex Right register dump Index
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE VOID SetRegisterDumpIndex(
        UINT leftRegDumpIndex,
        UINT rightRegDumpIndex)
    {
        m_leftRegDumpIndex  = leftRegDumpIndex;
        m_rightRegDumpIndex = rightRegDumpIndex;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetIFEBUSWRVersion
    ///
    /// @brief  Helper method to return IFE BUS Version
    ///
    /// @return IFE BUS Write Master Version
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual IFEBusWriteHWVersion GetIFEBUSWRVersion()
    {
        // returning invalid for So that All IFE Pipelines will implement
        return IFEBusWriteHWInvalid;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetInSensorZoomPDSkipCount
    ///
    /// @brief  Helper Function to Get InSensorZoomPDSkipCount
    ///
    /// @return UINT32
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual UINT32 GetInSensorZoomPDSkipCount()
    {
        return 0;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// SetNumberOfHangDumpRegisters
    ///
    /// @brief  Helper method to Set Number of the Hang Dump Registers
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    VOID SetNumberOfHangDumpRegisters(
        UINT32 Bytes)
    {
        m_NumberOfhangDumpRegisters = Bytes;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetNumberOfHangDumpRegisters
    ///
    /// @brief  Helper method to return Number of the Hang Dump Registers
    ///
    /// @return Size of the Dump buffer
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    UINT32 GetNumberOfHangDumpRegisters()
    {
        return m_NumberOfhangDumpRegisters;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// SetHangDumpBufferSize
    ///
    /// @brief  Sets the buffer size of the Hang Dump
    ///
    /// @param  sizeBytes size of the buffer in bytes
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    VOID SetHangDumpBufferSize(
        UINT sizeBytes)
    {
        m_hangDumpBufferSizeBytes = sizeBytes;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetRegDumpBufferSize
    ///
    /// @brief  Helper method to return size of the Per frame Reg Dump
    ///
    /// @return Size of the Dump bfer
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    UINT32 GetRegDumpBufferSize()
    {
        return m_regDumpBufferSizeBytes;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// SetRegDumpBufferSize
    ///
    /// @brief  Helper method to set size of the Per frame Reg Dump
    ///
    /// @param  sizeBytes size of the buffer in bytes
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    VOID SetRegDumpBufferSize(
        UINT32 sizeBytes)
    {
        CAMX_LOG_VERBOSE(CamxLogGroupISP, "Reg Dump  Size = %d", sizeBytes);
        m_regDumpBufferSizeBytes = sizeBytes;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetBFHWCapability
    ///
    /// @brief  virtual method to get the isp pipeline BF HW capability
    ///
    /// @param  pCapabilityInfo Pointer to the structure into which capability info is filled
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual VOID GetBFHWCapability(
        AFBAFHardwareCapability* pCapabilityInfo)
    {
        if (NULL != pCapabilityInfo)
        {
            pCapabilityInfo->windowType    = AFFloatingWindow;
        }
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetBFWHWCapability
    ///
    /// @brief  virtual method to get the isp pipeline BFW HW capability
    ///
    /// @param  pCapabilityInfo Pointer to the structure into which capability info is filled
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual VOID GetBFWHWCapability(
        BFWHWCapability* pCapabilityInfo)
    {
        if (NULL != pCapabilityInfo)
        {
            pCapabilityInfo->isBFWHwAvailable = FALSE;
        }
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetIFEStatsCapability
    ///
    /// @brief  virtual method to get the isp pipeline BF HW capability
    ///
    /// @param  pCapabilityInfo Pointer to the structure into which capability info is filled
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual VOID GetIFEStatsCapability(
        IFEStatsHWCapability* pCapabilityInfo)
    {
        if (NULL != pCapabilityInfo)
        {
            pCapabilityInfo->AECBEStatsWidth        = AECBEStatsMaxWidth;
            pCapabilityInfo->AECBEStatsHeight       = AECBEStatsMaxHeight;
            pCapabilityInfo->AWBBGStatsWidth        = AWBBGStatsMaxWidth;
            pCapabilityInfo->AWBBGStatsHeight       = AWBBGStatsMaxHeight;
            pCapabilityInfo->BayerRS16StatsWidth    = BayerRS16StatsWidth;
            pCapabilityInfo->BayerRS16StatsHeight   = BayerRS16StatsHeight;
            pCapabilityInfo->BFHistStatsWidth       = BFStatsMaxWidth;
            pCapabilityInfo->BFHistStatsHeight      = BFStatsMaxHeight;
            pCapabilityInfo->BFWStatsWidth          = BFWStatsOutputWidth;
            pCapabilityInfo->BFWStatsRegion         = BFWStatsMaximumRegion;
            pCapabilityInfo->BFStats25Width         = BFStats25Width;
            pCapabilityInfo->BFStats25Height        = BFStats25Height;
            pCapabilityInfo->BHistStatsWidth        = BHistStatsWidth;
            pCapabilityInfo->BHistStatsHeight       = BHistStatsHeight;
            pCapabilityInfo->CAFStatsWidth          = CAFStatsGridMaxWidth;
            pCapabilityInfo->CAFStatsHeight         = CAFStatsMaxHeight;
            pCapabilityInfo->CSStatsWidth           = CSStatsWidth;
            pCapabilityInfo->CSStatsHeight          = CSStatsHeight;
            pCapabilityInfo->HDRBEStatsWidth        = HDRBEStatsMaxWidth;
            pCapabilityInfo->HDRBEStatsHeight       = HDRBEStatsMaxHeight;
            pCapabilityInfo->HDRBHistStatsWidth     = HDRBHistStatsMaxWidth;
            pCapabilityInfo->HDRBHistStatsHeight    = HDRBHistStatsMaxHeight;
            pCapabilityInfo->IHistStatsWidth        = IHistStatsWidth;
            pCapabilityInfo->IHistStatsHeight       = IHistStatsHeight;
            pCapabilityInfo->TintlessBGStatsWidth   = TintlessBGStatsWidth;
            pCapabilityInfo->TintlessBGStatsHeight  = TintlessBGStatsHeight;
            pCapabilityInfo->RSStatsWidth           = RSStatsWidth;
            pCapabilityInfo->RSStatsHeight          = RSStatsHeight;
            pCapabilityInfo->LTMDCStatsWidth        = LTMDCStatsMaxWidth;
            pCapabilityInfo->LTMDCStatsHeight       = LTMDCStatsMaxHeight;
            pCapabilityInfo->IFELiteBG16StatsWidth  = IFELiteBG16StatsWidth;
            pCapabilityInfo->IFELiteBG16StatsHeight = IFELiteBG16StatsHeight;
        }
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetUBWCModeConfig
    ///
    /// @brief  Helper function to get UBWC mode Config
    ///
    /// @param  pImageFormat  Imageformat pointer
    /// @param  planeIndex    planeIndex of a format
    ///
    /// @return modeConfig value
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual UINT32 GetUBWCModeConfig(
        const ImageFormat* pImageFormat,
        UINT32 planeIndex);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetUBWCPackerConfig
    ///
    /// @brief  Helper function to get UBWC Packer Config
    ///
    /// @param  pImageFormat   Imageformat pointer
    /// @param  pPackerConfig  pPackerConfig pointer
    ///
    /// @return CamxResult
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CamxResult GetUBWCPackerConfig(
        const ImageFormat* pImageFormat,
        UINT32* pPackerConfig)
    {
        CamxResult result = CamxResultSuccess;
        *pPackerConfig = 0;
        switch (pImageFormat->format)
        {
            case Format::UBWCTP10:
                *pPackerConfig = 0xb;
                break;
            case Format::UBWCNV124R:
                *pPackerConfig = 0xe;
                break;
            default:
                CAMX_LOG_ERROR(CamxLogGroupISP, "Invalid UBWC format: %d",
                    pImageFormat->format);
                result = CamxResultEFailed;
                break;
        }
        return result;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetIFEBandWidthConfigurationVersion
    ///
    /// @brief  Helper to Get BandWidth configuration
    ///
    /// @return IFEBWconfiguration
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual UINT32 GetIFEBandWidthConfigurationVersion()
    {
        return IFEGenericBlobTypeResourceBWConfigV2;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetBPSSWNRMModuleVersion
    ///
    /// @brief  Get BPS SW NRM version from module info
    ///
    /// @param  pModuleInfo     Pointer to BPS module info
    ///
    /// @return SW NRM version of the module in this pipeline
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual SWNRMVersion GetBPSSWNRMModuleVersion(
        BPSIQModuleInfo* pModuleInfo)
    {
        CAMX_UNREFERENCED_PARAM(pModuleInfo);

        // Return invalid by default. All BPS pipelines supporting a specific NRM version must override this virtual function.
        return SWNRMVersion::NRMInvalid;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetIFESWNRMModuleVersion
    ///
    /// @brief  Get IFE SW NRM version from module info
    ///
    /// @param  pModuleInfo     Pointer to IFE module info
    ///
    /// @return SW NRM version of the module in this pipeline
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual SWNRMVersion GetIFESWNRMModuleVersion(
        IFEIQModuleInfo* pModuleInfo)
    {
        CAMX_UNREFERENCED_PARAM(pModuleInfo);

        // Return invalid by default. All IFE pipelines supporting a specific NRM version must override this virtual function.
        return SWNRMVersion::NRMInvalid;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// UseGeoLib
    ///
    /// @brief  Decides GeoLib is needed for this pipeline
    ///
    /// @return BOOL
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual BOOL UseGeoLib()
    {
        return FALSE;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// SetIFEMode
    ///
    /// @brief  Set IFE Mode
    ///
    /// @param  IFEMode  IFE Mode
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE VOID SetIFEMode(
        IFEModuleMode IFEMode)
    {
        m_IFEMode = IFEMode;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetIFEMode
    ///
    /// @brief  Helper to Get IFE Mode
    ///
    /// @return IFEModuleMode
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE IFEModuleMode GetIFEMode()
    {
        return m_IFEMode;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// SetTitanChipVersion
    ///
    /// @brief  Set Titan Chip set version
    ///
    /// @param  titanChipVersion  titan chip set version
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    VOID SetTitanChipVersion(
        CSLCameraTitanChipVersion titanChipVersion)
    {
        m_titanChipVersion = titanChipVersion;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetTitanChipVersion
    ///
    /// @brief  Helper to Get Titan Chip version
    ///
    /// @return CSLCameraTitanChipVersion
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CSLCameraTitanChipVersion GetTitanChipVersion()
    {
        return m_titanChipVersion;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// SetTitanVersion
    ///
    /// @brief  Set Titan version
    ///
    /// @param  titanVersion  titan chip set version
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    VOID SetTitanVersion(
        CSLCameraTitanVersion titanVersion)
    {
        m_titanVersion = titanVersion;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetTitanVersion
    ///
    /// @brief  Helper to Get Titan Chip version
    ///
    /// @return CSLCameraTitanChipVersion
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CSLCameraTitanVersion GetTitanVersion()
    {
        return m_titanVersion;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetRegCmdSize
    ///
    /// @brief  Helper to Get Rgeister Command size needed for this pipeline in DWRDS
    ///
    /// @return size of the Rgeister comd size in DWORDS
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    UINT32 GetRegCmdSize()
    {
        return m_regCmdSizeInDwords;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// SetRegCmdSize
    ///
    /// @brief  Helper to Set Rgeister Command size needed for this pipeline in DWRDS
    ///
    /// @param  sizeInDwords  Size of the Reg Cmd in DWORDS
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    VOID SetRegCmdSize(
        UINT32 sizeInDwords)
    {
        m_regCmdSizeInDwords = sizeInDwords;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// SetThrottlePattern
    ///
    /// @brief  Helper function to Set Throttle pattern
    ///
    /// @param  throughPut  ThroughtPut rate
    /// @param  pCmdBuffer  Pointer to the command buffer
    ///
    /// @return CamxResultSuccess if success
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CamxResult SetThrottlePattern(
        FLOAT      throughPut,
        CmdBuffer* pCmdBuffer)
    {
        CAMX_UNREFERENCED_PARAM(throughPut);
        CAMX_UNREFERENCED_PARAM(pCmdBuffer);

        return CamxResultSuccess;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// SetCommonConfig
    ///
    /// @brief  Helper function to Set common configuration Params
    ///
    /// @param  pConfig     Pointer to the Common config
    /// @param  pCmdBuffer  Pointer to the command buffer
    ///
    /// @return CamxResultSuccess if success
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CamxResult SetCommonConfig(
        IFECommonConfig* pConfig,
        CmdBuffer*       pCmdBuffer)
    {
        CAMX_UNREFERENCED_PARAM(pConfig);
        CAMX_UNREFERENCED_PARAM(pCmdBuffer);

        return CamxResultSuccess;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetCSIDClockParameters
    ///
    /// @brief  virtual function to get linkoverhead and bits per line for CSID clock calculation
    ///
    /// @param  pBitsPerLane     Pointer to bits per line
    /// @param  pLinkOverhead    pointer to linkoverhead
    /// @param  laneType         CPHY or DPHY
    /// @param  laneCount        lane count
    ///
    /// @return CamxResultSuccess if success
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CamxResult GetCSIDClockParameters(
        UINT32* pBitsPerLane,
        FLOAT*  pLinkOverhead,
        UINT32  laneType,
        UINT32  laneCount)
    {
        CAMX_UNREFERENCED_PARAM(laneType);
        CAMX_UNREFERENCED_PARAM(laneCount);

        *pBitsPerLane  = 0;
        *pLinkOverhead = 0;
        // Return CamxResultEUnsupported by default.
        // All IFE pipelines supporting Dynamic CSID clock rate must override this function.
        return CamxResultEUnsupported;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// FillTFEIQModuleVersion
    ///
    /// @brief  Helper to Fill TFE IQ module Version
    ///
    /// @param  pModuleVersion Pointer to the module version
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual VOID FillTFEIQModuleVersion(
        TFEIQHWVersion*  pModuleVersion)
    {
        CAMX_UNREFERENCED_PARAM(pModuleVersion);
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// FillTFEStatsModuleVersion
    ///
    /// @brief  Helper to Fill TFE Stats module Version
    ///
    /// @param  pModuleVersion Pointer to the module version
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual VOID FillTFEStatsModuleVersion(
        TFEStatsHWVersion*  pModuleVersion)
    {
        CAMX_UNREFERENCED_PARAM(pModuleVersion);
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// FillICAUsecaseDependencyInfo
    ///
    /// @brief  Helper to fill ICA usecase dependency info based on usecase
    ///
    /// @param  usecaseSeletionData usecase selection data
    /// @param  instanceID          instance ID
    ///
    /// @return IPEICAUsecaseInfo Uscase dependency info
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual IPEICAUsecaseInfo FillICAUsecaseDependencyInfo(
        IPEICAUsecaseSelectionData usecaseSeletionData,
        UINT                       instanceID)
    {
        IPEICAUsecaseInfo usecaseDependencyInfo;
        Utils::Memset(&usecaseDependencyInfo, 0, sizeof(IPEICAUsecaseInfo));
        CAMX_UNREFERENCED_PARAM(usecaseSeletionData);
        CAMX_UNREFERENCED_PARAM(instanceID);
        return usecaseDependencyInfo;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetModuleDebugDataSize
    ///
    /// @brief  Helper meothod get debug data size for given module
    ///
    /// @param  moduleType         Requested module type
    /// @param  path               Path of module
    /// @param  pDebugDataWriter   Debug data writer pointer
    /// @param  isMFHDR            if MFHDR
    /// @param  currentModNumOfExp No. of exposures
    ///
    /// @return SIZE_T Debug data size for valid module
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual SIZE_T GetModuleDebugDataSize(
        ISPIQModuleType  moduleType,
        UINT32           path,
        DebugDataWriter* pDebugDataWriter,
        BOOL             isMFHDR,            // IFE modules need to know if MFHDR. Some modules need to handle
                                             // multi-context/exposure. This requires to consider extra data.
        UINT32           currentModNumOfExp)
    {
        CAMX_UNREFERENCED_PARAM(moduleType);
        CAMX_UNREFERENCED_PARAM(path);
        CAMX_UNREFERENCED_PARAM(pDebugDataWriter);
        CAMX_UNREFERENCED_PARAM(isMFHDR);
        CAMX_UNREFERENCED_PARAM(currentModNumOfExp);
        return 0;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// UpdateAECGainForMFHDR
    ///
    /// @brief  function to update AEC Gain for MFHDR IPE pipeline
    ///
    /// @param  moduleType    IPE IQ module type
    /// @param  pInputData    Pointer to ISP Input data
    /// @param  gtmPercentage gtm percentage
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual VOID UpdateAECGainForMFHDR(
        ISPIQModuleType moduleType,
        ISPInputData*   pInputData,
        FLOAT           gtmPercentage)
    {
        CAMX_UNREFERENCED_PARAM(moduleType);
        CAMX_UNREFERENCED_PARAM(pInputData);
        CAMX_UNREFERENCED_PARAM(gtmPercentage);
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetActiveIQModulesList
    ///
    /// @brief  Helper to Get Active IQ Module List
    ///
    /// @return Returns the refrence  to active IQ Module List
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE std::list<ISPIQModule*>& GetActiveIQModulesList()
    {
        return m_activeModuleList;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetActiveStatsModulesList
    ///
    /// @brief  Helper to Get Active Stats Module List
    ///
    /// @return Returns the reference  to active Stats Module List
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE std::list<ISPStatsModule*>& GetActiveStatsModulesList()
    {
        return m_activeStatsModuleList;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// DumpWMData
    ///
    /// @brief  Dump WM Data information
    ///
    /// @param  fd            File Descriptors
    /// @param  pIFEDebugData Pointer to Debug data
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CAMX_INLINE VOID DumpWMData(
        INT             fd,
        IFEConfigInfo*  pIFEDebugData)
    {
        CAMX_UNREFERENCED_PARAM(pIFEDebugData);
        CAMX_UNREFERENCED_PARAM(fd);
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// QueryCDMDMIType
    ///
    /// @brief  Query the CDMDMI type based on specific titan version
    ///
    /// @return CmdType for the device
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CAMX_INLINE CmdType QueryCDMDMIType()
    {
        return CmdType::CDMDMI;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// HWSupportsDualPD
    ///
    /// @brief  Helper to Check HW Supports Dual PD
    ///
    /// @return Returns True or False
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CAMX_INLINE BOOL HWSupportsDualPD()
    {
        return FALSE;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// IsHWSupportsIndexedBasedWM
    ///
    /// @brief  Helper to Check HW Supports IndexBaed WM for BF/BFW
    ///
    /// @return Returns True or False
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CAMX_INLINE BOOL IsHWSupportsIndexedBasedWM()
    {
        return FALSE;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// StoreFWSetting
    ///
    /// @brief  Store FW Setting Inform to Tunning Meta Data
    ///
    /// @param  pInputData          Pointer to ISPInputDat
    /// @param  pIQsettings         Pointer to IQSetting
    /// @param  pDebugDataWriter    Pointer to debugdata writer
    ///
    /// @return CamxResult
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CAMX_INLINE CamxResult StoreFWSetting(
        ISPInputData*    pInputData,
        VOID*            pIQsettings,
        DebugDataWriter* pDebugDataWriter)
    {
        CAMX_UNREFERENCED_PARAM(pInputData);
        CAMX_UNREFERENCED_PARAM(pIQsettings);
        CAMX_UNREFERENCED_PARAM(pDebugDataWriter);
        return CamxResultSuccess;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetIOPortsSupportedDimension
    ///
    /// @brief  static method to get the node's IO port supported dimension
    ///
    /// @param  titanversion titan version
    /// @param  nodeID node ID
    /// @param  pCapabilityInfo pointer to the capability structure
    ///
    /// @return CamxResult
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static CamxResult GetIOPortsSupportedDimension(
        UINT32 titanversion,
        UINT32 nodeID,
        VOID*  pCapabilityInfo);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// CanSkipIFEIQModule
    ///
    /// @brief  Helper to check if the IQ Module Can be skipped
    ///
    /// @param  module IQ Module Type
    ///
    /// @return TRUE if the module can be skipped
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual BOOL CanSkipIFEIQModule(
        ISPIQModuleType module)
    {
        CAMX_UNREFERENCED_PARAM(module);
        return FALSE;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// IsIQModuleExposureSensitive
    ///
    /// @brief  Helper to check if the IQ module is exposure sensitive
    ///
    /// @param  module IQ Module Type
    ///
    /// @return TRUE if the module is exposure sensitive
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual BOOL IsIQModuleExposureSensitive(
        ISPIQModuleType module)
    {
        CAMX_UNREFERENCED_PARAM(module);
        return FALSE;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// IsStatsModuleExposureSensitive
    ///
    /// @brief  Helper to check if the Stats module is exposure sensitive
    ///
    /// @param  module Stats Module Type
    ///
    /// @return TRUE if the module is exposure sensitive
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual BOOL IsStatsModuleExposureSensitive(
        ISPStatsModuleType module)
    {
        CAMX_UNREFERENCED_PARAM(module);
        return FALSE;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// FillIFEDMIReadInfo
    ///
    /// @brief  Helper function to fill Reg Read Info
    ///
    /// @param  pDMIReadInfo  Pointer to the DMI Read Info to be filled
    /// @param  offset        DMI Reg Offset
    /// @param  bankOffset    DMI Bank Offset
    /// @param  numberOfReads number of DMI Data reads
    /// @param  bankSelect    bank Select
    /// @param  lutSelect     LUT Select
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE VOID FillIFEDMIReadInfo(
        IFERegReadInfo* pDMIReadInfo,
        UINT32          offset,
        UINT32          bankOffset,
        UINT32          numberOfReads,
        UINT32          bankSelect,
        UINT32          lutSelect)
    {
        if (NULL != pDMIReadInfo)
        {
            pDMIReadInfo->readType                                       = IFERegDumpReadTypeDMI;
            pDMIReadInfo->regDescriptor.dmiReadCmd.regWriteCmd[0].offset = offset;
            pDMIReadInfo->regDescriptor.dmiReadCmd.regWriteCmd[0].value  = 0x100000;
            pDMIReadInfo->regDescriptor.dmiReadCmd.numberOfRegWrites++;
            pDMIReadInfo->regDescriptor.dmiReadCmd.regWriteCmd[1].offset = offset + 0x4;
            pDMIReadInfo->regDescriptor.dmiReadCmd.regWriteCmd[1].value  = lutSelect;
            pDMIReadInfo->regDescriptor.dmiReadCmd.numberOfRegWrites++;
            pDMIReadInfo->regDescriptor.dmiReadCmd.regWriteCmd[2].offset = bankOffset;
            pDMIReadInfo->regDescriptor.dmiReadCmd.regWriteCmd[2].value  = bankSelect;
            pDMIReadInfo->regDescriptor.dmiReadCmd.numberOfRegWrites++;
            pDMIReadInfo->regDescriptor.dmiReadCmd.regRangeCmd.numberOfRegisters = numberOfReads;
            pDMIReadInfo->regDescriptor.dmiReadCmd.regRangeCmd.offset            = offset + 0x8;
            pDMIReadInfo->regDescriptor.dmiReadCmd.postregWriteCmd[1].offset     = offset + 0x4;
            pDMIReadInfo->regDescriptor.dmiReadCmd.postregWriteCmd[1].value      = 0;
            pDMIReadInfo->regDescriptor.dmiReadCmd.numberOfPostWrites++;
        }
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// FillBufferNegotiationPortList
    ///
    /// @brief  Fill the node instance buffer negotiation applicable port list
    ///
    /// @return CamxResult
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual CamxResult FillBufferNegotiationPortList(
        const VOID*               pCapabilityInfo,
        std::unordered_set<UINT>& rNegotiationPortList)
    {
        CAMX_UNREFERENCED_PARAM(pCapabilityInfo);
        CAMX_UNREFERENCED_PARAM(rNegotiationPortList);

        return CamxResultSuccess;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// CanSkipIFEStatsModule
    ///
    /// @brief  Helper to check if the Stats Module Can be skipped
    ///
    /// @param  module stats Module Type
    ///
    /// @return TRUE if the module can be skipped
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual  BOOL CanSkipIFEStatsModule(
        ISPStatsModuleType module)
    {
        CAMX_UNREFERENCED_PARAM(module);
        return FALSE;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// UpdateIPEIQModuleList
    ///
    /// @brief  Helper to update IPE IQ module list to MFHDR 3 exposure
    ///
    /// @param  pCapabilityInfo                 Pointer to the structure into which capability info is filled
    /// @param  updateMethodIPEIQModuleList     The update method enum for IPE IQ module list
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual VOID UpdateIPEIQModuleList(
        VOID*                           pCapabilityInfo,
        UpdateMethodIPEIQModuleList     updateMethodIPEIQModuleList)
    {
        CAMX_UNREFERENCED_PARAM(pCapabilityInfo);
        CAMX_UNREFERENCED_PARAM(updateMethodIPEIQModuleList);
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetInputPortName
    ///
    /// @brief  Get name of Input Port based on Port Id
    ///
    /// @return Pointer to Port name string
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual const CHAR* GetInputPortName(
        UINT portId) const
    {
        CAMX_UNREFERENCED_PARAM(portId);
        return NULL;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetOutputPortName
    ///
    /// @brief  Get name of Output Port based on Port Id
    ///
    /// @return Pointer to Port name string
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual const CHAR* GetOutputPortName(
        UINT portId) const
    {
        CAMX_UNREFERENCED_PARAM(portId);
        return NULL;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// UpdateAECGain
    ///
    /// @brief  update AEC Gain
    ///
    /// @param  mType          ISP IQModule Type
    /// @param  pInputData     Pointer to the input data from Node
    /// @param  gtmPercentage  TMC GTM tuning percentage
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual VOID UpdateAECGain(
        ISPIQModuleType mType,
        ISPInputData*   pInputData,
        FLOAT           gtmPercentage);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetStaticSettings
    ///
    /// @brief  Helper method to return the settings pointer.
    ///
    /// @return ISPStaticSettings*
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE const ISPStaticSettings* GetStaticSettings() const
    {
        return HwEnvironment::GetInstance()->GetISPStaticSettings();
    }

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

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

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// UpdateALGMPortFormat
    ///
    /// @brief  Function to update ALGM port Format
    ///
    /// @param  firmwareFormat  Format for ALGM port
    ///
    /// @return ImageFormat
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual _ImageFormat UpdateALGMPortFormat(
                _ImageFormat firmwareFormat)
    {
        return firmwareFormat;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// IsCSIDBlobSkipNeededForOfflineISP
    ///
    /// @brief  Method to query if CSID blob needs to skip for offline ife mode.
    ///
    /// @return TRUE/FALSE
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual BOOL IsCSIDBlobSkipNeededForOfflineISP()
    {
        return FALSE;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// SetupIQModulesDMIDumps
    ///
    /// @brief  Setup IQModules DMI Dumps
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    virtual VOID SetupIQModulesDMIDumps();

protected:
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// ISPPipeline
    ///
    /// @brief  Constructor
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ISPPipeline() = default;

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// GetICAUsecaseInfoIndex
    ///
    /// @brief  Set ICA usecase info index
    ///
    /// @param  usecaseMask ICA usecase mask
    ///
    /// @return ICA usecase info index
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    CAMX_INLINE UINT32 GetICAUsecaseInfoIndex(
        UINT32              usecaseMask,
        UINT32              numIPEICAUsecases,
        IPEICAUsecaseInfo   usecaseList[])
    {
        UINT32 index = -1;
        for (UINT32 i = 0; i < numIPEICAUsecases; i++)
        {
            if (usecaseList[i].usecaseMask == usecaseMask)
            {
                index = i;
                break;
            }
        }
        return index;
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// AddICAPerUsecaseDependencyInfo
    ///
    /// @brief  Add ICA per usecase dependency info to m_IPEICAUsecaseDependencyInfo
    ///
    /// @param  rUsecaseInfoToAdd       reference to usecase dependency info to add
    /// @param  pUsecaseInforToReturn   Pointer to usecase dependency info accumilated
    /// @param  instanceID              Instance id
    ///
    /// @return None
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    virtual VOID AddICAPerUsecaseDependencyInfo(
        IPEICAUsecaseInfo&  rUsecaseInfoToAdd,
        IPEICAUsecaseInfo*  pUsecaseInforToReturn,
        UINT                instanceID)
    {
        CAMX_UNREFERENCED_PARAM(rUsecaseInfoToAdd);
        CAMX_UNREFERENCED_PARAM(pUsecaseInforToReturn);
        CAMX_UNREFERENCED_PARAM(instanceID);
    }

    VOID*                      m_pCapability;             ///< Pipeline Capability Info
    std::list<ISPIQModule*>    m_activeModuleList;        ///< Active IQ Moduele List
    std::list<ISPStatsModule*> m_activeStatsModuleList;   ///< Active Stats Module List
    UINT                       m_leftRegDumpIndex;        ///< Left Register Dump Index
    UINT                       m_rightRegDumpIndex;       ///< Right Register Dump Index

    std::vector<ISPRegDumpInfo> m_DMIRegDumpInfo;         ///< DMI reg dump info list
    UINT32                      m_DMIDumpOutputBufferSize;///< DMI reg Dump Buffer Size Bytes
private:

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// CreateIFEPipeline
    ///
    /// @brief  Create proper IFE Pipeline class per version number
    ///
    /// @param  titanVersion    Chipset Version
    ///
    /// @return TRUE if supported
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static ISPPipeline* CreateIFEPipeline(
        UINT32 titanVersion);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// CreateIFELitePipeline
    ///
    /// @brief  Create proper IFELite Pipeline class per version number
    ///
    /// @param  titanVersion    Chipset Version
    ///
    /// @return TRUE if supported
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static ISPPipeline* CreateIFELitePipeline(
        UINT32 titanVersion);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// CreateCSIDPipeline
    ///
    /// @brief  Create proper CSID Pipeline class per version number
    ///
    /// @param  titanVersion    Chipset Version
    ///
    /// @return TRUE if supported
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static ISPPipeline* CreateCSIDPipeline(
        UINT32 titanVersion);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// CreateSFEPipeline
    ///
    /// @brief  Create proper SFE Pipeline class per version number
    ///
    /// @param  titanVersion    Chipset Version
    ///
    /// @return TRUE if supported
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static ISPPipeline* CreateSFEPipeline(
        UINT32 titanVersion);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// CreateIPEPipeline
    ///
    /// @brief  Create proper IPE Pipeline class per version number
    ///
    /// @param  titanVersion    Chipset Version
    ///
    /// @return TRUE if supported
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static ISPPipeline* CreateIPEPipeline(
        UINT32 titanVersion);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// CreateBPSPipeline
    ///
    /// @brief  Create proper BPS Pipeline class per version number
    ///
    /// @param  titanVersion    Chipset Version
    ///
    /// @return TRUE if supported
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static ISPPipeline* CreateBPSPipeline(
        UINT32 titanVersion);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// CreateCREPipeline
    ///
    /// @brief  Create proper CRE Pipeline class per version number
    ///
    /// @param  titanVersion    Chipset Version
    ///
    /// @return TRUE if supported
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static ISPPipeline* CreateCREPipeline(
        UINT32 titanVersion);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// CreateTFEPipeline
    ///
    /// @brief  Create proper TFE Pipeline class per version number
    ///
    /// @param  titanVersion    Chipset Version
    ///
    /// @return TRUE if supported
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static ISPPipeline* CreateTFEPipeline(
        UINT32 titanVersion);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// CreateOPEPipeline
    ///
    /// @brief  Create proper OPE Pipeline class per version number
    ///
    /// @param  titanVersion    Chipset Version
    ///
    /// @return TRUE if supported
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static ISPPipeline* CreateOPEPipeline(
        UINT32 titanVersion);

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// CreateEVAPipeline
    ///
    /// @brief  Create proper EVA Pipeline class per version number
    ///
    /// @param  titanVersion    Chipset Version
    ///
    /// @return TRUE if supported
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static ISPPipeline* CreateEVAPipeline(
        UINT32 titanVersion);

    ISPPipeline(const ISPPipeline&)            = delete; ///< Disallow the copy constructor
    ISPPipeline& operator=(const ISPPipeline&) = delete; ///< Disallow assignment operator

    CSLCameraTitanChipVersion m_titanChipVersion;                ///< Titan Chip Version
    CSLCameraTitanVersion     m_titanVersion;                    ///< Titan Version.
    IFEModuleMode             m_IFEMode;                         ///< IFE mode
    UINT32                    m_hangDumpBufferSizeBytes    = 0;  ///< Hang Dump Buffer Size Bytes
    UINT32                    m_NumberOfhangDumpRegisters  = 0;  ///< Hang Dump Registers To Fill
    UINT32                    m_flushDumpBufferSizeBytes   = 0;  ///< Flush Dump Buffer Size Bytes
    UINT32                    m_regDumpBufferSizeBytes     = 0;  ///< Reg Dump Buffer Size Bytes
    UINT32                    m_regCmdSizeInDwords;              ///< Register Command size in DWORDS
    Bayerwidth                m_bayerWidth;                      ///< pre and post bayer with for titan version
};

CAMX_NAMESPACE_END

#endif // CAMXISPPIPELINE_H
