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

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @file  chituningmodeparam.h
/// @brief CamX Hardware Interface (CHI)tuning node definition
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#ifndef CHITUNINGMODEPARAM_H
#define CHITUNINGMODEPARAM_H

#ifdef __cplusplus
extern "C"
{
#endif // __cplusplus

/** @addtogroup chi_common_tuning_node
@{ */

/// Maximum number of tuning modes.
static const UINT32 MaxTuningMode    = 7;
static const UINT32 MaxStrLength256  = 256;

/// @brief Defines the CHI mode types used for tuning.
enum class ChiModeType
{
    Default  = 0,
    Sensor   = 1,
    Usecase  = 2,
    Feature1 = 3,
    Feature2 = 4,
    Scene    = 5,
    Effect   = 6
};

/// @brief Defines the CHI use case submodes.
enum class ChiModeUsecaseSubModeType
{
    Preview           = 0,
    Snapshot          = 1,
    Video             = 2,
    ZSL               = 3,
    Liveshot          = 4,
    SnapshotReprocess = 5,
    IdealRaw          = 6,
    IdealRawReprocess = 7,
    // Update the String array when modifying
    MaxChiModeUsecaseSubModeType
};

/// @brief Defines the CHI usecase submodes.
static const CHAR* ChiModeUsecaseSubModeTypeStrings[] =
{
    "Preview",
    "Snapshot",
    "Video",
    "ZSL",
    "Liveshot",
    "SnapshotReprocess",
    "IdealRaw",
    "IdealRawReprocess"
};

/// @brief Defines the CHI Feature 1 submodes.
enum class ChiModeFeature1SubModeType
{
    None            = 0,
    ISPHDR          = 1,
    ADRC            = 2,
    InSensorHDR3Exp = 3,
    MFHDRPreFusion  = 4,
    MFHDRFusion     = 5,
    MFHDRPostFusion = 6,
    FDProcess       = 7,
    // Update the String array when modifying
    MaxChiModeFeature1SubModeType
};

/// @brief Defines the CHI Feature 1 submodes.
static const CHAR* ChiModeFeature1SubModeTypeStrings[] =
{
    "None",
    "ISPHDR",
    "ADRC",
    "InSensorHDR3Exp",
    "MFHDRPreFusion",
    "MFHDRFusion",
    "MFHDRPostFusion",
    "FDProcess"
};

/// @brief Defines the CHI Feature 2 submodes.
enum class ChiModeFeature2SubModeType
{
    None                     = 0,
    OISCapture               = 1,
    HLG                      = 2,
    HDR10                    = 3,
    MFNRBlend                = 4,
    MFNRPostFilter           = 5,
    AIDenoiserMFNRBlend      = 6,
    AIDenoiserMFNRPostFilter = 7,
    QLLMFNRBlend             = 8,
    QLLMFNRPostFilter        = 9,
    QLLPostFusion            = 10,
    MMFBlend                 = 11,
    MMFEqualization          = 12,
    MMFPostFilter            = 13,
    VBSE                     = 14,
    QLLMMFBlend              = 15,
    QLLMMFEqualization       = 16,
    QLLMMFPostFilter         = 17,
    QLLShortExp              = 18,
    HDR10P                   = 19,
    HDR10PStats              = 20,
    BokehSB                  = 21,
    BokehESB                 = 22,
    ViULLMCTF1               = 23,
    ViULLMCTF2               = 24,
    // Update the String array when modifying
    MaxChiModeFeature2SubModeType
};

/// @brief Defines the CHI Feature 2 submodes.
static const CHAR* ChiModeFeature2SubModeTypeStrings[] =
{
    "None",
    "OISCapture",
    "HLG",
    "HDR10",
    "MFNRBlend",
    "MFNRPostFilter",
    "AIDenoiserMFNRBlend",
    "AIDenoiserMFNRPostFilter",
    "QLLMFNRBlend",
    "QLLMFNRPostFilter",
    "QLLPostFusion",
    "MMFBlend",
    "MMFEqualization",
    "MMFPostFilter",
    "VBSE",
    "QLLMMFBlend",
    "QLLMMFEqualization",
    "QLLMMFPostFilter",
    "QLLShortExp",
    "HDR10P",
    "HDR10PStats",
    "BokehSB",
    "BokehESB",
    "ViULLMCTF1",
    "ViULLMCTF2"
};

/// @brief Defines the CHI scene submodes.
enum class ChiModeSceneSubModeType
{
    None          = 0,
    Landscape     = 1,
    Snow          = 2,
    Beach         = 3,
    Sunset        = 4,
    Night         = 5,
    Portrait      = 6,
    BackLight     = 7,
    Sports        = 8,
    AntiShake     = 9,
    Flowers       = 10,
    CandleLight   = 11,
    Fireworks     = 12,
    Party         = 13,
    NightPortrait = 14,
    Theater       = 15,
    Action        = 16,
    AR            = 17,
    FacePriority  = 18,
    Barcode       = 19,
    BestShot      = 20,
    AICam         = 21,
    // Update the String array when modifying
    MaxChiModeSceneSubModeType
};

/// @brief Defines the CHI scene submodes.
static const CHAR* ChiModeSceneSubModeTypeStrings[] =
{
    "None",
    "Landscape",
    "Snow",
    "Beach",
    "Sunset",
    "Night",
    "Portrait",
    "BackLight",
    "Sports",
    "AntiShake",
    "Flowers",
    "CandleLight",
    "Fireworks",
    "Party",
    "NightPortrait",
    "Theater",
    "Action",
    "AR",
    "FacePriority",
    "Barcode",
    "BestShot",
    "AICam"
};

/// @brief Defines the CHI effect submodes.
enum class ChiModeEffectSubModeType
{
    None      = 0,
    Mono      = 1,
    Sepia     = 2,
    Negative  = 3,
    Solarize  = 4,
    Posterize = 5,
    Aqua      = 6,
    Emboss    = 7,
    Sketch    = 8,
    Neon      = 9,
    Blackboard= 10,
    Whiteboard= 11,
    Sblur     = 12,
    // Update the String array when modifying
    MaxChiModeEffectSubModeType
};

/// @brief Defines the CHI effect submodes.
static const CHAR* ChiModeEffectSubModeTypeStrings[] =
{
    "None",
    "Mono",
    "Sepia",
    "Negative",
    "Solarize",
    "Posterize",
    "Aqua",
    "Emboss",
    "Sketch",
    "Neon",
    "Blackboard",
    "Whiteboard",
    "Sblur"
};

/// @brief Defines the CHI effect submodes.
union ChiModeSubModeType
{
    UINT16                     value;            ///< Value of the CHI submode.
    ChiModeUsecaseSubModeType  usecase;          ///< Indicates the Use Case submode.
    ChiModeFeature1SubModeType feature1;         ///< Indicates the Feature 1 submode.
    ChiModeFeature2SubModeType feature2;         ///< Indicates the Feature 2 submode.
    ChiModeSceneSubModeType    scene;            ///< Indicates the Scene submode.
    ChiModeEffectSubModeType   effect;           ///< Indicates the Effects submode.
};

/// @brief Describes the tuning mode.
struct ChiTuningMode
{
    ChiModeType        mode;                     ///< Type of mode: sensor, use case, feature, and so on.
    ChiModeSubModeType subMode;                  ///< Type of submode for the specified mode.
};

/// @brief Information about the Tuning mode parameters.
struct ChiTuningModeParameter
{
    UINT32         noOfSelectionParameter;       ///< Number of parameters selected for the tuning mode.
    ChiTuningMode  TuningMode[MaxTuningMode];    ///< Array of tuning modes.
                                                 ///  @newpagetable
};

/// @brief Tuning Stream Info
struct TuningStreamInfo
{
    UINT32                  streamSrNo;                             ///< Stream Serial Number
    UINT32                  camId;                                  ///< Camera id
    CHAR                    sensorName[MaxStrLength256];            ///< Sensor name (string)
    CHAR                    tuningBinName[MaxStrLength256];         ///< Tuning binary name (string)
    UINT32                  width;                                  ///< Width
    UINT32                  height;                                 ///< Height
    UINT32                  maxFPS;                                 ///< Max FPS
    ChiTuningModeParameter  chiTuningModeParam;                     ///< Tuning mode parameter
};

/** @} */ /* end_addtogroup chi_common_tuning_node */

#ifdef __cplusplus
}
#endif // __cplusplus

#endif // CHITUNINGMODEPARAM_H
