9#ifndef INCLUDED_DVBS2RX_BCH_H
10#define INCLUDED_DVBS2RX_BCH_H
27template <
typename T,
typename P>
40 uint32_t m_parity_bytes;
42 std::array<P, 256> m_gen_poly_rem_lut;
43 bool m_gen_poly_lut_generated;
45 std::vector<T> m_quadratic_poly_lut;
165 uint16_t
get_n()
const {
return m_n; };
172 uint16_t
get_k()
const {
return m_k; };
BCH coder/decoder.
Definition bch.h:29
int decode(u8_cptr_t codeword, u8_ptr_t decoded_msg) const
T encode(const T &msg) const
Encode an input message.
T decode(T codeword) const
Decode an input codeword.
gf2m_poly< T > err_loc_polynomial(const std::vector< T > &syndrome) const
Compute the error-location polynomial.
std::vector< T > syndrome(u8_cptr_t codeword) const
uint16_t get_k() const
Get the message length k.
Definition bch.h:172
void encode(u8_cptr_t msg, u8_ptr_t codeword) const
std::vector< T > err_loc_numbers(const gf2m_poly< T > &sigma) const
Compute the error-location numbers.
std::vector< T > syndrome(const T &codeword) const
Compute the syndrome of a received codeword.
const gf2_poly< P > & get_gen_poly() const
Get the generator polynomial object.
Definition bch.h:158
uint16_t get_n() const
Get the codeword length n.
Definition bch.h:165
bch_codec(const galois_field< T > *const gf, uint8_t t, uint32_t n=0)
Construct a new BCH coder/decoder object.
Galois Field GF(2^m).
Definition gf.h:66
Polynomial over GF(2).
Definition gf.h:203
Polynomial over GF(2^m).
Definition gf.h:349
#define DVBS2RX_API
Definition include/gnuradio/dvbs2rx/api.h:19
unsigned char * u8_ptr_t
Definition gf_util.h:23
const unsigned char * u8_cptr_t
Definition gf_util.h:24
Fixed-length double-ended queue with contiguous volk-aligned elements.
Definition gr_bch.h:22