Page 1 of 1

Problem with billinear filtering with fixed point math

Posted: Tue Jul 22, 2008 4:37 pm
by Codemss
I made a rotozoomer that is billinear interpolated and uses fixed point math, but it has a big problem. Everywhere were dark pixels should be, white pop up. It really irritates me because I really spend some time on the program and this is the last bug, if this one's out then I can be extremely proud of my program.
Anyway, does anybody recognize the problem or knows what to do with it? If I wasn't clear, ask me about it. BTW, the problem is not because of colour values becoming too low(below zero) or too high(above 255), because I tried an IF to check if that was true, but it wasn't. Anyway, thanks for reading :P. And hello(I haven't been on any qbasic forum for a long time).

Posted: Tue Jul 22, 2008 7:14 pm
by Mentat
Maybe MOD overflow backwards. Happened to me, and I got a cool fractal.

Posted: Thu Jul 24, 2008 4:41 pm
by Codemss
I think it is due of the inaccuraccy of integer math, because when I changed the scaleing size to a bigger, there were a lot more pixels coloured wrong. still I hate this error, but I'll still put the rotozoomer in a demo because it's kind of impressive.

Posted: Thu Jul 24, 2008 4:57 pm
by Mentat
Hm. Are you using any bitwise calculations or manipulation?