As long as m is given, the GR code in the JPEG-LS is represented by [unary quotient q] + [one bit for a separator "1"] + [binary remainder r].
A gain by the JPEG-LS GR code is obtained when the quotient is large enough, and the gain of the JPEG-LS GR code is six bits, which is six bits less than the GR code in this example.
Such a gain, however, does not always occur with the use of JPEG-LS GR coding.
However, the JPEG-LS GR code should be used whenever q [greater than or equal to] 23.
It is obvious that the JPEG-LS GR code needs 32 bits while the GR code needs only 25 bits.
In this case, the JPEG-LS GR code consists of a 47-bit prefix, a 1-bit separator, and a 16-bit suffix; therefore, the replaceable JPEG-LS GR prefix is 48 bits for the 16-bit-depth images.
Both the run and regular modes are used for JPEG-LS. The run mode encodes the run length, which is the count of the same continuous values.
First, the replacement of the replaceable JPEG-LS GR prefix with location information can reduce the codeword size.
This paper identifies the possibility that the JPEG-LS GR codeword can still be shortened using a simple method; that is, the location information is used instead of the replaceable JPEG-LS GR prefix.
The location map consists of the simple (row, col) coordinates of such JPEG-LS GR code in this paper.
At a position (row, col) = (339, 211) of the 512x512 image in Table 1, for example, the JPEG-LS GR code is [00000000000000000000000|1|01101110.sub.(2)], and a replaceable prefix [000000000000000000000001.sub.(2)] is encountered.
When the replaceable prefix is encountered for a pixel that is quantized by eight bits, the manifestation of the leading 23 zeros means that this sample is encoded by the JPEG-LS GR method, whereby the value of the quotient q [greater than or equal to] 23 and the suffix value is [N.sub.D] - 1; that is, the replaceable prefix does not occur whenever q < 23.