JvanKatwijk / dab-cmdline

DAB decoding library with example of its use
GNU General Public License v2.0
57 stars 29 forks source link

Query on addtoFrame() function #40

Closed edinsam closed 6 years ago

edinsam commented 6 years ago

Firstly, congratulations on such a great project!!

I have a small query re function addtoFrame(uint8_t* outV) which is present in both the audio and data processors.e.g. mp2Processor::addtoFrame()

My understanding is that the input array to this function is in the form of unpacked bits, these are then packed into bytes in the first few lines of both mp2Processor::addtoFrame() and mp4Processor::addtoFrame()

However, on the corresponding data version, i.e. dataProcessor::addtoFrame(outV), no unpacking seems to be present, but the function itself seems to be working on byte arrays rather than on unpacked bits

Am I missing something, or is the unpacking done somewhere else?

Thanks for your time ed

JvanKatwijk commented 6 years ago

The frontend delivers bits (soft bits). In the data-bakend resp audio-backend the selected vectors of soft bits are made into hard bits (vector size 24 bitrate). These backend functions themselves pass on the bitvectors (again, size 24 bitrate) to appropriate handlers.

The soundhandlers, MP2 and MP4 then pack the bits since the processing elements in these functions expect vectors filled with bytes, The data handlers, on the other hand, - selected in the class dataProcessor

Key is that the audio resp. databackend convert the incoming softbits into 24 * bitrate sized vectors of hardbits.

best jan

2018-02-14 9:58 GMT+01:00 edinsam notifications@github.com:

Firstly, congratulations on such a great project!!

I have a small query re function addtoFrame(uint8_t* outV) which is present in both the audio and data processors.e.g. mp2Processor::addtoFrame()

My understanding is that the input array to this function is in the form of unpacked bits, these are then packed into bytes in the first few lines of both mp2Processor::addtoFrame() and mp4Processor::addtoFrame()

However, on the corresponding data version, i.e. dataProcessor::addtoFrame(outV), no unpacking seems to be present, but the function itself seems to be working on byte arrays rather than on unpacked bits

Am I missing something, or is the unpacking done somewhere else?

Thanks for your time ed

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/JvanKatwijk/dab-cmdline/issues/40, or mute the thread https://github.com/notifications/unsubscribe-auth/AITzwHHSjNbLghPLa32xi02v2syzVxQfks5tUqAngaJpZM4SE-ot .

-- Jan van Katwijk

+31 (0)15 3698980 +31 (0) 628260355