diff options
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) | |||
797 | 797 | ||
798 | /* Initialize variable relations */ | 798 | /* Initialize variable relations */ |
799 | q->numvector_size = (1 << q->log2_numvector_size); | 799 | q->numvector_size = (1 << q->log2_numvector_size); |
800 | q->mdct_nbits = av_log2(q->samples_per_channel)+1; | ||
800 | 801 | ||
801 | /* Generate tables */ | 802 | /* Generate tables */ |
802 | if (init_cook_vlc_tables(q) != 0) | 803 | 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 { | |||
63 | int num_vectors; | 63 | int num_vectors; |
64 | int bits_per_subpacket; | 64 | int bits_per_subpacket; |
65 | int cookversion; | 65 | int cookversion; |
66 | int mdct_nbits; /* is this the same as one of above? */ | ||
66 | /* states */ | 67 | /* states */ |
67 | int random_state; | 68 | int random_state; |
68 | 69 | ||
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, | |||
165 | * @param mlt_tmp pointer to temporary storage space | 165 | * @param mlt_tmp pointer to temporary storage space |
166 | */ | 166 | */ |
167 | #include "../lib/mdct_lookup.h" | 167 | #include "../lib/mdct_lookup.h" |
168 | #include "../lib/mdct2.h" | ||
169 | 168 | ||
170 | static inline void imlt_math(COOKContext *q, FIXP *in) | 169 | static inline void imlt_math(COOKContext *q, FIXP *in) |
171 | { | 170 | { |
172 | const int n = q->samples_per_channel; | 171 | const int n = q->samples_per_channel; |
173 | const int step = 2 << (10 - av_log2(n)); | 172 | const int step = 2 << (10 - av_log2(n)); |
174 | int i = 0, j = 0; | 173 | int i = 0, j = 0; |
175 | 174 | ||
176 | mdct_backward(2 * n, in, q->mono_mdct_output); | 175 | ff_imdct_calc(q->mdct_nbits, q->mono_mdct_output, in); |
177 | 176 | ||
178 | do { | 177 | do { |
179 | FIXP tmp = q->mono_mdct_output[i]; | 178 | FIXP tmp = q->mono_mdct_output[i]; |