This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#11348 - PDbox changes (fix, optimization)
Attached to Project:
Rockbox
Opened by Andree Buschmann (Buschel) - Thursday, 03 June 2010, 15:45 GMT+2
Last edited by Andree Buschmann (Buschel) - Saturday, 05 June 2010, 01:38 GMT+2
Opened by Andree Buschmann (Buschel) - Thursday, 03 June 2010, 15:45 GMT+2
Last edited by Andree Buschmann (Buschel) - Saturday, 05 June 2010, 01:38 GMT+2
|
DetailsThis entry collects some patches to PDbox.
1) pdbox_cos_generation_v01.patch This patch corrects the interpolation formular used in the waveform generation. It also unifies the generation loop that is used in cos~.c and osc~.c 2) pdbox_mult_asm_v01.patch This patch adds ARM assembler for the mult(a,b) macro for speed up. Similar Coldfire assembler could easily be added as well. 3) pdbox_cos_tab_v01.patch This patch reduces the size of cos_table[] to 1/4 of svn's size. Now it uses ~32KB and can be moved to IRAM on several targets. This patch moves cos_table to IRAM on all targets for now. Major speed up on Coldfire is expected. |
This task depends upon
Closed by Andree Buschmann (Buschel)
Saturday, 05 June 2010, 01:38 GMT+2
Reason for closing: Accepted
Additional comments about closing: Patches were adapted and submitted with several revisions. Coldfire asm was rejected because it introduced clicking noise.
Saturday, 05 June 2010, 01:38 GMT+2
Reason for closing: Accepted
Additional comments about closing: Patches were adapted and submitted with several revisions. Coldfire asm was rejected because it introduced clicking noise.
1) Using the full 32 bit range might be a good idea. You're probably not hurting for precision but it seems strange to only use 19 bits of a 32 bit register for no real reason.
2) Unless I'm confused, it looks like you have 0..360. Using the trig identity cos(180-theta)=-cos(theta) and the evenness of cos, the size of the tables could be further reduced. You should only need to include the range 0..90 degrees.
1) I suppose that there were some justifications why Günther Geiger (the author of PD-anywhere, the fixed-point Pure Data fork) chose this format.
2) I know. But in this stage I would rather like to update the standard GUI, making it somewhat more compatible for all targets. However, my intentions do not prevent anyone from solving this problem. The files that use cos_table are PDa/intern/cos~.c , PDa/intern/osc~.c and PDa/intern/vcf~.c . To test the result (osc~ only) use pdpod_test.pd patch from both PureData.zip and PureData2.zip archives.
1) You should also submit the "#include plugin.h" in m_fixed.h. Otherwise CPU_ARM is not defined for each object build.
2) pdbox does not compile on pcsim (cygwin) anymore ("make: *** No rule to make target `/cygdrive/c/development/rockbox_test/build-pcsim/../src/m_fixed.h', needed by `/cygdrive/c/development/rockbox_test/build-pcsim/apps/plugins/pdbox/PDa/intern/biquad~.o'. Stop."). Target builds fine under cygwin, both target and pcsim build fine under vmware.
Also, if you made changes to makecostab.c , would you like to add them here too?