Defines |
#define | FE2_FILTER_SCALE |
| Filter name for use with Flix2_AddFilter().
|
#define | FE2_SCALE_WIDTH |
| Filter parameter name for scaled width.
|
#define | FE2_SCALE_HEIGHT |
| Filter parameter name for scaled height.
|
Deprecated functions |
|
on2sc | video_options_GetImageHeight (const FLIX2HANDLE flix, int32_t *lpImageHeight) |
| Get the current scaled image height.
|
on2sc | video_options_SetImageHeight (FLIX2HANDLE flix, const int32_t lImageHeight) |
| Set the scaled image height.
|
on2sc | video_options_GetImageWidth (const FLIX2HANDLE flix, int32_t *lpImageWidth) |
| Get the current scaled image width.
|
on2sc | video_options_SetImageWidth (FLIX2HANDLE flix, const int32_t lImageWidth) |
| Set the scaled image width.
|
on2sc | video_options_GetUseSourceDimensions (const FLIX2HANDLE flix, on2bool *bpUseSourceDimensions) |
| Determine if the source's dimensions will be used instead of the scaled dimensions.
|
on2sc | video_options_SetUseSourceDimensions (FLIX2HANDLE flix, const on2bool bUseSourceDimensions) |
| Switch between source and scaled dimensions.
|
on2sc | video_options_GetDeinterlace (const FLIX2HANDLE flix, on2bool *lpDeinterlace) |
| Determine if the deinterlace filter is enabled.
|
on2sc | video_options_SetDeinterlace (FLIX2HANDLE flix, const on2bool lDeinterlace) |
| Enable/disable the deinterlace filter.
|
on2sc | video_options_GetVideoFramerate (const FLIX2HANDLE flix, int32_t *lpVideoFramerate) |
| Get the current video framerate.
|
on2sc | video_options_SetVideoFramerate (FLIX2HANDLE flix, const int32_t lVideoFramerate) |
| Set the video framerate.
|
on2sc | video_options_GetVideoFramerateAsDouble (const FLIX2HANDLE flix, double *p_fps) |
| Get the current video framerate.
|
on2sc | video_options_SetVideoFramerateAsDouble (FLIX2HANDLE flix, const double fps) |
| Set the video framerate.
|
on2sc | video_options_GetUseSourceFramerate (FLIX2HANDLE flix, on2bool *bpUseSourceFramerate) |
| Determine if the source's framerate will be used instead of the modified framerate.
|
on2sc | video_options_SetUseSourceFramerate (FLIX2HANDLE flix, const on2bool bUseSourceFramerate) |
| Switch between source and scaled framerate.
|
on2sc | video_options_GetDecimateValue (const FLIX2HANDLE flix, uint32_t *pValue) |
| Get the current decimation of the video framerate.
|
on2sc | video_options_SetDecimateValue (FLIX2HANDLE flix, const uint32_t value) |
| Set the decimation of the video framerate.
|
Detailed Description
The video scale (resize) filter implements a high quality bicubic scaler to change the dimensions of the video.
Filter Parameters:
Name | Type | Opt/Reqd | Range
=======================================================================================
FE2_SCALE_WIDTH | Numeric | Optional | [-19,)
FE2_SCALE_HEIGHT | Numeric | Optional | [-19,)
Example Usage:
The following values have special meaning and are applicable to both FE2_SCALE_WIDTH and FE2_SCALE_HEIGHT:
0
: display dimension
-1
: original dimension (default)
-2
: calculate dimension based on its complement and the display aspect ratio
-3
: calculate dimension based on its complement and the original aspect ratio
n-4*x
: where n
is one of the values above with the resulting dimension being an even multiple of 2^x
Display aspect ratio is calculated based on the desired resolution, as set by the container, e.g., the input is encoded at 4:3, but displays at 16:9. Needless to say, this is clip dependent and requires the correct values be set within the container and forwarded from the input source. If unavailable this value will be set to the encoded resolution.
- Attention:
- Only one dimension may be set to
{-2-4*[0,4],-3-4*[0,4]}
. The other MUST be {0-4*[0,4],-1-4*[0,4]}
or > 0
.
Define Documentation
Function Documentation
Get the current decimation of the video framerate.
- Parameters:
-
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[out] | pValue | Decimate value |
- Return values:
-
- Precondition:
- flix is not
NULL
pValue is not NULL
- 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_FRAMERATE and the FE2_FRAMERATE_DECIMATE parameter. This function will be removed in a future release.
Determine if the deinterlace filter is enabled.
- Parameters:
-
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[out] | lpDeinterlace | Variable to update with the current deinterlace enable status |
- Return values:
-
| ON2_OK | The deinterlace 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_ADAPTIVE_DEINTERLACE. This function will be removed in a future release.
Get the current scaled image height.
- Parameters:
-
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[out] | lpImageHeight | Image height (in pixels) |
- Return values:
-
| ON2_OK | The height value was successfully retrieved from the engine. |
- Note:
- This value should only be considered valid if it follows a call to video_options_SetImageHeight(). It can not be used to get information about the unscaled input video.
-
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 video scaling filter.
Get the current scaled image width.
- Parameters:
-
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[out] | lpImageWidth | Image width (in pixels) |
- Return values:
-
| ON2_OK | The width value was successfully retrieved from the engine. |
- Note:
- This value should only be considered valid if it follows a call to video_options_SetImageWidth(). It can not be used to get information about the unscaled input video.
-
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 video scaling filter.
Determine if the source's dimensions will be used instead of the scaled dimensions.
- Parameters:
-
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[out] | bpUseSourceDimensions | Variable to update with the current dimension status |
- Return values:
-
| ON2_OK | The dimension 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:
- The flix engine encodes video using the video source dimensions by default. If FE2_FILTER_SCALE has not been added to the filter chain, video will be encoded using source dimensions.
Determine if the source's framerate will be used instead of the modified framerate.
- Parameters:
-
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[out] | bpUseSourceFramerate | Variable to update with the current framerate selection |
- Return values:
-
| ON2_OK | The framerate 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_FRAMERATE. Not adding FE2_FILTER_FRAMERATE with Flix2_AddFilter() implies use of the source frame rate. This function will be removed in a future release.
Get the current video framerate.
- Parameters:
-
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[out] | lpVideoFramerate | Frames per second |
- Return values:
-
| ON2_OK | The framerate was successfully retrieved from the engine. |
- Deprecated:
- Please use video_options_GetVideoFramerateAsDouble() to allow for non integer framerates.
- Note:
- If a value other than ON2_OK is returned, the output variables should not be considered valid.
on2sc video_options_GetVideoFramerateAsDouble |
( |
const FLIX2HANDLE |
flix, |
|
|
double * |
p_fps | |
|
) |
| | |
Get the current video framerate.
- Parameters:
-
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[out] | p_fps | Frames per second |
- Return values:
-
| ON2_OK | The framerate 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_FRAMERATE and the FE2_FRAMERATE_FPS parameter. This function will be removed in a future release.
Set the decimation of the video framerate.
This value will be used to drop frames according to the video framerate. For example if the framerate is 30fps and the decimate value is 3 then the encoded framerate will be 10fps.
- Parameters:
-
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[in] | value | Decimate value |
- Return values:
-
| ON2_OK | The target framerate was successfully set in the engine. |
| ON2_INVALID_PARAMS | Should one or more of the preconditions fail. |
- Precondition:
- flix is not
NULL
- Note:
- Default value is 0.
A value of <= 1 means to not drop any frames.
- Deprecated:
- Use the Filter Interface along with FE2_FILTER_FRAMERATE and the FE2_FRAMERATE_DECIMATE parameter. This function will be removed in a future release.
Enable/disable the deinterlace filter.
- Parameters:
-
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[in] | lDeinterlace | New deinterlace enable status. on2true to enable, on2false to disable. |
- Return values:
-
| ON2_OK | The deinterlace enable status was successfully set in the engine. |
- Note:
- By default, the deinterlace filter is disabled.
Using this function will force the use of 1:2:1 deinterlace.
- Deprecated:
- Use the Filter Interface along with FE2_FILTER_ADAPTIVE_DEINTERLACE. This function will be removed in a future release.
Set the scaled image height.
Determines the scaled height of the output video.
- Parameters:
-
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[in] | lImageHeight | Image height (in pixels) |
- Return values:
-
- Note:
- The default is to use the source's height.
- Deprecated:
- Please use:
With the constants:
for access to the flix engine video scaling filter.
Set the scaled image width.
Determines the scaled width of the output video.
- Parameters:
-
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[in] | lImageWidth | Image width (in pixels) |
- Return values:
-
- Note:
- The default is to use the source's width.
- Deprecated:
- Please use:
With the constants:
for access to the flix engine video scaling filter.
Set the video framerate.
Sets the framerate to be used when encoding the video. Frames will be duplicated or dropped as necessary to achieve the desired framerate.
- Parameters:
-
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[in] | lVideoFramerate | Framerate target (in frames per second) |
- Return values:
-
- Deprecated:
- Please use video_options_SetVideoFramerateAsDouble() to allow for non integer framerates.
- Note:
- The default is to use the source framerate.
on2sc video_options_SetVideoFramerateAsDouble |
( |
FLIX2HANDLE |
flix, |
|
|
const double |
fps | |
|
) |
| | |
Set the video framerate.
Sets the framerate to be used when encoding the video. Frames will be duplicated or dropped as necessary to achieve the desired framerate.
- Parameters:
-
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[in] | fps | Framerate target (in frames per second) |
- Return values:
-
- Note:
- The default is to use the source framerate.
- Deprecated:
- Use the Filter Interface along with FE2_FILTER_FRAMERATE and the FE2_FRAMERATE_FPS parameter. This function will be removed in a future release.