Lines Matching +full:rs +full:-
1 // SPDX-License-Identifier: GPL-2.0
7 * RS code lifted from reed solomon library written by Phil Karn
18 * struct rs_codec - rs codec data
21 * @nn: Symbols per block (= (1<<mm)-1)
28 * @iprim: prim-th root of 1, index form
30 * @gffunc: Function to generate the field, if non-canonical representation
32 * @list: List entry for the rs codec list
51 * struct rs_control - rs control structure per instance
60 /* General purpose RS codec, 8-bit data width, symbol width 1-15 bit */
62 int encode_rs8(struct rs_control *rs, uint8_t *data, int len, uint16_t *par,
66 int decode_rs8(struct rs_control *rs, uint8_t *data, uint16_t *par, int len,
71 /* General purpose RS codec, 16-bit data width, symbol width 1-15 bit */
73 int encode_rs16(struct rs_control *rs, uint16_t *data, int len, uint16_t *par,
77 int decode_rs16(struct rs_control *rs, uint16_t *data, uint16_t *par, int len,
86 * init_rs - Create a RS control struct and initialize it
91 * @fcr: the first consecutive root of the rs code generator polynomial
94 * @nroots: RS code generator polynomial degree (number of roots)
107 /* Release a rs control structure */
108 void free_rs(struct rs_control *rs);
112 * @rs: Pointer to the RS codec
116 * rs->mm = number of bits per symbol
117 * rs->nn = (2^rs->mm) - 1
120 * >= 3 * rs->nn
122 static inline int rs_modnn(struct rs_codec *rs, int x) in rs_modnn() argument
124 while (x >= rs->nn) { in rs_modnn()
125 x -= rs->nn; in rs_modnn()
126 x = (x >> rs->mm) + (x & rs->nn); in rs_modnn()