![Xilinx LogiCORE IP Скачать руководство пользователя страница 45](http://html2.mh-extra.com/html/xilinx/logicore-ip/logicore-ip_user-manual_3378198045.webp)
Video Scaler v4.0 User Guide
www.xilinx.com
45
UG805 March 1, 2011
Examples of Coefficient Set Generation and Loading
beyond the scope of this document. Refer to
Answer Record 35262
and
Filter Coefficient
Calculations
for more information on coefficient generation for the video scaler.
% Subsample a Sinc function, and create 2D array
x=-(num_taps/2):1/num_phases:((num_taps/2)-1/num_phases);
coefs_2d=reshape(sinc(x), num_phases, num_taps)
format long
% Normalize each phase individually
for i=1:num_phases
sum_phase = sum(coefs_2d(i,:));
for j=1:num_taps
norm_phases(i, j) = coefs_2d(i, j)/sum_phase;
end
% Check - Normalized values should sum to 1 in each phase
norm_sum_phase = sum(norm_phases(i,:))
end
% Translate real to integer values with precision defined by coef_width
int_phases = round(((2^(coef_width-2))*norm_phases))
This generates the 2D array of integer values shown (in hexadecimal form) in
Table 8-2
.
It remains to format these values for the scaler.
The 16-bit coefficients must be coupled into 32-bit values for delivery to the HW. The
resulting coefficient file for download is shown in
Table 8-3
.
The coefficients must be downloaded in the following order:
1.
Horizontal Luma (always required)
2.
Horizontal Chroma (required if not sharing Y and C coefficients)
3.
Vertical Luma (required if not sharing H and V coefficients)
4.
Vertical Chroma (required if not sharing H and V coefficients, and also not sharing Y
and C coefficients)
Table 8-2:
Example 1 Normalized Integer Coefficients
Phase
Tap 0
Tap 1
Tap 2
Tap 3
Tap 4
Tap 5
Tap 6
Tap 7
0
0x0000
0x0000
0x0000
0x0000
0x4000
0x0000
0x0000
0x0000
1
0xFBEF
0x058C
0xF749
0x1457
0x3D04
0xF3CC
0x06C8
0xFB4E
2
0xF9AF
0x08D8
0xF143
0x2C36
0x2C36
0xF143
0x08D8
0xF9AF
3
0xFB4E
0x06C8
0xF3CC
0x3D04
0x1457
0xF749
0x058C
0xFBEF
Table 8-3:
Example 1 Coefficient Set Download Format
Horizontal Filter Coefficients for Luma
Horizontal Filter Coefficients for Chroma
Load
Sequence
Number
Value
Calculation
Ph= Phase #, T= Tap #
Load
Sequence
Number
Value
Calculation
Ph= Phase #, T= Tap #
Phase 0
1
0x00000000
(Ph0 T1 << 16) | Ph0 T0
17
0x00000000
(Ph0 T1 << 16) | Ph0 T0
Phase 0
2
0x00000000
(Ph0 T3 << 16) | Ph0 T2
18
0x00000000
(Ph0 T3 << 16) | Ph0 T2
3
0x00004000
(Ph0 T5 << 16) | Ph0 T4
19
0x00004000
(Ph0 T5 << 16) | Ph0 T4
4
0x00000000
(Ph0 T7 << 16) | Ph0 T6
20
0x00000000
(Ph0 T7 << 16) | Ph0 T6
Содержание LogiCORE IP
Страница 1: ...LogiCORE IP Video Scaler v4 0 User Guide UG805 March 1 2011...
Страница 6: ...Video Scaler v4 0 User Guide www xilinx com UG805 March 1 2011...
Страница 14: ...14 www xilinx com Video Scaler v4 0 User Guide UG805 March 1 2011 Preface About This Guide...
Страница 18: ...18 www xilinx com Video Scaler v4 0 User Guide UG805 March 1 2011 Chapter 1 Introduction...
Страница 20: ...20 www xilinx com Video Scaler v4 0 User Guide UG805 March 1 2011 Chapter 2 Overview...
Страница 70: ...70 www xilinx com Video Scaler v4 0 User Guide UG805 March 1 2011 Chapter 9 Performance...
Страница 74: ...74 www xilinx com Video Scaler v4 0 User Guide UG805 March 1 2011 Appendix A Use Cases...
Страница 92: ...92 www xilinx com Video Scaler v4 0 User Guide UG805 March 1 2011 Appendix B Programmer Guide...