Re: problem with the 'rq_table.dat' during compilation
"Grigory A." <[email protected]> Thu, 18 Aug 2005 14:19:53 +0400
| Newsgroups | gmane.comp.audio.mad.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello Swapnil,
Actually you can totally remove table and use
simple calculation algorithm to make re-quantization.
32K table vs simple calculation. For sure table works faster but
in case of calculation their relative weight in overall
resource consumption is negligible.
simple explanation of calculation algorithm
- we need:
X = is^(4/3)*2^exp
- it can be represented as:
X = (1-x)^(4/3)*2^(int_exp)*2^(fract_exp)
(1-x)^(4/3) can be calculated by using Taylor approximation
approximately 18-19 step is enough to achieve Q4.28 precision
in worst case of x
*2^(int_exp) - it is just shift
*2^(fract_exp) - it means only one multiplication on value from
table { 2^(-0.25), 2^(-0.50), 2^(-0.75) }
in result:
- completely remove 32K table
- result with same precision
- negligible increase of calculation - (I think less then 0.1%)
I use such method in my implementation of MAD for TI 55xx DSP
so algorithm exists in 55xx dsp asm and it works well.
I think in future version of MAD there is no reason to use table for
re-quantization process. Just put small routine on C instead.
About your III_huffdecode() problem - check carefully bit order in
bit-field structure. It is compiler specific - in my case (of TI DSP)
I had to reorder bit order in macros which describes haffman words in
tables.
You can compare memory (there table is) on your PC and on your PalmOS
- they have to be same.
--
Best regards,
Grigory mailto:[email protected]
Thursday, August 18, 2005, 1:21:05 PM, you wrote:
SW>
SW>
SW> Hello,
SW>
SW>
SW>
SW> I am trying to compile Madlib for PalmOS.Since Palm OS
SW> has the 68K limitation I removed last 20 entires from the
SW>
SW> rq_table.dat.Will this work w/o these entires,atleast a garbage output.
SW>
SW> Secondly the program is compiling now bu constantly
SW> crashes in the 'III_huffdecode' function.Can someone please help
SW>
SW> me I dont know whther I am doing the right thing or not.
SW>
SW>
SW>
SW> Regards,
SW>
SW> Swapnil
SW>
SW>
SW>
--
Best regards,
Grigory mailto:[email protected]