RSDecodeInit

Initializes user-supplied memory as the IppsRSDecodeSpec_8u context for future use.

Syntax

IppStatus ippsRSDecodeInit_8u(int codeLength, int dataLength, const IppsGFSpec_8u* pGF, Ipp8u root, IppsRSDecodeSpec_8u* pRS);

Parameters

codeLength

The desired codeword length.

dataLength

The desired data length.

pGF

Pointer to the finite field (GF) context to be used for the decoding operation.

root

The root of the (first) minimal polynomial over GF.

pRS

Pointer to the user-supplied buffer to be initialized as the IppsRSDecodeSpec_8u context.

Description

This function is declared in the ippdi.h file. The function initializes the user-supplied buffer as the RS(codeLength, dataLength) decoder context.

The buffer for the context must have size that the function ippsRSDecodeGetSize returns.

The codeLength and dataLength parameters for ippsRSDecodeInit must have the same values as in the preceding call to ippsRSDecodeGetSize. The root value defines the generating polynomial g(x) of RS(codeLength, dataLength):

g(x) = (x-root)*( x-root *a1) *( x-root *a2)*...*( x-root *a(2*t-1)),

where t is the error-correcting ability, such that 2*t = codeLength - dataLength.

Return Values

ippStsNoErr

Indicates no error. Any other value indicates an error or warning.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is NULL.

ippStsRangeErr

Indicates an error condition if values of the parameters codeLength and/or dataLength are out of bounds determined by the inequalities: 2 ≤ codeLength < orderof(GF); 0 < dataLength < codeLength.

ippStsBadArgErr

Indicates an error condition if the value of the parameter root is not a valid element of the finite field or is equal to 0.

Submit feedback on this help topic

Copyright © 2000 - 2010, Intel Corporation. All rights reserved.