<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:"Calibri","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoPlainText">Thanks Jean-Marc,<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">I was able to get both encode and decode working the CC3220 device! But for bi-directional communication, I need decode and encode to occur in less time than the frame size I’m sending (20 ms).<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Currently decode takes 16~22 ms and encode is ~13 ms. What is the best way to try to reduce this time? Also, unsure why encode is taking less time than decode...<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">I've also noticed if I change my encoder to silk only, I get a Heap overflow... I have dynamically allocated a heap for the codec, got the size using the api and used encode init so that the memory is allocated to my created heap. I
have 30k currently in heap, since the return of get size was ~25 kB. This seems to happen when I change the application as well. :/<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Currently here is how I am setting up my encoder:<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"> <span style="color:#1F497D">int size = opus_encoder_get_size(1);<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="color:#1F497D"> sOpusEnc = Memory_alloc(OpusHeap,size,NULL,NULL);<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="color:#1F497D">//<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="color:#1F497D">// sOpusEnc = opus_encoder_create(16000,<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="color:#1F497D">// 1,<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="color:#1F497D">// OPUS_APPLICATION_VOIP, &i32error);<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="color:#1F497D"> i32error = opus_encoder_init(sOpusEnc, 16000, 1, OPUS_APPLICATION_RESTRICTED_LOWDELAY);<o:p></o:p></span></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="color:#1F497D"> opus_encoder_ctl(sOpusEnc, OPUS_SET_BITRATE(16000));<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="color:#1F497D"> opus_encoder_ctl(sOpusEnc, OPUS_SET_VBR(1));<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="color:#1F497D"> opus_encoder_ctl(sOpusEnc, OPUS_SET_VBR_CONSTRAINT(0));<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="color:#1F497D"> opus_encoder_ctl(sOpusEnc, OPUS_SET_COMPLEXITY(0));<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="color:#1F497D"> opus_encoder_ctl(sOpusEnc, OPUS_SET_INBAND_FEC(0));<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="color:#1F497D"> opus_encoder_ctl(sOpusEnc, OPUS_SET_FORCE_CHANNELS(1));//Mono<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="color:#1F497D"> opus_encoder_ctl(sOpusEnc, OPUS_SET_PACKET_LOSS_PERC(0));<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="color:#1F497D"> opus_encoder_ctl(sOpusEnc, OPUS_SET_LSB_DEPTH(16)<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="color:#1F497D"> );<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="color:#1F497D"> opus_encoder_ctl(sOpusEnc,<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="color:#1F497D"> OPUS_SET_EXPERT_FRAME_DURATION(OPUS_FRAMESIZE_20_MS));<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="color:#1F497D"> opus_encoder_ctl(sOpusEnc, OPUS_SET_FORCE_MODE(MODE_CELT_ONLY));<o:p></o:p></span></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Thanks again for your help!<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">VR<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">-----Original Message-----<br>
From: Jean-Marc Valin [mailto:jmvalin@jmvalin.ca] <br>
Sent: Tuesday, February 20, 2018 6:23 PM<br>
To: Rodriguez, Vince; opus@xiph.org<br>
Subject: Re: [EXTERNAL] Re: [opus] Developing OPUS on TI CC3220</p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">On 02/20/2018 06:48 PM, Rodriguez, Vince wrote:<o:p></o:p></p>
<p class="MsoPlainText">> I am trying to get the library to build without using the pseudostack
<o:p></o:p></p>
<p class="MsoPlainText">> define, and use either VAR_ARRAYS or ALLOC, but it seems the global
<o:p></o:p></p>
<p class="MsoPlainText">> stack is not defined.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Not sure what you mean here. If your compiler supports C99 VLAs, then by all means just define VAR_ARRAYS and you're good to go. If not, the second best option is alloca(), which you can use by defining USE_ALLOCA. If your compiler supports
alloca() and USE_ALLOCA doesn't work, then you may need to make minor tweaks to celt/stack_alloc.h. Do not use NONTHREADSAFE_PSEUDOSTACK unless all other options fail.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Cheers,<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"> Jean-Marc<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">> -----Original Message----- From: Jean-Marc Valin <o:p></o:p></p>
<p class="MsoPlainText">> [<a href="mailto:jmvalin@jmvalin.ca"><span style="color:windowtext;text-decoration:none">mailto:jmvalin@jmvalin.ca</span></a>] Sent: Tuesday, February 20, 2018 5:40 PM<o:p></o:p></p>
<p class="MsoPlainText">> To: Rodriguez, Vince; <a href="mailto:opus@xiph.org"><span style="color:windowtext;text-decoration:none">opus@xiph.org</span></a> Subject: [EXTERNAL] Re: [opus]
<o:p></o:p></p>
<p class="MsoPlainText">> Developing OPUS on TI CC3220<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> Hi Vince,<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> Normally, Opus should work fine on the CC3220, though real-time
<o:p></o:p></p>
<p class="MsoPlainText">> encoding may be a bit tight depending on what configuration you
<o:p></o:p></p>
<p class="MsoPlainText">> choose. You'll probably want to configure with --enable-fixed-point
<o:p></o:p></p>
<p class="MsoPlainText">> and --disable-float-api (or define FIXED_POINT and DISABLE_FLOAT_API
<o:p></o:p></p>
<p class="MsoPlainText">> if you don't use autoconf).<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> The encoder has a bunch of run-time settings that you may want to set,
<o:p></o:p></p>
<p class="MsoPlainText">> depending on your application. These include bitrate, complexity
<o:p></o:p></p>
<p class="MsoPlainText">> (probably a low setting for that that chip), and bitrate management
<o:p></o:p></p>
<p class="MsoPlainText">> (CBR/VBR/CVBR).<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> In the end, aside from the complexity requirements, you should need to
<o:p></o:p></p>
<p class="MsoPlainText">> do anything special to get Opus running on your chip.<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> Cheers,<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> Jean-Marc<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> On 02/20/2018 05:46 PM, Rodriguez, Vince wrote:<o:p></o:p></p>
<p class="MsoPlainText">>> I'm looking to try to port a Opus Decoder and Encoder onto the TI
<o:p></o:p></p>
<p class="MsoPlainText">>> CC3220SF (<a href="http://www.ti.com/product/CC3220"><span style="color:windowtext;text-decoration:none">http://www.ti.com/product/CC3220</span></a>) device. Currently, I have
<o:p></o:p></p>
<p class="MsoPlainText">>> successfully been able to get the decode working for a .ogg file
<o:p></o:p></p>
<p class="MsoPlainText">>> saved locally to the serial flash. My end goal is bidirectional audio
<o:p></o:p></p>
<p class="MsoPlainText">>> using OPUS between two devices. While looking into the documentation
<o:p></o:p></p>
<p class="MsoPlainText">>> for the Encoder, I was not sure what the best step forward would be
<o:p></o:p></p>
<p class="MsoPlainText">>> in trying to enable this streaming application.<o:p></o:p></p>
<p class="MsoPlainText">>> <o:p></o:p></p>
<p class="MsoPlainText">>> <o:p></o:p></p>
<p class="MsoPlainText">>> <o:p></o:p></p>
<p class="MsoPlainText">>> Can someone give me a little guidance on how to properly setup the
<o:p></o:p></p>
<p class="MsoPlainText">>> encoder for streaming applications, and if I need to do anything
<o:p></o:p></p>
<p class="MsoPlainText">>> special to ensure the encoder works correctly on an ARM M4 (not
<o:p></o:p></p>
<p class="MsoPlainText">>> Floating point) MCU?<o:p></o:p></p>
<p class="MsoPlainText">>> <o:p></o:p></p>
<p class="MsoPlainText">>> <o:p></o:p></p>
<p class="MsoPlainText">>> <o:p></o:p></p>
<p class="MsoPlainText">>> Thanks!<o:p></o:p></p>
<p class="MsoPlainText">>> <o:p></o:p></p>
<p class="MsoPlainText">>> <o:p></o:p></p>
<p class="MsoPlainText">>> <o:p></o:p></p>
<p class="MsoPlainText">>> *Vince Rodriguez*<o:p></o:p></p>
<p class="MsoPlainText">>> <o:p></o:p></p>
<p class="MsoPlainText">>> <o:p></o:p></p>
<p class="MsoPlainText">>> <o:p></o:p></p>
<p class="MsoPlainText">>> <o:p></o:p></p>
<p class="MsoPlainText">>> <o:p></o:p></p>
<p class="MsoPlainText">>> <o:p></o:p></p>
<p class="MsoPlainText">>> <o:p></o:p></p>
<p class="MsoPlainText">>> _______________________________________________ opus mailing list
<o:p></o:p></p>
<p class="MsoPlainText">>> <a href="mailto:opus@xiph.org"><span style="color:windowtext;text-decoration:none">opus@xiph.org</span></a>
<a href="http://lists.xiph.org/mailman/listinfo/opus"><span style="color:windowtext;text-decoration:none">http://lists.xiph.org/mailman/listinfo/opus</span></a><o:p></o:p></p>
<p class="MsoPlainText">>> <o:p></o:p></p>
</div>
</body>
</html>