Internal Modules
206
SPRUHI7A – December 2012 – Revised June 2016
Copyright © 2012–2016, Texas Instruments Incorporated
High-Definition Video Processing Subsystem (HDVPSS)
while(<INFILE>){
if (m/([-0-9]+) +\/\/ +srcW/) {
$srcW = $1;
} elsif (m/([-0-9]+) +\/\/ +srcH/) {
$srcH = $1;
} elsif (m/([-0-9]+) +\/\/ +tarW/) {
$tarW = $1;
} elsif (m/([-0-9]+) +\/\/ +tarH/) {
$tarH = $1;
} elsif (m/([-0-9]+) +\/\/ +interlace_in/) {
$interlace_i = $1;
} elsif (m/([-0-9]+) +\/\/ +interlace_out/) {
$interlace_o = $1;
}
}
close(INFILE);
#----------------------------------------------------------
# read supplemental config file to get srcWi/tarWi from
#----------------------------------------------------------
open(INFILE,"<$spl_file") or die "### ERROR: Cannot open $spl_file";
while(<INFILE>){
if (m/([-0-9]+) +\/\/ +srcWi/) {
$srcWi = $1;
} elsif (m/([-0-9]+) +\/\/ +tarWi/) {
$tarWi = $1;
} elsif (m/([-0-9]+) +\/\/ +profile/) {
$profile = $1; # 0:HIGH,1:MEDIUM,2:LOW
}
}
close(INFILE);
#----------------------------------------------------------
# determine coef file based on the width/height
#----------------------------------------------------------
# VS
#$vsc_file0 = "mod_ppfcoef_scale_eq_1_32_phases_flip.dat";
$vsc_file0 = "ppfcoef_scale_eq_1_32_phases_flip_PPF3_peak5_gain_eq_1_25.dat";
# VS VER
$mod_tarH = ($interlace_i == 0 && $interlace_o == 1) ? $tarH<<1 : $tarH; if ($profile==2) {
# LOW profile
if ($mod_tarH >= $srcH) {
$vsc_ver_file0 = "ppfcoef_scale_eq_1_32_phases_ver_3tap_flip.dat";
} else {
if ($mod_tarH >=($srcH>>1)) {
$n = int(16.0*$mod_tarH/$srcH);
$vsc_ver_file0 = sprintf("ppfcoef_scale_eq_%ddiv16_32_phases_ver_3tap_flip.dat",$n);
} else {
$n = 0;
$vsc_ver_file0 = "ppfcoef_scale_eq_1_32_phases_ver_3tap_flip.dat";
}
}
} else {
if ($mod_tarH >= $srcH) {
$vsc_ver_file0 = "ppfcoef_scale_eq_1_32_phases_ver_5tap_flip.dat";
} else {
$n = int(16.0*$mod_tarH/$srcH);
$vsc_ver_file0 = sprintf("ppfcoef_scale_eq_%ddiv16_32_phases_ver_5tap_flip.dat",$n);
}
}
# HS
if ($tarWi >= $srcWi) {
$hsc_file0 = "ppfcoef_scale_eq_1_32_phases_flip.dat";
} elsif ( ($tarWi == ($srcWi>>1)) || ($tarWi == ($srcWi>>2)) ) {
$hsc_file0 = "ppfcoef_scale_eq_1_32_phases_flip.dat";
} else {