Davinci Resizer coefficients

Rafaël Carré rcarre at m2x.nl
Wed Sep 10 09:51:47 CDT 2008


On Wed, 2008-09-10 at 20:10 +0530, Syed Mohammed, Khasim wrote:
> Hi Rafael

> I was having similar discussion with Xiangdong, Here is what he advice me,
> The steps are clearly outlined in spraai7 (http://focus.ti.com/lit/an/spraai7b/spraai7b.pdf ). Basically, one starts with iw and ow, which are your input and output widths, respectively, and gets the hrsz. Once this is done, use the second equation to recalculate the ow. Now you have all iw, ow and rsz values that can be programmed to the resizer. No more iterations are needed there.
> 
> Hope this is helpful.
> 

Let's follow the steps outlined in this document, we will do a 4x
resizing.

iw = 180
ow = iw * 4 = 180 * 4 = 720

floor, largest integral value not greater than argument.

4-tap filters

hrsz = floor( (iw-4)*256/(ow-1) )
hrsz = floor( 176 * 256 / (719) )
hrsz = floor( 62.6648 )
hrsz = 62

HRSZ IS INVALID

7-tap filters

hrsz = floor( (iw-7)*256/(ow-1) )
hrsz = floor( 173 * 256 / (719) )
hrsz = floor( 61.5966 )
hrsz = 61

HRSZ IS INVALID

This is why I had thought you must start with a valid ow first and not
try to guess one.

-- 
Rafaël Carré <rcarre at m2x.nl>




More information about the Davinci-linux-open-source mailing list