Internal Modules
210
SPRUHI7A – December 2012 – Revised June 2016
Copyright © 2012–2016, Texas Instruments Incorporated
High-Definition Video Processing Subsystem (HDVPSS)
// Peter's method
delta = (1.0/scale-1.0)/2.0;
int_part
= floor(delta);
frac_part
= delta-int_part;
row_acc_init_rav = int(1024*(scale+(1.0-scale)/2.0)+0.5); // top field
// bottom field
tmp1 = (1.0-2.0*frac_part);
tmp2 = (1.0- (1.0+2.0*int_part)*scale);
row_acc_init_b_rav = int(1024*(scale + tmp1*tmp2/2.0) + 0.5);
row_acc_inc
= 0; // polyphasescaler
row_acc_offset
= 0; // polyphasescaler
row_acc_offset_b = 0; // polyphasescaler } else {
//upscale using polyphase scaler
// ------------
// --- PPF ----
// ------------
if(use_internal_defaults)
enable_edge_detection = 1;
sc_factor_rav
= 0;
delta_rav
= 0;
row_acc_init_rav
= 0;
row_acc_init_b_rav = 0;
// progressive or top field
row_acc_offset = int(65536.0*ver_pixel_0.5);
row_acc_inc
= int(65536.0*double(srcH)/double(tarH)+0.5);
//bottom field
if((interlace_in == 1) ampamp (interlace_out == 0))
{
if((-0.5+row_acc_offset) < 0.0)
round_factor = -0.5;
else
round_factor = 0.5;
row_acc_offset_b = int(65536.0*(-0.5)+round_row_acc_offset;
}
if((interlace_in == 0) && (interlace_out == 1))
{
row_acc_offset_b =
int(65536.0*double(srcH)/double(tarH)+0.5)+row_acc_offset;
}
if((interlace_in == 1) ampamp (interlace_out == 1))
{
row_acc_offset_b =
(int(65536.0/2.0*(double(srcH)/(double(tarH))-1.0)+0.5))+
row_acc_offset;
}
}
// ============================================================================================
// Horizontal Scaler configuration
// ============================================================================================
// ----------------------------------------------------------------
// horizontal scaler mode determination
// ----------------------------------------------------------------
auto_hs
= 1;
dcm_2x
= 0;
dcm_4x
= 0;
hp_bypass
= 0;
if (srcWi==srcW) linear = 1;
else
linear = 0;
// hor scaler parameters