[mad-dev] Verificattion for reducing the size of rq_table.dat

Swapnil Wagle swapnil at geodesiconline.com
Mon Aug 29 22:20:28 PDT 2005


I know my question have been very basic but I really appreciate your
co-operation. 

-----Original Message-----
From: mad-dev-bounces at lists.mars.org [mailto:mad-dev-bounces at lists.mars.org]
On Behalf Of Rob Leslie
Sent: Tuesday, August 30, 2005 4:54 AM
To: mad-dev at lists.mars.org
Subject: Re: [mad-dev] Verificattion for reducing the size of rq_table.dat

On Aug 28, 2005, at 10:20 PM, Swapnil Wagle wrote:
> For reducing the size of rq_tbale.dat as suggested by you people I 
> have done following changes within the libray.Can you please verify 
> whether this is correct or not.
> The changed 'III_requantize' is as follows
>
>   static
> mad_fixed_t III_requantize(unsigned int value, signed int exp) {
>   mad_fixed_t requantized;
>   signed int frac;
>   struct fixedfloat const *power;
>
>   frac = exp % 4;  /* assumes sign(frac) == sign(exp) */
>   exp /= 4;
>
>   value = value / 8;  // Dividing the input value by 8
>
>   power = &rq_table[value];
>
>   power = power * 16; // Multiplying the result after finding the 
> array index by 16

Pointer multiplication will not get you far...

The following patch should accomplish the result I intended to convey.




More information about the mad-dev mailing list