Forum Discussion
Altera_Forum
Honored Contributor
14 years agoHi,
The VIP user guide does give some guidelines for the number of taps that should be used for various scaling ratios. For any upscale ratio bicubic or 4 tap polyphase with Lanczos 2 is recommended. For downscale it recommends polyphase with 2*lanczos_order*input_size/output_size taps. It also recommends using Lanczos 2. I think the choice between which Lanczos set to use is less critical than getting the number of taps right - I think there might be some debate about whether Lanczos 2 or Lanczos 3 is better (http://en.wikipedia.org/wiki/lanczos_resampling). You are correct that increasing the number of taps will generally increase the blur in the output. This is useful in downscale only as it acts to remove frequencies that you no longer have the resoltuion to represent (if you get the right number of taps) - think of a zone plate becoming grey when you donwscale, rather than aliasing. The Altera Scaler is not yet edge adaptive so you will get some blur in upscale as it takes the weighted sum of 4 taps, but for SD->HD this should not be too noticable. If you are changing the scaling ratio at runtime you should definitely change the coefficients you use with each change in input/output resoltuon - either using mutliple banks or having some code on something like a Nios to calculate and load new coefficients on the fly. The UDX4 (current version is UDX4.2.1) reference design uses Nios code to do just this - calculating the recommended number of taps for each scaling ratio, generating and loading the correct coefficients. You can either use this code directly if your system has a processor, or use it as a reference to generate coefficients to load into multiple banks at startup if you are using an HDL statemachine to configure things. Hope this helps. Regards, Kieron