Patent ID: 7466822

Claim:
A data coding apparatus in which input data having a range of possible data values and a smaller sub-range of legal data values is coded by applying a first coder mapping which maps input data values in the range of possible input data values and corresponding coded data values within the range of possible data values, the apparatus comprising: means for detecting, for each coded data value, whether the coded data value lies within the sub-range of legal data values; and means for remapping a coded data value lying outside the sub-range of legal data values according to a second coder mapping different from the first coder mapping to an unused coded data value lying within the sub-range of legal data values, the remapping means, in respect of the first coder mapping, being configured to (1) detect a position of an illegal coded data value in a predetermined ordering of illegal coded data values; (2) map the detected position to a required position in a predetermined ordering of unused legal coded data values; and (3) remap the illegal coded data value to the unused legal coded data value at the required position in the predetermined ordering of unused legal coded data values in accordance with the second coder mapping.