Brightness/Contrast/Hue/Saturation
[Video Filters]
Detailed Description
The BCHS video filter is a filter used to modify the brightness, contrast, hue and/or saturation of the source image.
Filter Parameters:
Example Usage:
|
Deprecated functions |
on2sc | editor_options_GetBrightness (const FLIX2HANDLE flix, int32_t *pBrightness) |
| Get the current brightness adjustment factor.
|
on2sc | editor_options_SetBrightness (FLIX2HANDLE flix, const int32_t brightness) |
| Set the brightness adjustment factor.
|
on2sc | editor_options_GetUseBrightness (const FLIX2HANDLE flix, on2bool *pUseBrightness) |
| Determine if the brightness filter is enabled.
|
on2sc | editor_options_SetUseBrightness (FLIX2HANDLE flix, const on2bool bUseBrightness) |
| Enable/disable the brightness filter.
|
on2sc | editor_options_GetContrast (const FLIX2HANDLE flix, double *pContrast) |
| Get the current contrast adjustment factor.
|
on2sc | editor_options_SetContrast (FLIX2HANDLE flix, const double contrast) |
| Set the contrast adjustment factor.
|
on2sc | editor_options_GetUseContrast (const FLIX2HANDLE flix, on2bool *pUseContrast) |
| Determine if the contrast filter is enabled.
|
on2sc | editor_options_SetUseContrast (FLIX2HANDLE flix, const on2bool bUseContrast) |
| Enable/disable the contrast filter.
|
on2sc | editor_options_GetHue (const FLIX2HANDLE flix, int32_t *pHue) |
| Get the current hue adjustment factor.
|
on2sc | editor_options_SetHue (FLIX2HANDLE flix, const int32_t hue) |
| Set the hue adjustment factor.
|
on2sc | editor_options_GetUseHue (const FLIX2HANDLE flix, on2bool *pUseHue) |
| Determine if the hue filter is enabled.
|
on2sc | editor_options_SetUseHue (FLIX2HANDLE flix, const on2bool bUseHue) |
| Enable/disable the hue filter.
|
on2sc | editor_options_GetSaturation (const FLIX2HANDLE flix, double *pSaturation) |
| Get the current saturation adjustment factor.
|
on2sc | editor_options_SetSaturation (FLIX2HANDLE flix, const double saturation) |
| Set the saturation adjustment factor.
|
on2sc | editor_options_GetUseSaturation (const FLIX2HANDLE flix, on2bool *pUseSaturation) |
| Determine if the saturation filter is enabled.
|
on2sc | editor_options_SetUseSaturation (FLIX2HANDLE flix, const on2bool bUseSaturation) |
| Enable/disable the saturation filter.
|
Defines |
#define | FE2_FILTER_BCHS |
| Filter name for use with Flix2_AddFilter().
|
#define | FE2_BCHS_BRIGHTNESS |
| Parameter for the brightness adjustment factor.
|
#define | FE2_BCHS_CONTRAST |
| Parameter for the contrast adjustment factor.
|
#define | FE2_BCHS_HUE |
| Parameter for the hue adjustment factor.
|
#define | FE2_BCHS_SATURATION |
| Parameter for the saturation adjustment factor.
|
Define Documentation
#define FE2_BCHS_BRIGHTNESS |
Parameter for the brightness adjustment factor.
Determines the level by which to adjust the brightness. Brightness is adjusted on a scale of -255 to 255, with 0 indicating no change. To increase the relative brightness of the video, use a positive number. To decrease the relative brightness of the video, use a negative number.
- Note:
- Valid range: [-255,255]
Default: 0 (no change)
Definition at line 58 of file bchs.h.
#define FE2_BCHS_CONTRAST |
Parameter for the contrast adjustment factor.
Determines the level by which to adjust the contrast. Contrast is adjusted on a scale of -255 to 255, with 0 indicating no change. To increase the relative contrast of the video, use a positive number. To decrease the relative contrast of the video, use a negative number.
- Note:
- Valid range: [-255,255]
Default: 0 (no change)
Definition at line 69 of file bchs.h.
Parameter for the hue adjustment factor.
Determines the level by which to adjust the hue. Hue is adjusted on a scale of -180 to 180, with 0 indicating no change. To adjust the hue of the video towards red, use a negative number. To adjust the hue of the video towards green, use a positive number.
- Note:
- Valid range: [-180,180]
Default: 0 (no change)
Definition at line 79 of file bchs.h.
#define FE2_BCHS_SATURATION |
Parameter for the saturation adjustment factor.
Determines the level by which to adjust the saturation. Saturation is adjusted on a scale of -255 to 255, with 0 indicating no change. To increase the relative saturation of the video, use a positive number. To decrease the relative saturation of the video, use a negative number.
- Note:
- Valid range: [-255,255] Default: 0
Definition at line 90 of file bchs.h.
Function Documentation
Get the current brightness adjustment factor.
- Parameters:
-
- Return values:
-
| ON2_OK | The brightness value was successfully retrieved from the engine. |
| ON2_NET_ERROR | The underlying communication layer failed. |
- Note:
- If a value other than ON2_OK is returned, the output variables should not be considered valid.
- Deprecated:
- Use the Filter Interface along with FE2_FILTER_BCHS and the FE2_BCHS_BRIGHTNESS parameter. This function will be removed in a future release.
Get the current contrast adjustment factor.
- Parameters:
-
- Return values:
-
| ON2_OK | The contrast value was successfully retrieved from the engine. |
| ON2_NET_ERROR | The underlying communication layer failed. |
- Note:
- If a value other than ON2_OK is returned, the output variables should not be considered valid.
- Deprecated:
- Use the Filter Interface along with FE2_FILTER_BCHS and the FE2_BCHS_CONTRAST parameter. This function will be removed in a future release.
Get the current hue adjustment factor.
- Parameters:
-
- Return values:
-
| ON2_OK | The hue value was successfully retrieved from the engine. |
| ON2_NET_ERROR | The underlying communication layer failed. |
- Note:
- If a value other than ON2_OK is returned, the output variables should not be considered valid.
- Deprecated:
- Use the Filter Interface along with FE2_FILTER_BCHS and the FE2_BCHS_HUE parameter. This function will be removed in a future release.
on2sc editor_options_GetSaturation |
( |
const FLIX2HANDLE |
flix, |
|
|
double * |
pSaturation | |
|
) |
| | |
Get the current saturation adjustment factor.
- Parameters:
-
- Return values:
-
| ON2_OK | The saturation value was successfully retrieved from the engine. |
| ON2_NET_ERROR | The underlying communication layer failed. |
- Note:
- If a value other than ON2_OK is returned, the output variables should not be considered valid.
- Deprecated:
- Use the Filter Interface along with FE2_FILTER_BCHS and the FE2_BCHS_SATURATION parameter. This function will be removed in a future release.
Determine if the brightness filter is enabled.
- Parameters:
-
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[out] | pUseBrightness | Variable to update with the current brightness enable status |
- Return values:
-
| ON2_OK | The brightness filter enable status was successfully retrieved from the engine. |
| ON2_NET_ERROR | The underlying communication layer failed. |
- Note:
- If a value other than ON2_OK is returned, the output variables should not be considered valid.
- Deprecated:
- Use the Filter Interface along with FE2_FILTER_BCHS and the FE2_BCHS_BRIGHTNESS parameter. This function will be removed in a future release.
Determine if the contrast filter is enabled.
- Parameters:
-
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[out] | pUseContrast | Variable to update with the current contrast enable status |
- Return values:
-
| ON2_OK | The contrast filter enable status was successfully retrieved from the engine. |
| ON2_NET_ERROR | The underlying communication layer failed. |
- Note:
- If a value other than ON2_OK is returned, the output variables should not be considered valid.
- Deprecated:
- Use the Filter Interface along with FE2_FILTER_BCHS and the FE2_BCHS_CONTRAST parameter. This function will be removed in a future release.
Determine if the hue filter is enabled.
- Parameters:
-
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[out] | pUseHue | Variable to update with the current hue enable status |
- Return values:
-
| ON2_OK | The hue filter enable status was successfully retrieved from the engine. |
| ON2_NET_ERROR | The underlying communication layer failed. |
- Note:
- If a value other than ON2_OK is returned, the output variables should not be considered valid.
- Deprecated:
- Use the Filter Interface along with FE2_FILTER_BCHS and the FE2_BCHS_HUE parameter. This function will be removed in a future release.
Determine if the saturation filter is enabled.
- Parameters:
-
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[out] | pUseSaturation | Variable to update with the current saturation enable status |
- Return values:
-
| ON2_OK | The saturation filter enable status was successfully retrieved from the engine. |
| ON2_NET_ERROR | The underlying communication layer failed. |
- Note:
- If a value other than ON2_OK is returned, the output variables should not be considered valid.
- Deprecated:
- Use the Filter Interface along with FE2_FILTER_BCHS and the FE2_BCHS_SATURATION parameter. This function will be removed in a future release.
Set the brightness adjustment factor.
Determines the level by which to adjust the brightness. Brightness is adjusted on a scale of -255 to 255, with 0 indicating no change. To increase the relative brightness of the video, use a positive number. To decrease the relative brightness of the video, use a negative number.
- Parameters:
-
- Return values:
-
- Note:
- This call will have no effect on the encoded video unless the brightness filter is enabled with editor_options_SetUseBrightness(). The default value is 0 (no change).
- Deprecated:
- Use the Filter Interface along with FE2_FILTER_BCHS and the FE2_BCHS_BRIGHTNESS parameter. This function will be removed in a future release.
Set the contrast adjustment factor.
Determines the level by which to adjust the contrast. Contrast is adjusted on a scale of -255 to 255, with 0 indicating no change. To increase the relative contrast of the video, use a positive number. To decrease the relative contrast of the video, use a negative number.
- Parameters:
-
- Return values:
-
- Note:
- This call will have no effect on the encoded video unless the contrast filter is enabled with editor_options_SetUseContrast(). The default value is 1.
- Deprecated:
- Use the Filter Interface along with FE2_FILTER_BCHS and the FE2_BCHS_CONTRAST parameter. This function will be removed in a future release.
Set the hue adjustment factor.
Determines the level by which to adjust the hue. Hue is adjusted on a scale of -180 to 180, with 0 indicating no change. To adjust the hue of the video towards red, use a negative number. To adjust the hue of the video towards green, use a positive number.
- Parameters:
-
- Return values:
-
- Note:
- This call will have no effect on the encoded video unless the hue filter is enabled with editor_options_SetUseHue(). The default value is 0.
- Deprecated:
- Use the Filter Interface along with FE2_FILTER_BCHS and the FE2_BCHS_HUE parameter. This function will be removed in a future release.
on2sc editor_options_SetSaturation |
( |
FLIX2HANDLE |
flix, |
|
|
const double |
saturation | |
|
) |
| | |
Set the saturation adjustment factor.
Determines the level by which to adjust the saturation. Saturation is adjusted on a scale of -255 to 255, with 0 indicating no change. To increase the relative saturation of the video, use a positive number. To decrease the relative saturation of the video, use a negative number.
- Parameters:
-
- Return values:
-
- Note:
- This call will have no effect on the encoded video unless the saturation filter is enabled with editor_options_SetUseSaturation(). The default value is 1.
- Deprecated:
- Use the Filter Interface along with FE2_FILTER_BCHS and the FE2_BCHS_SATURATION parameter. This function will be removed in a future release.
Enable/disable the contrast filter.
- Parameters:
-
- Return values:
-
| ON2_OK | The contrast enable status was successfully set in the engine. |
| ON2_NET_ERROR | The underlying communication layer failed. |
- Note:
- By default, the contrast filter is disabled.
- Deprecated:
- Use the Filter Interface along with FE2_FILTER_BCHS and the FE2_BCHS_CONTRAST parameter. This function will be removed in a future release.
Enable/disable the hue filter.
- Parameters:
-
- Return values:
-
| ON2_OK | The hue enable status was successfully set in the engine. |
| ON2_NET_ERROR | The underlying communication layer failed. |
- Note:
- By default, the hue filter is disabled.
- Deprecated:
- Use the Filter Interface along with FE2_FILTER_BCHS and the FE2_BCHS_HUE parameter. This function will be removed in a future release.