18.5. Scaler IP Software API
Register definition header file: intel_vvp_scaler_regs.h
Include file: intel_vvp_scaler.h
Name | Description |
---|---|
intel_vvp_scaler_init | Initialize the Scaler instance |
Intel_vvp_core_* | .Accessors defined in Video and Vision Processing IPs Software Programming Model . Writable when Lite is on. Readable when Lite is off and Debug features is on. |
intel_vvp_scaler_get_lite_mode | Returns if Lite mode is on |
intel_vvp_scaler_get_debug_enabled | Returns if Debug features is on |
intel_vvp_scaler_get_pixels_in_parallel
|
Returns the number of pixels transmitted in parallel (per valid beat) |
intel_vvp_scaler_get_max_input_width
|
Returns the maximum input width supported |
intel_vvp_scaler_get_max_output_width
|
Returns the maximum output width supported |
intel_vvp_scaler_get_scaling_algorithm | Returns the scaling algorithm |
intel_vvp_scaler_is_coeffs_loading_enabled | Returns if the scaling coefficients can be loaded/updated at run-time |
intel_vvp_scaler_are_coeffs_preinitialized | Returns if the scaling coefficients are automatically initialized with default values out of reset |
intel_vvp_scaler_is_vertical_scaling_enabled | Returns if the IP can be configured to do vertical scaling |
intel_vvp_scaler_get_num_vertical_taps | Returns the number of vertical taps |
intel_vvp_scaler_get_num_vertical_phases | Returns the number of vertical phases |
intel_vvp_scaler_get_num_vertical_banks | Returns the number of vertical banks |
intel_vvp_scaler_are_vertical_coeffs_signed | Returns if the vertical scaling coefficients have a sign bit and can be negative |
intel_vvp_scaler_get_vertical_coeffs_int_bits
|
Returns the number of integer bits (excluding sign bit) available to quantize the vertical scaling coefficients |
intel_vvp_scaler_get_vertical_coeffs_frac_bits
|
Returns the number of fractional bits available to quantize the vertical scaling coefficients |
intel_vvp_scaler_is_horizontal_scaling_enabled | Returns if the IP can be configured to do horizontal scaling |
intel_vvp_scaler_get_num_horizontal_taps | Returns the number of horizontal taps |
intel_vvp_scaler_get_num_horizontal_phases | Returns the number of horizontal phases |
intel_vvp_scaler_get_num_horizontal_banks | Returns the number of horizontal banks |
intel_vvp_scaler_are_ horizontal_coeffs_signed | Returns if the horizontal scaling coefficients have a sign bit and can be negative |
intel_vvp_scaler_get_ horizontal_coeffs_int_bits
|
Returns the number of integer bits (excluding sign bit) available to quantize the horizontal scaling coefficients |
intel_vvp_scaler_get_ horizontal_coeffs_frac_bits
|
Returns the number of fractional bits available to quantize the horizontal scaling coefficients |
intel_vvp_scaler_get_rounding_method | Returns the method used to convert floating-point values back to integer values at the output of the IP |
intel_vvp_scaler_is_running | Returns if the IP is currently processing video data |
intel_vvp_scaler_get_commit_status | Returns if there are uncommitted writes |
intel_vvp_scaler_get_status | Reads the status register |
intel_vvp_scaler_set_output_width | Selects the output width |
intel_vvp_scaler_set_output_height | Selects the output height |
intel_vvp_scaler_set_v_bank | Selects the vertical coefficients bank for the next commit |
intel_vvp_scaler_set_h_bank | Selects the horizontal coefficients bank for the next commit |
intel_vvp_scaler_get_output_width | Returns the last selected output width |
intel_vvp_scaler_get_output_height | Returns the last selected output height |
intel_vvp_scaler_get_v_bank | Returns the last selected vertical coefficients bank |
intel_vvp_scaler_get_h_bank | Returns the last selected horizontal coefficients bank |
intel_vvp_scaler_set_quantized_coeffs | Program the IP with a new set of quantized coefficients for a specified phase |
intel_vvp_scaler_set_coeffs | Program the IP with a new set of floating-point coefficients for a specified phase |
intel_vvp_scaler_commit_writes | Commit all outstanding writes |
enum eIntelVvpScalerAlgorithms
- Members
-
kIntelVvpScalerNearestNeighborScaling (0) – Nearest neighbor scaling
kIntelVvpScalerBilinearScaling (1) – Bilinear scaling
kIntelVvpScalerPolyphaseScaling (2) – Polyphase scaling
kIntelVvpScalerInvalidScalingAlgo (-1) – Invalid scaling algorithm (used to indicate errors)
- Description
-
Enumeration for the configurable scaling algorithms
intel_vvp_scaler_init
- Prototype
-
int intel_vvp_scaler_init(intel_vvp_scaler_instance *instance, intel_vvp_core_base base);
- Description
-
Initializes a Scaler instance. The initialization stops early if the vendor ID or product ID read at the base address are not a match or if the register map version is not supported. Otherwise, the function proceeds to read and store the IP compile-time parameterization. The instance will not be fully initialized and should not be used further by the application if returning a non-zero error code.
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
base – base address of the register map
- Returns
-
kIntelVvpCoreOk (0) in case of success, a negative error code in case of error
kIntelVvpCoreVidErr if the vendor id of the core is not the IntelFPGA vendor ID (0x6AF7).
kIntelVvpCorePidErr if the product_id does not match with the Scaler product ID
kIntelVvpCoreInstanceErr if the instance is a null pointer
kIntelVvpScalerMapVersionErr if the register map is not supported
intel_vvp_scaler_get_lite_mode
- Prototype
-
bool intel_vvp_scaler_get_lite_mode(intel_vvp_scaler_instance *instance);
- Description
-
Returns the value of the LITE_MODE register. The instance must be a valid intel_vvp_scaler_instance fully initialized
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
- Returns
-
true if the IP is parameterized in lite mode
intel_vvp_scaler_get_debug_enabled
- Prototype
-
bool intel_vvp_scaler_get_debug_enabled(intel_vvp_scaler_instance *instance);
- Description
-
Returns the value of the DEBUG_ENABLED register. The instance must be a valid intel_vvp_scaler_instance fully initialized.
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
- Returns
-
true if the IP is parameterized with debug features enabled
intel_vvp_scaler_get_pixels_in_parallel
- Prototype
-
uint8_t intel_vvp_scaler_get_pixels_in_parallel(intel_vvp_scaler_instance *instance);
- Description
-
Returns the value of the PIXELS_IN_PARALLEL register. The instance must be a valid intel_vvp_scaler_instance fully initialized.
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
- Returns
-
the pixel in parallel parameter (pixels transmitted per beat/clock cycle) used to generate the IP.
intel_vvp_scaler_get_max_input_width
- Prototype
-
uint32_t intel_vvp_scaler_get_max_input_width(intel_vvp_scaler_instance *instance);
- Description
-
Returns the value of the MAX_INPUT_WIDTH register. The instance must be a valid intel_vvp_scaler_instance fully initialized.
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
- Returns
-
the maximum input width supported by the IP
intel_vvp_scaler_get_max_output_width
- Prototype
-
uint32_t intel_vvp_scaler_get_max_output_width(intel_vvp_scaler_instance *instance);
- Description
-
Returns the value of the MAX_OUTPUT_WIDTH register. The instance must be a valid intel_vvp_scaler_instance fully initialized.
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
- Returns
-
the maximum output width supported by the IP
intel_vvp_scaler_get_scaling_algorithm
- Prototype
-
eIntelVvpScalerAlgorithms intel_vvp_scaler_get_scaling_algorithm(intel_vvp_scaler_instance* instance);
- Description
-
Returns the value of the SCALER_ALGORITHM register. The instance must be a valid intel_vvp_scaler_instance fully initialized.
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
- Returns
-
The scaling algorithm the IP is configured with
intel_vvp_scaler_is_coeffs_loading_enabled
- Prototype
-
bool intel_vvp_scaler_is_coeffs_loading_enabled(intel_vvp_scaler_instance* instance);
- Description
-
Returns the value of the COEFFS_RUNTIME_LOAD register. The instance must be a valid intel_vvp_scaler_instance fully initialized and configured for polyphase scaling
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
- Returns
-
If the IP is configured to support run-time reloading of coefficients
intel_vvp_scaler_are_coeffs_preinitialized
- Prototype
-
bool intel_vvp_scaler_are_coeffs_preinitialized(intel_vvp_scaler_instance* instance);
- Description
-
Returns the value of the COEFFS_MEM_INIT register. The instance must be a valid intel_vvp_scaler_instance fully initialized and configured for polyphase scaling
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
- Returns
-
If the IP is configured to start with initialized coefficients
intel_vvp_scaler_is_vertical_scaling_enabled
- Prototype
-
bool intel_vvp_scaler_is_vertical_scaling_enabled (intel_vvp_scaler_instance* instance);
- Description
-
Returns the value of the V_SCALING_ENABLED register. The instance must be a valid intel_vvp_scaler_instance fully initialized
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
- Returns
-
If the IP is configured to perform vertical scaling
intel_vvp_scaler_get_num_vertical_taps
- Prototype
-
uint8_t intel_vvp_scaler_get_num_vertical_taps(intel_vvp_scaler_instance* instance);
- Description
-
Returns the value of the V_NUM_TAPS register. The instance must be a valid intel_vvp_scaler_instance fully initialized and configured for vertical scaling
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
- Returns
-
The number of taps used for vertical scaling
intel_vvp_scaler_get_num_vertical_phases
- Prototype
-
uint8_t intel_vvp_scaler_get_num_vertical_phases(intel_vvp_scaler_instance* instance);
- Description
-
Returns the value of the V_NUM_PHASES register. The instance must be a valid intel_vvp_scaler_instance fully initialized and configured for vertical scaling
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
- Returns
-
The number of taps used for vertical scaling
intel_vvp_scaler_get_num_vertical_banks
- Prototype
-
uint8_t intel_vvp_scaler_get_num_vertical_banks(intel_vvp_scaler_instance* instance);
- Description
-
Returns the value of the V_NUM_BANKS register. The instance must be a valid intel_vvp_scaler_instance fully initialized and configured for vertical polyphase scaling
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
- Returns
-
The number of coefficient banks available for vertical scaling
intel_vvp_scaler_are_vertical_coeffs_signed
- Prototype
-
bool intel_vvp_scaler_are_coeffs_signed(intel_vvp_scaler_instance* instance);
- Description
-
Returns the value of the V_COEFFS_SIGNED register. The instance must be a valid intel_vvp_scaler_instance fully initialized and configured for vertical polyphase scaling
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
- Returns
-
If signed coefficients have been enabled for vertical scaling at IP generation time
intel_vvp_scaler_get_vertical_coeffs_int_bits
- Prototype
-
uint8_t intel_vvp_scaler_get_coeffs_int_bits (intel_vvp_scaler_instance *instance);
- Description
-
Returns the value of the V_COEFFS_INT_BITS register. The instance must be a valid intel_vvp_scaler_instance fully initialized and configured for vertical polyphase scaling
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
- Returns
-
the number of integer bits, excluding sign bit, set at IP generation time to parameterize the quantization of the vertical scaling coefficients
intel_vvp_scaler_get_vertical_coeffs_frac_bits
- Prototype
-
uint8_t intel_vvp_scaler_get_vertical_coeffs_frac_bits (intel_vvp_scaler_instance *instance);
- Description
-
Returns the value of the V_COEFFS_FRAC_BITS register. The instance must be a valid intel_vvp_scaler_instance fully initialized and configured for vertical polyphase scaling
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
- Returns
-
the number of fractional bits set at IP generation time to parameterize the quantization of the vertical scaling coefficients
intel_vvp_scaler_is_horizontal_scaling_enabled
- Prototype
-
bool intel_vvp_scaler_is_horizontal_scaling_enabled (intel_vvp_scaler_instance* instance);
- Description
-
Returns the value of the H_SCALING_ENABLED register. The instance must be a valid intel_vvp_scaler_instance fully initialized
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
- Returns
-
If the IP is configured to perform horizontal scaling
intel_vvp_scaler_get_num_horizontal_taps
- Prototype
-
uint8_t intel_vvp_scaler_get_num_horizontal_taps(intel_vvp_scaler_instance* instance);
- Description
-
Returns the value of the H_NUM_TAPS register. The instance must be a valid intel_vvp_scaler_instance fully initialized and configured for horizontal scaling
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
- Returns
-
The number of taps used for horizontal scaling
intel_vvp_scaler_get_num_horizontal_phases
- Prototype
-
uint8_t intel_vvp_scaler_get_num_horizontal_phases(intel_vvp_scaler_instance* instance);
- Description
-
Returns the value of the H_NUM_PHASES register. The instance must be a valid intel_vvp_scaler_instance fully initialized and configured for horizontal scaling
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
- Returns
-
The number of taps used for horizontal scaling
intel_vvp_scaler_get_num_horizontal_banks
- Prototype
-
uint8_t intel_vvp_scaler_get_num_horizontal_banks(intel_vvp_scaler_instance* instance);
- Description
-
Returns the value of the H_NUM_BANKS register. The instance must be a valid intel_vvp_scaler_instance fully initialized and configured for horizontal polyphase scaling
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
- Returns
-
The number of coefficient banks available for horizontal scaling
intel_vvp_scaler_are_horizontal_coeffs_signed
- Prototype
-
bool intel_vvp_scaler_are_coeffs_signed(intel_vvp_scaler_instance* instance);
- Description
-
Returns the value of the H_COEFFS_SIGNED register. The instance must be a valid intel_vvp_scaler_instance fully initialized and configured for horizontal polyphase scaling
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
- Returns
-
If signed coefficients have been enabled for horizontal scaling at IP generation time
intel_vvp_scaler_get_horizontal_coeffs_int_bits
- Prototype
-
uint8_t intel_vvp_scaler_get_coeffs_int_bits (intel_vvp_scaler_instance *instance);
- Description
-
Returns the value of the H_COEFFS_INT_BITS register. The instance must be a valid intel_vvp_scaler_instance fully initialized and configured for horizontal polyphase scaling
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
- Returns
-
the number of integer bits, excluding sign bit, set at IP generation time to parameterize the quantization of the horizontal scaling coefficients
intel_vvp_scaler_get_horizontal_coeffs_frac_bits
- Prototype
-
uint8_t intel_vvp_scaler_get_horizontal_coeffs_frac_bits (intel_vvp_scaler_instance *instance);
- Description
-
Returns the value of the H_COEFFS_FRAC_BITS register. The instance must be a valid intel_vvp_scaler_instance fully initialized and configured for horizontal polyphase scaling
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
- Returns
-
the number of fractional bits set at IP generation time to parameterize the quantization of the horizontal scaling coefficients
intel_vvp_scaler_is_running
- Prototype
-
bool intel_vvp_scaler_is_running(intel_vvp_scaler_instance* instance);
- Description
-
Reads and returns the running bit of the STATUS register. The instance must be a valid intel_vvp_scaler_instance fully initialized.
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
- Returns
-
True is the IP is currently receiving/storing an input field, false when between two input fields
intel_vvp_scaler_get_commit_status
- Prototype
-
bool intel_vvp_scaler_get_commit_status(intel_vvp_clipper_instance* instance);
- Description
-
Reads and returns the commit pending bit of the STATUS register. The instance must be a valid intel_vvp_scaler_instance fully initialized and configured in full mode.
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
- Returns
-
True is the IP is configured in full mode and if the agent interface contains uncommitted writes.
intel_vvp_scaler_get_status
- Prototype
-
uint32_t intel_vvp_scaler_get_status(intel_vvp_scaler_instance* instance);
- Description
-
Reads the STATUS register. The instance must be a valid intel_vvp_scaler_instance fully initialized.
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
- Returns
-
The content of the STATUS register
intel_vvp_scaler_set_output_width
- Prototype
-
int intel_vvp_scaler_set_output_width(intel_vvp_scaler_instance *instance, uint32_t output_width)
- Description
-
Selects the new output width. The instance must be a valid intel_vvp_scaler_instance fully initialized and configured for horizontal scaling. Also, the output width must be within the allowed range
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
output_width – new output width in the range [1..max_h_width-1] where max_h_width is the maximum configured output_width returned by intel_vvp_scaler_get_max_output_width
- Returns
-
kIntelVvpCoreOk for success, negative error code in case of failures
kIntelVvpCoreInstanceErr if the instance is invalid or not configured for horizontal scaling
kIntelVvpScalerParameterErr if the new output width is out-of-range
intel_vvp_scaler_set_output_height
- Prototype
-
int intel_vvp_scaler_set_output_height(intel_vvp_scaler_instance *instance, uint32_t output_height)
- Description
-
Selects the new output height. The instance must be a valid intel_vvp_scaler_instance fully initialized and configured for vertical scaling.
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
output_height – new output height
- Returns
-
kIntelVvpCoreOk for success, negative error code in case of failures
kIntelVvpCoreInstanceErr if the instance is invalid or not configured for vertical scaling
intel_vvp_scaler_set_v_bank
- Prototype
-
int intel_vvp_scaler_set_v_bank(intel_vvp_scaler_instance *instance, uint8_t bank);
- Description
-
Selects the bank of vertical scaler coefficient to use. The instance must be a valid intel_vvp_scaler_instance, fully initialized, and configured for vertical polyphase scaling. Also, the bank of vertical coefficient should be valid
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
bank – the identifier for the horizontal bank in the range [0..num_v_banks-1] where v_num_banks is the value returned by intel_vvp_scaler_get_num_vertical_banks
- Returns
-
kIntelVvpCoreOk for success, negative error code in case of failures
kIntelVvpCoreInstanceErr if the instance is invalid or not configured for vertical polyphase scaling
kIntelVvpScalerParameterErr if the vertical bank is invalid
intel_vvp_scaler_set_h_bank
- Prototype
-
int intel_vvp_scaler_set_h_bank(intel_vvp_scaler_instance *instance, uint8_t bank);
- Description
-
Selects the bank of horizontal scaler coefficient to use. The instance must be a valid intel_vvp_scaler_instance, fully initialized, and configured for horizontal polyphase scaling. Also, the bank of horizontal coefficient should be valid
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
bank – the identifier for the horizontal bank in the range [0..num_h_banks-1] where h_num_banks is the value returned by intel_vvp_scaler_get_num_horizontal_banks
- Returns
-
kIntelVvpCoreOk for success, negative error code in case of failures
kIntelVvpCoreInstanceErr if the instance is invalid or not configured for horizontal polyphase scaling
kIntelVvpScalerParameterErr if the horizontal bank is invalid
intel_vvp_scaler_get_output_width
- Prototype
-
uint32_t intel_vvp_scaler_get_output_width(intel_vvp_scaler_instance *instance)
- Description
-
Returns the selected output width. The instance must be a valid intel_vvp_scaler_instance fully initialized and configured for horizontal scaling. Also, debug should be enabled to read a sensible value back
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
- Returns
-
the selected output width
intel_vvp_scaler_get_output_height
- Prototype
-
uint32_t intel_vvp_scaler_get_output_height(intel_vvp_scaler_instance *instance)
- Description
-
Returns the selected output height. The instance must be a valid intel_vvp_scaler_instance fully initialized and configured for vertical scaling. Also, debug should be enabled to read a sensible value back
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
- Returns
-
the selected output height
intel_vvp_scaler_get_v_bank
- Prototype
-
uint8_t intel_vvp_scaler_get_v_bank(intel_vvp_scaler_instance *instance);
- Description
-
Returns the selected bank of vertical scaling coefficient. The instance must be a valid intel_vvp_scaler_instance, fully initialized, and configured for vertical polyphase scaling. Also, debug must be enabled to read a sensible value back.
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
- Returns
-
the selected vertical bank
intel_vvp_scaler_get_h_bank
- Prototype
-
uint8_t intel_vvp_scaler_get_h_bank(intel_vvp_scaler_instance *instance);
- Description
-
Returns the selected bank of horizontal scaling coefficient. The instance must be a valid intel_vvp_scaler_instance, fully initialized, and configured for horizontal polyphase scaling. Also, debug must be enabled to read a sensible value back.
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
- Returns
-
the selected horizontal bank
intel_vvp_scaler_set_quantized_coeffs
- Prototype
-
int intel_vvp_scaler_set_quantized_coeffs(intel_vvp_scaler_instance* instance, bool h_coeffs, const int32_t* quantized_coeffs, uint8_t num_coeffs, uint8_t bank, uint8_t phase);
- Description
-
Programs the IP with a new set of num_coeffs coefficients for the specified horizontal or vertical phase in the specified bank of coefficients. An error is returned if the IP is not properly configured to use these coefficients. The num_coeffs parameter indicates the guaranteed minimum size of the quantized_coeffs array and must match with the number of horizontal or vertical taps as appropriate. Also, the call checks for correctness of the quantized values and will return an error if invalid bits are set. Sign extension to the full 32 bit range is accepted. Quantization errors do not prevent the coefficients from being updated
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
h_coeffs – true if committing a set of horizontal coefficients, false for a set of vertical coefficients
quantized_coeffs – pointer to the structure containing the quantized coefficients
num_coeffs – the number of horizontal taps if h_coeffs is true, otherwise the number of vertical taps. The caller guarantees that the quantized_coeffs array is larger than the specified number of values
bank – the bank of coefficients used to commit the new set
phase – the phase for the set of new coefficients
- Returns
-
kIntelVvpCoreOk in case of success, negative error code otherwise
kIntelVvpCoreInstanceErr if the instance is invalid, or not configured for horizontal/vertical polyphase scaling and run-time loading of coefficients
kIntelVvpScalerParameterErr if the phase, bank or number of coefficients are invalid for the IP configuration
kIntelVvpCoreNullPtrErr if quantized_coeffs is a NULL pointer
kIntelVvpScalerQuantizationErr if the quantized coefficients are out-of-range (this does not prevent the coefficients update)
intel_vvp_scaler_set_ coeffs
- Prototype
-
int intel_vvp_scaler_set_coeffs(intel_vvp_scaler_instance* instance, bool h_coeffs, const float* quantized_coeffs, uint8_t num_coeffs, uint8_t bank, uint8_t phase);
- Description
-
Programs the IP with a new set of num_coeffs coefficients for the specified horizontal or vertical phase in the specified bank of coefficients. Coefficients are quantized using the fixed-point configuration reported by the IP. An error is returned if the IP is not properly configured to use these coefficients. The num_coeffs parameter indicates the guaranteed minimum size of the coeffs array and must match with the number of horizontal or vertical taps as appropriate. An error is returned if the quantization could not be achieved successfully.
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
h_coeffs – true if committing a set of horizontal coefficients, false for a set of vertical coefficients
coeffs – pointer to the structure containing the set of floating-point coefficients
num_coeffs – the number of horizontal taps if h_coeffs is true, otherwise the number of vertical taps. The caller guarantees that the quantized_coeffs array is larger than the specified number of values
bank – the bank of coefficients used to commit the new set
phase – the phase for the set of new coefficients
- Returns
-
kIntelVvpCoreOk in case of success, negative error code otherwise
kIntelVvpCoreInstanceErr if the instance is invalid, or not configured for horizontal/vertical polyphase scaling and run-time loading of coefficients
kIntelVvpScalerParameterErr if the phase, bank or number of coefficients are invalid for the IP configuration
kIntelVvpCoreNullPtrErr if quantized_coeffs is a NULL pointer
kIntelVvpScalerQuantizationErr if the quantized coefficients are out-of-range (this does not prevent the coefficients update)
intel_vvp_scaler_commit_writes
- Prototype
-
int intel_vvp_scaler_commit_writes(intel_vvp_scaler_instance* instance)
- Description
-
Commits all pending writes before processing the next field. The instance must be valid and parameterized in full mode.
- Arguments
-
instance – pointer to the intel_vvp_scaler_instance software driver instance structure
- Returns
-
kIntelVvpCoreOk (0) for success, negative error code otherwise