summaryrefslogtreecommitdiff
path: root/apps/codecs/libcook
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libcook')
-rw-r--r--apps/codecs/libcook/cook.c1
-rw-r--r--apps/codecs/libcook/cook.h1
-rw-r--r--apps/codecs/libcook/cook_fixpoint.h5
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];