Hi all, I've got a 400MHz XScale-PXA255 board, and I want to stream voice from it over a network connection at 28.8baud. This calls for a capable voice encoder which can encode at about 24kbps. I was damn happy when I found Speex and said goodbye to MP3 :) However, i'm still a long way from realtime encoding using speexenc, is this possible? Using the fixed point math option in 1.1.1 (the XScale has no floating point unit), and compiling with CFLAGS="-O3 -funroll-loops -ffast-math", I get the following: time speexenc -u --quality 0 --abr 28 --comp 1 test.wav test.spx Warning: Speex is only optimized for 8, 16 and 32 kHz. It will still work at 44100 Hz but your mileage may vary Encoding 44100 Hz audio using ultra-wideband (sub-band CELP) mode (mono) real 0m42.345s user 0m7.660s sys 0m34.690s <p>The input file is 44.1KHz, 32bit mono, but I would be perfectly happy to use 32KHz, 16bit, if that would make any impact on speed? Any help would be much appreciated. Thanks, MAL --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'speex-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Hi, I have replaced most (but not all) of the float operations by integer operations, but it seems like the remaining ones take a long long time when emulated in kernel space (hence high system time). The other problem is that I don't have access to an ARM-based device (anyone wants to send me one?), so I'm doing all this blind... If you'd like to help, it can also accelerate things. The other thing is that you're probably pushing a bit too much with 44.1 kHz, which would probably require around 250 MIPS even with the fixed-point completed. It could probably run in real-time but it would take lots of CPU and require asm optimizations. I suggest you try something like 16 kHz. I'm sure the quality will still be enough for you (much better than MP3 at 24 kbps anyway :) Last thing, can you try the code that's in CVS right now? I removed many float ops since 1.1.1, so it may already work better. Jean-Marc <p>Le jeu 06/11/2003 à 10:29, MAL a écrit :> Hi all, > > I've got a 400MHz XScale-PXA255 board, and I want to stream voice from > it over a network connection at 28.8baud. This calls for a capable > voice encoder which can encode at about 24kbps. I was damn happy when I > found Speex and said goodbye to MP3 :) > > However, i'm still a long way from realtime encoding using speexenc, is > this possible? > > Using the fixed point math option in 1.1.1 (the XScale has no floating > point unit), and compiling with CFLAGS="-O3 -funroll-loops -ffast-math", > I get the following: > > time speexenc -u --quality 0 --abr 28 --comp 1 test.wav test.spx > Warning: Speex is only optimized for 8, 16 and 32 kHz. It will still > work at 44100 Hz but your mileage may vary > Encoding 44100 Hz audio using ultra-wideband (sub-band CELP) mode (mono) > > real 0m42.345s > user 0m7.660s > sys 0m34.690s > > > The input file is 44.1KHz, 32bit mono, but I would be perfectly happy to > use 32KHz, 16bit, if that would make any impact on speed? > > Any help would be much appreciated. > > Thanks, > MAL > > --- >8 ---- > List archives: http://www.xiph.org/archives/ > Ogg project homepage: http://www.xiph.org/ogg/ > To unsubscribe from this list, send a message to 'speex-dev-request@xiph.org' > containing only the word 'unsubscribe' in the body. No subject is needed. > Unsubscribe messages sent to the list will be ignored/filtered.-- Jean-Marc Valin, M.Sc.A., ing. jr. LABORIUS (http://www.gel.usherb.ca/laborius) Université de Sherbrooke, Québec, Canada -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 190 bytes Desc: Ceci est une partie de message numériquement signée Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20031106/15f33e25/signature-0001.pgp
Jean-Marc Valin wrote:> Hi, > > I have replaced most (but not all) of the float operations by integer > operations, but it seems like the remaining ones take a long long time > when emulated in kernel space (hence high system time). The other > problem is that I don't have access to an ARM-based device (anyone wants > to send me one?), so I'm doing all this blind... If you'd like to help, > it can also accelerate things. > > The other thing is that you're probably pushing a bit too much with 44.1 > kHz, which would probably require around 250 MIPS even with the > fixed-point completed. It could probably run in real-time but it would > take lots of CPU and require asm optimizations. I suggest you try > something like 16 kHz. I'm sure the quality will still be enough for you > (much better than MP3 at 24 kbps anyway :) > > Last thing, can you try the code that's in CVS right now? I removed many > float ops since 1.1.1, so it may already work better.Current CVS, on a 16kHz, 16 bit, mono, 60 second sample: # time speexenc -w --quality 0 --abr 28800 --comp 0 -V test-16kHz-60sec.wav test-16kHz-60sec.spx Encoding 16000 Hz audio using wideband (sub-band CELP) mode (mono) Bitrate is use: 35800 bps (average 28564 bps) real 3m39.017s user 1m29.130s sys 2m0.910s I got the usage of --abr wrong before, (28 = 28 bits per second :) I'm also assuming quality=0/comp=0 produces a reasonable output. 3 mins, 39 seconds is still a way off realtime, for a 60 second clip, but it's a lot closer than 1.1.1 got. What still worries me though, is that even if I forget the 2 mins spent in the kernel, emulating the floating point, there's 1 min 29 secs of userspace time, which is still greater than 60 secs clip. Are compiler optimisations going to shave off those 29 (or more) secs? My current configure command is: CFLAGS="-O3 -funroll-loops -ffast-math" CC=arm-linux-gcc CPP=arm-linux-cpp LD=arm-linux-ld RANLIB=arm-linux-ranlib STRIP=arm-linux-strip ./autogen.sh --host=arm-linux --prefix=/usr --with-ogg-dir=/opt/arcom/arm-linux --with-ogg-includes=/opt/arcom/arm-linux/include --with-ogg-lib=/opt/arcom/arm-linux/lib --enable-fixed-point I will of course try without ffast-math and funroll-loops, as they can decrease speed in some circumstances, but i'm open for further suggestions. The machine it's running on has an XScale-PXA255 processor at 400MHz, with a 200MHz bus. Regards, MAL --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'speex-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
On Thursday, November 06, 2003 4:29 PM [GMT+1=CET], MAL <mal@komcept.com> wrote:> Warning: Speex is only optimized for 8, 16 and 32 kHz. It will still > work at 44100 Hz but your mileage may varyJean-Marc, this message reminded me, would you please elaborate on the meaning of this error message? What exactly are the cons of using Speex for 44.1Khz files? I'm mainly interested in quality, and a little also in decompression speed. For instance, would you suggest me to scale down my files to 32khz and then raise -q parameter a little, as a better balance? Thanks Giovanni Bajo <p>--- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'speex-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
>>>>> "Jean-Marc" == Jean-Marc Valin <Jean-Marc.Valin@USherbrooke.ca> writes:Jean-Marc> I don't have access to an ARM-based device (anyone wants to Jean-Marc> send me one?), so I'm doing all this blind... HP has ipaqs available for login via: ssh -C guest@ipaq1.handhelds.org once in, mkdir a dir in ~guest/ of your email address and do your work in there. ipaq1 is a 400 MHz XScale. ipaq2 through ipaq7 are sa1110 at 200 MHz. Each has an ide disk connected via pcmcia and mounts home over nfs from a central server. They have intimate linux, which is debian customized for the ipaqs. See http://handhelds.org/projects/skiffcluster.html for the details. -JimC (hoping i'm not being redundant with this post) --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'speex-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.