diff --git a/include/tvSettings.h b/include/tvSettings.h index 116dfa0..65642f4 100755 --- a/include/tvSettings.h +++ b/include/tvSettings.h @@ -2622,6 +2622,76 @@ tvError_t GetLdimZoneShortCircuitStatus(unsigned char* shortcircuit_zone_list, u */ tvError_t GetNumberOfDimmingZones(unsigned int* number_of_dimming_zones); +/** + * @brief Sets 2Point Custom Whitebalance + * + * This function sets Whitebalance for a current picture mode index, primary video source @n + * and primary video format. + * + * @param[in] color - Color type value. Valid value will be a member of ::tvWBColor_t + * @param[in] control - Control index value. Valid values will be a member of ::tvWBControl_t + * @param[in] value - The WhiteBalance Value to be set. + * + * @return tvError_t + * + * @retval tvERROR_NONE - Success + * @retval tvERROR_INVALID_PARAM - Input parameter is invalid + * @retval tvERROR_INVALID_STATE - Interface is not initialized + * @retval tvERROR_OPERATION_NOT_SUPPORTED - Operation is not supported + * @retval tvERROR_GENERAL - Underlying failures - SoC, memory, etc + * + * @pre TvInit() should be called before calling this API + */ +tvError_t SetCustom2PointWhiteBalance(tvWBColor_t color, tvWBControl_t control, int value); + +/** + * @brief Gets the current Custom WhiteBalance + * + * This function gets the current WhiteBalance value for the primary video source selected, + * primary video format played,picture mode selected,given color and given control value.. + * + * @param[out] valuw - Current WB Value. Valid range gain (0 - 2047) and offset (-1024 to 1023) + * + * @return tvError_t + * + * @retval tvERROR_NONE - Success + * @retval tvERROR_INVALID_PARAM - Parameter is invalid + * @retval tvERROR_INVALID_STATE - Interface is not initialized + * @retval tvERROR_GENERAL - Underlying failures - SoC, memory, etc + * + * @pre TvInit() should be called before calling this API + * + * @see SetBrightness() + */ +tvError_t GetCustom2PointWhiteBalance(tvWBColor_t color, tvWBControl_t control, int *value); + +/** + * @brief Saves WhiteBalance + * + * This function saves the WhiteBalance in picture profile database for the specific primary video format type + * and primary video source. The saved picture mode should be applied automatically whenever the + * specified specified primary video format is played and specified primary video source is selected. + * + * @param[in] videoSrcType - Source input value. Valid value will be a member of ::tvVideoSrcType_t + * @param[in] pictureMode - Picture mode value to be saved. Valid values are as per values returned by + * ::pic_modes_t.value parmaeter from GetTVSupportedPictureModes API. + * @param[in] videoFormatType - Video format type value. Valid value will be a member of ::tvVideoFormatType_t + * @param[in] color - color Value. Valid value will be a member of ::tvWBColor_t + * @param[in] control - control Value.Valid value will be a member of ::tvWBControl_t + * + * @return tvError_t + * + * @retval tvERROR_NONE - Success + * @retval tvERROR_INVALID_PARAM - Input parameter is invalid + * @retval tvERROR_INVALID_STATE - Interface is not initialized + * @retval tvERROR_OPERATION_NOT_SUPPORTED - Operation is not supported + * @retval tvERROR_GENERAL - Underlying failures - SoC, memory, etc + * + * @pre TvInit() should be called before calling this API + */ + +tvError_t SaveCustom2PointWhiteBalance(tvVideoSrcType_t videoSrcType, int pq_mode,tvVideoFormatType_t videoFormatType, tvWBColor_t color, tvWBControl_t control, int value); + #ifdef __cplusplus } #endif diff --git a/include/tvSettingsExtODM.h b/include/tvSettingsExtODM.h index 9c1b78f..c712468 100644 --- a/include/tvSettingsExtODM.h +++ b/include/tvSettingsExtODM.h @@ -59,33 +59,6 @@ extern "C" { #endif -/** - * @brief Reads PQ capability information sections PQ capability configuration file. To be deprecated soon. - * @note SOC vendors can stub these ODM functions and mark it as weak - * - * This function reads PQ capability information sections from the PQ capability configuration file. @n - * The file format is predefined and a template file is supplied by RDK. - * - * @param[in] param - Heading of the section in PQ capability configuration file. - * @param[out] rangeInfo - Range information for the specified section to be returned. - * @param[out] pqmodeInfo - Picture mode information for the specified section to be returned. - * @param[out] formatInfo - Video format information for the specified section to be returned. - * @param[out] sourceInfo - Video source information for the specified section to be returned. - * @param[out] platformsupport - Platform support information for the specified section to be returned. - * @param[out] index - Index information for the specified section to be returned. - * - * @return tvError_t - * - * @retval tvERROR_NONE - Success - * @retval tvERROR_INVALID_PARAM - Input parameter is invalid - * @retval tvERROR_INVALID_STATE - Interface is not initialized - * @retval tvERROR_GENERAL - Underlying failures - SoC, memory, etc - * - * @pre tvInit() should be called before calling this API - */ -int ReadCapablitiesFromConfODM(std::string &rangeInfo,std::string &pqmodeInfo,std::string &formatInfo,std::string &sourceInfo, - std::string param, std::string & platformsupport, std::string & index); - /** * @brief Gets the current white balance info. To be deprecated soon. * @note SOC vendors can stub these ODM functions and mark it as weak diff --git a/include/tvTypes.h b/include/tvTypes.h index d79d76d..45326ce 100755 --- a/include/tvTypes.h +++ b/include/tvTypes.h @@ -371,6 +371,13 @@ typedef enum tvPQParameterIndex { PQ_PARAM_CMS_LUMA_YELLOW, //!< Picture parmaeter is Component luma yellow PQ_PARAM_CMS_LUMA_CYAN, //!< Picture parmaeter is Component luma cyan PQ_PARAM_CMS_LUMA_MAGENTA, //!< Picture parmaeter is Component luma magenta + PQ_PARAM_WB_RED_GAIN, //!< Picture parmaeter is Component Red Gain + PQ_PARAM_WB_GREEN_GAIN, //!< Picture parmaeter is Component Green Gain + PQ_PARAM_WB_BLUE_GAIN, //!< Picture parmaeter is Component Blue Gain + PQ_PARAM_WB_RED_OFFSET, //!< Picture parmaeter is Component Red Offset + PQ_PARAM_WB_GREEN_OFFSET, //!< Picture parmaeter is Component Blue offset + PQ_PARAM_WB_BLUE_OFFSET, //!< Picture parmaeter is Component Green Offset + PQ_PARAM_HDR_MODE, //!< Picture parmaeter is HDRMode PQ_PARAM_MAX //!< End of enum }tvPQParameterIndex_t; @@ -541,6 +548,30 @@ typedef struct tvVideoFrameRateChangeCB cb; //!< Video frame change call back function pointed }tvVideoFrameRateCallbackData; +/** + * @brief Enumeration defining the supported WhiteBalance Color + * + */ +typedef enum +{ + tvWB_COLOR_RED = 0, + tvWB_COLOR_GREEN, + tvWB_COLOR_BLUE, + tvWB_COLOR_MAX +}tvWBColor_t; + +/** + * @brief Enumeration defining the supported WhiteBalance Control + * + */ +typedef enum +{ + tvWB_CONTROL_GAIN = 0, + tvWB_CONTROL_OFFSET, + tvWB_CONTROL_MAX +}tvWBControl_t; + + #ifdef __cplusplus } #endif