Commit bda9b20
fix: correct Reed-Solomon generator polynomial construction in QR encoder
The generator polynomial was built with coefficients in reversed order,
causing wrong EC codewords and producing unreadable QR codes.
Replaced the in-place accumulation loop with standard polynomial
convolution that correctly multiplies (x + alpha^i) factors in
descending degree order.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 4a7a4e9 commit bda9b20
1 file changed
Lines changed: 10 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
35 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
40 | 43 | | |
41 | | - | |
| 44 | + | |
42 | 45 | | |
43 | 46 | | |
44 | 47 | | |
| |||
0 commit comments