diff options
author | Dave Hooper <dave@beermex.com> | 2010-02-17 00:49:53 +0000 |
---|---|---|
committer | Dave Hooper <dave@beermex.com> | 2010-02-17 00:49:53 +0000 |
commit | 42774d3128b91d5a37344cb40d56d3c4d147e5f2 (patch) | |
tree | bf336b407992ec9a5e454556f3351e3f8a0d10de /apps/codecs/libcook | |
parent | 62257ebc38bc0a3095b25dd0f58c4c8215edf602 (diff) |
Merge from branches/mdctexp - faster ifft+imdct in codec lib
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24712 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libcook')
-rw-r--r-- | apps/codecs/libcook/cook.c | 1 | ||||
-rw-r--r-- | apps/codecs/libcook/cook.h | 1 | ||||
-rw-r--r-- | apps/codecs/libcook/cook_fixpoint.h | 5 |
3 files changed, 4 insertions, 3 deletions
diff --git a/apps/codecs/libcook/cook.c b/apps/codecs/libcook/cook.c index 3212c57abb..8d9611c4d9 100644 --- a/apps/codecs/libcook/cook.c +++ b/apps/codecs/libcook/cook.c @@ -797,6 +797,7 @@ static void dump_cook_context(COOKContext *q) /* Initialize variable relations */ q->numvector_size = (1 << q->log2_numvector_size); + q->mdct_nbits = av_log2(q->samples_per_channel)+1; /* Generate tables */ if (init_cook_vlc_tables(q) != 0) diff --git a/apps/codecs/libcook/cook.h b/apps/codecs/libcook/cook.h index 4fb7b1c0db..0672553895 100644 --- a/apps/codecs/libcook/cook.h +++ b/apps/codecs/libcook/cook.h @@ -63,6 +63,7 @@ typedef struct cook { int num_vectors; int bits_per_subpacket; int cookversion; + int mdct_nbits; /* is this the same as one of above? */ /* states */ int random_state; diff --git a/apps/codecs/libcook/cook_fixpoint.h b/apps/codecs/libcook/cook_fixpoint.h index b17d99eeeb..30e5a3eee2 100644 --- a/apps/codecs/libcook/cook_fixpoint.h +++ b/apps/codecs/libcook/cook_fixpoint.h @@ -165,15 +165,14 @@ static void scalar_dequant_math(COOKContext *q, int index, * @param mlt_tmp pointer to temporary storage space */ #include "../lib/mdct_lookup.h" -#include "../lib/mdct2.h" static inline void imlt_math(COOKContext *q, FIXP *in) { const int n = q->samples_per_channel; const int step = 2 << (10 - av_log2(n)); int i = 0, j = 0; - - mdct_backward(2 * n, in, q->mono_mdct_output); + + ff_imdct_calc(q->mdct_nbits, q->mono_mdct_output, in); do { FIXP tmp = q->mono_mdct_output[i]; |