Turbo product code (TPC) encoder

performs 2-D TPC encoding of the input message, `code`

= tpcenc(`msg`

,`N`

,`K`

)`msg`

, using two
linear block codes specified by codeword length `N`

and message
length `K`

. For a description of 2-D TPC encoding, see Algorithms.

Turbo product codes (TPC) are a form of concatenated codes used as forward error-correcting (FEC) codes. Two or more component block codes, such as systematic linear block codes, are used to construct TPCs. This encoder implements 2-D product code encoding, as described in [1], using two Linear Block Codes.

[1] Pyndiah, R. M. "Near-Optimum
Decoding of Product Codes: Block Turbo Codes." *IEEE Transactions on
Communications*. Volume 46, Number 8, August 1998, pp.
1003–1010.