Crop
[Video Filters]

Defines

#define FE2_FILTER_CROP
 Filter name for use with Flix2_AddFilter().
#define FE2_CROP_TOP
 Filter parameter for setting bounding box's top coordinate.
#define FE2_CROP_BOTTOM
 Filter parameter for setting bounding box's bottom coordinate.
#define FE2_CROP_LEFT
 Filter parameter for setting bounding box's left coordinate.
#define FE2_CROP_RIGHT
 Filter parameter for setting bounding box's right coordinate.

Deprecated functions



on2sc editor_options_GetCrop (const FLIX2HANDLE flix, on2bool *pCrop)
 Determine if the crop filter is enabled.
on2sc editor_options_SetCrop (FLIX2HANDLE flix, const on2bool crop)
 Enable/disable the crop filter.
on2sc editor_options_GetCropBounds (const FLIX2HANDLE flix, int32_t *pTop, int32_t *pLeft, int32_t *pBottom, int32_t *pRight)
 Get the current bounding box used for cropping.
on2sc editor_options_SetCropBounds (FLIX2HANDLE flix, const int32_t top, const int32_t left, const int32_t bottom, const int32_t right)
 Set the current bounding box used for cropping.
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.
on2sc editor_options_GetUseCut (const FLIX2HANDLE flix, on2bool *pUseCut)
 Determine if the cut filter is enabled.
on2sc editor_options_SetUseCut (FLIX2HANDLE flix, const on2bool bUseCut)
 Enable/disable the cut filter.
on2sc editor_options_GetCutStartTime (const FLIX2HANDLE flix, double *pStartTime)
 Get the current cut start time.
on2sc editor_options_SetCutStartTime (FLIX2HANDLE flix, const double start_time)
 Set the cut start time.
on2sc editor_options_GetCutStopTime (const FLIX2HANDLE flix, double *pEndTime)
 Get the current cut stop time.
on2sc editor_options_SetCutStopTime (FLIX2HANDLE flix, const double end_time)
 Set the cut stop time.

Detailed Description

The crop video filter is a filter used to isolate a subsection of an input image.

Filter Parameters:

   Name                                |   Type   | Opt/Reqd |    Range
   =============================================================================
   FE2_CROP_TOP                        | Numeric  | Optional | [0,video height]
   FE2_CROP_BOTTOM                     | Numeric  | Optional | [0,video height]
   FE2_CROP_LEFT                       | Numeric  | Optional | [0,video width]
   FE2_CROP_RIGHT                      | Numeric  | Optional | [0,video width]

Example Usage:

   sc = Flix2_AddFilter(&filter, flix, FE2_FILTER_CROP);
   //set crop bounding box to (0,0,240,320) (t,l,b,r)
   if(sc == ON2_OK)
       sc = Flix2_FilterSetParam(filter, FE2_CROP_BOTTOM, 240);
   if(sc == ON2_OK)
       sc = Flix2_FilterSetParam(filter, FE2_CROP_RIGHT, 320);

Define Documentation

#define FE2_CROP_BOTTOM

Filter parameter for setting bounding box's bottom coordinate.

Note:
Default: input image height
Value must be a multiple of 2. Odd values will be silently adjusted down.

Definition at line 61 of file crop.h.

#define FE2_CROP_LEFT

Filter parameter for setting bounding box's left coordinate.

Note:
Default: 0
Value must be a multiple of 2. Odd values will be silently adjusted down.

Definition at line 67 of file crop.h.

#define FE2_CROP_RIGHT

Filter parameter for setting bounding box's right coordinate.

Note:
Default: input image width
Value must be a multiple of 2. Odd values will be silently adjusted down.

Definition at line 73 of file crop.h.

#define FE2_CROP_TOP

Filter parameter for setting bounding box's top coordinate.

Note:
Default: 0
Value must be a multiple of 2. Odd values will be silently adjusted down.

Definition at line 55 of file crop.h.

#define FE2_FILTER_CROP

Filter name for use with Flix2_AddFilter().

Definition at line 49 of file crop.h.


Function Documentation

on2sc editor_options_GetBrightness ( const FLIX2HANDLE  flix,
int32_t pBrightness 
)

Get the current brightness adjustment factor.

Parameters:
[in] flix Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx()
[out] pBrightness Brightness factor (-255..255)
Return values:
ON2_OK The brightness value was successfully retrieved from the engine.
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.
on2sc editor_options_GetContrast ( const FLIX2HANDLE  flix,
double *  pContrast 
)

Get the current contrast adjustment factor.

Parameters:
[in] flix Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx()
[out] pContrast Contrast factor (-255..255)
Return values:
ON2_OK The contrast value was successfully retrieved from the engine.
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.
on2sc editor_options_GetCrop ( const FLIX2HANDLE  flix,
on2bool pCrop 
)

Determine if the crop filter is enabled.

Parameters:
[in] flix Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx()
[out] pCrop Variable to update with the current crop enable status
Return values:
ON2_OK The crop enable status was successfully retrieved from the engine.
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_CROP. This function will be removed in a future release.
on2sc editor_options_GetCropBounds ( const FLIX2HANDLE  flix,
int32_t pTop,
int32_t pLeft,
int32_t pBottom,
int32_t pRight 
)

Get the current bounding box used for cropping.

Parameters:
[in] flix Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx()
[out] pTop Topmost row of the cropped area
[out] pLeft Leftmost column of the cropped area
[out] pBottom Bottommost row of the cropped area
[out] pRight Rightmost row of the cropped area
Return values:
ON2_OK The crop bounding box was successfully retrieved from the engine.
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_CROP and the FE2_CROP_TOP, FE2_CROP_LEFT, FE2_CROP_BOTTOM and FE2_CROP_RIGHT parameters. This function will be removed in a future release.
on2sc editor_options_GetCutStartTime ( const FLIX2HANDLE  flix,
double *  pStartTime 
)

Get the current cut start time.

Parameters:
[in] flix Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx()
[out] pStartTime Clip start time (in seconds)
Return values:
ON2_OK The cut start time was successfully retrieved from the engine.
Note:
If a value other than ON2_OK is returned, the output variables should not be considered valid.
Deprecated:
Please use: With the constants: for access to the flix engine cut filter.
on2sc editor_options_GetCutStopTime ( const FLIX2HANDLE  flix,
double *  pEndTime 
)

Get the current cut stop time.

Parameters:
[in] flix Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx()
[out] pEndTime Clip stop time (in seconds, -1 for end)
Return values:
ON2_OK The cut stop time was successfully retrieved from the engine.
Note:
If a value other than ON2_OK is returned, the output variables should not be considered valid.
Deprecated:
Please use: With the constants: for access to the flix engine cut filter.
on2sc editor_options_GetHue ( const FLIX2HANDLE  flix,
int32_t pHue 
)

Get the current hue adjustment factor.

Parameters:
[in] flix Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx()
[out] pHue Hue factor (-180..180)
Return values:
ON2_OK The hue value was successfully retrieved from the engine.
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:
[in] flix Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx()
[out] pSaturation Saturation factor (-255..255)
Return values:
ON2_OK The saturation value was successfully retrieved from the engine.
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.
on2sc editor_options_GetUseBrightness ( const FLIX2HANDLE  flix,
on2bool pUseBrightness 
)

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.
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.
on2sc editor_options_GetUseContrast ( const FLIX2HANDLE  flix,
on2bool pUseContrast 
)

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.
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.
on2sc editor_options_GetUseCut ( const FLIX2HANDLE  flix,
on2bool pUseCut 
)

Determine if the cut filter is enabled.

Parameters:
[in] flix Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx()
[out] pUseCut Variable to update with the current saturation enable status
Return values:
ON2_OK The cut filter enable status was successfully retrieved from the engine.
Note:
If a value other than ON2_OK is returned, the output variables should not be considered valid.
Deprecated:
Please use: With the constants: for access to the flix engine cut filter.
on2sc editor_options_GetUseHue ( const FLIX2HANDLE  flix,
on2bool pUseHue 
)

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.
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_GetUseSaturation ( const FLIX2HANDLE  flix,
on2bool pUseSaturation 
)

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.
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.
on2sc editor_options_SetBrightness ( FLIX2HANDLE  flix,
const int32_t  brightness 
)

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:
[in] flix Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx()
[in] brightness Brightness Factor (-255 to 255)
Return values:
ON2_OK The brightness value was successfully set in the engine.
ON2_INVALID_PARAMS The value is out of range.
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.
on2sc editor_options_SetContrast ( FLIX2HANDLE  flix,
const double  contrast 
)

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:
[in] flix Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx()
[in] contrast Contrast Factor (-255 to 255)
Return values:
ON2_OK The contrast value was successfully set in the engine.
ON2_INVALID_PARAMS The value is out of range.
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.
on2sc editor_options_SetCrop ( FLIX2HANDLE  flix,
const on2bool  crop 
)

Enable/disable the crop filter.

Parameters:
[in] flix Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx()
[in] crop New crop enable status. on2true to enable, on2false to disable.
Return values:
ON2_OK The crop enable status was successfully set in the engine.
Note:
By default, the crop filter is disabled.
Deprecated:
Use the Filter Interface along with FE2_FILTER_CROP. This function will be removed in a future release.
on2sc editor_options_SetCropBounds ( FLIX2HANDLE  flix,
const int32_t  top,
const int32_t  left,
const int32_t  bottom,
const int32_t  right 
)

Set the current bounding box used for cropping.

Parameters:
[in] flix Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx()
[in] top Topmost row of the cropped area
[in] left Leftmost column of the cropped area
[in] bottom Bottommost row of the cropped area
[in] right Rightmost row of the cropped area
Return values:
ON2_OK The crop bounding box was successfully set in the engine.
Note:
This call will have no effect on the encoded video unless the crop filter is enabled with editor_options_SetCrop()
Deprecated:
Use the Filter Interface along with FE2_FILTER_CROP and the FE2_CROP_TOP, FE2_CROP_LEFT, FE2_CROP_BOTTOM and FE2_CROP_RIGHT parameters. This function will be removed in a future release.
on2sc editor_options_SetCutStartTime ( FLIX2HANDLE  flix,
const double  start_time 
)

Set the cut start time.

Sets the time (in seconds from the beginning of the source) to begin the media cut. 0 indicates start immediately.

Parameters:
[in] flix Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx()
[in] start_time Start time (in seconds, relative to source)
Return values:
ON2_OK The start time value was successfully set in the engine.
ON2_INVALID_PARAMS The value is out of range.
Note:
This call will have no effect on the encoded video unless the cut filter is enabled with editor_options_SetUseCut(). The default value is 0.0.
Deprecated:
Please use: With the constants: for access to the flix engine cut filter.
on2sc editor_options_SetCutStopTime ( FLIX2HANDLE  flix,
const double  end_time 
)

Set the cut stop time.

Sets the time (in seconds from the beginning of the source) to end the media cut. -1 indicates end of source.

Parameters:
[in] flix Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx()
[in] end_time End time (in seconds, relative to source)
Return values:
ON2_OK The end time value was successfully set in the engine.
ON2_INVALID_PARAMS The value is out of range.
Note:
This call will have no effect on the encoded video unless the cut filter is enabled with editor_options_SetUseCut(). The default value is -1.0 (end of source).
Deprecated:
Please use: With the constants: for access to the flix engine cut filter.
on2sc editor_options_SetHue ( FLIX2HANDLE  flix,
const int32_t  hue 
)

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:
[in] flix Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx()
[in] hue Hue Factor (-180 to 180)
Return values:
ON2_OK The hue value was successfully set in the engine.
ON2_INVALID_PARAMS The value is out of range.
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:
[in] flix Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx()
[in] saturation Saturation Factor (-255 to 255)
Return values:
ON2_OK The saturation value was successfully set in the engine.
ON2_INVALID_PARAMS The value is out of range.
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.
on2sc editor_options_SetUseBrightness ( FLIX2HANDLE  flix,
const on2bool  bUseBrightness 
)

Enable/disable the brightness filter.

Parameters:
[in] flix Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx()
[in] bUseBrightness New brightness enable status. on2true to enable, on2false to disable.
Return values:
ON2_OK The brightness enable status was successfully set in the engine.
Note:
By default, the brightness filter is disabled.
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.
on2sc editor_options_SetUseContrast ( FLIX2HANDLE  flix,
const on2bool  bUseContrast 
)

Enable/disable the contrast filter.

Parameters:
[in] flix Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx()
[in] bUseContrast New contrast enable status. on2true to enable, on2false to disable.
Return values:
ON2_OK The contrast enable status was successfully set in the engine.
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.
on2sc editor_options_SetUseCut ( FLIX2HANDLE  flix,
const on2bool  bUseCut 
)

Enable/disable the cut filter.

Parameters:
[in] flix Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx()
[in] bUseCut New cut enable status. on2true to enable, on2false to disable.
Return values:
ON2_OK The cut enable status was successfully set in the engine.
Note:
By default, the cut filter is disabled.
Deprecated:
Please use: With the constants: for access to the flix engine cut filter.
on2sc editor_options_SetUseHue ( FLIX2HANDLE  flix,
const on2bool  bUseHue 
)

Enable/disable the hue filter.

Parameters:
[in] flix Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx()
[in] bUseHue New hue enable status. on2true to enable, on2false to disable.
Return values:
ON2_OK The hue enable status was successfully set in the engine.
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.
on2sc editor_options_SetUseSaturation ( FLIX2HANDLE  flix,
const on2bool  bUseSaturation 
)

Enable/disable the saturation filter.

Parameters:
[in] flix Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx()
[in] bUseSaturation New saturation enable status. on2true to enable, on2false to disable.
Return values:
ON2_OK The saturation enable status was successfully set in the engine.
Note:
By default, the saturation filter is disabled.
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.

On2 Technologies, Inc Flix Engine Windows documentation, generated on Tue Nov 2 15:38:07 2010 by doxygen 1.6.1