摘要 |
<p>PROBLEM TO BE SOLVED: To provide a Huffman encoding device and a Huffman encoding method capable of easily changing the compression ratio of data, and to provide a recording medium in which Huffman encoding processing program is recorded. SOLUTION: A quantizer 20 quantizes a DCT coefficient SUV outputted from a DCT transformer 10 and outputs a quantized DCT coefficientγUV. When the absolute value of the quantized DCT coefficientγUV is equal to or smaller than a threshold TH, the DCT coefficientγUV is regarded as an invalid coefficient by a comparator 30, and when the absolute value of the quantized DCT coefficientγUV is greater than the threshold TH, the DCT coefficientγUV is regarded as a valid coefficient. A run length counter 40 counts the number of continuous invalid coefficients, outputs a run length RL and outputs a valid coefficient VC. On the basis of the valid coefficient VC and the run length RL, an encoder 50 performs Huffman encoding and outputs encoded data.</p> |