Title: JPEG-LS -- The new standard of lossless image compression
1JPEG-LS-- The new standard of lossless image
compression
- School of Computer Science,
- University of Central Florida,
- VLSI and M-5 Research Group
2Predictive encoding
- Q why prediction?
- A to produce a more skewed set of sequence for
entropy encoder
Original sequence 20 21 125 126 30 31 32
Prediction errors 20 1 104 1 -96 1 1
Prediction example
3Predictive encoding
- Lossless JPEG
- JPEG-LS
- CALIC
4Whats wrong with Lossless JPEG ?
- Lossless JPEG uses static predictor. The
prediction model is determined before the
compression starts
5JPEG-LS is better because
- Dynamic predictor. The predictor is determined
dynamically - Simple edge detection algorithm is introduced to
determine the predictor. - Prediction refinement
6JPEG-LS initial prediction
Prediction algorithm
- If c ? max(a, b)
- X min(a, b)
- Else
-
- If c ? min(a, b)
- X max(a, b)
- Else
- X a b- c
-
- X is the pixel being encoded
- a, b and c used for initial prediction
7JPEG-LS initial prediction example
- X is predicted as 100 since a vertical edge is
detected
- X is predicted as 102 since a horizontal edge is
detected
8JPEG-LS refine the prediction
- JPEG-LS maintains 365 contexts. it is used to
describe the local characteristics of pixels. - Context of X is computed from a, b and d
- Each context maintains a bias, which can be
considered as an evaluation of the predictors
performance for that particular context. - The bias is used for refinement of the initial
prediction - X X Bq
- where X is the initial prediction, X is the
refined prediction, q is the context of X and B
is the bias
9JPEG-LS prediction refinement example
- X 100
- Suppose X is in context q and Bq -1, then X
100 (-1) 101
10JPEG-LS compute the prediction error, update the
bias
- Compute the prediction error as
- Prediction Error X X
- Update the context-dependent bias
11Ready for entropy encoding? Wait
12JPEG-LS Re-mapping example
- If the pixel value is in range 0, 255, the
prediction error is in range -255, 255 - A larger range means more bits to represent the
prediction error - We need to re-map the prediction errors to 0,
255, is it possible? - Yes. Since the prediction error always in range
-x, 255-x
13JPEG-LS Re-map residuals
The following example assumes pixel value is in
0, 7
-3 -2 -1 0 1 2 3 4
6 4 2 0 1 3 5 7
Mistake in David Salomons book? X 2x if
xgt0 X 2x-1 otherwise
-3 -2 -1 0 1 2 3 4
5 3 1 0 2 4 6 8
14JPEG-LS entropy encoding
- Finally entropy encoder is applied.
15Summary of the basic steps of JPEG-LS
- Find the initial prediction X
- Refine prediction by considering the bias of the
context - Compute the prediction error (residual) and
update the bias of that context - Re-map residuals
- Encode residuals using Golomb-Rice coder