Index: cook_fixpoint.h =================================================================== --- cook_fixpoint.h (revision 25992) +++ cook_fixpoint.h (working copy) @@ -43,6 +43,11 @@ #include "codeclib.h" #endif +#ifdef TEST +#include +#define av_log2(x) (int)log2f((float)x) +#endif /* TEST */ + /* cplscales was moved from cookdata_fixpoint.h since only * * cook_fixpoint.h should see/use it. */ static const FIXPU* cplscales[5] = { @@ -169,8 +174,13 @@ REAL_T *mdct_out = q->mono_mdct_output; REAL_T tmp; int i = 0, j = 0; - + +#if defined(ROCKBOX) ff_imdct_calc(q->mdct_nbits, q->mono_mdct_output, in); +#elif defined(TEST) + extern void mdct_backward(int n, int32_t *in, int32_t *out); + mdct_backward(2*n, in, q->mono_mdct_output); +#endif do { tmp = mdct_out[i]; Index: main.c =================================================================== --- main.c (revision 25992) +++ main.c (working copy) @@ -119,6 +119,7 @@ #ifdef DUMP_RAW_FRAMES char filename[15]; int fd_out; + int x = 0; #endif int32_t outbuf[2048]; uint16_t fs,sps,h; Index: Makefile.test =================================================================== --- Makefile.test (revision 25992) +++ Makefile.test (working copy) @@ -1,7 +1,7 @@ -CFLAGS = -Wall -O3 -I../lib -DTEST -D"DEBUGF=printf" -D"ROCKBOX_LITTLE_ENDIAN=1" -D"ICONST_ATTR=" -D"ICODE_ATTR=" +CFLAGS = -Wall -O3 -ggdb -std=c99 -I../lib -DTEST -D"DEBUGF=printf" -D"ROCKBOX_LITTLE_ENDIAN=1" -D"ICONST_ATTR=" -D"ICODE_ATTR=" OBJS = main.o ../lib/ffmpeg_bitstream.o cook.o ../librm/rm.o ../lib/mdct2.o ../lib/mdct_lookup.o cooktest: $(OBJS) - gcc -o cooktest $(OBJS) + gcc -o cooktest $(OBJS) -lm .c.o : $(CC) $(CFLAGS) -c -o $@ $< Index: cook.c =================================================================== --- cook.c (revision 25992) +++ cook.c (working copy) @@ -47,7 +47,9 @@ #include #include #include +#ifdef ROCKBOX #include "codeclib.h" +#endif #include "cook.h" #include "cookdata.h"