Simplify prototype of function calc_size
Fix N/M reversed in debug message
Simplify calculation of ratio
Set W/H resize bits, and set proper value for coef index register

Also, skip calculation of the coefficients if not resizing.
Enhance calculation of coefs for bilinear upscale

It works great for some values (320x120 -> 320x240 or
320x144 -> 320x240) but some others show artifacts or fail
to scale (320x80 -> 320x240 or 320x90 -> 320x240 among others).