Charles Swiger wrote: > On Tue, 2006-04-11 at 09:52 -0400, Charles Swiger wrote: > >>Well, it compiles but there are likely still issues since the 0.9 work >>function in GrAtscTrellisEncoder.cc has stuff to deal with an array >>of encoders that I don't understand: >> >> >> // We must produce output.size units of output. >> >> for (unsigned int i = 0; i < output.size; i += >>atsci_trellis_encoder::NCODERS){ >> // primitive does 12 segments at a time. >> // pipeline info is handled in the primitive. >> encoder.encode (&out[i], &in[i + start]); >> } >> >> >>Guess I'll look at where output.size comes from and what start does. >> >>--Chuck > > > Yeah, if anybody has a clue how to implement the work function for > an atsc_trellis_encoder.cc - I'm stuck. The code compiles but > segfaults, very likely due to using a simple: > > for (int i = 0; i < noutput_items; i++){ > d_trellis_encoder.encode(&out[i], &in[i]); > > Mainly, I have no idea how output.size is created from > setOutputSize(atsci_trellis_encoder::NCODERS); > > Would that be 12 * sizeof_atsc_data_segment ? > (NCODERS = 12) > > > > > _______________________________________________ > Discuss-gnuradio mailing list > Discuss-gnuradio@gnu.org > http://lists.gnu.org/mailman/listinfo/discuss-gnuradio > Did you check that the type of &out[i] is atsc_data_segment and the type of &in[i] is atsc_mpeg_packet_rs_encoded?
from GrAtscTrellisEncoder.h atsci_trellis_encoder encoder; from atsci_trellis_encoder.h: /*! * Take 12 RS encoded, convolutionally interleaved segments and * produce 12 trellis coded data segments. We work in groups of 12 * because that's the smallest number of segments that composes a * single full cycle of the encoder mux. */ void encode (atsc_data_segment out[NCODERS], const atsc_mpeg_packet_rs_encoded in[NCODERS]); from atsc_types.h: //! contains 832 3 bit symbols. The low 3 bits in the byte hold the symbol. class atsc_data_segment { public: static const int NPAD = 188; plinfo pli; unsigned char data[ATSC_DATA_SEGMENT_LENGTH]; unsigned char _pad_[NPAD]; // pad to power of 2 (1024) // overload equality operator bool operator== (const atsc_data_segment &other) const { return std::memcmp (data, other.data, sizeof (data)) == 0; } bool operator!= (const atsc_data_segment &other) const { return !(std::memcmp (data, other.data, sizeof (data)) == 0); } }; Greetings, Martin _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio