Variable length coding/decoding method of image data and apparatus thereof
AssigneeSamsung Electronics Co., Ltd.
InventorJe-Chang Jung
Life of this patent
Estimating the term…
Abstract
A method of variable length coding/decoding of image data and an apparatus thereof can vary the length of an escape sequence during variable length coding to thereby reduce the amount of transmitted data. The method of variable length coding/decoding includes the steps of loading an initial potential maximum run length; determining a number of bits necessary to express the potential maximum run length; coding a run length using the necessary number of bits and decreasing the potential maximum run length by an amount equal to the previously coded run length to arrive at a new potential maximum run length until an end of a block to be encoded has been reached.
Claims7
A method of variable length coding of image data, the method comprising the steps of:
- dividing the image data into a plurality of blocks, each said block formed of N.times.N pixels, wherein N is an integer;
- transforming each said block to obtain transform coefficients of each said block;
- quantizing said transform coefficients of each said block;
- scanning said quantized transform coefficients in a predetermined pattern within each said block to arrange the quantized transform coefficients into a one-dimensional sequence of transform coefficients;
- converting said one-dimensional sequence into symbol data having a run component and a level component;
- determining a potential maximum run value;
- (1) determining whether said symbol data is found within a regular region or an escape region;
- (2) assigning a Huffman code to said symbol data if said symbol data is within said regular region and outputting said Huffman code of said symbol;
- (3) if said symbol data is within said escape region,
- a) determining an escape code number of bits necessary to represent said potential maximum run value;
- b) assigning a run code having the escape code number of bits to the run component of said symbol data and outputting said assigned run code of said run length;
- c) decrementing said maximum run potential value by a value equal to said run component plus one;
- d) determining a number of level bits based upon a quantization step size value;
- e) assigning a code to said level component using said number of determined level bits and outputting said assigned level code of said level component;
- (4) determining if an end of the block has been reached, and asserting an end of block signal if the end of the block has been determined;
- and
- if the end of the block has not been reached, repeating steps (1)-(4).
A method of variable length coding of image data, the method comprising the steps of:
- dividing the image data into a plurality of blocks, each said block formed of N.times.N pixels, wherein N is an integer;
- transforming each said block to obtain transform coefficients of each said block;
- quantizing said transform coefficients of each said block;
- scanning said quantized transform coefficients in a predetermined pattern within each said block to arrange the quantized transform coefficients into a one-dimensional sequence of transform coefficients;
- converting said one dimensional sequence into symbol data having a run component and a level component;
- determining a potential maximum run value;
- (1) determining whether said symbol data is found within a regular region or an escape region;
- (2) if said symbol data is found in the regular region, assigning a Huffman code to said symbol data,
- (3) if said symbol data is found in the regular region,
- a) determining an escape code number of bits necessary to represent said potential maximum run value;
- b) assigning a run code having the escape code number of bits to the run component of said symbol data;
- c) decrementing said potential maximum run value by a value equal to said run component plus one;
- d) determining a number of level bits based upon a quantization step size value;
- e) assigning a code using said number of determined level bits to said level component;
- f) outputting said assigned Huffman code if a number of bits of said assigned Huffman code is less than a number of bits of said escape codes of said run length and level codes together;
- g) outputting said escape codes of said run length and level codes together if the number of bits of said escape code of said run length and level codes together is less than the length of the assigned Huffman code;
- (4) if said symbol data is within said escape region,
- a) determining an escape code number of bits necessary to represent said potential maximum run value;
- b) assigning a run code having the escape code number of bits to the run component of said symbol data and outputting said assigned run code of said run length;
- c) decrementing said maximum run potential value by a value equal to said run component plus one;
- d) determining a number of level bits based upon a quantization step size value;
- e) assigning a code using said number of determined level bits to said level component and outputting said assigned level code of said level component;
- (5) determining if an end of the block has been reached, and asserting an end of block signal if the end of the block has been reached;
- and
- if the end of the block has not been reached, then repeating steps (1)-(5).
An apparatus for variable length coding of image data, the apparatus comprising:
- first means for dividing the image data into a plurality of blocks, each said block formed of N.times.N pixels, wherein N is an integer;
- second means for transforming each said block to obtain transform coefficients of each said block;
- third means for quantizing said transform coefficients of each said block;
- fourth means for scanning said quantized transform coefficients in a predetermined pattern within each said block to arrange the quantized transform coefficients into a one-dimensional sequence of transform coefficients;
- fifth means for converting said one dimensional sequence into symbol data having a run component and a level component;
- sixth means for determining a potential maximum run value;
- seventh means for determining whether said symbol data is found within a regular region or an escape region, assigning a Huffman code to said symbol data if said symbol data is within said regular region and outputting said Huffman code of said symbol;
- eighth means for determining an escape code number of bits necessary to represent said potential maximum run value, assigning a run code having the escape code number of bits to the run component of said symbol data and outputting said assigned run code of said run length, and decrementing said potential maximum run value by a value equal to said run component plus one;
- ninth means for determining a number of level bits based upon a quantization step size value, assigning a code to said level component using said number of determined level bits and outputting said assigned level code of said level component;
- tenth means for determining if an end of the block has been reached, and for outputting an end of block signal.
Dependencies are inferred from the claim text.