diff options
author | Pedro Vasconcelos <pbv@rockbox.org> | 2005-06-21 20:14:18 +0000 |
---|---|---|
committer | Pedro Vasconcelos <pbv@rockbox.org> | 2005-06-21 20:14:18 +0000 |
commit | 1b3622d589ebada6a696292380a4957995083795 (patch) | |
tree | acc989c24dcf28b28b2f3d1b9a8c4447206f4f24 /apps/codecs | |
parent | ae45ec51b75ee766a53ba8d8aac4e28845c5b617 (diff) |
Use asm optimised memset() in vorbis_apply_window.
Slight speed improvement. "Toughest" Q10 encodings play without skipping now.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6792 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs')
-rw-r--r-- | apps/codecs/Tremor/asm_mcf5249.h | 9 | ||||
-rw-r--r-- | apps/codecs/Tremor/window.c | 8 |
2 files changed, 10 insertions, 7 deletions
diff --git a/apps/codecs/Tremor/asm_mcf5249.h b/apps/codecs/Tremor/asm_mcf5249.h index a60c6ce2ad..3d00249bef 100644 --- a/apps/codecs/Tremor/asm_mcf5249.h +++ b/apps/codecs/Tremor/asm_mcf5249.h @@ -110,8 +110,7 @@ void XNPROD31(ogg_int32_t a, ogg_int32_t b, } -#if 0 -/* canonical definition */ +#if 0 /* canonical Tremor definition */ #define XPROD32(_a, _b, _t, _v, _x, _y) \ { (_x)=MULT32(_a,_t)+MULT32(_b,_v); \ (_y)=MULT32(_b,_t)-MULT32(_a,_v); } @@ -134,7 +133,6 @@ void XNPROD31(ogg_int32_t a, ogg_int32_t b, [t] "r" (_t), [v] "r" (_v) \ : "cc"); - /* asm versions of vector operations for block.c, window.c */ /* assumes MAC is initialized & accumulators cleared */ static inline @@ -306,7 +304,9 @@ void mcf5249_vect_mult_bw(ogg_int32_t *data, LOOKUP_T *window, int n) "cc", "memory"); } - +#if 0 +/* this routine is subsumed by Jens' asm optimised memset which appears + to be more efficient anyway; will eventually be deleted */ static inline void mcf5249_vect_zero(ogg_int32_t *ptr, int n) { @@ -335,6 +335,7 @@ void mcf5249_vect_zero(ogg_int32_t *ptr, int n) n--; } } +#endif #endif diff --git a/apps/codecs/Tremor/window.c b/apps/codecs/Tremor/window.c index c20aecd289..5a9f4ec6a6 100644 --- a/apps/codecs/Tremor/window.c +++ b/apps/codecs/Tremor/window.c @@ -16,6 +16,7 @@ ********************************************************************/ #include "config-tremor.h" +#include <string.h> #include <math.h> #include "os.h" #include "misc.h" @@ -68,11 +69,12 @@ void _vorbis_apply_window(ogg_int32_t *d,const void *window_p[2], long rightend=rightbegin+rn/2; #if CONFIG_CPU == MCF5249 - /* mcf5249_init_mac(); */ /* shouldn't be needed, but just in case */ - mcf5249_vect_zero(&d[0], leftbegin); + memset((void *)&d[0], 0, sizeof(ogg_int32_t)*leftbegin); + /* mcf5249_vect_zero(&d[0], leftbegin); */ mcf5249_vect_mult_fw(&d[leftbegin], &window[lW][0], leftend-leftbegin); mcf5249_vect_mult_bw(&d[rightbegin], &window[nW][rn/2-1], rightend-rightbegin); - mcf5249_vect_zero(&d[rightend], n-rightend); + memset((void *)&d[rightend], 0, sizeof(ogg_int32_t)*(n-rightend)); + /* mcf5249_vect_zero(&d[rightend], n-rightend); */ #else int i,p; |