Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

problem with AMRWB codec

george_miller
Beginner
494 Views
my general processis to convert a g711 file to aamrwb file. i decode a certain number of g711 frames into pcm, convert these frames to 16000 sampling rate (using ippsFIR64f_16s_Sfs), and then encode these frames into amrwb codec. Since i dont have anyway to listen to this file, i then convert this back to g711 doing basically the reverse, include converting back to 8000 sampling rate. unfortunately, this g711 file plays, but there is a small amount of static in the background. Any ideas? This happens also with G722.1
i have used ipp many years for other codecsbut have never used a codec whose sampling rate was 16000. is the ippsFIR64f_16s_Sfs routine the correct way to do this conversion?
0 Kudos
1 Reply
Chao_Y_Intel
Moderator
494 Views

The problem came from ippsFIRMR function. For those who want to use the ippsFIRMR function, the following are two simple examples:

upsampling()

{

IppsFIRState32f_16s *pState;

Ipp32f pTaps[2] = { 1.0,1.0};

int tapsLen = 2;

int upFactor = 2;

int upPhase = 0;

int downFactor =1;

int downPhase = 0;

Ipp16s *pDlyLine = NULL;

Ipp16s pSrc = { 1,2,3,4,5,6,7};

Ipp16s pDst[14] ;

int numIters = n;

IppStatus status;

status = ippsFIRMRInitAlloc32f_16s( &pState, pTaps, tapsLen, upFactor, upPhase,

downFactor, downPhase, pDlyLine);

if( ippStsNoErr != status) return -1;

status = ippsFIR32f_16s_Sfs( pSrc, pDst, numIters, pState,0);

if( ippStsNoErr != status) return -1;

status = ippsFIRFree32f_16s( pState );

if( ippStsNoErr != status) return -1;

}


downsampling()

{

IppsFIRState32f_16s *pState;

Ipp32f pTaps[1] = { 1.0};

int tapsLen = 1;

int upFactor = 1;

int upPhase = 0;

int downFactor =2;

int downPhase = 0;

Ipp16s *pDlyLine = NULL;

Ipp16s pSrc = { 1,2,3,4,5,6,7};

Ipp16s pDst[4] ;

int numIters = n;

IppStatus status;

status = ippsFIRMRInitAlloc32f_16s( &pState, pTaps, tapsLen, upFactor, upPhase,

downFactor, downPhase, pDlyLine);

if( ippStsNoErr != status) return -1;

status = ippsFIR32f_16s_Sfs( pSrc, pDst, numIters, pState,0);

if( ippStsNoErr != status) return -1;

status = ippsFIRFree32f_16s( pState );

if( ippStsNoErr != status) return -1;

}

0 Kudos
Reply