SEGMENTATION MECHANISM FOR A BLOCK ENCODER

Abstract: A method for encoding an input data block (IDB) with a block encoder (TE). The block encoder is capable of processing consecutive coding blocks (CB) whose size has an upper limit (LCB) which is smaller than the size of the input data block (IDB). The method comprises: (1) determining the length of the input data block (IDB) before encoding any of its data with the block encoder (TE); (2) dividing the input data block (IDB) to a plurality of segments (S1 ... SN) wherein all segments are of substantially equal size and no segment is larger than the upper limit (LCB); and (3) processing each segment (S1 ... SN) with the block encoder (TE). If the last segment (SN) is shorter than the remaining segments (S1, S2...), fill bits (NFILL) can be added to the last segment (SN) such that its length equals that of the remaining segments (S1, S2...).

Description: Segmentation mechanism for a block encoder Background of the invention The invention relates to methods and equipment for block encoders. As is well known, block encoders are frequently used for error correction. An example of a block encoder is a so-called turbo (en)coder, as disclosed in reference 1. Figure 1 is a block chart of a turbo encoder TE which is connected to a corresponding turbo decoder TD via a (transmission) channel. A typical turbo encoder conveys the original information directly to the channel. These bits are called systematic bits. Additionally, the turbo encoder adds redundancy (parity) with simple encoders 1 and 2, the latter of which is preceded by an interleaver P, which permutes the bits of the original information. However, details of the block encoder are not relevant for understanding the invention, and reference is made to relevant literature. Unlike streaming encoders, block encoders process one or more data blocks at a time. An input data block whose size exceeds the block size of the block encoder must be divided into smaller segments such that no segment is larger than the block size of the block encoder. This is why block encoders are particularly suitable for applications with a fixed input block size. A problem with block encoders is that they do not easily lend themselves to applications having a variable (dynamic) input block size. In other words, what to do with the last few segments of the input data block, remains an open question. Disclosure of the invention An object of the invention is to provide a mechanism for using block encoders with applications having a variable (dynamic) input block size. The mechanism should be generic in order to be applicable to a wide variety of block encoders. This object is achieved with a method and equipment which are characterized by what is disclosed in the attached independent claims. Preferred embodiments of the invention are disclosed in the attached dependent claims. A straightforward solution would be to fill the segment of the input data block to the block size of the block encoder. Assuming a block size of 8 kilobits (kb), a 14-kb input data block would be divided into a first segment of 8 kb and second (last) segment with a net size of 6 kb and 2 kb of fill (padding) bits. A benefit of this straightforward solution is that the block encoder does not have to adapt to varying input block sizes. The invention is based on the idea that for an input data block whose size exceeds the block size of the block encoder: 1) before coding is started, the size of the input data block is determined; and 2) the input data block is divided into segments of approximately equal size such that no segment is larger than the block size of the block en- coder. According to a preferred embodiment of the invention, the input data block is divided into the least possible number of segments. In other words, the segments are as large as possible. According to an alternative embodiment, the input data block is di- vided into 2 π segments where n is a positive integer. According to yet another preferred embodiment of the invention, if dividing the input data block produces a last segment which is shorter than the remaining segments, the input data block or the last segment is padded with a few fill bits until the length of the last segment equals that of the remaining segments. However, in contrast to the straightforward solution, the last segment is not padded to the full block size of the block encoder (unless the remaining segments happen to be of that size too). Brief description of the drawings The invention will be described in more detail by means of preferred embodiments with reference to the appended drawing wherein: Figure 1 is a block chart of a turbo encoder; and Figure 2 illustrates dividing an input data block to a number of segments for the turbo encoder. Detailed description of the invention Various embodiments of the invention will be described in connection with a turbo encoder, an example of which is disclosed in reference 1. However, details of the turbo encoder, or any other encoder, are not relevant for understanding the invention. Implementing a turbo encoder (and the corresponding decoder) can be facilitated by limiting the length of the coding block. A reasonable value for the length of the coding block is 8192 bits including the user data, a possible error detection field (CRC) and the termination. The following naming conventions will be used: W TAIL = tne number of termination bits 7 " DELAY (seconds) = the length of the user data block R DATA (bits per second) = the user data rate of the service W EXTRA = the number of other bits added to the original user data (CRC etc.) L CB = max length of the coding block. The following condition has to be satisfied: -^D A T A * 7 " DELAY + WEXT A + N τML < L CB [1] If this condition is not satisfied the data to be encoded must be segmented so that each separate segment satisfies the condition. The number of segments Λ/ s has to satisfy the condition: round_up((f? DATA * T DELAY + / ^™ ) /N s ) + Λ/ TAIL < L CB [2] It is preferable to choose the smallest N s satisfying the inequality [2]. N s can be calculated from: N s = round_up((R DATA * T DELAY + 7^^) / (L CB - Λ/ TAIL )) [3] It may happen that all the encoding blocks do not end up being of the same length, i.e. that (R DATA * 7 " DELAY + /Λ/ s is not an integer. In such a case, there are at least two possible solutions, which will be called algorithms A and B. In algorithm A, the last segment is allowed to have a different length than the other segments. In algorithm B, a number Λ/ FILL of fill bits (e.g. zeroes) are added to the input data so that ( ? DATA * T DELAY + Λ/ EXTRA + /V F * LL ) / N s is the smallest possible integer. (Alternatively, the fill bits can be appended to the last segment after segmentation.) Algorithm A Algorithm A allows the last segment to be shorter than the other segments. Algorithm A uses the following Inputs: ^ DATA = the user data rate (bits per second) 7 " DELAY = encoding user data block length (seconds) Λ/ EXTRA = extra data to be appended to the user data before encoding (bits) Λ/ TAIL = number of tail bits to be appended to the encoding blocks Algorithm A produces the following outputs: N s = number of segments Λ/ TB = number of bits in the turbo encoder input blocks except the last one Λ/ LΛST TB = number of bits in the last turbo encoder input block In algorithm A the following computations will be performed: Let N s = round_up((R DATA * 7 " DELAY + N^^) I (L CB - Λ/ TAIL )) Let Λ/ TB = round_up((R DATA * 7 " DELAY + Λ/ EXTRA ) / Λ/ s ) + Λ/ TAIL ; Let Λ/ REM = remainder of ( ? DATA * 7 " DELAY + Λ/ EXTRA ) / Λ/ s ; If Λ/ REM is not equal to zero then N^ ^ = Λ/ TB - Λ/ s + Λ/ REM else N^ j ^ = Λ/ TB End. If algorithm A is used, an adaptive turbo interleaver is needed since the last input segment to the turbo encoder may be shorter than the others. The number of systematic bits in the output of the encoder is K DATA * T DELAY + Λ/ EXTRA + N s * Λ/ TAIL [4] Thus there are no additional bits other than the ones due to the termination of each segment. Algorithm B As shown in Figure 2, in algorithm B all input segments to the turbo encoder will be of equal size. The inputs to algorithm B are: f? DATA = the user data rate (bits per second) T DELAY = encoding user data block length (seconds) W EXTRA = extra data t0 be appended to the user data before encoding (bits) A = number of tail bits to be appended to the encoding blocks The outputs from algorithm B are: N s = number of segments Λ/ TB = number of bits in the turbo encoder input blocks Λ/ F|LL = number of fill bits (e.g. zero) in the last turbo encoder input block In algorithm B, the following computations will be performed: Let N s = round_up((f? DATA * T DELAY + / ^™) / (L CB - Λ/ TAIL )) Let Λ/ TB = round_up ((R DATA * T DELAY + Λ/ EXTRA ) / N s ) + Λ/ TAIL Let Λ/ REM = remainder of (R DATA * T DELAY + Λ/ EXTRA ) / N s lf N Rm ≠ 0 then insert Λ/ F , LL = (Λ/ s - N Rm ) zero bits to the end of the input data else Λ/ F , LL = 0. All input segments to the turbo encoder are of equal size and therefore the same turbo interleaver can be used for all segments. In this case the number of systematic bits over an entire channel interleaving block at the output of the turbo encoder is: N s * (round_up((f? DATA * T DELAY + Λ/ EXTRA ) / Λ/ s ) + Λ/ TAIL ) [5] Thus there may be some additional bits other than the termination bits. Modification to algorithms A and B In the above algorithms A and B, the length of input segment to the turbo encoder is maximised by choosing the smallest possible number of segments N s . In some cases it may be preferable to use a number of segments N s which is a power of 2, but this will shorten the input segments to the turbo encoder. In this case, the first step of the above algorithms A and B would be replaced by the following three steps: Let n s = round_up ((R DMA * T DELAY + Λ/ EXTRA ) / (L CB - Λ/ TAIL )); Let m = round_up (log 2 π s ); Let N s = 2 m . References: 1. C. Berrou, A. Glavieux, P. Thitimajshima: Near Shannon limit error- correcting coding and decoding: Turbo-codes, IEEE International Conference on Communications, ICC 1993, Geneva, Switzerland 23-26 May, 1993, Vol. 2, pp. 1064-1070. All references are incorporated herein by reference.

Claims: Claims 1. A method for encoding an input data block (IDB) with a block encoder (TE), said block encoder being capable of processing consecutive coding blocks (CB) whose size has an upper limit (L CB ) which is smaller than the size of the input data block (IDB); characterized in that the method comprises the steps of: determining the length of the input data block (IDB) before encoding any of its data with said block encoder (TE); dividing the input data block (IDB) to a plurality of segments (S, ... S N ) wherein all segments are of substantially equal size and no segment is larger than said upper limit (L CB ); and processing each segment (S., ... S N ) with said block encoder (TE). 2. A method according to claim ^characterized in that if the last segment (S N ) is shorter than the remaining segments (S,, S 2 ...), fill bits (N F | LL ) are added to the last segment (S N ) such that its length equals that of the remaining segments (S^ S 2 ...). 3. A method according to claim ^characterized in that if the length of the input data block (IDB) is not an exact multiple of said upper limit (L CB ), fill bits (N F , LL ) are added to the input data block (IDB) such that its length is an exact multiple of said upper limit (L CB ). 4. A method according to any one of the preceding claims, characterized in that the number of segments is 2 n where n is a positive integer. 5. A segmentation device for segmenting an input data block (IDB) for processing with a block encoder (TE), said block encoder being capable of processing consecutive coding blocks (CB) whose size has an upper limit (L CB ) which is smaller than the size of the input data block (IDB); characterized in that the segmentation device is arranged to: determine the length of the input data block (IDB) before applying any of its data to said block encoder (TE); divide the input data block (IDB) to a plurality of segments (S ... S N ) wherein all segments are of substantially equal size and no segment is larger than said upper limit (L CB ); and to apply each segment (S ... S N ) to said block encoder (TE).

Inventors: NIEMINEN ESKO, PIRTTIAHO LAURI, NIEMINEN, ESKO, PIRTTIAHO, LAURI
Applicants: NIEMINEN ESKO, NOKIA NETWORKS OY, PIRTTIAHO LAURI, NIEMINEN, ESKO, PIRTTIAHO, LAURI
Application year: 2000
Main classification: H03M13
IPC codes: H03M13, H04L1