Discussion:
[mad-user] Qns abt MAD Library support for ARM environment
balaji shanmugam
2004-07-20 13:27:08 UTC
Permalink
<html><div style='background-color:'><DIV class=RTE></DIV>
<DIV>Hi </DIV>
<DIV>&nbsp;</DIV>
<DIV>I have recently started using the MAD decoder. My requirement is to use the MP3 library for the ARM 32 bit processor environement. I have compiled the library with the option FPM_ARM selected (I have modified the MACRO functions for my compiler support keeping the assembly instructions the same). But the audio output was not clear at all. Then I had selected FPM_DEFAULT. With that I am able to hear a feeble (but with noise) audio.</DIV>
<DIV>&nbsp;</DIV>
<DIV>/**** mad_f_mul ****/</DIV>
<DIV>#define FPM_ARM</DIV>
<DIV># define SIZEOF_INT 4<BR># define SIZEOF_LONG 4<BR># define SIZEOF_LONG_LONG 8</DIV>
<DIV>&nbsp;</DIV>
<DIV># define MAD_F_FRACBITS&nbsp;&nbsp;28</DIV>
<DIV>#define MAD_F_SCALEBITS&nbsp; MAD_F_FRACBITS</DIV>
<DIV>&nbsp;</DIV>
<DIV>static mad_fixed_t mad_f_mul(mad_fixed_t x,mad_fixed_t y)<BR>{<BR>&nbsp;mad_fixed_t&nbsp;result;<BR>&nbsp;mad_fixed64hi_t&nbsp;hi;<BR>&nbsp;mad_fixed64lo_t&nbsp;lo;</DIV>
<DIV>&nbsp;_asm(-1000,"<BR>&nbsp;&nbsp;&nbsp;smull %0,%1,%3,%4<BR>&nbsp;&nbsp;&nbsp;movs %0,lsr(%0,%5)<BR>&nbsp;&nbsp;&nbsp;adc %2,%0,lsl(%1,%6)<BR>&nbsp;&nbsp;",<BR>&nbsp;&nbsp;__reg_gen(__obj_modify(lo)),<BR>&nbsp;&nbsp;__reg_gen(__obj_modify(hi)),<BR>&nbsp;&nbsp;__reg_gen(__obj_assign(result)),<BR>&nbsp;&nbsp;__reg_gen(x),<BR>&nbsp;&nbsp;__reg_gen(y),<BR>&nbsp;&nbsp;MAD_F_SCALEBITS,<BR>&nbsp;&nbsp;(32 - MAD_F_SCALEBITS)<BR>&nbsp;&nbsp;);</DIV>
<DIV>&nbsp;return result;<BR>}</DIV>
<DIV>/****Ends****/</DIV>
<DIV>I like to know if I am missing something? </DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks</DIV>
<DIV>Balaji Shanmugam</DIV>
<DIV>&nbsp;</DIV></div><br clear=all><hr>Marriage? <a href="http://g.msn.com/8HMAENIN/2734??PS=47575">Join BharatMatrimony.com for free.</a> </html>
balaji shanmugam
2004-07-20 13:33:50 UTC
Permalink
<html><div style='background-color:'><DIV>
<DIV class=RTE></DIV>
<DIV>Hi </DIV>
<DIV>&nbsp;</DIV>
<DIV>I have recently started using the MAD decoder. My requirement is to use the MP3 library for the ARM 32 bit processor environement. I have compiled the library with the option FPM_ARM selected (I have modified the MACRO functions for my compiler support keeping the assembly instructions the same). But the audio output was not clear at all. Then I had selected FPM_DEFAULT. With that I am able to hear a feeble (but with noise) audio.</DIV>
<DIV>&nbsp;</DIV>
<DIV>/**** mad_f_mul ****/</DIV>
<DIV>#define FPM_ARM</DIV>
<DIV># define SIZEOF_INT 4<BR># define SIZEOF_LONG 4<BR># define SIZEOF_LONG_LONG 8</DIV>
<DIV>&nbsp;</DIV>
<DIV># define MAD_F_FRACBITS&nbsp;&nbsp;28</DIV>
<DIV>#define MAD_F_SCALEBITS&nbsp; MAD_F_FRACBITS</DIV>
<DIV>&nbsp;</DIV>
<DIV>static mad_fixed_t mad_f_mul(mad_fixed_t x,mad_fixed_t y)<BR>{<BR>&nbsp;mad_fixed_t&nbsp;result;<BR>&nbsp;mad_fixed64hi_t&nbsp;hi;<BR>&nbsp;mad_fixed64lo_t&nbsp;lo;</DIV>
<DIV>&nbsp;_asm(-1000,"<BR>&nbsp;&nbsp;&nbsp;smull %0,%1,%3,%4<BR>&nbsp;&nbsp;&nbsp;movs %0,lsr(%0,%5)<BR>&nbsp;&nbsp;&nbsp;adc %2,%0,lsl(%1,%6)<BR>&nbsp;&nbsp;",<BR>&nbsp;&nbsp;__reg_gen(__obj_modify(lo)),<BR>&nbsp;&nbsp;__reg_gen(__obj_modify(hi)),<BR>&nbsp;&nbsp;__reg_gen(__obj_assign(result)),<BR>&nbsp;&nbsp;__reg_gen(x),<BR>&nbsp;&nbsp;__reg_gen(y),<BR>&nbsp;&nbsp;MAD_F_SCALEBITS,<BR>&nbsp;&nbsp;(32 - MAD_F_SCALEBITS)<BR>&nbsp;&nbsp;);</DIV>
<DIV>&nbsp;return result;<BR>}</DIV>
<DIV>/****Ends****/</DIV>
<DIV>I like to know if I am missing something? </DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks</DIV>
<DIV>Balaji Shanmugam</DIV>
<DIV>&nbsp;</DIV></DIV></div><br clear=all><hr>Reach out to millions of buyers. <a href="http://g.msn.com/8HMAENIN/2743??PS=47575">With zero investment. </a> </html>
Loading...