[opus] Porting to Cypress PSoC 4

Jean-Marc Valin jmvalin at jmvalin.ca
Thu Feb 16 09:22:13 UTC 2017


Hi Brian,

The first thing to check is whether your chip has a real multiplier, as
opposed to some 32-cycle hack. If you don't have that, forget about
encoding in real-time. If you have a decent multiplier (1-cycle or
3-cycle), then you're good so far.

In terms of RAM, I think 16 kB should be enough once you strip the stuff
you don't need, so I wouldn't worry about it too much for now. For an
encoder at 60 kb/s, you'll probably want to use CELT, which is cheaper
to encode. So you can essentially strip out all the stuff in the silk/
and src/ directories, and just keep the encoder part of the contents of
the celt/ directory.

The good thing is that at 60 kb/s for 16 kHz mono audio, you can take
all possible shortcuts and still get good quality. I would think that 48
MHz will be enough to run in real-time. The only question is how much
work it will take to optimize it to fit that budget. It's possible that
you'll be there right out of the box at complexity 0 or 1, or it's
possible you'll need to take a few extra shortcuts.

Cheers,

	Jean-Marc

On 15/02/17 10:45 AM, Brian Silverman wrote:
> Hi,
> 
> I'm looking a porting the Opus encoder (encoder only) to a Cypress PSoC
> 4 (a 32-bit ARM Cortex-M0 with very limited resources), and would like
> to know the feasibility of stripping down the encoder to fit.  I've been
> playing with the encoder configured with "--enable-fixed-point
> --disable-intrinsics".
> 
> The end result I'm trying to get to is encoding a single 16kHz 16-bit
> LPCM channel to fit into ~60kbps, and I'd like to encode in real-time or
> better.  The opus_demo compression with default setting is fantastic on
> my test audio - more than 12x, where I only need about 4x.  Hopefully
> that means I have plenty of room to tweak so I can fit it in my limited
> resources.
> 
> My resources:
> 
>   * 48MHz 32-bit ARM Cortex-M0
>   * 32k RAM (of which I probably on have 16-24k available)
>   * 256k ROM (of which I probably only have 128-196k available)
> 
> I have no doubt that I can fit the design in ROM - I've already tried
> ripping out the decoder, and a stripped build can fit in 160k.
> 
> But, on speed and RAM, any thoughts on the feasibility, or what I'd have
> to do to make this work? 
> 
> Brian
> 
> -- 
> -- 
> 
> Brian Silverman
> 
> Ready Set STEM
> 
> bri at readysetstem.com <mailto:bri at readysetstem.com>
> 
> 443-850-5351
> 
> 
> 
> _______________________________________________
> opus mailing list
> opus at xiph.org
> http://lists.xiph.org/mailman/listinfo/opus
> 


More information about the opus mailing list