Patent ID: 8045625

Claim:
An encoding method to control a direct current (DC) component in a data processing apparatus, comprising: partitioning an input stream into first sub-blocks and second sub-blocks using an encoding apparatus; encoding the second sub-blocks based on a number and location of reference sub-blocks to generate third sub-blocks when at least one of the first sub-blocks corresponds to a forbidden pattern, the reference sub-blocks indicating the second sub-blocks that correspond to a reference pattern and the third sub-blocks including a redundant information sub-block and non-redundant information sub-blocks using the encoding apparatus; and rearranging the first sub-blocks and the third sub-blocks to generate an output stream, wherein when the number of the reference sub-blocks is equal to 0, encoding the second sub-blocks comprises: writing the second sub-blocks into the third sub-blocks; and writing a non-encoding state into the redundant information sub-block, the non-encoding state indicating that the second sub-blocks are not encoded.