![Texas Instruments DM38x DaVinci Скачать руководство пользователя страница 208](http://html1.mh-extra.com/html/texas-instruments/dm38x-davinci/dm38x-davinci_user-manual_1097067208.webp)
Internal Modules
208
SPRUHI7A – December 2012 – Revised June 2016
Copyright © 2012–2016, Texas Instruments Incorporated
High-Definition Video Processing Subsystem (HDVPSS)
1.2.11.3.2 Scaler Configuration Calculation
The following C-code shows how configuration parameters are calculated:
// =======================================
// Required Input Parameter
// =======================================
//
srcW, srcH, tarW, tarH, srcWi, tarWi
//
input/output scan modes
pixel_scale_factor=4;
// 10 bit pixel
hor_pixel_offset =0.0
// ============================================================================================
// Peaking Filter Configuration
// ============================================================================================
// ----------------------------------------------------------------
// HPF Coef
// ----------------------------------------------------------------
y_peak_enable
=
0;
peak_select=0; // 0=peak at fs/4
1=NTSC
2=PAL
switch(peak_select) {
case 0: {// peak at fs/4 and gain = 1
HPF_coef0
=
0;
HPF_coef1
=
0;
HPF_coef2
=
0;
HPF_coef3
=
-4;
HPF_coef4
=
0;
HPF_coef5
=
8; // mid tap
HPF_norm_shift
=
4;
break;
}
case 1: {// NTSC: peak at 0.133*fs and gain=1
HPF_coef0
=
-2;
HPF_coef1
=
-8;
HPF_coef2
=
-8;
HPF_coef3
=
-2;
HPF_coef4
=
12;
HPF_coef5
=
16; // mid tap
HPF_norm_shift
=
6;
break;
}
case 2: {// PAL: peak at 0.163*fs and gain=1
HPF_coef0
=
2;
HPF_coef1
=
-4;
HPF_coef2
= -11;
HPF_coef3
=
-7;
HPF_coef4
=
9;
HPF_coef5
=
22; // mid tap
HPF_norm_shift
=
6;
break;
}
}
// ----------------------------------------------------------------
// NonLinear Coring Function typical values
// ----------------------------------------------------------------
NL_coring_thr
=
16;
NL_limit
= 200;
NL_lo_slope
=
16;
NL_hi_thr
= 400;
NL_hi_slope_shift =
4;