Encoding method and apparatus for compressing a data structure having two or more dimensions, decoding method, and storage medium
AssigneeCanon Kabushiki Kaisha
InventorYoichi Sakamoto
Life of this patent
Estimating the term…
Abstract
On the basis of a bit sequence of a given command code, it is determined to which of repetition, copying and raw-data substitution the bit sequence applies. Based upon the result of the determination made, the data lengths of each of repetition, copying and raw data are calculated. In accordance with the calculations, at least two results from among results of repetition, copying and raw-data substitution of the encoding are combined and encoded as a command of one byte.
Claims22
A decoding method comprising the steps of:
- receiving an encoded code sequence and analyzing an encoded command included in the encoded code sequence, wherein the encoded command is one byte code and comprises high-order bits indicating combination of a plurality of encoding modes, mid-order bits indicating byte lengths of one encoding mode and low-order bits indicating byte lengths of another encoding mode:
- determining, based upon the high-order bits of the encoded command, to which combination of repetition, copying and raw-data substitution the code sequence applies;
- decoding each encoded command of the encoded code sequence, in accordance with a result determined in said determining step, by a combination of at least two conversion operations from among repetition, copying and raw-data substitution and by the byte lengths specified by the mid-order bits and the low-order bits;
- and
- outputting the decoded data obtained in said decoding step.
An encoding method comprising the steps of:
- determining, based upon a bit sequence of a given command code, to which of repetition, copying and raw-data substitution the bit sequence applies;
- calculating data lengths of each of repetition, copying and raw data substitution based upon a determination performed in said determining step;
- and
- in accordance with calculations made in said calculating step, encoding the bit sequence in a unit of one byte encoded command by combining at least two encoding modes from among repetition, copying and raw-data substitution,
- wherein the one byte encoded command comprises high-order bits indicating combination of a plurality of encoding modes, mid-order bits indicating byte lengths of one encoding mode and low-order bits indicating byte lengths of another encoding mode.
A computer-readable storage medium storing a program for decoding encoded image data of two or more dimensions correlated in horizontal and vertical directions, wherein the program comprises:
- code of a step of receiving an encoded code sequence and analyzing an encoded command included in the encoded code sequence, wherein the encoded command is one byte code and comprises high-order bits indicating combination of a plurality of encoding modes, mid-order bits indicating byte lengths of one encoding mode and low-order bits indicating byte lengths of another encoding mode;
- code of a step of determining, based upon the high-order bits of the encoded command, to which combination of repetition, copying and raw-data substitution the code sequence applies;
- code of a step of decoding each encoded command of the encoded code sequence, in accordance with a result determined by the determining code, by a combination of at least two conversion operations from among repetition, copying and raw-data substitution and by the byte lengths specified by the mid-order bits and the low-order bits;
- and
- code of a step of outputting the decoded data by the decoding code.
A computer-readable storage medium storing a program for encoding image data of two or more dimensions correlated in horizontal and vertical directions, wherein the program comprises:
- code of a step of determining, based upon a bit sequence of a given command code, to which of repetition, copying and raw-data substitution the bit sequence applies;
- code of a step of calculating data lengths of each of repetition, copying and raw data substitution based upon a determination by said determining code;
- and,
- in accordance with calculations by said calculating code, code of a step of encoding the bit sequence in unit of one byte encoded command by combining at least two encoding modes from among repetition, copying and raw data substitution,
- wherein the one byte encoded command comprises high-order bits indicating combination of a plurality of encoding modes, mid-order bits indicating byte lengths of one encoding mode and low-order bits indicating byte lengths of another encoding mode.
A decoding apparatus comprising:
- means for receiving an encoded code sequence and analyzing an encoded command included in the encoded code sequence, wherein the encoded command is one byte code and comprises high-order bits indicating combination of a plurality of encoding mode, mid-order bits indicating byte lengths of one encoding mode and low-order bits indicating byte lengths of another encoding mode;
- means for determining, based upon the high-order bits of the encoded command, to which combination of repetition, copying and raw-data substitution the code sequence applies;
- means for decoding each encoded command of the encoded code sequence, in accordance with a result determined by said determining means by a combination of at least two conversion operations from among repetition, copying and raw-data substitution and by the byte lengths specified by the mid-order bits and the low-order bits;
- and;
- means for outputting the decoded data obtained in said decoding means.
An encoding apparatus comprising:
- means for determining, based upon a bit sequence of a given command code, to which of repetition, copying and raw-data substitution the bit sequence applies;
- means for calculating data lengths of each of repetition, copying and raw data substitution based upon a determination by said determining means;
- and,
- in accordance with calculations by said calculating means, means for encoding the bit sequence in unit of one byte encoded command by combining at least two encoding modes from among repetition, copying and raw-data substitution,
- wherein the one byte encoded command comprises high-order bits indicating combination of a plurality of encoding modes, mid-order bits indicating byte lengths of one encoding mode and low-order bits indicating byte lengths of another encoding mode.
Dependencies are inferred from the claim text.