Internal Modules
205
SPRUHI7A – December 2012 – Revised June 2016
Copyright © 2012–2016, Texas Instruments Incorporated
High-Definition Video Processing Subsystem (HDVPSS)
1.2.11.2.5.6 Coefficient Table Selection Guide
The scaler filter coefficient tables are pre-generated using a Matlab program for various scaling factor
ranges.
is a general selection guide table for coefficient data files.
(1)
HS Scaler has two sets of ½-decimator to perform downscaling ratios below ½ and ¼.
Table 1-71. Coefficient Data Files
Scaler
Scale Factor
Coeff table
HS Polyphase Filter
All upscaling
ppfcoef_scale_eq_1_32_phases_flip.dat
HS Polyphase Filter
All upscaling
ppfcoef_scale_eq_1_32_hases_flip.dat
½ or ¼ down scaling
ppfcoef_scale_eq_1_32_phases_flip.dat
> 15/16
ppfcoef_scale_eq_15div16_32_phases_flip.dat
> 14/16
ppfcoef_scale_eq_14div16_32_phases_flip.dat
> 13/16
ppfcoef_scale_eq_13div16_32_phases_flip.dat
> 12/16
ppfcoef_scale_eq_12div16_32_phases_flip.dat
> 11/16
ppfcoef_scale_eq_11div16_32_phases_flip.dat
> 10/16
ppfcoef_scale_eq_10div16_32_phases_flip.dat
> 9/16
ppfcoef_scale_eq_9div16_32_phases_flip.dat
> 8/16
ppfcoef_scale_eq_8div16_32_phases_flip.dat
(1)
VS Polyphase Filter
Upscaling
ppfcoef_scale_eq_1_32_phases_ver_5tap_flip.dat
> 15/16
ppfcoef_scale_eq_15div16_32_phases_ver_5tap_flip.dat
> 14/16
ppfcoef_scale_eq_14div16_32_phases_ver_5tap_flip.dat
> 13/16
ppfcoef_scale_eq_13div16_32_phases_ver_5tap_flip.dat
> 12/16
ppfcoef_scale_eq_12div16_32_phases_ver_5tap_flip.dat
> 11/16
ppfcoef_scale_eq_11div16_32_phases_ver_5tap_flip.dat
> 10/16
ppfcoef_scale_eq_10div16_32_phases_ver_5tap_flip.dat
> 9/16
ppfcoef_scale_eq_9div16_32_phases_ver_5tap_flip.dat
> 8/16
ppfcoef_scale_eq_8div16_32_phases_ver_5tap_flip.dat
else
For down-scaling <8/16, RAV filter is recommended. In this
case, coefficients for vertical scaling need not be loaded.
The above mentioned .dat files are available in
1.2.11.3 Code
1.2.11.3.1 Generate Coefficient Memory Image
The following Perl script is used to generate a coefficient memory image for a given set of scaling factors.
#!/usr/local/bin/perl
#$dir="coef/";
# directory which contains the coef files
#$cfg_file="sc_config1.cfg";
# configuration file name
#$spl_file="sc_config_supl.cfg";
# supplemental configuration file name $cfg_file=$ARGV[0];
#
configuration file name $spl_file=$ARGV[1];
# supplemental configuration file name
$dir=$ARGV[2];
# directory which contains the coef files
$coef_width=13;
# coef bit width
$coef_ntap=7;
# coef tap
$coef_nphase=32; # coef phase
$coef_norm=11;
# coef norm
#----------------------------------------------------------
# read config file to get srcH/tarH/interlace_i/interlace_o
#----------------------------------------------------------
open(INFILE, "<$cfg_file") or die "### ERROR: Cannot open $cfg_file";