Hi,
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
requantized = power->mantissa; exp += power->exponent;
if (exp < 0) { if (-exp >= sizeof(mad_fixed_t) * CHAR_BIT) { /* underflow */ requantized = 0; } else { requantized += 1L << (-exp - 1); requantized >>= -exp; } } else { if (exp >= 5) { /* overflow */ # if defined(DEBUG) fprintf(stderr, "requantize overflow (%f * 2^%d)\n", mad_f_todouble(requantized), exp); # endif requantized = MAD_F_MAX; } else requantized <<= exp; }
return frac ? mad_f_mul(requantized, root_table[3 + frac]) : requantized; }
Reagrds, swapnil
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.
As this is currently experimental, you will need to define OPT_SPACE when building, e.g.:
./configure CFLAGS="-DOPT_SPACE"
A quick check reveals that this optimization reduces the decoder's computational ISO/IEC 11172-4 compliance to "limited accuracy."
I know my question have been very basic but I really appreciate your co-operation.
-----Original Message----- From: mad-dev-bounces@lists.mars.org [mailto:mad-dev-bounces@lists.mars.org] On Behalf Of Rob Leslie Sent: Tuesday, August 30, 2005 4:54 AM To: mad-dev@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.