SPRUI30H November 2015 – May 2024 DRA745 , DRA746 , DRA750 , DRA756
All video formats are supported, including formats with alpha blending. Alpha blending is scaled with the same parameters as RGB color components. For the YUV formats, Y and Cb/Cr are processed independently. The filter is based on a finite impulse response (FIR) filter. The filtering can be used for different processing:
The user must ensure that the resizing frame displays in the LCD/screen boundaries.
Figure 11-59 shows an example of video upsampling.
The upsampling and downsampling filter is a polyphase filter with five taps and eight phases for the horizontal filter, and a programmable number of taps (three or five) and eight phases for vertical filter. The input buffer has five input memory lines. The following limitations must be considered:
For vertical upsampling and downsampling in a 3-tap configuration, the equations are:
For vertical upsampling and downsampling in a 5-tap configuration, the equations are:
For horizontal upsampling and downsampling in a 5-tap configuration, the equations are:
The pixel (n + 1) is the previous pixel with respect to pixel (n). The line (n + 1) is the previous line with respect to line (n).
The coefficients Ci() depend on the phase between input and output pixels.
The coefficients are different for Y and Cr, Cb filtering because the calculations are independent due to the chrominance resampling for YUV4:2:2 and YUV4:2:0.
First, the vertical filter is applied to the encoded input pixel data, and then the horizontal filter is applied on the resulting pixel values to generate the output pixel values. The vertical input of the filter consists of five lines of 2048 × 32 bits for both 3-tap and 5-tap configurations (see Table 11-72).
Vertical Taps | Maximum Input Width (Pixels) |
---|---|
3, 5 | 2048 × 32 bits |
At the beginning of frame scaling processing, the first line is duplicated to fill the first two lines in 3-tap configuration and the first three lines in 5-tap configuration.
At the end of frame scaling processing, the last line is duplicated if the scaling logic requires loading more lines and the last line has been reached.
The programmable coefficients of the polyphase filters are signed 8-bit values (except for the central coefficient, which is unsigned). The video scalers have an 8-bit input and a 10-bit output. The vertical scaling changes the 8-bit input into a 10-bit clipped output and the horizontal scaling takes the 10-bit input.
Figure 11-60 and Figure 11-61 show the scaler macro-architecture for the component A, R, G, B, and Y. Figure 11-62 and Figure 11-63 show the scaler macro-architecture for component Cr and Cb.
The scaling output can be clipped to an output range of [1023:0] or [960:64] by configuring the DISPC_VIDp_ATTRIBUTES[11] FULLRANGE bit.
The scaling and CSC clipping is set by the same bit, DISPC_VIDp_ATTRIBUTES[11] FULLRANGE.
Table 11-73 and Table 11-74 list the bit fields in the function to set for each coefficient.
Taps | Coefficient | 3 Taps | 5 Taps | Registers |
---|---|---|---|---|
Bit Field | Bit Field | |||
Vertical | Cv(–2) | FIRVC22 | DISPC_VIDp_FIR_COEF_V_i | |
Cv(–1) | FIRVC2 | FIRVC2 | DISPC_VIDp_FIR_COEF_HV_i | |
Cv(0) | FIRVC1 | FIRVC1 | DISPC_VIDp_FIR_COEF_HV_i | |
Cv(1) | FIRVC0 | FIRVC0 | DISPC_VIDp_FIR_COEF_HV_i | |
Cv(2) | FIRVC00 | DISPC_VIDp_FIR_COEF_V_i | ||
Horizontal | Ch(–2) | FIRHC4 | DISPC_VIDp_FIR_COEF_HV_i | |
Ch(–1) | FIRHC3 | DISPC_VIDp_FIR_COEF_H_i | ||
Ch(0) | N/A | FIRHC2 | DISPC_VIDp_FIR_COEF_H_i | |
Ch(1) | FIRHC1 | DISPC_VIDp_FIR_COEF_H_i | ||
Ch(2) | FIRHC0 | DISPC_VIDp_FIR_COEF_H_i |
Taps | Coefficient | 3 Taps | 5 Taps | Registers |
---|---|---|---|---|
Bit Field | Bit Field | |||
Vertical | Cvc(–2) | FIRVC22 | DISPC_VIDp_FIR_COEF_V2_i | |
Cvc(–1) | FIRVC2 | FIRVC2 | DISPC_VIDp_FIR_COEF_HV2_i | |
Cvc(0) | FIRVC1 | FIRVC1 | DISPC_VIDp_FIR_COEF_HV2_i | |
Cvc(1) | FIRVC0 | FIRVC0 | DISPC_VIDp_FIR_COEF_HV2_i | |
Cvc(2) | FIRVC00 | DISPC_VIDp_FIR_COEF_V2_i | ||
Horizontal | Chc(–2) | FIRHC4 | DISPC_VIDp_FIR_COEF_HV2_i | |
Chc(–1) | FIRHC3 | DISPC_VIDp_FIR_COEF_H2_i | ||
Chc(0) | N/A | FIRHC2 | DISPC_VIDp_FIR_COEF_H2_i | |
Chc(1) | FIRHC1 | DISPC_VIDp_FIR_COEF_H2_i | ||
Chc(2) | FIRHC0 | DISPC_VIDp_FIR_COEF_H2_i |
The VID scaler unit vertical or/and horizontal sampling is defined by setting/resetting the DISPC_VIDp_ATTRIBUTES[6:5] RESIZEENABLE bit field.
A set of configurations must be valid before enabling the video upsampling and downsampling block.
The following fields define the configuration of the video upsampling downsampling block for VIDp:
Table 11-75 lists the DISPC vertical and horizonatal accumulator values and phases.
Accumulator Value | Phases f |
---|---|
0 | 0 |
128 or –896 | 1 |
256 or –768 | 2 |
384 or –640 | 3 |
512 or –512 | 4 |
640 or –384 | 5 |
768 or –256 | 6 |
896 or –128 | 7 |
Four YUV vertical upsampling and downsampling coefficients are set in DISPC_VIDp_FIR_COEF_HV2_i and DISPC_VIDp_FIR_COEF_V2_i registers. Table 11-73 and Table 11-74 summarize all coefficients and their respective registers.
Four YUV horizontal upsampling and downsampling coefficients are set in the DISPC_VIDp_FIR_COEF_HV2_i and DISPC_VIDp_FIR_COEF_H2_i registers. Table 11-73 and Table 11-74 summarize all coefficients and their respective registers.