SPRUJ28F November 2021 – August 2025 AM68 , AM68A , TDA4AL-Q1 , TDA4VE-Q1 , TDA4VL-Q1
Figure 6-60 shows the micro-architecture of the polyphase filter data path. The 5-tap filter structure can be programmed to perform a 5-tap Gaussian filter (for Octave generation) or a 4-tap bi-cubic downscaling filter (for scale generation). Or, it can be configured to perform a custom convolution filter without resizing. Filter coefficients for any unused taps should be set to 0. For example, in case of a 4-tap filtering, C2(Fi) filter coefficient should be set to 0. For 3-tap filtering, C-2(Fi) and C2(Fi) filter coefficients should be set to 0.
Figure 6-154 Polyphase Filter Micro-ArchitectureKernel Size Configuration
There is no separate configuration required to set the filter kernel size (number of taps) within the polyphase filter. The filter always works as a 5-tap filter but requires unused taps to be masked using the zero coefficients.
Coefficient Precision Selection
The precision of the coefficients is user-configurable using VPAC_MSC_CORE_CFG_j[21-18] COEF_SHIFT which determines the number of fractional bits of the coefficient.
Unsigned/Signed Data Type support
Typically for image resizing, the input and output data are in unsigned (positive) integer numbers in the range of [0..4095]. But, in some non-image convolution filtering (for example, Sobel filter), the input and output data may be in signed integer data format. The MSC supports a user-selectable data type mode bit (VPAC_MSC_CORE_CFG_j[22] SIGNED_DATA) per resizer to specify whether the input/output data is in signed or unsigned data format. The selection determines the input range and output clipping limits as shown below:
VPAC_MSC_CORE_CFG_0[22] SIGNED_DATA = 0 ->[0..4095]
VPAC_MSC_CORE_CFG_0[22] SIGNED_DATA = 1 -> [-2048..2047]
Note that all filters in the same processing thread should have the SIGNED_DATA bit set to a same value.
Rounding Logic
The rounding is done by “adding 0.5 and dropping fractional bits”. This achieves the following:
For data >= 0: “round to nearest, ties away from zero”
For data < 0: “round to nearest, ties toward zero”
This rounding is applied to the 12-bit MSC filter output data. If the result of a filter output is to be stored in SL2 as 8-bit data, an additional rounding in LSE output channel can be optionally enabled to apply rounding during 12bit to 8bit mapping (instead of simple truncation). See DST_BUF_CFG. enable_output_pixel_rounding in LSE_CFG.
Output Saturation Logic
For some non-image unsigned data filtering, the result of the final adder could be negative numbers. To avoid clipping all negative numbers to 0, the MSC filter data processing supports a mode (VPAC_MSC_CORE_CFG_j[22] SAT_MODE = 1) to offset the result by 2048 and then clip the final result to [0..4095] in the output saturation logic to preserve the full data range.
Edge Pixel Replication
Pixel replication in vertical direction (edge line replication) is done in the MSC_LSE.
Pixel replication in horizontal direction (edge pixel replication) is performed in the horizontal filter. For chroma data plane, Cb/Cr pixel replication is done independently with edge Cb/Cr data respectively.