<div dir="ltr">Hi Harald,<br><br>> Why the code differs, I don't know. Maybe it was<br>> never completed in conv_gen?<br><br>It seems, I found the answer. If you look closer at<br>gsm0503_coding.c/gsm0503_pdtch_encode(), you will see:<br><br>// Around line 1300, CS-2 encoding<br>// ...<br><br>osmo_pbit2ubit_ext(conv, 3, l2_data, 0, 271, 1);<br>usf = l2_data[0] & 0x7;<br><br>osmo_crc16gen_set_bits(&gsm0503_cs234_crc16, conv + 3,<br>    271, conv + 3 + 271);<br><br>memcpy(conv, gsm0503_usf2six[usf], 6);<br><br>osmo_conv_encode(&gsm0503_cs2, conv, cB);<br><br>// <br>for (i = 0, j = 0; i < 588; i++)<br>    if (!gsm0503_puncture_cs2[i])<br>        cB[j++] = cB[i];<br><br>hl_hn = gsm0503_pdtch_hl_hn_ubit[1];<br><br>// ...<br><br>So, as I understand, this code applies puncture itself.<br>But in our case, the osmo_conv_encode() applies puncture<br>too, from the gsm0503_cs2 convolutional code definition.<br>The same things happens in the gsm0503_pdtch_decode().<br><br>There are two possible ways to go in my mind:<br><br>1) The simplest way is to merely remove puncture from<br>   both gsm0503_cs2 and gsm0503_cs3 definitions, but<br>   it may break some code, which already uses current<br>   variant.<br>2) Change exactly the gsm0503_coding.c to use puncture<br>   from shared convolutional code definitions. For me,<br>   this way is prefered, but I don't know how to change<br>   the code yet.<br><br>Any opinions?<br>Does any project use the convolutional code definitions<br>from 'utils/conv_gen.py'?<br><br><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>With best regards,<br></div><div>Vadim Yanitskiy.<br></div></div></div></div></div></div>
<br><div class="gmail_quote">2016-09-29 21:40 GMT+07:00 Harald Welte <span dir="ltr"><<a href="mailto:laforge@gnumonks.org" target="_blank">laforge@gnumonks.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From my memory:<br>
<br>
* CS1 is rate 1/2 conv code with no puncturing.<br>
* CS2+3 apply different puncturing amounts on that conv code<br>
* CS4 has no error correction (=100% puncturing)<br>
<br>
Why the code differs, I don't know. Maybe it was never completed in conv_gen?<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Sent from a mobile device. Please excuse my brevity.<br>
</font></span></blockquote></div><br></div></div>