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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @file  camxhwdefs.h
/// @brief Hardware definitions for all platforms
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#ifndef CAMXHWDEFS_H
#define CAMXHWDEFS_H

#include "camxdefs.h"
#include "camxtypes.h"
#include "camxhwinternaldefs.h"

CAMX_NAMESPACE_BEGIN

/// @brief List of software Nodes
const UINT Sensor                       = 0;
const UINT StatsProcessing              = 1;
const UINT SinkBuffer                   = 2;
const UINT SinkNoBuffer                 = 3;
const UINT SourceBuffer                 = 4;
const UINT AutoFocus                    = 5;
const UINT JPEGAggregator               = 6;
const UINT FDSw                         = 7;
const UINT FDManager                    = 8;
const UINT StatsParse                   = 9;
const UINT OfflineStats                 = 10;
const UINT Torch                        = 11;
const UINT AutoWhiteBalance             = 12;
const UINT HistogramProcess             = 13;
const UINT Tracker                      = 14;
const UINT JPEGSW                       = 15;
const UINT StatsSALINet                 = 16;
const UINT StatsPDNet                   = 17;
const UINT MLAWB                        = 18;

/// @brief Sensor output datatype
const UINT PortSrcTypeUndefined         = 0;
const UINT PortSrcTypePixel             = 1;
const UINT PortSrcTypePDAF              = 2;
const UINT PortSrcTypeHDR               = 3;
const UINT PortSrcTypeMeta              = 4;
const UINT PortSrcTypePixelShort        = 5;
const UINT PortSrcTypePixelMiddle       = 6;
const UINT PortSrcTypePixelLong         = 7;
const UINT PortSrcTypePDAFShort         = 8;
const UINT PortSrcTypePDAFMiddle        = 9;
const UINT PortSrcTypePDAFLong          = 10;
const UINT PortSrcTypePixel1            = 11;
const UINT PortSrcTypePixel2            = 12;
const UINT PortSrcTypePixel3            = 13;
const UINT PortSrcTypePDAF2             = 14;
const UINT PortSrcTypePDAF2Short        = 15;
const UINT PortSrcTypePDAF2Middle       = 16;
const UINT PortSrcTypePDAF2Long         = 17;
const UINT PortSrcTypePixelIR           = 18;
const UINT PortSrcTypeStats             = 19;

/// @brief Sensor output port ID's
const UINT SensorInstanceName0          = 0;
const UINT SensorOutputPort0            = 0;
const UINT SensorOutputPort1            = 1;
const UINT SensorOutputPort2            = 2;
const UINT SensorOutputPort3            = 3;
const UINT SensorOutputPort4            = 4;

const UINT TorchInstanceName0           = 0;
const UINT TorchOutputPort0             = 0;

const UINT StatsProcessingInstanceName0 = 0;
const UINT StatsParseInstanceName0      = 0;
const UINT StatsParseOutputPort0        = 0;

/// @brief Stats Processing node output port names
const UINT StatsProcessingOutputPort0   = 0;

/// @brief Stats Processing node input ports, number values must match XML configuration
const UINT StatsInputPortHDRBE                   = 0;
const UINT StatsInputPortAWBBG                   = 1;
const UINT StatsInputPortHDRBHist                = 2;
const UINT StatsInputPortBHist                   = 3;
const UINT StatsInputPortBF                      = 4;
const UINT StatsInputPortIHist                   = 5;
const UINT StatsInputPortCS                      = 6;
const UINT StatsInputPortRS                      = 7;
const UINT StatsInputPortRDIPDAF                 = 8;
const UINT StatsInputPortTintlessBG              = 9;
const UINT StatsInputPortPDAFType3               = 10;
const UINT StatsInputPortRDIRaw                  = 11;
const UINT StatsInputPortDualPDHWPDAF            = 12;
const UINT StatsInputPortRDIStats                = 13;
const UINT StatsInputPortLCRHW                   = 14;
const UINT StatsInputPortBPSAWBBG                = 15;
const UINT StatsInputPortBPSRegYUV               = 16;
const UINT StatsInputPortLongExposureHDRBE       = 17;
const UINT StatsInputPortLongExposureAWBBG       = 18;
const UINT StatsInputPortLongExposureHDRBHist    = 19;
const UINT StatsInputPortLongExposureBHist       = 20;
const UINT StatsInputPortLongExposureRS          = 21;
const UINT StatsInputPortLongExposureBF          = 22;
const UINT StatsInputPortShortExposureHDRBE      = 23;
const UINT StatsInputPortShortExposureAWBBG      = 24;
const UINT StatsInputPortShortExposureHDRBHist   = 25;
const UINT StatsInputPortShortExposureBHist      = 26;
const UINT StatsInputPortShortExposureRS         = 27;
const UINT StatsInputPortShortExposureBF         = 28;
const UINT StatsInputPortLongExposureTintlessBG  = 29;
const UINT StatsInputPortShortExposureTintlessBG = 30;
const UINT StatsInputPortLongExposureIHist       = 31;
const UINT StatsInputPortShortExposureIHist      = 32;
const UINT StatsInputPortRDISensorMeta           = 33;
const UINT StatsInputPortLongExposureBPSAWBBG    = 34;
const UINT StatsInputPortPreProcessedPDHWPDAF    = 35;
const UINT StatsInputPortLTMDC                   = 36;
const UINT StatsInputPortAECBE                   = 37;
const UINT StatsInputPortBFWExposure1            = 38;
const UINT StatsInputPortAECBEExposure1          = 39;
const UINT StatsInputPortAECBHistExposure1       = 40;
const UINT StatsInputPortTintlessBGExposure1     = 41;
const UINT StatsInputPortAWBBGExposure1          = 42;
const UINT StatsInputPortBFExposure1             = 43;
const UINT StatsInputPortRSExposure1             = 44;
const UINT StatsInputPortIHistExposure1          = 45;

const UINT StatsInputPortBFWExposure2         = 46;
const UINT StatsInputPortAECBEExposure2       = 47;
const UINT StatsInputPortAECBHistExposure2    = 48;
const UINT StatsInputPortTintlessBGExposure2  = 49;
const UINT StatsInputPortAWBBGExposure2       = 50;
const UINT StatsInputPortBFExposure2          = 51;
const UINT StatsInputPortRSExposure2          = 52;
const UINT StatsInputPortIHistExposure2       = 53;
const UINT StatsInputPortBFWExposure3         = 54;
const UINT StatsInputPortAECBEExposure3       = 55;
const UINT StatsInputPortAECBHistExposure3    = 56;
const UINT StatsInputPortTintlessBGExposure3  = 57;
const UINT StatsInputPortAWBBGExposure3       = 58;
const UINT StatsInputPortBFExposure3          = 59;
const UINT StatsInputPortRSExposure3          = 60;
const UINT StatsInputPortIHistExposure3       = 61;

const UINT StatsInputPortBFW                         = 62;
const UINT StatsInputPortT3RDIPD                     = 63;

const UINT StatsInputPortDualPDHWPDAFExposure1       = 64;
const UINT StatsInputPortDualPDHWPDAFExposure2       = 65;
const UINT StatsInputPortDualPDHWPDAFExposure3       = 66;
const UINT StatsInputPortPDHWPreProcessedPDExposure1 = 67;
const UINT StatsInputPortPDHWPreProcessedPDExposure2 = 68;
const UINT StatsInputPortPDHWPreProcessedPDExposure3 = 69;
const UINT StatsInputPortLCRHWExposure1              = 70;
const UINT StatsInputPortLCRHWExposure2              = 71;
const UINT StatsInputPortLCRHWExposure3              = 72;


const UINT StatsInputPortRDIPDAFExposure1            = 73;
const UINT StatsInputPortRDIPDAFExposure2            = 74;
const UINT StatsInputPortRDIPDAFExposure3            = 75;
const UINT StatsInputPortAECBHist                    = 76;
const UINT StatsInputPortHDRBEExposure1              = 77;
const UINT StatsInputPortHDRBEExposure2              = 78;

const UINT StatsInputPortT3RDIPDExposure1            = 79;
const UINT StatsInputPortT3RDIPDExposure2            = 80;
const UINT StatsInputPortT3RDIPDExposure3            = 81;
const UINT StatsInputPortRDIRawExposure1             = 82;

const UINT StatsInputPortBayerRS                     = 83;
const UINT StatsInputPortLongExposureBayerRS         = 84;
const UINT StatsInputPortShortExposureBayerRS        = 85;
const UINT StatsInputPortBayerRSExposure1            = 86;
const UINT StatsInputPortBayerRSExposure2            = 87;
const UINT StatsInputPortBayerRSExposure3            = 88;

const UINT StatsInputPortParsedPDHWPDAF              = 89;

const UINT StatsInputPortCAF                         = 90;
const UINT StatsInputPortCAFExposure1                = 91;
const UINT StatsInputPortCAFExposure2                = 92;
const UINT StatsInputPortCAFExposure3                = 93;
const UINT StatsInputPortHDRBHistExposure1           = 94;
const UINT StatsInputPortHDRBHistExposure2           = 95;
const UINT StatsInputPortParsedPDHWPDAFExposure1     = 96;
const UINT StatsInputPortParsedPDHWPDAFExposure2     = 97;
const UINT StatsInputPortParsedPDHWPDAFExposure3     = 98;
const UINT StatsInputPortRDIPDAF2                    = 99;
const UINT StatsInputPortRDIPDAF2Exposure1           = 100;
const UINT StatsInputPortRDIPDAF2Exposure2           = 101;
const UINT StatsInputPortRDIPDAF2Exposure3           = 102;
const UINT StatsInputPortALSCBG                      = 103;
const UINT StatsInputPortGSStats                     = 104;

// secondary ports are used to add dependencies for synced buffer
const UINT StatsInputPortDualPDHWPDAFSecondary                  = 105;
const UINT StatsInputPortDualPDHWPDAFSecondaryExposure1         = 106;
const UINT StatsInputPortPDHWPreProcessedPDSecondary            = 107;
const UINT StatsInputPortPDHWPreProcessedPDSecondaryExposure1   = 108;
const UINT StatsInputPortParsedPDHWPDAFSecondary                = 109;
const UINT StatsInputPortParsedPDHWPDAFSecondaryExposure1       = 110;

/// @brief Stats Processing node input ports for RDIPDAF3, number values must match XML configuration
const UINT StatsInputPortRDIPDAF3                    = 111;
const UINT StatsInputPortRDIPDAF3Exposure1           = 112;
const UINT StatsInputPortRDIPDAF3Exposure2           = 113;
const UINT StatsInputPortRDIPDAF3Exposure3           = 114;

const UINT StatsInputPortMuxerProcessedGSStats       = 115;
const UINT StatsInputPortMaxCount                    = 116;

/// @brief Stats Parse node input ports, number values must match XML configuration
const UINT StatsParseInputPortHDRBE                   = 0;
const UINT StatsParseInputPortAWBBG                   = 1;
const UINT StatsParseInputPortHDRBHist                = 2;
const UINT StatsParseInputPortBHist                   = 3;
const UINT StatsParseInputPortBF                      = 4;
const UINT StatsParseInputPortIHist                   = 5;
const UINT StatsParseInputPortCS                      = 6;
const UINT StatsParseInputPortRS                      = 7;
const UINT StatsParseInputPortRDIPDAF                 = 8;
const UINT StatsParseInputPortTintlessBG              = 9;
const UINT StatsParseInputPortPDAFType3               = 10;
const UINT StatsParseInputPortRDIRaw                  = 11;
const UINT StatsParseInputPortDualPDHWPDAF            = 12;
const UINT StatsParseInputPortRDIStats                = 13;
const UINT StatsParseInputPortLCRHW                   = 14;
const UINT StatsParseInputPortBPSAWBBG                = 15;
const UINT StatsParseInputPortBPSRegYUV               = 16;
const UINT StatsParseInputPortLongExposureHDRBE       = 17;
const UINT StatsParseInputPortLongExposureAWBBG       = 18;
const UINT StatsParseInputPortLongExposureHDRBHist    = 19;
const UINT StatsParseInputPortLongExposureBHist       = 20;
const UINT StatsParseInputPortLongExposureRS          = 21;
const UINT StatsParseInputPortLongExposureBF          = 22;
const UINT StatsParseInputPortShortExposureHDRBE      = 23;
const UINT StatsParseInputPortShortExposureAWBBG      = 24;
const UINT StatsParseInputPortShortExposureHDRBHist   = 25;
const UINT StatsParseInputPortShortExposureBHist      = 26;
const UINT StatsParseInputPortShortExposureRS         = 27;
const UINT StatsParseInputPortShortExposureBF         = 28;
const UINT StatsParseInputPortLongExposureTintlessBG  = 29;
const UINT StatsParseInputPortShortExposureTintlessBG = 30;
const UINT StatsParseInputPortLongExposureIHist       = 31;
const UINT StatsParseInputPortShortExposureIHist      = 32;
const UINT StatsParseInputPortRDISensorMeta           = 33;
const UINT StatsParseInputPortLTMDCStats              = 34;
const UINT StatsParseInputPortAECBE                   = 35;
const UINT StatsParseInputPortBFW                     = 36;

const UINT StatsParseInputPortBFWExposure1            = 37;
const UINT StatsParseInputPortAECBEExposure1          = 38;
const UINT StatsParseInputPortAECBHistExposure1       = 39;
const UINT StatsParseInputPortTintlessBGExposure1     = 40;
const UINT StatsParseInputPortAWBBGExposure1          = 41;
const UINT StatsParseInputPortRSExposure1             = 42;
const UINT StatsParseInputPortIHistExposure1          = 43;

const UINT StatsParseInputPortBFWExposure2         = 44;
const UINT StatsParseInputPortAECBEExposure2       = 45;
const UINT StatsParseInputPortAECBHistExposure2    = 46;
const UINT StatsParseInputPortTintlessBGExposure2  = 47;
const UINT StatsParseInputPortAWBBGExposure2       = 48;
const UINT StatsParseInputPortRSExposure2          = 49;
const UINT StatsParseInputPortIHistExposure2       = 50;


const UINT StatsParseInputPortBFWExposure3         = 51;
const UINT StatsParseInputPortAECBEExposure3       = 52;
const UINT StatsParseInputPortAECBHistExposure3    = 53;
const UINT StatsParseInputPortTintlessBGExposure3  = 54;
const UINT StatsParseInputPortAWBBGExposure3       = 55;
const UINT StatsParseInputPortRSExposure3          = 56;
const UINT StatsParseInputPortIHistExposure3       = 57;


const UINT StatsParseInputPortRDIPDAFExposure1  = 58;
const UINT StatsParseInputPortRDIPDAFExposure2  = 59;
const UINT StatsParseInputPortRDIPDAFExposure3  = 60;
const UINT StatsParseInputPortAECBHist          = 61;
const UINT StatsParseInputPortHDRBEExposure1    = 62;
const UINT StatsParseInputPortHDRBEExposure2    = 63;
const UINT StatsParseInputPortHDR10pStats      =  64;

const UINT StatsParseInputPortBayerRS              = 65;
const UINT StatsParseInputPortLongExposureBayerRS  = 66;
const UINT StatsParseInputPortShortExposureBayerRS = 67;
const UINT StatsParseInputPortBayerRSExposure1     = 68;
const UINT StatsParseInputPortBayerRSExposure2     = 69;
const UINT StatsParseInputPortBayerRSExposure3     = 70;

const UINT StatsParseInputPortCAF                  = 71;
const UINT StatsParseInputPortLongExposureCAF      = 72;
const UINT StatsParseInputPortShortExposureCAF     = 73;

const UINT StatsParseInputPortHDRBHistExposure1    = 74;
const UINT StatsParseInputPortHDRBHistExposure2    = 75;
const UINT StatsParseInputPortHDRBHistExposure3    = 76;

const UINT StatsParseInputPortALSCBG               = 77;
const UINT StatsParseInputPortALSCBGExposure1      = 78;
const UINT StatsParseInputPortALSCBGExposure2      = 79;
const UINT StatsParseInputPortALSCBGExposure3      = 80;

const UINT StatsParseInputPortMaxCount             = 81;

/// @brief Histogram Process node input ports, number values must match XML configuration
const UINT HistogramProcessInputPortFD  = 0;

/// @brief Autofocus node instance names
const UINT AutoFocusInstanceName0       = 0;

/// @todo  (CAMX-1349): Output port for sink node does not make much sense. However, topology manager only walks the AF node
/// if output port exists and is linked to sinknobuffer. Revisit this again.
/// @brief Auto Focus Node Output port names
const UINT AutoFocusOutputPort0         = 0;

/// @brief AWB node instance names
const UINT AWBInstanceName0 = 0;

/// @brief AWB Node Output port names
const UINT AWBOutputPort0 = 0;

/// @brief HistogramProcess node instance names
const UINT HistogramProcessInstanceName0 = 0;

/// @brief HistogramProcess Node Output port names
const UINT HistogramProcessOutputPort0   = 0;

const UINT SinkInstanceName0            = 0;
const UINT SinkInstanceName1            = 1;
const UINT SinkInstanceName2            = 2;
const UINT SinkInstanceName3            = 3;
const UINT SinkInstanceName4            = 4;
const UINT SinkInstanceName5            = 5;
const UINT SinkInstanceName6            = 6;

/// @brief JPEG aggregator node instance names
const UINT JPEGAggregatorInstanceName0  = 0;

/// @brief JPEG Aggregator Node port names
const UINT JPEGAggregatorInputPort0     = 0;
const UINT JPEGAggregatorInputPort1     = 1;
const UINT JPEGAggregatorOutputPort0    = 2;

/// @brief FD manager Node port names
const UINT FDManagerInputPortHwResults          = 0;
const UINT FDManagerInputPortHwRawResults       = 1;
const UINT FDManagerInputPortHwPyramidBuffer    = 2;
const UINT FDManagerInputPortImage              = 3;
const UINT FDManagerInputPortHwFLResults        = 4;
const UINT FDManagerMaxInputPorts               = 5;
const UINT FDManagerOutputPort0                 = 0;
const UINT FDManagerMaxOutputPorts              = 1;

/// @brief Tracker node input port names
const UINT TrackerInputPortImage                = 0;

/// @brief SALINet node input port names
const UINT SALINetInputPortImage                = 0;

/// @brief PDNET node input port names
const UINT PDNetInputPortRDIPDAF                = 0;
const UINT PDNetInputPortPDHWPreProcessedPD     = 1;
const UINT PDNetMaxInputPorts                   = 2;

/// @brief PDNET node output port names
const UINT PDNetOutputPortResults               = 0;
const UINT PDNetMaxOutputPorts                  = 1;

const UINT OfflineStatsInputPort0               = 0;
const UINT OfflineStatsOutputPort0              = 0;
const UINT OfflineStatsInstanceName0            = 0;

const UINT OfflineStatsOutputPort1              = 1;

/// @brief ML AWB Node Input Ports
const UINT MLAWBInputPortFullImage              = 0;
const UINT MLAWBInputPortDownScaleImage         = 1;
const UINT MaxMLAWBInputPorts                   = MLAWBInputPortDownScaleImage + 1;

const UINT MLAWBDownScaleImgBufOptimalWidth     = 1024;
const UINT MLAWBDownScaleImgBufOptimalHeight    = 768;
const UINT MLAWBDownScaleImgBufMinWidth         = 1024;
const UINT MLAWBDownScaleImgBufMinHeight        = 768;
const UINT MLAWBDownScaleImgBufMaxWidth         = 1024;
const UINT MLAWBDownScaleImgBufMaxHeight        = 768;

/// @brief ML AWB Node Output Ports
const UINT MLAWBOutputPortImage                 = 0;

CAMX_NAMESPACE_END

#endif // CAMXHWDEFS_H
