Variable length encoding method and variable length decoding method
Abstract
This record has no abstract on file.
Term
Term ended
Expired 22 November 2022, 3.8 years ago.
- Priority
- Filed
- Granted
- Expired
- Today
2 claims: 1 independent, 1 dependent
- 1It is a decoding method that decodes the coefficient value of the encoded frequency component in a variable length.A selection step of selecting a code table based on the number information of undecoded zero coefficients indicating the number of zero coefficients corresponding to undecoded run values among the coefficients having a coefficient value of zero.A decoding step of variable-length decoding of the undecrypted run value using the selected code table, andHave,A decoding method characterized by that. 符号化された周波数成分の係数値を可変長復号化する復号化方法であって、前記係数値がゼロの係数のうち、復号化されていないラン値に対応するゼロ係数の個数を示す未復号化ゼロ係数の個数情報に基づいて符号表を選択する選択ステップと、前記選択された符号表を用いて前記復号化されていないラン値を可変長復号化する復号化ステップと、を有する、ことを特徴とする復号化方法。
408 paragraphs, as filed
[Technical field to which the invention belongs] The present invention<u style="single">Decryption method</u>In particular, a plurality of coefficients (quantization coefficients) obtained by quantizing the frequency components of image data.<u style="single">Variable length coded data</u>It relates to a method of restoring a plurality of coefficients by a variable length decoding process.
[0002] [Conventional Technology] In recent years, we have entered the multimedia era in which audio, images, and other information are handled in an integrated manner, and we are providing information from conventional information media, that is, information such as newspapers, magazines, televisions, radios, and telephones to people. Means of communication have come to be the subject of multimedia. In general, multimedia refers to expressing not only characters but also figures, sounds, especially images, etc. in association with each other at the same time. However, in order to make the above-mentioned conventional information media a target of multimedia, the information is converted into a digital format. Is an indispensable condition.
However, when the amount of information handled by each of the above information media is estimated as the amount of digital information, the amount of information per character is 1 to 2 bytes in the case of characters, whereas it is 64 kbits per second in the case of voice. (Telephone quality), and more than 100 Mbits per second (current TV reception quality) or more is required for video, and it is not realistic to handle the huge amount of information as it is in digital format with the above information media. For example, videophones have already been put into practical use by the Integrated Services Digital Network (ISDN), which has a transmission speed of 64 kbps to 1.5 Mbps, but the output video of a TV camera with a large amount of information is directly used in ISDN. It is impossible to send.
[0004] Therefore, information compression technology is required. For example, in the case of videophones, H.261 and H.261 have been internationally standardized by the ITU-T (International Telecommunication Union Telecommunication Standardization Division). 263 standard video compression technology is used. In addition, according to the MPEG-1 standard information compression technology, it is possible to put image information together with audio information on a normal music CD (compact disc).
[0005] Here, MPEG (Moving Picture Experts Group) is an international standard for digital compression of moving image signals, and MPEG-1 is an international standard for moving image signals up to 1.5 Mbps, that is, about 100 minutes of TV signal information. It is a standard that compresses to 1 of. In addition, since the transmission speed for the MPEG-1 standard is mainly limited to about 1.5 Mbps, the moving image signal is 2 to 15 Mbps in the MPEG-2 standardized to meet the demand for higher image quality. Is compressed to.
[0006] Furthermore, at present, MPEG-4 with a higher compression ratio has been standardized by a working group (ISO / IEC JTC1 / SC29 / WG11) that has been standardizing with MPEG-1 and MPEG-2. Initially, MPEG-4 introduced powerful error tolerance technology that not only enables highly efficient coding at low bit rates, but also reduces subjective image quality deterioration even if transmission line errors occur. .. In addition, ITU-T is advancing standardization activities for H.26L as a next-generation image coding method, and at present, the coding method called Test Model 8 (TML8) is the latest.
[0007] FIG. 30 is a block diagram showing a conventional image coding apparatus. The image coding device 201a blocks the input image signal Vin so as to correspond to a unit area (block) composed of a certain number of pixels, and outputs a blocked image signal BlkS, and a blocker Blk thereof. It has a frequency converter Trans that converts the frequency of the output BlkS and outputs the frequency component TransS corresponding to each block. Here, the block is a region of a predetermined size in a picture (image space), which is a unit of coding processing of an image signal, and is composed of a fixed number of pixels. Here, the image signal Vin corresponds to a moving image composed of a plurality of pictures.
[0008] Further, the image coding device 201a is a quantization device Q that quantizes the output (frequency component) TransS of the frequency converter and outputs the quantization component (quantization coefficient) QS corresponding to each block. And the encoder RLE0a that performs variable-length coding processing on the output (quantization component) QS of the quantizer.
[0009] Next, the operation will be described. When the image signal Vin is input to the image encoding device 201a, the blocker Blk divides the input image signal Vin into block-based image signals, and the image signal corresponding to each block (blocked image). Signal) Generate BlkS. The frequency converter Trans converts the blocked image signal BlkS into a frequency component TransS using DCT (discrete cosine transform), wavelet transform, or the like. The quantizer Q quantizes the frequency component TransS based on the quantization parameter QP in a predetermined quantization step, outputs the quantization component QS, and outputs the quantization parameter QP. Then, the encoder RLE0a performs a variable-length coding process on the quantization component QS and outputs a coded stream Str0a.
[0010] FIG. 31 is a block diagram for explaining the encoder RLE0a constituting the image coding device 201a. This encoder RLE0a is a zigzag scan device Scan that converts the output (quantization component) QS of the quantizer Q having a two-dimensional array into the quantization component Coef having a one-dimensional array (that is, in a predetermined order). It also has a variable-length encoder VLC that performs variable-length coding processing on the quantization component Coef output from the zigzag scan device Scan. When the quantization component QS output from the quantizer Q is input to such a encoder RLE0a, the zigzag scan device Scan scans the quantization component QS having a two-dimensional array from the quantizer Q. It is converted to a quantization component Coef having a one-dimensional array (predetermined order) and output.
[0011] FIG. 43 is a diagram for specifically explaining the conversion process of the quantized component QS in the zigzag scan device Scan. As shown in FIG. 43, the quantization component QS output from the quantizer Q is a two-dimensional array, that is, each quantization component QS has its horizontal frequency on the two-dimensional frequency domain Fr. It has an array arranged in a matrix according to the height of the frequency and the height of the frequency in the vertical direction.
[0012] The zigzag scan device Scan performs a process of scanning the quantization component QS having a two-dimensional array in a zigzag manner as shown by arrows Y1 to Y7, and quantizes the quantization component QS having a one-dimensional array. Convert to component Coef. That is, by this scan process, a predetermined order along the scan path is set for a plurality of quantization components QS having a two-dimensional array.
Then, the variable-length encoder VLC uses a code table showing the correspondence between the numerical value indicating the magnitude of the quantization component and the code (code word), and the quantum output from the zigzag scan device Scan. A code is assigned to the coded component Coef, and the quantization component is converted to the coded stream Str0a for each block.
[0014] FIG. 32 is a block diagram for explaining an image decoding device 202a corresponding to the image coding device 201a shown in FIG. 30. The image decoding device 202a decodes the coded stream Str0a output from the conventional image coding device 201a shown in FIG. The image decoding device 202a includes a decoder RLD0a that performs decoding processing on the coded stream Str0a output from the image coding device 201a, and an output (decoding quantization component) DQS of the decoder RLD0a. It has an inverse quantizer IQ that performs dequantization processing on the image.
[0015] Further, the image decoding device 202a includes a reverse frequency converter ITrans that performs reverse frequency conversion processing on the output (decoding frequency component) ITransS of the reverse quantizer IQ, and the reverse frequency converter ITrans. It has a deBlk device that generates a decoded image signal Vout corresponding to each picture based on the output (decoded blocked image signal) DBlkS.
[0016] Next, the operation will be described. When the coded stream Str0a from the image coding device 201a is input to the image decoding device 202a, the decoder RLD0a performs a decoding process on the coded stream Str0a to perform the decoding quantization component DQS. Is output. The operation of the decoder RLD0a is opposite to the operation of the encoder RLE0a.
[0017] Further, the inverse quantizer IQ performs the reverse operation of the quantizer Q, that is, the operation of dequantizing the decoding quantization component DQS with reference to the quantization parameter QP, to obtain the decoding frequency component ITransS. Output. Further, the inverse frequency converter ITrans performs the reverse operation of the frequency converter Trans, that is, the operation of restoring the decoded frequency component ITransS to the decoded image signal DBlkS corresponding to each block by using the inverse DCT or the inverse wavelet transform. Then, the deBlk device DeBlk integrates the decoded image signal DBlkS of each block and outputs the decoded image signal Vout corresponding to each picture.
[0018] FIG. 33 is a block diagram for explaining a decoder RLD0a constituting the image decoding device 202a. This decoder RLD0a performs variable-length decoding processing on the coded stream Str0a to decode the quantization component Coef corresponding to each code contained in the coded stream Str0a. And an inverse zigzag scan device IScan that restores the decoding quantization component DQS having a two-dimensional array from the decoding quantization component Coef having a one-dimensional array output from the variable length decoder VLD. ing.
In such a decoder RLD0a, the variable length decoder VLD decodes the coded stream Str0a by the reverse operation of the variable length encoder VLC, and the quantum corresponding to the code (code word). Output the quantized component Coef. Then, the inverse zigzag scan device IScan operates in the opposite manner to the zigzag scan device Scan, and the quantization component Coef having a one-dimensional array output from the variable length decoder VLD is converted into a decoding quantum having a two-dimensional array. It is restored to the conversion component DQS and output to the above inverse quantizer IQ. Patent Document 1 discloses a method of dividing an image signal into a luminance signal and a color difference signal and performing variable length coding processing.
By the way, a plurality of quantization coefficients in which a certain order is set corresponding to each of the above blocks have a coefficient (0 coefficient) whose value is 0 after a coefficient whose value is not 0 (non-zero coefficient). ) Is highly redundant data such as multiple consecutive). Therefore, in the coding of such a quantization coefficient, a method of coding by excluding the redundant information, for example, a run value indicating the number of consecutive 0 coefficients and a non-following 0 coefficient A run-length coding method is used in which the quantization coefficient is encoded using a level value indicating the value of the 0 coefficient.
[0021] Hereinafter, a conventional image coding apparatus using the run-length coding method will be described. FIG. 34 is a block diagram showing a conventional image coding device that performs run-length coding. This image coding device 201b encodes the output (quantization component) QS of the quantizer Q by performing run-length coding instead of the encoder RLE0a in the image coding device 201a shown in FIG. It is provided with a run-length encoder RLE0b that outputs a stream Str0b, and other configurations are the same as those of the image encoding device 201a.
Further, the operation of the image coding device 201b is different from that of the image coding device 201a only in the operation of the encoder RLE0b.
FIG. 35 is a block diagram showing a specific configuration of the encoder RLE0b of the image coding device 201b. Like the above-mentioned encoder RLE0a, this run-length encoder RLE0b is a quantum having a one-dimensional array (that is, a predetermined order) of the output (quantization component) QS of the quantizer Q having a two-dimensional array. It has a zigzag scan device Scan that converts to the quantized component Coef.
[0024] Then, this run-length encoder RLE0b measures the number of continuous quantization component (0 coefficient) Coefs whose value is 0, and indicates the number of consecutive 0 coefficients Run value Run. RunCal, a run measuring instrument that outputs the value of, and the level value Lev that measures the value of the quantization component Coef (non-zero coefficient) whose value is not 0 following the 0 coefficient and outputs the value of the non-zero coefficient. It has a measuring instrument LevCal.
Further, this run-length encoder RLE0b performs a variable-length coding process on the level value Lev, which is the output of the level measuring instrument LevCal, and outputs a code string (level value code string) LStr. The variable length encoder RunVLC that outputs the code string (run value code string) RStr by applying variable length coding processing to the run value Run, which is the output of the run measuring instrument RunCal, and the above level value code. It has a multiplexing device MUX that multiplexes the column LStr and the run value code string RStr for each block and outputs the multiplex coded stream Str0b.
[0026] Next, the operation will be described. The zigzag scanner Scan converts the quantization component QS having a two-dimensional array output from the quantizer Q into a quantization component Coef having a one-dimensional array (in a predetermined order) and outputs it. The conversion process of the quantized component QS by the zigzag scan device Scan is performed in the same manner as that of the encoder RLE0a of the image coding device 201a.
[0027] Then, the run measuring instrument RunCal measures the number of consecutive 0 coefficients based on the quantization component Coef output from the zigzag scan device Scan, and outputs a run value Run indicating the number. Further, the level measuring instrument LevCal measures the value of the non-zero coefficient following the continuous 0 coefficient based on the quantization component Coef output from the zigzag scan device Scan, and obtains the level value Lev indicating this value. Output.
[0028] Here, when the run measuring instrument RunCal detects the highest frequency component (the last of the non-zero coefficients) in the target block to be processed, it is called EOB (the end of the block). A value is generated, and higher frequency components after that signal that the value is all 0.
[0029] Further, the variable-length encoder RunVLC assigns a code (code word) to the run value Run, which is an output of the run measuring device RunCal, by a code table or arithmetic calculation. The code string RStr is output by performing the conversion process, and the variable length encoder LevVLC signs the level value Lev, which is the output of the level measuring instrument LevCal, by a code table or arithmetic calculation. Outputs the code string LStr after performing variable-length coding processing to which codewords are assigned. Then, the multiplexing device MUX multiplexes the code string LStr and the code string RStr for each block and outputs a multiplex coded stream Str0b.
Here, in the multiplexing process of the code string LStr and the code string RStr, for example, for each block, after the code string RStr for all the run values corresponding to the target block, all the code string RStr corresponding to the target block. The code string LStr for the level value is followed, or the code string LStr for all the level values corresponding to the target block is followed by the code string RStr for all the run values corresponding to the target block.
[0031] In this way, a plurality of quantization coefficients having a certain order are subjected to a run value Run indicating the number of quantization component (0 coefficient) Coefs whose value is 0, and a value following the 0 coefficient. In an image encoder that encodes using a level value Lev that indicates the value of the non-zero quantization component Coef (non-zero coefficient), multiple quantization coefficients are coded with high coding efficiency by eliminating the redundant information. Can be quantized.
[0032] FIG. 36 is a block diagram for explaining an image decoding device 202b corresponding to the image coding device 201b shown in FIG. 34. The image decoding device 202b decodes the coded stream Str0b output from the conventional image coding device 201b shown in FIG. 34.
[0033] This image decoding device 202b is run-length decoding with respect to the coded stream Str0b output from the image coding device 201b instead of the decoding supply RLD0a in the image decoding device 202a shown in FIG. 32. It is provided with a run-length decoder RLD0b that performs a conversion process, and other configurations are the same as those of the image decoding apparatus 202a.
[0034] Further, the operation of the image decoding device 202b is different from that of the image decoding device 202a only in the operation of the decoder RLD0b. FIG. 37 is a block diagram showing a specific configuration of the run-length decoder RLD0b of the image decoding device 202b.
The run-length decoder RLD0b separates the code string LStr corresponding to the level value and the code string RStr corresponding to the run value from the multiple coding stream Str0b output from the image coding device 201b. The separator DMUX, the variable length decoder LevVLD that restores the level value Lev by performing variable length decoding processing on the code string LStr, and the run value Run that performs variable length decoding processing on the code string RStr. An inverse zigzag that restores the decoding quantization component DQS that has a two-dimensional array from the variable-length decoder RunVLD that restores the decoding quantization component that has a one-dimensional array represented by the level value Lev and the run value Run. It has a scan device IScan.
[0036] Next, the operation will be described. In the image decoding device 202b, the run-length decoder RLD0b operates in the opposite manner to the run-length encoder RLE0b. That is, the run-length decoder RLD0b separates the code string LStr corresponding to the level value and the code string RStr corresponding to the run value from the multi-coded stream Str0b.
[0037] Then, the variable-length decoder LevVLD decodes the code string LStr corresponding to the level value by the reverse operation of the variable-length encoder LevVLC, and outputs the level value Lev. Further, the variable-length decoder RunVLD decodes the code string RStr corresponding to the run value by the reverse operation of the variable-length encoder RunVLC, and outputs the run value Run.
[0038] The inverse zigzag scan device IScan performs decoding having a two-dimensional array from a quantization component having a one-dimensional array represented by the above level value Lev and run value Run by the operation opposite to that of the zigzag scan device Scan. The quantization component DQS is restored and output to the inverse quantizer IQ. However, unlike the reverse zigzag scanr IScan shown in FIG. 33, this reverse zigzag scanr IScan (see FIG. 37) has a level value Lev and a run value Run, and therefore the reverse zigzag scanr IScan shown in FIG. 37. Has the function of converting the coefficients represented by the level value Lev and the run value Run into the quantization component Coef.
[0039] In the decoding process for decoding a plurality of quantization coefficients having a certain order in this way, a run value Run indicating the number of quantization component (0 coefficients) Coefs whose value is 0, and the 0 In an image decoding device that uses a level value Lev that indicates the value of the non-zero quantization component Coef (non-zero coefficient) following the coefficient, multiple quantization coefficients are subjected to run-length coding to provide redundant information. The coded data obtained by coding with high coding efficiency by eliminating the above can be satisfactorily decoded.
[0040] Hereinafter, another example of the conventional image coding apparatus using the run-length coding method will be described. FIG. 38 is a block diagram showing another example of an image coding apparatus using a conventional run-length encoder. Almost all conventional image coding devices that comply with standards such as MPEG, ITU H.261, and H.263 and the currently being developed H.26L draft standard (TML8) have the configuration shown in Fig. 38. ..
[0041] Similar to the image coding device 201b shown in FIG. 34, the image coding device 201c encodes the quantization coefficient using the run value and the level value, but the image coding device 201c Does not perform variable-length coding of run values and level values separately as in the image coding device 201b, but performs variable-length coding processing on a pair consisting of run values and level values (run level pair). It is a thing.
That is, in the image coding device 201c, similarly to the image coding device 201b, the blocker Blk into which the image signal Vin is input, the frequency converter Trans that frequency-converts the output BlkS thereof, and the conversion thereof. It has a quantizer Q that quantizes the output (frequency component) TransS of the instrument. Then, the image coding device 201c performs run-length coding for converting the run-level pair consisting of the run value and the level value into a variable-length code for the output (quantization component) QS of the quantizer. It has a length encoder RLE0c.
Next, the operation will be described. The blocker Blk divides the image signal Vin into block-based image signals to generate a pixel value component (blocked image signal) BlkS. The frequency converter Trans converts the pixel value component BlkS into a frequency component TransS using DCT (discrete cosine transform), wavelet transform, or the like. The quantizer Q quantizes the frequency component TransS based on the quantization parameter QP, outputs the quantization component QS, and outputs the quantization parameter Q. The run-length encoder RLE0c applies run-length coding to the quantization component QS and outputs a coded stream Str0c.
[0044] Here, the block is a region of a predetermined size in a picture, which is a unit of coding processing of an image signal, and is composed of a fixed number of pixels. Further, here, the run-length coding includes a run value indicating the number of continuous quantization components (0 coefficient) whose value is 0, and a quantization component whose value is not 0 following the 0 coefficient. Processing to convert a pair with a level value indicating a (non-zero coefficient) value into a variable length code, in other words, one variable length code (codeword) for the above run value and level value pair (run level pair) This is the process of allocating.
Next, the run-length encoder RLE0c will be described in detail. FIG. 39 is a block diagram showing a conventional run-length encoder RLE0c. Similar to the run-length encoder RLE0b shown in FIG. 35, this run-length encoder RLE0c is a one-dimensional array (that is, a predetermined array) of the output (quantization component) QS of the quantizer Q having a two-dimensional array. A zigzag scan device Scan that converts to a quantization component Coef with (order) and a run measuring device that measures the number of continuous quantization component (0 coefficient) Coefs whose value is 0 and outputs a run value Run. It has a RunCal and a level measuring instrument LevCal that measures the value of the quantization component Coef (non-zero coefficient) whose value is not 0 following the 0 coefficient and outputs the level value Lev.
Then, this run length encoder RLE0c calculates the code number Code corresponding to the pair of the level value Lev and the run value Run based on the output of the run measuring instrument RunCal and the level measuring instrument LevCal in a code table or arithmetic calculation. It has a run-level code converter RunLevEnc calculated by the above, and a variable-length encoder VLC that assigns a code word to a code number Code and generates a coded stream Str0c corresponding to the above image signal Vin.
Next, the operation will be described. In this run-length encoder RLE0c, like the run-length encoder RLE0b, the zigzag scan device Scan has a one-dimensional array of the quantization component QS having a two-dimensional array output from the quantizer Q (predetermined). It is converted to a quantization component Coef having (order of) and output.
[0048] FIG. 43 is a diagram for specifically explaining the conversion process of the quantized component QS in the zigzag scan device Scan. As shown in FIG. 43, the quantization component QS output from the quantizer Q is a two-dimensional array, that is, each quantization component QS has its horizontal frequency on the two-dimensional frequency domain Fr. It has an array arranged in a matrix according to the size of the components and the size of the frequency components in the vertical direction.
[0049] The zigzag scan device Scan performs a process of scanning the quantization component QS having a two-dimensional array in a zigzag manner as shown by arrows Y1 to Y7, and quantizes the quantization component QS having a one-dimensional array. Convert to component Coef. That is, by this scan process, a predetermined order along the scan path is set for a plurality of quantization components QS having a two-dimensional array.
[0050] Then, the run measuring instrument RunCal measures the number of consecutive 0 coefficients based on the quantization component Coef output from the zigzag scan device Scan, and outputs a run value Run indicating the number. Further, the level measuring instrument LevCal measures the value of the non-zero coefficient following the continuous 0 coefficient based on the quantization component Coef output from the zigzag scan device Scan, and obtains the level value Lev indicating this value. Output. Here, when the run measuring instrument RunCal detects the highest frequency component (the last of the non-zero coefficients) in the target block to be processed, it generates a special value called EOB (the end of the block). Then, the higher frequency components after that notify that the values are all 0.
Further, the runlevel code converter RunLevEnc obtains a code number Code corresponding to a pair of the level value Lev and the run value Run based on the output of the run measuring instrument RunCal and the level measuring instrument LevCal. Calculate by arithmetic calculation. The variable-length encoder VLC encodes the code number Code obtained by the converter RunLevEnc, that is, assigns a code word (bit string) to the code number Code and generates a coded stream Str0.
[0052] FIG. 42 shows an example of a code table used in the run-length encoder RLE0c. The code table (first code table) T1 shown in FIG. 42 shows the code table of the DC component of the color difference signal conforming to the draft H.26L standard (TML8) under development. This code table T1 is a regular build VLC that can calculate the code number corresponding to the pair of level value and run value by arithmetic operation from the level value and run value, and the level value and run in arithmetic operation. It consists of an irregular part (table look up VLC) in which the code number corresponding to the pair of values cannot be calculated. A bit string (not shown) as a codeword corresponding to one-to-one is assigned to each code number Code, but a short code word is assigned to the code number Code having a small value.
Next, a conventional image decoding device corresponding to the image coding device 201c will be described. FIG. 40 is a block diagram showing an image decoding device 202c using the conventional run-length decoder RLD0c. The image decoding device 202c decodes the coded stream Str0c output from the conventional image coding device 201c shown in FIG. 39.
[0054] Similar to the image decoding device 202b shown in FIG. 36, the image decoding device 202c decodes the quantization coefficient using the run value and the level value, but the image decoding device 202c , The variable length decoding of the run value and the level value is not performed separately for the run value and the level value as in the image decoding device 202b, but the pair consisting of the run value and the level value (run level pair). Variable length decoding is performed.
That is, the image decoding device 202c performs run-length decoding processing using a run-level pair consisting of a run value and a level value on the coded stream Str0c output from the image coding device 201c. It has a run-length decoder RLD0c to be applied. Further, the image decoding device 202c is the same as the image decoding device 202b, and is a dequantizer IQ that performs dequantization processing on the output (decoding quantization component) DQS of the run-length decoder RLD0c. Based on the inverse frequency converter ITrans that performs inverse frequency conversion processing on the output (decoding frequency component) ITransS of the inverse quantizer IQ and the output (decoded pixel value component) DBlkS of the inverse frequency converter ITrans. It has a deBlk device that generates a decoded image signal Vout corresponding to each picture.
Next, the operation will be described. In the image decoding device 202c, the run-length decoder RLD0c operates in the opposite manner to the run-length encoder RLE0c. That is, the run-length decoder RLD0c performs run-length decoding processing on the coded stream Str0c and outputs the decoding quantization component DQS. The inverse quantizer IQ outputs the decoding frequency component ITransS by performing the operation opposite to that of the quantizer Q, that is, the operation of dequantizing the decoding quantization component DQS with reference to the quantization parameter QP. The inverse frequency converter ITrans operates in the opposite manner to the frequency converter Trans, that is, the decoded pixel value signal (decoded blocked image signal) DBlkS corresponding to each block by using the inverse DCT or the inverse wavelet transform of the decoding frequency component ITransS. Perform the operation to restore to. The inverse blocker DeBlk integrates the decoded pixel value component DBlkS of each block and outputs the decoded image signal Vout corresponding to each picture.
Next, the run-length decoder RLD0c will be described in detail. FIG. 41 is a block diagram for explaining a specific configuration of the run-length decoder RLD0c. This run-length decoder RLD0c performs variable-length decoding processing on the coded stream Str0c to obtain a code number Code corresponding to each code (codeword) contained in the coded stream Str0c. Based on the chemical device VLD, the run level acquirer RunLevDec that acquires the pair of the level value Lev and the run value Run corresponding to the code number Code, and the paired level value Lev and the run value Run, the level value Lev. It has an inverse zigzag scan device IScan that restores the decoding quantization component DQS having a two-dimensional array from the decoding quantization component having a one-dimensional array represented by the run value Run.
Next, the operation will be described. In this run-length decoder RLD0c, the variable-length decoder VLD decodes the coded stream Str0c by the reverse operation of the variable-length encoder VLC, and obtains the code number Code corresponding to the code word (bit string). Output. The runlevel acquirer RunLevDec outputs the paired level Lev value and run value Run corresponding to the code number Code by referring to the code table or by arithmetic operation in the reverse operation of the runlevel code converter RunLevEnc. To do. The inverse zigzag scan device IScan operates in the opposite direction to the zigzag scan device Scan, and from the quantization component having a one-dimensional array represented by the above paired level value Lev and run value Run, the decoding quantum having a two-dimensional array. The chemical component DQS is restored and output to the above inverse quantizer IQ.
[0059] In Patent Document 2, a plurality of coefficients having a certain order are followed by a run value Run indicating the number of quantization component (0 coefficient) Coefs whose value is 0, and the 0 coefficient thereof. A run-length coding method for encoding with a level value Lev indicating the value of the non-zero quantization component Coef (non-zero coefficient) is disclosed.
[0060] Further, in Patent Document 3, in a method of predictively coding digital video data, when a differential motion vector value is encoded using a variable length coding table, it depends on the magnitude of the differential motion vector value. , A method of switching a variable length coding table (VLC table) is disclosed. Further, as another method of variable-length coding of a pixel value, arithmetic coding is known in which variable-length coding is performed by an arithmetic operation using the probability that a pixel value takes a predetermined value. In arithmetic coding, since the code can be derived from the probability, the probability table in which the probability corresponding to each event is described corresponds to the VLC table. In Non-Patent Document 1, the pixel values of the pixels to be encoded are arithmetically coded by switching the probability table based on the prediction method (context) of the pixels to be encoded, which is predicted from the pixel values of the peripheral pixels thereof. The method is described.
[0061] [Patent Document 1] Japanese Patent Application Laid-Open No. 6-311534 [Patent Document 2] Japanese Patent Application Laid-Open No. 6-237184 [Patent Document 3] Japanese Patent Application Laid-Open No. 3144456 (Japanese Patent Laid-Open No. 8-79088) [Non-Patent Documents] 1] Written by Koichi Miki, "All about MPEG-4", published by the Industrial Research Council, September 30, 1998, first edition, first print, p.69-73 [0062] [Problems to be solved by the invention] The encoder RLE0a of the conventional image coding apparatus 201a described above encodes a plurality of quantization coefficients obtained by quantizing the frequency components of image data in a variable length for each fixed processing unit (block). However, it uses a fixed code table that shows a plurality of correspondences between numerical information indicating the magnitude of each quantization coefficient and a code (code word), and variable-length coding processing by this encoder. Then, there is a problem that the redundant information existing in the quantization coefficient, which is the data to be processed, cannot be sufficiently removed, and there is still room for improving the compression rate.
[0063] Further, like the encoders RLE0b and RLE0c of the conventional image coding devices 201b and 201c, the variable length coding of a plurality of quantization coefficients is performed by the quantization component (0 coefficient) whose value is 0. A variable-length code is also used in a run-length encoder that uses a run value indicating the number of Coefs and a level value indicating the value of the non-zero quantization component Coef (non-zero coefficient) following the 0 coefficient. The removal of redundant information existing in the quantization coefficient during the quantization process was not sufficient.
[0064] Further, the decoder RLD0a of the conventional image decoding apparatus 202a or the run-length decoders RLD0b, RLD0c of the conventional image decoding apparatus 202b, 202c are used during the variable-length coding process for the quantization coefficient. , Corresponds to a encoder that cannot sufficiently remove redundant information existing in the quantization coefficient.
[0065] Further, in the method of predictively coding digital video data, when the difference motion vector value is encoded by using the variable length coding table, the variable length coding table is used according to the magnitude of the difference motion vector value. Regarding the method of switching (VLC table), it is effective in variable-length coding processing for data having the characteristic that multiple 0 coefficients are continuous, such as the quantization coefficient obtained by quantizing the frequency component of the image signal. Switching the coding table was unknown.
[0066] The present invention has been made to solve the above-mentioned problems, and the redundancy of information existing in the data (quantization coefficient) to be subjected to the variable-length coding process is determined by the characteristics of the quantization coefficient. Variable-length coding method and variable-length decoding that can be removed more effectively depending on the situation of the coding process for the quantization coefficient and the quantization coefficient, and thereby further improve the compression rate of the image signal and the like. The purpose is to get a method.
[0067] [Means for solving problems]<u style="single">The present invention</u>The variable-length coding method according to the above is a variable-length coding method for encoding coefficient data composed of a plurality of coefficients, and for each of the above coefficients, the correspondence between the numerical information indicating the magnitude of the coefficient and the code. Including a coding step of performing a coding process for converting the coefficient data into coded data composed of a plurality of codes using a plurality of code tables showing the above, the coding step converts the code table into the code. With respect to the code table selection step of selecting according to at least one of the processed coefficient information and the parameters related to the generation of the coefficient, and the uncoded coefficient that has not been encoded. It is characterized by including a code assignment step of assigning a code using a selected code table.
【0068】<u style="single">The present invention is described above.</u>In the variable-length coding method, the above-mentioned coefficient is obtained by quantizing the frequency component of the image data based on the quantization step corresponding to the image data, and the above-mentioned code table selection step is the above-mentioned code assignment. The code table used in the step is selected according to the size of the quantization step.
【0069】<u style="single">The present invention is described above.</u>In the variable-length coding method, the coding process for the above-mentioned coefficient has a run value indicating the number of consecutive 0 coefficients whose value is 0 and a level value indicating the value of the non-zero coefficient following the 0 coefficient. Each is converted into a code, and the code table selection step selects one code table from a plurality of code tables indicating the correspondence between the run value and the code according to the size of the quantization step. At least one of the second selection processes for selecting one code table according to the size of the quantization step from the selection process of 1 and the plurality of code tables indicating the correspondence between the level value and the code. The selection process is performed, and the code assignment step codes at least one of the run value and the level value corresponding to the uncoded coefficient that has not been coded based on the selected code table. Is characterized by being assigned.
【0070】<u style="single">The present invention is described above.</u>In the variable-length coding method, the coding process for the above-mentioned coefficient consists of a run value indicating the number of consecutive 0 coefficients whose value is 0 and a level value indicating the value of the non-zero coefficient following the 0 coefficient. The run-level pair is converted into a code, and the code table selection step is one code table from a plurality of code tables showing the correspondence between the run-level pair and the code according to the size of the quantization step. In the code assignment step, the code is assigned to the run-level pair corresponding to the uncoded coefficient that has not been subjected to the coding process based on the selected code table. It is characterized by.
【0071】<u style="single">The present invention is described above.</u>In the variable-length coding method, the code table selection step is characterized in that the code table used in the code allocation step is selected according to the information regarding the processed coefficient to which the code processing has been performed. It is a thing.
【0072】<u style="single">The present invention is described above.</u>In the variable-length coding method, the coding process for the above-mentioned coefficient has a run value indicating the number of consecutive 0 coefficients whose value is 0 and a level value indicating the value of the non-zero coefficient following the 0 coefficient. Each of them is converted into a code, and the code table selection step changes the information about the run value corresponding to the processed coefficient to which the coding process is performed from a plurality of code tables showing the correspondence between the run value and the code. From the first selection process of selecting one code table according to the situation and the plurality of code tables showing the correspondence between the above level values and the codes, information on the level values corresponding to the processed coefficients subjected to the code processing can be obtained. At least one of the second selection processes for selecting one code table is performed accordingly, and the code allocation step is subjected to the coding process based on the selected code table. It is characterized in that a code is assigned to at least one of a run value and a level value corresponding to an uncoded coefficient that has not been set.
【0073】<u style="single">The present invention is described above.</u>In the variable-length coding method, the code table selection step selects one code table from a plurality of code tables indicating the correspondence between the run values and the codes according to the number of processed run values to which the codes are assigned. It is to be selected, and the code assignment step is characterized in that a code is assigned to an uncoded run value to which the code is not assigned based on the selected code table.
【0074】<u style="single">The present invention is described above.</u>In the variable-length coding method, the coding process for the above-mentioned coefficient consists of a run value indicating the number of consecutive 0 coefficients whose value is 0 and a level value indicating the value of the non-zero coefficient following the 0 coefficient. The run-level pair is converted into a code, and the code table selection step corresponds the run-level pair to the code according to the information about the run-level pair corresponding to the processed coefficient subjected to the coding process. One code table is selected from a plurality of code tables indicating the above, and the code assignment step corresponds to the uncoded coefficient which has not been subjected to the coding process based on the selected code table. It is characterized in that a code is assigned to a run-level pair.
【0075】<u style="single">The present invention is described above.</u>In the variable-length coding method, the above-mentioned coefficient is obtained by quantizing the frequency component of the image data based on the quantization step corresponding to the image data, and the above-mentioned coding step is a code for the above-mentioned coefficient. It is characterized in that the conversion process is performed so that a code is assigned to a plurality of coefficients constituting the coefficient data in descending order of frequency components of the corresponding image data.
【0076】<u style="single">The present invention is described above.</u>In the variable-length coding method, the coding process for the above coefficients is a run value indicating the number of consecutive 0 coefficients whose value is 0 for each block consisting of a certain number of coefficients, and a non-zero value following the 0 coefficient. A run-level pair consisting of a level value indicating a coefficient value is converted into a code, and the code table selection step has been processed in the target block to be coded. 1 from a plurality of code tables showing the correspondence between the run level pair and the code according to the sum of the number of coefficients and the number of uncoded non-zero coefficients in the target block. One code table is selected, and the code assignment step assigns a code to a run-level pair corresponding to an uncoded coefficient in the target block based on the selected code table. Is to be.
【0077】<u style="single">The present invention is described above.</u>In the variable-length coding method, the coding process for the above-mentioned coefficient consists of a run value indicating the number of consecutive 0 coefficients whose value is 0 and a level value indicating the value of the non-zero coefficient following the 0 coefficient. The run-level pair is converted into a code, and the coding step corresponds the correspondence between the run-level pair and the corresponding code according to the combination of the run value and the level value forming the run-level pair. Based on the first code table shown in the above, the correspondence between the run level pair and the code in the first code table is regularly changed, and the first code table is the run level pair and the code. Including a code table processing step for creating a second code table having a different correspondence with the above, the code table selection step uses one of the first and second code tables, information on the processed coefficient, and the coefficient. It is characterized in that it is selected according to at least one of the parameters related to the generation of.
【0078】<u style="single">The present invention is described above.</u>In the variable-length coding method, in the first and second code tables, each runlevel pair is associated with a shorter code as the level value forming the runlevel pair is smaller. The code table of is characterized in that, on average, the level value of the runlevel pair to which a short code is associated is smaller than that of the first code table.
【0079】<u style="single">The present invention is described above.</u>In the variable-length coding method, in the first and second code tables, each runlevel pair is associated with a shorter code as the run value forming the runlevel pair is smaller. The code table of is characterized in that, on average, the run value of the runlevel pair to which a short code is associated is smaller than that of the first code table.
【0080】<u style="single">The present invention is described above.</u>In the variable-length coding method, the coding process for the coefficients is to convert the run-level pair into a code for each block consisting of a certain number of coefficients, and the code table processing step is the second code table processing step. The code table is characterized in that it is created according to the number of processed coefficients to which the coding process is performed in the target block to be the coding process.
【0081】<u style="single">The present invention is described above.</u>In the variable-length coding method, the code assignment step is characterized in that the code is assigned to the runlevel pair in order from the runlevel pair corresponding to the high coefficient of the frequency component of the image data. is there.
【0082】<u style="single">The present invention is described above.</u>In the variable-length coding method, the second code table changes only the regularly calculable correspondence among the plurality of correspondences between runlevel pairs and codes included in the first code table. It is characterized by being a thing.
【0083】<u style="single">The present invention is described above.</u>In the variable-length coding method, the coefficients constituting the coefficient data are obtained by quantizing the frequency component of the image data based on the quantization step corresponding to the image data, and the code table selection step is It is characterized in that it is a code table switching step in which switching between the first code table and the second code table is performed based on the size of the quantization step.
【0084】<u style="single">The present invention is described above.</u>In the variable-length coding method, the code table selection step is a code table switching step in which switching between the first code table and the second code table is performed based on a switching instruction signal, and the coding step is a code table switching step. It is characterized in that the coding process of the switching instruction signal is performed.
【0085】<u style="single">The present invention is described above.</u>In the variable-length coding method, the coding process for the coefficient is to convert the run-level pair into a code for each block consisting of a fixed coefficient, and the code table processing step is the second code. The table shows the number of processed coefficients that have been encoded in the target block to be encoded, and the number of unencoded non-zero coefficients that have not been encoded in the target block. It is characterized in that it is created according to the sum of.
【0086】<u style="single">The present invention</u>The variable-length coding device according to the above is a variable-length coding device that encodes coefficient data composed of a plurality of coefficients, and for each of the above coefficients, the correspondence between the numerical information indicating the magnitude of the coefficient and the code. Including a coding unit that performs a coding process for converting the coefficient data into coded data composed of a plurality of codes using a plurality of code tables showing the above, the coding unit converts the code table into the code. With respect to the code table selection unit that selects according to at least one of the information on the processed coefficient that has been processed and the parameter related to the generation of the coefficient, and the uncoded coefficient that has not been encoded. It is characterized in that it has a code assigning unit for assigning a code using a selected code table.
【0087】<u style="single">The present invention is described above.</u>In the variable-length coding apparatus, the above-mentioned coefficient is obtained by quantizing the frequency component of the image data based on the quantization step corresponding to the image data, and the above-mentioned code table selection unit performs the above-mentioned code assignment. It is characterized in that the code table used in the unit is selected according to the size of the quantization step.
【0088】<u style="single">The present invention is described above.</u>In the variable-length coding apparatus, the code table selection unit selects the code table used in the code allocation unit according to the information regarding the processed coefficients to which the coding process has been performed. It is a thing.
【0089】<u style="single">The present invention is described above.</u>In the variable-length coding apparatus, the coding process for the above-mentioned coefficient has a run value indicating the number of consecutive 0 coefficients whose value is 0 and a level value indicating the value of the non-zero coefficient following the 0 coefficient. Each is converted into a code, and the code table selection unit uses one code from a plurality of code tables indicating the correspondence between the run values and the codes according to the number of processed run values to which the codes are assigned. A table is selected, and the code assigning unit assigns a code to an uncoded run value to which the code is not assigned based on the selected code table. is there.
【0090】<u style="single">The present invention</u><u style="single"></u><u style="single">the above</u>In the variable-length coding apparatus, the above-mentioned coefficient is obtained by quantizing the frequency component of the image data based on the quantization step corresponding to the image data, and the above-mentioned coding unit is a code for the above-mentioned coefficient. It is characterized in that the conversion process is performed so that a code is assigned to a plurality of coefficients constituting the coefficient data in descending order of frequency components of the corresponding image data.
【0091】<u style="single">The present invention</u>The program storage medium according to the above is a storage medium that stores a program that performs a variable length coding process for encoding coefficient data composed of a plurality of coefficients by a computer, and the above program has the same coefficient for each of the above coefficients. The code includes a coding step of performing a coding process for converting the coefficient data into coded data consisting of a plurality of codes using a plurality of code tables showing the correspondence between the numerical information indicating the magnitude of the code and the code. The coding step is performed by the coding table selection step of selecting the code table according to at least one of the information regarding the processed coefficient subjected to the coding process and the parameter related to the generation of the coefficient, and the coding process. It is characterized by including a code assignment step of assigning a code to an uncoded coefficient that has not been performed by using the selected code table.
【0092】<u style="single">The present invention</u>The variable-length decoding method according to the above is a variable-length decoding method for decoding coded data composed of a plurality of codes obtained by variable-length coding of coefficient data composed of a plurality of coefficients, and each of the above-mentioned codes. On the other hand, a decoding process is performed to restore the coded data to the coefficient data composed of the plurality of coefficients by using a plurality of code tables indicating the correspondence between the numerical information indicating the magnitude of the coefficient and the code. The decoding step includes a decoding step, which selects the code table according to at least one of the information regarding the processed coefficient subjected to the decoding process and the parameter related to the generation of the coefficient. It is characterized in that it includes a numerical value acquisition step of acquiring numerical information corresponding to the undecoded code that has not been subjected to the decoding process by using the selected code table.
【0093】<u style="single">The present invention is described above.</u>In the variable length decoding method, the above coefficient is obtained by quantizing the frequency component of the image data based on the quantization step corresponding to the image data, and the above code table selection step obtains the above numerical value. The code table used in the step is selected according to the size of the quantization step.
【0094】<u style="single">The present invention is described above.</u>In the variable-length decoding method, the decoding process for the code is performed on the code at a level indicating a run value indicating the number of consecutive 0 coefficients whose value is 0 and a non-zero coefficient value following the 0 coefficient. The code table selection step selects one code table from a plurality of code tables indicating the correspondence between the run value and the code according to the size of the quantization step. At least one of the second selection processes for selecting one code table according to the size of the quantization step from the selection process of 1 and the plurality of code tables showing the correspondence between the level value and the code. The selection process is performed, and the numerical value acquisition step acquires at least one of the run value and the level value corresponding to the undecoded code that has not been subjected to the decoding process based on the selected code table. It is characterized by being something to do.
【0095】<u style="single">The present invention is described above.</u>In the variable length decoding method, the decoding process for the code is a level indicating the number of consecutive 0 coefficients whose value is 0 and the value of the non-zero coefficient following the 0 coefficient. It restores to a run-level pair consisting of values, and the code table selection step is one from a plurality of code tables showing the correspondence between the run-level pair and the code, depending on the size of the quantization step. The code table is selected, and the numerical value acquisition step acquires a run-level pair corresponding to the undecoded code that has not been subjected to the decoding process based on the selected code table. It is characterized by that.
【0096】<u style="single">The present invention is described above.</u>In the variable length decoding method, the code table selection step is characterized in that the code table used in the numerical value acquisition step is selected according to the information regarding the processed coefficient obtained by the decoding process. It is a thing.
【0097】<u style="single">The present invention is described above.</u>In the variable length decoding method, the decoding process for the code is a level indicating the number of consecutive 0 coefficients whose value is 0 and the value of the non-zero coefficient following the 0 coefficient. The code table selection step restores to a value, and the code table selection step is one from a plurality of code tables showing the correspondence between the run value and the code, depending on the information about the processed run value obtained by the decoding process. a first selection process for selecting a code table from plural code tables that indicate correspondences between the level value and the code, processed obtained by decoding one code table according to the information about the observed level values At least one of the second selection processes to be selected is selected, and the numerical value acquisition step is based on the selected code table, and the undecoded code that has not been subjected to the decoding process. It is characterized in that at least one of a run value and a level value corresponding to is acquired.
【0098】<u style="single">The present invention is described above.</u>In the variable length decoding method, the code table selection step is one code table according to the number of processed run values obtained by the decoding process from a plurality of code tables showing the correspondence between the run values and the codes. The numerical value acquisition step is characterized in that the run value corresponding to the undecoded code that has not been subjected to the decoding process is acquired based on the selected code table. Is to be.
【0099】<u style="single">The present invention is described above.</u>In the variable-length decoding method, the decoding process for the code is a run value indicating the number of consecutive 0 coefficients whose value is 0, and a level value indicating the value of the non-zero coefficient following the 0 coefficient. The code table selection step restores to a run-level pair consisting of, and the code table selection step has a plurality of codes indicating the correspondence between the run-level pair and the code according to the information about the run-level pair obtained by the decoding process. One code table is selected from the table, and the numerical value acquisition step acquires a run-level pair corresponding to the undecoded code that has not been decoded based on the selected code table. It is characterized by being something to do.
【0100】<u style="single">The present invention is described above.</u>In the variable length decoding method, the above coefficient is obtained by quantizing the frequency component of the image data based on the quantization step corresponding to the image data, and the above decoding step is the decoding with respect to the above code. It is characterized in that the conversion process is performed so that the numerical information corresponding to the code is acquired in order from the one having the highest frequency component of the corresponding image data.
【0101】<u style="single">The present invention is described above.</u>In the variable-length decoding method, the decoding process for the code is a run indicating the number of consecutive 0 coefficients whose value is 0 for each block consisting of a certain number of coefficients constituting the coefficient data. It is restored to a run level pair consisting of a value and a level value indicating a non-zero coefficient value following the 0 coefficient, and the code table selection step is the target block in the target block of the decoding process. The above run is based on the sum of the number of processed coefficients obtained by the decoding process of the block and the number of undecrypted non-zero coefficients obtained by the decoding process of the block in the target block. One code table is selected from a plurality of code tables indicating the correspondence between the level pair and the code, and the numerical value acquisition step is based on the selected code table, and the undecoded coefficient in the target block is set. It is characterized in that it acquires a corresponding run-level pair.
【0102】<u style="single">The present invention is described above.</u>In the variable length decoding method, in the decoding process for the code, the code constituting the coded data has a run value indicating the number of consecutive 0 coefficients whose value is 0, and a non-zero following the 0 coefficient. It restores to a run-level pair consisting of a level value indicating the value of the coefficient, and the decoding step sets the correspondence between the run-level pair and the corresponding code to the run forming the run-level pair. Based on the first code table shown according to the combination of the value and the level value, the correspondence between the run level pair and the code in the first code table is regularly changed to obtain the first code table. Includes a code table processing step for creating a second code table in which the correspondence between the run level pair and the code is different, and the code table selection step performs the above processing for one of the first and second code tables. It is characterized in that it is selected according to at least one of the information regarding the completed coefficient and the parameter regarding the generation of the above coefficient.
【0103】<u style="single">The present invention is described above.</u>In the variable length decoding method, the first and second code tables are associated with each runlevel pair by a shorter code as the level value forming the runlevel pair is smaller. The code table of is characterized in that, on average, the level value of the runlevel pair to which a short code is associated is smaller than that of the first code table.
【0104】<u style="single">The present invention is described above.</u>In the variable length decoding method, the first and second code tables are associated with each runlevel pair by a shorter code as the run value forming the runlevel pair is smaller. The code table of is characterized in that, on average, the run value of the runlevel pair to which a short code is associated is smaller than that of the first code table.
【0105】<u style="single">The present invention is described above.</u>In the variable-length decoding method, the decoding process for the code is to restore the code to a run-level pair for each block consisting of a certain number of coefficients constituting the coefficient data, and the code table processing. The step is characterized in that the second code table is created according to the number of processed coefficients obtained by the decoding process in the target block to be the decoding process. Is.
【0106】<u style="single">The present invention is described above.</u>In the variable length decoding method, the numerical value acquisition step is characterized in that the runlevel pairs corresponding to the symbols are acquired in order from the runlevel pair having the highest frequency component of the corresponding image data. is there.
【0107】<u style="single">The present invention is described above.</u>In the variable length decoding method, the second code table changes only the regularly calculable correspondence among the plurality of correspondences between the runlevel pair and the code included in the first code table. It is characterized by being a thing.
【0108】<u style="single">The present invention is described above.</u>In the variable length decoding method, the coefficients constituting the coefficient data are obtained by quantizing the frequency component of the image data based on the quantization step corresponding to the image data, and the code table selection step is , The first code table and the second code table are switched based on the size of the quantization step.
【0109】<u style="single">The present invention is described above.</u>In the variable length decoding method, the code table selection step includes a code table switching step of switching between the first code table and the second code table based on the switching instruction signal, and the decoding The step is characterized in that the decoding process of the switching instruction signal is performed.
【0110】<u style="single">The present invention is described above.</u>In the variable length decoding method, the decoding process for the code is to restore the code to the runlevel pair for each block consisting of a certain coefficient constituting the coefficient data, and the code table processing step is The second code table is still obtained by the number of processed coefficients obtained by the decoding process for the block in the target block to be decoded and the decoding process for the block in the target block. It is characterized in that it is created according to the sum of the number of undecoded non-zero coefficients that have not been obtained.
【0111】<u style="single">The present invention</u>The variable length decoding device according to the above is a variable length decoding device that decodes coded data composed of a plurality of codes obtained by variable length coding of coefficient data composed of a plurality of coefficients, and each of the above codes. On the other hand, a decoding process is performed to restore the coded data to the coefficient data composed of the plurality of coefficients by using a plurality of code tables indicating the correspondence between the numerical information indicating the magnitude of the coefficient and the code. The decoding unit includes a decoding unit, and the decoding unit selects the code table according to at least one of the information regarding the processed coefficient subjected to the decoding process and the parameter related to the generation of the coefficient. It is characterized by having a numerical value acquisition unit that acquires numerical information corresponding to the undecoded code that has not been subjected to the decoding process by using the selected code table. ..
【0112】<u style="single">The present invention is described above.</u>In the variable length decoding apparatus, the above coefficient is obtained by quantizing the frequency component of the image data based on the quantization step corresponding to the image data, and the above-mentioned code table selection unit acquires the above-mentioned numerical value. It is characterized in that the code table used in the section is selected according to the size of the quantization step.
【0113】<u style="single">The present invention is described above.</u>In the variable length decoding apparatus, the code table selection unit selects the code table used in the numerical value acquisition unit according to the information regarding the processed coefficients obtained by the decoding process. It is a thing.
【0114】<u style="single">The present invention is described above.</u>In the variable length decoding apparatus, the decoding process for the code is performed on the code at a level indicating a run value indicating the number of consecutive 0 coefficients whose value is 0 and a non-zero coefficient value following the 0 coefficient. The code table selection unit restores the values to the values, and the code table selection unit is one from a plurality of code tables showing the correspondence between the run values and the codes, according to the number of processed run values obtained by the decoding process. The code table is selected, and the numerical value acquisition unit acquires a run value corresponding to the undecoded code that has not been subjected to the decoding process based on the selected code table. It is characterized by.
【0115】<u style="single">The present invention is described above.</u>In the variable length decoding apparatus, the above coefficient is obtained by quantizing the frequency component of the image data based on the quantization step corresponding to the image data, and the above decoding unit decodes the code. It is characterized in that the conversion process is performed so that the numerical information corresponding to the code is acquired in order from the one having the highest frequency component of the corresponding image data.
【0116】<u style="single">The present invention</u>The program storage medium according to the above is a storage that stores a program in which a computer performs a variable-length decoding process for decoding coded data composed of a plurality of codes obtained by variable-length coding of coefficient data composed of a plurality of coefficients. As a medium, the program uses a plurality of code tables indicating the correspondence between the numerical information indicating the magnitude of the coefficient and the code for each of the codes, and converts the coded data into the plurality of coefficients. The decoding step includes a decoding step of performing a decoding process for restoring the coefficient data to be composed of the above code table, information on the processed coefficient subjected to the decoding process, and parameters related to the generation of the coefficient. A code table selection step that selects according to at least one of the above, and a numerical value acquisition step that acquires numerical information corresponding to the undecoded code that has not been subjected to the decoding process using the selected code table. It is characterized by including.
[Embodiments of the Invention] First, the basic principle of the present invention will be described. In general, when the quantization step is coarse, the absolute value of the quantization component becomes small, so that the run (the length following the 0 coefficient) becomes long and the absolute value of the level value (the value of the non-zero coefficient) becomes small. On the contrary, when the quantization step is dense, the absolute value of the quantization component becomes large, so that the run becomes short and the absolute value of the level value becomes large.
[0118] Further, when the variable-length coding of many quantized components has already been completed in the block to be processed and the number of uncoded quantized components is small, the uncoded quantized components are used. No more run values can occur. Therefore, if the pair of the run value and the level value is removed from the code table, the coding efficiency is improved.
From this point of view, the present invention has a quantization coefficient according to the situation of the variable-length coding process or the variable-length decoding process for the quantization coefficient and the parameter (quantization parameter) related to the generation of the quantization coefficient. By switching the code table showing the correspondence between the numerical information indicating the magnitude of and the code, the redundant information existing in the data (quantization coefficient) targeted for the variable length coding process is more effective. It can be removed.
[0120] For example, the switching of the code table is a processing target created based on the code table (first code table) used in the conventional variable-length coding or decoding process and the first code table. This is done by selecting one of the second code table optimized for the data according to the processing status for the quantization coefficient. However, it is not always necessary to create the second code table based on the first code table, and the code table that is a candidate for selection may be a code table suitable for the data to be processed. Hereinafter, embodiments of the present invention will be described with reference to FIGS. 1 to 25.
(Embodiment 1) FIG. 1 is a block diagram for explaining an image coding apparatus according to the first embodiment of the present invention. The image coding device 101 of the first embodiment performs variable-length coding processing on the output (quantization component) QS of the quantizer Q in the conventional image coding device 201b shown in FIG. 34 to code. Instead of the run-length encoder RLE0b that outputs the quantized stream Str0b, the output QS of the quantizer Q is subjected to variable-length coding processing based on the quantization parameter QP and the VLC selection signal VlcSel. It is equipped with a run-length encoder RLE1 that outputs a quantized stream Str1.
[0122] Here, the quantization parameter QP is a parameter representing the magnitude of the quantization step, and the quantization step is substantially proportional to the quantization parameter QP. In other words, when the quantization parameter QP is large, the absolute value of the quantization component becomes small, so the 0 run of the quantization component (the length of consecutive lines of 0 components) becomes long, and the level value. The absolute value of is smaller.
[0123] FIG. 2 is a block diagram for explaining a specific configuration of the run-length encoder RLE1. This run-length encoder RLE1 has a one-dimensional array (that is, a one-dimensional array (that is, a quantization component) QS of the quantizer Q having a two-dimensional array, similar to the conventional run-length encoder RLE0b shown in FIG. The number of consecutive 0 coefficients is measured by measuring the number of consecutive quantized component (0 coefficient) Coefs whose value is 0 and the zigzag scan device Scan that converts to the quantized component Coef having a predetermined order). The run measuring instrument RunCal that outputs the run value Run indicating the value of, and the level value indicating the value of the non-0 coefficient by measuring the value of the quantization component Coef (non-zero coefficient) whose value is not 0 following the 0 coefficient. It has a level measuring instrument LevCal that outputs Lev.
[0124] FIG. 3 (a) shows a two-dimensional array of the quantized components Q1 to Q16 corresponding to one block, and FIG. 3 (b) is a scan of the quantized components Q1 to Q16 by the zigzag scan device Scan. The route is indicated by arrows A1 to A15. Here, the quantization component Q1 is a quantization of the DC component of the frequency component of the image signal, and the quantization components Q2 to Q16 are the quantization of the AC component of the frequency component of the image signal. Further, FIG. 3 (c) shows a one-dimensional array (coding order) of the quantization components Q1 to Q16 obtained by the zigzag scan by the zigzag scan device Scan, and FIG. 3 (d) shows the quantization component. A one-dimensional array of specific numerical values indicating the sizes of Q1 to Q16 is shown.
Then, the run length encoder RLE1 arranges the order sorter Lreodr for rearranging the level value Lev which is the output of the level measuring instrument LevCal and the run value Run which is the output of the run measuring instrument RunCal. It has a reordering device Rreodr and a number measuring device NumClc that measures and outputs the number Cnum of uncoded coefficients in the target block based on the output of the run measuring device RunCal. FIG. 3 (e) shows the order of run values and level values obtained from the numerical values of the quantized components having the sequences shown in FIGS. 3 (c) and 3 (d), and FIG. 3 (f) shows the order of the rearranged values. The order of run values and level values is shown.
Further, the run-length encoder RLE1 performs a variable-length coding process on the output ROLev of the sequence changer Lreodr based on the above-mentioned quantization parameter QP and switching signal VldSel, and performs a code string (level). Value code string) The variable length encoder LVLC that outputs LStr and the output RORun of the order reorderer Rreodr are subjected to variable length coding processing based on the number of unencoded coefficients Cnum. (Run value code string) It has a variable length encoder RVLC that outputs RStr, and a multiplexing device MUX that multiplexes the code string LStr and code string RStr for each block and outputs a multiplex coded stream Str1. ing.
FIG. 4 is a diagram illustrating the variable length coding process of the variable length encoder LVLC, and FIG. 4 (a) is an explanatory diagram of a flow of the variable length coding process of the level value, FIG. 4 (a). b) is an explanatory diagram of a code table used in the variable length coding process of the level value. FIG. 4 (b) shows the array Alev of the level value (Level), the sequence Ca1 of the code (code word) when the quantization parameter QP is smaller than the threshold, and the code (code word) when the quantization parameter QP is equal to or more than the threshold. The sequence Ca2 of (codeword) is shown.
[0128] Here, the code table L1 is composed of an array Alev of level values (Level) and an array Ca1 of codes (codewords) when the quantization parameter QP is smaller than the threshold value, and is composed of the quantization parameter QP. Shows a plurality of correspondences between the level value (Level) and the code when is smaller than the threshold value. The code table L2 is composed of an array Alev of level values (Level) and an array Ca2 of codes (codewords) when the quantization parameter QP is equal to or greater than the threshold value, and the quantization parameter QP is equal to or greater than the threshold value. The correspondence between the level value (Level) and the code in the case is shown.
[0129] FIG. 5 is a diagram illustrating the variable length coding process of the variable length encoder RVLC, and FIG. 5 (a) is an explanatory diagram of a flow of the variable length coding process of the run value, FIG. 5 (A). b) is an explanatory diagram of a code table used in the variable length coding process of the run value.
[0130] Fig. 5 (b) shows the array Arun of the run value (Run), the sequence Cb1 of the code (codeword) when the number of uncoded 0 coefficients is 1, and the number of uncoded 0 coefficients. The code (codeword) array Cb2 when is 2, the codeword (codeword) array Cb3 when the number of uncoded 0 coefficients is 3, and the number of uncoded 0 coefficients is 4. The code (codeword) array Cb4 in the case, the code (codeword) array Cb5 when the number of uncoded 0 coefficients is 5, and the code (codeword) when the number of uncoded 0 coefficients is 6. The codeword array Cb6, the codeword array Cb7 when the number of uncoded 0 coefficients is 7, and the codeword codeword when the number of uncoded 0 coefficients is 8 or more. The sequence Cb8 and is shown.
[0131] Here, the code table R1 is composed of an array Arun of run values (Run) and an array Cb1 of codes (codewords) when the number of uncoded 0 coefficients is 1. A plurality of correspondences between the run value (Run) and the code when the number of coded 0 coefficients is 1 are shown. Similarly, in the code tables R2, R3, R4, R5, R6, R7, the array Arun of the run value (Run) and the number of uncoded 0 coefficients are 2,3,4,5,6,7, respectively. It is composed of an array of case codes (codewords) Cb2, Cb3, Cb4, Cb5, Cb6, Cb7, and the number of uncoded 0 coefficients is 2,3,4,5,6,7. , The correspondence between the run value (Run) and the code is shown. Further, the code table R8 is composed of an array Arun of run values (Run) and an array Cb8 of codes (codewords) when the number of uncoded 0 coefficients is 8 or more, and is composed of uncoded 0. The correspondence between the run value (Run) and the code when the number of coefficients is 8 or more is shown.
[0132] Next, the operation will be described. In the image coding device 101 of the first embodiment, the blocking device Blk, the frequency converter Trans, and the quantization device Q are the conventional image coding device 201a (see FIG. 30) or the image coding device 201b (FIG. 30). It works in the same way as the one (see 34).
That is, when the image signal Vin is input to the image coding device 101a, the blocker Blk divides the input image signal Vin into blocks, and the image signal (pixel value) corresponding to each block. Ingredient) Produces BlkS. The frequency converter Trans converts the pixel value component BlkS into a frequency component TransS using DCT (discrete cosine transform), wavelet transform, or the like. The quantizer Q quantizes the frequency component TransS based on the quantization parameter QP in a predetermined quantization step, outputs the quantization component QS, and outputs the quantization parameter QP. The run-length encoder RLE1 applies variable-length coding processing to the quantization component QS and outputs a coded stream Str1.
[0134] Hereinafter, the operation of the run-length encoder RLE1 will be described in detail. The zigzag scan device Scan performs a zigzag scan of the quantization component QS (that is, a plurality of quantization coefficients Q1 to Q16 having a two-dimensional array shown in FIG. 3A) output from the quantizer Q. The quantization component QS is converted into the quantization component Coef and output. Here, in the zigzag scan of the quantization component QS, a plurality of quantization coefficients Q1 to Q16 having a two-dimensional array shown in FIG. 3 (a) are set to the paths shown by arrows A1 to A15 in FIG. 3 (b). By scanning along the line, an array of a plurality of quantization coefficients Q1 to Q16 is converted into a one-dimensional array (processing order) shown in FIG. 3 (c). Note that Fig. 3 (d) shows an array of specific numerical values (20, -10,5,0,2,0,0,0,1) of the plurality of quantization coefficients Q1 to Q16 subjected to the above zigzag scan. , 0,0,0, -1,0,0,1) is shown.
[0135] The run measuring instrument RunCal measures the number of consecutive 0 coefficients based on the quantization component Coef output from the zigzag scan device Scan, and outputs a run value Run indicating the number. In FIG. 3 (e), the specific run values sequentially output from the run measuring instrument RunCal are shown in the order of output (0,0,0,1,3,3,2). On the other hand, the level measuring instrument LevCal measures the value of the non-zero coefficient following the continuous 0 coefficient based on the quantization component Coef output from the zigzag scan device Scan, and outputs the level value Lev indicating this value. To do. Figure 3 (e) shows the specific level values that are sequentially output from the level measuring instrument LevCal in the order in which they are output (20, -10, 5, 2, 1, -1,1). ..
[0136] The order sorter Rreodr rearranges the order of the run values sequentially output from the run measuring instrument RunCal in the reverse order of the output order. Figure 3 (f) shows the specific order of the run values (2,3,3,1,0,0,0) sorted by the order sorter Rreodr. In addition, the number measuring instrument NumClc measures the number of uncoded coefficients based on the run value Run output from the run measuring instrument RunCal, and outputs the number of uncoded coefficients (number of uncoded coefficients) Cnum. To do. On the other hand, the order sorter Lreodr rearranges the order of the level values sequentially output from the level measuring instrument LevCal in the reverse order of the output order. Figure 3 (f) shows the specific order of level values (1, -1,1,2,5, -10,20) sorted by the order sorter Lreodr.
[0137] The variable length encoder RVLC is based on the uncoded 0 coefficient number Cnum output from the number measuring instrument NumClc, with respect to the rearranged run value RORun which is the output of the order sorter Rreodr. Then, a variable-length coding process for assigning a code (codeword) to the run value RORun is performed using a plurality of code tables showing the correspondence between the run value and the code (codeword), and the run value code string RStr is output. To do. On the other hand, the variable-length encoder LVLC is the output of the above-mentioned sequence changer Lreodr based on the quantization parameter QP from the quantizer Q and the selection signal VlcSel instructing the selection of variable-length coding from the outside. A variable-length coding process that assigns a code (codeword) to a level value ROLev using a plurality of code tables showing the correspondence between the level value and the code (codeword) for a certain sorted level value ROLev. And output the level value code string LStr. Then, the multiplexing device MUX multiplexes the level value code string LStr and the run value code string RStr for each block and outputs the multiplex coded stream Str1.
[0138] Here, in the multiplexing process of the level value code string LStr and the run value code string RStr, for example, for each block, the code string RStr for all the run values corresponding to the target block is followed by the target block. The code string LStr for all the corresponding level values is followed by the code string LStr for all the level values corresponding to the target block, followed by the code string RStr for all the run values corresponding to the target block.
[0139] Hereinafter, the operation of the variable length encoder LVLC will be described in detail with reference to FIG. The variable-length encoder LVLC acquires the quantization parameter QP from the quantizer Q (step Sa1), and the value of the acquired quantization parameter QP is held in the variable-length encoder LVLC. It is determined whether or not it is equal to or higher than the threshold value of the quantization parameter QP (step Sa2).
[0140] As a result of this determination, when the value of the obtained quantization parameter QP is smaller than the threshold value of the quantization parameter QP, the code table L1 (consisting of the level value array Alev and the code (code word) array Ca1) Select (see Fig. 4 (b)) (step Sa3), and if the value of the obtained quantization parameter QP is equal to or greater than the threshold of the quantization parameter QP, an array of level values Alev and an array of codes (codewords). Select the code table L2 consisting of Ca2 (see Figure 4 (b)) (step Sa4).
[0141] After that, the variable-length encoder LVLC determines whether or not there is an uncoded level value Lev in the target block (step Sa5), and if there is an uncoded level value Lev in the target block, Using the selected code table, a level value Lev coding process, that is, a process of assigning a corresponding code to the level value is performed (step Sa6), and then the above step Sa5 process is performed. On the other hand, as a result of the determination in step Sa5, if there is no uncoded level value Lev in the target block, the variable length coding process for the level value Lev is terminated.
[0142] In the variable length encoder LVLC, when the variable length coding process using a specific code table is specified in advance by the VLC selection signal VlcSel, the variable length encoder LVLC is irrespective of the magnitude of the quantization parameter QP. , The variable length coding process for the level value is performed using the specific code table.
Next, the operation of the variable length encoder RVLC will be described in detail with reference to FIG. The variable-length encoder RVLC determines whether or not there is an uncoded non-zero coefficient in the target block based on the output (number of uncoded coefficients) Cnum of the number measuring instrument NumClc, and this (step Sb1). If there is an uncoded non-zero coefficient as a result of the determination, the number of uncoded 0 coefficients in the target block is measured based on the output Cnum from the number measuring instrument NumClc (step Sb2).
Then, the variable-length encoder RVLC selects a code table according to the number of measured uncoded 0 coefficients (step Sb3). Specifically, when the number of uncoded 0 coefficients is 1, select code table R1 (see Fig. 5 (b)) consisting of an array of run values Arun and an array of codes (codewords) Cb1. .. Similarly, if the number of uncoded 0 coefficients is 2, the code table R2 is selected, if the number is 3, the code table R3 is selected, and if the number is 4, the code table R4 is selected. Further, when the number of uncoded 0 coefficients is 5, the code table R5 is selected, when the number is 6, the code table R6 is selected, and when the number is 7, the code table R7 is selected. Then, when the number of uncoded 0 coefficients is 8 or more, the code table R8 is selected.
Next, the variable-length encoder RVLC uses the selected code table to perform a run value Run coding process, that is, a process of assigning a corresponding code to the run value (step Sb4). After that, the determination process of step Sb1 is performed. If there is no uncoded non-zero coefficient as a result of the determination in step Sb1, the variable-length coding process for the run value is terminated.
[0146] Subsequently, a specific example will be given regarding the point that the coding efficiency is improved by selecting the code table based on the quantization parameter at the time of variable length coding of the level value as described above. explain.
[0147] Fig. 6 shows that when the quantization parameter QP is relatively small, that is, the output (level value) of the rearranged level measuring instrument LevCal output from the order reorderer Lreodr is shown in FIG. 3 (f). As shown in, when 1, -1,1,2,5, -10,20, the total number of bits of the code assigned to these level values is shown.
[0148] When it is determined that the quantization parameter QP is equal to or higher than the threshold value and the code table L2 is used, a code (code word) is assigned to each level value as shown in FIG. 6 (a). The total number of bits of the code assigned is 75 bits.
On the other hand, when it is determined that the quantization parameter QP is smaller than the threshold value and the code table L1 is used, a code (code word) is assigned to each level value as shown in FIG. 6 (b). , The total number of bits of the code assigned is 47 bits.
[0150] As described above, when the value of the quantization parameter QP is relatively small, the frequency of appearance of the quantization coefficient having a large value is high, so that the level value having a relatively large absolute value as compared with the code table L2. In addition, it is effective to select the code table L1 to which the short codes are associated on average in order to improve the coding efficiency.
[0151] Fig. 7 shows that when the quantization parameter QP is relatively large, that is, the output (level value) of the rearranged level measuring instrument LevCal output from the order reorderer Lreodr is shown in FIG. 3 (f). It shows the total number of bits of the code assigned to these level values when they are 1, -1,1,1,1,1, -2,3, unlike the ones shown in.
[0152] When it is determined that the quantization parameter QP is equal to or higher than the threshold value and the code table L2 is used, a code (code word) is assigned to each level value as shown in FIG. 7 (a). The total number of bits of the code assigned is 15 bits.
On the other hand, when it is determined that the quantization parameter QP is smaller than the threshold value and the code table L1 is used, a code (code word) is assigned to each level value as shown in FIG. 7 (b). , The total number of bits of the code assigned is 17 bits. In this way, when the value of the quantization parameter QP is relatively large, the frequency of occurrence of the quantization coefficient with a large value is low, so the concentration is concentrated on the level value whose absolute value is relatively small compared to the code table L1. It is effective to select the code table L2 to which the short codes are associated with each other in order to improve the coding efficiency.
[0154] FIG. 8 shows the run values output from the run measuring instrument RunCal when they are 0,0,0,1,3,3,2 as shown in FIG. 3 (e). Indicates the total number of bits of the code assigned to. When the code table R8 shown in FIG. 5 is always used without rearranging the run values and switching the code table as in the run length encoder RLE1, each run value is described in FIG. 8 (a). A code (code word) is assigned as shown in, and the total number of bits of the assigned code is 21 bits.
[0155] When the run values are rearranged and the code table is switched according to the number of uncoded 0 coefficients as in the run length encoder RLE1, each run value is shown in FIG. 8 (b). Codes (codewords) are assigned as shown, and the total number of bits assigned to the code is 13 bits. Here, each time a code is assigned to one run value, the number of uncoded coefficients is reduced by the value obtained by adding 1 to the run value encoded immediately before. This is because there is always one non-zero coefficient after a single or consecutive zero coefficient. Also, the uncoded 0 coefficient obtained from the plurality of sorted run values corresponding to one block, which is output from the order sorter Rreodr, is 15. This is because the block to be processed always has one non-zero coefficient.
[0156] When the run values are not rearranged as in the run length encoder RLE1 and only the code table is switched according to the number of uncoded 0 coefficients, FIG. 8 ( As shown in c), codes (code words) are assigned, and the total number of bits of the assigned codes is 20 bits.
[0157] As described above, in the image coding apparatus 101 of the first embodiment, the quantization coefficient obtained by quantizing the frequency component of the image signal is continuously obtained, and the quantization component (0) having a value of 0 is continuous. Run-length coding that encodes with a run value Run that indicates the number of coefficient) Coefs and a level value Lev that follows the 0 coefficient and indicates the value of the non-zero quantization component Coef (non-zero coefficient). Since the device RLE1 is provided, the quantization coefficient can be encoded with high coding efficiency by eliminating the redundant information.
[0158] Further, in the run-length encoder RLE1 of the first embodiment, a code table is selected according to the magnitude of the quantization parameter QP, and the level value is variable-length coded using the selected code table. Since the variable length encoder LVLC is provided, the total number of bits of the code assigned to the level value can be reduced. Further, in the run length encoder RLE1, a plurality of run values measured from the quantization coefficient to which a certain processing order is given are rearranged in order from the one corresponding to the quantization coefficient having the highest frequency component. A variable-length encoder that selects a code table according to the number of uncoded 0 coefficients in the target block and the device Rreodr, and uses the selected code table to perform variable-length coding of the rearranged run values. Since it is equipped with RVLC, it is possible to effectively reduce the total number of bits of the code assigned to the run value and improve the coding efficiency.
[0159] In the first embodiment, the variable length encoder RVLC selects a code table according to the number of uncoded 0 coefficients in the target block (that is, the output Cnum of the number measuring instrument NumClc). However, the variable length encoder RVLC may select a code table based on not only the output Cnum of the number measuring instrument NumClc but also the above VLC selection signal VlcSel. For example, in the variable-length encoder RVLC, when the variable-length coding process using a specific code table is specified in advance by the VLC selection signal VlcSel, regardless of the number of uncoded 0 coefficients in the target block, The variable-length coding process for the run value may be performed using the specific code table.
(Embodiment 2) FIG. 9 is a block diagram for explaining the image decoding apparatus according to the second embodiment of the present invention. The image decoding device 102 of the second embodiment decodes, for example, the coded stream Str1 output from the image coding device 101 of the first embodiment. Then, the image decoding device 102 replaces the run-length decoder RLD0b that performs variable-length decoding processing on the input coded stream Str0b in the conventional image decoding device 202b shown in FIG. 36. It is equipped with a run-length decoder RLD1 that restores the quantization coefficient by performing variable-length decoding processing on the input encoded stream Str1 based on the quantization parameter QP and the VLD selection signal VldSel. , Other configurations are the same as the image decoding apparatus 202b shown in FIG.
[0161] FIG. 10 is a block diagram for explaining a specific configuration of the run-length decoder RLD1. Similar to the conventional run-length decoder RLD0b shown in FIG. 37, the run-length decoder RLD1 has a code string LStr corresponding to the level value from the multiple coding stream Str1 output from the image encoding device 101. It has a separator DMUX that separates the code string RStr corresponding to the run value.
[0162] Then, the run-length decoder RLD1 decodes the level value code string LStr separated from the multi-coding stream Str1 with variable length based on the quantization parameter QP and the VLD selection signal VldSel. Variable length decoding based on the number of undecoded coefficients for the variable length decoder LVLD that processes and restores the level value ROLev and the run value code string RStr separated from the multiplex coded stream Str1. It has a variable length decoder RVLD that restores the run value RORun by performing the quantization process.
[0163] The run-length decoder RLD1 performs a rearrangement process on the level value ROLev, which is the output of the variable-length decoder LVLD, in the reverse order of the order sorter Lreodr on the coding side. What is the order reverse sorter LIreodr that restores the output Lev of the level measuring instrument on the coding side and the order sorter Rreodr on the coding side with respect to the run value RORun that is the output of the variable length decoder RVLD? Undecoded in the target block based on the order reverse sorter RIreodr that restores the output Run of the run measuring instrument on the coding side by performing the reverse sorting process and the output Run of the order reverse sorter RIreodr. It has a number measuring instrument NumClc that measures and outputs the number Cnum of coefficients. Further, the run-length decoder RLD1 is an inverse zigzag that restores the decoding quantization component DQS having a two-dimensional array from the decoding quantization component having a one-dimensional array represented by the level value Lev and the run value Run. It has a scan device IScan.
[0164] FIG. 11 is a diagram illustrating a variable length decoding process of the variable length decoder LVLD, and FIG. 11 (a) is an explanatory diagram and a diagram of a flow of the variable length decoding process for restoring a level value. 11 (b) is an explanatory diagram of a code table used in the variable length decoding process. The code tables L1 and L2 used in the variable length decoding process of the level value are the same as the code tables L1 and L2 used in the level value coding process in the run-length encoder RLE1 of the first embodiment, respectively. belongs to.
[0165] FIG. 12 is a diagram illustrating a variable length decoding process of the variable length decoder RVLD, and FIG. 12 (a) is an explanatory diagram and a diagram of a flow of the variable length decoding process for restoring a run value. 12 (b) is an explanatory diagram of a code table used in the variable length decoding process. The code tables R1 to R8 used in the variable length decoding process of the run value are the same as the code tables R1 to R8 used in the run value coding process in the run length encoder RLE1 of the first embodiment. belongs to.
[0166] Next, the operation will be described. When, for example, the multiple coding stream Str1 from the image coding device 101 of the first embodiment is input to the image decoding device 102, the run-length decoder RLD1 decodes the coded stream Str1. The decoding processing is performed and the decoding quantization component DQS is output. The operation of the run-length decoder RLD1 is opposite to the operation of the run-length encoder RLE1.
That is, in the run-length decoder RLD1, the separator DMUX from the input multi-coded stream Str1 to the level value code string LStr corresponding to the level value and the run value code string RStr corresponding to the run value. Are separated and output to the variable length decoder LVLD and the variable length decoder RVLD, respectively.
The variable length decoder LVLD is based on the quantization parameter QP from the quantizer Q and the external VLD selection signal VldSel instructing the selection of variable length decoding, and the level from the separator DMUX. For the value code string LStr, the level value ROLev corresponding to each code (codeword) is acquired by using a plurality of code tables showing the correspondence between the level value and the code (codeword), and the order is reversed. Output to the device LIreodr. On the other hand, the variable-length decoder RVLD has the run value and the code (for the run value code string RStr from the separator DMUX, based on the number of undecoded coefficients Cnum output from the number measuring instrument NumClc. The run value ROLev corresponding to each code (codeword) is acquired by using a plurality of code tables showing the correspondence with the codeword) and output to the order reverse sorter RIreodr.
[0169] The reordering reorderer LIreodr performs a reordering process on the level value ROLev, which is the output of the variable length decoder LVLD, in the reverse order of the reordering reorderer Lreodr on the coding side. Restore the output Lev of the level measuring instrument on the conversion side. On the other hand, the order reordering device RIreodr encodes the run value RORun, which is the output of the variable length decoder RVLD, by performing the reordering process opposite to that of the order reorderer Rreodr on the coding side. Restore the output Run of the run instrument on the side. Further, the number measuring instrument NumClc measures the number Cnum of the undecoded coefficients in the target block based on the output Run of the order reverse reordering device RIreodr, and outputs the number Cnum to the variable length decoder RVLD.
[0170] Then, the inverse zigzag scan device IScan performs a reverse operation of the zigzag scan device Scan to obtain a two-dimensional array from a quantization component having a one-dimensional array represented by the above level value Lev and run value Run. The decoding quantization component DQS that it has is restored and output to the inverse quantizer IQ.
[0171] Hereinafter, the operation of the variable length decoder LVLD will be described in detail with reference to FIG. The variable-length decoder LVLD acquires the quantization parameter QP from the quantization device Q of the image coding apparatus 101 (step Sc1), and the value of the acquired quantization parameter QP is the variable-length decoder LVLD. It is determined whether or not it is equal to or greater than the threshold value of the quantization parameter QP held in (step Sc2).
[0172] As a result of this determination, when the value of the obtained quantization parameter QP is smaller than the threshold value of the quantization parameter QP, the code table L1 (consisting of the level value array Alev and the code (code word) array Ca1) Select (see Figure 11 (b)) (step Sc3), and if the value of the obtained quantization parameter QP is greater than or equal to the threshold of the quantization parameter QP, an array of level values Alev and an array of codes (codewords). Select the code table L2 consisting of Ca2 (see Figure 11 (b)) (step Sc4).
After that, the variable length decoder LVLD determines whether or not there is an undecoded level value Lev in the target block (step Sc5), and if there is an undecoded level value Lev in the target block, Using the selected code table, a decoding process for restoring the level value Lev, that is, a process for acquiring the level value corresponding to the code (step Sc6) is performed, and then the above step Sc5 process is performed. On the other hand, as a result of the determination in step Sc5, if there is no undecoded level value Lev in the target block, the variable length decoding process for restoring the level value Lev is terminated.
[0174] In the variable length decoder LVLD, when the variable length decoding process using a specific code table is specified in advance by the above VLD selection signal VldSel, the variable length decoder LVLD is irrespective of the magnitude of the quantization parameter QP. , The variable length decoding process for restoring the level value is performed using the specific code table.
Next, the operation of the variable length decoder RVLD will be described in detail with reference to FIG. The variable length decoder RVLD determines whether or not there is an undecoded non-zero coefficient in the target block based on the output (number of undecoded coefficients) Cnum of the number measuring instrument NumClc (step Sd1). As a result of this determination, if there is an undecoded non-zero coefficient, the number of undecoded 0 coefficients in the target block is measured based on the number of undecoded coefficients Cnum (step Sd2).
Then, the variable length decoder RVLD selects a code table according to the number of measured undecoded 0 coefficients (step Sd3). Specifically, when the number of undecoded 0 coefficients is 1, select the code table R1 (see FIG. 12 (b)) consisting of the run value array Arun and the code (code word) array Cb1. .. Similarly, when the number of undecoded 0 coefficients is 2, the code table R2 is selected, when the number is 3, the code table R3 is selected, and when the number is 4, the code table R4 is selected. Further, when the number of undecoded 0 coefficients is 5, the code table R5 is selected, when the number is 6, the code table R6 is selected, and when the number is 7, the code table R7 is selected. Then, when the number of undecoded 0 coefficients is 8 or more, the code table R8 is selected.
Next, the variable-length decoder RVLD uses the selected code table to perform a decoding process for restoring the run value Run, that is, a process for acquiring the run value corresponding to each code (step Sd4). ), After that, the determination process of step Sd1 is performed. If there is no undecoded non-zero coefficient as a result of the determination in step Sd1, the variable-length decoding process for restoring the run value is terminated.
[0178] In the image decoding apparatus 102 of the second embodiment, the inverse quantizer IQ, the inverse frequency converter ITrans, and the inverse blocker DeBlk are the conventional image decoding apparatus 202a (see FIG. 32). Alternatively, it operates in the same manner as that of the image decoding device 202b (see FIG. 36).
That is, the inverse quantizer IQ performs the reverse operation of the quantizer Q, that is, the operation of dequantizing the decoding quantization component DQS with reference to the quantization parameter QP, to obtain the decoding frequency component ITransS. Output. In addition, the inverse frequency converter ITrans uses the reverse operation of the frequency converter Trans, that is, the decoding frequency component ITransS is decoded by the inverse DCT or the inverse wavelet transform, and the decoding frequency component ITransS corresponding to each block is decoded corresponding to each block. Performs the operation of restoring to the pixel value signal DBlkS. Then, the inverse blocker DeBlk integrates the decoded pixel value component DBlkS of each block and outputs the decoded image signal Vout corresponding to each picture.
[0180] As described above, in the image decoding apparatus 102 of the second embodiment, the run value Run, which indicates the number of consecutive 0 coefficient Coefs, respectively, for the run code string RStr and the level code string LStr constituting the coded data. And since it is equipped with a run-length decoder RLD1 that converts to a level value Lev indicating the value of the non-zero coefficient following the 0 coefficient and restores the quantization coefficient based on the run value and the level value, the quantization coefficient can be calculated. Decoding processing corresponding to variable-length coding processing that can eliminate the redundant information and encode with high coding efficiency can be performed satisfactorily.
[0181] Further, in the run-length decoder RLD1 of the second embodiment, a code table is selected according to the magnitude of the quantization parameter QP, and the level value is restored using the selected code table. Since the variable length decoder LVLD that performs the conversion is provided, it is possible to satisfactorily decode the level value code string in which the total number of bits of the code assigned to the level value is reduced.
[0182] Further, in the run length decoder RLD1, a code table is selected according to the number of undecoded 0 coefficients in the target block, and the selected code table is used to correspond to the rearranged run values. The variable length decoder RVLD that decodes the code string and the run values obtained by the decoding are rearranged in the reverse order of the run value rearrangement processing in the run length encoder RLD1. Since it is equipped with a substitute RIreodr, it is possible to satisfactorily decode a run value coded string in which the total number of bits of the code assigned to the run value is effectively reduced.
[0183] In the second embodiment, the variable length decoder RVLD selects a code table according to the number of undecoded 0 coefficients in the target block (that is, the output Cnum of the number measuring instrument NumClc). However, the variable length decoder RVLD may select a code table based on not only the output Cnum of the number measuring instrument NumClc but also the above VLD selection signal VldSel. For example, in the variable length decoder RVLD, when the variable length decoding process using a specific code table is specified in advance by the VLD selection signal VldSel, regardless of the number of undecoded 0 coefficients in the target block, The variable length decoding process for restoring the run value may be performed using the specific code table.
[Embodiment 3] FIG. 13 is a block diagram for explaining the image coding apparatus according to the third embodiment of the present invention. The image coding device 103 of the third embodiment performs variable-length coding processing on the output (quantization component) QS of the quantizer Q in the conventional image coding device 201c shown in FIG. 38 to code. Instead of the run-length encoder RLE0c that outputs the quantized stream Str0c, the output QS of the quantizer Q is subjected to variable-length coding processing based on the quantization parameter QP or the VLC selection signal VlcSel. It is equipped with a run-length encoder RLE2 that outputs a quantized stream Str2. The other devices in the image coding device 103 of the third embodiment are the same as those in the conventional image coding device 201c.
That is, the run-length encoder RLE2 has a pair of run values and level values (hereinafter referred to as a run-level pair) and a code corresponding thereto, similarly to the conventional run-length encoder RLE0c. It has a first code table T1 (see FIG. 42) showing the correspondence with the above according to the combination of the run value and the level value. Then, the run-length encoder RLE2 regularly changes the correspondence between the pair of the run value and the level value and the code in the first code table based on the first code table. A second code table having a different correspondence from the first code table is created, and the first and second code tables are obtained from the quantization parameter QP output from the quantizer Q or from the outside. One of them is selected based on the VLC selection signal VlcSel of the above, and a code is assigned to the pair of the run value and the level value related to the coefficient in the processing target data based on the selected code table.
[0186] Here, the quantization parameter QP is a parameter representing the magnitude of the quantization step, and the quantization step is substantially proportional to the quantization parameter QP. In other words, when the quantization parameter QP is large, the absolute value of the quantization component becomes small, so the 0 run of the quantization component (the length of consecutive lines of 0 components) becomes long, and the level value. The absolute value of is smaller. Therefore, in this case, the coding efficiency can be improved by selecting a code table in which a small code is assigned to a runlevel pair having a large run value and a small level value. On the contrary, when the quantization parameter QP is small, the absolute value of the quantization component is large, so a code table in which a small code is assigned to a runlevel pair having a small run value and a large level value is selected. Thereby, the coding efficiency can be improved.
[0187] Further, when the VLC selection signal VlcSel from the outside of the image coding device 103 is input, the run-length encoder RLE2 selects the code table used in the coding process by the selection signal VlcSel. It is a thing. Therefore, an appropriate code table can be selected from the outside according to the image characteristics (magnitude of image movement, complexity of movement, fineness of pattern, etc.), or the code table can be selected on the image coding device 103 side. When creating a stream that can be decoded by an image decoding device that has only one, the image coding device 103 should always use a predetermined code table by the VLC selection signal VlcSel. Can be done. That is, it is also possible to perform the variable length coding process using only one code table without switching the code table.
[0188] FIG. 14 is a block diagram for explaining a specific configuration of the run-length encoder RLE2. Similar to the conventional run-length encoder RLE0c (see FIG. 39), the run-length encoder RLE2 has a one-dimensional array (that is, a one-dimensional array (that is, a quantization component) QS of the quantizer Q having a two-dimensional array. , A zigzag scan device Scan that converts to a quantized component Coef having a predetermined order), and a continuous number of quantized component (0 coefficient) Coefs whose value is 0 are measured, and a run value Run is output. It has a run measuring instrument RunCal and a level measuring instrument LevCal that measures the value of the quantization component Coef (non-zero coefficient) whose value is not 0 following the 0 coefficient and outputs the level value Lev.
[0189] In the third embodiment, the run-length encoder RLE2 uses the output (run value) Run of the run measuring instrument RunCal, the run value Run1 representing the upper digit of the run value Run, and the run. The output (level value) of the run converter RunConv and the level measuring instrument LevCal that perform the conversion process to separate into the run value Run2 that represents the lower digit of the value Run based on the quantization parameter QP or VLC selection signal VlcSel. The conversion process for separating Lev into a level value Lev1 representing the upper digit of the level value Lev and a level value Lev2 representing the lower digit of the level value Lev is performed based on the above-mentioned quantization parameter QP or VLC selection signal VlcSel. It has a level converter LevConv to perform.
[0190] Further, the run-length encoder RLE2 calculates a code number Code corresponding to a pair of a run value Run1 and a level value Lev1 (hereinafter, referred to as a runlevel upper digit pair) by a code table or arithmetic calculation. Based on the correspondence between the level code converter RunLevEnc and the runlevel upper digit pair and the code number Code obtained in this way, the run corresponding to the higher frequency component corresponding to the target block to be processed. The process of rearranging the order of the runlevel upper digit pairs so that the lower code numbers correspond to the level upper digit pairs is performed according to the quantization parameter QP or the VLC selection signal VlcSel, and the rearranged runlevels are performed. It has an order changer ReOdr that outputs the code number ReOdrCode corresponding to the high-order digit pair.
[0191] Further, the run length encoder RLE2 is a position calculator that calculates the number of coded quantization components (coded coefficients) from the run value Run and outputs the number of coded coefficient Pos. Based on the correspondence between PosClc, the run level upper digit pair and the code number ReOdrCode, the code number ExtCode corresponding to the run level pair indicated by the second code table is output from the level value Lev2 and the run value Run2. It has a number converter CodeTrans and a variable length encoder VLC that assigns a bit string (codeword) to the code number ExtCode to generate a coded stream Str.
[0192] In the run length encoder RLE2, the zigzag scan device Scan, the run measuring device RunCal, the level measuring device LevCal, and the variable length encoder VLC are the conventional run length encoder RLE0c shown in FIG. 39. It is the same as the one in.
Next, the action and effect will be described. The zigzag scanner Scan converts the quantization component QS having a two-dimensional array into a quantization component Coef having a one-dimensional array, that is, in a set order, and outputs the result. The run measuring instrument RunCal measures the number of consecutive 0 components (quantized component whose value is 0) Coef, and outputs a run value Run indicating the number. Further, the level measuring instrument LevCal measures the value of the non-zero component (quantized component whose value is not 0 following the 0 component) Coef, and outputs the level value Lev indicating the value of the non-zero component.
[0194] The run converter RunConv performs a conversion process for separating the run value Run into a run value Run1 representing the upper digit of the run value Run and a run value Run2 representing the lower digit of the run value Run. The level converter LevConv performs a conversion process that separates the level value Lev into a level value Lev1 representing the upper digit of the level value Lev and a level value Lev2 representing the lower digit of the level value Lev.
[0195] The runlevel code converter RunLevEnc calculates the code number Code corresponding to the pair (runlevel upper pair) of the level value Lev1 and the run value Run1 in the code table (first code table) or arithmetic calculation shown in FIG. Calculated by. The order sorter ReOdr performs the process of rearranging the order of the runlevel upper digit pairs based on the quantization parameter QP or the VLC selection signal VlcSel, and the code number corresponding to the rearranged runlevel upper digit pairs. Output ReOdrCode. By the process of rearranging the order of the runlevel upper digit pairs, the correspondence between the runlevel upper digit pairs and the code number Code obtained by the runlevel code converter RunLevEnc is higher in the target block to be processed. The smaller code numbers are converted into the corresponding correspondences for the runlevel upper digit pairs corresponding to the frequency components.
[0196] The position calculator PosClc calculates the number of coded components from the run value Run, and outputs the number of coded coefficient Pos. The number converter CodeTrans outputs the code number ExtCode corresponding to the runlevel pair from the level value Lev2 and the run value Run2 based on the correspondence between the runlevel upper digit pair and the code number ReOdrCode. At this time, in the number converter CodeTrans, the number of encoded coefficients Pos output from the position calculator PosClc is used to calculate how many uncoded components are present.
[0197] Here, the code number ExtCode corresponding to the runlevel pair output from the number converter CodeTrans has a second code number whose correspondence relationship between the runlevel pair and the code number is different from that of the first code table. It was obtained based on the code table. Further, in this second code table, a code table in which the correspondence between the runlevel pair and the code number is different from that of the first code table is created by the rearrangement processing by the order changer ReOdr, and further, the above-mentioned code table is created. A code table created by the reordering device ReOdr is subjected to a runlevel pair corresponding to a run value Run exceeding the number of uncoded components based on the number of encoded coefficients Pos by the number converter CodeTrans. It was created by assuming that the correspondence with the code number is not included. Then, the variable-length encoder VLC assigns a bit string (codeword) to the code number ExtCode to generate a coded stream Str2.
[0198] FIG. 15 shows an example of a second code table created based on the first code table by the run-length encoder RLE2. Here, the first code table is the same as the code table shown in FIG. 42 used in the conventional run-length encoder RLE0c. In the first and second code tables, a bit string (code word) corresponding to one-to-one is assigned to the code number Code, but a short code word may be assigned to the code number Code having a small value. Needless to say.
[0199] FIG. 15 (a) shows, as an example of the second code table, a second code table T2a suitable when the quantization parameter QP is small. This second code table T2a is created as follows. First, 1/2 of the level value Lev is assigned as the level value Lev1, and the absolute value of Lev1 × 2-Lev is assigned to the level value Lev2.
Here, when the level value Lev is an odd number, the value obtained by dividing an even number whose absolute value is 1 larger than the level value Lev by 2 is defined as the level value Lev1. That is, when the level value Lev is positive, the level value Lev1 is assigned a value of 1/2 of (Lev + 1), and when the level value Lev is negative, the level value Lev1 is (Lev-1). A value of 1/2 is assigned. Then, according to the combination of the level value Lev1 and the run value Run, the code number Code corresponding to the pair of the level value Lev1 and the run value Run is acquired from the first code table (see FIG. 42).
[0201] Further, when the Lev value is positive, the code corresponding to the pair of the level value Lev1 and the run value Run is based on the following equation (1), and when the Lev value is negative, based on the following equation (2). The number Code is converted. The second code table T2a shows the correspondence between the code numbers obtained as a result of this conversion and the runlevel pairs. 2 × (Code-Lev2) -1 (1) 2 × (Code-Lev2) (2) [0202] For example, the runlevel pair of the code table (first code table) in FIG. Focusing on level = -2, run = 1), the code number code corresponding to this runlevel pair is the value "10" shown in the first code table T1 shown in FIG. 42 to the number "10" in FIG. 15 (a). It is converted to "12" shown in the code table T2a of 2.
That is, in this case, since the runlevel pair (Lev, Run) is (-2,1), Lev1 and Lev2 are calculated as follows. Lev1 = Lev (1/2) = -1 Lev2 = | Lev1 2-Lev | = | -1 2- (-2) | = 0 Therefore, (Lev1, Run) is (-1,1) And this runlevel pair corresponds to the code number (code = 6) in the first code table (Fig. 42).
Therefore, when the code number corresponding to the runlevel pair (Lev, Run) = (-2,1) is calculated using the equation (2), 2 × (Code-Lev2) = 2 × (6-). 0) = 12.
[0205] The code table of FIG. 15 (a) has a smaller code number (a code number (1) than that of the code table (first code table) shown in FIG. 42 with respect to a runlevel pair having a small run value and a large level value. That is, it is characterized by being assigned a short codeword), and is suitable when the quantization parameter QP is small.
[0206] FIG. 15 (b) shows, as another example of the second code table, a second code table T2b suitable when the quantization parameter QP is large.
[0207] This second code table T2b is created as follows. First, the run value Run1 is assigned a value of 1/2 of the run value Run, and the run value Run2 is assigned the absolute value of Run1 × 2-Run. Here, if the run value Run is an odd number, the run value Run1 is assigned an integer portion of a value of 1/2 of (Run + 1). Then, according to the combination of the level value Lev and the run value Run1, the code number Code corresponding to the pair of the level value Lev and the run value Run1 is acquired from the first code table (see FIG. 42).
[0208] Further, when the Lev value is positive, the code corresponding to the pair of the level value Lev and the run value Run1 is based on the following equation (3), and when the Lev value is negative, based on the following equation (4). The number Code is converted. The second code table T2b shows the correspondence between the code number obtained as a result of this conversion and the runlevel pair. 2 × (Code + Run2) -1 (3) 2 × (Code + Run2) -2 (4) For example, the runlevel pair (level) of the code table (first code table) in Fig. 42. Focusing on = -1, run = 2), the code number code corresponding to this runlevel pair is the value "12" shown in the first code table T1 shown in FIG. 42 to the second code in FIG. 15 (b). It is converted to "10" shown in the code table T2b of.
That is, in this case, since the runlevel pair (Lev, Run) is (-1,2), Run1 and Run2 are calculated as follows. Run1 = Run · (1/2) = 1 Run2 = | Run1 · 2-Run | = | 1-2 -2 | = 0 Therefore, (Lev, Run1) becomes (-1,1), and this runlevel The pair corresponds to the code number (code = 6) in the first code table (Fig. 42).
Therefore, when the code number corresponding to the runlevel pair (Lev, Run) = (-1,2) is calculated using the equation (4), 2 × (Code + Run2) = 2 × (6-). 0) -2 = 10.
[0211] The second code table T2b shown in FIG. 15 (b) is for a runlevel pair having a large run value and a small level value as compared with the code table (first code table) T1 shown in FIG. 42. , A smaller code number (ie, a shorter codeword) is assigned, which is suitable when the quantization parameter QP is large.
[0212] FIG. 16 shows another example of the second code table created based on the first code table in the run length encoder RLE2. Here, the first code table is the same as the code table T1 shown in FIG. 42 used in the conventional run-length encoder RLE0c. [0213] In the number converter CodeTrans, from the position calculator PosClc. The number of uncoded components (the number of uncoded coefficients) existing in the processing target block is calculated based on the output number of encoded coefficients Pos. Then, it is assumed that the second code table created from the first code table does not include the code word corresponding to the run level pair containing the run values equal to or more than the number of unencoded components. This enables coding with good compression efficiency.
[0214] FIG. 16 (a) shows a second code table T2c created when the number of unencoded components is 3 or more. FIG. 16 (b) shows the second code table T2d created when the number of unencoded components is 2. FIG. 16 (c) shows the second code table T2e created when the number of unencoded components is 1.
[0215] By deleting the correspondence between the runlevel pair including the unused run value and the code from the code table in this way, a short codeword is assigned even for the same runlevel pair. For example, in the second code table T2e shown in FIG. 16 (c), the code number [7] corresponds to the runlevel pair having the run value [0] and the level value [4], and FIG. In the second code table T2d shown in b), the code number [11] corresponds to the runlevel pair having the run value [0] and the level value [4]. In the code table T2c of 2, a code number (not shown) having a larger value corresponds to a runlevel pair having a run value [0] and a level value [4].
[0216] FIG. 17 shows an example of the coding order in the run-length encoder RLE2 in the image coding apparatus 103 of the third embodiment. In general, the absolute value of the level value corresponding to the low frequency component is large, and in the code table, the code number code having a large value corresponds to the runlevel pair corresponding to the low frequency component. On the contrary, the absolute value of the level value corresponding to the high frequency component is small, and in the code table, the code number having a small value corresponds to the runlevel pair corresponding to the high frequency component.
As described with reference to FIG. 16, the improvement in compression efficiency obtained by deleting the code number (code word) corresponding to the run level pair including the run value equal to or more than the number of uncoded components from the code table has not yet been achieved. The smaller the number of coded components, the larger the number, and the larger the absolute value of the level value, the larger the ratio of the size of the code number assigned to the code number being smaller than before the reduction of the code number as described above.
Therefore, as in the image coding apparatus 103 of the third embodiment, when the quantization component is encoded by the run-length encoder RLE2, the absolute value of the level value is large and the frequency is low. By coding the quantization component corresponding to the component later, the compression efficiency can be further improved.
That is, in the order reorderer ReOdr, the quantization component is set from the run-level pair of the quantization component corresponding to the high frequency component, which is the final non-zero component, as shown by the arrows X1 to X7 shown in FIG. Sorted in the order of the run-level pairs of the quantization component corresponding to the low frequency component, and next to the code word corresponding to the run-level pair of the quantization component having the lowest frequency component, it was encoded in the block to be processed. Add EOB to indicate that it is the last component. Thereby, the compression efficiency can be improved.
[0220] Further, in the third embodiment, the quantization parameter QP and the VLC selection signal VlcSel are supplied to the level converter LevConv, the run converter RunConv, the order changer ReOdr, and the number converter CodeTrans. The code table can be switched according to the conversion parameter QP, and an appropriate code table can be selected from the outside according to the content of the image (magnitude of movement amount of image, complexity of movement, fineness of pattern).
[0221] For example, by switching the code table used for the coding process by the VLC selection signal VlcSel from the outside of the image coding device, the image coding device has only one code table. You can create a stream that can be decrypted with.
[0222] As described above, in the third embodiment, in the image coding apparatus 103 that encodes the quantization coefficient of the image signal as the data to be processed, the run that assigns the variable length code to the quantization coefficient by using the code table. A length encoder RLE2 is provided, and the run length encoder RLE2 creates a second code table optimized for the data to be processed based on the first code table, and creates a second code table optimized for the data to be processed, and the quantization parameter QP or Since either the first code table or the second code table is selected as the code table used for assigning the variable length code based on the VLC selection signal VlcSel, redundant information existing in the data to be processed is removed more effectively. This makes it possible to further improve the compression rate of the image signal and the like.
[0223] In the third embodiment, as the run-length encoder RLE2, as shown in FIG. 14, various devices for improving the compression ratio, that is, the run converter RunConv, the level converter LevConv, and the order are average. Although the one having the substitute ReOdr and the number converter CodeTrans is shown, the run-length encoder RLE1 may have only a part of the equipment for improving the compression ratio. In this case, the implementation of the run-length encoder RLE2 becomes simple.
[0224] Further, in the third embodiment, the second code table is a part (regularly build VLC) that constitutes the first code table and can be regularly generated by an arithmetic operation, and cannot be regularly generated. It is assumed that the correspondence between the run-level pair and the code number is changed in both parts of the part (table look up VLC), but the first code table is the part that can be regularly generated by arithmetic operation (regularly). If it has a build VLC) and a part that cannot be generated regularly (table look up VLC), the second code table is a part of the first code table, which is a regular operation that is easy to operate. Only the part that can be generated by arithmetic operation may be converted to, and in that case, the implementation of the run-length encoder RLE2 becomes simpler.
[0225] Further, in the third embodiment, in the run-length encoder in which the variable-length coding of the quantization component is performed by using the run-level pair, the quantization component is changed from the one corresponding to the higher frequency component. Although the ones that are variable-length encoded in order are shown, the run-length encoder is a run that separately variable-length encodes the run value and the level value corresponding to the quantization component of the target block as in the first embodiment. Needless to say, in the length encoder, the run value and the level value corresponding to the quantization component of the target block may be variable-length coded in order from the one corresponding to the higher frequency component.
[Embodiment 4] FIG. 18 is a block diagram for explaining the image decoding apparatus according to the fourth embodiment of the present invention. The image decoding device 104 of the fourth embodiment performs variable-length decoding processing on the coded stream Str0c in the conventional image decoding device 202c shown in FIG. 40 and outputs the decoding quantization component DQS. Instead of the run-length decoder RLD0c, the coded stream Str2 is subjected to variable-length decoding processing based on the quantization parameter QP or variable-length decoding selection signal (VLD selection signal) VldSel for decoding quantization. It is equipped with a run-length decoder RLD2 that outputs the component DQS. The other devices in the image decoding device 104 of the fourth embodiment are the same as those in the conventional image decoding device 202c.
That is, the run-length decoder RLD2 has a pair of run values and level values (hereinafter referred to as a run-level pair) and a code corresponding thereto, similarly to the conventional run-length decoder RLD0c. It has a first code table T1 (see FIG. 42) showing the correspondence with the above according to the combination of the run value and the level value. Then, the run-length decoder RLD2 regularly changes the correspondence between the pair of the run value and the level value and the code in the first code table based on the first code table. A second code table having a different correspondence from the first code table is created, and the first and second code tables are displayed by the quantization parameter QP output from the quantizer Q or from the outside. One of them is selected based on the VLD selection signal VldSel, and the codewords (bit strings) constituting the coded stream Str2 are run values related to the coefficients in the data to be processed based on the selected code table. And to convert to a pair of level values.
[0228] As described above, the quantization parameter QP is a parameter representing the magnitude of the quantization step, and the quantization step is substantially proportional to the quantization parameter QP. In other words, when the quantization parameter QP is large, the absolute value of the quantization component becomes small, so the 0 run of the quantization component (the length of consecutive lines of 0 components) becomes long, and the level value The absolute value becomes smaller. Therefore, in this case, the coding efficiency can be improved by selecting a code table in which a small code is assigned to a runlevel pair having a large run value and a small level value. On the contrary, when the quantization parameter QP is small, the absolute value of the quantization component is large, so a code table in which a small code is assigned to a runlevel pair having a small run value and a large level value is selected. Thereby, the coding efficiency can be improved.
[0229] FIG. 19 is a block diagram showing a specific configuration of the run-length decoder RLD2. The run-length decoder RLD2 has a variable-length decoder VLD like the conventional run-length decoder RLD0c, and the decoder VLD is the image encoding device 103 of the third embodiment. The coded stream Str2 output from is decoded and the code number ExtCode is output.
[0230] In the fourth embodiment, the run-length decoder RLD2 has a code number PrmCode corresponding to a runlevel upper digit pair consisting of a level value Lev1 and a run value Run1 from the code number ExtCode, and a level value. The number inverse converter ICodeTrans that performs the number inverse conversion process that separates Lev2 and the run value Run2 based on the above quantization parameter QP or VLD selection signal VldSel, and a plurality of code numbers PrmCode corresponding to the block to be processed are low. It has an order reverse sorter IReOdr that outputs a plurality of code number codes corresponding to the blocks, which are sorted in order from the one corresponding to the runlevel pair of frequencies and have the sorted order.
[0231] Further, the run-length decoder RLD2 acquires a run-level pair corresponding to the code number Code by a code table or an arithmetic calculation, and obtains the level value Lev1 and the run value Run1 constituting the run-level pair. A run-inverse converter that restores a run-valued Run from the output run-level acquirer RunLevDec, the run-valued Run1 that represents the upper digit of the run-valued Run, and the run-valued Run2 that represents the lower-order digit of the run-valued Run. It has an IRunConv, a level value Lev1 representing the upper digit of the level value Lev, and a level inverse converter ILevConv that restores the level value Lev from the level value Lev2 representing the lower digit of the level value Lev.
[0232] Further, the run-length decoder RLD2 has an inverse zigzag scan device IScan as in the conventional run-length decoder RLD0c, and this scan device IScan has a level value Lev and a run Run value. The quantization component having the expressed one-dimensional array is converted into the decoding quantization component DQS having the two-dimensional array and output. The variable length decoder VLD, runlevel acquirer RunLevDec, and reverse zigzag scanr IScan in the above run-length decoder RLD2 are the same as those in the conventional run-length decoder RLD0c shown in FIG. Is.
Next, the action and effect will be described. In the run-length decoder RLD2, the variable-length decoder VLD operates in the opposite manner to the variable-length encoder VLC. That is, the variable length decoder VLD decodes the coded stream Str2 and outputs the code number ExtCode corresponding to the code word (bit string) constituting the stream. Based on the above quantization parameter QP or VLD selection signal VldSel, the number inverse converter ICodeTrans performs an operation opposite to that of the number converter CodeTrans, and from the code number ExtCode, a runlevel consisting of a level value Lev1 and a run value Run1. Separate the code number PrmCode corresponding to the high-order digit pair from the level value Lev2 and the run value Run2.
[0234] The reorder reorderer IReOdr operates in the reverse manner to the reorder reorderer ReOdr based on the above-mentioned quantization parameter QP or VLD selection signal VldSel. As a result, the plurality of code numbers PrmCode corresponding to the blocks to be processed are sorted in order from the one corresponding to the low frequency runlevel pair, and the plurality of code numbers corresponding to the blocks having the sorted order are performed. The code number Code is output. The runlevel acquirer RunLevDec acquires the runlevel pair corresponding to the code number Code by a code table or an arithmetic calculation, and outputs the level value Lev1 and the run value Run1 constituting the acquired runlevel pair.
Based on the above-mentioned quantization parameter QP or VLD selection signal VldSel, the run inverse converter IRunConv performs an operation opposite to that of the run converter RunConv, and the run value Run1 representing the upper digit of the run value Run and Restore the run value Run from the run value Run2, which represents the lower digit of the run value Run. Further, the level inverse converter ILevConv operates in the opposite manner to the level converter LevConv based on the above quantization parameter QP or VLD selection signal VldSel, and has a level value Lev1 representing the upper digit of the level value Lev and a level. Restore the level value Lev from the level value Lev2, which represents the lower digit of the value Lev.
[0236] Here, in the number inverse converter ICodeTrans, the order reverse transmuter IReOdr, the run inverse converter IRunConv, and the level inverse converter ILevConv, the above-mentioned first and the above-mentioned first and the above are obtained by the above-mentioned quantization parameter QP or the above-mentioned VLD selection signal VldSel. The selection of the second code table is performed and the operation based on the selected code table is performed.
[0237] Then, the inverse zigzag scan device IScan performs the reverse operation of the above zigzag scan device Scan based on the level value Lev and the run value Run, and creates a one-dimensional array represented by the level value Lev and the run run value. The quantization component having is converted into the decoding quantization component DQS having a two-dimensional array and output.
Further, in this run-length decoder RLD2, when the VLD selection signal VldSel is input from the outside, the content of the image (magnitude of movement amount of image, complexity of movement) indicated by the VLD selection signal VldSel. , The appropriate code table is selected according to the fineness of the pattern).
[0239] Further, in the fourth embodiment, the quantization parameter QP and the VLD selection signal VldSel are transmitted to the number inverse converter ICodeTrans, the order inverse selector IReOdr, the run inverse converter IRunConv, and the level inverse converter ILevConv. Since it is supplied, the code table can be switched according to the quantization parameter QP, and the appropriate code table can be decoded according to the characteristics of the image, that is, the amount of movement of the image, the complexity of the movement, the fineness of the pattern, etc. It can be selected from the outside of the transducer.
[0240] As described above, in the fourth embodiment, the variable-length code is obtained by using the code table in the image decoding device 104 that decodes the coded data obtained by variable-length coding the quantization coefficient of the image signal. A run-length decoder RLD2 that converts to a quantization coefficient is provided, and the run-length decoder RLD2 creates a second code table optimized for the data to be processed based on the first code table. Then, based on the quantization parameter QP or the VLD selection signal VldSel, either the first or second code table is selected as the code table used for conversion of the variable length code to the quantization coefficient, so the data to be processed. It is possible to satisfactorily perform the decoding process corresponding to the variable-length coding process that can more effectively remove the redundancy of the information existing in.
[0241] In the fourth embodiment, as the run-length decoder RLD2, as shown in FIG. 19, various devices for improving the compression ratio, that is, the number reverse converter ICodeTrans and the order reverse reorderer IReOdr. , The run inverse converter IRunConv, and the level inverse converter ILevConv are shown, but the run length decoder RLD2 may have only a part of the equipment for improving the compression ratio. Good. In this case, the implementation of the run-length decoder RLD2 is simple.
[0242] Further, in the fourth embodiment, the second code table is a part (regularly build VLC) that constitutes the first code table and can be regularly generated by arithmetic operations, and cannot be regularly generated. It is assumed that the correspondence between the run level pair and the code number is changed in both parts of the part (table look up VLC), but the first code table is the part that can be regularly generated by arithmetic operation (regularly). If it has a build VLC) and a part that cannot be generated regularly (table look up VLC), the second code table is a part of the first code table, which is a regular operation that is easy to operate. Only the part that can be generated by arithmetic operation may be converted to, and in that case, the implementation of the run length decoder RLD2 becomes simpler.
[0243] Further, in the fourth embodiment, in the run-length decoder in which the variable-length decoding of the encoded data of the quantized component is performed using the run-level pair, the encoded data of the quantized component is further obtained. Although the variable length decoding is shown in order from the one corresponding to the high frequency component, the run length decoder has the run value and the level value corresponding to the quantization component of the target block as in the second embodiment. In a run-length decoder that separately variable-length decodes the encoded data, the run-value and level-value encoded data corresponding to the quantization component of the target block are variable-length in order from the one corresponding to the higher frequency component. It may be the one to be decrypted.
[Embodiment 5] FIG. 20 is a block diagram for explaining the image coding apparatus according to the fifth embodiment of the present invention. The image coding device 105 of the fifth embodiment replaces the run-length encoder RLE2 in the image coding device 103 of the third embodiment shown in FIG. 13, and has a run-level pair similar to the run-length encoder RLE2. It is equipped with a run-length encoder RLE3 that encodes the number of non-zero components. The other devices in the image coding device 105 of the fifth embodiment are the same as those in the image coding device 103 of the third embodiment.
[0245] FIG. 21 shows a specific configuration of the run-length encoder RLE3 in the image coding device 105. The run-length encoder RLE3 of the fifth embodiment is non-zero based on the input quantization component instead of the position calculator PosClc in the run-length encoder RLE2 of the third embodiment shown in FIG. Calculate the number of encoded coefficients Pos2 based on the non-zero coefficient measuring instrument NZcount that measures the number of coefficients NZnum, the measured number of non-zero coefficients NZnum, and the run value Run measured by the run measuring instrument RunCal. It is equipped with a position calculator PosClc2.
Further, the run-length encoder RLE3 of the fifth embodiment is different from the variable-length encoder VLC of the run-length encoder RLE2 of the third embodiment, and is an output (code) of the number converter CodeTrans. Number) ExtCode is encoded and the number of non-zero components NZnum is encoded. The other configurations in the run-length encoder RLE3 are the same as those in the run-length encoder RLE2 of the third embodiment.
Next, the action and effect will be described. The operation of the blocker Blk, the frequency converter Trans, and the quantizer Q of the image coding device 105 of the fifth embodiment is the same as that of the image coding device 103 of the third embodiment, and this Devices other than the non-zero coefficient measuring instrument NZcount, the position measuring instrument PosClc2, the number converter CodeTrans, and the variable length encoder VLC2 of the run length encoder RLE3 of the fifth embodiment, that is, the scan device Scan, the run measuring instrument RunCal, Since the operation of the level measuring instrument LevCal, the run converter RunConv, the level converter LevConv, the run level code converter RunLevEnc, and the order changer ReOdr is exactly the same as that of the run length encoder RLE2 of the third embodiment. The operations of the non-zero coefficient measuring instrument NZcount, the position measuring instrument PosClc2, the number converter CodeTrans, and the variable length encoder VLC2 will be mainly described below.
[0248] When the quantization component QS output from the quantizer Q is input to the run-length encoder RLE3, in the run-length encoder RLE3, the non-zero coefficient measuring instrument NZcount is based on the quantization component QS. , The number NZnum of non-zero components in a plurality of quantization components corresponding to each block is measured, and the number NZnum of the non-zero components is output to the position calculator PosClc2 and the variable length encoder VLC2.
The position calculator PosClc2 determines the number of encoded 0 components in the target block based on the number of non-zero components NZnum from the non-zero coefficient measuring instrument NZcount and the run value Run from the run measuring instrument RunCal. The sum of the number of non-zero components is calculated, and the calculated value Pos2 is output.
[0250] The number converter CodeTrans outputs the code number ExtCode corresponding to the runlevel pair from the level value Lev2 and the run value Run2 based on the correspondence between the runlevel upper digit pair and the code number ReOdrCode. At this time, in the number converter CodeTrans, the calculated value Pos2 output from the position computer PosClc2 is used to calculate the number of uncoded components in the target block.
[0251] Here, the code number ExtCode corresponding to the runlevel pair output from the number converter CodeTrans has a second code number whose correspondence relationship between the runlevel pair and the code number is different from that of the first code table. It was obtained based on the code table. Further, in this second code table, a code table in which the correspondence between the runlevel pair and the code number is different from that of the first code table is created by the rearrangement processing by the order changer ReOdr. The code table created by the reordering device ReOdr is subjected to the number converter CodeTrans based on the above calculated value Pos2, and the runlevel pair whose run value exceeds the maximum run value Run is assigned a code number without assigning a code. It was created by associating it with ExtCode.
The variable-length encoder VLC2 encodes the number of non-zero components NZnum and assigns a bit string (codeword) to the code number ExtCode to generate a coded stream Str3. Is encoded.
[0253] Hereinafter, the operation of the variable length encoder VLC2 will be described in detail. Unlike the variable-length encoder VLC of the third embodiment, the variable-length encoder VLC2 of the fifth embodiment not only encodes the code number ExtCode corresponding to the run-level pair of the target block, but also encodes the target. The number of non-zero components of a block, NZnum, is encoded before the code number ExtCode of the block is encoded.
[0254] If the number of non-zero components NZnum is encoded before the coding of the code number ExtCode of the block in this way, the number of non-zero components NZnum of the target block can be first decoded at the time of decoding, and the non-zero components can be decoded first. When the number of runlevel pairs corresponding to the number of 0 components NZnum is restored, it becomes possible to determine that the restoration of the last runlevel pair of the target block is completed. As a result, the special value EOB (the value transmitted after the last non-zero component) to be encoded at the end of the target block, which was required in the variable length encoder VLC of the third embodiment, is variable length encoded. It is not required for the VLC2 device.
Next, the operations of the position calculator PosClc2 and the number converter CodeTrans will be described in detail. Assuming that there are N Blocks of the quantization component QS of the target block, including 0 and non-zero components, the maximum run length (maximum number of consecutive 0 coefficients) is NBlock- from the number of non-0 coefficients of the target block NZnum. It becomes NZnum pieces. In addition, the maximum run value (maximum number of consecutive 0 coefficients) MaxRun (1) at the time when the coding of the first runlevel pair is completed is as follows using the run value FRun of the first runlevel pair of the target block. It is expressed by equation (5). MaxRun (1) = NBlock-NZnum-FRun (5) [0256] Generally, the maximum run value MaxRun (i) at the time when the coding of the i-th runlevel pair in the block is completed is as follows. It is expressed by equation (6). MaxRun (i) = NBlock-NZnum-{Sum of run values from 1st to (i) th} (6) [0257] Therefore, the position calculator PosClc2 outputs the calculated value Pos2 shown by the following equation (7), so that the maximum run value MaxRun (i) is the value indicated by the equation (8) in the number converter CodeTrans. Instruct. Pos2 = NZnum + {sum of runlevels from 1st to (i) th} (7) MaxRun (i) = NBlock-Pos2 (8) [0258] The number converter CodeTrans is the second It is assumed that the code table is associated with the code number ExtCode that does not assign a code to the runlevel pair whose run value exceeds the maximum run value MaxRun. As a result, it is possible to reduce the redundancy of the coding process by assigning the code to the runlevel pair, which should not occur, and improve the compression rate.
[0259] When the variable-length coding process for the quantization component is performed, the first and second code tables include a first part (regularly build VLC) that can be generated by an arithmetic operation and a regular one. When using a variable-length code table composed of a second part (table look up VLC) that cannot be generated by arithmetic, the second code table has a maximum run of both parts with respect to the first code table. Although it may be changed according to the value, in the second code table, only the first part that can be generated by an arithmetic operation that is easy to calculate is applied to the first code table according to the maximum run value. It may be changed.
[0260] Further, when the variable-length code table is changed according to the maximum run value MaxRun (i) at the time when the coding of the i-th runlevel pair is completed, the code table is changed to the maximum run value Run. Instead of assigning no code to runlevel pairs that exceed the runlevel MaxRun (i), the variable-length code table is assigned a code directly to the runlevel pairs whose runlevel Run exceeds the maximum runlevel MaxRun (i). You may switch to something that you haven't.
FIG. 24 is a diagram showing an example of a variable length code table. The code table Ta (FIG. 24 (a)) has a shorter code assigned to a smaller run value than the code table Tb (FIG. 24 (b)). In (b)), the code assigned to the small run value is a shorter code than that in the code table Tc (Fig. 24 (c)).
[0262] Further, the code table Tc (FIG. 24 (c)) has a shorter code assigned to the Level value having a smaller absolute value than the code table Tb (FIG. 24 (b)). , The code table Tb (Fig. 24 (b)) has a shorter code assigned to the Level value having a smaller absolute value than the code table Ta (Fig. 24 (a)).
Therefore, when the maximum run value MaxRun is small, the code table Ta in FIG. 24 (a), when the maximum run value MaxRun is large, the code table Tc in FIG. 24 (c), and the maximum run value MaxRun are intermediate values. In this case, it is better to select and use the code table Tb in FIG. 24 (b).
[0264] As described above, in the fifth embodiment, in the image coding apparatus 105 that encodes the quantization coefficient obtained by quantizing the frequency component of the image signal, the quantization coefficient can be changed by using a code table. A run-length encoder RLE3 that assigns a long code is provided, and the run-length encoder RLE3 includes the number of processed coefficients that have been encoded in the target block of the coding process and the code in the target block. It can appear according to the sum of the number of uncoded non-zero coefficients that have not been quantized, in other words, the number of non-zero coefficients of the target block and the number of processed run values of the target block. Since a code table excluding non-sexual run-level pairs is selected, there is an effect that the variable-length coding efficiency can be improved.
[0265] In the fifth embodiment, as the run-length encoder, the non-zero component of the target block is used in the encoder that performs variable-length coding for the quantization component of each block using the run-level pair. Although the one that encodes the number NZnum of is shown, the run-length encoder separately variable-length encodes the run value and the level value for the quantization component of each block as in the first embodiment. In the encoder, the number of non-zero components of the target block, NZnum, may be encoded. In this case, the maximum run value in the target block can be obtained by subtracting the number of non-zero components NZnum from the number of all components in the target block.
[Embodiment 6] FIG. 22 is a block diagram for explaining the image decoding apparatus according to the sixth embodiment of the present invention. The image decoding device 106 of the sixth embodiment replaces the run-length decoder RLD2 in the image decoding device 104 of the fourth embodiment shown in FIG. 18 by the decoding process of the coded data for each block. It is equipped with a run-length decoder RLD3 that restores runlevel pairs and the number of non-zero components. The other devices in the image decoding device 106 of the sixth embodiment are the same as those in the image decoding device 104 of the fourth embodiment.
FIG. 23 shows a specific configuration of the run-length decoder RLD3 in the image decoding apparatus 106. The run-length decoder RLD3 of the sixth embodiment replaces the position computer PosClc in the run-length decoder RLD2 of the fourth embodiment shown in FIG. 19, and is a decoded run in the target block of the decoding process. It is equipped with a position calculator PosClc2 that calculates the sum Pos2 of these numbers based on the number of values and the number of non-zero coefficients NZnum in the target block.
Further, the variable length decoder VLD2 of the run length decoder RLD3 of the sixth embodiment is different from the variable length decoder VLD of the run length decoder RLD2 of the fourth embodiment. Along with the decoding process for restoring the code number ExtCode, the decoding process for restoring the number of encoded non-zero components NZnum is performed.
Next, the action and effect will be described. The operations of the inverse quantizer IQ, the inverse frequency converter ITrans, and the inverse blocker DeBlk of the image decoding apparatus 106 of the sixth embodiment are the same as those of the image decoding apparatus 104 of the fourth embodiment. Further, the devices other than the variable length decoder VLD2, the position measuring instrument PosClc2, and the number reverse converter ICodeTrans of the run length decoder RLD3 of the sixth embodiment, that is, the order reverse reordering device IReOdr and the run level acquirer RunLevDec. The operation of the level inverse converter ILevConv, the run inverse converter IRunConv, and the inverse zigzag scan device IScan is exactly the same as that of the run-length decoder RLD2 of the fourth embodiment. The operation of the chemical device VLD2, the position measuring device PosClc2, and the number inverse converter ICodeTrans will be described.
[0270] The variable-length decoder VLD2 decodes the coded stream Str3 and outputs a code number ExtCode corresponding to the code word (bit string) constituting the stream. The number inverse converter ICodeTrans is based on at least one of the above quantization parameters QP and VLD selection signal VldSel, and the addition value Pos2 of the number of decoded coefficients and the number of undecoded non-zero coefficients, and the number converter CodeTrans. Performs the reverse operation to separate the code number PrmCode corresponding to the run level upper digit pair consisting of the level value Lev1 and the run value Run1 from the code number ExtCode, and the level value Lev2 and the run value Run2. Then, the order reverse reordering device IReOdr, the runlevel acquirer RunLevDec, the run reverse converter IRunConv, the level reverse converter ILevConv, and the reverse zigzag scan device IScan perform the same operations as those in the fourth embodiment.
[0271] Here, in the number inverse converter ICodeTrans, the order inverse selector IReOdr, the run inverse converter IRunConv, and the level inverse converter ILevConv, at least one of the quantization parameter QP and the VLD selection signal VldSel and the above The first and second code tables are selected based on the coefficient addition value Pos2, and the operation based on the selected code table is performed.
[0272] Hereinafter, the operation of the variable length decoder VLD2 will be described in detail. Unlike the variable-length decoder VLD of the fourth embodiment, the variable-length decoder VLD2 of the sixth embodiment not only decodes the code number ExtCode corresponding to the runlevel pair, but also decodes the code of the target block. Decode the number of non-zero components converted to NZnum. If the number of non-zero components NZnum can be obtained by decoding, it can be determined that the NZnumth runlevel pair is the last runlevel pair of the target block when the NZnum runlevel pairs are decoded. As a result, the value EOB to be encoded at the end of the target block required by the variable-length decoder VLD is no longer required by the variable-length decoder VLD2.
[0273] For example, assuming that there are N Blocks of the quantization component QS of the target block including the 0 component and the non-0 component, the maximum run value (maximum continuous 0 coefficient) from the number of non-0 coefficients of the target block NZnum. Number) will be NBlock-NZnum. Further, the maximum run value (maximum number of consecutive 0 coefficients) MaxRun (1) at the time of decoding to restore the first runlevel pair is as described in the fifth embodiment (NBlock-NZnum-). FRun)
[0274] In general, the maximum run value MaxRun (i) at the time of decoding to restore the i-th runlevel pair in a block is MaxRun (i) = NBlock-NZnum-, as shown below. {The sum of the runlevels from the 1st to the (i) th}.
Therefore, the position calculator PosClc2 outputs the coefficient addition value Pos2 [= NZnum + {sum of the runlevels from the 1st to the (i) th}] to the number converter CodeTrans for the i-th run. Indicates that the maximum run value at the time of decryption to restore the level pair is (NBlock-Pos2).
[0276] In the number inverse converter ICodeTrans, a code number ExtCode corresponding to a code is acquired by using a code table in which a code is not assigned to a code number corresponding to a runlevel pair whose run value exceeds the maximum run value Run. As a result, the code assigned to the code number can be decoded by the code assignment that avoids the code assignment to the runlevel pair that should not occur.
[0277] When the variable length decoding process is performed, as the first and second code tables, a first part (regularly build VLC) that can be generated by an arithmetic operation and a second that cannot be regularly generated. When using a variable-length code table composed of the part (table look up VLC), the second code table is the first code table with both parts changed according to the maximum run value. However, in the second code table, only the first part that can be generated by an arithmetic operation that is easy to operate may be changed with respect to the first code table according to the maximum run value. ..
[0278] Further, when the variable-length code table is changed according to the maximum run value MaxRun at the time when the decoding for restoring the i-th run level pair is completed, the code table is changed and the run value is the maximum run value. Instead of assigning no code to run-level pairs that exceed MaxRun, a variable-length code table can be, for example, code table Ta shown in FIG. 24 (a), code table Tb shown in FIG. 24 (b), or FIG. 24. You may switch directly to the code table Tc shown in (c).
[0279] For example, when the maximum run value MaxRun is small, the code table Ta in FIG. 24 (a), when the maximum run value MaxRun is large, the code table Tc in FIG. 24 (c), and the maximum run value MaxRun are intermediate values. In this case, it is better to select and use the code table Tb in FIG. 24 (b).
[0280] As described above, in the sixth embodiment, the variable length code is used in the image decoding apparatus 106 that recovers the quantization coefficient obtained by quantizing the frequency component of the image signal by the decoding process of the coded data. The run-length decoder RLD3 that acquires the quantization coefficient corresponding to the above using a code table is provided, and the run-length decoder RLD3 includes the number of processed coefficients that have been decoded in the target block. , A code table excluding run-level pairs that may not appear is selected according to the sum of the number of undecrypted non-zero coefficients in the target block that has not been decrypted. It is possible to satisfactorily perform the decoding process corresponding to the variable-length coding process capable of more effectively removing the redundant information existing in the quantization coefficient.
[0281] In the sixth embodiment, as the run-length decoder, the target block is encoded in the decoder that performs variable-length decoding on the quantization component of each block using the run-level pair. Although the number of non-zero components NZnum is decoded, the run-length decoder has a run value and a level corresponding to the quantization component of each block, for example, as in the second embodiment. In a run-length decoder that performs variable-length decoding separately from the value, the number of encoded non-zero components NZnum of the target block may be decoded. In this case, when the NZnum level values are decoded, it can be determined that the NZnumth level value is the last level value of the target block.
[0282] Further, in each of the above embodiments, an example of switching the code table with the quantization parameter QP has been described, but other parameters may be used instead of the quantization parameter QP. For example, a new parameter may be introduced and explicitly switched for each block.
[0283] Further, in each of the above-described embodiments, as a method of variable-length coding (decoding) of coefficients such as quantization components, a method using a VLC table is performed, and the above-mentioned coding (decoding) processing is performed. Although the VLC table is switched according to the information on the processed coefficient and at least one of the parameters related to the generation of the coefficient, the variable length coding (decoding) of the coefficient such as the quantization component of the present invention is shown. The method is not limited to the one using the VLC table. For example, the method of variable-length coding the quantization component in the first, third, and fifth embodiments is a variable-length coding method that does not use the VLC table, and is information on the processed coefficient and the above coefficient. The code table corresponding to the VLC table may be switched according to at least one of the parameters related to generation. Further, the method of variable-length decoding of the encoded data of the quantization component according to the second, fourth, and sixth embodiments is the variable-length decoding method that does not use the VLC table, and the information regarding the processed coefficient, And the code table corresponding to the VLC table may be switched according to at least one of the parameters related to the generation of the coefficient.
[0284] Further, in each of the above-described embodiments, an image coding device that performs variable-length coding processing or an image decoding device that performs variable-length decoding processing is realized by hardware. The device may be implemented by software. In this case, by recording the program for performing the variable-length coding process or the variable-length decoding process shown in each of the above embodiments on a data storage medium such as a flexible disk, the image coding apparatus or the image The decoding device can be easily realized in an independent computer system.
[0285] FIG. 25 is a diagram for explaining a computer system that performs the variable-length coding process of the first, third, and fifth embodiments or the variable-length decoding process of the second, fourth, and sixth embodiments.
[0286] Fig. 25 (a) shows the appearance, cross-sectional structure, and flexible disk body of a flexible disk, which is a storage medium for programs used in a computer system, when viewed from the front, and FIG. 25 (b) shows the flexible disk body. Shows an example of the physical format of. The flexible disk FD has the disk body D built in the case F, and a plurality of track Trs are concentrically formed on the surface of the disk body D from the outer circumference to the inner circumference, and each track is formed. It is divided into 16 sectors Se in the angular direction. Therefore, in the flexible disk FD in which the program is stored, a program for performing the variable-length coding process or the variable-length decoding process is recorded in the storage area allocated on the disk body D.
[0287] Further, FIG. 25 (c) shows a configuration for recording / reproducing the above program on the flexible disk FD. When recording the above program on the flexible disk FD, the above program is written from the computer system Cs to the flexible disk FD via the flexible disk drive. When the image encoding device or the image decoding device is constructed in the computer system by the program recorded in the flexible disk FD, the program is read from the flexible disk by the flexible disk drive and transferred to the computer system.
[0288] In the above description, a flexible disk is shown as a recording medium for recording a program for performing variable-length coding processing or variable-length decoding processing, but even if an optical disk is used as this recording medium, the above Similar to the case of using a flexible disk, variable-length coding processing or variable-length decoding processing by software can be performed. The recording medium is not limited to these, and any medium such as a CD-ROM, a memory card, a ROM cassette, etc. that can record a program can be used. Even when these recording media are used, the flexible disk or the like can be used. A variable-length coding process or a variable-length decoding process can be performed by a computer system in the same manner as in the case of using.
[0289] Further, an application example of the image coding method and the image decoding method shown in the above embodiment and a system using the same will be described below. FIG. 26 is a block diagram showing the overall configuration of the content supply system 1100 that realizes the content distribution service. The communication service providing area is divided into areas (cells) of a desired size, and base stations 1107 to 1110, which are fixed radio stations, are installed in each cell.
In this content supply system 1100, for example, the computer 1111, the PDA (personal digital assistant) 1112, the camera 1113, and the mobile phone are connected to the Internet 1101 via the Internet service provider 1102, the telephone network 1104, and the base stations 1107-1110. Each device such as 1114 and mobile phone 1200 with camera is connected.
[0291] However, the content supply system 1100 is not limited to the one including all of the plurality of devices shown in FIG. 26, and may include some of the plurality of devices shown in FIG. 26. Further, each device may be directly connected to the telephone network 1104 without going through the base stations 1107 to 1110, which are fixed radio stations.
[0292] Here, the camera 1113 is a device capable of shooting a moving image such as a digital video camera. In addition, the mobile phone is a PDC (Personal Digital Communications) system, a CDMA (Code Division Multiple Access) system, a W-CDMA (Wideband-Code Division Multiple Access) system, or a GSM (Global System for Mobile Communications) system mobile phone. Alternatively, it may be PHS (Personal Handyphone System) or the like, and any method may be used.
Further, the streaming server 1103 is connected to the camera 1113 via a base station 1109 and a telephone network 1104, and in this system, it is based on encoded data transmitted by a user using the camera 1113. Live distribution etc. is possible. The captured data may be encoded by the camera 1113 or by a server or the like that performs data transmission processing. Further, the moving image data obtained by capturing the moving image with the camera 1116 may be transmitted to the streaming server 1103 via the computer 1111. The camera 1116 is a device capable of shooting still images and moving images such as a digital camera. In this case, the moving image data may be encoded by either the camera 1116 or the computer 1111. Further, the coding process is performed by the LSI 1117 of the computer 1111 and the camera 1116.
[0294] The software for image coding / decoding may be stored in a storage medium (CD-ROM, flexible disk, hard disk, etc.) which is a recording medium readable by a computer 1111 or the like. Further, the moving image data may be transmitted by the mobile phone 1200 with a camera. This moving image data is data encoded by the LSI of the mobile phone 1200.
[0295] In this content supply system 1100, the content captured by the user with the camera 1113, the camera 1116, or the like (for example, a video of a live music) is encoded from the camera in the same manner as in the above embodiment. The content data is transmitted to the streaming server 1103, while the content data is stream-delivered from the streaming server 1103 to the requested client.
[0296] Examples of the client include a computer 1111, a PDA 1112, a camera 1113, a mobile phone 1114, and the like, which can decode the coded data.
[0297] In such a content supply system 1100, the encoded data can be received and reproduced on the client side, and further, the individual can be received, decoded, and reproduced in real time on the client side. Broadcasting is also feasible.
[0298] The image coding device or the image decoding device shown in each of the above embodiments may be used for coding and decoding of each device constituting this system.
[0299] A mobile phone will be described as an example thereof. FIG. 27 is a diagram showing a mobile phone 1200 using the image coding method and the image decoding method described in the above embodiment. This mobile phone 1200 has an antenna 1201 for transmitting and receiving radio waves to and from the base station 1110, a camera unit 1203 capable of capturing images and still images of a CCD camera, and an image and antenna 1201 captured by the camera unit 1203. It has a display unit 1202 such as a liquid crystal display that displays data such as images received in.
[0300] Further, the mobile phone 1200 has a main body unit 1204 to which a plurality of operation keys are attached, an audio output unit 1208 such as a speaker for performing audio output, and an audio input such as a microphone for performing audio input. Part 1205, recording media 1207 for storing encoded or decoded data such as captured video or still image data, received mail data, video data or still image data, and It has a slot portion 1206 for mounting the recording media 1207 on the mobile phone 1200.
[0301] Here, the recording medium 1207 is a flash memory element which is a kind of EEPROM (Electrically Erasable and Programmable Read Only Memory) which is a non-volatile memory which can be electrically rewritten or erased in a plastic case such as an SD card. It is stored.
[0302] Further, the mobile phone 1200 will be described in detail with reference to FIG. 28. The mobile phone 1200 has a main control unit 1241 that collectively controls each unit of the main body unit including the display unit 1202 and the operation key 1204. The mobile phone 1200 includes a power supply circuit unit 1240, an operation input control unit 1234, an image coding unit 1242, a camera interface unit 1233, an LCD (Liquid Crystal Display) control unit 1232, an image decoding unit 1239, a multiplex separation unit 1238, and recording. It has a reproduction unit 1237, a modulation / demodulation circuit unit 1236, and an audio processing unit 1235. Each part of the mobile phone 1200 is connected to each other via the synchronization bus 1250.
[0303] The power supply circuit unit 1240 can operate the digital mobile phone 1200 with a camera by supplying the power of the battery pack to each unit when the call is terminated and the power key is turned on by the user's operation. Start up in the state.
[0304] In the mobile phone 1200, each unit is operated under the control of the main control unit 1241 including a CPU, ROM, RAM, and the like. That is, in the mobile phone 1200, the voice signal obtained by voice input to the voice input unit 1205 in the voice call mode is converted into digital voice data by the voice processing unit 1235. The digital audio data is subjected to spread spectrum processing by the modulation / demodulation circuit unit 1236, further subjected to digital-to-analog conversion processing and frequency conversion processing by the transmission / reception circuit unit 1231, and transmitted via the antenna 1201.
Further, in the mobile phone 1200, the received signal received by the antenna 1201 in the voice call mode is amplified and subjected to frequency conversion processing and analog-digital conversion processing. The received signal is further subjected to spectrum reverse diffusion processing by the modulation / demodulation circuit unit 1236, converted into an analog audio signal by the audio processing unit 1235, and this signal is output via the audio output unit 1208.
Further, in the mobile phone 1200, when transmitting an e-mail in the data communication mode, the text data of the e-mail input by the operation of the operation key 1204 of the main body unit is mainly controlled via the operation input control unit 1234. It is sent to unit 1241. In the main control unit 1241, the text data is subjected to spread spectrum processing by the modulation / demodulation circuit unit 1236, digital-to-analog conversion processing and frequency conversion processing by the transmission / reception circuit unit 1231, and then transmitted to the base station 1110 via the antenna 1201. Each part is controlled so as to be.
[0307] In the mobile phone 1200, when the image data is transmitted in the data communication mode, the image data captured by the camera unit 1203 is supplied to the image coding unit 1242 via the camera interface unit 1233. Further, in the mobile phone 1200, when the image data is not transmitted, the image data obtained by the imaging by the camera unit 1203 may be directly displayed on the display unit 1202 via the camera interface unit 1233 and the LCD control unit 1232. It is possible.
[0308] The image coding unit 1242 includes the image coding device described in each of the above embodiments. The image coding unit 1242 converts the image data supplied from the camera unit 1203 into coded image data by compressing and coding the image data according to the image coding method of the above embodiment, and sends the image data to the multiple separation unit 1238. .. At the same time, at the same time, the mobile phone 1200 transmits the voice input to the voice input unit 1205 during imaging by the camera unit 1203 to the multiplex separation unit 1238 as digital voice data via the voice processing unit 1235.
[0309] The multiplexing separation unit 1238 multiplexes the coded image data supplied from the image coding unit 1242 and the audio data supplied from the audio processing unit 1235 by a predetermined method. The multiplexed data obtained as a result is subjected to spread spectrum processing by the modulation / demodulation circuit unit 1236, further subjected to digital-to-analog conversion processing and frequency conversion processing by the transmission / reception circuit unit 1231, and transmitted via the antenna 1201.
Further, in the mobile phone 1200, when receiving the data of the moving image file linked to the homepage or the like in the data communication mode, the received signal received from the base station 1110 via the antenna 1201 is transmitted by the modulation / demodulation circuit unit 1236. The spectrum reverse diffusion processing is performed, and the multiplexed data obtained as a result is sent to the multiplexing separation unit 1238.
[0311] Further, when decoding the multiplexed data received via the antenna 1201, the multiplexing separation unit 1238 separates the multiplexed data to encode the image data and the audio data. Separated from the stream, the coded image data is supplied to the image decoding unit 1239 and the audio data is supplied to the audio processing unit 1235 via the synchronization bus 1250.
[0312] Next, the image decoding unit 1239 is provided with an image decoding device according to an embodiment of the present invention. The image decoding unit 1239 generates reproduced moving image data by decoding the coded bit stream of the image data by a decoding method corresponding to the coding method according to the embodiment of the present invention described above, and displays the reproduced moving image data on the LCD. It is supplied to the display unit 1202 via the control unit 1232. As a result, for example, the moving image data included in the moving image file linked to the home page is displayed. At the same time, the voice processing unit 1235 converts the voice data into an analog voice signal and then supplies the voice data to the voice output unit 1208. As a result, for example, the audio data included in the moving image file linked to the home page is reproduced.
[0313] The system to which the image coding method and the image decoding method of each embodiment of the present invention described above can be applied is not limited to the above example of the content supply system.
[0314] For example, digital broadcasting by satellite or terrestrial broadcasting has recently become a hot topic, and the image encoding device or image decoding device of the above embodiment is also applied to a digital broadcasting system as shown in FIG. 29. It is possible.
[0315] Specifically, a coded bit stream of video information is transmitted from the broadcasting station 1409 to a satellite 1410 such as a communication satellite or a broadcasting satellite by wireless communication. When the broadcasting satellite 1410 receives the coded bitstream of the video information, a radio wave for broadcasting is output, and this radio wave is received by a home antenna 1406 equipped with satellite broadcasting receiving equipment. For example, in a device such as a television (receiver) 1401 or a set-top box (STB) 1407, the encoded bitstream is decoded and the video information is reproduced.
Further, the image decoding device shown in the above embodiment is also mounted on the playback device 1403 that reads and decodes the coded bit stream recorded on the storage medium 1402 such as a CD or DVD which is a recording medium. It is possible. In this case, the reproduced video signal is displayed on the monitor 1404. In addition, an image decoding device is mounted in a set-top box 1407 connected to a cable TV cable 1405 or a satellite / terrestrial broadcasting antenna 1406, and the output of the image decoding device is reproduced on the TV monitor 1408. The configuration is also conceivable. In this case, the image decoding device may be incorporated in the television instead of the set-top box. Further, the vehicle 1412 having the antenna 1411 can receive a signal from the satellite 1410 or the base station 1107 or the like and reproduce the moving image on the display device such as the car navigation system 1413 mounted on the vehicle 1412.
[0317] Further, the image signal can be encoded by the image coding apparatus shown in the above embodiment and recorded on a recording medium. Specific examples of the recording device include a recorder 1420 such as a DVD recorder that records an image signal on a DVD disc 1421 and a disc recorder that records an image signal on a hard disk. Further, the image signal can be recorded on the SD card 1422. Further, if the recorder 1420 is provided with the image decoding device shown in the above embodiment, the recorder 1420 can reproduce the image signal recorded on the DVD disc 1421 or the SD card 1422 and display it on the monitor 1408. ..
[0318] As the configuration of the car navigation system 1413, for example, among the configurations of the mobile phone shown in FIG. 28, those having a portion other than the camera unit 1203, the camera interface unit 1233, and the image coding unit 1242 can be considered. It is conceivable that the computer 1111 and the television (receiver) 1401 etc.
[0319] Further, the terminals such as the mobile phone 1114 include a transmission / reception terminal having both an encoder and a decoder, a transmitting terminal having only an encoder, and a receiving terminal having only a decoder. The implementation format is conceivable.
[0320] As described above, the image coding method or the image decoding method shown in the above-described embodiment can be used for any of the above-mentioned devices / systems, and by doing so, the above-described embodiment can be used. The described effect can be obtained. Furthermore, it goes without saying that the embodiments of the present invention and application examples thereof are not limited to those shown in the present specification.
[Effect of the Invention] As described above<u style="single">Ming</u>According to the variable-length coding method, the variable-length coding method encodes coefficient data composed of a plurality of coefficients, and for each of the above coefficients, numerical information indicating the magnitude of the coefficient and a code are provided. The coding step includes a coding step of converting the coefficient data into coded data composed of a plurality of codes using a plurality of code tables showing correspondence, and the coding step converts the code table into the code. For the code table selection step that selects according to at least one of the information about the processed coefficient that has been subjected to the coding process and the parameter related to the generation of the coefficient, and the uncoded coefficient that has not been subjected to the coding process. Since it includes a code assignment step of assigning a code using the selected code table, redundant information included in the coefficient data to be subjected to the variable length coding process constitutes the coefficient data. It will be effectively removed by selecting a code table according to the characteristics of the coefficient to be used and the status of the coding process for the coefficient, and this will greatly improve the coding efficiency of the variable length coding process for image signals and the like. Has the effect of being able to.
[0322] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length coding method, the above-mentioned coefficient is obtained by quantizing the frequency component of the image data based on the quantization step corresponding to the image data, and the above-mentioned code table selection step is the above-mentioned code assignment. Since the code table used in the step is selected according to the size of the quantization step, the code table that is suitable for the size of the quantization step and has the maximum coding efficiency is always used. There is an effect that can be used.
[0323] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length coding method, the coding process for the above-mentioned coefficient has a run value indicating the number of consecutive 0 coefficients whose value is 0 and a level value indicating the value of the non-zero coefficient following the 0 coefficient. Each is converted into a code, and the code table selection step selects one code table from a plurality of code tables indicating the correspondence between the run value and the code according to the size of the quantization step. At least one of the second selection processes for selecting one code table according to the size of the quantization step from the selection process of 1 and the plurality of code tables indicating the correspondence between the level value and the code. The selection process is performed, and the code assignment step codes at least one of the run value and the level value corresponding to the uncoded coefficient that has not been coded based on the selected code table. The code is always assigned to at least one of the run value and the level value, which is suitable for the size of the quantization step and minimizes the total number of bits of the code to be assigned. There is an effect that can be done using the table.
[0324] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length coding method, the coding process for the above-mentioned coefficient consists of a run value indicating the number of consecutive 0 coefficients whose value is 0 and a level value indicating the value of the non-zero coefficient following the 0 coefficient. The run-level pair is converted into a code, and the code table selection step is one code table from a plurality of code tables showing the correspondence between the run-level pair and the code according to the size of the quantization step. In the code assignment step, the code is assigned to the run-level pair corresponding to the uncoded coefficient that has not been subjected to the coding process based on the selected code table. Therefore, there is an effect that the code assignment to the run-level pair can always be performed by using a code table suitable for the size of the quantization step and which minimizes the total number of bits of the code to be assigned. ..
[0325] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length coding method, the code table selection step is characterized in that the code table used in the code allocation step is selected according to the information regarding the processed coefficient to which the code processing has been performed. Therefore, there is an effect that the coding process for the quantization coefficient can always be performed by using the code table that is suitable for the number of uncoded coefficients and has the maximum coding efficiency.
[0326] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length coding method, the coding process for the above-mentioned coefficient has a run value indicating the number of consecutive 0 coefficients whose value is 0 and a level value indicating the value of the non-zero coefficient following the 0 coefficient. Each of them is converted into a code, and the code table selection step changes the information about the run value corresponding to the processed coefficient to which the coding process is performed from a plurality of code tables showing the correspondence between the run value and the code. From the first selection process of selecting one code table according to the situation and the plurality of code tables showing the correspondence between the above level values and the codes, information on the level values corresponding to the processed coefficients subjected to the code processing can be obtained. At least one of the second selection processes for selecting one code table is performed accordingly, and the code allocation step is subjected to the coding process based on the selected code table. Since the code is assigned to at least one of the run value and the level value corresponding to the uncoded coefficient, the code is always assigned to at least one of the run value and the level value. There is an effect that it can be performed by using a code table that maximizes the coding efficiency, which is suitable for the number of conversion coefficients.
[0327] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length coding method, the code table selection step selects one code table from a plurality of code tables indicating the correspondence between the run values and the codes according to the number of processed run values to which the codes are assigned. The run value is selected, and the code assignment step is characterized in that the code is assigned to the uncoded run value to which the code is not assigned based on the selected code table. There is an effect that the code can always be assigned to the code using a code table that is suitable for the number of uncoded run values and has the maximum coding efficiency.
[0328] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length coding method, the coding process for the above-mentioned coefficient consists of a run value indicating the number of consecutive 0 coefficients whose value is 0 and a level value indicating the value of the non-zero coefficient following the 0 coefficient. The run-level pair is converted into a code, and the code table selection step corresponds the run-level pair to the code according to the information about the run-level pair corresponding to the processed coefficient subjected to the coding process. One code table is selected from a plurality of code tables indicating the above, and the code assignment step corresponds to the uncoded coefficient which has not been subjected to the coding process based on the selected code table. Since the code is assigned to the run-level pair, the code is always assigned to the run-level pair using a code table suitable for the number of uncoded coefficients and having the maximum coding efficiency. There are effects that can be done.
[0329] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length coding method, the above-mentioned coefficient is obtained by quantizing the frequency component of the image data based on the quantization step corresponding to the image data, and the above-mentioned coding step is a code for the above-mentioned coefficient. Since the quantization process is performed so that the codes are assigned to the plurality of coefficients constituting the coefficient data in descending order of the frequency components of the corresponding image data, the codes assigned to the coefficients This has the effect of further reducing the total number of bits.
[0330] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length coding method, the coding process for the above coefficients involves a run value indicating the number of consecutive 0 coefficients whose value is 0 for each block consisting of a certain number of coefficients, and a non-zero value following the 0 coefficient. A run-level pair consisting of a level value indicating a coefficient value is converted into a code, and the code table selection step has been processed in the target block to be coded. 1 from a plurality of code tables showing the correspondence between the run level pair and the code according to the sum of the number of coefficients and the number of unencoded non-zero coefficients in the target block. One code table is selected, and the code assignment step assigns a code to the run-level pair corresponding to the uncoded coefficient in the target block based on the selected code table. Therefore, it is possible to use a code table that excludes pairs of run values and level values that are unlikely to appear, which has the effect of improving the variable-length coding efficiency.
[0331] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length coding method, the coding process for the above-mentioned coefficient consists of a run value indicating the number of consecutive 0 coefficients whose value is 0 and a level value indicating the value of the non-zero coefficient following the 0 coefficient. The run-level pair is converted into a code, and the coding step corresponds the correspondence between the run-level pair and the corresponding code according to the combination of the run value and the level value forming the run-level pair. Based on the first code table shown in the above, the correspondence between the run level pair and the code in the first code table is regularly changed, and the first code table is the run level pair and the code. Including a code table processing step for creating a second code table having a different correspondence with the above, the code table selection step uses one of the first and second code tables, information on the processed coefficient, and the coefficient. Since it is characterized in that it is selected according to at least one of the parameters related to the generation of, as a code table used when assigning a code to a pair of a run value and a level value, the first and second code tables are used. The most suitable one will be selected, and the redundancy of the information existing in the data to be processed can be removed more effectively. As a result, the compression rate of the image signal or the like can be further improved, and its practical value is high.
[0332] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length coding method, the first and second code tables are associated with each runlevel pair by a shorter code as the level value forming the runlevel pair is smaller. The code table of is characterized in that, on average, the level value of the runlevel pair to which a short code is associated is smaller than that of the first code table, and thus constitutes the processing target data. It has the effect of being effective when the quantization parameter of the coefficient is large.
[0333] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length coding method, in the first and second code tables, each runlevel pair is associated with a shorter code as the run value forming the runlevel pair is smaller. The code table of is characterized in that, on average, the run value of the runlevel pair to which a short code is associated is smaller than that of the first code table, and thus constitutes the processing target data. This is effective when the quantization parameter of the coefficient is small.
[0334] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length coding method, the coding process for the above-mentioned coefficient is to convert the run-level pair into a code for each block consisting of a certain number of coefficients, and the above-mentioned code table processing step is the above-mentioned second. Since the code table is created according to the number of processed coefficients to which the coding process is performed in the target block to be coded, the second code table is used. , It is possible to eliminate the pair of the run value and the level value that are unlikely to appear, which has the effect of further improving the variable length coding efficiency.
[0335] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length coding method, the code assignment step is characterized in that the code is assigned to the run level pair in order from the run level pair corresponding to the high coefficient of the frequency component of the image data. There is an effect that the improvement of the variable-length coding efficiency can be made larger by excluding the pair of the run value and the level value which is unlikely to appear in the second code table.
[0336] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length coding method, the second code table changes only the regularly calculable correspondence among the plurality of correspondences between runlevel pairs and codes included in the first code table. Since it is characterized by being a thing, there is an effect that the arithmetic processing required for creating the second code table can be reduced.
[0337] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length coding method, the coefficients constituting the above-mentioned coefficient data are obtained by quantizing the frequency component of the image data based on the quantization step according to the image data, and the above-mentioned code table selection step is Since it is a code table switching step in which the switching between the first code table and the second code table is performed based on the size of the quantization step, the coefficients constituting the processing target data As the code table used for the variable length coding process, there is an effect that a code table suitable for the quantization step can be used.
[0338] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length coding method, the code table selection step is a code table switching step in which switching between the first code table and the second code table is performed based on a switching instruction signal, and the coding step is a code table switching step. Since the switching instruction signal is coded, there is an effect that the code table used for the variable length coding process of the coefficient can be switched according to the characteristics of the data to be processed. ..
[0339] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length coding method, the coding process for the above-mentioned coefficient is to convert the run-level pair into a code for each block consisting of a certain coefficient, and the above-mentioned code table processing step is the above-mentioned second code. In the table, the number of processed coefficients that have been encoded in the target block to be encoded and the number of uncoded non-zero coefficients that have not been encoded in the target block. Since it is characterized by being created according to the sum of, the second code table can be made to exclude the pair of run value and level value that may not appear, which is variable. There is an effect that the long coding efficiency can be further improved.
[0340] Main departure<u style="single">Ming</u>According to the variable-length coding device, the variable-length coding device encodes coefficient data composed of a plurality of coefficients, and for each of the above coefficients, numerical information indicating the magnitude of the coefficient and a code are provided. A coding unit that performs a coding process for converting the coefficient data into coded data composed of a plurality of codes using a plurality of code tables indicating correspondence is included, and the coding unit converts the code table into the code. For the code table selection unit that selects according to at least one of the information about the processed coefficient that has been subjected to the coding process and the parameter related to the generation of the coefficient, and the uncoded coefficient that has not been subjected to the coding process. Since it has a code assigning unit for assigning a code using the selected code table, redundant information included in the coefficient data to be subjected to the variable length coding process is the coefficient data. It will be effectively removed by selecting a code table according to the characteristics of the coefficients that make up the data and the status of the coding process for the coefficient, which greatly improves the coding efficiency of the variable length coding process for image signals and the like. There is an effect that can be done.
[0341] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length coding apparatus, the above-mentioned coefficient is obtained by quantizing the frequency component of the image data based on the quantization step corresponding to the image data, and the above-mentioned code table selection unit performs the above-mentioned code assignment. Since the code table used in the unit is selected according to the size of the quantization step, the code table that is suitable for the size of the quantization step and has the maximum coding efficiency is always used. There is an effect that can be used.
[0342] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length coding apparatus, the code table selection unit selects the code table used in the code allocation unit according to the information regarding the processed coefficients to which the coding process has been performed. Therefore, there is an effect that the coding process for the quantization coefficient can always be performed by using the code table that is suitable for the number of uncoded coefficients and has the maximum coding efficiency.
[0343] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length coding apparatus, the coding process for the above-mentioned coefficient has a run value indicating the number of consecutive 0 coefficients whose value is 0 and a level value indicating the value of the non-zero coefficient following the 0 coefficient. Each is converted into a code, and the code table selection unit uses one code from a plurality of code tables indicating the correspondence between the run values and the codes according to the number of processed run values to which the codes are assigned. A table is selected, and the code assigning unit assigns a code to an uncoded run value to which the code is not assigned based on the selected code table. There is an effect that the code can always be assigned to the run value by using the code table that is suitable for the number of uncoded run values and has the maximum coding efficiency.
[0344] Main departure<u style="single">Ming</u>According to <u style="single">the above</u>In the variable-length coding apparatus, the above-mentioned coefficient is obtained by quantizing the frequency component of the image data based on the quantization step corresponding to the image data, and the above-mentioned coding unit is a code for the above-mentioned coefficient. Since the quantization process is performed so that the codes are assigned to the plurality of coefficients constituting the coefficient data in descending order of the frequency components of the corresponding image data, the codes assigned to the coefficients This has the effect of further reducing the total number of bits.
[0345] Main departure<u style="single">Ming</u>According to the program storage medium, the storage medium stores a program that performs a variable-length coding process for encoding coefficient data composed of a plurality of coefficients by a computer, and the program is the storage medium for each of the coefficients. A coding step of performing a coding process for converting the coefficient data into coded data consisting of a plurality of codes by using a plurality of code tables showing the correspondence between the numerical information indicating the magnitude of the coefficient and the code is included. The coding step includes a coding table selection step of selecting the code table according to at least one of the information regarding the processed coefficient subjected to the coding process and the parameter related to the generation of the coefficient, and the coding process. Since it includes a code assignment step of assigning a code to an uncoded coefficient that has not been applied by using the selected code table, the coefficient data to be subjected to the variable length coding process can be used. A variable-length coding process with high coding efficiency that can effectively remove the included redundant information by selecting a code table according to the characteristics of the coefficients that make up the coefficient data and the status of the coding process for the coefficient. There is an effect that can be realized by software.
[0346] Main departure<u style="single">Ming</u>According to the variable-length decoding method, the variable-length decoding method for decoding the coded data composed of a plurality of codes obtained by variable-length coding the coefficient data composed of a plurality of coefficients, each of the above. A decoding process for restoring the coded data to coefficient data composed of the plurality of coefficients by using a plurality of code tables indicating the correspondence between the numerical information indicating the magnitude of the coefficient and the code for the code. The decoding step includes a decoding step to perform, and the decoding step selects the code table according to at least one of the information regarding the processed coefficient subjected to the code processing and the parameter related to the generation of the coefficient. The coefficient data is characterized by including the step and the numerical acquisition step of acquiring the numerical information corresponding to the undecoded code that has not been subjected to the decoding process by using the selected code table. To perform variable-length decoding processing corresponding to variable-length coding processing with high coding efficiency, which can effectively remove redundant information included in the coefficient data and encode by switching the code table. Has the effect of being able to.
[0347] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length decoding method, the above-mentioned coefficient is obtained by quantizing the frequency component of the image data based on the quantization step corresponding to the image data, and the above-mentioned code table selection step is the above-mentioned numerical value acquisition. Since the code table used in the step is selected according to the size of the quantization step, the code table that is suitable for the size of the quantization step and has the maximum coding efficiency is always used. There is an effect that the variable-length decoding process corresponding to the variable-length coding process using the above can be performed.
[0348] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length decoding method, the decoding process for the code is performed on the code at a level indicating a run value indicating the number of consecutive 0 coefficients whose value is 0 and a non-zero coefficient value following the 0 coefficient. The code table selection step selects one code table from a plurality of code tables indicating the correspondence between the run value and the code according to the size of the quantization step. At least one of the second selection processes for selecting one code table according to the size of the quantization step from the selection process of 1 and the plurality of code tables indicating the correspondence between the level value and the code. The selection process is performed, and the numerical value acquisition step acquires at least one of the run value and the level value corresponding to the undecoded code that has not been subjected to the decoding process based on the selected code table. Therefore, the code allocation for at least one of the run value and the level value is always suitable for the size of the quantization step, and the total number of bits of the allocated code is the minimum code table. There is an effect that the variable-length decoding process corresponding to the variable-length coding process performed by using the above can be performed.
[0349] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length decoding method, the decoding process for the code is a level indicating the number of consecutive 0 coefficients whose value is 0 and the value of the non-zero coefficient following the 0 coefficient. It restores to a run-level pair consisting of values, and the code table selection step is one from a plurality of code tables showing the correspondence between the run-level pair and the code, depending on the size of the quantization step. The code table is selected, and the numerical value acquisition step acquires a run-level pair corresponding to the undecoded code that has not been subjected to the decoding process based on the selected code table. Therefore, the variable-length coding process is always performed by using a code table that is suitable for the size of the quantization step and minimizes the total number of bits of the code to be assigned. There is an effect that the variable length decoding process corresponding to the above can be performed.
[0350] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable length decoding method, the code table selection step is characterized in that the code table used in the numerical value acquisition step is selected according to the information regarding the processed coefficient obtained by the decoding process. Therefore, always perform variable-length decoding processing corresponding to variable-length coding processing that encodes the quantization coefficient using a code table that maximizes the coding efficiency, which is suitable for the number of undecoded coefficients. Has the effect of being able to.
[0351] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length decoding method, the decoding process for the code is a level indicating the run value indicating the number of consecutive 0 coefficients whose value is 0 and the value of the non-zero coefficient following the 0 coefficient. The code table selection step restores the values to one, depending on the information about the processed run value obtained by the decoding process from the plurality of code tables indicating the correspondence between the run values and the codes. From the first selection process for selecting a code table and a plurality of code tables showing the correspondence between the above level values and codes, one code table is selected according to the information regarding the processed level value obtained by the decoding process. The selection process of at least one of the second selection processes to be performed is performed, and the numerical value acquisition step is based on the selected code table, and the undecoded code that has not been subjected to the decoding process is selected. Since it is characterized in that it acquires at least one of the corresponding run value and the level value, the code assignment for at least one of the run value and the level value is always suitable for the number of undecoded coefficients. There is an effect that the variable-length decoding process corresponding to the variable-length coding process performed by using the code table that maximizes the conversion efficiency can be performed.
[0352] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length decoding method, the code table selection step is one code table according to the number of processed run values obtained by the decoding process from a plurality of code tables showing the correspondence between the run values and the codes. The numerical value acquisition step is characterized in that the run value corresponding to the undecoded code that has not been subjected to the decoding process is acquired based on the selected code table. Therefore, the variable-length decoding corresponding to the variable-length coding process in which the code is always assigned to the run value using the code table that is suitable for the number of undecoded run values and has the maximum coding efficiency. There is an effect that processing can be performed.
[0353] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length decoding method, the decoding process for the code is a code, a run value indicating the number of consecutive 0 coefficients whose value is 0, and a level value indicating the value of the non-zero coefficient following the 0 coefficient. The code table selection step is to restore to a run level pair consisting of, and the code table selection step is a plurality of codes indicating the correspondence between the run level pair and the code according to the information about the run level pair obtained by the decoding process. One code table is selected from the table, and the numerical value acquisition step acquires a run-level pair corresponding to the undecoded code that has not been decoded based on the selected code table. Therefore, the variable-length coding process is always performed by using a code table that is suitable for the number of undecoded coefficients and has the maximum coding efficiency. There is an effect that the variable length decoding process corresponding to the above can be performed.
[0354] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length decoding method, the above-mentioned coefficient is obtained by quantizing the frequency component of the image data based on the quantization step corresponding to the image data, and the above-mentioned decoding step is decoding with respect to the above-mentioned code. Since the conversion process is performed so that the numerical information corresponding to the code is acquired in order from the one having the highest frequency component of the corresponding image data, the total number of bits of the code assigned to the coefficient is used. There is an effect that the variable length decoding process corresponding to the variable length coding process that can further reduce the number of data can be performed.
[0355] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length decoding method, the decoding process for the code is a run indicating the number of consecutive 0 coefficients whose value is 0 for each block consisting of a certain number of coefficients constituting the coefficient data. It is restored to a run level pair consisting of a value and a level value indicating a non-zero coefficient value following the 0 coefficient, and the code table selection step is the target block in the target block of the decoding process. The above run is based on the sum of the number of processed coefficients obtained by the decoding process of the block and the number of undecrypted non-zero coefficients obtained by the decoding process of the block in the target block. One code table is selected from a plurality of code tables indicating the correspondence between the level pair and the code, and the numerical value acquisition step is based on the selected code table, and the undecoded coefficient in the target block is set. Since it is characterized by acquiring the corresponding run-level pair, it supports highly efficient variable-length coding processing by using a code table that excludes run-value and level-value pairs that are unlikely to appear. There is an effect that the variable length decoding process can be realized.
[0356] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable length decoding method, in the decoding process for the code, the code constituting the coded data has a run value indicating the number of consecutive 0 coefficients whose value is 0, and a non-zero following the 0 coefficient. It restores to a run-level pair consisting of a level value indicating the value of the coefficient, and the decoding step sets the correspondence between the run-level pair and the corresponding code to the run forming the run-level pair. Based on the first code table shown according to the combination of the value and the level value, the correspondence between the run level pair and the code in the first code table is regularly changed to obtain the first code table. Includes a code table processing step of creating a second code table in which the correspondence between the run level pair and the code is different, and the code table selection step performs the processing of one of the first and second code tables. Since it is characterized in that it is selected according to at least one of the information on the completed coefficient and the parameter on the generation of the above coefficient, it is used as a code table used when converting a code into a pair of a run value and a level value. The optimum one of the first and second code tables will be selected. As a result, the variable-length decoding process corresponding to the variable-length coding process that more effectively removes the redundancy of the information existing in the data to be processed can be satisfactorily performed, and its practical value is high. ..
[0357] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable length decoding method, the first and second code tables are associated with each runlevel pair by a shorter code as the level value forming the runlevel pair is smaller. The code table of is characterized in that, on average, the level value of the runlevel pair to which a short code is associated is smaller than that of the first code table, and thus constitutes the processing target data. This is effective when the quantization parameter related to the coefficient is large.
[0358] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable length decoding method, the first and second code tables are associated with each runlevel pair by a shorter code as the run value forming the runlevel pair is smaller. The code table of is characterized in that, on average, the run value of the runlevel pair to which a short code is associated is smaller than that of the first code table, and thus constitutes the processing target data. This is effective when the quantization parameter of the coefficient is small.
[0359] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length decoding method, the decoding process for the code is to restore the code to a run-level pair for each block consisting of a certain number of coefficients constituting the coefficient data, and the code table processing. The step is characterized in that the second code table is created according to the number of processed coefficients obtained by the decoding process in the target block to be the decoding process. , The second code table can be made to exclude run-value and level-value pairs that are unlikely to appear, thereby enabling variable-length decoding for more efficient variable-length coding processing. It has the effect of realizing processing.
[0360] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length decoding method, the numerical value acquisition step is characterized in that the runlevel pairs corresponding to the symbols are acquired in order from the runlevel pair having the highest frequency component of the corresponding image data. The variable-length decoding process corresponding to the variable-length coding process in which the compression ratio is further effectively improved by excluding the pair of the run value and the level value that may not appear in the second code table. Has the effect of realizing.
[0361] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable length decoding method, the second code table changes only the regularly calculable correspondence among the plurality of correspondences between the runlevel pair and the code included in the first code table. Since it is characterized by being a thing, there is an effect that the arithmetic processing required for creating the second code table can be reduced.
[0362] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable length decoding method, the coefficients constituting the coefficient data are obtained by quantizing the frequency component of the image data based on the quantization step corresponding to the image data, and the code table selection step is Since the switching between the first code table and the second code table is performed based on the size of the quantization step, variable length decoding of the coefficients constituting the data to be processed is performed. As the code table used for the quantization process, there is an effect that a code table suitable for the quantization step can be used.
[0363] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable length decoding method, the code table selection step includes a code table switching step of switching between the first code table and the second code table based on the switching instruction signal, and the decoding Since the step is characterized in that the switching instruction signal is decoded, there is an effect that the code table used for the variable length decoding process can be switched according to the characteristics of the data to be processed. ..
[0364] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length decoding method, the decoding process for the code is to restore the code to the run-level pair for each block consisting of a certain coefficient constituting the coefficient data, and the code table processing step is The second code table is still obtained by the number of processed coefficients obtained by the decoding process for the block in the target block to be decoded and the decoding process for the block in the target block. Since it is created according to the sum of the number of undecoded non-zero coefficients that have not been obtained, the second code table is a pair of run values and level values that are unlikely to appear. There is an effect that the variable-length decoding process corresponding to the more efficient variable-length coding process can be realized by using the one excluding the above.
[0365] Main departure<u style="single">Ming</u>According to the variable-length decoding device, the variable-length decoding device that decodes the coded data composed of a plurality of codes obtained by variable-length coding the coefficient data composed of a plurality of coefficients, and each of the above A decoding process for restoring the coded data to coefficient data composed of the plurality of coefficients by using a plurality of code tables indicating the correspondence between the numerical information indicating the magnitude of the coefficient and the code for the code. The decoding unit includes a decoding unit to be applied, and the decoding unit selects a code table according to at least one of the information regarding the processed coefficient subjected to the decoding process and the parameter related to the generation of the coefficient. It is characterized by having a unit and a numerical value acquisition unit that acquires numerical information corresponding to the undecoded code that has not been subjected to the decoding process by using the selected code table. Variable-length decoding processing corresponding to variable-length coding processing with high coding efficiency, which can effectively remove the redundancy of the information of the coefficient data and encode the coefficient data by switching the code table, is performed. There is an effect that can be done.
[0366] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length decoding apparatus, the above coefficient is obtained by quantizing the frequency component of the image data based on the quantization step corresponding to the image data, and the above-mentioned code table selection unit acquires the above-mentioned numerical value. Since the code table used in the unit is selected according to the size of the quantization step, the code table that is suitable for the size of the quantization step and has the maximum coding efficiency is always used. There is an effect that the variable-length decoding process corresponding to the variable-length coding process using the above can be performed.
[0367] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length decoding apparatus, the code table selection unit selects the code table used in the numerical value acquisition unit according to the information regarding the processed coefficients obtained by the decoding process. Therefore, always perform a variable-length decoding process corresponding to the variable-length coding process that encodes the quantization coefficient using a code table that maximizes the coding efficiency and is suitable for the number of undecoded coefficients. Has the effect of being able to.
[0368] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable-length decoding device, the decoding process for the code is performed on the code at a level indicating a run value indicating the number of consecutive 0 coefficients whose value is 0 and a non-zero coefficient value following the 0 coefficient. The code table selection unit restores the values to the values, and the code table selection unit is one from a plurality of code tables showing the correspondence between the run values and the codes, according to the number of processed run values obtained by the decoding process. The code table is selected, and the numerical value acquisition unit acquires a run value corresponding to the undecoded code that has not been subjected to the decoding process based on the selected code table. Therefore, the code is always assigned to the run value using a code table that is suitable for the number of undecoded run values and has the maximum coding efficiency. There is an effect that the decoding process can be performed.
[0369] Main departure<u style="single">Ming</u>According to<u style="single">the above</u>In the variable length decoding apparatus, the above coefficient is obtained by quantizing the frequency component of the image data based on the quantization step corresponding to the image data, and the above decoding unit decodes the code. Since the conversion process is performed so that the numerical information corresponding to the code is acquired in order from the one having the highest frequency component of the corresponding image data, the total number of bits of the code assigned to the coefficient is used. There is an effect that the variable length decoding process corresponding to the variable length coding process that can further reduce the number of data can be performed.
[0370] Main departure<u style="single">Ming</u>According to the program storage medium, a program for performing a variable-length decoding process for decoding coded data consisting of a plurality of codes obtained by variable-length coding the coefficient data consisting of a plurality of coefficients is stored. In the storage medium, the program uses a plurality of code tables indicating the correspondence between the numerical information indicating the magnitude of the coefficient and the code for each of the codes, and obtains the coded data from the plurality of codes. The decoding step includes a decoding step of performing a decoding process for restoring the coefficient data consisting of the coefficients, and the decoding step relates the code table to information on the processed coefficient to which the coded process has been performed, and to generate the coefficient. A code table selection step that selects according to at least one of the parameters, and a numerical value acquisition step that acquires numerical information corresponding to the undecoded code that has not been decoded by using the selected code table. Therefore, the coefficient data can be encoded by effectively removing redundant information contained in the coefficient data by switching the code table. Variable length coding with high coding efficiency. There is an effect that the variable length decoding process corresponding to the process can be realized by software.
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram for explaining an image coding apparatus 101 according to a first embodiment of the present invention.
FIG. 2 is a block diagram showing a run-length encoder RLE1 constituting the image coding apparatus 101 of the first embodiment.
FIG. 3 is for explaining the zigzag scan (Fig. (A) to Fig. (D)) and the rearrangement of run values and level values (Fig. (E), Fig. (F)) in the run length encoder RLE1. It is a figure of.
FIG. 4 is a diagram illustrating processing by the variable length encoder LVLC of the run length encoder RLE1. FIG. 4 (a) shows a flow of variable length coding processing of level values, and FIG. 4 (b). Indicates a code table used in the variable length coding process of the level value.
FIG. 5 is a diagram illustrating processing of the run-length encoder RLE1 in the variable-length encoder RVLC, and shows a flow of variable-length coding processing of the run value (FIG. (a)) and the run value. The code table (Fig. (B)) used in the variable length coding process is shown.
FIG. 6 shows the total number of bits of the code assigned to the level value (quantization parameter relatively small) by the variable length encoder LVLC when the code table L2 is used (Fig. (A)) and the code table L1. It is a figure shown separately from the case of using (Fig. (B)).
FIG. 7 shows the total number of bits of codes assigned to level values (relatively large quantization parameters) in the variable-length encoder LVLC when using code table L2 (Fig. (A)) and code table L1. It is a figure shown separately from the case of using (Fig. (B)).
[Fig. 8] When a specific code table is used for the total number of bits of the code assigned to the run value by the variable length encoder RVLC (Fig. (A)), the code table is switched and the run value is rearranged. (Fig. (B)) and the case where only the code table is switched (Fig. (C)) are shown separately.
FIG. 9 is a block diagram for explaining the image decoding apparatus 102 according to the second embodiment of the present invention.
FIG. 10 is a block diagram showing a run-length decoder RLD1 constituting the image decoding apparatus 102 of the second embodiment.
FIG. 11 is a diagram illustrating a variable length decoding process of the variable length decoder LVLD, a flow of the variable length decoding process for restoring a level value (FIG. (a)), and the variable length decoding process. The code table used in (Fig. (B)) is shown.
FIG. 12 is a diagram illustrating a variable length decoding process of the variable length decoder RVLD, a flow of the variable length decoding process for restoring a run value (FIG. (A)), and the variable length decoding process. The code table used in (Fig. (B)) is shown.
FIG. 13 is a block diagram for explaining the image coding apparatus 103 according to the third embodiment of the present invention.
FIG. 14 is a block diagram showing a run-length encoder RLE2 constituting the image coding apparatus 103 of the third embodiment.
FIG. 15 is a diagram showing an example of a code table (second code table) created by the run-length encoder RLE2 of the third embodiment T2a (Fig. (A)) and T2b (Fig. (B)). Is.
FIG. 16 is another example of a code table (second code table) created by the run-length encoder RLE2 of the third embodiment T2c (Fig. (A)), T2d (Fig. (B)), It is a figure which shows T2e (Fig. (C)).
FIG. 17 is a diagram showing an example of a coding order of quantization components in the run-length encoder RLE2 of the third embodiment.
FIG. 18 is a block diagram for explaining the image decoding apparatus 104 according to the fourth embodiment of the present invention.
FIG. 19 is a block diagram showing a run-length decoder RLD2 constituting the image decoding apparatus 104 of the fourth embodiment.
FIG. 20 is a block diagram for explaining the image coding apparatus 105 according to the fifth embodiment of the present invention.
FIG. 21 is a block diagram showing a run-length encoder RLE3 constituting the image coding device 105 of the fifth embodiment.
FIG. 22 is a block diagram for explaining the image decoding apparatus 106 according to the sixth embodiment of the present invention.
FIG. 23 is a block diagram showing a run-length decoder RLD3 constituting the image decoding apparatus 106 of the sixth embodiment.
FIG. 24 is an example of a variable-length code table used in the run-length encoder RLE3 of the fifth embodiment and the run-length decoder RLD3 of the sixth embodiment Ta (Fig. (A)), Tb (Fig. (B). )), Tc (Fig. (C)).
FIG. 25 is a data storage medium (FIGS. (a) and (b)) containing a program for performing a variable-length coding process or a variable-length decoding process according to each of the above embodiments by a computer system, and the above computer system. It is a figure for demonstrating (Fig. (C)).
FIG. 26 is a diagram illustrating an application example of the image coding method and the image decoding method of each of the above embodiments, and shows a content supply system that realizes a content distribution service.
FIG. 27 is a diagram illustrating a mobile phone using the image coding method and the image decoding method of each of the above embodiments.
FIG. 28 is a block diagram showing a detailed configuration of the mobile phone shown in FIG. 27.
FIG. 29 is a conceptual diagram showing a digital broadcasting system using the image coding device or the image decoding device of each of the above embodiments.
FIG. 30 is a block diagram showing a conventional image coding device 201a.
FIG. 31 is a block diagram for explaining a encoder RLE0a constituting a conventional image coding apparatus 201a.
FIG. 32 is a block diagram for explaining a conventional image decoding device 202a corresponding to the conventional image coding device 201a.
FIG. 33 is a block diagram for explaining a decoder RLD0a constituting a conventional image decoding device 202a.
FIG. 34 is a block diagram showing an image coding device 201b that performs conventional run-length coding.
FIG. 35 is a block diagram for explaining a run-length encoder RLE0b constituting a conventional image coding apparatus 201b.
FIG. 36 is a block diagram for explaining a conventional image decoding device 202b corresponding to a conventional image coding device 201b.
FIG. 37 is a block diagram for explaining a run-length decoder RLD0b constituting a conventional image decoding apparatus 202b.
FIG. 38 is a block diagram for explaining another image coding device 201c that performs conventional run-length coding.
FIG. 39 is a block diagram showing a run-length encoder RLE0c constituting a conventional image coding device 201c.
FIG. 40 is a block diagram for explaining a conventional image decoding device 202c corresponding to a conventional image coding device 201c.
FIG. 41 is a block diagram for explaining a run-length decoder RLD0c constituting a conventional image decoding apparatus 202c.
FIG. 42 is a diagram showing an example of a coding table used in the run-length encoder RLE0c constituting the conventional image coding apparatus 201c.
FIG. 43 is a diagram showing an example of the coding order of the quantization components in the conventional run-length encoders RLE0a, RLE0b, and RLE0c.
[Code Description] 101,103,105 Image Encoding Device 102,104,106 Image Decoding Device 1100 Content Supply System 1200 Mobile Phone 1400 Digital Broadcasting System Blk Blocker CodeTrans Number Converter DeBlk Reverse Blocker DMUX Separator ICodeTrans Number Reverse Converter ILevConv Level Inverse Converter IQ Inverse Quantizer IReOdr Order Inverse Reorderer IRunConv Run Inverse Converter IScan Inverse Zigzag Scan ITrans Inverse Frequency Converter LevCal Level Measuring Instrument LevConv Level Converter Lreodr, Rreodr Order Reorderer LIreodr, RIreodr Instrument MUX Multiplexer NumClc Counting Instrument PosClc Position Calculator Q Quantizer ReOdr Order Transducer RLD1, RLD2, RLD3 Run Length Decoder RLE1, RLE2, RLE3 Run Length Encoder RunCal Run Instrument RunConv Run Converter RunLevEnc Run Level Code Converter RunLevDec Run Level Acquirer Scan Zigzag Scan Trans Frequency Converter LVLC, RVLC, VLC, VLC2 Variable Length Encoder LVLD, RVLD, VLD, VLD2 Variable Length Decoder Cs Computer System FD Flexible Disk FDD Flexible Disk Drive
Every citation, both ways
| Document | Relation | Office |
|---|---|---|
| JP7143488A | Cites | Japan |
| JP10271017A | Cites | Japan |
| JP2000341694A | Cites | Japan |
155 members in 14 offices
Priority claims10
| Document | Office | Kind | Date |
|---|---|---|---|
| 2001358197 | Japan | A | |
| 2001358197 | Japan | – | |
| 2002099227 | Japan | A | |
| 2002099227 | Japan | – | |
| 2002339082 | Japan | A | |
| 20012001358197 | – | – | – |
| 2002200299227 | – | – | – |
| JP20010358197 | – | – | – |
| JP20020099227 | – | – | – |
| JP20020339082 | – | – | – |
Members155
| Document | Office | Kind | |
|---|---|---|---|
| CA2450360A1 | Canada | A1 | |
| CA2467266A1 | Canada | A1 | |
| CA2607755A1 | Canada | A1 | |
| CA2608610A1 | Canada | A1 | |
| WO03044964A1 | World Intellectual Property Organization (WIPO) | A1 | |
| WO03045065A2 | World Intellectual Property Organization (WIPO) | A2 | |
| AU2002357584A1 | Australia | A1 | |
| AU2002357584A2 | Australia | A2 | |
| AU2002366142A1 | Australia | A1 | |
| JP2004007376A | Japan | A | |
| WO03045065A3 | World Intellectual Property Organization (WIPO) | A3 | |
| BR0206628A | Brazil | A | |
| BR0206629A | Brazil | A | |
| MXPA04000912A | Mexico | A | |
| EP1413139A2 | European Patent Office (EPO) | A2 | |
| KR20040054621A | Republic of Korea | A | |
| KR20040054794A | Republic of Korea | A | |
| MXPA04004770A | Mexico | A | |
| CN1524384A | China | A | |
| EP1453208A1 | European Patent Office (EPO) | A1 | |
| US2004174278A1 | United States of America | A1 | |
| US2005015248A1 | United States of America | A1 | |
| CN1586042A | China | A | |
| US2005185853A1 | United States of America | A1 | |
| US2005185854A1 | United States of America | A1 | |
| US2005190085A1 | United States of America | A1 | |
| US6954157B2 | United States of America | B2 | |
| US6967600B2 | United States of America | B2 | |
| US6992605B2 | United States of America | B2 | |
| US2006071831A1 | United States of America | A1 | |
| JP2006141040A | Japan | A | |
| JP2006157904A | Japan | A | |
| US7109898B2 | United States of America | B2 | |
| US2006261987A1 | United States of America | A1 | |
| US2006262987A1 | United States of America | A1 | |
| US2006273940A1 | United States of America | A1 | |
| US7161508B2 | United States of America | B2 | |
| US2007024474A1 | United States of America | A1 | |
| US2007024475A1 | United States of America | A1 | |
| US2007030183A1 | United States of America | A1 | |
| CN1301014C | China | C | |
| CN1946185A | China | A | |
| CN1946186A | China | A | |
| CN1946187A | China | A | |
| AU2002357584B2 | Australia | B2 | |
| AU2007202509A1 | Australia | A1 | |
| AU2007202520A1 | Australia | A1 | |
| CN101001385A | China | A | |
| CN101005625A | China | A | |
| CN101005626A | China | A | |
| US7283071B2 | United States of America | B2 | |
| CN101064843A | China | A | |
| US7312730B2 | United States of America | B2 | |
| US7312731B2 | United States of America | B2 | |
| US7339506B2 | United States of America | B2 | |
| US2008074296A1 | United States of America | A1 | |
| KR20080041752A | Republic of Korea | A | |
| KR20080044350A | Republic of Korea | A | |
| KR20080044351A | Republic of Korea | A | |
| KR20080044352A | Republic of Korea | A | |
| KR20080044353A | Republic of Korea | A | |
| KR20080044354A | Republic of Korea | A | |
| JP4100552B2This record | Japan | B2 | |
| US7411526B2 | United States of America | B2 | |
| JP2008206188A | Japan | A | |
| JP4158985B2 | Japan | B2 | |
| JP4158986B2 | Japan | B2 | |
| JP4158993B1 | Japan | B1 | |
| JP4158994B1 | Japan | B1 | |
| JP4158995B1 | Japan | B1 | |
| JP4158996B2 | Japan | B2 | |
| JP4158997B1 | Japan | B1 | |
| JP4158998B1 | Japan | B1 | |
| JP4158999B1 | Japan | B1 | |
| JP2008252902A | Japan | A | |
| JP2008252903A | Japan | A | |
| JP2008252904A | Japan | A | |
| JP2008259217A | Japan | A | |
| JP2008259218A | Japan | A | |
| JP2008259219A | Japan | A | |
| US7541948B2 | United States of America | B2 | |
| KR100913633B1 | Republic of Korea | B1 | |
| KR20090098924A | Republic of Korea | A | |
| KR100921030B1 | Republic of Korea | B1 | |
| KR100921031B1 | Republic of Korea | B1 | |
| KR100921032B1 | Republic of Korea | B1 | |
| KR100921033B1 | Republic of Korea | B1 | |
| KR100921034B1 | Republic of Korea | B1 | |
| KR20090120016A | Republic of Korea | A | |
| AU2007202520B2 | Australia | B2 | |
| KR20090122311A | Republic of Korea | A | |
| AU2007202509B2 | Australia | B2 | |
| CA2450360C | Canada | C | |
| CN100586190C | China | C | |
| KR100947399B1 | Republic of Korea | B1 | |
| AU2010200906A1 | Australia | A1 | |
| AU2010200907A1 | Australia | A1 | |
| KR20100042666A | Republic of Korea | A | |
| KR20100042667A | Republic of Korea | A | |
| KR20100042668A | Republic of Korea | A |
34 legal events, as the office reported them to INPADOC
Over the term
Point at a mark for the eventEvents
| Event | Code | |
|---|---|---|
| Written notification of registration of transferJAPANESE INTERMEDIATE CODE: R350R350 | R350 | |
| Receipt of annual feesJAPANESE INTERMEDIATE CODE: R250R250 | R250 | |
| Written request for registration of change of domicileJAPANESE INTERMEDIATE CODE: R313531S531 | S531 | |
| Request for trust registration of transfer of rightJAPANESE INTERMEDIATE CODE: R313135S131 | S131 | |
| Receipt of annual feesJAPANESE INTERMEDIATE CODE: R250R250 | R250 | |
| Receipt of annual feesJAPANESE INTERMEDIATE CODE: R250R250 | R250 | |
| Receipt of annual feesJAPANESE INTERMEDIATE CODE: R250R250 | R250 | |
| Receipt of annual feesJAPANESE INTERMEDIATE CODE: R250R250 | R250 | |
| Written notification of registration of transferJAPANESE INTERMEDIATE CODE: R350R350 | R350 | |
| Request for trust registration of transfer of rightJAPANESE INTERMEDIATE CODE: R313135S131 | S131 | |
| Request for trust registration of transfer of rightJAPANESE INTERMEDIATE CODE: R313135S131 | S131 | |
| Written request for trust registrationJAPANESE INTERMEDIATE CODE: R313Z02SZ02 | SZ02 | |
| Written request for trust registrationJAPANESE INTERMEDIATE CODE: R313Z02SZ02 | SZ02 | |
| Request for trust registration of transfer of rightJAPANESE INTERMEDIATE CODE: R313135S131 | S131 | |
| Written request for trust registrationJAPANESE INTERMEDIATE CODE: R313Z02SZ02 | SZ02 | |
| Written notification of registration of transferJAPANESE INTERMEDIATE CODE: R350R350 | R350 | |
| Request for change of ownership or part of ownershipJAPANESE INTERMEDIATE CODE: R313113S111 | S111 | |
| Written notification of registration of transferJAPANESE INTERMEDIATE CODE: R350R350 | R350 | |
| Request for change of ownership or part of ownershipJAPANESE INTERMEDIATE CODE: R313113S111 | S111 | |
| Written request for registration of change of nameJAPANESE INTERMEDIATE CODE: R313533S533 | S533 | |
| Renewal fee payment (event date is renewal date of database)FPAY | FPAY | |
| Renewal fee payment (event date is renewal date of database)FPAY | FPAY | |
| Renewal fee payment (event date is renewal date of database)FPAY | FPAY | |
| Renewal fee payment (event date is renewal date of database)FPAY | FPAY | |
| Renewal fee payment (event date is renewal date of database)FPAY | FPAY | |
| Renewal fee payment (event date is renewal date of database)FPAY | FPAY | |
| Certificate of patent or registration of utility modelJAPANESE INTERMEDIATE CODE: R150R150 | R150 | |
| Certificate of patent or registration of utility modelJAPANESE INTERMEDIATE CODE: R150R150 | R150 | |
| First payment of annual fees (during grant procedure)JAPANESE INTERMEDIATE CODE: A61A61 | A61 | |
| Written decision to grant a patent or to grant a registration (utility model)JAPANESE INTERMEDIATE CODE: A01A01 | A01 | |
| Report on retrievalJAPANESE INTERMEDIATE CODE: A971007A977 | A977 | |
| Decision of grant or rejection writtenTRDD | TRDD | |
| Written amendmentJAPANESE INTERMEDIATE CODE: A523A521 | A521 | |
| Written request for application examinationJAPANESE INTERMEDIATE CODE: A621A621 | A621 |
Numbers
- Publication
- 4100552
- Publication, DOCDB
- 4100552
- Publication, EPODOC
- JP4100552B
- Application
- 339082
- Application, DOCDB
- 2002339082
- Application, EPODOC
- JP20020339082
Titles2
- English
- Decryption method
- Japanese
- 復号化方法
Classification
- CPC, 1
- H04N19/69
- IPC, 12
- H03M7 42
- H03M7 46
- H04N19 13
- H04N19 136
- H04N19 154
- H04N19 189
- H04N19 196
- H04N19 60
- H04N19 625
- H04N19 63
- H04N19 93
- H04N7 30