Skip to content

Commit

Permalink
gh #29 TVS Header changes for AVoutput new features
Browse files Browse the repository at this point in the history
  • Loading branch information
aktamilbe committed Jan 21, 2025
1 parent 940dd14 commit 0e94433
Show file tree
Hide file tree
Showing 5 changed files with 399 additions and 103 deletions.
243 changes: 243 additions & 0 deletions config/pq_capabilities.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,243 @@
[Brightness]
range_from = 0
range_to = 100
pqmode = Entertainment,Dynamic,Expert,Movie,Sports,Graphics,Dynamic2
format = SDR,HDR10,HLG,DV
source = All,Composite1,HDMI1,HDMI2,HDMI3,IP,Tuner
platformsupport = true

[Contrast]
range_from = 0
range_to = 100
pqmode = Entertainment,Dynamic,Expert,Movie,Sports,Graphics,Dynamic2
format = SDR,HDR10,HLG,DV
source = All,Composite1,HDMI1,HDMI2,HDMI3,IP,Tuner
platformsupport = true

[Saturation]
range_from = 0
range_to = 100
pqmode = Entertainment,Dynamic,Expert,Movie,Sports,Graphics,Dynamic2
format = SDR,HDR10,HLG,DV
source = All,Composite1,HDMI1,HDMI2,HDMI3,IP,Tuner
platformsupport = true

[Sharpness]
range_from = 0
range_to = 100
pqmode = Entertainment,Dynamic,Expert,Movie,Sports,Graphics,Dynamic2
format = SDR,HDR10,HLG,DV
source = All,Composite1,HDMI1,HDMI2,HDMI3,IP,Tuner
platformsupport = true

[Hue]
range_from = 0
range_to = 100
pqmode = Entertainment,Dynamic,Expert,Movie,Sports,Graphics,Dynamic2
format = SDR,HDR10,HLG,DV
source = All,Composite1,HDMI1,HDMI2,HDMI3,IP,Tuner
platformsupport = true

[ColorTemperature]
range = Standard,Warm,Cold,UserDefined
pqmode = Entertainment,Dynamic,Expert,Movie,Sports,Graphics,Dynamic2
format = SDR,HDR10,HLG,DV
source = All,Composite1,HDMI1,HDMI2,HDMI3,IP,Tuner
platformsupport = true

[WhiteBalanceRed]
range.gain.from = 0
range.gain.to = 2047
range.offset.from = -1024
range.offset.to = 1023
ColorTemperature = Standard,Warm,Cold,UserDefined,BoostStandard,BoostWarm,BoostCold,BoostUser,Supercold,BoostSupercold
pqmode = none
format = none
source = All,HDMI,TV,AV
platformsupport = true

[WhiteBalanceBlue]
range.gain.from = 0
range.gain.to = 2047
range.offset.from = -1024
range.offset.to = 1023
ColorTemperature = Standard,Warm,Cold,UserDefined,BoostStandard,BoostWarm,BoostCold,BoostUser,Supercold,BoostSupercold
pqmode = none
format = none
source = All,HDMI,TV,AV
platformsupport = true

[WhiteBalanceGreen]
range.gain.from = 0
range.gain.to = 2047
range.offset.from = -1024
range.offset.to = 1023
ColorTemperature = Standard,Warm,Cold,UserDefined,BoostStandard,BoostWarm,BoostCold,BoostUser,Supercold,BoostSupercold
pqmode = none
format = none
source = All,HDMI,TV,AV
platformsupport = true

[GammaTableRed]
range_from = 0
range_to = 1023
gammaIndex_from = 0
gammaIndex_to = 255
ColorTemperature = Standard,Warm,Cold,UserDefined
pqmode = none
format = none
source = none
platformsupport = true

[GammaTableBlue]
range_from = 0
range_to = 1023
gammaIndex_from = 0
gammaIndex_to = 255
ColorTemperature = Standard,Warm,Cold,UserDefined
pqmode = none
format = none
source = none
platformsupport = true

[GammaTableGreen]
range_from = 0
range_to = 1023
gammaIndex_from = 0
gammaIndex_to = 255
ColorTemperature = Standard,Warm,Cold,UserDefined
pqmode = none
format = none
source = none
platformsupport = true

[Backlight]
range_from = 0
range_to = 100
pqmode = Entertainment,Dynamic,Expert,Movie,Sports,Graphics,Dynamic2
format = SDR,HDR10,HLG,DV
source = All,Composite1,HDMI1,HDMI2,HDMI3,IP,Tuner
platformsupport = true

[DimmingMode]
range = local,fixed
index = 1,0
pqmode = Entertainment,Dynamic,Expert,Movie,Sports,Graphics,Dynamic2
format = SDR,HDR10,HLG,DV
source = All,Composite1,HDMI1,HDMI2,HDMI3,IP,Tuner
platformsupport = true

[BacklightControl]
range = Manual,Ambient
index = 1,2
pqmode = none
source = none
format = none
platformsupport = true

[DolbyVisionMode]
range = Dark,Bright
index = 0,1
pqmode = Entertainment,Dynamic,Expert,Movie,Sports,Graphics,Dynamic2
format = none
source = All,HDMI1,HDMI2,HDMI3,IP,Tuner,Composite1
platformsupport = true

[AspectRatio]
range = TV AUTO,TV DIRECT,TV NORMAL,TV 16X9 STRETCH,TV 4X3 PILLARBOX,TV ZOOM
index = 4,5,3,1,0,6
pqmode = none
source = none
format = none
platformsupport = true

[LowLatencyState]
range_from = 0
range_to = 1
pqmode = Entertainment,Dynamic,Expert,Movie,Sports,Graphics,Dynamic2
format = SDR,HDR10,HLG,DV
source = All,HDMI1,HDMI2,HDMI3,IP,Tuner,Composite1
platformsupport = true

[LocalDimmingLevel]
range = 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,255
pqmode = Entertainment,Dynamic,Expert,Movie,Sports,Graphics,Dynamic2
format = SDR,HDR10,HLG,DV
source = All,HDMI1,HDMI2,HDMI3,IP,Tuner,Composite1
platformsupport = true

[PictureMode]
range = Entertainment,Dynamic,Expert,Movie,Sports,Graphics,Dynamic2
index = 0,1,3,4,8,9,11
pqmode = none
format = SDR,HDR10,HLG,DV
source = All,HDMI1,HDMI2,HDMI3,IP,Tuner,Composite1
platformsupport = true

[VideoSource]
range = All,Composite1,HDMI1,HDMI2,HDMI3,IP,Tuner
index = -1,1,5,6,7,10,11
pqmode = none
format = none
source = none
platformsupport = true

[VideoFormat]
range = HDR10,DV,HLG,SDR
index = 1,3,5,6
pqmode = none
format = none
source = none
platformsupport = true

[VideoFrameRate]
range = 0,24,25,30,50,60,23.98,29.97,59.94
pqmode = none
format = none
source = none
platformsupport = true

[TMAX]
range_from = 0
range_to = 1000
DimmingLevel = nonboost,boost,burst
pqmode = none
format = none
source = none
platformsupport = true

[CMS]
range_Saturation_from = 0
range_Saturation_to = 100
range_Hue_from = 0
range_Hue_to = 100
range_Luma_from = 0
range_Luma_to = 30
color = Red,Green,Blue,Cyan,Magenta,Yellow
component = Saturation,Hue,Luma
pqmode = Entertainment,Dynamic,Expert,Movie,Sports,Graphics,Dynamic2
format = SDR,HDR10,HLG,DV
source = All,Composite1,HDMI1,HDMI2,HDMI3,IP,Tuner
platformsupport = true


[CustomWhiteBalance]
range_Gain_from = 0
range_Gain_to = 2047
range_Offset_from = -1024
range_Offset_to = 1023
color = Red,Green,Blue
control = Gain,Offset
pqmode = Entertainment,Dynamic,Expert,Movie,Sports,Graphics,Dynamic2
format = SDR,HDR10,HLG,DV
source = All,Composite1,HDMI1,HDMI2,HDMI3,IP,Tuner
platformsupport = true

[HDRMode]
range = Dark,Bright
index_HDR10 = 3,4
index_HLG = 6,7
pqmode = Entertainment,Dynamic,Expert,Movie,Sports,Graphics,Dynamic2
format = HDR10,HLG
source = All,HDMI1,HDMI2,HDMI3,IP,Tuner,Composite1
platformsupport = false
6 changes: 6 additions & 0 deletions docs/pages/tv-settings_halSpec.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ Picture profile database will have 5 types of tables:
| | | | CMS Luma YELLOW |
| | | | CMS Luma CYAN |
| | | | CMS Luma MAGENTA |
| | | | Custom WhiteBalance Gain RED |
| | | | Custom WhiteBalance Gain GREEN |
| | | | Custom WhiteBalance Gain BLUE |
| | | | Custom WhiteBalance Offset RED |
| | | | Custom WhiteBalance Offset GREEN |
| | | | Custom WhiteBalance Offset BLUE |
| | | Theater/Movie | Repeat as standard |
| | | FilmMaker | Repeat as standard |
| | | Sports | Repeat as standard |
Expand Down
85 changes: 85 additions & 0 deletions include/tvSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -2622,6 +2622,91 @@ 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 (Red,Green,Blue Gain/Offset) for the current picture mode index, current video source,
* and current video format.
* The custom WhiteBalance (Red, Green, Blue Gain/Offset) is applicable only when the color temperature is set to tvColorTemp_USER.
*
* Gain - Modifies the intensity of Red, Green, and Blue at the brighter level
* Offset - Modifies the intensity of Red, Green, and Blue at the darker level
*
* @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.Valid range gain (0 - 2047) and offset (-1024 to 1023)
*
* @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
* @pre SetColorTemperature() should be set to "tvColorTemp_USER" before calling this API
*/
tvError_t SetCustom2PointWhiteBalance(tvWBColor_t color, tvWBControl_t control, int value);

/**
* @brief Gets the Custom WhiteBalance
*
* This function gets the custom WhiteBalance(Red,Green,Blue Gain/Offset) value for the current video source selected,
* current video format played,picture mode selected,given color and given control value.
*
* The function always retrieves the custom WhiteBalance (Red, Green, Blue Gain/Offset) associated with tvColorTemp_USER.
*
* Gain - Modifies the intensity of Red, Green, and Blue at the brighter level
* Offset - Modifies the intensity of Red, Green, and Blue at the darker level
*
* @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[out] value - 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 SetCustom2PointWhiteBalance()
*/
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 Whitebalance value should be applied automatically whenever the
* specified specified primary video format is played and specified primary video source is selected.
* Gain - Modifies the intensity of Red, Green, and Blue at the brighter level
* Offset - Modifies the intensity of Red, Green, and Blue at the darker level
*
* @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 parmeter 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
* @param[in] value - The WhiteBalance value to be set.Valid range gain (0 - 2047) and offset (-1024 to 1023)
*
* @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
Expand Down
Loading

0 comments on commit 0e94433

Please sign in to comment.