IMAGE DECODING EQUIPMENT, IMAGE DECODING METHODS, AND PROGRAMS
Patent Information
- Authority / Receiving Office
- ID · ID
- Patent Type
- Patents
- Current Assignee / Owner
- CANON KK
- Filing Date
- 2020-02-28
- Publication Date
- 2026-07-13
AI Technical Summary
The existing HEVC quantization matrix in Versatile Video Coding (VVC) cannot effectively control quantization based on frequency components, leading to suboptimal subjective image quality when zeroing out orthogonal transformation coefficients.
Implementing a quantization matrix that varies by block size, allowing separate quantization processing for different frequency components, and using inverse quantization and inverse transformation units to reconstruct image data, thereby improving subjective image quality.
The solution enhances subjective image quality by controlling quantization of each frequency component, reducing computation, and optimizing encoding efficiency.
Smart Images

Figure 0_ABST
Abstract
Description
Description IMAGE DECODING EQUIPMENT, IMAGE DECODING METHODS, AND PROGRAM Invention Engineering Field This invention relates to image encoding techniques. Background of the Invention The High Efficiency Video Coding (HEVC) encoding method is known as a coding method for compressing moving images. HEVC uses basic blocks that have a larger size than conventional macro blocks (16 × 16 pixel arrays) to improve coding efficiency. These large basic blocks are called Coding Tree Units (CTUs), and their size is up to 64 × 64 pixel arrays. CTUs are further divided into sub-blocks that are units for performing prediction and transformation. In HEVC, a quantization matrix is used to assign weights to orthogonally transformed coefficients (hereinafter referred to as orthogonal transformation coefficients) based on frequency components. The use of a quantization matrix can improve compression efficiency while maintaining image quality, by reducing data in high-frequency components where degradation is less visible to human vision than data in low-frequency components. Japanese Patent Application Publication No. 2013-38758 discusses techniques for encoding information representing such quantization matrices. International standardization for a more efficient coding method as a successor to HEVC has recently begun. Specifically, the Joint Video Experts Team (JVET) established by the International Organization for Standardization and the International Electrotechnical Commission (ISO / IEC) and the ITU-T Telecommunications Standardization Sector (ITU-T) has been pushing for standardization on the Versatile Video Coding (VVC) coding method (hereinafter, VVC). For this standardization, a new technique (hereinafter, referred to as zeroing out) that reduces the number of codes for increased coding efficiency by forcing the orthogonal transform coefficients on high-frequency components to 0 if the block size in the orthogonal transform implementation is low is being investigated. Like HEVC, the introduction of quantization matrices into VVC has also been investigated. However, the quantization matrices in HEVC are predicted to be based on the method of quantization using quantization matrices of the same size as conventional orthogonal transformations, and cannot support zeroing out, a new technique of setting some transformation coefficients to zero. Thus, there is a problem that the zeroed out orthogonal transformation coefficients cannot control quantization based on frequency components, and the subjective image quality cannot be improved. List of Comparative Documents Patent Literature PTL 1: Japanese Patent Publication No. 2013-38758 Brief Description of the Invention For example, the following configuration is provided to improve subjective image quality even when the technique of forcing some orthogonal transformation coefficients to 0 is used, by enabling quantization processing using a quantization matrix appropriate to the technique. In other words, the image decoding apparatus can decode an image from a bit stream in units of a plurality of blocks including a first block of P χ Q (P and Q are integers) pixel arrays and a second block of N χ M (N is an integer satisfying N < P, and M is an integer satisfying M < Q) pixel arrays including a decoding unit configured to decode data corresponding to a first array of quantized coefficients and data corresponding to a second array of quantized coefficients of the bit stream, the first array of quantized coefficients including N χ M arrays of quantized coefficients corresponding to the first block,a second array of quantized coefficients comprising an N χ M array of quantized coefficients corresponding to the second block, an inverse quantization unit configured to obtain a first array of orthogonal transformation coefficients from the first array of quantized coefficients using at least a first quantization matrix of the N χ M array of elements, and obtain a second array of orthogonal transformation coefficients from the second array of quantized coefficients using at least a second quantization matrix of the N χ M array of elements, and an inverse orthogonal transformation unit configured to generate a pixel array PQ from the first predicted residues corresponding to the first block by performing an inverse orthogonal transformation on the first array of orthogonal transformation coefficients,and generates an N χ M pixel array of the second predicted residues corresponding to the second block by performing an inverse orthogonal transformation on the second array of orthogonal transformation coefficients, wherein the first quantization matrix of the N χ M array elements is different from the quantization matrix of the N χ M array elements., Further, the following configuration is provided, for example. An image encoding apparatus may encode an image in units of a plurality of blocks comprising a first block of pixel arrays P χ Q (P and Q being integers) and a second block of pixel arrays N χ M (N being an integer satisfying N < P, and M being an integer satisfying M < Q) comprising an orthogonal transformation unit configured to generate at least a first array of orthogonal transformation coefficients by performing an orthogonal transformation on the pixel arrays P χ Q of the prediction residues corresponding to the first block, and generate a second array of orthogonal transformation coefficients by performing an orthogonal transformation on the pixel arrays N χ M of the prediction residues corresponding to the second block,a quantization unit configured to generate a first array of quantized coefficients comprising an N χ M array of quantized coefficients by quantizing the first array of orthogonal transformation coefficients using at least a first quantization matrix of N χ M array elements, and generate a second array of quantized coefficients comprising an N χ M array of quantized coefficients by quantizing the second array of orthogonal transformation coefficients using at least a second quantization matrix of N χ M array elements,and an encoding unit configured to encode data corresponding to a first array of quantized coefficients comprising an N χ M array of quantized coefficients corresponding to a first array of quantized coefficients comprising an N χ M array of quantized coefficients corresponding to a first block and data corresponding to a second array of quantized coefficients comprising an N χ M array of quantized coefficients corresponding to a second block, wherein the first quantization matrix of the N χ M array elements is different from the second quantization matrix of the N χ M array elements., Short Description of Image Figure 1 is a block diagram illustrating the configuration of an image encoding apparatus in accordance with a first example embodiment. Figure 2 is a block diagram illustrating the configuration of image decoding equipment in accordance with a second example embodiment. Figure 3 is a flow diagram illustrating the processing of image encoding by an image encoding apparatus in accordance with a first exemplary embodiment. Figure 4 is a flow diagram illustrating the processing of image decoding by an image decoding apparatus in accordance with a second exemplary embodiment. Figure 5 is a block diagram illustrating an example of a computer hardware configuration applicable to an image encoding apparatus and an image decoding apparatus in accordance with the present invention. Figure 6A is a diagram illustrating an example of a bit stream output in a first example embodiment. Figure 6B is a diagram illustrating an example of a bit stream output in a first example embodiment. Figure 7A is a diagram illustrating the subblock divisions used in the first embodiment and the second exemplary embodiment. Figure 7B is a diagram illustrating the subblock divisions used in the first embodiment and the second example embodiment. Figure 7C is a diagram illustrating the subblock divisions used in the first embodiment and the second exemplary embodiment. Figure 7D is a diagram illustrating the subblock divisions used in the first embodiment and the second exemplary embodiment. Figure 7E is a diagram illustrating the subblock division used in the first embodiment and the second example embodiment. example example example example example example example example example example Figure 7F is a diagram illustrating an example of the subblock division used in the first example embodiment and the second example embodiment. Figure 8A is a diagram illustrating examples of quantization matrices used in the first example embodiment and the second example embodiment. Figure 8B is a diagram illustrating examples of quantization matrices used in the first example embodiment and the second example embodiment. Figure 8C is a diagram illustrating examples of quantization matrices used in the first example embodiment and the second example embodiment. Figure 9 is a diagram illustrating the method for scanning the elements of a quantization matrix used in the first exemplary embodiment and the second exemplary embodiment. Figure 10 is a diagram illustrating the differential value matrix of the quantization matrix produced in the first example embodiment and the second example embodiment. Figure 11A is a diagram illustrating an example of an encoding table used in encoding the differential values of a quantization matrix. Figure 11B is a diagram illustrating an example of an encoding table used in encoding the differential values of a quantization matrix. Figure 12A is a diagram illustrating another example of a quantization matrix used in the first example embodiment and the second example embodiment. Figure 12B is a diagram illustrating another example of the quantization matrix used in the first example embodiment and the second example embodiment. Figure 12C is a diagram illustrating another example of the quantization matrix used in the first example embodiment and the second example embodiment. Complete Description of the Invention Description of Embodiment Exemplary embodiments of the present invention will be explained with reference to the accompanying drawings. Note that the configurations described in the following exemplary embodiments are exemplary only, and the present invention is not limited to the configurations described in the following exemplary embodiments. Terms such as basic block, sub-block, quantization matrix, and basic quantization matrix are used in the exemplary embodiments for convenience, and other terms may be used as appropriate without changing their meaning. For example, the basic block and sub-block may be referred to as basic unit and sub-unit, or simply as block and unit. In the following description, rectangle refers, as specifically defined, to a quadrilateral having four interior right angles and two equal diagonals. Square refers, as specifically defined, to a rectangle or quadrilateral having all four angles equal and four equal sides equal. In other words, a square is a type of rectangle. <Perwujudan Contoh Pertama> Exemplary embodiments of the present invention will be described below with reference to the accompanying drawings. Zeroing out will first be explained in more detail. Zeroing out is the process of forcibly setting some orthogonal transformation coefficients in the block to be encoded to 0 as described above. For example, suppose the block to be encoded is a 64 χ 64 pixel array block in the input image (picture). Here, the orthogonal transformation coefficients also have an array size of 64 χ 64. In zeroing out is the process of performing encoding, for example, assuming some 64 χ 64 arrays from being 0 even when the resulting value of the orthogonal transformation is non-zero. For example, low-frequency components corresponding to the pre-defined upper-left range of the two-dimensional orthogonal transformation coefficients, including direct current (DC) components, are excluded from forced zeroing, and orthogonal transformation coefficients corresponding to frequency components higher, in frequency, than the low-frequency components are constantly set to 0. Next, an image encoding apparatus according to this exemplary embodiment will be described below. Figure 1 is a block diagram illustrating an image encoding apparatus according to this exemplary embodiment. In Figure 1, image data is input to a terminal (101). The block division unit (102) divides the input image into a plurality of elementary blocks and outputs the image in elementary block units to the next stage. The quantization matrix storage unit (103) generates and stores a quantization matrix. As used herein, the quantization matrix is intended to assign weights for quantization processing to orthogonal transformation coefficients based on frequency components. For example, the quantization step for orthogonal transformation coefficients in the quantization processing described below is assigned weights by multiplying the scale values (quantization scales) based on the values of the reference parameters (quantization parameters) by the values of each component in the quantization matrix. The method for generating a quantization matrix stored in the quantization matrix storage unit 103 is not particularly limited. For example, a user may input information indicating a quantization matrix. The image encoding apparatus may calculate the quantization matrix from the characteristics of the input image. Predetermined quantization matrices as initial values may be used. In this exemplary embodiment, two types of two-dimensional quantization matrices of the 32 χ 32 array illustrated in Figures 8B and 8C, which are generated by expanding the basic quantization matrix of the 8 χ 8 array in Figure 8A, are generated and stored in addition to the basic quantization matrix. The quantization matrix in Figure 8B is a quadruple-expanded 32 χ 32 array quantization matrix with each element of the 8 χ 8 array quantization matrix in Figure 8A repeated vertically and horizontally four times.On the other hand, the quantization matrix in Figure 8C is the quantization matrix of the 32 χ 32 array expanded vertically and horizontally by repeating each element in the upper left 4 χ 4 part of the basic quantization matrix of Figure 8A eight times. As explained above, the basic quantization matrix is a quantization matrix that is used not only to quantize the pixel sub-blocks of an 8 χ 8 array but also to generate quantization matrices that have a larger size than the basic quantization matrix. While the size of the basic quantization matrix has an array size of 8 χ 8, its size is not limited. Furthermore, different basic quantization matrices can be used depending on the size of the sub-blocks. For example, when three types of sub-blocks, namely, 8 χ 8, 16 χ 16, and 32 χ 32 array sub-blocks are used, the corresponding three types of basic quantization matrices can be used, respectively. The prediction unit (104) determines the sub-block division of the image data within the basic block unit. More specifically, the prediction unit (104) determines whether to divide the basic block into sub-blocks and, if sub-blocks are to be divided, determines how to divide the basic block. If the basic block is not to be divided into sub-blocks, the resulting sub-blocks have the same size as the basic block size. The sub-blocks may be square or rectangular in addition to square (non-square). The prediction unit (104) then generates the predicted image data by performing intra-prediction, namely intra-frame prediction, inter-prediction which is inter-frame prediction, or the like in sub-block units. For example, the prediction unit (104) selects a prediction method to be performed on a sub-block from among intra-prediction and inter-prediction, and performs the selected prediction to generate predicted image data on the sub-block. Note that the prediction method to be used is not limited to that, and a prediction method can be created by combining intra-prediction and inter-prediction. The prediction unit (104) then calculates the prediction residuals from the input image data and the predicted image data and outputs the prediction residuals. For example, the prediction unit (104) calculates the difference between the pixel values of the sub-block and the respective pixel values of the predicted image data generated by the prediction on the sub-block, and calculates the difference as the prediction residual. The prediction unit (104) also outputs information necessary for prediction, such as information indicating the sub-block division status, and a prediction mode indicating the sub-block prediction method, and information such as a moving vector, along with a prediction residue. Such pieces of information necessary for prediction will then be collectively referred to as prediction information. The transformation and quantization unit (105) orthogonally transforms the prediction residuals calculated by the prediction unit (104) in the sub-block unit to obtain orthogonal transformation coefficients indicating the respective frequency components of the prediction residuals. The transformation and quantization unit (105) then performs quantization using the quantization matrix stored in the quantization matrix storage unit (103) and quantization parameters to obtain quantized coefficients that are quantized orthogonal transformation coefficients. The function of performing orthogonal transformation and the function of performing quantization can be configured separately. The inverse quantization and inverse transformation unit (106) reconstructs the orthogonal transformation coefficients by inversely quantizing the quantized coefficient outputs of the transformation and quantization unit (105) using the quantization matrix stored in the quantization matrix storage unit (103) and the quantization parameters. The inverse quantization and inverse transformation unit (106) then performs the inverse orthogonal transformation to reconstruct the prediction residuals. The processing for reconstructing (obtaining) the orthogonal transformation coefficients using the quantization matrix and the quantization parameters will be referred to as inverse quantization. The function of performing inverse quantization and the function of performing inverse quantization can be configured as separate configurations. Information for the image decoding equipment to obtain said quantization parameters is also encoded into the bit stream by the encoding unit (110). Frame memory (108) stores the reconstructed image data. The image reconstruction unit (107) generates predicted image data by referring to the corresponding frame memory (108) based on the prediction information output from the prediction unit (104). The image reconstruction unit (107) generates reconstructed image data from the predicted image data and the input prediction residuals, and outputs the reconstructed image data. The in-loop filter unit (109) performs in-loop filtering processing such as deblocking filtering and adaptive sample balancing on the reconstructed image, and outputs the filter-processed image. The encoding unit (110) encodes the quantized coefficient output of the transformation and quantization unit (105) and the prediction information output of the prediction unit (104) to generate code data, and outputs the code data. The quantization matrix encoding unit (113) encodes the basic quantization matrix output from the quantization matrix storage unit (103) to generate quantization matrix code data for the image decoding device to obtain the basic quantization matrix, and outputs the quantization matrix code data. The integration and encoding unit (111) generates header code data using the quantization matrix code data output from the quantization matrix encoding unit (113). The integration and encoding unit (111) then combines the header code data with the code data output from the encoding unit (110) to generate a bitstream, and outputs the bitstream. The terminal (112) outputs the bit stream generated by the integration and encoding unit (111) to the outside. The image encoding operation by the above image encoding apparatus will now be described. In this exemplary embodiment, the image encoding apparatus is configured to input the moving image data in frame units. In addition, in the description of this exemplary embodiment, a block division unit 102 is described to divide the moving image data into elementary blocks of a 64 χ 64 pixel array. However, this is not limiting. For example, an elementary block may be a block of a 128 χ 128 pixel array. An elementary block may be a block of a 32 χ 32 pixel array. Before encoding an image, the image encoding device generates and encodes a quantization matrix. In the following description, for example, the horizontal direction in the quantization matrix (800) or each block will be considered as the x-axis and the vertical direction as the y-axis, with the right and down directions as positive. The upper leftmost element of the quantization matrix (800) has coordinates (0, 0). In other words, the lower rightmost element of the base quantization matrix of the 8 χ 8 array has coordinates (7, 7). The lower rightmost element of the quantization matrix of the 32 χ 32 array has coordinates (31, 31). The quantization matrix storage unit 103 initially generates a quantization matrix. The quantization matrix is generated based on the size of the subblock, the size of the orthogonal transformation coefficients to be quantized, and the type of prediction method. In this exemplary embodiment, the basic quantization matrix of the 8 χ 8 array illustrated in FIG. 8A that will be used to generate the quantization matrices to be described below is initially generated. Next, this basic quantization matrix is expanded to generate two types of quantization matrices of the 32 χ 32 array illustrated in FIG. 8B and 8C. The quantization matrix of FIG. 8B is the quantization matrix of the 32 χ 32 array expanded fourfold by repeating vertically and horizontally each element of the basic quantization matrix of the 8 χ 8 array of FIG. 8A four times. More specifically, in the example illustrated in Figure 8B, the value of the upper leftmost element of the basic quantization matrix, 1, is assigned to each element in the x-coordinate range from 0 to 3 and the y-coordinate from 0 to 3 in the quantization matrix of the array 32 χ 32. The value of the lower rightmost element of the basic quantization matrix, 15, is assigned to each element in the x-coordinate range from 28 to 31 and the y-coordinate from 28 to 31 in the quantization matrix of the array 32 χ 32. In the example of Figure 8B, the values of the elements in the basic quantization matrix are each assigned to some element in the quantization matrix of the array 32 χ 32. On the other hand, the quantization matrix in Figure 8C is the quantization matrix of the 32 χ 32 array expanded by repeating vertically and horizontally each element in the upper left part of the 4 χ 4 array of the basic quantization matrix of Figure 8A eight times. More specifically, in the example illustrated in Figure 8C, the value of the upper leftmost element of the upper left 4 χ 4 array portion of the basic quantization matrix, 1, is assigned to each element in the x-coordinate range from 0 to 7 and the y-coordinate from 0 to 7 in the 32 χ 32 array quantization matrix. The value of the lower rightmost element of the upper left 4 χ 4 array portion of the basic quantization matrix, 7, is assigned to each element in the x-coordinate range from 24 to 31 and the y-coordinate from 24 to 31 in the 32 χ 32 array quantization matrix. In the example of Figure 8C, only the element values corresponding to the upper left 4 χ 4 array portion (x-coordinate range from 0 to 3 and y-coordinate from 0 to 3) among the element values in the basic quantization matrix are assigned to the elements of the 32 χ 32 array quantization matrix. Note that the quantization matrix to be generated is not limited to it. If there is a size of orthogonal transformation coefficients to be quantized other than the 32 χ 32 array, a quantization matrix corresponding to the size of the orthogonal transformation coefficients to be quantized, such as the 16 χ 16, 8 χ array 8, and 4 * 4 may be generated. The method for determining the elements to form the basic quantization matrix and the quantization matrix is not particularly restricted. For example, pre-defined initial values may be used. Elements can be set individually. The quantization matrix can be generated based on image characteristics. The basic quantization matrix and the resulting quantization matrix are thus stored in the quantization matrix storage unit 103. Figure 8B illustrates an example of a quantization matrix to be used in quantizing the orthogonal transformation coefficients corresponding to a 32 * 32 array subblock described below, and Figure 8C an example of a quantization matrix to be used in quantizing the orthogonal transformation coefficients corresponding to a 64 * 64 array subblock. The bold frames 800 represent the quantization matrices. For ease of description, each quantization matrix 800 shall encompass a 32 * 32 array, i.e., 1024 pixels, and each square in the bold frame shall represent an element that constitutes the quantization matrix. In this example embodiment, the three types of quantization matrices illustrated in Figures 8B and 8C are stored in two-dimensional form. It will be understood, however, that the elements in the quantization matrices are not limited thereto.In addition, multiple quantization matrices can be stored for the same prediction method, depending on the size of the orthogonal transformation coefficients to be quantized or whether the encoding target is a luminance block or a color difference block. Typically, as illustrated in Figures 8B and 8C, the elements in the low-frequency part corresponding to the upper-left part of the quantization matrix are small and the elements in the high-frequency part corresponding to the lower-right part are large because the quantization matrix is intended to implement quantization processing based on human visual characteristics. The quantization matrix encoding unit 113 sequentially reads elements of a basic quantization matrix stored in two-dimensional form from the quantization matrix storage unit 103, scans the elements to compute the difference, and arranges the differences in the one-dimensional matrix. In this exemplary embodiment, with respect to the basic quantization matrix illustrated in FIG. 8A, the scanning method illustrated in FIG. 9 is used to compute the difference of the immediately preceding element in the element-by-element scanning sequence. For example, the basic quantization matrix of the 8 χ 8 array illustrated in FIG. 8A is scanned by the scanning method illustrated in FIG. 9. After the first element 1 at the upper left, the element 2 located immediately below is scanned next and the difference +1 is computed.The first element of the quantization matrix (in this example, 1) is encoded by calculating the difference from a predetermined starting value (e.g., 8). However, this is not a limitation, and the difference from an arbitrary value or the value of the first element itself can be used. In this example embodiment, the difference matrix illustrated in Figure 10 is thus generated from the basic quantization matrix of Figure 8A by using the scanning method of Figure 9. The quantization matrix encoding unit (113) further encodes the difference matrix to generate quantization matrix code data. In this example embodiment, the encoding is performed using the encoding table illustrated in Figure 11A, while the encoding table is not limited thereto. For example, the encoding table illustrated in Figure 11B may be used. The resulting quantization matrix code data is thus output to the integration and encoding unit (111) at a subsequent state. Returning to Figure 1, the integration and encoding unit (111) encodes the header information required to encode the image data, and integrates the coded data on the quantization matrix with the encoded header information. The image data is then encoded. One frame of image data input from the terminal (101) is fed into the block division unit (102). The block division unit (102) divides the input image data into a plurality of elementary blocks, and outputs the image in elementary block units to the prediction unit (104). In this example embodiment, the image is output in elementary block units of a 64 * 64 pixel array. The prediction unit (104) performs prediction processing on the image data in basic block units, input from the block division unit (102). Specifically, the prediction unit (104) determines the subblock division whether to divide the basic block into smaller subblocks, and also determines the prediction modes such as intra prediction and inter prediction within the subblock unit. Figure 7 illustrates an example of the subblock division method. The bold frame (700) represents the basic block. For ease of description, the basic block should include a 64 * 64 pixel array, and each rectangle in the bold frame should represent a subblock. Figure 7B illustrates an example of the quadtree square subblock division. The basic block of the 64 χ 64 pixel array is divided into pixel subblocks of the 32 χ 32 array. Figures 7C to 7F illustrate an example of the rectangular subblock division. In Figure 7C, the basic block is divided into vertical rectangular subblocks of the 32 χ 64 pixel array. In Figure 7D, the basic block is divided into horizontal rectangular subblocks of the 64 χ 32 pixel array. In Figures 7E and 7F, the basic block is divided into rectangular subblocks with a ratio of 1:2:1. In such a way, the encoding processing is performed using not only square subblocks but also non-square rectangular subblocks.In addition, the basic block can be further divided into any number of square blocks, and the subblock division can be performed by referring to the divided square blocks. In other words, the basic block size is not limited to a 64 χ 64 pixel array, and any number of basic block sizes can be used. In this example embodiment, the basic block of the 64 χ 64 pixel array is not divided as in Figure 7A or divided using only quadtree division as in Figure 7B. However, the subblock division method is not limited thereto. Tritree division as in Figures 7E and 7F and bitree division as in Figures 7C and 7D can be used. If subblock division other than that of Figures 7A and 7B is also used, the quantization matrix storage unit 103 generates a quantization matrix corresponding to the subblock to be used. If a new basic quantization matrix or matrices corresponding to the generated quantization matrix are also generated, the quantization matrix encoding unit 113 also encodes the new basic quantization matrix or matrices. The prediction method of the prediction unit 104 used in this exemplary embodiment will be explained in more detail. In this exemplary embodiment, two types of prediction methods, namely, intra-prediction and inter-prediction, are used, for example. Intra-prediction generates predicted pixels of the block to be encoded by using encoded pixels spatially located around the block to be encoded, and also generates intra-prediction mode information indicating the intra-prediction method used among intra-prediction methods such as horizontal prediction, vertical prediction, and DC prediction. Inter-prediction generates predicted pixels of the block to be encoded by using encoded pixels in a frame or frames temporally different from the block to be encoded, and also generates motion information indicating the frame to be referenced, motion vector, and the like.As described above, the prediction unit (104) may use a prediction method that combines intra-prediction and inter-prediction. Predicted image data is generated based on the specified prediction mode and encoded pixels. Prediction residuals are then generated from the input image data and the predicted image data, and output to the transformation and quantization unit (105). Information about subblock division, prediction mode, and the like is output to the encoding unit (110) and the image reconstruction unit (107) as prediction information. The transformation and quantization unit (105) performs orthogonal transformation and quantization on the input prediction residues to generate quantized coefficients. The transformation and quantization unit (105) initially applies orthogonal transformation processing appropriate to the subblock size to generate orthogonal transformation coefficients. The transformation and quantization unit (105) then generates quantized coefficients by quantizing the orthogonal transformation coefficients using a quantization matrix stored in the quantization matrix storage unit (103) based on the prediction mode. More specific orthogonal transformation and quantization processing is described below. If the 32 χ 32 array subblock division illustrated in Figure 7B is selected, the transformation and quantization unit (105) applies an orthogonal transformation using the orthogonal transformation matrix from the 32 χ 32 array to the 32 χ 32 array of predicted residues to produce a 32 χ 32 array of orthogonal transformation coefficients. Specifically, the transformation and quantization unit (105) performs multiplication of the orthogonal transformation matrix of the 32 χ 32 array characterized by the discrete cosine transform (DCT) and the 32 χ 32 array of predicted residues to compute the intermediate coefficients in the form of the 32 χ 32 array matrix. The transformation and quantization unit (105) further performs multiplication of the intermediate coefficients in the form of the 32 χ 32 array matrix and the transpose of the previous orthogonal transformation matrix of the 32 χ 32 array to produce the 32 χ 32 array of orthogonal transformation coefficients.The transformation and quantization unit (105) generates a 32 χ 32 array of quantized coefficients by quantizing the resulting 32 x 32 array of orthogonal transformation coefficients using the quantization matrix of the 32 x 32 array illustrated in Figure 8B and the quantization parameters. The processing is repeated four times because the basic block of the 64 χ 64 array includes four subblocks of the 32 χ 32 array. In addition, if the division status of the 64 χ 64 array (no division) illustrated in Figure 7A is selected, the orthogonal transformation matrix of the 64 χ 32 array generated by decomposing the odd-numbered rows (hereinafter referred to as odd rows) in the orthogonal transformation matrix of the 64 χ 64 array is used for the 64 χ array of predicted residuals. In other words, the 32 χ 32 array of orthogonal transformation coefficients is generated by applying the orthogonal transformation using the orthogonal transformation matrix of the 64 χ 32 array generated by subtracting the odd rows. Specifically, the transformation and quantization unit (105) decomposes the odd rows in the orthogonal transformation matrix of the 64 χ 64 array to produce an orthogonal transformation matrix of the 64 χ 32 array. The transformation and quantization unit (105) then multiplies the orthogonal transformation matrix of the 64 χ 32 array and the 64 χ 64 array of predicted residuals to produce intermediate coefficients in the form of a 64 χ 32 array matrix. The transformation and quantization unit (105) multiplies the intermediate coefficients in the form of a 64 χ 32 array matrix and the transpose of the 32 χ 64 array obtained by transposing the previous orthogonal transformation matrix of the 64 χ 32 array to produce an array of 32 χ 32 orthogonal transformation coefficients.The transformation and quantization unit (105) then performs zeroing out by using the resulting 32 χ 32 array of orthogonal transformation coefficients as the coefficient in the upper left part (in the x coordinate range from 0 to 31 and the y coordinate from 0 to 31) of the 64 χ 64 array of orthogonal transformation coefficients and setting the other coefficients to 0. In this example embodiment, the 64 χ 64 array of predicted residuals is thus orthogonally transformed using the orthogonal transformation matrix of the 64 χ 32 array and the transpose of the 32 χ 64 array obtained by transposing the orthogonal transformation matrix of the 64 χ 32 array. Zeroing out is performed by generating the 32 χ 32 array of orthogonal transformation coefficients such that the 32 χ 32 array of orthogonal transformation coefficients can thus be generated with a smaller amount of computation than by the technique of force-setting some of the 64 χ 64 array of orthogonal transformation coefficients generated by the 64 χ 64 array of orthogonal transformations to 0 if their values are not 0.In other words, the number of orthogonal transformation computations can be reduced compared to the case of performing the orthogonal transformation using the orthogonal transformation matrix of the 64 χ 64 array and encoding the result by assuming the orthogonal transformation coefficients targeted for zeroing out to be 0 regardless of whether the orthogonal transformation coefficients are 0. Note that while the method for computing the 32 χ 32 array of orthogonal transformations co-efficiently from the 64 χ 64 array of predicted residuals using the orthogonal transformation can reduce the number of computations, the method for zeroing out is not limited to it and various methods can be used. When performing zeroing out, information indicating that the orthogonal transformation coefficients within the zeroing out target range are 0 can be encoded, or information (such as a flag) indicating the execution of zeroing out can be easily encoded. By decoding such information, the image decoding equipment can decode the block with the zeroing target as 0. Next, the transformation and quantization unit (105) generates a 32 χ 32 array of quantized coefficients by quantizing the resulting 32 χ 32 array of orthogonal transformation coefficients, using the 32 χ 32 array of quantization matrices illustrated in Figure 8C and the quantization parameters. In this example embodiment, the quantization matrix of Figure 8B is used for the 32 χ 32 array of orthogonal transformation coefficients corresponding to the 32 χ 32 array subblock, and the quantization matrix of Figure 8C is used for the 32 χ 32 array of orthogonal transformation coefficients corresponding to the 64 χ 64 array subblock. In other words, Figure 8B is used for the 32 χ 32 array of orthogonal transformation coefficients for which zeroing out has not been performed, and the quantization matrix of Figure 8C is used for the 32 χ 32 array of orthogonal transformation coefficients corresponding to the 64 χ 64 array subblock for which zeroing out has been performed. Note that the quantization matrices to be used are not limited to them. The resulting quantized coefficients are output to the encoding unit 110 and the inverse quantization and inverse transformation units 106. The inverse quantization and inverse transformation unit (106) reconstructs the orthogonal transformation coefficients by inverse quantizing the input quantized coefficients using a quantization matrix stored in the quantization matrix storage unit (103) and quantization parameters. The inverse quantization and inverse transformation unit (106) then performs an inverse orthogonal transformation on the reconstructed orthogonal transformation coefficients to reconstruct the prediction residuals. Like the transformation and quantization unit (105), the inverse quantization and inverse transformation unit (106) uses a quantization matrix corresponding to the size of the subblock to be encoded for inverse quantization processing. More detailed inverse quantization and inverse orthogonal transformation processing by the inverse quantization and inverse transformation unit (106) is described below. If the 32 χ 32 array subblock of Figure 7B is selected, the inverse quantization and inverse transformation unit (106) reconstructs the 32 χ 32 array of orthogonal transformation coefficients by inverse quantizing the 32 χ 32 array of quantized coefficients produced by the transformation and quantization unit (105), using the quantization matrix of Figure 8B. The inverse quantization and inverse transformation unit (106) then performs a multiplication of the previous transpose of the 32 χ 32 array and the 32 χ 32 array of orthogonal transformation coefficients to compute the intermediate coefficients in the form of a 32 χ 32 array matrix. The inverse quantization and inverse transformation unit (106) then performs a multiplication of the intermediate coefficients in the form of a 32 χ 32 array matrix and the previous orthogonal transformation matrix of the 32 χ 32 array to reconstruct the 32 χ 32 array of predicted residuals. The inverse quantization and inverse transformation unit (106) performs similar processing on each subblock of the 32 χ 32 array.On the other hand, if no division is selected as in Figure 7A, the inverse quantization and inverse transformation unit (106) reconstructs the 32 χ 32 array of orthogonal transformation coefficients by inverse quantizing the 32 χ 32 array of quantized coefficients produced by the transformation and quantization unit (105), using the quantization matrix of Figure 8C. The inverse quantization and inverse transformation unit (106) then performs the multiplication of the previous transpose of the 32 χ 64 array and the 32 χ 32 array of orthogonal transformation coefficients to compute the intermediate coefficients in the form of the 32 χ 64 array matrix. The inverse quantization and inverse transformation unit (106) performs the multiplication of the intermediate coefficients in the form of the 32 χ 64 array matrix and the previous orthogonal transformation matrix of the 64 χ 32 array to reconstruct the 64 χ 64 array of predicted residues.In this example embodiment, the inverse quantization processing is performed using the same quantization matrix as that used in the transformation and quantization unit 105 based on the subblock size. The reconstructed predicted residuals are output to the image reconstruction unit 107. The image reconstruction unit (107) reconstructs the predicted image by referring to the data necessary to reconstruct the resulting predicted image, which is stored in the frame memory (108), as appropriate based on the prediction information input from the prediction unit (104). The image reconstruction unit (107) then reconstructs the image data from the reconstructed predicted image and the reconstructed prediction residue input from the inverse quantization and inverse transformation unit (106), and inputs and stores the image data into the frame memory (108). The in-loop filter unit (109) reads the reconstructed image from the frame memory (108) and performs in-loop filtering processing such as deblocking filtering. The in-loop filter unit (109) inputs and stores the filter-processed image into the frame memory (108) again. The coding unit (110) entropically encodes the quantized coefficients generated by the transformation and quantization unit (105) and the prediction information input from the prediction unit (104) block by block to generate code data. The method for entropy coding is not specifically specified, and Golomb coding, arithmetic coding, Huffman coding, and the like can be used. The resulting code data is output to the integration and coding unit (111). The integration and coding unit (111) generates a bit stream by multiplexing the previous header code data, the code data input from the coding unit (110), and the like. The bit stream is finally output to the outside of the terminal (112). Figure 6A illustrates an example of a bitstream output in a first example embodiment. A sequence header includes coded data on a basic quantization matrix, which includes the encoding results of each element. Note that the locations where coded data on basic quantization matrices and the like are encoded are not limited thereto, and it will be understood that the bitstream may be configured so that such data is encoded in a portion of the image header or other portion of the header. If the quantization matrices are switched within the sequence, new basic quantization matrices may be encoded for the update. In such cases, all quantization matrices may be rewritten, or some quantization matrices may be changed by specifying a subblock size of the quantization matrices corresponding to the quantization matrices to be rewritten. Figure 3 is a flow diagram illustrating the processing of encoding by an image encoding apparatus according to a first exemplary embodiment. In step (S301), the quantization matrix storage unit (103) initially generates a two-dimensional quantization matrix and stores the two-dimensional quantization matrix prior to image encoding. In this exemplary embodiment, the quantization matrix storage unit (103) generates the basic quantization matrix illustrated in Figure 8A and the quantization matrices illustrated in Figures 8B and 8C generated from the basic quantization matrix, and stores the basic quantization matrix and the quantization matrix. In step (S302), the quantization matrix encoding unit (113) scans the basic quantization matrix used in generating the quantization matrix in step (S301) to calculate the differences between adjacent elements in the scan sequence, and generates a one-dimensional difference matrix. In this exemplary embodiment, with respect to the basic quantization matrix illustrated in figure 8A, the scanning method in figure 9 is used to generate the difference matrix illustrated in figure 10. The quantization matrix encoding unit (113) further encodes the resulting difference matrix to generate quantization matrix code data. In step (S303), the integration and encoding unit (111) encodes the header information necessary to encode the image data together with the resulting quantization matrix code data, and outputs the result. In step (S304), the block division unit (102) divides the input image frame-by-frame into elementary blocks of 64 χ 64 pixel arrays. In step (S305), the prediction unit (104) generates prediction information, such as subblock division information and prediction mode, and predicted image data by performing prediction processing on the image data in the basic block units generated in step (S304), using the preceding prediction method. In this exemplary embodiment, two types of block sizes, namely, the pixel subblock of the 32 χ 32 array illustrated in figure 7B and the pixel subblock of the 64 χ 64 array illustrated in figure 7A are used. The prediction unit (104) then calculates the prediction residue of the input image data and the predicted image data. In step (S306), the transformation and quantization unit (105) orthogonally transforms the predicted residuals computed in step (S305) to generate orthogonal transformation coefficients. The transformation and quantization unit (105) further generates quantized coefficients by performing quantization using the quantization matrix generated and stored in step (S301) and the quantization parameters. Specifically, the transformation and quantization unit (105) performs multiplication for the predicted residuals of the 32 χ 32 array pixel subblocks illustrated in Figure 7B using the orthogonal transformation matrix of the 32 χ 32 array and its transpose to generate an array of 32 χ 32 orthogonal transformation coefficients.On the other hand, the transformation and quantization unit (105) performs multiplication for the predicted residuals of the pixel subblock of the 64 χ 64 array illustrated in figure 7A by using the orthogonal transformation matrix of the 64 χ 32 array and its transpose to produce an array of 32 χ 32 orthogonal transformation coefficients. In this exemplary embodiment, the transformation and quantization unit (105) quantizes the array of 32 χ 32 orthogonal transformation coefficients by using the quantization matrix of figure 8B for the orthogonal transformation coefficients of the 32 χ 32 array subblock illustrated in figure 7B, and by using the quantization matrix of figure 8C for the orthogonal transformation coefficients of the 64 χ 64 array subblock illustrated in figure 7A. In step (S307), the inverse quantization and inverse transformation unit (106) reconstructs the orthogonal transformation coefficients by inverse quantizing the quantized coefficients generated in step (S306) using the quantization matrix generated and stored in step (S301) and the quantization parameters. The inverse quantization and inverse transformation unit (106) then performs the inverse orthogonal transformation on the orthogonal transformation coefficients to reconstruct the predicted residuals. In this step, the inverse quantization processing is performed using the same quantization matrix as used in step (S306). Specifically, for the 32 χ 32 array of quantized coefficients corresponding to the pixel subblock of the 32 χ 32 array of Figure 7B, the inverse quantization and inverse transformation unit (106) performs the inverse quantization processing using the quantization matrix of Figure 8B to reconstruct the 32 χ 32 array of orthogonal transformation coefficients.The inverse quantization and inverse transformation unit (106) then performs multiplication for the 32 χ 32 array of orthogonal transformation coefficients using the 32 χ 32 array orthogonal transformation matrix and its transpose to reconstruct the 32 χ 32 array pixels from the prediction residues. On the other hand, with the 32 χ 32 array of quantized coefficients corresponding to the 64 χ 64 pixel array subblock of Figure 7A, the inverse quantization and inverse transformation unit (106) performs inverse quantization processing using the quantization matrix of Figure 8C to reconstruct the 32 χ 32 array of orthogonal transformation coefficients. The inverse quantization and inverse transform unit (106) then performs multiplication for the 32 χ 32 array of orthogonal transform coefficients using the 64 χ 32 array orthogonal transform matrix and its transpose to reconstruct the 64 χ 64 pixel array of predicted residuals. In step (S308), the image reconstruction unit (107) reconstructs the predicted image based on the prediction information generated in step (S305). The image reconstruction unit (107) then reconstructs the image data from the reconstructed predicted image and the prediction residual generated in step (S307). In step (S309), the encoding unit (110) encodes the prediction information generated in step (S305) and the quantized coefficients generated in step (S306) to generate code data. The encoding unit (110) generates a bit stream by incorporating other code data as well. In step (S310), the image encoding tool determines whether all elementary blocks in the frame have been encoded. If all elementary blocks have been encoded, processing continues to step (S311). Otherwise, processing returns to step (S304) with the next block as the target. In step (S311), the in-loop filter unit (109) performs in-loop filter processing on the image data reconstructed in step (S308) to produce a filter-processed image. Processing ends. With the above configuration and operation, the quantization of each frequency component can be controlled to improve the subjective image quality while reducing the amount of computation. Specifically, the quantization of each frequency component can be controlled to improve the subjective image quality while reducing the amount of computation by reducing the number of orthogonal transformation coefficients and performing quantization processing using the quantization matrix corresponding to the orthogonal transformation coefficients reduced in step (S306). In addition, if the number of orthogonal transformation coefficients is reduced to quantize and encode only the low-frequency portion, the optimal quantization control for the low-frequency portion can be implemented by using the quantization matrix obtained by expanding only the low-frequency portion of the basic quantization matrix as Figure 8C.In the example of Figure 8C, the low frequency part here refers to the x-coordinate range from 0 to 3 and the y-coordinate from 0 to 3. In this example embodiment, to reduce the number of codes, the quantization matrix encoding unit 113 is configured to encode only the basic quantization matrix of Figure 8A that is typically used in generating the quantization matrices of Figures 8B and 8C. However, the quantization matrix encoding unit 113 may be configured to encode the quantization matrices of Figures 8B and 8C alone. This allows for finer control of the quantization on each frequency component because different values can be set for each frequency component of the quantization matrix. Alternatively, different basic quantization matrices may be set for the quantization matrices of Figures 8B and 8C, and the quantization matrix encoding unit 113 may be configured to encode each of the basic quantization matrices.In such cases, different quantization controls can be performed on the 32 χ 32 array of orthogonal transformation coefficients and the 64 χ 64 array of orthogonal transformation coefficients respectively to implement a clearer subjective image quality control. Moreover, in such cases, the quantization matrix corresponding to the 64 χ 64 array of orthogonal transformation coefficients can be obtained by expanding the entire basic quantization matrix of the 8 χ 8 array fourfold instead of expanding the upper-left 4 χ 4 array portion of the basic quantization matrix of the 8 χ 8 array eightfold. This allows for better quantization control on the 64 χ 64 array of orthogonal transformation coefficients as well. In addition, while this example embodiment is configured so that the quantization matrix for the subblock of the 64 χ 64 array to be zeroed is uniquely determined, an identifier may be introduced to enable selection. For example, Figure 6B illustrates a bit stream in which a new quantization matrix encoding method information code is introduced to make the quantization matrix encoding of the subblock of the 64 * 64 array selectively zeroed. For example, if the quantization matrix encoding method information code indicates 0, Figure 8C which is an independent quantization matrix is used for the orthogonal transformation coefficients corresponding to the subblock of the 64 * 64 pixel array to be zeroed. If the encoding method information code indicates 1, Figure 8B which is a quantization matrix for a regular unzeroed subblock is used for the subblock of the 64 * 64 pixel array to be zeroed.If the encoding method information code indicates 2, all the quantization matrix elements to be used for the 64 * 64 pixel array subblocks to be zeroed are encoded instead of the basic quantization matrix elements of the 8 * 8 array. This can implement a reduction in the number of quantization matrix codes and special quantization control on the subblocks to be selectively zeroed. In this example embodiment, the subblock processed by zeroing out is only one of the 64 * 64 array. However, the subblocks to be processed by zeroing out are not limited to it. For example, among the orthogonal transformation coefficients corresponding to the 32 * 64 or 64 * 32 array subblocks illustrated in Figure 7C or 7D, the 32 * 32 array of orthogonal transformation coefficients in the bottom half or the right half may be forcibly set to 0. In such cases, only the 32 * 32 array of orthogonal transformation coefficients in the top half or the left half is quantized and encoded. The quantization processing on the 32 * 32 array of orthogonal transformation coefficients in the top half or the left half is performed using a quantization matrix different from that in Figure 8B. In addition, the values of the quantization matrices corresponding to the DC coefficients at the top left of the resulting orthogonal transformation coefficients, considered to have the greatest impact on image quality, can be set and encoded separately from the values of the basic matrix elements of the 8 χ 8 array. Figures 12B and 12C illustrate an example where the values of the top leftmost elements corresponding to the DC components are changed from within Figures 8B and 8C. In such cases, the quantization matrices illustrated in Figures 12B and 12C can be set by encoding information indicating a “2” at the position of the DC portion in addition to the information about the basic quantization matrix in Figure 8A. This allows for better quantization control on the DC components of the orthogonal transformation coefficients that have the greatest impact on image quality. <Perwujudan Contoh Kedua> Figure 2 is a block diagram illustrating the configuration of an image decoding apparatus according to a second exemplary embodiment of the present invention. This exemplary embodiment will be explained using the image decoding apparatus to decode encoded data generated in the first exemplary embodiment as an example. The encoded bit stream is fed into terminal 201. The separation and decoding unit (202) separates the bit stream into information about the decoding process and code data associated with the coefficients, and decodes the code data included in the header portion of the bit stream. In this example embodiment, the separation and decoding unit (202) separates the quantization matrix code and outputs the quantization matrix code to the next stage. The separation and decoding unit (202) performs the reverse operation of the integration and encoding unit (111) of FIG. 1. The quantization matrix decoding unit (209) performs processing for decoding the quantization matrix of the bit stream to reconstruct the basic quantization matrix, and further generates the quantization matrix from the basic quantization matrix. The decoding unit (203) decodes the coded data output from the separation and decoding unit (202) to reconstruct (obtain) the quantized coefficients and prediction information. The inverse quantization and inverse transformation unit 204, like the inverse quantization and inverse transformation unit 106 of FIG. 1, obtains orthogonal transformation coefficients by inverse quantizing the quantized coefficients using the reconstructed quantization matrix and quantization parameters, and then performs the inverse orthogonal transformation to reconstruct the prediction residue. The information for obtaining the quantization parameters is also decoded from the bit stream by the decoding unit 203. The function of performing inverse quantization and the function of performing inverse quantization can be configured as separate configurations. Frame memory (206) stores image data in the reconstructed image. The image reconstruction unit (205) generates predicted image data by referring to the corresponding frame memory (206) based on the input prediction information. The image reconstruction unit (205) then generates reconstructed image data from the predicted image data and the prediction residuals reconstructed by the inverse quantization and inverse transformation units (204), and outputs the reconstructed image data. The in-loop filter unit (207), such as (109) of Figure 1, performs in-loop filter processing such as deblocking filtering on the reconstructed image, and outputs a filter-processed image. Terminal (208) outputs the reconstructed image data to the outside. The image decoding operation of the preceding image decoding apparatus will be described below. In this example embodiment, the image decoding apparatus is configured to input the bit stream generated in the first example embodiment frame by frame (picture by picture). In Figure 2, one frame of the bit stream input from the terminal (201) is fed into the separation and decoding unit (202). The separation and decoding unit (202) separates the bit stream into information about the decoding process and code data associated with the coefficients, and decodes the data code included in the header portion of the bit stream. More specifically, the separation and decoding unit (202) reconstructs the quantization matrix code data. In this example embodiment, the separation and decoding unit (202) initially extracts the quantization matrix code data from the header of the bit stream sequence illustrated in Figure 6A, and outputs the quantization matrix code data to the quantization matrix decoding unit (209). In this example embodiment, the quantization matrix code data corresponding to the basic quantization matrix illustrated in Figure 8A is extracted and output.The separation and decoding unit (202) then reconstructs the coded data on the image data in the basic block unit, and outputs the coded data to the decoding unit (203). The quantization matrix decoding unit 209 initially decodes the input quantization matrix code data to reconstruct the one-dimensional difference matrix illustrated in FIG. 10. In this example embodiment, like the first example embodiment, the quantization matrix code data is decoded using the coding table illustrated in FIG. 11A. However, the coding table is not limited to it, and other coding tables may be used as long as the same coding table is used in the first example embodiment. The quantization matrix decoding unit 209 then reconstructs the two-dimensional quantization matrix from the reconstructed one-dimensional difference matrix. Here, the quantization matrix decoding unit 209 performs the inverse operation of the quantization matrix coding unit 113 according to the first example embodiment.More specifically, in this exemplary embodiment, with respect to the difference matrix illustrated in FIG. 10, the basic quantization matrix illustrated in FIG. 8A is reconstructed and stored using the scanning method illustrated in FIG. 9. Specifically, the quantization matrix decoding unit 209 sequentially adds the difference values in the difference matrix to the previous initial values to reconstruct the elements of the quantization matrix. The quantization matrix decoding unit 209 then reconstructs the two-dimensional quantization matrix by sequentially associating the reconstructed one-dimensional elements with the respective elements of the two-dimensional quantization matrix based on the scanning method illustrated in FIG. 9. The quantization matrix decoding unit 209 further expands the reconstructed basic quantization matrix as in the first exemplary embodiment to produce two types of quantization matrices of the 32 χ 32 array illustrated in figures 8B and 8C. The quantization matrix of figure 8B is the quantization matrix of the 32 χ 32 array expanded fourfold by repeating vertically and horizontally each matrix element of the basic quantization of the 8 χ 8 array of figure 8A four times. On the other hand, the quantization matrix in Figure 8C is the quantization matrix of the 32 χ 32 array expanded by repeating vertically and horizontally each element of the upper-left 4 χ 4 array part of the basic quantization matrix of Figure 8A eight times. Note that the quantization matrix to be generated is not limited to it. If there is a size of the quantized coefficients to be inverse quantized in the next stage other than 32 χ 32, the array quantization matrix corresponding to the size of the quantized coefficients to be inverse quantized, such as the 16 χ 16, 8 χ 8, and 4 χ 4 arrays, can be generated. The resulting quantization matrix is stored and used in the inverse quantization processing in the next stage. The decoding unit (203) decodes the coded data from the bit stream and reconstructs the quantized coefficients and prediction information. The decoding unit (203) determines the size of the subblock to be decoded based on the decoded prediction information, and further outputs the reconstructed quantized coefficients to the inverse quantization and inverse transform unit (204) and the reconstructed prediction information to the image reconstruction unit (205). In this exemplary embodiment, a 32 χ 32 array of quantized coefficients is reconstructed for each subblock to be decoded regardless of the size of the subblock, i.e., whether its size is a 64 χ 64 array as in FIG. 7A or a 32 χ 32 array as in FIG. 7B. The inverse quantization and inverse transformation unit (204) generates orthogonal transformation coefficients by inversely quantizing the input quantized coefficients using the quantization matrix reconstructed by the quantization matrix decoding unit (209) and the quantization parameters, and then applies the inverse orthogonal transformation to reconstruct the prediction residues. More detailed processing of the inverse quantization and inverse orthogonal transformation is described below. If the 32 χ 32 array subblock of Figure 7B is selected, the 32 χ 32 array of quantized coefficients reconstructed by the decoding unit (203) is inversely quantized using the quantization matrix of Figure 8B to reconstruct the 32 χ 32 array of orthogonal transformation coefficients. The previous transpose of the 32 χ 32 array and the 32 χ 32 array of orthogonal transformation coefficients are then multiplied to calculate the intermediate coefficients in the form of a 32 χ 32 array matrix. The intermediate coefficients in the form of a 32 χ 32 array matrix and the previous orthogonal transformation matrix of the 32 χ 32 array are multiplied to reconstruct the 32 χ 32 array of predicted residues. Similar processing is performed on each subblock of the 32 χ 32 array. In addition, if no splitting is selected as in Figure 7A, the 32 χ 32 array of quantized coefficients reconstructed by the decoding unit (203) is inversely quantized using the quantization matrix of Figure 8C to reconstruct the 32 χ 32 array of orthogonal transformation coefficients. The transpose of the previous 32 χ 64 array and the 32 χ 32 array of orthogonal transformation coefficients are multiplied to calculate the intermediate coefficients in the form of a 32 χ 64 array matrix. The intermediate coefficients in the form of a 32 χ 64 array matrix and the previous orthogonal transformation matrix of the 64 χ 32 array are multiplied to reconstruct the 64 χ 64 array of predicted residuals. The reconstructed prediction residuals are output to the image reconstruction unit 205. In this example embodiment, the quantization matrix to be used in the inverse quantization processing is determined based on the size of the subblock to be decoded which is determined by the prediction information reconstructed by the decoding unit 203. More specifically, for each 32 χ 32 array subblock in FIG. 7B, the quantization matrix in FIG. 8B is used in the inverse quantization processing. The quantization matrix in FIG. 8C is used for the 64 χ 64 array subblock of FIG. 7A. Note that the quantization matrix to be used is not restricted as long as the same quantization matrix is used by the transform and quantization unit 105 and the inverse quantization and inverse transform unit 106 in the first example embodiment. The image reconstruction unit (205) obtains the data necessary to reconstruct the predicted image by referring to the corresponding frame memory (206) based on the prediction information input from the decoding unit (203), and reconstructs the predicted image. In this exemplary embodiment, the image reconstruction unit (205) uses two types of prediction methods, namely, intra-prediction and inter-prediction like the prediction unit (104) of the first exemplary embodiment. As described above, a prediction method combining intra-prediction and inter-prediction can be used. Like the first exemplary embodiment, the prediction processing is performed in a subblock unit. Since the specific prediction processing is similar to the prediction unit (104) according to the first example embodiment, its description will be omitted. The image reconstruction unit (205) reconstructs image data from the predicted image generated by the prediction processing and the prediction residue input from the inverse quantization and inverse transformation unit (204). Specifically, the image reconstruction unit (205) reconstructs image data by adding the predicted image and the prediction residue. The reconstructed image data is stored into the frame memory (206) accordingly. The stored image data is said to be suitable in predicting other subblocks. Like the in-loop filter unit (109) of Figure 1, the in-loop filter unit (207) reads the reconstructed image from the frame memory (206) and performs in-loop filter processing such as deblocking filtering. The filter-processed image is fed into the frame memory (206) again. The reconstructed image stored in the frame memory (206) is finally output to the outside of the terminal (208). For example, the reconstructed image is output to an external display device and the like. Figure 4 is a flowchart illustrating the processing of image decoding by an image decoding apparatus according to a second exemplary embodiment. In step (S401), the separation and decoding unit (202) initially separates the bit stream into information about the decoding process and code data associated with the coefficients, and decodes the code data in the header section. More specifically, the separation and decoding unit (202) reconstructs the quantization matrix code data. In step (S402), the quantization matrix decoding unit (209) initially decodes the reconstructed quantization matrix code data in step (S401) to reconstruct the one-dimensional difference matrix illustrated in FIG. 10. Next, the quantization matrix decoding unit (209) reconstructs the two-dimensional basic quantization matrix from the reconstructed one-dimensional difference matrix. The quantization matrix decoding unit (209) further expands the reconstructed two-dimensional basic quantization matrix to produce the quantization matrix. More specifically, in this exemplary embodiment, the quantization matrix decoding unit 209 reconstructs the basic quantization matrix illustrated in FIG. 8A from the difference matrix illustrated in FIG. 10 using the scanning method illustrated in FIG. 9. The quantization matrix decoding unit 209 further expands the reconstructed basic quantization matrix to produce the quantization matrices illustrated in FIG. 8B and 8C, and stores said quantization matrices. In step (S403), the decoding unit (203) decodes the data separated in step (S401) to reconstruct the quantized coefficients and prediction information. The decoding unit (203) then determines the size of the subblock to be decoded based on the decoded prediction information. In this example embodiment, a 32 χ 32 array of quantized coefficients is reconstructed for each subblock to be decoded regardless of the size of the subblock, i.e., whether the size is a 64 χ 64 array as in FIG. 7A or a 32 χ 32 array as in FIG. 7B. In step (S404), the inverse quantization and inverse transformation unit (204) obtains the orthogonal transformation coefficients by inverse quantizing the quantized coefficients using the quantization matrix reconstructed in step (S402), and further performs the inverse orthogonal transformation to reconstruct the prediction residues. In this exemplary embodiment, the quantization matrix to be used in the inverse quantization processing is determined based on the size of the subblock to be decoded determined by the prediction information reconstructed in step (S403). More specifically, for each of the 32 χ 32 array subblocks in FIG. 7B, the quantization matrix of FIG. 8B is used in the inverse quantization processing. The quantization matrix of FIG. 8C is used for the 64 χ 64 array subblocks of FIG. 7A.Note that the quantization matrix to be used is not restricted as long as the same quantization matrix is used in steps (S306) and (S307) of the first example embodiment. In step (S405), the image reconstruction unit (205) reconstructs the predicted image from the prediction information generated in step (S403). In this exemplary embodiment, like step (S305) of the first exemplary embodiment, two types of prediction methods are used, namely intra-prediction and inter-prediction. The image reconstruction unit (205) then reconstructs the image data from the reconstructed predicted image and the prediction residual generated in step (S404). In step (S406), the image decoding tool determines whether all basic blocks in the frame have been decoded. If all basic blocks have been decoded, processing continues to step (S407). Otherwise, processing returns to step (S403) with the next basic block as the target. In step (S407), the in-loop filter (207) performs in-loop filter processing on the image data reconstructed in step (S405) to produce a filter-processed image. Processing ends. With the foregoing configuration and operation, the bit stream generated in the first example embodiment, wherein the quantization of each frequency component is controlled to improve subjective image quality using a quantization matrix even in a subblock in which only the low-frequency orthogonal transform coefficients are quantized and encoded, can be decoded. In addition, a bit stream with optimal quantization control applied to its low-frequency portion can be decoded using a quantization matrix obtained by expanding only the low-frequency portion of the basic quantization matrix, as in Figure 8C, to a subblock in which only the low-frequency orthogonal transform coefficients are quantized and encoded. In this example embodiment, to reduce the amount of code, only the basic quantization matrix of Figure 8A is commonly used to generate the quantization matrices of Figures 8B and 8C to be decoded. However, the quantization matrices of Figures 8B and 8C themselves can be decoded. This allows decoding of the bit stream with better quantization control on each frequency component because different values can be set for the respective frequency components of the quantization matrix. Different basic quantization matrices can be set for Figures 8B and 8C, respectively, and their respective basic quantization matrices can be encoded. In such cases, different quantization controls can be performed on the 32 χ 32 array of orthogonal transformation coefficients and the 64 χ 64 array of orthogonal transformation coefficients to decode the bit stream with clearer subjective image quality control. Moreover, in such cases, the quantization matrix corresponding to the 64 χ 64 array of orthogonal transformation coefficients can be obtained by expanding the entire basic quantization matrix of the 8 χ 8 array fourfold instead of expanding the upper-left 4 χ 4 portion of the basic quantization matrix of the 8 χ 8 array eightfold. This allows for better quantization control on the 64 χ 64 array of orthogonal transformation coefficients as well. Additionally, while this example embodiment is configured so that the quantization matrix for the 64 χ 64 array subblock to be zeroed is uniquely determined, an identifier may be introduced to enable selection. For example, Figure 6B illustrates a bit stream in which a new quantization matrix encoding method information code is introduced to make the quantization matrix encoding of the 64 χ 64 array subblock to be zeroed selective. For example, if the quantization matrix encoding method information code indicates 0, Figure 8C which is an independent quantization matrix is used for the quantized coefficients corresponding to the 64 χ 64 array subblock to be zeroed. If the encoding method information code indicates 1, Figure 8B which is a quantization matrix for a regular unzeroed subblock is used for the 64 χ 64 array subblock to be zeroed.If the encoding method information code indicates 2, all quantization matrix elements to be used for the 64 χ 64 array subblocks to be zeroed are encoded instead of the basic quantization matrix elements of the 8 χ 8 array. This allows bit stream decoding in which the reduction in the number of quantization matrix codes and independent quantization control on the subblocks to be zeroed are implemented selectively. In this example embodiment, the subblock processed by zeroing out is only one of the 64 χ 64 arrays. However, the subblocks processed by zeroing out are not limited to them. For example, among the orthogonal transformation coefficients corresponding to the 32 χ 64 or 64 χ 32 array subblocks illustrated in Figure 7C or 7D, only the quantized coefficients in the upper half or the left half can be decoded without decoding the 32 χ 32 array of orthogonal transformation coefficients in the lower half or the right half. In such cases, only the 32 χ 32 array of orthogonal transformation coefficients in the upper half or the left half is decoded and reverse quantized. The quantization processing on the 32 χ 32 array of orthogonal transformation coefficients in the upper half or the left half is performed using a quantization matrix different from that in Figure 8B. In addition, the quantization matrix values corresponding to the DC coefficients at the upper left of the resulting orthogonal transform coefficients, considered to have the greatest impact on image quality, are decoded and assigned separately from the values of the basic matrix elements of the 8x8 array. Figures 12B and 12C illustrate an example where the value of the upper leftmost element corresponding to the DC component is changed from within Figures 8B and 8C. In such cases, the quantization matrices illustrated in Figures 12B and 12C can be assigned by decoding the information indicating a “2” at the position of the DC portion in addition to the information about the basic quantization matrix in Figure 8A. This allows decoding of the bit stream with better quantization control on the DC components of the orthogonal transform coefficients that have the greatest impact on image quality. <Perwujudan Contoh Ketiga> In the example embodiments above, the processing units illustrated in Figures 1 and 2 have been described as being constructed by hardware. However, the processes performed by each of the processing units illustrated in these diagrams may be constructed by a computer program. Figure 5 is a block diagram illustrating an example hardware configuration of a computer applicable to an image encoding apparatus and an image decoding apparatus in accordance with the above example embodiments. The central processing unit (CPU) (501) controls the entire computer using computer programs and data stored in random access memory (RAM) (502) and read-only memory (ROM) (503), and executes the processes described above to be performed by the apparatus in accordance with exemplary embodiments. In other words, the CPU (501) functions as the processing unit illustrated in Figures 1 and 2. RAM (502) includes an area for temporarily storing computer programs and data loaded from an external storage device (506), data obtained from the outside via an interface (I / F) (507), and the like. RAM (502) also includes a working area for the CPU (501) to use in executing various processes. In other words, RAM (502) can be allocated as frame memory, for example, and provide various other suitable areas. ROM (503) stores the computer's setup data, boot program, and the like. The operating unit (504) includes a keyboard and mouse. The computer user can input various instructions into the CPU (501) by operating the operating unit (504). The output unit (505) outputs the results of processing by the CPU (501). The output unit (505) includes a liquid crystal display, for example. The external storage device (506) is a large-capacity information storage device characterized by a hard disk drive device. The external storage device (506) stores the operating system (OS) and computer programs to cause the CPU (501) to implement the unit functions illustrated in Figures 1 and 2. The external storage device (506) may further store pieces of image data for processing. Computer programs and data stored in external storage devices (506) are loaded into RAM (502) 20 as appropriate based on control by the CPU (501), and processed by the CPU (501). Networks, such as local area networks (LANs) and Internet networks, and other devices, such as projection devices and display devices, can be connected to the I / F (507). The computer can acquire and transmit 25 various types of information through the I / F (507). A bus (508) connects the preceding units. The activation of the previous configuration, or the activation described in the previous flowchart, is controlled primarily by the CPU (501). (Other Example Embodiments) An exemplary embodiment may also be implemented by providing a storage medium on which computer program code for implementing the above functions is recorded to the system, and the system reads and executes the computer program code. In such a case, the computer program code itself read from the storage medium implements the functions of the above exemplary embodiment, and the storage medium storing the computer program code constitutes the present invention. Cases in which an operating system (OS) and the like running on a computer performs some or all of the actual processing based on the instructions in the program code and the functions previously implemented by the processing are also included. An exemplary embodiment may also be implemented in the following manner. That is, computer program code read from a storage medium is written into memory included in a function extension card inserted into a computer or a function extension unit connected to a computer. The CPU or the like included in the function extension card or function extension unit then performs some or all of the actual processing based on the instructions in the computer program code, thereby performing the above functions. Such cases are also included. If the present invention is applied to the prior art storage media, the storage media stores computer program code in accordance with the flowchart described above. According to the above example embodiment, the subjective image quality can be improved even though the use of the technique of forcing some orthogonal transformation coefficients to 0, by allowing quantization processing using a quantization matrix appropriate to the technique. The present invention is not limited to the above embodiments and various changes and modifications may be made within the spirit and scope of the present invention. Therefore, to inform the public about the scope of the present invention, the following claims are made. This application claims priority to Japanese Patent Application No. 2019-044275, filed March 11, 2019, which is hereby incorporated by reference herein in its entirety.
Claims
1. An image decoding apparatus capable of decoding an image from a bit stream using a plurality of blocks including a first block of pixel array P χ Q (P and Q are integers) and a second block of pixel array N χ M (N is an integer satisfying N < P, and M is an integer satisfying M < Q), the image decoding apparatus comprising: a decoding unit configured to decode data corresponding to a first array of quantized transformation coefficients and data corresponding to a second array of quantized transformation coefficients of the bit stream, the first array of quantized transformation coefficients corresponding to the first block, the second array of quantized transformation coefficients corresponding to the second block;an inverse quantization unit configured to obtain a first array of transformation coefficients from a first array of quantized transformation coefficients using a first quantization matrix of the N χ M element array, and obtain a second array of transformation coefficients from a second array of quantized transformation coefficients using a second quantization matrix of the N χ M element array, wherein the first array of transformation coefficients represents a frequency component, and wherein the second array of transformation coefficients represents a frequency component;and an inverse transformation unit configured to obtain a first array of prediction residues corresponding to the first block by performing inverse transformation processing on the first array of transformation coefficients, and obtain a second array of prediction residues corresponding to the second block by performing inverse transformation processing on the second array of transformation coefficients, wherein the first quantization matrix of the N χ M element array is a quantization matrix that includes a portion of the elements of the third quantization matrix of the R χ S array (R is an integer satisfying R < N, and S is an integer satisfying S < M) of elements, and excludes other elements of the third quantization matrix, wherein the second quantization matrix of the N χ M element array is a quantization matrix that includes all elements of the fourth quantization matrix of the R χ S element array, and wherein the third quantization matrix is different from the fourth quantization matrix.; 2. The image decoding apparatus according to claim 1, wherein the first and second blocks are square blocks.
3. The image decoding apparatus according to claim 2, wherein P and Q are 64, and N and M are 32.
4. The image decoding apparatus according to claim 2, wherein P and Q are 128, and N and M are 32.
5. The image decoding apparatus according to claim 1, wherein the first quantization matrix is a quantization matrix in which elements other than elements corresponding to DC components include part of elements of the third quantization matrix, and wherein the second quantization matrix is a quantization matrix in which elements other than elements corresponding to DC components include all elements of the fourth quantization matrix.
6. The image decoding apparatus according to claim 1, wherein the first array of transformation coefficients includes N χ M arrays of transformation coefficients, and wherein the second array of transformation coefficients includes N χ M arrays of transformation coefficients.
7. The image decoding apparatus according to claim 1, wherein the first and second blocks are non-square blocks.
8. The image decoding apparatus according to claim 1, wherein the first array of predicted residues is a P χ Q array of predicted residues, and wherein the second array of predicted residues is a N χ M array of predicted residues.
9. The image decoding apparatus according to claim 1, wherein the first array of transformation coefficients is an N χ M array of transformation coefficients, wherein the first array of prediction residues is a P χ Q array of prediction residues, and wherein the inverse transformation unit obtains the first array of prediction residues from the first array of transformation coefficients by performing inverse transformation processing on the first array of transformation coefficients.
10. The image decoding apparatus according to claim 9, wherein the inverse transformation processing includes multiplying a first array of transformation coefficients and a matrix of M χ Q arrays to thereby obtain an array of N χ Q intermediate values, and includes multiplying a matrix of P χ N arrays and N χ Q arrays of intermediate values to thereby obtain a first array of predicted residuals from the first array of transformation coefficients.
11. An image decoding method capable of decoding an image from a bit stream using a plurality of blocks including a first block of pixel array P χ Q (P and Q are integers) and a second block of pixel array N χ M (N is an integer satisfying N < P, and M is an integer satisfying M < Q), the image decoding method comprising: decoding data corresponding to a first array of quantized transformation coefficients and data corresponding to a second array of quantized transformation coefficients from a bit stream, the first array of quantized transformation coefficients corresponding to the first block, the second array of quantized transformation coefficients corresponding to the second block;inverse quantization to obtain a first array of transformation coefficients from a first array of quantized transformation coefficients using a first quantization matrix of an array of N χ M elements, and obtain a second array of transformation coefficients from a second array of quantized transformation coefficients using a second quantization matrix of an array of N χ M elements, wherein the first array of transformation coefficients represents a frequency component, and wherein the second array of transformation coefficients represents a frequency component;and an inverse transformation to obtain a first array of prediction residues corresponding to the first block by performing inverse transformation processing on the first array of transformation coefficients, and obtain a second array of prediction residues corresponding to the second block by performing inverse transformation processing on the second array of transformation coefficients, wherein the first quantization matrix of the N χ M element array is a quantization matrix that includes a portion of the elements of the third quantization matrix of the R χ S array (R is an integer satisfying R < N, and S is an integer satisfying S < M) of elements, and does not include other elements of the third quantization matrix, wherein the second quantization matrix of the N χ M element array is a quantization matrix that includes all elements of the fourth quantization matrix of the R χ S element array, and wherein the third quantization matrix is different from the fourth quantization matrix.; 12. The image decoding method according to claim 11, wherein the first and second blocks are square blocks.
13. The image decoding method according to claim 12, wherein P and Q are 64, and N and M are 32.
14. The image decoding method according to claim 12, wherein P and Q are 128, and N and M are 32.
15. The image decoding method according to claim 11, wherein the first quantization matrix is a quantization matrix in which elements other than elements corresponding to DC components include a portion of the elements of the third quantization matrix, and wherein the second quantization matrix is a quantization matrix in which elements other than elements corresponding to DC components include all elements of the fourth quantization matrix.
16. The image decoding method according to claim 11, wherein the first array of transformation coefficients includes N χ M arrays of transformation coefficients, and wherein the second array of transformation coefficients includes N χ M arrays of transformation coefficients.
17. The image decoding method according to claim 11, wherein the first and second blocks are non-square blocks.
18. The image decoding method according to claim 11, wherein the first array of predicted residues is a P χ Q array of predicted residues, and wherein the second array of predicted residues is a N χ M array of predicted residues.
19. The image decoding method according to claim 11, wherein the first array of transformation coefficients is an N χ M array of transformation coefficients, wherein the first array of prediction residues is a P χ Q array of prediction residues, and wherein the inverse transformation obtains the first array of prediction residues from the first array of transformation coefficients by performing inverse transformation processing on the first array of transformation coefficients.
20. The image decoding method according to claim 19, wherein the inverse transformation processing includes multiplying a first array of transformation coefficients and a matrix of M χ Q arrays to thereby obtain an array of N χ Q intermediate values, and includes multiplying a matrix of P χ N arrays and N χ Q arrays of intermediate values to thereby obtain a first array of predicted residuals from the first array of transformation coefficients.
21. A program for causing a computer to function as a unit of image decoding equipment according to claim 1.
22. An image encoding apparatus capable of encoding an image using a plurality of blocks including a first block of pixel array P χ Q (P and Q are integers) and a second block of pixel array N χ M (N is an integer satisfying N < P, and M is an integer satisfying M < Q), the image encoding apparatus comprising: a transformation unit configured to obtain a first array of transformation coefficients by performing transformation processing on a first array of prediction residues corresponding to the first block, and obtain a second array of transformation coefficients by performing transformation processing on a second array of prediction residues corresponding to the second block;a quantization unit configured to obtain a first array of quantized transformation coefficients by quantizing the first array of transformation coefficients using a first quantization matrix of the array of N χ M elements, and obtaining a second array of quantized transformation coefficients by quantizing a second array of transformation coefficients using a second quantization matrix of the array of N χ M elements;and an encoding unit configured to encode data corresponding to a first array of quantized transformation coefficients corresponding to the first block and data corresponding to a second array of quantized transformation coefficients corresponding to the second block, wherein the first quantization matrix of the N χ M element array is a quantization matrix that includes a portion of the elements of a third quantization matrix of the R χ S array (R is an integer satisfying R < N, and S is an integer satisfying S < M) of elements, and does not include other elements of the third quantization matrix, wherein the second quantization matrix of the N χ M element array is a quantization matrix that includes all elements of a fourth quantization matrix of the R χ S element array, and wherein the third quantization matrix is different from the fourth quantization matrix.; 23. The image encoding apparatus according to claim 22, wherein the first and second blocks are square blocks.
24. The image encoding apparatus according to claim 23, wherein P and Q are 64, and N and M are 32.
25. The image encoding apparatus according to claim 23, wherein P and Q are 128, and N and M are 32.
26. The image coding apparatus according to claim 22, wherein the first quantization matrix is a quantization matrix in which elements other than elements corresponding to DC components include portions of elements of the third quantization matrix, and wherein the second quantization matrix is a quantization matrix in which elements other than elements corresponding to DC components include all elements of the fourth quantization matrix.
27. The image encoding apparatus according to claim 22, wherein the first array of transformation coefficients includes an N χ M array of l transformation coefficients, and wherein the second array of transformation coefficients includes an N χ M array of transformation coefficients.
28. The image encoding apparatus according to claim 22, wherein the first and second blocks are non-square blocks.
29. The image encoding apparatus according to claim 22, wherein the first array of prediction residues is a P χ Q array of prediction residues, and wherein the second array of prediction residues is a N χ M array of prediction residues.
30. The image coding apparatus according to claim 22, wherein the first array of prediction residues is a P χ Q array of prediction residues, wherein the first array of transformation coefficients is a N χ M array of transformation coefficients, and wherein the transformation unit obtains the first array of transformation coefficients from the first array of prediction residues by performing transformation processing on the first array of prediction residues.
31. The image coding apparatus according to claim 30, wherein the transformation processing includes multiplying a first array of prediction residues and a matrix of the Q χ M array to thereby obtain a P χ M array of intermediate values, and includes multiplying a matrix of the N χ P array and the P χ M array of intermediate values to thereby obtain a first array of transformation coefficients from the first array of prediction residues.
32. An image encoding method that can encode an image using a plurality of blocks including a first block of pixel array P χ Q (P and Q are integers) and a second block of pixel array N χ M (N is an integer satisfying N < P, and M is an integer satisfying M < Q), the image encoding method comprising: a transformation to obtain a first array of transformation coefficients by performing transformation processing on a first array of prediction residues corresponding to the first block, and obtaining a second array of transformation coefficients by performing transformation processing on a second array of prediction residues corresponding to the second block;quantization to obtain a first array of quantized transformation coefficients by quantizing the first array of transformation coefficients using a first quantization matrix of the array of N χ M elements, and obtaining a second array of quantized transformation coefficients by quantizing the second array of transformation coefficients using a second quantization matrix of the array of N χ M elements;and encoding data corresponding to a first array of quantized transformation coefficients corresponding to the first block and data corresponding to a second array of quantized transformation coefficients corresponding to the second block, wherein the first quantization matrix of the N χ M element array is a quantization matrix that includes a portion of the elements of the third quantization matrix of the R χ S array (R is an integer satisfying R < N, and S is an integer satisfying S < M) of elements, and does not include other elements of the third quantization matrix, wherein the second quantization matrix of the N χ M element array is a quantization matrix that includes all elements of the fourth quantization matrix of the R χ S element array, and wherein the third quantization matrix is different from the fourth quantization matrix.; 33. The image encoding method according to claim 32, wherein the first and second blocks are square blocks.
34. The image encoding method according to claim 33, wherein P and Q are 64, and N and M are 32.
35. The image encoding method according to claim 33, wherein P and Q are 128, and N and M are 32.
36. The image encoding method according to claim 32, wherein the first quantization matrix is a quantization matrix in which elements other than elements corresponding to DC components include a portion of the elements of the third quantization matrix, and wherein the second quantization matrix is a quantization matrix in which elements other than elements corresponding to DC components include all elements of the fourth quantization matrix.
37. The image encoding method according to claim 32, wherein the first array of transformation coefficients includes N χ M arrays of transformation coefficients, and wherein the second array of transformation coefficients includes N χ M arrays of transformation coefficients.
38. The image encoding method according to claim 32, wherein the first and second blocks are non-square blocks.
39. The image encoding method according to claim 32, wherein the first array of predicted residues is a P χ Q array of predicted residues, and wherein the second array of predicted residues is an N x M array of predicted residues.
40. The image encoding method according to claim 32, wherein the first array of prediction residues is a P χ Q array of prediction residues, wherein the first array of transformation coefficients is a N χ M array of transformation coefficients, and wherein the transformation obtains the first array of transformation coefficients from the first array of prediction residues by performing transformation processing on the first array of prediction residues.
41. The image encoding method according to claim 40, wherein the transformation processing includes multiplying a first array of prediction residues and a Q χ M array matrix to thereby obtain a P χ M array of intermediate values, and includes multiplying a N χ P array matrix and a P χ M array of intermediate values to obtain a first array of transformation coefficients from the first array of prediction residues.
42. A program for causing a computer to function as a unit of image encoding equipment according to claim 22.