////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
// All Rights Reserved.
// Confidential and Proprietary - Qualcomm Technologies, Inc.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// THIS IS AUTO-GENERATED CODE.  PLEASE DO NOT EDIT (File bug reports against tools).
///
/// Auto-generated by: Parameter Parser V5.5.1 (2411131018)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @file  asdtuning.cpp
/// @brief Auto-generated Chromatix parameter file
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#include "asdtuning.h"
#include "parametersetmanager.h"

ASDTUNING_NAMESPACE_BEGIN

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetValue/GetValue Functions
/// Gets or sets the requested value
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool motion_scene_detect_type::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "motion_detection_enable") == 0)
    {
        ParameterUtils::DoubleToString((double)motion_detection_enable, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "stats_width") == 0)
    {
        ParameterUtils::DoubleToString((double)stats_width, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "stats_height") == 0)
    {
        ParameterUtils::DoubleToString((double)stats_height, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "stats_type") == 0)
    {
        ParameterUtils::DoubleToString((double)stats_type, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "detection_alpha") == 0)
    {
        ParameterUtils::DoubleToString((double)detection_alpha, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "detection_level") == 0)
    {
        ParameterUtils::DoubleToString((double)detection_level, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "flow_scale") == 0)
    {
        ParameterUtils::DoubleToString((double)flow_scale, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "motion_level_min_thres") == 0)
    {
        ParameterUtils::DoubleToString((double)motion_level_min_thres, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "motion_level_max_thres") == 0)
    {
        ParameterUtils::DoubleToString((double)motion_level_max_thres, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "dynamic_scale_enable") == 0)
    {
        ParameterUtils::DoubleToString((double)dynamic_scale_enable, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "down_sample_factor") == 0)
    {
        ParameterUtils::DoubleToString((double)down_sample_factor, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool motion_scene_detect_type::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "motion_detection_enable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            motion_detection_enable = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "stats_width") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            stats_width = (UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "stats_height") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            stats_height = (UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "stats_type") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            stats_type = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "detection_alpha") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            detection_alpha = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "detection_level") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            detection_level = (UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "flow_scale") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            flow_scale = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "motion_level_min_thres") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            motion_level_min_thres = (UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "motion_level_max_thres") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            motion_level_max_thres = (UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "dynamic_scale_enable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            dynamic_scale_enable = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "down_sample_factor") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            down_sample_factor = (UINT32)dblValue; 
        }
    }

    return __result;
}

bool motion_scene_detect_type::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // motion_detection_enable
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("motion_detection_enable", ParameterParserDataType::Int32, (double)motion_detection_enable, 0));
    }
    else if (PARAMETER_STRCMP(__name, "motion_detection_enable") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)motion_detection_enable, 0));
    }

    // stats_width
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("stats_width", ParameterParserDataType::UInt32, (double)stats_width, 0));
    }
    else if (PARAMETER_STRCMP(__name, "stats_width") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt32, (double)stats_width, 0));
    }

    // stats_height
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("stats_height", ParameterParserDataType::UInt32, (double)stats_height, 0));
    }
    else if (PARAMETER_STRCMP(__name, "stats_height") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt32, (double)stats_height, 0));
    }

    // stats_type
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("stats_type", ParameterParserDataType::Int32, (double)stats_type, 0));
    }
    else if (PARAMETER_STRCMP(__name, "stats_type") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)stats_type, 0));
    }

    // detection_alpha
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("detection_alpha", ParameterParserDataType::Float, (double)detection_alpha));
    }
    else if (PARAMETER_STRCMP(__name, "detection_alpha") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)detection_alpha));
    }

    // detection_level
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("detection_level", ParameterParserDataType::UInt32, (double)detection_level, 0));
    }
    else if (PARAMETER_STRCMP(__name, "detection_level") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt32, (double)detection_level, 0));
    }

    // flow_scale
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("flow_scale", ParameterParserDataType::Float, (double)flow_scale));
    }
    else if (PARAMETER_STRCMP(__name, "flow_scale") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)flow_scale));
    }

    // motion_level_min_thres
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("motion_level_min_thres", ParameterParserDataType::UInt32, (double)motion_level_min_thres, 0));
    }
    else if (PARAMETER_STRCMP(__name, "motion_level_min_thres") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt32, (double)motion_level_min_thres, 0));
    }

    // motion_level_max_thres
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("motion_level_max_thres", ParameterParserDataType::UInt32, (double)motion_level_max_thres, 0));
    }
    else if (PARAMETER_STRCMP(__name, "motion_level_max_thres") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt32, (double)motion_level_max_thres, 0));
    }

    // dynamic_scale_enable
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("dynamic_scale_enable", ParameterParserDataType::Int32, (double)dynamic_scale_enable, 0));
    }
    else if (PARAMETER_STRCMP(__name, "dynamic_scale_enable") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)dynamic_scale_enable, 0));
    }

    // down_sample_factor
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("down_sample_factor", ParameterParserDataType::UInt32, (double)down_sample_factor, 0));
    }
    else if (PARAMETER_STRCMP(__name, "down_sample_factor") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt32, (double)down_sample_factor, 0));
    }

    return __result;
}

bool asd_gamma_table_type::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "bits_depth") == 0)
    {
        ParameterUtils::DoubleToString((double)bits_depth, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "entries_num") == 0)
    {
        ParameterUtils::DoubleToString((double)entries_num, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "gamma_G") == 0)
    {
        if (__index < 256)
        {
            ParameterUtils::DoubleToString((double)gamma_G[__index], __value, __size, 0);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < 256; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)gamma_G[i], &__value[__valuePos], (INT32)(__size - __valuePos), 0);
            }
            __result = true;
        }
    }

    return __result;
}

bool asd_gamma_table_type::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "bits_depth") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            bits_depth = (UINT16)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "entries_num") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            entries_num = (UINT16)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "gamma_G") == 0)
    {
        if (__index < 256)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                gamma_G[__index] = (UINT16)dblValue; 
            }
        }
        else
        {
            SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __pos = 0;

            __index = 0;
            while (__pos < __valueLen && __index < 256)
            {
                CHAR __valueStr[MAX_SIZE];

                __pos += ParameterUtils::GetSubString(&__value[__pos], ',', __valueStr, MAX_SIZE);
                __pos++;

                const double dblValue = ParameterUtils::StringToDouble(__valueStr, __result);
                if (__result)
                {
                    gamma_G[__index] = (UINT16)dblValue; 
                }
                __index++;
            }
            __result = true;
        }
    }

    return __result;
}

bool asd_gamma_table_type::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // bits_depth
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("bits_depth", ParameterParserDataType::UInt16, (double)bits_depth, 0));
    }
    else if (PARAMETER_STRCMP(__name, "bits_depth") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt16, (double)bits_depth, 0));
    }

    // entries_num
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("entries_num", ParameterParserDataType::UInt16, (double)entries_num, 0));
    }
    else if (PARAMETER_STRCMP(__name, "entries_num") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt16, (double)entries_num, 0));
    }

    // gamma_G
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("gamma_G", ParameterParserDataType::UInt16, true, false, 256));
    }

    return __result;
}

bool hazy_scene_detect_type::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "hazy_detection_enable") == 0)
    {
        ParameterUtils::DoubleToString((double)hazy_detection_enable, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "hazy_running_frequency") == 0)
    {
        ParameterUtils::DoubleToString((double)hazy_running_frequency, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "hazy_detection_threshold_on") == 0)
    {
        ParameterUtils::DoubleToString((double)hazy_detection_threshold_on, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "hazy_detection_threshold_off") == 0)
    {
        ParameterUtils::DoubleToString((double)hazy_detection_threshold_off, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "ui_hazy_display_th") == 0)
    {
        ParameterUtils::DoubleToString((double)ui_hazy_display_th, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "hazy_3A_compensation_enable") == 0)
    {
        ParameterUtils::DoubleToString((double)hazy_3A_compensation_enable, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool hazy_scene_detect_type::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "hazy_detection_enable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            hazy_detection_enable = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "hazy_running_frequency") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            hazy_running_frequency = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "hazy_detection_threshold_on") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            hazy_detection_threshold_on = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "hazy_detection_threshold_off") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            hazy_detection_threshold_off = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "ui_hazy_display_th") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            ui_hazy_display_th = (UINT16)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "hazy_3A_compensation_enable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            hazy_3A_compensation_enable = (INT32)dblValue; 
        }
    }

    return __result;
}

bool hazy_scene_detect_type::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // hazy_detection_enable
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("hazy_detection_enable", ParameterParserDataType::Int32, (double)hazy_detection_enable, 0));
    }
    else if (PARAMETER_STRCMP(__name, "hazy_detection_enable") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)hazy_detection_enable, 0));
    }

    // hazy_running_frequency
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("hazy_running_frequency", ParameterParserDataType::Float, (double)hazy_running_frequency));
    }
    else if (PARAMETER_STRCMP(__name, "hazy_running_frequency") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)hazy_running_frequency));
    }

    // hazy_detection_threshold_on
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("hazy_detection_threshold_on", ParameterParserDataType::Float, (double)hazy_detection_threshold_on));
    }
    else if (PARAMETER_STRCMP(__name, "hazy_detection_threshold_on") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)hazy_detection_threshold_on));
    }

    // hazy_detection_threshold_off
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("hazy_detection_threshold_off", ParameterParserDataType::Float, (double)hazy_detection_threshold_off));
    }
    else if (PARAMETER_STRCMP(__name, "hazy_detection_threshold_off") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)hazy_detection_threshold_off));
    }

    // ui_hazy_display_th
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("ui_hazy_display_th", ParameterParserDataType::UInt16, (double)ui_hazy_display_th, 0));
    }
    else if (PARAMETER_STRCMP(__name, "ui_hazy_display_th") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt16, (double)ui_hazy_display_th, 0));
    }

    // hazy_3A_compensation_enable
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("hazy_3A_compensation_enable", ParameterParserDataType::Int32, (double)hazy_3A_compensation_enable, 0));
    }
    else if (PARAMETER_STRCMP(__name, "hazy_3A_compensation_enable") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)hazy_3A_compensation_enable, 0));
    }

    return __result;
}

bool auto_hdr_detect_type::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "backlight_high_threshold") == 0)
    {
        ParameterUtils::DoubleToString((double)backlight_high_threshold, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "backlight_low_threshold") == 0)
    {
        ParameterUtils::DoubleToString((double)backlight_low_threshold, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "portrait_high_threshold") == 0)
    {
        ParameterUtils::DoubleToString((double)portrait_high_threshold, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "portrait_low_threshold") == 0)
    {
        ParameterUtils::DoubleToString((double)portrait_low_threshold, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "auto_hdr_3A_compensation_enable") == 0)
    {
        ParameterUtils::DoubleToString((double)auto_hdr_3A_compensation_enable, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool auto_hdr_detect_type::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "backlight_high_threshold") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            backlight_high_threshold = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "backlight_low_threshold") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            backlight_low_threshold = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "portrait_high_threshold") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            portrait_high_threshold = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "portrait_low_threshold") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            portrait_low_threshold = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "auto_hdr_3A_compensation_enable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            auto_hdr_3A_compensation_enable = (INT32)dblValue; 
        }
    }

    return __result;
}

bool auto_hdr_detect_type::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // backlight_high_threshold
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("backlight_high_threshold", ParameterParserDataType::Float, (double)backlight_high_threshold));
    }
    else if (PARAMETER_STRCMP(__name, "backlight_high_threshold") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)backlight_high_threshold));
    }

    // backlight_low_threshold
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("backlight_low_threshold", ParameterParserDataType::Float, (double)backlight_low_threshold));
    }
    else if (PARAMETER_STRCMP(__name, "backlight_low_threshold") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)backlight_low_threshold));
    }

    // portrait_high_threshold
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("portrait_high_threshold", ParameterParserDataType::Float, (double)portrait_high_threshold));
    }
    else if (PARAMETER_STRCMP(__name, "portrait_high_threshold") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)portrait_high_threshold));
    }

    // portrait_low_threshold
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("portrait_low_threshold", ParameterParserDataType::Float, (double)portrait_low_threshold));
    }
    else if (PARAMETER_STRCMP(__name, "portrait_low_threshold") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)portrait_low_threshold));
    }

    // auto_hdr_3A_compensation_enable
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("auto_hdr_3A_compensation_enable", ParameterParserDataType::Int32, (double)auto_hdr_3A_compensation_enable, 0));
    }
    else if (PARAMETER_STRCMP(__name, "auto_hdr_3A_compensation_enable") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)auto_hdr_3A_compensation_enable, 0));
    }

    return __result;
}

bool portrait_scene_detect_type::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "portrait_detection_enable") == 0)
    {
        ParameterUtils::DoubleToString((double)portrait_detection_enable, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "skin_color_boost_factor") == 0)
    {
        ParameterUtils::DoubleToString((double)skin_color_boost_factor, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "min_face_content_threshold") == 0)
    {
        ParameterUtils::DoubleToString((double)min_face_content_threshold, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "max_face_content_threshold") == 0)
    {
        ParameterUtils::DoubleToString((double)max_face_content_threshold, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "soft_focus_degree_7_7") == 0)
    {
        ParameterUtils::DoubleToString((double)soft_focus_degree_7_7, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "soft_focus_degree_5_5") == 0)
    {
        ParameterUtils::DoubleToString((double)soft_focus_degree_5_5, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "aggressiveness") == 0)
    {
        ParameterUtils::DoubleToString((double)aggressiveness, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "ui_portrait_display_th") == 0)
    {
        ParameterUtils::DoubleToString((double)ui_portrait_display_th, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "portrait_3A_compensation_enable") == 0)
    {
        ParameterUtils::DoubleToString((double)portrait_3A_compensation_enable, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool portrait_scene_detect_type::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "portrait_detection_enable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            portrait_detection_enable = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "skin_color_boost_factor") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            skin_color_boost_factor = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "min_face_content_threshold") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            min_face_content_threshold = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "max_face_content_threshold") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            max_face_content_threshold = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "soft_focus_degree_7_7") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            soft_focus_degree_7_7 = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "soft_focus_degree_5_5") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            soft_focus_degree_5_5 = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "aggressiveness") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            aggressiveness = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "ui_portrait_display_th") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            ui_portrait_display_th = (UINT16)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "portrait_3A_compensation_enable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            portrait_3A_compensation_enable = (INT32)dblValue; 
        }
    }

    return __result;
}

bool portrait_scene_detect_type::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // portrait_detection_enable
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("portrait_detection_enable", ParameterParserDataType::Int32, (double)portrait_detection_enable, 0));
    }
    else if (PARAMETER_STRCMP(__name, "portrait_detection_enable") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)portrait_detection_enable, 0));
    }

    // skin_color_boost_factor
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("skin_color_boost_factor", ParameterParserDataType::Float, (double)skin_color_boost_factor));
    }
    else if (PARAMETER_STRCMP(__name, "skin_color_boost_factor") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)skin_color_boost_factor));
    }

    // min_face_content_threshold
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("min_face_content_threshold", ParameterParserDataType::Float, (double)min_face_content_threshold));
    }
    else if (PARAMETER_STRCMP(__name, "min_face_content_threshold") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)min_face_content_threshold));
    }

    // max_face_content_threshold
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("max_face_content_threshold", ParameterParserDataType::Float, (double)max_face_content_threshold));
    }
    else if (PARAMETER_STRCMP(__name, "max_face_content_threshold") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)max_face_content_threshold));
    }

    // soft_focus_degree_7_7
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("soft_focus_degree_7_7", ParameterParserDataType::Float, (double)soft_focus_degree_7_7));
    }
    else if (PARAMETER_STRCMP(__name, "soft_focus_degree_7_7") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)soft_focus_degree_7_7));
    }

    // soft_focus_degree_5_5
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("soft_focus_degree_5_5", ParameterParserDataType::Float, (double)soft_focus_degree_5_5));
    }
    else if (PARAMETER_STRCMP(__name, "soft_focus_degree_5_5") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)soft_focus_degree_5_5));
    }

    // aggressiveness
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("aggressiveness", ParameterParserDataType::Float, (double)aggressiveness));
    }
    else if (PARAMETER_STRCMP(__name, "aggressiveness") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)aggressiveness));
    }

    // ui_portrait_display_th
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("ui_portrait_display_th", ParameterParserDataType::UInt16, (double)ui_portrait_display_th, 0));
    }
    else if (PARAMETER_STRCMP(__name, "ui_portrait_display_th") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt16, (double)ui_portrait_display_th, 0));
    }

    // portrait_3A_compensation_enable
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("portrait_3A_compensation_enable", ParameterParserDataType::Int32, (double)portrait_3A_compensation_enable, 0));
    }
    else if (PARAMETER_STRCMP(__name, "portrait_3A_compensation_enable") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)portrait_3A_compensation_enable, 0));
    }

    return __result;
}

bool landscape_scene_detect_type::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "landscape_detection_enable") == 0)
    {
        ParameterUtils::DoubleToString((double)landscape_detection_enable, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "landscape_red_boost_factor") == 0)
    {
        ParameterUtils::DoubleToString((double)landscape_red_boost_factor, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "landscape_green_boost_factor") == 0)
    {
        ParameterUtils::DoubleToString((double)landscape_green_boost_factor, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "landscape_blue_boost_factor") == 0)
    {
        ParameterUtils::DoubleToString((double)landscape_blue_boost_factor, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "min_blue_green_content_detection_threshold") == 0)
    {
        ParameterUtils::DoubleToString((double)min_blue_green_content_detection_threshold, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "max_blue_green_content_detection_threshold") == 0)
    {
        ParameterUtils::DoubleToString((double)max_blue_green_content_detection_threshold, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "green_offset_rg") == 0)
    {
        ParameterUtils::DoubleToString((double)green_offset_rg, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "green_offset_bg") == 0)
    {
        ParameterUtils::DoubleToString((double)green_offset_bg, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "aggressiveness") == 0)
    {
        ParameterUtils::DoubleToString((double)aggressiveness, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "lux_idx_indoor") == 0)
    {
        ParameterUtils::DoubleToString((double)lux_idx_indoor, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "lux_idx_outdoor") == 0)
    {
        ParameterUtils::DoubleToString((double)lux_idx_outdoor, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "ui_landscape_display_th") == 0)
    {
        ParameterUtils::DoubleToString((double)ui_landscape_display_th, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "landscape_3A_compensation_enable") == 0)
    {
        ParameterUtils::DoubleToString((double)landscape_3A_compensation_enable, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool landscape_scene_detect_type::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "landscape_detection_enable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            landscape_detection_enable = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "landscape_red_boost_factor") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            landscape_red_boost_factor = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "landscape_green_boost_factor") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            landscape_green_boost_factor = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "landscape_blue_boost_factor") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            landscape_blue_boost_factor = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "min_blue_green_content_detection_threshold") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            min_blue_green_content_detection_threshold = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "max_blue_green_content_detection_threshold") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            max_blue_green_content_detection_threshold = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "green_offset_rg") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            green_offset_rg = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "green_offset_bg") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            green_offset_bg = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "aggressiveness") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            aggressiveness = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "lux_idx_indoor") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            lux_idx_indoor = (INT64)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "lux_idx_outdoor") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            lux_idx_outdoor = (INT64)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "ui_landscape_display_th") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            ui_landscape_display_th = (UINT16)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "landscape_3A_compensation_enable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            landscape_3A_compensation_enable = (INT32)dblValue; 
        }
    }

    return __result;
}

bool landscape_scene_detect_type::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // landscape_detection_enable
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("landscape_detection_enable", ParameterParserDataType::Int32, (double)landscape_detection_enable, 0));
    }
    else if (PARAMETER_STRCMP(__name, "landscape_detection_enable") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)landscape_detection_enable, 0));
    }

    // landscape_red_boost_factor
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("landscape_red_boost_factor", ParameterParserDataType::Float, (double)landscape_red_boost_factor));
    }
    else if (PARAMETER_STRCMP(__name, "landscape_red_boost_factor") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)landscape_red_boost_factor));
    }

    // landscape_green_boost_factor
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("landscape_green_boost_factor", ParameterParserDataType::Float, (double)landscape_green_boost_factor));
    }
    else if (PARAMETER_STRCMP(__name, "landscape_green_boost_factor") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)landscape_green_boost_factor));
    }

    // landscape_blue_boost_factor
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("landscape_blue_boost_factor", ParameterParserDataType::Float, (double)landscape_blue_boost_factor));
    }
    else if (PARAMETER_STRCMP(__name, "landscape_blue_boost_factor") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)landscape_blue_boost_factor));
    }

    // min_blue_green_content_detection_threshold
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("min_blue_green_content_detection_threshold", ParameterParserDataType::Float, (double)min_blue_green_content_detection_threshold));
    }
    else if (PARAMETER_STRCMP(__name, "min_blue_green_content_detection_threshold") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)min_blue_green_content_detection_threshold));
    }

    // max_blue_green_content_detection_threshold
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("max_blue_green_content_detection_threshold", ParameterParserDataType::Float, (double)max_blue_green_content_detection_threshold));
    }
    else if (PARAMETER_STRCMP(__name, "max_blue_green_content_detection_threshold") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)max_blue_green_content_detection_threshold));
    }

    // green_offset_rg
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("green_offset_rg", ParameterParserDataType::Int32, (double)green_offset_rg, 0));
    }
    else if (PARAMETER_STRCMP(__name, "green_offset_rg") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)green_offset_rg, 0));
    }

    // green_offset_bg
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("green_offset_bg", ParameterParserDataType::Int32, (double)green_offset_bg, 0));
    }
    else if (PARAMETER_STRCMP(__name, "green_offset_bg") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)green_offset_bg, 0));
    }

    // aggressiveness
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("aggressiveness", ParameterParserDataType::Float, (double)aggressiveness));
    }
    else if (PARAMETER_STRCMP(__name, "aggressiveness") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)aggressiveness));
    }

    // lux_idx_indoor
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("lux_idx_indoor", ParameterParserDataType::Int64, (double)lux_idx_indoor, 0));
    }
    else if (PARAMETER_STRCMP(__name, "lux_idx_indoor") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int64, (double)lux_idx_indoor, 0));
    }

    // lux_idx_outdoor
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("lux_idx_outdoor", ParameterParserDataType::Int64, (double)lux_idx_outdoor, 0));
    }
    else if (PARAMETER_STRCMP(__name, "lux_idx_outdoor") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int64, (double)lux_idx_outdoor, 0));
    }

    // ui_landscape_display_th
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("ui_landscape_display_th", ParameterParserDataType::UInt16, (double)ui_landscape_display_th, 0));
    }
    else if (PARAMETER_STRCMP(__name, "ui_landscape_display_th") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt16, (double)ui_landscape_display_th, 0));
    }

    // landscape_3A_compensation_enable
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("landscape_3A_compensation_enable", ParameterParserDataType::Int32, (double)landscape_3A_compensation_enable, 0));
    }
    else if (PARAMETER_STRCMP(__name, "landscape_3A_compensation_enable") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)landscape_3A_compensation_enable, 0));
    }

    return __result;
}

bool backlit_scene_detect_type::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "backlight_detection_enable") == 0)
    {
        ParameterUtils::DoubleToString((double)backlight_detection_enable, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "histogram_offset") == 0)
    {
        ParameterUtils::DoubleToString((double)histogram_offset, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "low_luma_threshold") == 0)
    {
        ParameterUtils::DoubleToString((double)low_luma_threshold, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "high_luma_threshold") == 0)
    {
        ParameterUtils::DoubleToString((double)high_luma_threshold, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "low_luma_count_percent_threshold") == 0)
    {
        ParameterUtils::DoubleToString((double)low_luma_count_percent_threshold, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "high_luma_count_percent_threshold") == 0)
    {
        ParameterUtils::DoubleToString((double)high_luma_count_percent_threshold, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "kept_pixel_ratio_th") == 0)
    {
        ParameterUtils::DoubleToString((double)kept_pixel_ratio_th, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "backlit_aggressiveness") == 0)
    {
        ParameterUtils::DoubleToString((double)backlit_aggressiveness, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "max_percent_threshold") == 0)
    {
        ParameterUtils::DoubleToString((double)max_percent_threshold, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "ui_backlit_display_th") == 0)
    {
        ParameterUtils::DoubleToString((double)ui_backlit_display_th, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "backlit_3A_compensation_enable") == 0)
    {
        ParameterUtils::DoubleToString((double)backlit_3A_compensation_enable, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool backlit_scene_detect_type::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "backlight_detection_enable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            backlight_detection_enable = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "histogram_offset") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            histogram_offset = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "low_luma_threshold") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            low_luma_threshold = (UINT64)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "high_luma_threshold") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            high_luma_threshold = (UINT64)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "low_luma_count_percent_threshold") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            low_luma_count_percent_threshold = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "high_luma_count_percent_threshold") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            high_luma_count_percent_threshold = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "kept_pixel_ratio_th") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            kept_pixel_ratio_th = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "backlit_aggressiveness") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            backlit_aggressiveness = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "max_percent_threshold") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            max_percent_threshold = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "ui_backlit_display_th") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            ui_backlit_display_th = (UINT16)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "backlit_3A_compensation_enable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            backlit_3A_compensation_enable = (INT32)dblValue; 
        }
    }

    return __result;
}

bool backlit_scene_detect_type::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // backlight_detection_enable
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("backlight_detection_enable", ParameterParserDataType::Int32, (double)backlight_detection_enable, 0));
    }
    else if (PARAMETER_STRCMP(__name, "backlight_detection_enable") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)backlight_detection_enable, 0));
    }

    // histogram_offset
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("histogram_offset", ParameterParserDataType::Float, (double)histogram_offset));
    }
    else if (PARAMETER_STRCMP(__name, "histogram_offset") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)histogram_offset));
    }

    // low_luma_threshold
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("low_luma_threshold", ParameterParserDataType::UInt64, (double)low_luma_threshold, 0));
    }
    else if (PARAMETER_STRCMP(__name, "low_luma_threshold") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt64, (double)low_luma_threshold, 0));
    }

    // high_luma_threshold
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("high_luma_threshold", ParameterParserDataType::UInt64, (double)high_luma_threshold, 0));
    }
    else if (PARAMETER_STRCMP(__name, "high_luma_threshold") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt64, (double)high_luma_threshold, 0));
    }

    // low_luma_count_percent_threshold
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("low_luma_count_percent_threshold", ParameterParserDataType::Float, (double)low_luma_count_percent_threshold));
    }
    else if (PARAMETER_STRCMP(__name, "low_luma_count_percent_threshold") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)low_luma_count_percent_threshold));
    }

    // high_luma_count_percent_threshold
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("high_luma_count_percent_threshold", ParameterParserDataType::Float, (double)high_luma_count_percent_threshold));
    }
    else if (PARAMETER_STRCMP(__name, "high_luma_count_percent_threshold") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)high_luma_count_percent_threshold));
    }

    // kept_pixel_ratio_th
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("kept_pixel_ratio_th", ParameterParserDataType::Float, (double)kept_pixel_ratio_th));
    }
    else if (PARAMETER_STRCMP(__name, "kept_pixel_ratio_th") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)kept_pixel_ratio_th));
    }

    // backlit_aggressiveness
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("backlit_aggressiveness", ParameterParserDataType::Float, (double)backlit_aggressiveness));
    }
    else if (PARAMETER_STRCMP(__name, "backlit_aggressiveness") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)backlit_aggressiveness));
    }

    // max_percent_threshold
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("max_percent_threshold", ParameterParserDataType::Float, (double)max_percent_threshold));
    }
    else if (PARAMETER_STRCMP(__name, "max_percent_threshold") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)max_percent_threshold));
    }

    // ui_backlit_display_th
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("ui_backlit_display_th", ParameterParserDataType::UInt16, (double)ui_backlit_display_th, 0));
    }
    else if (PARAMETER_STRCMP(__name, "ui_backlit_display_th") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt16, (double)ui_backlit_display_th, 0));
    }

    // backlit_3A_compensation_enable
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("backlit_3A_compensation_enable", ParameterParserDataType::Int32, (double)backlit_3A_compensation_enable, 0));
    }
    else if (PARAMETER_STRCMP(__name, "backlit_3A_compensation_enable") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)backlit_3A_compensation_enable, 0));
    }

    return __result;
}

bool snow_scene_detect_type::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "snow_scene_detection_enable") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)snow_scene_detection_enable, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "y_cloudy_snow_threshold") == 0)
    {
        ParameterUtils::DoubleToString((double)y_cloudy_snow_threshold, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "awb_y_max_in_grey") == 0)
    {
        ParameterUtils::DoubleToString((double)awb_y_max_in_grey, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "min_snow_cloudy_sample_th") == 0)
    {
        ParameterUtils::DoubleToString((double)min_snow_cloudy_sample_th, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "extreme_snow_cloudy_sample_th") == 0)
    {
        ParameterUtils::DoubleToString((double)extreme_snow_cloudy_sample_th, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "snow_scene_indoor_index") == 0)
    {
        ParameterUtils::DoubleToString((double)snow_scene_indoor_index, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "snow_scene_outdoor_index") == 0)
    {
        ParameterUtils::DoubleToString((double)snow_scene_outdoor_index, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "severe_snow_scene_cap") == 0)
    {
        ParameterUtils::DoubleToString((double)severe_snow_scene_cap, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "snowscene_aggressiveness") == 0)
    {
        ParameterUtils::DoubleToString((double)snowscene_aggressiveness, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "ui_snow_cloudy_display_th") == 0)
    {
        ParameterUtils::DoubleToString((double)ui_snow_cloudy_display_th, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "snow_scene_3A_compensation_enable") == 0)
    {
        ParameterUtils::DoubleToString((double)snow_scene_3A_compensation_enable, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool snow_scene_detect_type::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "snow_scene_detection_enable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            snow_scene_detection_enable = (asd_chrx_flag_t)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "y_cloudy_snow_threshold") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            y_cloudy_snow_threshold = (UINT64)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "awb_y_max_in_grey") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            awb_y_max_in_grey = (UINT64)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "min_snow_cloudy_sample_th") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            min_snow_cloudy_sample_th = (UINT64)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "extreme_snow_cloudy_sample_th") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            extreme_snow_cloudy_sample_th = (UINT64)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "snow_scene_indoor_index") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            snow_scene_indoor_index = (UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "snow_scene_outdoor_index") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            snow_scene_outdoor_index = (UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "severe_snow_scene_cap") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            severe_snow_scene_cap = (UINT64)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "snowscene_aggressiveness") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            snowscene_aggressiveness = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "ui_snow_cloudy_display_th") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            ui_snow_cloudy_display_th = (UINT16)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "snow_scene_3A_compensation_enable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            snow_scene_3A_compensation_enable = (INT32)dblValue; 
        }
    }

    return __result;
}

bool snow_scene_detect_type::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // snow_scene_detection_enable
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("snow_scene_detection_enable", ParameterParserDataType::Enum, (double)(UINT32)snow_scene_detection_enable, 0));
    }
    else if (PARAMETER_STRCMP(__name, "snow_scene_detection_enable") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Enum, (double)(UINT32)snow_scene_detection_enable, 0));
    }

    // y_cloudy_snow_threshold
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("y_cloudy_snow_threshold", ParameterParserDataType::UInt64, (double)y_cloudy_snow_threshold, 0));
    }
    else if (PARAMETER_STRCMP(__name, "y_cloudy_snow_threshold") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt64, (double)y_cloudy_snow_threshold, 0));
    }

    // awb_y_max_in_grey
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("awb_y_max_in_grey", ParameterParserDataType::UInt64, (double)awb_y_max_in_grey, 0));
    }
    else if (PARAMETER_STRCMP(__name, "awb_y_max_in_grey") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt64, (double)awb_y_max_in_grey, 0));
    }

    // min_snow_cloudy_sample_th
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("min_snow_cloudy_sample_th", ParameterParserDataType::UInt64, (double)min_snow_cloudy_sample_th, 0));
    }
    else if (PARAMETER_STRCMP(__name, "min_snow_cloudy_sample_th") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt64, (double)min_snow_cloudy_sample_th, 0));
    }

    // extreme_snow_cloudy_sample_th
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("extreme_snow_cloudy_sample_th", ParameterParserDataType::UInt64, (double)extreme_snow_cloudy_sample_th, 0));
    }
    else if (PARAMETER_STRCMP(__name, "extreme_snow_cloudy_sample_th") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt64, (double)extreme_snow_cloudy_sample_th, 0));
    }

    // snow_scene_indoor_index
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("snow_scene_indoor_index", ParameterParserDataType::UInt32, (double)snow_scene_indoor_index, 0));
    }
    else if (PARAMETER_STRCMP(__name, "snow_scene_indoor_index") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt32, (double)snow_scene_indoor_index, 0));
    }

    // snow_scene_outdoor_index
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("snow_scene_outdoor_index", ParameterParserDataType::UInt32, (double)snow_scene_outdoor_index, 0));
    }
    else if (PARAMETER_STRCMP(__name, "snow_scene_outdoor_index") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt32, (double)snow_scene_outdoor_index, 0));
    }

    // severe_snow_scene_cap
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("severe_snow_scene_cap", ParameterParserDataType::UInt64, (double)severe_snow_scene_cap, 0));
    }
    else if (PARAMETER_STRCMP(__name, "severe_snow_scene_cap") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt64, (double)severe_snow_scene_cap, 0));
    }

    // snowscene_aggressiveness
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("snowscene_aggressiveness", ParameterParserDataType::Float, (double)snowscene_aggressiveness));
    }
    else if (PARAMETER_STRCMP(__name, "snowscene_aggressiveness") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)snowscene_aggressiveness));
    }

    // ui_snow_cloudy_display_th
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("ui_snow_cloudy_display_th", ParameterParserDataType::UInt16, (double)ui_snow_cloudy_display_th, 0));
    }
    else if (PARAMETER_STRCMP(__name, "ui_snow_cloudy_display_th") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt16, (double)ui_snow_cloudy_display_th, 0));
    }

    // snow_scene_3A_compensation_enable
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("snow_scene_3A_compensation_enable", ParameterParserDataType::Int32, (double)snow_scene_3A_compensation_enable, 0));
    }
    else if (PARAMETER_STRCMP(__name, "snow_scene_3A_compensation_enable") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)snow_scene_3A_compensation_enable, 0));
    }

    return __result;
}

bool ChromatixASDTuningType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "module_version") == 0)
    {
        __result = module_version.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "ASD_Software_Type") == 0)
    {
        ParameterUtils::DoubleToString((double)ASD_Software_Type, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "histLUT") == 0)
    {
        if (__index < histLUTCount)
        {
            ParameterUtils::DoubleToString((double)histLUT[__index], __value, __size);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < histLUTCount; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)histLUT[i], &__value[__valuePos], (INT32)(__size - __valuePos));
            }
            __result = true;
        }
    }
    else if (PARAMETER_STRCMP(__name, "snow_scene_detect") == 0)
    {
        __result = snow_scene_detect.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "backlit_scene_detect") == 0)
    {
        __result = backlit_scene_detect.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "landscape_scene_detect") == 0)
    {
        __result = landscape_scene_detect.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "portrait_scene_detect") == 0)
    {
        __result = portrait_scene_detect.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "auto_hdr_detect") == 0)
    {
        __result = auto_hdr_detect.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "hazy_scene_detect") == 0)
    {
        __result = hazy_scene_detect.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "gamma_table") == 0)
    {
        __result = gamma_table.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "motion_scene_detect") == 0)
    {
        __result = motion_scene_detect.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool ChromatixASDTuningType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "module_version") == 0)
    {
        __result = module_version.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "ASD_Software_Type") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            ASD_Software_Type = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "histLUT") == 0)
    {
        if (__index < histLUTCount)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                histLUT[__index] = (float)dblValue; 
            }
        }
        else
        {
            SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __pos = 0;

            __index = 0;
            while (__pos < __valueLen && __index < histLUTCount)
            {
                CHAR __valueStr[MAX_SIZE];

                __pos += ParameterUtils::GetSubString(&__value[__pos], ',', __valueStr, MAX_SIZE);
                __pos++;

                const double dblValue = ParameterUtils::StringToDouble(__valueStr, __result);
                if (__result)
                {
                    histLUT[__index] = (float)dblValue; 
                }
                __index++;
            }
            __result = true;
        }
    }
    else if (PARAMETER_STRCMP(__name, "snow_scene_detect") == 0)
    {
        __result = snow_scene_detect.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "backlit_scene_detect") == 0)
    {
        __result = backlit_scene_detect.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "landscape_scene_detect") == 0)
    {
        __result = landscape_scene_detect.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "portrait_scene_detect") == 0)
    {
        __result = portrait_scene_detect.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "auto_hdr_detect") == 0)
    {
        __result = auto_hdr_detect.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "hazy_scene_detect") == 0)
    {
        __result = hazy_scene_detect.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "gamma_table") == 0)
    {
        __result = gamma_table.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "motion_scene_detect") == 0)
    {
        __result = motion_scene_detect.SetValue(&__path[__pos], __value);
    }

    return __result;
}

bool ChromatixASDTuningType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // module_version
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("module_version", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "module_version") == 0)
    {
        __result = module_version.GetInfo(&__path[__pos], __info);
    }

    // ASD_Software_Type
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("ASD_Software_Type", ParameterParserDataType::Int32, (double)ASD_Software_Type, 0));
    }
    else if (PARAMETER_STRCMP(__name, "ASD_Software_Type") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)ASD_Software_Type, 0));
    }

    // histLUT
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("histLUT", ParameterParserDataType::Float, true, false, histLUTCount));
    }

    // snow_scene_detect
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("snow_scene_detect", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "snow_scene_detect") == 0)
    {
        __result = snow_scene_detect.GetInfo(&__path[__pos], __info);
    }

    // backlit_scene_detect
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("backlit_scene_detect", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "backlit_scene_detect") == 0)
    {
        __result = backlit_scene_detect.GetInfo(&__path[__pos], __info);
    }

    // landscape_scene_detect
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("landscape_scene_detect", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "landscape_scene_detect") == 0)
    {
        __result = landscape_scene_detect.GetInfo(&__path[__pos], __info);
    }

    // portrait_scene_detect
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("portrait_scene_detect", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "portrait_scene_detect") == 0)
    {
        __result = portrait_scene_detect.GetInfo(&__path[__pos], __info);
    }

    // auto_hdr_detect
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("auto_hdr_detect", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "auto_hdr_detect") == 0)
    {
        __result = auto_hdr_detect.GetInfo(&__path[__pos], __info);
    }

    // hazy_scene_detect
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("hazy_scene_detect", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "hazy_scene_detect") == 0)
    {
        __result = hazy_scene_detect.GetInfo(&__path[__pos], __info);
    }

    // gamma_table
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("gamma_table", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "gamma_table") == 0)
    {
        __result = gamma_table.GetInfo(&__path[__pos], __info);
    }

    // motion_scene_detect
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("motion_scene_detect", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "motion_scene_detect") == 0)
    {
        __result = motion_scene_detect.GetInfo(&__path[__pos], __info);
    }

    return __result;
}

bool ChromatixASDTuningType::module_versionStruct::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "major_revision") == 0)
    {
        ParameterUtils::DoubleToString((double)major_revision, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "minor_revision") == 0)
    {
        ParameterUtils::DoubleToString((double)minor_revision, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "incr_revision") == 0)
    {
        ParameterUtils::DoubleToString((double)incr_revision, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool ChromatixASDTuningType::module_versionStruct::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "major_revision") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            major_revision = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "minor_revision") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            minor_revision = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "incr_revision") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            incr_revision = (INT32)dblValue; 
        }
    }

    return __result;
}

bool ChromatixASDTuningType::module_versionStruct::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // major_revision
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("major_revision", ParameterParserDataType::Int32, (double)major_revision, 0));
    }
    else if (PARAMETER_STRCMP(__name, "major_revision") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)major_revision, 0));
    }

    // minor_revision
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("minor_revision", ParameterParserDataType::Int32, (double)minor_revision, 0));
    }
    else if (PARAMETER_STRCMP(__name, "minor_revision") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)minor_revision, 0));
    }

    // incr_revision
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("incr_revision", ParameterParserDataType::Int32, (double)incr_revision, 0));
    }
    else if (PARAMETER_STRCMP(__name, "incr_revision") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)incr_revision, 0));
    }

    return __result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Read enum value
/// @param entry [in] Symbol table entry
/// @param enumValue [out] Enum value to read
/// @param alignment [in] Symbol table byte alignment
/// @return true if successful
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ReadEnum_asd_chrx_flag_t(
    ParameterFileSymbolTableEntry* const entry,
    asd_chrx_flag_t& enumValue,
    BYTE const alignment)
{
    bool result {false};

    UINT32 uintValue {entry->ReadEnum(&result, alignment)};

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(asd_chrx_flag_t::ASD_DISABLED):
            enumValue = asd_chrx_flag_t::ASD_DISABLED;
            result    = true;
            break;
        case static_cast<UINT32>(asd_chrx_flag_t::ASD_FULLY_ENABLED):
            enumValue = asd_chrx_flag_t::ASD_FULLY_ENABLED;
            result    = true;
            break;
        case static_cast<UINT32>(asd_chrx_flag_t::ASD_DETECTION_ONLY):
            enumValue = asd_chrx_flag_t::ASD_DETECTION_ONLY;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to asd_chrx_flag_t", uintValue);
            break;
        }
    }
    return result;
}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Default Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ChromatixASDTuningTypeClass::ChromatixASDTuningTypeClass(
    const CHAR* const name)
    : ParameterModule(name, MAJOR, MINOR, PATCH, nullptr)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(ASD_Software_Type);
    PARAMETER_INITIALIZE(histLUTCount);
    PARAMETER_INITIALIZE(histLUT);
    PARAMETER_INITIALIZE(snow_scene_detect);
    PARAMETER_INITIALIZE(backlit_scene_detect);
    PARAMETER_INITIALIZE(landscape_scene_detect);
    PARAMETER_INITIALIZE(portrait_scene_detect);
    PARAMETER_INITIALIZE(auto_hdr_detect);
    PARAMETER_INITIALIZE(hazy_scene_detect);
    PARAMETER_INITIALIZE(gamma_table);
    PARAMETER_INITIALIZE(motion_scene_detect);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ChromatixASDTuningTypeClass::ChromatixASDTuningTypeClass(
    const CHAR* const name,
    ModuleData* const moduleData)
    : ParameterModule(name, MAJOR, MINOR, PATCH, moduleData)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(ASD_Software_Type);
    PARAMETER_INITIALIZE(histLUT);
    PARAMETER_INITIALIZE(snow_scene_detect);
    PARAMETER_INITIALIZE(backlit_scene_detect);
    PARAMETER_INITIALIZE(landscape_scene_detect);
    PARAMETER_INITIALIZE(portrait_scene_detect);
    PARAMETER_INITIALIZE(auto_hdr_detect);
    PARAMETER_INITIALIZE(hazy_scene_detect);
    PARAMETER_INITIALIZE(gamma_table);
    PARAMETER_INITIALIZE(motion_scene_detect);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Destructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ChromatixASDTuningTypeClass::~ChromatixASDTuningTypeClass()
{
    if (Loaded)
    {
        UnloadModule();
    }
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// GetName
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const CHAR* ChromatixASDTuningTypeClass::GetName(
    const CHAR* const type)
{
    const CHAR* name = type;
    CHAR temp[ParameterFileSymbolTableEntry::TYPE_LEN + 1];
    if (PARAMETER_STRCMP(type, ModuleData::GetType(temp, "ChromatixASDTuningData")) == 0)
    {
        name = "ChromatixASDTuningData";
    }
    return name;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load motion_scene_detect_type
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool motion_scene_detect_type::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(motion_detection_enable);
    PARAMETER_INITIALIZE(stats_width);
    PARAMETER_INITIALIZE(stats_height);
    PARAMETER_INITIALIZE(stats_type);
    PARAMETER_INITIALIZE(detection_alpha);
    PARAMETER_INITIALIZE(detection_level);
    PARAMETER_INITIALIZE(flow_scale);
    PARAMETER_INITIALIZE(motion_level_min_thres);
    PARAMETER_INITIALIZE(motion_level_max_thres);
    PARAMETER_INITIALIZE(dynamic_scale_enable);
    PARAMETER_INITIALIZE(down_sample_factor);

    SYMBOL_TABLE_ENTRY_READ(entry, result, motion_detection_enable, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, stats_width, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, stats_height, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, stats_type, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, detection_alpha, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, detection_level, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, flow_scale, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, motion_level_min_thres, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, motion_level_max_thres, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, dynamic_scale_enable, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, down_sample_factor, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load asd_gamma_table_type
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool asd_gamma_table_type::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(bits_depth);
    PARAMETER_INITIALIZE(entries_num);
    PARAMETER_INITIALIZE(gamma_G);

    SYMBOL_TABLE_ENTRY_READ(entry, result, bits_depth, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, entries_num, alignment)
    if (result)
    {
        result = entry->ReadArray(gamma_G, 256, alignment);
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load hazy_scene_detect_type
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool hazy_scene_detect_type::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(hazy_detection_enable);
    PARAMETER_INITIALIZE(hazy_running_frequency);
    PARAMETER_INITIALIZE(hazy_detection_threshold_on);
    PARAMETER_INITIALIZE(hazy_detection_threshold_off);
    PARAMETER_INITIALIZE(ui_hazy_display_th);
    PARAMETER_INITIALIZE(hazy_3A_compensation_enable);

    SYMBOL_TABLE_ENTRY_READ(entry, result, hazy_detection_enable, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, hazy_running_frequency, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, hazy_detection_threshold_on, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, hazy_detection_threshold_off, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, ui_hazy_display_th, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, hazy_3A_compensation_enable, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load auto_hdr_detect_type
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool auto_hdr_detect_type::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(backlight_high_threshold);
    PARAMETER_INITIALIZE(backlight_low_threshold);
    PARAMETER_INITIALIZE(portrait_high_threshold);
    PARAMETER_INITIALIZE(portrait_low_threshold);
    PARAMETER_INITIALIZE(auto_hdr_3A_compensation_enable);

    SYMBOL_TABLE_ENTRY_READ(entry, result, backlight_high_threshold, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, backlight_low_threshold, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, portrait_high_threshold, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, portrait_low_threshold, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, auto_hdr_3A_compensation_enable, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load portrait_scene_detect_type
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool portrait_scene_detect_type::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(portrait_detection_enable);
    PARAMETER_INITIALIZE(skin_color_boost_factor);
    PARAMETER_INITIALIZE(min_face_content_threshold);
    PARAMETER_INITIALIZE(max_face_content_threshold);
    PARAMETER_INITIALIZE(soft_focus_degree_7_7);
    PARAMETER_INITIALIZE(soft_focus_degree_5_5);
    PARAMETER_INITIALIZE(aggressiveness);
    PARAMETER_INITIALIZE(ui_portrait_display_th);
    PARAMETER_INITIALIZE(portrait_3A_compensation_enable);

    SYMBOL_TABLE_ENTRY_READ(entry, result, portrait_detection_enable, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, skin_color_boost_factor, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, min_face_content_threshold, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, max_face_content_threshold, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, soft_focus_degree_7_7, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, soft_focus_degree_5_5, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, aggressiveness, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, ui_portrait_display_th, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, portrait_3A_compensation_enable, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load landscape_scene_detect_type
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool landscape_scene_detect_type::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(landscape_detection_enable);
    PARAMETER_INITIALIZE(landscape_red_boost_factor);
    PARAMETER_INITIALIZE(landscape_green_boost_factor);
    PARAMETER_INITIALIZE(landscape_blue_boost_factor);
    PARAMETER_INITIALIZE(min_blue_green_content_detection_threshold);
    PARAMETER_INITIALIZE(max_blue_green_content_detection_threshold);
    PARAMETER_INITIALIZE(green_offset_rg);
    PARAMETER_INITIALIZE(green_offset_bg);
    PARAMETER_INITIALIZE(aggressiveness);
    PARAMETER_INITIALIZE(lux_idx_indoor);
    PARAMETER_INITIALIZE(lux_idx_outdoor);
    PARAMETER_INITIALIZE(ui_landscape_display_th);
    PARAMETER_INITIALIZE(landscape_3A_compensation_enable);

    SYMBOL_TABLE_ENTRY_READ(entry, result, landscape_detection_enable, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, landscape_red_boost_factor, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, landscape_green_boost_factor, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, landscape_blue_boost_factor, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, min_blue_green_content_detection_threshold, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, max_blue_green_content_detection_threshold, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, green_offset_rg, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, green_offset_bg, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, aggressiveness, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, lux_idx_indoor, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, lux_idx_outdoor, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, ui_landscape_display_th, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, landscape_3A_compensation_enable, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load backlit_scene_detect_type
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool backlit_scene_detect_type::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(backlight_detection_enable);
    PARAMETER_INITIALIZE(histogram_offset);
    PARAMETER_INITIALIZE(low_luma_threshold);
    PARAMETER_INITIALIZE(high_luma_threshold);
    PARAMETER_INITIALIZE(low_luma_count_percent_threshold);
    PARAMETER_INITIALIZE(high_luma_count_percent_threshold);
    PARAMETER_INITIALIZE(kept_pixel_ratio_th);
    PARAMETER_INITIALIZE(backlit_aggressiveness);
    PARAMETER_INITIALIZE(max_percent_threshold);
    PARAMETER_INITIALIZE(ui_backlit_display_th);
    PARAMETER_INITIALIZE(backlit_3A_compensation_enable);

    SYMBOL_TABLE_ENTRY_READ(entry, result, backlight_detection_enable, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, histogram_offset, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, low_luma_threshold, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, high_luma_threshold, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, low_luma_count_percent_threshold, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, high_luma_count_percent_threshold, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, kept_pixel_ratio_th, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, backlit_aggressiveness, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, max_percent_threshold, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, ui_backlit_display_th, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, backlit_3A_compensation_enable, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load snow_scene_detect_type
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool snow_scene_detect_type::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(snow_scene_detection_enable);
    PARAMETER_INITIALIZE(y_cloudy_snow_threshold);
    PARAMETER_INITIALIZE(awb_y_max_in_grey);
    PARAMETER_INITIALIZE(min_snow_cloudy_sample_th);
    PARAMETER_INITIALIZE(extreme_snow_cloudy_sample_th);
    PARAMETER_INITIALIZE(snow_scene_indoor_index);
    PARAMETER_INITIALIZE(snow_scene_outdoor_index);
    PARAMETER_INITIALIZE(severe_snow_scene_cap);
    PARAMETER_INITIALIZE(snowscene_aggressiveness);
    PARAMETER_INITIALIZE(ui_snow_cloudy_display_th);
    PARAMETER_INITIALIZE(snow_scene_3A_compensation_enable);

    result = asdTuning::ReadEnum_asd_chrx_flag_t(entry, snow_scene_detection_enable, alignment);
    SYMBOL_TABLE_ENTRY_READ(entry, result, y_cloudy_snow_threshold, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, awb_y_max_in_grey, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, min_snow_cloudy_sample_th, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, extreme_snow_cloudy_sample_th, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, snow_scene_indoor_index, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, snow_scene_outdoor_index, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, severe_snow_scene_cap, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, snowscene_aggressiveness, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, ui_snow_cloudy_display_th, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, snow_scene_3A_compensation_enable, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load ChromatixASDTuningType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ChromatixASDTuningType::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(ASD_Software_Type);
    PARAMETER_INITIALIZE(histLUT);
    PARAMETER_INITIALIZE(snow_scene_detect);
    PARAMETER_INITIALIZE(backlit_scene_detect);
    PARAMETER_INITIALIZE(landscape_scene_detect);
    PARAMETER_INITIALIZE(portrait_scene_detect);
    PARAMETER_INITIALIZE(auto_hdr_detect);
    PARAMETER_INITIALIZE(hazy_scene_detect);
    PARAMETER_INITIALIZE(gamma_table);
    PARAMETER_INITIALIZE(motion_scene_detect);

    result = module_version.Load(entry, alignment);
    SYMBOL_TABLE_ENTRY_READ(entry, result, ASD_Software_Type, alignment)

    // Reading Array histLUT from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        histLUTCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, histLUTCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            histLUTID = pointerEntry->ID;
            DupObjInfo* histLUTDupInfo = pointerEntry->GetDupObject(histLUTCount, file, line);
            if (histLUTDupInfo != nullptr && histLUTDupInfo->Object != nullptr)
            {
                histLUT = (float*)histLUTDupInfo->Object;
                if (histLUT == nullptr)
                {
                    if (histLUTDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "histLUT duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            histLUTDupInfo->File, histLUTDupInfo->Line, histLUTDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "histLUT duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            histLUTDupInfo->Line, histLUTDupInfo->RefCount);
                    }
                }
            }

            if (histLUT == nullptr)
            {
                if (result && histLUTCount > 0)
                {
                    histLUT = pointerEntry->ReadArray<float>(histLUTCount, alignment);
                    result = histLUT != nullptr;
                }
                if (!result || histLUT == nullptr)
                {
                    if (histLUTCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate histLUT\n");
                    }
                    histLUTCount = 0;
                }
            }
        }
        if (histLUT == nullptr)
        {
            histLUTCount = 0;
        }
    }
    if (result)
    {
        result = snow_scene_detect.Load(entry, alignment);
    }
    if (result)
    {
        result = backlit_scene_detect.Load(entry, alignment);
    }
    if (result)
    {
        result = landscape_scene_detect.Load(entry, alignment);
    }
    if (result)
    {
        result = portrait_scene_detect.Load(entry, alignment);
    }
    if (result)
    {
        result = auto_hdr_detect.Load(entry, alignment);
    }
    if (result)
    {
        result = hazy_scene_detect.Load(entry, alignment);
    }
    if (result)
    {
        result = gamma_table.Load(entry, alignment);
    }
    if (result)
    {
        result = motion_scene_detect.Load(entry, alignment);
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load module_versionStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ChromatixASDTuningType::module_versionStruct::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(major_revision);
    PARAMETER_INITIALIZE(minor_revision);
    PARAMETER_INITIALIZE(incr_revision);

    SYMBOL_TABLE_ENTRY_READ(entry, result, major_revision, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, minor_revision, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, incr_revision, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload ChromatixASDTuningType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void ChromatixASDTuningType::Unload(ParameterFileSymbolTable* const __table)
{
    if (__table != nullptr && __table->ReleaseDupObject(histLUT))
    {
        PARAMETER_DELETE[] histLUT;
    }
    histLUT = nullptr;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Release the ParameterModule object
/// Requires that this object was created via a ParameterSetManager::GetModule call
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void ChromatixASDTuningType::Release()
{
    ((ChromatixASDTuningTypeClass*)this)->Release();
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Returns the ParameterModule::Modified value
/// The Modified value is incremented when the module's data or pointer values change
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
UINT32 ChromatixASDTuningType::GetModified()
{
    return ((ChromatixASDTuningTypeClass*)this)->Modified;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Create module, and return a new object
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ParameterModule* ChromatixASDTuningTypeClass::Create(
    ModuleData*    moduleData,
    DefaultModule* const defModule) const
{
    ChromatixASDTuningTypeClass* cls = nullptr;

    if (PARAMETER_STRCMP(Type, moduleData->Type) == 0 && Version.Value == moduleData->Version.Value)
    {
        const UINT32 id = moduleData->DuplicateID > 0 ? moduleData->DuplicateID : moduleData->ID;

        ParameterModule* const module = defModule->Find(id);
        if (module != nullptr)
        {
            cls = (ChromatixASDTuningTypeClass*)module;
        }
        else
        {
            cls = PARAMETER_NEW ChromatixASDTuningTypeClass(GetName(moduleData->Type), moduleData);
            cls->SymbolTableID = id;
            defModule->AddModule((ParameterModule*)cls);
        }
    }
    else if (Version.Value != moduleData->Version.Value)
    {
        PARAMETER_LOG_ERROR(moduleData->SetManager, "Unable to create ChromatixASDTuningTypeClass, binary version (%lld) does not match source version (%lld)\n",
            moduleData->Version.Value, Version.Value);
    }
    else
    {
        PARAMETER_LOG_ERROR(moduleData->SetManager, "Unable to create ChromatixASDTuningTypeClass, binary name (%s) does not match source name (%s)\n",
            moduleData->Type, Type);
    }

    return (ParameterModule*)cls;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load module data, return true is successful
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ChromatixASDTuningTypeClass::LoadModule(
    ParameterFileSymbolTable* const table)
{
    bool result = true;

    if (!Loaded)
    {
        BYTE const alignment = table->Alignment;
        ChromatixASDTuningTypeClass* const cls = this;

        ParameterFileSymbolTableEntry  entryObj;
        ParameterFileSymbolTableEntry* const entry = &entryObj;
        // With EzTune enabled, the unused upper byte of SymbolTableID value can change, so clear it
        result = table->Find(entryObj, SymbolTableID & 0x00ffffff);

        if (!result)
        {
            PARAMETER_LOG_ERROR(entry->SetManager, "ChromatixASDTuningTypeClass::LoadModule Failed to find module ID (%d) in Symbol Table\n", SymbolTableID);
        }

        if (result)
        {
            result = cls->Load(entry, alignment);
        }
        Modified++;
        Loaded = true;
    }

    if (!result)
    {
        /// Module failed to fully load, unload it
        UnloadModule();
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload module data
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void ChromatixASDTuningTypeClass::UnloadModule()
{
    if (Loaded)
    {
        if (Data != nullptr && Data->SymbolTable != nullptr)
        {
            Unload(Data->SymbolTable);
        }
        else
        {
            PARAMETER_LOG_ERROR(Data != nullptr ? Data->SetManager : nullptr, "UnloadModule %s called with nullptr "
                "Data->SymbolTable object\n", Name);
            Unload(nullptr);
        }
        Loaded = false;
    }
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// /// Release the ParameterModule object
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void ChromatixASDTuningTypeClass::Release()
{
    ParameterModule::Release();
}

ASDTUNING_NAMESPACE_END
