Patent ID: 7684448

Claim:
A method for data interleaving and data de-interleaving, comprising: a process of data interleaving by an interleaver, comprising: multiplexing data of different transport channels, interleaving the multiplexed data, and outputting the interleaved data; and a process of data de-interleaving comprising: receiving the interleaved data, de-interleaving the received interleaved data, and de-multiplexing the de-interleaved data into different transport channels; wherein a randomized operation is performed in the process of multiplexing data of different transport channels by a channel multiplexing unit, the randomized operation comprising: calculating a number of data of each transport channel, and recording a minimum number Nmin; calculating a multiple of the number of data of each transport channel to the Nmin, respectively, and rounding down the multiple to an integral multiple and recording the integral multiple; reading data from the transport channels until all the data of the transport channels are read, wherein a number of the data read from each transport channel each time equals to a corresponding integral multiple of each transport channel; if a number of data remaining in the transport channel is smaller than the rounded down multiple of the transport channel, reading the data remaining; and an inverse operation of the randomized operation is used in the process of de-multiplexing the data de-interleaved into different transport channels by a channel de-multiplexing unit, the inverse operation comprising: calculating the number of data of each transport channel, and recording the minimum number Nmin; calculating a multiple of the number of data of each transport channel to the Nmin, respectively, and rounding down the multiple to an integral multiple and recording the integral multiple; reading the de-interleaved data, and writing the data read into each corresponding transport channel until all the data are written, wherein the number of the data read each time equals to the integral multiple of each transport channel, and if a number of data to be written of a transport channel is smaller than the integral multiple of the transport channel, writing available data.