summaryrefslogtreecommitdiff
path: root/apps/codecs/demac/libdemac
AgeCommit message (Collapse)Author
2010-12-27Redo r28026 so that all .S files get the __ASSEMBLER__ define.Thomas Martitz
Patch by Thomas Jarosch. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28913 a1c6a512-1295-4272-9138-f99709370657
2010-11-21Use MEM_ALIGN_ATTR in libdemac instead of fixed alignment. Speeds up arm11 ↵Andree Buschmann
by ~6%. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28632 a1c6a512-1295-4272-9138-f99709370657
2010-11-01Fix typo from r28026 causing warnings on newer gcc.Nils Wallménius
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28439 a1c6a512-1295-4272-9138-f99709370657
2010-09-07workaround weird gcc behaviourRafaël Carré
it might a bug in the 4 years old gcc version, but __ASSEMBLER__ is not defined when preprocessing .S files with -std=gnu99 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28026 a1c6a512-1295-4272-9138-f99709370657
2010-08-30libdemac: ARMv7 assembler optimisation for the filters, tested on Nokia ↵Jens Arnold
N900. Speedup is 2.1x for -c5000 compared to the ARMv6 asm. Note that actually compiling it on device requires hand-assembling the 'vadd' and 'vsub' instructions due to a bug in binutils 2.18.50, and making the standalone decoder use it requires Makefile and demac_config.h hacks. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27944 a1c6a512-1295-4272-9138-f99709370657
2010-07-19Make libdemac compile again on OSX x86 and x86_64 by replacing .rept with ↵Jens Arnold
fancy preprocessor stuff. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27490 a1c6a512-1295-4272-9138-f99709370657
2010-06-11FS#11335 by me: make ARM assembly functions thumb-friendlyRafaël Carré
We can't pop into pc on ARMv4t when using thumb: the T bit won't be modified if we are returning to a thumb function Code running on ARMv4t should use the new ldrpc / ldmpc macros instead of ldr pc, [sp], #4 and ldm(cond) sp!, {regs, pc} No modification on pure ARM builds and ARMv5+ Note: USE_THUMB is currently never defined, no targets can currently be built with -mthumb, see FS#6734 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26756 a1c6a512-1295-4272-9138-f99709370657
2010-05-29Correction to clobber lists of several codec's inline assembly.Andree Buschmann
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26376 a1c6a512-1295-4272-9138-f99709370657
2010-05-06Move c/h files implementing/defining standard library stuff into a new libc ↵Thomas Martitz
directory, also standard'ify some parts of the code base (almost entirely #include fixes). This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657
2010-03-10Move (small) data into DRAM on PP5020, it's ~4.5% faster that way. Closes ↵Jens Arnold
about half of the performance gap towards PP5022. The (relatively large) buffers for decoded data stay in IRAM, as does the reciprocal table. Clarify some comments. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25108 a1c6a512-1295-4272-9138-f99709370657
2010-03-03libdemac: Separate filtering calls per channel in preparation for the ↵Jens Arnold
dual-core split on PP. This also means less inlining, and hence speeds up decoding on single core slightly, due to better caching behaviour. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25005 a1c6a512-1295-4272-9138-f99709370657
2010-03-03Get rid of .rept in inline asm() blocks where possible. Using .rept causes ↵Jens Arnold
gcc to wrongly estimate the size of the asm(), leading to (potential) compilation problems. This is necessary for the upcoming restructuring, and should fix ARMv6+ sim builds as well. No functional change. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25004 a1c6a512-1295-4272-9138-f99709370657
2010-02-22Remove all tabs within codec path.Andree Buschmann
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24862 a1c6a512-1295-4272-9138-f99709370657
2010-02-20Clarify comments in ARMv6 divider regarding special-case handling of large ↵Andrew Mahone
(high bit set) numerators. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24783 a1c6a512-1295-4272-9138-f99709370657
2010-02-15libdemac: Add x86/x86_64 MMX asm for the filters. Not relevant for target ↵Jens Arnold
but speeds up decoding on x86/x86_64 sims. Average speedup ranges from 25% for -c2000 to 3 times for -c5000; on Intel Atom it's even 45% for -c2000 to 6 times for -c5000. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24663 a1c6a512-1295-4272-9138-f99709370657
2010-02-11Remove leftover from before make system rework.Jens Arnold
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24602 a1c6a512-1295-4272-9138-f99709370657
2010-02-10APE: Fused vector math for the filters on ARMv5te. Speedup on Cowon D2 is ↵Jens Arnold
~4% for -c2000..-c4000 (less for -c5000). Thanks to Frank Gevaerts for testing. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24590 a1c6a512-1295-4272-9138-f99709370657
2010-02-08APE: Fused vector math for the filters on ARMv6. Speedup is ~2.5% for ↵Jens Arnold
-c2000, ~7% for -c3000 and higher. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24569 a1c6a512-1295-4272-9138-f99709370657
2010-02-04Put back the insane buffer where it belongs on non-ARM, and simplify the ↵Jens Arnold
selection. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24512 a1c6a512-1295-4272-9138-f99709370657
2010-02-04Fix yellow: add newline at EOF in udiv32_arm-pre.SAndrew Mahone
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24508 a1c6a512-1295-4272-9138-f99709370657
2010-02-04Use all available codec iram for reciprocal table in APE codec on ARMv4. ↵Andrew Mahone
Done by linking first with the table empty to determine free space, then sizing table to fill it. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24507 a1c6a512-1295-4272-9138-f99709370657
2010-02-04Move udiv32_arm.S into libdemac, as this divider is specialized for the APE ↵Andrew Mahone
codec and an optimized divider is already provided for general use in codeclib. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24506 a1c6a512-1295-4272-9138-f99709370657
2010-02-02APE codec: Speed up decoding of -c2000 and higher on ARMv4 and coldfire by ↵Jens Arnold
fusing vector math for the filters. Speedup is roughly 3.5% for -c2000, 8% for -c3000 and 12% for -c4000. To be extended to other architectures. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24473 a1c6a512-1295-4272-9138-f99709370657
2010-01-30Improve libdemac SATURATE slightly on ARMv4/5, move filter buffers and code ↵Andrew Mahone
out of IRAM for sizes that aren't near realtime and extend udiv32_arm reciprocal table. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24376 a1c6a512-1295-4272-9138-f99709370657
2010-01-28Improvements to specialized dividers for APE codec:Andrew Mahone
* Use Newton-Raphson divider on ARMv5e and ARMv6, about 7% speedup on Gigabeat S. * On ARMv4 targets using IRAM, remove insane filter buffer from IRAM, fill available IRAM with LUT of reciprocals for small divisors - speedup varies according to target and available IRAM, APE normal sample is approx. 109% RT on e200. * Rename apps/codecs/lib/udiv32_armv4.S to apps/codecs/lib/udiv32_arm.S, which includes dividers for all ARM targets specialized for APE. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24354 a1c6a512-1295-4272-9138-f99709370657
2009-11-09Make the codecs use more IRAM on S5L870x, as we have plenty of it.Michael Sparmann
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23594 a1c6a512-1295-4272-9138-f99709370657
2009-07-17Don't use ldrd/strd on ARMv5 since not all revisions support them and the ↵Jens Arnold
gain from using them is minimal (basically code size only). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21916 a1c6a512-1295-4272-9138-f99709370657
2009-01-10Calculate watermark from bitrate and harddisk spinup time.Björn Stenberg
Use a smaller PCM buffer on targets with 2MB or less ram. (FS#9703) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19743 a1c6a512-1295-4272-9138-f99709370657
2009-01-02static/const/#include/tab police on various filesBertrik Sikken
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19643 a1c6a512-1295-4272-9138-f99709370657
2008-12-29Make local functions static in codecs, where possible.Bertrik Sikken
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19612 a1c6a512-1295-4272-9138-f99709370657
2008-12-22Slight speedup for the APE filters. Most noticeable on coldfire (+3.5% for ↵Jens Arnold
-c2000), but also helps on the arm targets (+0.9% for -c2000 on PP5002). This transformation is oveflow safe, as absres < 2^24 is guaranteed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19556 a1c6a512-1295-4272-9138-f99709370657
2008-12-21Fix decoding of stereo frames with silence in only one channel. * Make the ↵Jens Arnold
standalone decoder contain debugging information. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19552 a1c6a512-1295-4272-9138-f99709370657
2008-12-21Fix handling of 8 bit mono and stereo APE files, and also optimise 16 and 24 ↵Jens Arnold
bit output in the standalone decoder a bit. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19517 a1c6a512-1295-4272-9138-f99709370657
2008-12-09Assembler optimised mono predictor for ARM. Speedup for -c1000 mono is ~5% ↵Jens Arnold
on PP, ~8% on Gigabeat S (less for higher compression levels). Also fix some overlooked comments in the stereo predictor. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19375 a1c6a512-1295-4272-9138-f99709370657
2008-12-02Implement mono predictor in assembler for coldfire, yielding a ~6% speedup ↵Jens Arnold
for mono -c1000. Apply ideas gained from it back to the stereo predictor, saving 4 instructions. No speed increase for stereo, probably due to cache aliasing effects. * 80-column police. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19296 a1c6a512-1295-4272-9138-f99709370657
2008-12-01Shuffling around register allocation allows to keep decoded0 and decoded1 in ↵Jens Arnold
registers, for a slight speedup. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19287 a1c6a512-1295-4272-9138-f99709370657
2008-11-30Remove extraneous semicolons, and fix a comment.Jens Arnold
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19268 a1c6a512-1295-4272-9138-f99709370657
2008-11-30Fix APE 16-bit mono output: mono signals need to be scaled for rockbox.Jens Arnold
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19264 a1c6a512-1295-4272-9138-f99709370657
2008-11-28Resurrect the ARM7 16-bit packed vector addition/subtraction for ARMv5, ↵Jens Arnold
giving a nice speedup for the higher compression levels (tested on Cowon D2). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19260 a1c6a512-1295-4272-9138-f99709370657
2008-11-27On ARM9TDMI (e.g. Gigabeat F) it's faster to use a ldr/str pair than ↵Jens Arnold
add+ldmia/stmia for 2 registers. On ARM7TDMI a str pair is equally fast, so go for the simpler macro and use it for all ARMv4. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19250 a1c6a512-1295-4272-9138-f99709370657
2008-11-27Speed up the predictor a little by using ldrd/strd on ARMv5+. This required ↵Jens Arnold
shuffling around the register allocation somewhat. Performance on ARMv4 is unaffected. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19248 a1c6a512-1295-4272-9138-f99709370657
2008-11-26Get rid of unused return values, except the one from decode_chunk() which ↵Jens Arnold
will be used in the dual core split. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19236 a1c6a512-1295-4272-9138-f99709370657
2008-11-24Reorder instructions to avoid pipeline stalls on ARMv6 wherever possible ↵Jens Arnold
(sometimes using different registers to allow this). Speeds up the predictor by almost 20% on ARMv6 (overall speedup for -c1000 is 5%), and might also help a bit on ARMv5. ARMv4 speed is unaffected. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19210 a1c6a512-1295-4272-9138-f99709370657
2008-11-24Branch optimisation in both C (giving hints to gcc - verified using ↵Jens Arnold
-fprofile-arcs and gcov) and asm files. Biggest effect on coldfire (-c1000: +8%, -c2000: +5%), but ARM also profits a bit (less than 1% on ARM7TDMI, around 1% on ARM1136). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19199 a1c6a512-1295-4272-9138-f99709370657
2008-11-24Tweak the ARMv6 filter assembly a bit further.Jens Arnold
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19198 a1c6a512-1295-4272-9138-f99709370657
2008-11-20New makefile solution: A single invocation of 'make' to build the entire ↵Björn Stenberg
tree. Fully controlled dependencies give faster and more correct recompiles. Many #include lines adjusted to conform to the new standards. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19146 a1c6a512-1295-4272-9138-f99709370657
2008-11-19Several tweaks and cleanups: * Use .rept instead of repeated macros for ↵Jens Arnold
repeating blocks. * Use MUL (variant) instead of MLA (variant) in the first step of the ARM scalarproduct() if there's no loop. * Unroll ARM assembler functions to 32 where not already done, plus the generic scalarproduct(). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19144 a1c6a512-1295-4272-9138-f99709370657
2008-11-19Compile-time choice between 16 bit and 32 bit integers for the filters. 32 ↵Jens Arnold
bit filters are faster on ARMv4 (with assembler code), so use them there. Nice speedup on PP and Gigabeat F/X. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19140 a1c6a512-1295-4272-9138-f99709370657
2008-11-16Centralise compile-time configuration.Jens Arnold
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19121 a1c6a512-1295-4272-9138-f99709370657
2008-11-16Move the contents of rangecoding.h into entropy.c, and remove the former. It ↵Jens Arnold
was only used there, and defined some variables in the .h git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19116 a1c6a512-1295-4272-9138-f99709370657