<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=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";
        mso-fareast-language:EL;}
span.hlkeyword
        {mso-style-name:hl_keyword;}
span.hlidentifier
        {mso-style-name:hl_identifier;}
span.hlnumeric
        {mso-style-name:hl_numeric;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
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="EL" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi all,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Playing with mod_opus came up with the following.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I am trying to recompile the codec with 8Khz and 40ms ptime. I am not familiar with the codec internals and not really sure what parameters should I change…<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">In mod_opus.c :<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Line 59:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";mso-fareast-language:EL">int bitrate_bps = codec->implementation->bits_per_second;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";mso-fareast-language:EL"> int use_vbr = 1;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";mso-fareast-language:EL"> int complexity = 10;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";mso-fareast-language:EL"> int use_inbandfec = 1;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";mso-fareast-language:EL"> int use_dtx = 1;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";mso-fareast-language:EL"> int bandwidth = OPUS_BANDWIDTH_FULLBAND;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";mso-fareast-language:EL"> </span><span style="font-size:10.0pt;font-family:"Courier New";mso-fareast-language:EL">int err;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";mso-fareast-language:EL"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";mso-fareast-language:EL">I suppose that the bandwidth must be changed to OPUS_BANDWIDTH_NARROWBAND and use_vbr=0 and I haven’t found yet whether the FEC parameter is passed
to opus encoder.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";mso-fareast-language:EL"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";mso-fareast-language:EL">And in Line 184 , I think the following parameters must be changed<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";mso-fareast-language:EL"><o:p> </o:p></span></p>
<pre><span lang="EN-US"> </span><span class="hlidentifier"><span lang="EN-US">switch_codec_interface_t</span></span><span lang="EN-US"> *</span><span class="hlidentifier"><span lang="EN-US">codec_interface</span></span><span lang="EN-US">;<o:p></o:p></span></pre>
<pre><span lang="EN-US"> <span class="hlkeyword">int</span> </span><span class="hlidentifier"><span lang="EN-US">samples</span></span><span lang="EN-US"> = <span class="hlnumeric">480</span>;<o:p></o:p></span></pre>
<pre><span lang="EN-US"> <span class="hlkeyword">int</span> </span><span class="hlidentifier"><span lang="EN-US">bytes</span></span><span lang="EN-US"> = <span class="hlnumeric">960</span>;<o:p></o:p></span></pre>
<pre><span lang="EN-US"> <span class="hlkeyword">int</span> </span><span class="hlidentifier"><span lang="EN-US">mss</span></span><span lang="EN-US"> = <span class="hlnumeric">10000</span>;<o:p></o:p></span></pre>
<pre><span lang="EN-US"> <span class="hlkeyword">int</span> </span><span class="hlidentifier"><span lang="EN-US">x</span></span><span lang="EN-US"> = <span class="hlnumeric">0</span>;<o:p></o:p></span></pre>
<pre><span lang="EN-US"> <span class="hlkeyword">int</span> </span><span class="hlidentifier"><span lang="EN-US">rate</span></span><span lang="EN-US"> = <span class="hlnumeric">48000</span>;<o:p></o:p></span></pre>
<pre><span lang="EN-US"> <span class="hlkeyword">int</span> </span><span class="hlidentifier"><span lang="EN-US">bits</span></span><span lang="EN-US"> = <span class="hlnumeric">32000</span>;<o:p></o:p></span></pre>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";mso-fareast-language:EL"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";mso-fareast-language:EL"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";mso-fareast-language:EL">Can you propose any values about these parameters to achieve 8khz with 40ms packet time?
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";mso-fareast-language:EL"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks for any help,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Dimosthenis<o:p></o:p></span></p>
</div>
</body>
</html>