<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: G.726 encoding problem in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/G-726-encoding-problem/m-p/881741#M10285</link>
    <description>&lt;P&gt;&lt;FONT color="#0000ff"&gt;Hi there,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff"&gt;Could you clarify some points first?I need just better understand the communication scenario prior to dive into issue investigation. Sorry, for havingso many questions. See below, inlined into your text.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff"&gt;Vyacheslav, IPP speech coding &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#000000"&gt;[There is some strange noise when we listen to encoded signal on VoIP phone. We have 2 phones that produces same noise. ] &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff"&gt;Is a noise hearable on each side? Does each side run your Sipx implementation? Isit a noise mixedwith original signal or it is just anoise?If mixed it might be due packet losses as G726 has no PLC. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;[Phone to phone signal is clear.] &lt;FONT color="#0000ff"&gt;Do you mean a call with NOany codec involved?Or with a codec other than G726?Not IPP codec?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;[IPP encoding is reversible, so if we encode and decode back we get original signal. ]&lt;FONT color="#0000ff"&gt;Reversable offline? Outside of VoIPSipx softphonefor example inIPP speech codec command line sample? Or reversable in your Sipx VoIP, but with some noise?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;[When we decode signal from phone by IPP we also have noise.] &lt;FONT color="#0000ff"&gt;Do you usein this case G726 codec other thanIPPon transmitter? Btw, you have provided the code for encode, could you provide the code for decode also?&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;[- input signal is sine wave encoded in 16-bit integers (128000 bitrate, 16 bit/sample, 8000 samples/sec)] &lt;FONT color="#0000ff"&gt;Supposed togenerate byippsTone_Direct_16s? But, in the code it is commented out //status = ippsTone_Direct_16s&lt;/FONT&gt;&lt;FONT color="#0000ff"&gt;( (Ipp16s*)inputBuffer, inputBufferSize / 2, 32000, 0.125, &amp;amp;phase, IppHintAlgorithm::ippAlgHintAccurate );&lt;/FONT&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 29 May 2008 07:50:11 GMT</pubDate>
    <dc:creator>Vyacheslav_Baranniko</dc:creator>
    <dc:date>2008-05-29T07:50:11Z</dc:date>
    <item>
      <title>G.726 encoding problem</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/G-726-encoding-problem/m-p/881740#M10284</link>
      <description>We're using IPP 5.1 on VS2005 inside Sipx framework.&lt;BR /&gt;&lt;BR /&gt;We've added G.723 and G.729 codecs successfully but encountered problems with G.726. There is some strange noise when we listen to encoded signal on VoIP phone. We have 2 phones that produces same noise. Phone to phone signal is clear. IPP encoding is reversible, so if we encode and decode back we get original signal. When we decode signal from phone by IPP we also have noise.&lt;BR /&gt;&lt;BR /&gt;Some details about code below:&lt;BR /&gt;- we check 32000 bitrate&lt;BR /&gt;- input signal is sine wave encoded in 16-bit integers (128000 bitrate, 16 bit/sample, 8000 samples/sec)&lt;BR /&gt;&lt;BR /&gt;Encoder code is:&lt;BR /&gt;&lt;BR /&gt;#ifdef HAVE_IPP /* [ */&lt;BR /&gt;#define TEST_PRINT&lt;BR /&gt;#include "assert.h"&lt;BR /&gt;// APPLICATION INCLUDES&lt;BR /&gt;#include "mp/MpeIPPG726.h"&lt;BR /&gt;#include "mp/JB/JB_API.h"&lt;BR /&gt;#include "os/OsSysLog.h"&lt;BR /&gt;#include "os/OsSysLogFacilities.h"&lt;BR /&gt;#include "mp/netintask.h"&lt;BR /&gt;&lt;BR /&gt;#include &lt;G72X.H&gt;&lt;BR /&gt;&lt;BR /&gt;const MpCodecInfo MpeIPPG726::smCodecInfo16(&lt;BR /&gt;  SdpCodec::SDP_CODEC_G726_16, // codecType&lt;BR /&gt; "Intel IPP 5.1",       // codecVersion&lt;BR /&gt; false, // usesNetEq&lt;BR /&gt; 8000, // samplingRate&lt;BR /&gt; 16, // numBitsPerSample&lt;BR /&gt; 1, // numChannels&lt;BR /&gt; 80, // interleaveBlockSize&lt;BR /&gt; 16000, // bitRate&lt;BR /&gt; 80 * 2 * 8, // minPacketBits&lt;BR /&gt; 80 * 2 * 8, // avgPacketBits&lt;BR /&gt; 240 * 2 * 8, // maxPacketBits&lt;BR /&gt; 8, // numSamplesPerFrame&lt;BR /&gt;  &amp;amp;nb
sp;  FALSE,&lt;BR /&gt;    FALSE );           // VAD enabled &lt;BR /&gt;&lt;BR /&gt;const MpCodecInfo MpeIPPG726::smCodecInfo24(&lt;BR /&gt;  SdpCodec::SDP_CODEC_G726_24, // codecType&lt;BR /&gt; "Intel IPP 5.1",       // codecVersion&lt;BR /&gt; false, // usesNetEq&lt;BR /&gt; 8000, // samplingRate&lt;BR /&gt; 16, // numBitsPerSample&lt;BR /&gt; 1, // numChannels&lt;BR /&gt; 80, // interleaveBlockSize&lt;BR /&gt; 24000, // bitRate&lt;BR /&gt; 80 * 3 * 8, // minPacketBits&lt;BR /&gt; 80 * 3 * 8, // avgPacketBits&lt;BR /&gt; 240 * 3 * 8, // maxPacketBits&lt;BR /&gt; 8, // numSamplesPerFrame&lt;BR /&gt;    FALSE,&lt;BR /&gt;    FALSE );           // VAD enabled &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;const MpCodecInfo MpeIPPG726::smCodecInfo32(&lt;BR /&gt;  SdpCodec::SDP_CODEC_G726_32, //
 codecType&lt;BR /&gt; "Intel IPP 5.1",       // codecVersion&lt;BR /&gt; false, // usesNetEq&lt;BR /&gt; 8000, // samplingRate&lt;BR /&gt; 16, // numBitsPerSample&lt;BR /&gt; 1, // numChannels&lt;BR /&gt; 80, // interleaveBlockSize&lt;BR /&gt; 32000, // bitRate&lt;BR /&gt; 80 * 4 * 8, // minPacketBits&lt;BR /&gt; 80 * 4 * 8, // avgPacketBits&lt;BR /&gt; 240 * 4 * 8, // maxPacketBits&lt;BR /&gt; 8, // numSamplesPerFrame&lt;BR /&gt;    FALSE,&lt;BR /&gt;    FALSE );           // VAD enabled &lt;BR /&gt;&lt;BR /&gt;const MpCodecInfo MpeIPPG726::smCodecInfo40(&lt;BR /&gt;  SdpCodec::SDP_CODEC_G726_40, // codecType&lt;BR /&gt; "Intel IPP 5.1",       // codecVersion&lt;BR /&gt; false, // usesNetEq&lt;BR /&gt; 8000,&amp;nbsp;
; // samplingRate&lt;BR /&gt; 16, // numBitsPerSample&lt;BR /&gt; 1, // numChannels&lt;BR /&gt; 80, // interleaveBlockSize&lt;BR /&gt; 40000, // bitRate&lt;BR /&gt; 80 * 5 * 8, // minPacketBits&lt;BR /&gt; 80 * 5 * 8, // avgPacketBits&lt;BR /&gt; 240 * 5 * 8, // maxPacketBits&lt;BR /&gt; 8, // numSamplesPerFrame&lt;BR /&gt;    FALSE,&lt;BR /&gt;    FALSE );           // VAD enabled &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;//LoadedCodec MpeIPPG726::codec;&lt;BR /&gt;&lt;BR /&gt;MpeIPPG726::~MpeIPPG726()&lt;BR /&gt;{&lt;BR /&gt; freeEncode();&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;OsStatus MpeIPPG726::initEncode(void)&lt;BR /&gt;{&lt;BR /&gt; int lCallResult;&lt;BR /&gt;&lt;BR /&gt;  ippStaticInit(); &lt;BR /&gt;  strcpy((char*)codec.codecName,"IPP_G726");&lt;BR /&gt;  codec.lIsVad = 0;&lt;BR /&gt;&lt;BR /&gt;  /*Load codec by name from command line*/&lt;BR /&gt;  lCallResult = LoadUSCCodecByName(&amp;amp;codec,NULL);&lt;BR /&gt;  if(lCallResult&amp;lt;0)&lt;BR /&gt;   return OS_FAILED;&lt;BR /&gt;&lt;BR /&gt; /*Get USC codec params*/&lt;BR /&gt;  lCallResult = USCCodecAllocInfo(&amp;amp;codec.uscParams);&lt;BR /&gt;  if(lCallResult&amp;lt;0)&lt;BR /&gt;   return OS_FAILED;&lt;BR /&gt;&lt;BR /&gt;  lCallResult = USCCodecGetInfo(&amp;amp;codec.uscParams);&lt;BR /&gt;  if(lCallResult&amp;lt;0)&lt;BR /&gt;  &amp;amp;n
bsp; return OS_FAILED;&lt;BR /&gt;&lt;BR /&gt; /*Get its supported format details*/&lt;BR /&gt;/*  lCallResult = GetUSCCodecParamsByFormat(&amp;amp;codec,BY_NAME,NULL);&lt;BR /&gt;   if(lCallResult&amp;lt;0)&lt;BR /&gt;    return OS_FAILED;*/&lt;BR /&gt;&lt;BR /&gt; /*Set params for encode*/&lt;BR /&gt;  codec.uscParams.pInfo-&amp;gt;params.direction = 0;&lt;BR /&gt;  codec.uscParams.pInfo-&amp;gt;params.law = 0;&lt;BR /&gt;  codec.uscParams.pInfo-&amp;gt;params.modes.vad = 0; &lt;BR /&gt;  codec.uscParams.nChannels = 1;&lt;BR /&gt;  codec.uscParams.pInfo-&amp;gt;params.modes.bitrate = getInfo()-&amp;gt;getBitRate();&lt;BR /&gt;&lt;BR /&gt; /*Alloc memory for the codec*/&lt;BR /&gt;  lCallResult = USCCodecAlloc(&amp;amp;codec.uscParams, NULL);&lt;BR /&gt;  if(lCallResult&amp;lt;0)&lt;BR /&gt;   return OS_FAILED;&lt;BR /&gt;&lt;BR /&gt; /*Init decoder*/&lt;BR /&gt;  lCallResult = USCEncoderInit(&amp;amp;codec.uscParams, NULL);&lt;BR /&gt;  if(lCallResult&amp;lt;0)&lt;BR /&gt;   return OS_FAILED;&lt;BR /&gt;&lt;BR /&gt;  // input buffer&lt;BR /&gt;  bufferCount = 0;&lt;BR /&gt;  // bytes per encoded packet&lt;BR /&gt;  inputBufferSize = getInfo()-&amp;gt;getMaxPacketBits() / 8 * (codec.uscParams.pInfo-&amp;gt;params.framesize * codec.uscParams.pInfo-&amp;gt;pcmType.sample_frequency / codec.uscParams.pInfo-&amp;gt;params.modes.bitrate );&lt;BR /&gt;  inputBuffer = (char *)ippsMalloc_8s( inputBufferSize );&lt;BR /&gt;  ippsSet_8u( 0, (unsigned char *)inputBuffer, inputBufferSize );&lt;BR /&gt;&lt;BR /&gt;  return OS_SUCCESS;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;OsStatus MpeIPPG726::freeEncode(void)&lt;BR /&gt;{&lt;BR /&gt;  /*Free codec memory*/&lt;BR /&gt; USCFree(&amp;amp;codec.uscParams);&lt;BR /&gt;&lt;BR /&gt; ippsFree( inputBuffer );&lt;BR /&gt;&lt;BR /&gt; return OS_SUCCESS;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;OsStatus MpeIPPG726::encode(const short* pAudioSamples,&lt;BR /&gt; const int numSamples,&lt;BR /&gt; int&amp;amp; rSamplesConsumed,&lt;BR /&gt; unsigned char* pCodeBuf,&lt;BR /&gt; const int bytesLeft,&lt;BR /&gt; int&amp;amp; rSizeInBytes,&lt;BR /&gt; UtlBoolean&amp;amp; sendNow,&lt;BR /&gt; MpAudioBuf::SpeechType&amp;amp; rAudioCategory)&lt;BR /&gt;{&lt;BR /&gt; int inputBuffers = inputBufferSize / (numSamples * sizeof(MpAudioSample));&lt;BR /&gt;&lt;BR /&gt; // codec encodes 8 bytes to 2/3/4/5 (depending on rate)&lt;BR /&gt;&lt;BR /&gt; if (bufferCount == (inputBuffers - 1) )&lt;BR /&gt; {&lt;BR /&gt;  ippsCopy_8u((unsigned char *) pAudioSamples, (unsigned char *)inputBuffer+bufferCount*numSamples*sizeof(MpAudioSample), numSamples*sizeof(MpAudioSample)); &lt;BR /&gt;&lt;BR /&gt;  float phase = 0;&lt;BR /&gt;  IppStatus status;&lt;BR /&gt;  //status = ippsTone_Direct_16s( (Ipp16s*)inputBuffer, inputBufferSize / 2, 32000, 0.125, &amp;amp;phase, IppHintAlgorithm::ippAlgHintAccurate );&lt;BR /&gt;&lt;BR /&gt;  char * outputBuffer = (char *)ippsMalloc_8u(bytesLeft);&lt;BR /&gt;  ippsSet_8u(0, (unsigned char *)outputBuffer, bytesLeft);&lt;BR /&gt;&lt;BR /&gt;  int frmlen, infrmLen, FrmDataLen;&lt;BR /&gt;  int inLeft = inputBufferSize, outRight = 0;&lt;BR /&gt;&lt;BR /&gt;  USC_PCMStream in;&lt;BR /&gt;  USC_Bitstream out;&lt;BR /&gt;&lt;BR /&gt;  while( inLeft &amp;gt; 0 )&lt;BR /&gt;  {&lt;BR /&gt;   out.pBuffer = outputBuffer + outRight; &lt;BR /&gt;&lt;BR /&gt;   in.bitrate = codec.uscParams.pInfo-&amp;gt;params.modes.bitrate;&lt;BR /&gt;   in.pcmType.bitPerSample = 16;&lt;BR /&gt;   in.pcmType.sample_frequency = 8000;&lt;BR /&gt;   in.pBuffer = inputBuffer + inputBufferSize - inLeft;&lt;BR /&gt;   in.nbytes = codec.uscParams.pInfo-&amp;gt;params.framesize;&lt;BR /&gt;&lt;BR /&gt;   // Encode one frame&lt;BR /&gt;   FrmDataLen = USCCodecEncode( &amp;amp;codec.uscParams, &amp;amp;in, &amp;amp;out, 0 );&lt;BR /&gt;   assert( FrmDataLen &amp;gt; 0 );&lt;BR /&gt;   if(FrmDataLen &amp;lt; 0)&lt;BR /&gt;    return OS_FAILED;&lt;BR /&gt;&lt;BR /&gt;   inLeft -= FrmDataLen;&lt;BR /&gt;   outRight += out.nbytes;&lt;BR /&gt;  }&lt;BR /&gt;&lt;BR /&gt;  ippsSet_8u(0,pCodeBuf, bytesLeft); &lt;BR /&gt;  if (outRight &amp;lt;= bytesLeft)&lt;BR /&gt;  {&lt;BR /&gt;   ippsCopy_8u((unsigned char *) outputBuffer, (unsigned char *)pCodeBuf, outRight);
 &lt;BR /&gt;   rSizeInBytes = outRight;&lt;BR /&gt;   //sendNow = TRUE;&lt;BR /&gt;  }&lt;BR /&gt;&lt;BR /&gt;  rAudioCategory = MpAudioBuf::MP_SPEECH_ACTIVE;&lt;BR /&gt;  bufferCount = 0;&lt;BR /&gt;  ippsSet_8u(0, (unsigned char *)inputBuffer, inputBufferSize);&lt;BR /&gt;&lt;BR /&gt;  ippsFree( outputBuffer );&lt;BR /&gt; }&lt;BR /&gt; else&lt;BR /&gt; {&lt;BR /&gt;  ippsCopy_8u((unsigned char *) pAudioSamples, (unsigned char *)inputBuffer+bufferCount*numSamples*sizeof(MpAudioSample), numSamples*sizeof(MpAudioSample)); &lt;BR /&gt;  bufferCount++;&lt;BR /&gt;&lt;BR /&gt;  sendNow = FALSE;&lt;BR /&gt;  rAudioCategory = MpAudioBuf::MP_SPEECH_UNKNOWN;&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; rSamplesConsumed = numSamples;&lt;BR /&gt;&lt;BR /&gt; return OS_SUCCESS;&lt;BR /&gt;}&lt;BR /&gt;#endif /* HAVE_IPP ] */&lt;BR /&gt;#undef TEST_PRINT&lt;BR /&gt;&lt;BR /&gt;&lt;/G72X.H&gt;</description>
      <pubDate>Wed, 28 May 2008 15:32:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/G-726-encoding-problem/m-p/881740#M10284</guid>
      <dc:creator>em</dc:creator>
      <dc:date>2008-05-28T15:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: G.726 encoding problem</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/G-726-encoding-problem/m-p/881741#M10285</link>
      <description>&lt;P&gt;&lt;FONT color="#0000ff"&gt;Hi there,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff"&gt;Could you clarify some points first?I need just better understand the communication scenario prior to dive into issue investigation. Sorry, for havingso many questions. See below, inlined into your text.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff"&gt;Vyacheslav, IPP speech coding &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#000000"&gt;[There is some strange noise when we listen to encoded signal on VoIP phone. We have 2 phones that produces same noise. ] &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff"&gt;Is a noise hearable on each side? Does each side run your Sipx implementation? Isit a noise mixedwith original signal or it is just anoise?If mixed it might be due packet losses as G726 has no PLC. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;[Phone to phone signal is clear.] &lt;FONT color="#0000ff"&gt;Do you mean a call with NOany codec involved?Or with a codec other than G726?Not IPP codec?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;[IPP encoding is reversible, so if we encode and decode back we get original signal. ]&lt;FONT color="#0000ff"&gt;Reversable offline? Outside of VoIPSipx softphonefor example inIPP speech codec command line sample? Or reversable in your Sipx VoIP, but with some noise?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;[When we decode signal from phone by IPP we also have noise.] &lt;FONT color="#0000ff"&gt;Do you usein this case G726 codec other thanIPPon transmitter? Btw, you have provided the code for encode, could you provide the code for decode also?&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;[- input signal is sine wave encoded in 16-bit integers (128000 bitrate, 16 bit/sample, 8000 samples/sec)] &lt;FONT color="#0000ff"&gt;Supposed togenerate byippsTone_Direct_16s? But, in the code it is commented out //status = ippsTone_Direct_16s&lt;/FONT&gt;&lt;FONT color="#0000ff"&gt;( (Ipp16s*)inputBuffer, inputBufferSize / 2, 32000, 0.125, &amp;amp;phase, IppHintAlgorithm::ippAlgHintAccurate );&lt;/FONT&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 May 2008 07:50:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/G-726-encoding-problem/m-p/881741#M10285</guid>
      <dc:creator>Vyacheslav_Baranniko</dc:creator>
      <dc:date>2008-05-29T07:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: G.726 encoding problem</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/G-726-encoding-problem/m-p/881742#M10286</link>
      <description>Thanks for reply!&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#000000"&gt;[There is some strange noise when we listen to encoded signal on VoIP phone. We have 2 phones that produces same noise. ] &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff"&gt;Is
a noise hearable on each side? Does each side run your Sipx
implementation? Isit a noise mixedwith original signal or it is just
anoise?If mixed it might be due packet losses as G726 has no PLC.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#800080"&gt;When we call from SIPX to hardware phone we hear noise on both ends. Noise is mixed with original signal.&lt;/FONT&gt;&lt;BR /&gt; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;[Phone to phone signal is clear.] &lt;FONT color="#0000ff"&gt;Do you mean a call with NOany codec involved?Or with a codec other than G726?Not IPP codec?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#800080"&gt;When we call from one HW phone to another there is no noise.&lt;/FONT&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;[IPP encoding is reversible, so if we encode and decode back we get original signal. ]&lt;FONT color="#0000ff"&gt;Reversable
offline? Outside of VoIPSipx softphonefor example inIPP speech codec
command line sample? Or reversable in your Sipx VoIP, but with some
noise?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#800080"&gt;If we call from onr sipx to another we hear no noise.&lt;/FONT&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;
[When we decode signal from phone by IPP we also have noise.] &lt;FONT color="#0000ff"&gt;Do
you usein this case G726 codec other thanIPPon transmitter? Btw, you
have provided the code for encode, could you provide the code for
decode also? &lt;BR /&gt;&lt;FONT color="#800080"&gt;&lt;BR /&gt;Of course hw phone doesn't use IPP&lt;/FONT&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;BR /&gt;[- input signal is sine wave encoded in 16-bit integers (128000 bitrate, 16 bit/sample, 8000 samples/sec)] &lt;FONT color="#0000ff"&gt;Supposed togenerate byippsTone_Direct_16s? But, in the code it is commented out //status = ippsTone_Direct_16s&lt;/FONT&gt;&lt;FONT color="#0000ff"&gt;( (Ipp16s*)inputBuffer, inputBufferSize / 2, 32000, 0.125, &amp;amp;phase, IppHintAlgorithm::ippAlgHintAccurate ); &lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;data is generated outside but we've tested ippsTone_Direct to be sure that data isn't corrupted before entering this function&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#800080"&gt;So in general we've following situation:&lt;BR /&gt;- phone to phone is ok&lt;BR /&gt;- ipp to ipp is ok&lt;BR /&gt;- ipp to phone = noise&lt;BR /&gt;&lt;BR /&gt;It seems that whether IPP's coder is different from phone one which would be strange or we use IPP in wrong way&lt;BR /&gt;&lt;BR /&gt;There is decoder:&lt;BR /&gt;&lt;BR /&gt;#ifdef HAVE_IPP /* [ */&lt;BR /&gt;#ifdef __pingtel_on_posix__ /* [ */&lt;BR /&gt;#include &lt;SYS&gt;&lt;BR /&gt;#include &lt;NETINET&gt;&lt;BR /&gt;#endif /* __pingtel_on_posix__ ] */&lt;BR /&gt;&lt;BR /&gt;// APPLICATION INCLUDES&lt;BR /&gt;#include "mp/MpConnection.h"&lt;BR /&gt;#include "mp/MpdIPPG726.h"&lt;BR /&gt;#include "mp/JB/JB_API.h"&lt;BR /&gt;#include "mp/MprDejitter.h"&lt;BR /&gt;#include "os/OsSysLog.h"&lt;BR /&gt;#include "os/OsSysLogFacilities.h"&lt;BR /&gt;&lt;BR /&gt;#define G726_PATTERN_LENGTH 80&lt;BR /&gt;&lt;BR /&gt;const MpCodecInfo MpdIPPG726::smCodecInfo(&lt;BR /&gt; SdpCodec::SDP_CODEC_G726_32, // codecType&lt;BR /&gt; "Intel IPP 5.1",       // codecVersion&lt;BR /&gt; false,&amp;amp;n
bsp; // usesNetEq&lt;BR /&gt; 8000, // samplingRate&lt;BR /&gt; 16, // numBitsPerSample (not used)&lt;BR /&gt; 1, // numChannels&lt;BR /&gt; 80, // interleaveBlockSize&lt;BR /&gt; 32000, // bitRate&lt;BR /&gt; 160, // minPacketBits&lt;BR /&gt; 160, // avgPacketBits&lt;BR /&gt; 192, // maxPacketBits&lt;BR /&gt; 80); // numSamplesPerFrame&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; LoadedCodec MpdIPPG726::codec;&lt;BR /&gt;&lt;BR /&gt;MpdIPPG726::MpdIPPG726(int payloadType)&lt;BR /&gt;: MpDecoderBase(payloadType, &amp;amp;smCodecInfo)&lt;BR /&gt;{ &lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;MpdIPPG726::~MpdIPPG726()&lt;BR /&gt;{&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;OsStatus MpdIPPG726::initDecode(MpConnection* pConnection)&lt;BR /&gt;{&lt;BR /&gt; int lCallResult;&lt;BR /&gt;&lt;BR /&gt; //Get JB pointer&lt;BR /&gt; if(pConnection != NULL) { &lt;BR /&gt;&lt;BR /&gt;   ippStaticInit();&lt;BR /&gt;   mpJBState = pConnection-&amp;gt;getJBinst();&lt;BR /&gt;   &lt;BR /&gt;   switch (getPayloadType())&lt;BR /&gt;   {&lt;BR /&gt;    case SdpCodec::SDP_CODEC_G726_16: &lt;BR /&gt;    case SdpCodec::SDP_CODEC_G726_24: &lt;BR /&gt;    case SdpCodec::SDP_CODEC_G726_32: &lt;BR /&gt;    case SdpCodec::SDP_CODEC_G726_40: &lt;BR /&gt;     /*
 Apply codec name and VAD to codec definition structure*/&lt;BR /&gt;     strcpy((char*)codec.codecName,"IPP_G726");&lt;BR /&gt;     codec.lIsVad = 0;&lt;BR /&gt;&lt;BR /&gt;     // Set the payload number for JB&lt;BR /&gt;     JB_initCodepoint(mpJBState, "G726", 8000, getPayloadType());&lt;BR /&gt;     break;&lt;BR /&gt;&lt;BR /&gt;    default:&lt;BR /&gt;     return OS_FAILED; &lt;BR /&gt;   }&lt;BR /&gt;&lt;BR /&gt;  /*Load codec by name from command line*/&lt;BR /&gt;   lCallResult = LoadUSCCodecByName(&amp;amp;codec,NULL);   &lt;BR /&gt;   if(lCallResult&amp;lt;0)&lt;BR /&gt;    return OS_FAILED;&lt;BR /&gt;&lt;BR /&gt;  /*Get USC codec params*/&lt;BR /&gt;   lCallResult = USCCodecAllocInfo(&amp;amp;codec.uscParams);&lt;BR /&gt;   if(lCallResult&amp;lt;0)&lt;BR /&gt;    return OS_FAILED;&lt;BR /&gt;&lt;BR /&gt;   lCallResult = USCCodecGetInfo(&amp;amp;codec.uscParams);&lt;BR /&gt;   if(lCallResult&amp;lt;0)&lt;BR /&gt;    return OS_FAILED;&lt;BR /&gt;&lt;BR /&gt;  /*Set params for decode*/&lt;BR /&gt;   codec.uscParams.pInfo-&amp;gt;params.direction = 1;&lt;BR /&gt;   codec.uscParams.pInfo-&amp;gt;params.law = 0;&lt;BR /&gt;   codec.uscParams.nChannels = 1;&lt;BR /&gt;   codec.uscParams.pInfo-&amp;gt;params.modes.vad = 0;&lt;BR /&gt;&lt;BR /&gt;   switch( getPayloadType() )&lt;BR /&gt;   {&lt;BR /&gt;   case CODEC_TYPE_G726_16:&lt;BR /&gt;    codec.uscParams.pInfo-&amp;gt;params.modes.bitrate = 16000;&lt;BR /&gt;    break;&lt;BR /&gt;   case CODEC_TYPE_G726_24:&lt;BR /&gt;    codec.uscParams.pInfo-&amp;gt;params.modes.bitrate = 24000;&lt;BR /&gt;    break;&lt;BR /&gt;   case CODEC_TYPE_G726_32:&lt;BR /&gt;  
  codec.uscParams.pInfo-&amp;gt;params.modes.bitrate = 32000;&lt;BR /&gt;    break;&lt;BR /&gt;   case CODEC_TYPE_G726_40:&lt;BR /&gt;    codec.uscParams.pInfo-&amp;gt;params.modes.bitrate = 40000;&lt;BR /&gt;    break;&lt;BR /&gt;   }&lt;BR /&gt;&lt;BR /&gt;  /*Alloc memory for the codec*/&lt;BR /&gt;   lCallResult = USCCodecAlloc(&amp;amp;codec.uscParams, NULL);&lt;BR /&gt;   if(lCallResult&amp;lt;0)&lt;BR /&gt;    return OS_FAILED;&lt;BR /&gt;&lt;BR /&gt;  /*Init decoder*/&lt;BR /&gt;   lCallResult = USCDecoderInit(&amp;amp;codec.uscParams, NULL);&lt;BR /&gt;   if(lCallResult&amp;lt;0)&lt;BR /&gt;    return OS_FAILED;&lt;BR /&gt;   &lt;BR /&gt;   return OS_SUCCESS;&lt;BR /&gt;&lt;BR /&gt;  }&lt;BR /&gt;  return OS_FAILED;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;OsStatus MpdIPPG726::freeDecode(void)&lt;BR /&gt;{&lt;BR /&gt; /*Free codec memory*/&lt;BR /&gt;&lt;BR /&gt; int i,j;&lt;BR /&gt; for(j=0;j&lt;CODEC.USCPARAMS.NCHANNELS&gt; for(i=0; i&lt;CODEC.USCPARAMS.NBANKS&gt;    if (codec.uscParams.uCodec&lt;J&gt;.pBanks) {&lt;BR /&gt;     if( codec.uscParams.uCodec&lt;J&gt;.pBanks&lt;I&gt;.pMem )&lt;BR /&gt;      ippsFree(codec.uscParams.uCodec&lt;J&gt;.pBanks&lt;I&gt;.pMem);&lt;BR /&gt;     if( codec.uscParams.uCodec&lt;J&gt;.pBanks&lt;I&gt;.pMem )&lt;BR /&gt;      codec.uscParams.uCodec&lt;J&gt;.pBanks&lt;I&gt;.pMem = NULL;&lt;BR /&gt;    }&lt;BR /&gt; }&lt;BR /&gt; ippsFree(codec.uscParams.uCodec&lt;J&gt;.pBanks);&lt;BR /&gt; codec.uscParams.uCodec&lt;J&gt;.pBanks = NULL;&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt; return OS_SUCCESS;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;int MpdIPPG726::decode(int numSamples, MpRtpBufPtr &amp;amp;rtpPacket, MpAudioSample *decoded) &lt;BR /&gt;{&lt;BR /&gt; int frmlen, infrmLen, FrmDataLen, inputLeft, outputRight;&lt;BR /&gt; char *inputBuffer=NULL;&lt;BR /&gt; char* outputBuffer;&lt;BR /&gt; USC_PCMStream out;&lt;BR /&gt; USC_Bitstream in; &lt;BR /&gt;&lt;BR /&gt; infrmLen = rtpPacket-&amp;gt;getPayloadSize();&lt;BR /&gt;&lt;BR /&gt; assert( infrmLen == G726_PATTERN_LENGTH);&lt;BR /&gt;&lt;BR /&gt; /*Allocate memory for the output buffer. Size of output buffer is equal to the size of 1 frame*/&lt;BR /&gt;&amp;nbsp;
; inputBuffer = (char*)ippsMalloc_8s( infrmLen );&lt;BR /&gt; outputBuffer = (char*)ippsMalloc_8s(numSamples*sizeof(MpAudioSample));&lt;BR /&gt;&lt;BR /&gt; ippsZero_8u((unsigned char *)outputBuffer, numSamples*sizeof(MpAudioSample));&lt;BR /&gt;&lt;BR /&gt; /* Copy input encoded buffer to local variable */&lt;BR /&gt; ippsCopy_8u((unsigned char *) rtpPacket-&amp;gt;getPayload(), (unsigned char *)inputBuffer, infrmLen ); &lt;BR /&gt;&lt;BR /&gt; inputLeft = rtpPacket-&amp;gt;getPayloadSize();&lt;BR /&gt; outputRight = 0;&lt;BR /&gt;&lt;BR /&gt; while( inputLeft &amp;gt; 0 )&lt;BR /&gt; {&lt;BR /&gt;  /*Do the pre-procession of the frame*/&lt;BR /&gt;  in.bitrate = codec.uscParams.pInfo-&amp;gt;params.modes.bitrate;&lt;BR /&gt;  in.frametype = 0;&lt;BR /&gt;  in.nbytes = codec.uscParams.pInfo-&amp;gt;maxbitsize;&lt;BR /&gt;  in.pBuffer = inputBuffer + rtpPacket-&amp;gt;getPayloadSize() - inputLeft; &lt;BR /&gt;&lt;BR /&gt;  out.pBuffer = outputBuffer + outputRight;&lt;BR /&gt;&lt;BR /&gt;  /*Decode one frame*/&lt;BR /&gt;  FrmDataLen = USCCodecDecode(&amp;amp;codec.uscParams, &amp;amp;in, &amp;amp;out, 0);&lt;BR /&gt;&lt;BR /&gt;  if(FrmDataLen &amp;lt; 0)&lt;BR /&gt;   return 0;&lt;BR /&gt;&lt;BR /&gt;  inputLeft -= FrmDataLen;&lt;BR /&gt;  outputRight += out.nbytes;&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt; ippsCopy_8u((unsigned char *)outputBuffer, (unsigned char *) decoded,&lt;BR /&gt;        numSamples*sizeof(MpAudioSample));&lt;BR /&gt;&lt;BR /&gt; ippsFree( inputBuffer );&lt;BR /&gt; ippsFree( outputBuffer );&lt;BR /&gt;&lt;BR /&gt; return 0;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#endif /* !HAVE_IPP ] */&lt;BR /&gt;&lt;BR /&gt;&lt;/J&gt;&lt;/J&gt;&lt;/I&gt;&lt;/J&gt;&lt;/I&gt;&lt;/J&gt;&lt;/I&gt;&lt;/J&gt;&lt;/I&gt;&lt;/J&gt;&lt;/J&gt;&lt;/CODEC.USCPARAMS.NBANKS&gt;&lt;/CODEC.USCPARAMS.NCHANNELS&gt;&lt;/NETINET&gt;&lt;/SYS&gt;&lt;/FONT&gt;</description>
      <pubDate>Thu, 29 May 2008 08:15:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/G-726-encoding-problem/m-p/881742#M10286</guid>
      <dc:creator>em</dc:creator>
      <dc:date>2008-05-29T08:15:47Z</dc:date>
    </item>
  </channel>
</rss>

