Daniele Barzotti
2016-Aug-26 14:39 UTC
[opus] Using opus on ATMEL 32-bit RISC microcontroller
Hi, First of all, I'm quite new to opus. I'm trying to use fixed point opus on an ATMEL AT32UC3B0512. I added the opus source into mine sw tree, I trim off code I don't use (eg. arm, x86 folders) It compiles, but the generated image is too big to fit in the flash. Have I any way to reduce the source footprint? (Eg. throw away unecessary files, if there are any..) Thanks, Daniele.
Jean-Marc Valin
2016-Aug-26 15:25 UTC
[opus] Using opus on ATMEL 32-bit RISC microcontroller
Hi Daniele, On 26/08/16 10:39 AM, Daniele Barzotti wrote:> Have I any way to reduce the source footprint? > (Eg. throw away unecessary files, if there are any..)Well, the first question is whether you want encoding, decoding, or both. If there's one you don't need then you can remove that (unfortunately, there's no easy way right now). Even if you need both, then you can still possibly trim some of the encoder. If you know that you're always going to be encoding in SILK mode, or always in CELT-only mode, then you can remove the encoder part you don't need. OTOH, a decoder implementation has to be complete. Other than that, there's a --disable-float-api configure flag (corresponding to DISABLE_FLOAT_API in the code) that makes it possible to shave a few kB off the image by dumping all support for floating-point. There's also a SMALL_FOOTPRINT macro that you can define that will make the code a little smaller. Cheers, Jean-Marc
Daniele Barzotti
2016-Aug-26 15:40 UTC
[opus] Using opus on ATMEL 32-bit RISC microcontroller
Hi Jean-Marc, thanks a lot for your reply.> Well, the first question is whether you want encoding, decoding, or > both. If there's one you don't need then you can remove that > (unfortunately, there's no easy way right now).You're right! I forgot to say that I need only the encoder side (and only for voice). My application have to acquire a 16bit 8KHz PCM stream and save a compressed audio into a flash. (And here I have another little question... My flash size is 8Mb only and I have to be able to store in it 8 hours of voice, do you think opus shrink the stream enoguht?)> If you know that > you're always going to be encoding in SILK mode, or always in CELT-only > mode, then you can remove the encoder part you don't need.Ok, I think this is my case (if I'm not wrong) so, which you suggest to use?> Other than that, there's a --disable-float-api configure flag > (corresponding to DISABLE_FLOAT_API in the code) that makes it possible > to shave a few kB off the image by dumping all support for > floating-point.Since I'm using FIXED_POINT, I have to pass also --disable-float-api?> There's also a SMALL_FOOTPRINT macro that you can define > that will make the code a little smaller.Thanks I will give a try! Cheers, Daniele.