The gr-dtv BCH encoder has been heavily tested with both DVB-S2 and
DVB-T2 receivers and is known to be correct. I did verify that your
suggested change breaks the BCH encoder.
You can see a nice demo of the DVB-S2 transmitter here:
https://myriadrf.org/blog/digital-video-transmission-using-limesdr-gnu-radio/
Ron
On 06/13/2016 07:22 AM, Tiankun Hu wrote:
I found dvb_bch_bb_impl.cc use shift register to implement BCH encode,
but it seems different with my knowledge.
If I remember right, after shift the register, we should add the info
bit to register's LSB
dvb_bch_bb_impl.cc:526~535
b = (temp ^ (shift[5] & 1));
reg_6_shift(shift);
if (b) {
shift[0] ^= m_poly_n_12[0];
shift[1] ^= m_poly_n_12[1];
shift[2] ^= m_poly_n_12[2];
shift[3] ^= m_poly_n_12[3];
shift[4] ^= m_poly_n_12[4];
shift[5] ^= m_poly_n_12[5];
}
should be like this ===========>
b = shift[5] & 1; // use register's MSB to decide
whether need to XOR poly
reg_6_shift(shift);
shift[0] = shift[0] ^ (temp<<31);// add the info bit to
register's LSB
if (b) {
shift[0] ^= m_poly_n_12[0];
shift[1] ^= m_poly_n_12[1];
shift[2] ^= m_poly_n_12[2];
shift[3] ^= m_poly_n_12[3];
shift[4] ^= m_poly_n_12[4];
shift[5] ^= m_poly_n_12[5];
}
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio