STRUCT RS_CODEC(9)
π struct rs_codec β rs codec data
okay so bestie, welcome to the kernel API manual for struct rs_codec β this is literally the struct that holds all the rs codec data, and she is that girl. every field, every type, all of it, coming right up β¨
β¨ SYNOPSIS β¨
here's the whole glow-up, character for character, don't touch a thing:
struct rs_codec {
int mm;
int nn;
uint16_t *alpha_to;
uint16_t *index_of;
uint16_t *genpoly;
int nroots;
int fcr;
int prim;
int iprim;
int gfpoly;
int (*gffunc)(int);
int users;
struct list_head list;
};
π MEMBERS π
time for the vibe check on every single member β no skipping, we don't do that here π«Ά
mmβ bits per symbol. that's it, that's the whole thing πnnβ symbols per block, and it equals(1<<mm)-1. yeah, the math is mathing π₯alpha_toβ the log lookup table. iconic little lookup table behavior.index_ofβ the antilog lookup table. she's the sister ofalpha_to, they come as a pair πgenpolyβ the generator polynomial. main character energy fr fr β¨nrootsβ number of generator roots, which also equals the number of parity symbols. two things at once, she's multitasking πfcrβ first consecutive root, in index form.primβ primitive element, in index form.iprimβ theprim-th root of 1, in index form. ok that's lowkey gorgeous πΈgfpolyβ the primitive generator polynominal (spelled exactly like that, no cap π).gffuncβ function to generate the field, if it's a non-canonical representation. it's literallyint (*gffunc)(int);, so yes, she takes anintand hands you back anintπ¦usersβ the users of this structure. love that for her, she has a fanbase π₯°listβ list entry for the rs codec list. keeping everything linked up and organized, we stan π
π SEE ALSO π
go read these next, iykyk:
- Kernel file
./include/linux/rslib.h struct rs_control(9)init_rs(9)
okay that's the whole page, you ate that π this little number lives over in ./include/linux, and it's dated October 2026 β October 2026 bestie, she's from the future and she's still serving π
β¨ bye mwah ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms