rlevdur

Functions

int main(int argc, char *argv[])

rlevdur [ option ] [ infile ]

  • -m int

    • order of coefficients (0M)

  • infile str

    • double-type linear predictive coefficients

  • stdout

    • double-type autocorrelation

The below example converts LPC coefficients in data.lpc to CSM parameters.

rlevdur -m 10 < data.lpc | acr2csm -m 10 > data.csm
Parameters:
  • argc[in] Number of arguments.

  • argv[in] Argument vector.

Returns:

0 on success, 1 on failure.

See also

levdur

class ReverseLevinsonDurbinRecursion

Calculate linear predictive coefficients from autocorrelation.

The input is the M-th order LPC coefficients:

K,a(1),,a(M),
where K is the gain, and the output is the M-th order autocorrelation:
r(0),r(1),,r(M).
The autocorrelation matrix can be represented as
R=[r(0)r(1)r(M)r(1)r(0)r(M1)r(M)r(M1)r(0)].
The autocorrelation is derived by using the matrix decomposition
R1=UE1UT.
The U is the following upper triangular matrix:
U=[a(0)(0)a(1)(1)a(M)(M)0a(1)(0)a(M)(M1)00a(M)(0)],
where a(i)(j) is the j-th coefficient of the i-th order prediction filter polynomial. The E is the following diagonal matrix:
E=[e(0)(0)000e(1)(1)000e(M)(M)],
where e(i)(i) is the prediction error from i-th order filter. This decomposition allows us the efficient evaluation of the inverse of the autocorrelation matrix.

Public Functions

explicit ReverseLevinsonDurbinRecursion(int num_order)
Parameters:

num_order[in] Order of coefficients, M.

inline int GetNumOrder() const
Returns:

Order of coefficients.

inline bool IsValid() const
Returns:

True if this object is valid.

bool Run(const std::vector<double> &linear_predictive_coefficients, std::vector<double> *autocorrelation, ReverseLevinsonDurbinRecursion::Buffer *buffer) const
Parameters:
  • linear_predictive_coefficients[in] M-th order LPC coefficients.

  • autocorrelation[out] M-th order autocorrelation.

  • buffer[out] Buffer.

Returns:

True on success, false on failure.

bool Run(std::vector<double> *input_and_output, ReverseLevinsonDurbinRecursion::Buffer *buffer) const
Parameters:
  • input_and_output[inout] M-th order coefficients.

  • buffer[out] Buffer.

Returns:

True on success, false on failure.

class Buffer

Buffer for ReverseLevinsonDurbinRecursion class.