The entropy compression may be performed through the following operations.
1) If a block constituting an occupancy map is fully occupied, encode 1 and repeat the same operation for the next block of the occupancy map. Otherwise, encode 0 and perform operations 2) to 5).
2) Determine the best traversal order to perform run-length coding on the occupied pixels of the block. The figure shows four possible traversal orders for a 4*4 block.
As described above, the entropy compressor according to the embodiments may code (encode) a block based on the traversal order scheme as described above.
For example, the best traversal order with the minimum number of runs is selected from among the possible traversal orders and the index thereof is encoded. The figure illustrates a case where the third traversal order in
3) Encode the number of runs. In the example of
4) Encode the occupancy of the first run. In the example of
5) Encode lengths of the individual runs (as many as the number of runs). In the example of