[Speex-dev] ARM w/ assembly & fixed point crash
Jean-Marc Valin
Jean-Marc.Valin at USherbrooke.ca
Wed Sep 29 20:09:58 PDT 2004
Hi Chris,
Actually, I should rename this option (ARM_ASM), since it is not generic ARM
instructions, but rather part of the 5E architecture and above. That's probably
your problem.
Jean-Marc
Selon "Zimman, Chris" <czimman at bloomberg.com>:
> I've targeted Speex to run under eCos with Thumb interworking using
> arm-elf-gcc 3.3.3
>
> I'd written a small test case to verifiy the operation:
>
> #include <speex/speex.h>
>
> void
> speex_test(void)
> {
> SpeexBits bits;
> unsigned int frame_size;
> void *enc_state;
> float *speex_frame;
> cyg_uint64 t1, t2;
> int i;
>
> speex_frame = (float *)0x00030000; /* Address of Speex data */
>
> speex_bits_init(&bits);
>
> printf("Initializing Speex encoder...");
> enc_state = speex_encoder_init(&speex_nb_mode);
> printf("done\n");
>
> printf("Retreiving frame size...");
> speex_encoder_ctl(enc_state, SPEEX_GET_FRAME_SIZE, &frame_size);
> printf("frame size is %d bytes\n", frame_size);
>
> printf("Encoding...\n");
> for(i = 0; i < 100; i++) {
> t1 = cyg_current_time();
> speex_encode(enc_state, speex_frame, &bits);
> t2 = cyg_current_time();
> speex_frame += (frame_size / sizeof(speex_frame));
> printf("Frame: %d (%lld ticks)\n", i, (t2 - t1));
> }
> printf("\n");
>
> speex_bits_destroy(&bits);
> speex_encoder_destroy(enc_state);
>
> return 0;
> }
>
> Compiling with -DFIXED_POINT, or -DFIXED_POINT/-DFIXED_ARM it works
> totally fine (in ARM or Thumb mode). Compiling with either of these and
> -DARM_ASM seems to cause it to crash.
>
> (gdb) where
> #0 0x0004b324 in MULT16_16 (x=0, y=1310) at fixed_arm.h:57
> #1 0x00044284 in nb_encode (state=0x86df8, vin=0x7f798, bits=0x7fce4)
> at ../src/nb_celp.c:262
> #2 0x00053b28 in speex_encode (state=0x86df8, in=0x30000, bits=0x7fce4)
> at ../src/speex.c:104
> #3 0x0004204c in speex_test (argc=0 '\0', argv=0x81e00) at speex.c:35
> #4 0x000417c8 in shelltask (param=0x0) at shelltask.c:143
> #5 0x000414a8 in shell (data=0) at shell.c:84
>
> Has anyone else successfully used the ARM_ASM code?
>
> Thanks
>
> --Chris
> _______________________________________________
> Speex-dev mailing list
> Speex-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/speex-dev
>
>
More information about the Speex-dev
mailing list