[PATCH] savage: Avoid unnecessary float calculation in video display

2011-09-17 Thread Tormod Volden
From: Tormod Volden There is no reason to do the division using floats as long as the result is an integer and there is no risk of intermediate overflow. This is in the code for "Old" chipsets. Integer division was already used in the parallel code for "New" chipsets. Also fixed up the whitespa

Re: [PATCH] savage: Avoid unnecessary float calculation in video display

2011-09-17 Thread walter harms
Am 17.09.2011 11:58, schrieb Tormod Volden: > From: Tormod Volden > > There is no reason to do the division using floats as long as > the result is an integer and there is no risk of intermediate > overflow. > > This is in the code for "Old" chipsets. Integer division was already > used in the

Re: [PATCH] savage: Avoid unnecessary float calculation in video display

2011-09-17 Thread Tormod Volden
On Sat, Sep 17, 2011 at 1:03 PM, walter harms wrote: >>      if (S3_MOBILE_TWISTER_SERIES(psav->Chipset) >> -        && psav->FPExpansion) { >> -        drw_w = (((float)(drw_w * psav->XExp1)/(float)psav->XExp2)+1); >> -        drw_h = (float)(drw_h * psav->YExp1)/(float)psav->YExp2+1; >> -        

Re: [PATCH] savage: Avoid unnecessary float calculation in video display

2011-09-17 Thread Matt Turner
On Sat, Sep 17, 2011 at 5:58 AM, Tormod Volden wrote: > From: Tormod Volden > > There is no reason to do the division using floats as long as > the result is an integer and there is no risk of intermediate > overflow. > > This is in the code for "Old" chipsets. Integer division was already > used