Hello,

I have some trouble using the davinci resizer (doc available in pdf at
http://www.ti.com/litv/pdf/spraai7b)

This paper gives us with equations to calculate correct resizing
coefficients, according to the hardware limitations.

Let's just take the width in account, for the height it is essentially
the same algorithm.

We will also assume that we are using 4-tap filters, for 7 tap filters
it is essentially the same algorithm

Let's call input video width "iw", and output video width "ow".

The resizer use a resizing coefficient "hrsz" which is essentialy 256 /
resizing_factor.

resizing_factor can go from 0.25 to 4, so hrsz can go from 64 to 1024.

We need to calculate hrsz first, and the doc quotes:

hrsz = floor( ((iw-4)*256) / (ow-1) )

That is hrsz = f(iw,ow)

We know iw, it's the width of our source video frames, but we need to
calculate ow, and the doc quotes:

iw = (32*sph+(ow-1)*hrsz+16) >> 8 + 7

This equation simplifies to:

ow = ((iw - 7) * 256 – 32 * sph - 16) / hrsz + 1

sph is the starting phase, here we will assume 0, the default value of
the calccoef tool mentioned in the resizer doc.

We end with ow = g(iw,hrsz)

That means we have:

hrsz = f(iw,ow)
ow = g(iw,hrsz)

Which is pretty much a recursive infinite loop.

So my question is: what is the function iw = h(ow) ?

My mathematics skills don't let me simplify equations which use integer
rounding, so I can't deduce it from the previous 2 equations.

Thanks

-- 
Rafaël Carré <[EMAIL PROTECTED]>


_______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to