![Xilinx LogiCORE IP User Manual Download Page 52](http://html2.mh-extra.com/html/xilinx/logicore-ip/logicore-ip_user-manual_3378198052.webp)
52
www.xilinx.com
Video Scaler v4.0 User Guide
UG805 March 1, 2011
Chapter 8:
Coefficients
Coefficient Preloading Using a .coe File
To preload the scaler with coefficients (mandatory when in Constant mode), you must
specify, using the CORE Generator GUI or the EDK GUI, a .coe file that contains the
coefficients you want to use. It is important that the .coe file specified is in the correct
format. The coefficients specified in the .coe file become hard-coded into the hardware
during synthesis.
Generating .coe Files
Generating .coe files can be accomplished by either extracting coefficients from a file
provided with the core (refer to the next section) or developing your own set of
coefficients. Developing your own coefficients is a very complex and subjective operation,
and is beyond the scope of this document. Refer to
Answer Record 35262
and
Filter
Coefficient Calculations
for more information on generating video scaler coefficients.
Extracting Coefficients From xscaler_coefs.c File
The pCore version of the video scaler includes a software driver. The coefficients are
included in this driver in the
xscaler_coefs.c
file. The pCore version of the core can be
generated by selecting "EDK pCore" in the CORE Generator GUI. Coefficients from this file
can be extracted manually; however, it is important to know the format of this file.
All coefficients required for any conversion are provided with the SW Driver. The filename
is
xscaler_coefs.c
. You may modify this file, and the driver code that reads the
coefficients from it, as you see fit.
The file defines 19 “bins” of coefficients. You must select which bin to use according to
your application. In the delivered driver, the file
xscaler.c
includes a function called
XScaler_CoeffBinOffset
, which assesses the scaling requirements specified by you
(for example, input/output rectangle sizes) and calculates which bin of coefficients is
required. In this driver, the bins have been allocated as per
Table 8-8
. This function may be
used independently for all Horizontal, Vertical, Luma, and Chroma filter operations.
Table 8-8:
Coefficient “Binning” in SW Driver (xscaler_coefs.c)
Bin #
SF=input_size/
output_size
Comments
1
SF<1
All up-scaling cases
1+
Ceil
((output_size*16)/input_size)
(bins 2 to 17)
For example:
•
Down-scaling 1920 to 1440: use bin
13
•
Down-scaling 1080 to 1000 : Use
bin 16
•
Down-scaling 1080 to 144 : Use
bin 4
1<SF<16
(All down-
scaling cases)
General down-scaling coefficients
Down-scaling filter coefficients include
anti-aliasing characteristics that differ
according to scale-factor
18
N/A
Unity coefficient in center tap
19
1920/1280
(1080/720)
Example user-specific case for HD down
scaling conversion
Summary of Contents for LogiCORE IP
Page 1: ...LogiCORE IP Video Scaler v4 0 User Guide UG805 March 1 2011...
Page 6: ...Video Scaler v4 0 User Guide www xilinx com UG805 March 1 2011...
Page 14: ...14 www xilinx com Video Scaler v4 0 User Guide UG805 March 1 2011 Preface About This Guide...
Page 18: ...18 www xilinx com Video Scaler v4 0 User Guide UG805 March 1 2011 Chapter 1 Introduction...
Page 20: ...20 www xilinx com Video Scaler v4 0 User Guide UG805 March 1 2011 Chapter 2 Overview...
Page 70: ...70 www xilinx com Video Scaler v4 0 User Guide UG805 March 1 2011 Chapter 9 Performance...
Page 74: ...74 www xilinx com Video Scaler v4 0 User Guide UG805 March 1 2011 Appendix A Use Cases...
Page 92: ...92 www xilinx com Video Scaler v4 0 User Guide UG805 March 1 2011 Appendix B Programmer Guide...