From 42774d3128b91d5a37344cb40d56d3c4d147e5f2 Mon Sep 17 00:00:00 2001 From: Dave Hooper Date: Wed, 17 Feb 2010 00:49:53 +0000 Subject: 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 --- apps/codecs/libcook/cook.c | 1 + apps/codecs/libcook/cook.h | 1 + apps/codecs/libcook/cook_fixpoint.h | 5 ++--- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'apps/codecs/libcook') 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]; -- cgit v1.2.3