Image data compressing apparatus
Abstract
A DCT coefficient output from a DCT circuit 21 is quantized by different quantization outputs by quantization circuits 22 to 25, and code lengths obtained by encoding the respective quantization outputs are calculated by code length calculation circuits 28 to 31. The code lengths corresponding to one frame obtained by the code length calculation circuits 28 to 31 are accumulated by adders 33 to 36, thereby obtaining a plurality of calculated total bit counts corresponding to the plurality of quantization coefficients. A comparator 37, multipliers 38 and 39, and an adder 40 select, of the plurality of calculated total bit counts, two calculated total bit counts that are close to a target total bit count, and obtain a scale factor used for obtaining a quantization coefficient corresponding to the target total bit count. An optimum quantization coefficient for the subsequent second scanning operation is generated by a quantization coefficient generator 27 by using the scale factor.
Claims
exact text as granted — not AI-modifiedWe claim:
1. An image data compression apparatus for compressing image data comprising: DCT means for receiving block data obtained by dividing the image data into blocks of data and for obtaining DCT coefficients by performing a discrete cosine transformation of the block data; main quantizing means for obtaining a optimum quantization output by quantizing, in accordance with an optimum quantization coefficient, the DCT coefficients obtained by the DCT means; main encoding means for obtaining an encoded output by variable length encoding the optimum quantization output from the main quantizing means; and optimum compression characteristic determining means for receiving the optimum quantization output from the main quantizing means, for generating the optimum quantization coefficient to be used by the main quantizing means, and for feeding back the optimum quantization coefficient to the main quantizing means; wherein the optimum compression characteristic determining means generates the optimum quantization coefficient by: quantizing the DCT coefficients through the use of a plurality of different quantization coefficients during a first scanning period corresponding to one frame of the image data so as to produce a plurality of quantization outputs; encoding the plurality of quantization outputs; obtaining a plurality of total bit counts corresponding to the encoded plurality of quantization outputs; and executing a predetermined operation by using at least one of the plurality of total bit counts which is approximate to a target total bit count, and thereby generating the optimum quantization coefficient.
2. An image data compressing apparatus according to claim 1, characterized in that said optimum compression characteristic determining means comprises a plurality of quantization circuits for receiving the DCT coefficient and quantizing the DCT coefficient by different quantization coefficients, calculating means for calculating code lengths obtained by encoding quantization outputs output from said plurality of quantization circuits, thereby obtaining the plurality of calculated total bit counts corresponding to the plurality of quantization outputs, and means for generating the optimum quantization coefficient for the input image data from the operation result obtained by using one of the plurality of calculated total bit numbers obtained by said calculating means which is close to the target total bit count.
3. An image data compressing apparatus according to claim 1, characterized in that said optimum compression characteristic determining means comprises operating means for receiving the quantization output from said quantizing means, and obtaining a plurality of quantization outputs by multiplying the quantization output by different factors, calculating means for calculating code lengths obtained by encoding the plurality of quantization outputs, thereby obtaining the plurality of calculated total bit counts corresponding to the plurality of quantization outputs, and means for generating the optimum quantization coefficient for the input image data from the operation result obtained by using one of the plurality of calculated total bit counts obtained by said calculating means which is close to the target total bit count.
4. An image data compressing apparatus according to claim 1, characterized in that said optimum compression characteristic determining means comprises bit shift means for receiving the quantization output from said quantizing means and obtaining a plurality of quantization outputs by subjecting the quantization output to bit shifting for different bit counts, calculating means for calculating code lengths obtained by encoding the plurality of quantization outputs, thereby obtaining the plurality of calculated total bit counts corresponding to the plurality of quantization outputs, and means for generating the optimum quantization coefficient for the input image data from the operation result obtained by using one of the plurality of calculated total bit counts obtained by said calculating means which is close to the target total bit count.
5. An image data compressing apparatus according to claim 1, characterized in that said optimum compression characteristic determining means comprises means for cyclically supplying a plurality of types of quantization coefficients to said quantizing means during the first scanning period in the time-division manner, and obtaining a plurality of quantization outputs, calculating means for calculating code lengths obtained by encoding the plurality of quantization outputs, thereby obtaining the plurality of calculated total bit counts corresponding to the plurality of quantization outputs, and means for generating the optimum quantization coefficient for the input image data from the operation result obtained by using one of the plurality of calculated total bit counts obtained by said calculating means which is close to the target total bit count.
6. An image data compressing apparatus according to claim 5, characterized in that said means, of said optimum compression characteristic determining means, for obtaining the plurality of quantization outputs is commonly used as said main quantizing means.
7. An image data compressing apparatus according to claim 1, characterized in that said optimum compression characteristic determining means comprises operating means for receiving the quantization output from said quantizing means and supplying different factors to the quantization output, thereby obtaining a plurality of quantization outputs, calculating means for calculating code lengths obtained by encoding the plurality of quantization outputs, thereby obtaining the plurality of calculated total bit counts corresponding to the plurality of quantization outputs, and means for generating the optimum quantization coefficient for the input image data from the operation result obtained by using one of the plurality of calculated total bit counts obtained by said calculating means which is close to the target total bit count.
8. An image data compression apparatus according to claim 1, wherein the optimum compression characteristic determining means comprises: means for dividing the image data into the blocks of data by intermittently extracting portions of one frame of data from the image data and for cyclically supplying the extracted portions of the one from of the image data to the DCT means as the block data during the first scanning period; means for quantizing, through the use of the plurality of different quantization coefficients, the DCT coefficients produced by the DCT means which has been cyclically supplied with the extracted portions of the one frame of the image data; encoding means for encoding the plurality of quantization outputs; means for obtaining the total bit counts corresponding to the encoded plurality of quantization outputs; and means for executing the predetermined operation.
9. An image data compression apparatus according to claim 8, wherein: the encoding means is also used as the main encoding means; and the means for executing the predetermined operation uses, as the at least one of the plurality of total bit counts which is approximate to the target total bit count, a first and a second approximate total bit count, which are selected from said plurality of calculated total bit counts to be approximate to the target total bit count and are larger than and smaller than the target total bit count, respectively.
10. An image data compressing apparatus according to claim 1, characterized in that said optimum compression characteristic determining means comprises means for cyclically supplying block data of blocks interlaced from all blocks corresponding to one frame of the input image data to said DCT circuit, means for supplying different types of quantization coefficients to a DCT coefficient of each cycle, thereby obtaining a plurality of quantization outputs in the time-division manner, calculating means for calculating code lengths obtained by encoding the plurality of quantization outputs, thereby obtaining the plurality of calculated total bit counts corresponding to the plurality of quantization outputs, means for detecting, from the plurality of calculated total bit counts obtained by said calculating means, two approximate calculated total bit counts close to the target total bit count and larger and smaller, respectively, than the target total bit count, and generating the optimum quantization coefficient of the input image data from the operation result performed by using the two approximate calculated total bit counts, frequency distribution generating means for receiving the plurality of quantization outputs, and calculating distributions of generation frequencies of respective data of the plurality of quantization outputs, when the plurality of calculated total bit counts are obtained, thereby generating a plurality of frequency distributions, code generating means for receiving, of the plurality of frequency distributions generated by said frequency distribution generating means, a frequency distribution corresponding to at least the two approximate calculated total bit counts, and generating an optimum variable length code table corresponding to the selected frequency distribution, and generating means for supplying the optimum variable length code table generated by said code generating means to said main encoding means.
11. An image data compressing apparatus according to claim 1, characterized in that said optimum compression characteristic determining means comprises means for cyclically supplying block data of blocks interlaced from all blocks corresponding to one frame of the input image data to said DCT circuit, means for supplying different types of quantization coefficients to a DCT coefficient of each cycle, thereby obtaining a plurality of quantization outputs in the time-division manner, calculating means for generating a value (address) to which a code corresponding to each quantization output is assigned, and detecting a code length of each quantization output by using the generated address, thereby obtaining code lengths obtained by encoding the plurality of quantization outputs, and obtaining the plurality of calculated total bit counts corresponding to the plurality of quantization outputs, means for detecting, from the plurality of calculated total bit counts obtained by said calculating means, two approximate calculated total bit counts close to the target total bit count and larger and smaller, respectively, than the target total bit count, and generating the optimum quantization coefficient of the input image data from the operation result performed by using the two approximate calculated total bit counts, frequency distribution generating means for calculating distributions of generation frequencies of respective data of the plurality of quantization outputs by using the address generated by said calculating means, when the plurality of calculated total bit counts are obtained, thereby generating a plurality of frequency distributions, code generating means for receiving, of the plurality of frequency distributions generated by said frequency distribution generating means, a frequency distribution corresponding to at least the two approximate calculated total bit counts, and generating an optimum variable length code table corresponding to the selected frequency distribution, and generating means for supplying the optimum variable length code table generated by said code generating means to said main encoding means.
12. An image data compressing apparatus according to claim 1, characterized by further comprising activity calculating means for receiving the DCT coefficient output from said DCT circuit and calculating an activity representing fineness of an image, and bit distributing means for supplying an output from said activity calculating means, determining a preset bit count of each block in units of blocks in accordance with the fineness of the image, and supplying the preset bit count to said main encoding means.
13. An image data compressing apparatus according to claim 12, characterized in that said main encoding means has Haffman coding means for encoding at least an AC term of a quantization output obtained from said main quantizing means in accordance with Haffman coding, EOB inserting means for receiving an output from said Haffman coding means and capable of inserting an end-of-block code in an encoded output corresponding to the block, and bit count calculating means for supplying the output from said Haffman coding means, calculating a bit count of the encoded output corresponding to the block, and supplying an EOB insertion command signal to said EOB inserting means when a calculation result reaches the preset bit count.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.