# LSPToLPC_GSMAMR

Converts LSPs to LP coefficients.

## Syntax

IppStatus ippsLSPToLPC_GSMAMR_16s(const Ipp16s* pSrcLsp, Ipp16s* pDstLpc);

## Parameters

 pSrcLsp Pointer to the LSP coefficient vector with ten elements, represented using Q0.15. pDstLpc Pointer to the LP coefficient vector with 11 elements, represented using Q3.12.

## Description

The function ippsLSPToLPC_GSMAMR is declared in ippsc.h file. This function converts a set of 10th-order LSPs to LP coefficients. The functionality is as follows:

1. Calculate the polynomial coefficients of F1(z) and F2(z), using the recursive relations

for i = 1 .. 5

f1(i) = 2q2i-1 * f1(i-1) + 2f1(i-2)

for j = i-1 .. 1

f1(j) = f1(j) - 2q2i-1 * f1(j-1) + 2f1(j-2)

where initial values f1(0) = 1 and f1 (-1) = 0.

The coefficients f2(i) are computed similarly by replacing q2i-1 by q2i.

2. MultiplyF1(z) and F2(z) by 1+z-1 and 1-z-1 , respectively, to obtain F'1(z) and F'2(z), using the following relations:

f'1(i) = f1(i) + f1(i-1),

f'2(i) = f2(i) + f2(i-1), for i = 1,2, ..., 5.

3. Compute the LP coefficients from the polynomials F'1(z) and F'2(z) as follows:

ai = 0.5f'1(i) + 0.5f'2(i) for i = 1,2, ..., 5, and

ai = 0.5f'1(11 - i) + 0.5f'2(11 - i) for i = 6,7, ..., 11.

## Return Values

 ippStsNoErr Indicates no error. IppStsNullPtrErr Indicates an error when one of the specified pointers is NULL.