SPRUJ28E November 2021 – September 2024 AM68 , AM68A , TDA4AL-Q1 , TDA4VE-Q1 , TDA4VL-Q1
Filter Coefficient Selection is determined using the following algorithm:
If
( cfg.filter_mode == 0 ) {
//
single phase mode
If( vertical_filter ) coef_sel = { cfg.sp_vs_coef_src,cfg.sp_vs_coef_sel}
else coef_sel = { cfg.sp_hs_coef_src, cfg.sp_hs_coef_sel}
if( coef_sel[4] == 0 ) filt_coef_sel = { 7’b0, coef_sel[0]} // use dedicated Gaussian filter set
else if ( vertical_filter) filt_coef_sel = { 4’b1001, coef_sel[3:0] } // use one of second 16 other custom coefs
else filt_coef_sel = { 4’b1000, coef_sel[3:0] } // use one of 16 other custom coefs
}
else
{
//
multiphase mode
If( vertical_filter ) coef_sel = cfg.vs_coef_sel[1:0]
else coef_sel = cfg.hs_coef_sel[1:0]
If ( cfg.phase_mode == 0 ) coef_sel = { 1’b1, coef_sel[1], filter_phase_sel[5:0] } // 64-phase mode
else coef_sel = { 1’b1, coef_sel[1:0], filter_phase_sel[5:1]} // 32-phase
mode
}
where filter_phase_sel comes from the Phase Calculation Logic.
The vertical resizer selects one set of coefficients at the start of each line, saves them locally in the vertical scaler to use the same coefficients for the entire pixels in the line.
The Horizontal resizer selects a new coefficient on each input pixel processing. To reduce timing dependency, the horizontal coefficient selection is made with next phase value from the horizontal scaler’s phase calculator one cycle ahead of actual filter calculation.