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.
By the way, that comes out to 2.2 Kb/s, assuming Daniele's 8Mb is really 8 MB. If it really is 8 megabits, then that's 0.28 Kb/s. - Larry On Fri, Aug 26, 2016 at 9:40 AM, Daniele Barzotti < daniele.barzotti at eurocomtel.com> wrote:> 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. > _______________________________________________ > opus mailing list > opus at xiph.org > http://lists.xiph.org/mailman/listinfo/opus >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xiph.org/pipermail/opus/attachments/20160826/ed3cad47/attachment.html>
Jean-Marc Valin
2016-Aug-26 16:02 UTC
[opus] Using opus on ATMEL 32-bit RISC microcontroller
On 26/08/16 11:40 AM, Daniele Barzotti wrote:> You're right! I forgot to say that I need only the encoder side (and > only for voice).Then you can remove all of the decoder. As for the encoder, it depends on the bitrate and sampling rate you want (more below).> My application have to acquire a 16bit 8KHz PCM stream and save a > compressed audio into a flash.Sounds like a job for SILK-only mode. In which case you can strip away all of CELT.> (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?)This is going to be a problem. Assuming you mean 8 mega*byte* (and not 8 megabit), that's still only 2 kilobit/second. Opus pretty much requires 8 kb/s, so 4 times what you have. The only codec I know that can do 2 kb/s with reasonable quality is codec2, and the implementation is floating point.> Since I'm using FIXED_POINT, I have to pass also --disable-float-api?Yes. The normal API has calls with both int and float, so if you compile with FIXED_POINT, the float calls do a conversion to int before using int internally. If you disable the float API, these functions are not compiled at all, saving a few bytes. Cheers, Jean-Marc
Hello Daniele It would be worthwhile to attach an external serial flash or USB thumb drive, if the intent is store data. This allows for far more flexibility in storage Regards Amit On Fri, Aug 26, 2016 at 11:02 AM, Jean-Marc Valin <jmvalin at jmvalin.ca> wrote:> On 26/08/16 11:40 AM, Daniele Barzotti wrote: > > You're right! I forgot to say that I need only the encoder side (and > > only for voice). > > Then you can remove all of the decoder. As for the encoder, it depends > on the bitrate and sampling rate you want (more below). > > > My application have to acquire a 16bit 8KHz PCM stream and save a > > compressed audio into a flash. > > Sounds like a job for SILK-only mode. In which case you can strip away > all of CELT. > > > (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?) > > This is going to be a problem. Assuming you mean 8 mega*byte* (and not 8 > megabit), that's still only 2 kilobit/second. Opus pretty much requires > 8 kb/s, so 4 times what you have. The only codec I know that can do 2 > kb/s with reasonable quality is codec2, and the implementation is > floating point. > > > Since I'm using FIXED_POINT, I have to pass also --disable-float-api? > > Yes. The normal API has calls with both int and float, so if you compile > with FIXED_POINT, the float calls do a conversion to int before using > int internally. If you disable the float API, these functions are not > compiled at all, saving a few bytes. > > Cheers, > > Jean-Marc > _______________________________________________ > opus mailing list > opus at xiph.org > http://lists.xiph.org/mailman/listinfo/opus >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xiph.org/pipermail/opus/attachments/20160826/e0a3d0fb/attachment-0001.html>