Image encoding device, image decoding device, control method thereof, and program
The image encoding device addresses the incompatibility of HEVC's quantization matrix with VVC's weighted intra prediction by employing dedicated matrices for intra, inter, and weighted intra-inter predictions, enhancing image quality through precise quantization control.
Patent Information
- Application Number
- JP2024134472
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2038-12-17
AI Technical Summary
The quantization matrix in HEVC is not compatible with the new weighted intra prediction method in VVC, leading to ineffective quantization control and poor subjective image quality.
An image encoding device that uses separate quantization matrices for intra and inter predictions, and a combined quantization matrix for weighted intra-inter prediction, allowing for quantization control based on frequency components.
Improves subjective image quality by accurately quantizing errors from weighted intra-inter prediction using tailored quantization matrices.
Smart Images

Figure 2024149754000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to an image encoding technique. [Background technology]
[0002] The High Efficiency Video Coding (HEVC) coding method (hereafter referred to as HEVC) is known as a coding method for compressing and recording moving images. In order to improve coding efficiency, HEVC employs basic blocks larger than conventional macroblocks (16x16 pixels). These large basic blocks are called coding tree units (CTUs) and have a maximum size of 64x64 pixels. CTUs are further divided into subblocks, which are units for prediction and transformation.
[0003] Furthermore, HEVC uses a process called a quantization matrix, which weights coefficients after orthogonal transformation (hereinafter referred to as orthogonal transformation coefficients) according to frequency components. By further reducing data of high frequency components, degradation of which is less noticeable to human vision, it is possible to improve compression efficiency while maintaining image quality. Patent Document 1 discloses a technology for encoding such a quantization matrix.
[0004] In recent years, activities have been started to internationally standardize a more efficient coding method as a successor to HEVC. JVET (Joint Video Experts Team) was established between ISO / IEC and ITU-T, and standardization is underway as the Versatile Video Coding (VVC) coding method (hereinafter referred to as VVC). In order to improve coding efficiency, in addition to conventional intra prediction and inter prediction, a new prediction method using both intra-predicted pixels and inter-predicted pixels (hereinafter referred to as weighted intra-inter prediction) is being considered. [Prior art documents] [Patent documents]
[0005] [Patent Document 1] JP 2013-38758 A Summary of the Invention [Problem to be solved by the invention]
[0006] The introduction of a quantization matrix is being considered for VVC as well as for HEVC. However, the quantization matrix in HEVC is based on conventional prediction methods such as intra prediction and inter prediction, and does not support the new prediction method of weighted intra / inter prediction. For this reason, it is not possible to perform quantization control according to frequency components for errors in weighted intra / inter prediction, which results in a problem of not being able to improve subjective image quality.
[0007] The present invention has been made in consideration of such problems, and aims to provide a technology that enables quantization processing using a quantization matrix compatible with weighted intra / inter prediction, thereby improving subjective image quality. [Means for solving the problem]
[0008] In order to solve this problem, for example, an image coding device of the present invention has the following arrangement. An image encoding device that encodes an image, comprising: a prediction means for generating a predicted image for a current block to be coded and obtaining a prediction error which is a difference between the current block and the predicted image; a transform means for frequency transforming the prediction error obtained by the prediction means to derive transform coefficients; a quantization means for quantizing the transform coefficients obtained by the transform means using a quantization matrix; and a coding means for entropy coding the quantized transform coefficients obtained by the quantization means, the quantization matrix is a first quantization matrix for intra prediction or a second quantization matrix for inter prediction; When the prediction means generates the predicted image for the current block by right-shifting, by a predetermined number, at least an addition result of a multiplication result of an intra-predicted pixel value obtained by intra prediction for the current block and a first value and a multiplication result of an inter-predicted pixel value obtained by inter prediction for the current block and a second value, the quantization means uses the second quantization matrix for inter prediction as the quantization matrix used to quantize the transform coefficients, the first value and the second value are determined from a weighted value; Only one integer value of the plurality of integer values is used as the weight value used in generating the predicted image for the current block. Effect of the Invention
[0009] According to the present invention, the subjective image quality can be improved by quantizing errors resulting from a new prediction method that uses both intra-predicted pixels and inter-predicted pixels using a quantization matrix. [Brief description of the drawings]
[0010] [Figure 1] FIG. 1 is a block diagram showing the configuration of an image encoding device according to a first embodiment. [Diagram 2] 1 is a block diagram of an image decoding device according to a second embodiment. [Diagram 3] 4 is a flowchart showing an image encoding process in the image encoding device according to the first embodiment. [Figure 4] 10 is a flowchart showing an image decoding process in an image decoding device according to a second embodiment. [Diagram 5] FIG. 1 is a block diagram showing an example of the hardware configuration of a computer that can be used as an image encoding device and a decoding device. [Figure 6] FIG. 2 is a diagram showing an example of a bitstream structure generated according to the first embodiment. [Figure 7] FIG. 2 is a diagram showing an example of sub-block division used in the embodiment. [Figure 8] 5A to 5C are diagrams showing examples of quantization matrices used in the embodiment. [Figure 9] FIG. 2 is a diagram showing how elements of a quantization matrix are scanned. [Figure 10] FIG. 4 is a diagram showing a difference value matrix of a quantization matrix. [Figure 11] FIG. 13 is a diagram showing an example of a coding table for a quantization matrix. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. Note that the configurations in the embodiments shown below are merely examples, and the present invention is not limited to the configurations shown in the drawings. For example, the following description uses terms such as "basic block" and "sub-block," but each embodiment can be applied to various processing units called "blocks" and "units" in image coding technology.
[0012] [First embodiment] 1 is a block diagram showing an image encoding device according to a first embodiment. The image encoding device has a control unit 150 that controls the components described below and is responsible for controlling the entire device. This control unit 150 includes a CPU, a ROM that stores programs executed by the CPU and various parameters, and a RAM used as a work area for the CPU. Note that an OS (operating system), programs, and parameters stored in the ROM or other non-volatile storage device may be loaded into the RAM, and then the program may be executed under the control of the OS.
[0013] The image encoding device also has an input terminal 101, a block division unit 102, a quantization matrix storage unit 103, a prediction unit 104, a transformation and quantization unit 105, an inverse quantization and inverse transformation unit 106, an image reproduction unit 107, a frame memory 108, an in-loop filter unit 109, an encoding unit 110, an integrated encoding unit 111, an output terminal 112, and a quantization matrix encoding unit 113.
[0014] In the above configuration, image data (e.g., 30 frames / second) is supplied from an image generation source (not shown) to an input terminal 101 of this device. Note that the type of image generation source is not important, but it is simply an imaging unit or a video camera, or a hard disk or storage medium that stores image data to be encoded.
[0015] The block division unit 102 divides image data input via an input terminal into a plurality of basic blocks, and supplies the image data in units of basic blocks to a prediction unit 104 at the subsequent stage.
[0016] The quantization matrix holding unit 103 holds a plurality of quantization matrices used in the quantization process. There is no particular limitation on the method of generating the held quantization matrices, but the user may input the quantization matrix, the matrix may be calculated from the characteristics of the input image, or a matrix designated in advance as an initial value may be used. In this embodiment, two-dimensional quantization matrices corresponding to three types of 8×8 pixel orthogonal transforms (frequency transforms) shown in Figs. 8(a) to (c) are generated and held.
[0017] The prediction unit 104 divides image data in units of basic blocks into subblocks, and performs intra-frame prediction or inter-frame prediction on a subblock basis to generate predicted image data. Furthermore, the prediction unit 104 calculates and outputs prediction error data from the image data of the subblocks and the predicted image data. In addition, information required for prediction, such as information on subblock division, prediction mode, motion vector, etc., is also output together with the prediction error. Hereinafter, this information required for prediction is referred to as prediction information.
[0018] The transform / quantization unit 105 performs an orthogonal transform (frequency transform) on the prediction error data supplied from the prediction unit 104 on a sub-block basis to obtain transform coefficients. Then, the transform / quantization unit 105 quantizes the transform coefficients of the sub-block of interest using the quantization matrix stored in the quantization matrix storage unit 103 (hereinafter, the transform coefficients after quantization are simply referred to as "quantized coefficients").
[0019] The inverse quantization / inverse transform unit 106 inverse quantizes the quantization coefficients input from the transform / quantization unit 105 using the corresponding quantization matrix stored in the quantization matrix storage unit 103 to regenerate (derive) the transform coefficients, and further performs an inverse orthogonal transform on the transform coefficients to regenerate the prediction error data.
[0020] The image reproduction unit 107 generates predicted image data by appropriately referring to the frame memory 108 based on the prediction information input from the prediction unit 104. The image reproduction unit 107 then generates reproduced image data from the generated predicted image data and the prediction error data from the inverse quantization and inverse transform unit 106, and outputs the reproduced image data to the frame memory 108 again.
[0021] The in-loop filter unit 109 performs in-loop filter processing such as deblocking filtering and sample adaptive offset on the reconstructed image data from the image reconstruction unit 107 stored in the frame memory 108, and stores the image data after filtering back into the frame memory 109.
[0022] The encoding unit 110 encodes the quantization coefficients input from the transform / quantization unit 105 and the prediction information input from the prediction unit 104 to generate and output coded data.
[0023] The quantization matrix encoding unit 113 encodes the quantization matrix input from the quantization matrix storage unit 103 to generate and output code data of the quantization matrix.
[0024] The integrated coding unit 111 generates header coded data by using the coded data of the quantization matrix output from the quantization matrix coding unit 113. Furthermore, the integrated coding unit 111 forms a bit stream by combining the generated header coded data with the coded data of the image input from the coding unit 110, and outputs the bit stream to the outside via the output terminal 112.
[0025] There is no particular limit to the output destination, and it may be a storage device such as a recording medium, a file server on a network, or the like.
[0026] The image encoding operation in the image encoding device according to the embodiment will be described in more detail below.
[0027] First, the quantization matrix storage unit 103 generates a quantization matrix. The quantization matrix is generated according to the size of the sub-block to be coded and the type of prediction method. In this embodiment, a quantization matrix of 8×8 pixel size corresponding to the basic block of 8×8 pixels shown in FIG. 7(a) is generated. However, the generated quantization matrix is not limited to this, and a quantization matrix corresponding to the shape of the sub-block, such as 4×8 pixels, 8×4 pixels, or 4×4 pixels, may be generated. There is no particular limit to the method of determining each element constituting the quantization matrix. For example, a predetermined initial value may be used, or each element may be set individually. The quantization matrix may also be generated according to the characteristics of the image.
[0028] The quantization matrix storage unit 103 stores the quantization matrix thus generated. In Fig. 8(a) to (c), reference numeral 800 indicates a quantization matrix generated and stored by the quantization matrix storage unit 103 in the embodiment. The quantization matrix 800 in Fig. 8(a) indicates a quantization matrix used for intra prediction. Fig. 8(b) indicates a quantization matrix used for inter prediction, and Fig. 8(c) indicates a quantization matrix corresponding to weighted intra / inter prediction. As shown in the figure, the quantization matrix is composed of 8 x 8 elements (quantization step values). In this embodiment, the three types of quantization matrices shown in Fig. 8(a) to (c) are stored in a two-dimensional shape, but the elements in the quantization matrix are not limited to this. In addition, it is also possible to store multiple quantization matrices for the same prediction method depending on the size of the subblock or whether the encoding target is a luminance block or a chrominance block. Generally, a quantization matrix realizes quantization processing according to the characteristics of human vision, so that the elements for DC components corresponding to the upper left corner of the quantization matrix are small and the elements for AC components corresponding to the lower right corner are large, as shown in Figures 8(a) to (c).
[0029] The quantization matrix encoding unit 113 sequentially reads out the quantization matrices stored in a two-dimensional form from the quantization matrix storage unit 106, scans each element to calculate the difference, and arranges the matrices in a one-dimensional matrix. In this embodiment, the scanning method shown in FIG. 9 is used for each quantization matrix shown in FIG. 8(a) to (c), and the difference between each element and the previous element in the scanning order is calculated. For example, the quantization matrix of 8×8 pixels shown in FIG. 8(c) is scanned by the scanning method shown in FIG. 9, and after the first element "8" located in the upper left corner, the element "11" located immediately below it is scanned, and the difference "+3" is calculated. In addition, the difference between the first element of the quantization matrix ("8" in this embodiment) and a predetermined initial value (for example, "8") is calculated for encoding, but this is of course not limited to this, and the difference between any value or the value of the first element itself may be used.
[0030] In this manner, in this embodiment, the quantization matrices of Fig. 8(a) to (c) are generated using the scanning method of Fig. 9, and one-dimensional difference matrices shown in Fig. 10(a) to (c) are generated. The quantization matrix encoding unit 113 further encodes the difference matrix to generate quantization matrix code data. In this embodiment, the encoding table shown in Fig. 11(a) is used for encoding, but the encoding table is not limited to this, and for example, the encoding table shown in Fig. 11(b) may be used. The quantization matrix code data generated in this manner is output to the integrated encoding unit 111 at the subsequent stage.
[0031] 1, the integrated coding unit 111 codes header information necessary for coding the image data, and integrates the coded data of the quantization matrix. Next, the coding of the image data will be described.
[0032] The block division unit 102 divides one frame of image data input from the input terminal 101 into a plurality of basic blocks, and supplies the image data in units of basic blocks to the prediction unit 104. In this embodiment, as described above, the size of a basic block is 8×8 pixels.
[0033] The prediction unit 104 performs prediction processing on the image data in units of basic blocks input from the block division unit 102. Specifically, the prediction unit 104 determines a sub-block division method for dividing the basic blocks into smaller sub-blocks, and further determines a prediction mode such as intra prediction, inter prediction, or weighted intra / inter prediction for each sub-block.
[0034] 7(a) to (f) show examples of subblock division patterns. The reference numeral 700 showing the outer bold frame in the figure represents a basic block, which has a size of 8×8 pixels in the embodiment. The rectangle in the bold frame represents a subblock. FIG. 7(a) shows an example of a basic block = subblock. FIG. 7(b) shows an example of a conventional square subblock division, in which a basic block of 8×8 pixels is divided into four subblocks of 4×4 pixels. Meanwhile, FIG. 7(c) to (f) show an example of a rectangular subblock division, in which the basic block is divided into a rectangular subblock of 4×8 pixels vertically in FIG. 7(c) and a rectangular subblock of 8×4 pixels horizontally in FIG. 7(d). Also, in FIG. 7(e) and (f), the basic block is divided into rectangular subblocks at a ratio of 1:2:1. In this way, not only square but also rectangular subblocks are used for coding processing.
[0035] In this embodiment, as described above, only basic blocks of 8×8 pixels are used without division (FIG. 7(a)), but the subblock division method is not limited to this. Quadtree division as shown in FIG. 7(b), ternary tree division as shown in FIG. 7(e) or (f), or binary tree division as shown in FIG. 7(c) or FIG. 7(d) may also be used. When subblock division other than that shown in FIG. 7(a) is used, a quantization matrix corresponding to the subblock to be used is generated by the quantization matrix storage unit 103. The generated quantization matrix is coded by the quantization matrix coding unit 113.
[0036] The prediction method used in this embodiment will be described again. In this embodiment, three types of prediction methods are used: intra prediction, inter prediction, and weighted intra / inter prediction. Intra prediction generates predicted pixels for a block to be coded using coded pixels located spatially around the block to be coded, and also generates an intra prediction mode indicating an intra prediction method such as horizontal prediction, vertical prediction, and DC prediction. Inter prediction generates predicted pixels for a block to be coded using coded pixels of a frame that is temporally different from the block to be coded, and also generates motion information indicating a reference frame, a motion vector, and the like.
[0037] Weighted intra-inter prediction is a method of generating a predicted pixel of a block to be coded by weighting the pixel values generated by the intra prediction and the pixel values generated by the inter prediction. For example, the weighted intra-inter prediction is calculated using the following formula (1). p[x][y]={w×p inter [x][y] + (8-w)×p intra [x][y]}>>3…(1) (where ">>" indicates a bit shift to the right) In the above formula (1), p[x][y] is a predicted pixel by weighted intra- or inter-prediction for the coordinates (x, y) in the block of interest to be coded. inter [x][y] indicates a pixel value in an inter-predicted image corresponding to coordinates (x, y) in a target block. intra [x][y] indicates a pixel value in an intra-predicted image for coordinates (x, y) in a target block. w indicates a weighting value for pixel values of inter prediction and intra prediction, and in this embodiment, when w=4, the weighting for pixel values of inter prediction and intra prediction is the same. In other words, if w>4, the weighting for pixel values of inter prediction increases, and if w<4, the weighting for pixel values of intra prediction increases. In this way, in weighted intra-inter prediction, a predicted pixel of a block to be coded is generated, and the intra prediction mode and motion information used to generate the predicted pixel are also generated.
[0038] The prediction unit 104 generates prediction image data of the sub-block to be coded from the determined prediction mode and coded pixels. The prediction unit 104 then calculates the difference between the image data of the sub-block to be coded and the generated predicted image data to generate prediction error data, and supplies the generated prediction error data to the transformation and quantization unit 105. The prediction unit 104 also supplies prediction information such as sub-block division, a prediction mode (information indicating whether it is intra prediction, inter prediction, or weighted intra / inter prediction), and vector data to the coding unit 110 and the image reproduction unit 107.
[0039] The transform / quantization unit 105 performs orthogonal transform / quantization on the input prediction error data to generate quantization coefficients. Specifically, the transform / quantization unit 105 performs orthogonal transform processing corresponding to the size of the prediction error data to generate orthogonal transform coefficients. Next, the transform / quantization unit 105 selects a quantization matrix stored in the quantization matrix storage unit 103 according to the prediction mode, quantizes the orthogonal transform coefficients using the selected quantization matrix, and generates quantization coefficients. In this embodiment, the quantization matrix of FIG. 8(a) is used for the subblocks where prediction processing is performed by intra prediction, the quantization matrix of FIG. 8(b) is used for the subblocks where inter prediction is performed, and the quantization matrix of FIG. 8(c) is used for the subblocks where weighted intra / inter prediction is performed. However, the quantization matrix used is not limited to this. Then, the transform / quantization unit 105 supplies the generated quantization coefficients to the encoding unit 110 and the inverse quantization / inverse transform unit 106.
[0040] The inverse quantization and inverse transform unit 106 inverse quantizes the quantization coefficients of the input sub-block using the quantization matrix stored in the quantization matrix storage unit 103 to reproduce the transform coefficients. The inverse quantization and inverse transform unit 106 further performs inverse orthogonal transform on the reproduced transform coefficients to reproduce prediction error data. As with the transform and quantization unit 105, a quantization matrix corresponding to the prediction mode of the block to be coded is used for the inverse quantization process. Specifically, the same quantization matrix as that used by the transform and quantization unit 105 is used. The inverse quantization and inverse transform unit 106 then supplies the reproduced prediction error data to the image reproduction unit 107.
[0041] The image reproduction unit 107 appropriately refers to the frame memory 108 and reproduces predicted image data based on the prediction information input from the prediction unit 104. The image reproduction unit 107 then adds the reproduced predicted image and the prediction error data input from the inverse quantization and inverse transform unit 106 to reproduce image data of the sub-block, and stores the image data in the frame memory 108.
[0042] The in-loop filter unit 109 reads out the reproduced image data from the frame memory 108, and performs in-loop filtering such as deblocking filtering. Then, the in-loop filter unit 109 stores the filtered image data in the frame memory 108 again.
[0043] The encoding unit 110 entropy-encodes the quantization coefficients generated by the transform / quantization unit 105 and the prediction information input from the prediction unit 104 for each subblock, generating coded data. There is no particular limit to the entropy coding method, and Golomb coding, arithmetic coding, Huffman coding, or the like can be used. The generated coded data is supplied to an integrated encoding unit 111.
[0044] The integrated encoding unit 111 multiplexes the encoded data of the header described above and the encoded data input from the encoding unit 110 to form a bit stream. Finally, the bit stream is output from a terminal 112 to the outside.
[0045] FIG. 6(a) shows an example of the data structure of a bit stream output in the first embodiment. The sequence header includes the coded data of the quantization matrix, and is composed of the coded data of each element. However, the coding position is not limited to this, and it is of course possible to code the quantization matrix in a picture header section or other header section. In addition, when changing the quantization matrix in one sequence, it is also possible to update the quantization matrix by newly coding it. In this case, all the quantization matrices may be rewritten, or it is also possible to change a part of the quantization matrix by specifying the prediction mode of the quantization matrix corresponding to the quantization matrix to be rewritten.
[0046] Hereinafter, a processing procedure for encoding one frame in the image encoding device according to the first embodiment will be described with reference to the flowchart in Fig. 3. Note that each step in the following description is performed under the control of the control unit 150.
[0047] First, prior to encoding an image, in S301, the quantization matrix storage unit 103 generates and stores a two-dimensional quantization matrix. The quantization matrix storage unit 103 in this embodiment generates and stores quantization matrices corresponding to the 8×8 pixel subblocks shown in Fig. 8(a) to (c) and corresponding to each prediction method of intra prediction, inter prediction, and weighted intra / inter prediction.
[0048] In S302, the quantization matrix encoding unit 113 scans the quantization matrix generated and held in S301 to calculate the difference between each element, and generates a one-dimensional difference matrix. The quantization matrix encoding unit 113 of this embodiment uses the scanning method of FIG. 9 for the quantization matrix shown in FIG. 8(a)-(c), and generates the difference matrix shown in FIG. 10(a)-(c). The quantization matrix encoding unit 113 further generates a binary code from the generated difference matrix by referring to the encoding table shown in FIG. 11(a) (or FIG. 11(b)), thereby generating encoded data.
[0049] In S303, the integrated encoding unit 111 generates and outputs header information necessary for encoding image data together with the encoded data of the generated quantization matrix.
[0050] In S304, the block division unit 102 divides the input image in units of frames into units of basic blocks. Then, in S305, the prediction unit 104 divides the image data in units of basic blocks generated in S304 into one or more sub-blocks, executes a prediction process in units of sub-blocks, and generates prediction information such as sub-block division information and a prediction mode, and predicted image data. In this embodiment, three types of prediction methods are used: intra prediction, inter prediction, and weighted intra / inter prediction. Furthermore, the prediction unit 104 calculates prediction error data, which is the difference between the input image data and the predicted image data.
[0051] A specific example of processing by the prediction unit 104 is as follows. The prediction unit 104 performs intra prediction processing on image data of a sub-block of interest to be coded by referring to a coded area of the same frame to which the sub-block of interest belongs, and obtains intra prediction image data P intra [x][y]. The prediction unit 104 also performs inter prediction processing by referring to a previously encoded frame (e.g., the immediately preceding frame) other than the frame to which the sub-block of interest to be encoded belongs, and generates inter predicted image data P inter[x][y] is generated. Then, weighted intra-inter predicted image data P[x][y] is generated based on the formula (1) shown above. Then, the square sum (or absolute value sum) of the difference data between each of these three predicted image data and the pixel values of the sub-block of interest is calculated, and the prediction mode of the predicted image data with the smallest square sum is determined as the prediction mode of the sub-block of interest. In this embodiment, the weight value w is calculated uniquely according to the intra prediction mode, the magnitude of the motion vector, the position of the sub-block of interest, etc., but the calculation method of the weight value w is not limited to this. For example, w=0, 1, ..., 8 is set to calculate nine predicted image data in each case. Then, the square sum (or absolute value sum) of the difference data between each of these nine predicted image data and the pixel values of the sub-block of interest may be calculated, and "w" with the smallest square sum may be determined. In that case, when w=0, the prediction unit 104 determines the sub-block of interest to be intra-predictively coded based on formula (1). Furthermore, when w=8, the prediction unit 104 determines from equation (1) that the sub-block of interest is to be inter-predictively coded. When w is within a range of 1 to 7, the prediction unit 104 determines that the sub-block of interest is to be weighted intra-inter predictively coded. In this case, the determined value of w may also be coded as prediction information in the subsequent step S309.
[0052] In S306, the transform / quantization unit 105 performs orthogonal transform on the prediction error data calculated in S305 to generate transform coefficients. Furthermore, the transform / quantization unit 105 selects one of the quantization matrices generated and stored in S301 based on the prediction information, and performs quantization using the selected quantization matrix to generate quantization coefficients. In this embodiment, the quantization matrix in FIG. 8(a) is used for a sub-block for which intra prediction is used, the quantization matrix in FIG. 8(b) is used for a sub-block for which inter prediction is used, and the quantization matrix in FIG. 8(c) is used for a sub-block for which weighted intra / inter prediction is used.
[0053] In S307, the inverse quantization and inverse transform unit 106 inverse quantizes the quantization coefficients generated in S305 using the quantization matrix generated and stored in S301 to reproduce the transform coefficients. The inverse quantization and inverse transform unit 106 further performs inverse orthogonal transform on the transform coefficients to reproduce the prediction error data. In this step, the same quantization matrix as that used in S306 is used to perform the inverse quantization process.
[0054] In S308, the image reproduction unit 107 reproduces predicted image data based on the prediction information generated in S305. The image reproduction unit 107 further reproduces image data of the sub-block from the reproduced predicted image data and the prediction error data generated in S307.
[0055] In S309, the encoding unit 110 encodes the prediction information generated in S305 and the quantized coefficients generated in S306 to generate coded data, and also generates a bit stream including other coded data.
[0056] In S310, the control unit 150 determines whether or not the encoding of all basic blocks in the frame has been completed. If so, the control unit 150 proceeds to S311; if not, the control unit 150 returns to S305 to perform encoding of the next basic block.
[0057] In S311, the in-loop filter unit 109 performs in-loop filter processing on the image data reproduced in S308 to generate a filtered image, and then ends the processing.
[0058] In the above process, when encoding the second or subsequent frames of a video, steps S304 to S311 are repeated until the last frame to be encoded is input.
[0059] With the above configuration and operation, particularly in S306, quantization processing is performed using a dedicated quantization matrix for sub-blocks using weighted intra / inter prediction, thereby controlling quantization for each frequency component and improving subjective image quality.
[0060] In this embodiment, quantization matrices are defined separately for the three types of prediction methods, i.e., intra prediction, inter prediction, and weighted intra / inter prediction, and all three types of quantization matrices are coded, but some of them may be shared.
[0061] For example, it is possible to quantize sub-blocks using weighted intra / inter prediction using the quantization matrix in Fig. 8(a) in the same way as sub-blocks using intra prediction, and omit coding of the quantization matrix in Fig. 8(c). This makes it possible to reduce the amount of code for the quantization matrix in Fig. 8(c) while reducing image quality degradation caused by errors due to intra prediction, such as block distortion.
[0062] Similarly, for sub-blocks using weighted intra / inter prediction, it is possible to quantize using the quantization matrix in Fig. 8(b) in the same way as for sub-blocks using inter prediction, and omit coding of the quantization matrix in Fig. 8(c). This makes it possible to reduce the amount of code for the quantization matrix in Fig. 8(c) while reducing degradation of image quality caused by errors due to inter prediction, such as jerky motion.
[0063] Alternatively, in the above-mentioned formula (1), a quantization matrix to be used for a sub-block using weighted intra / inter prediction may be adaptively determined according to the value of the weight value w indicating the weight of the intra prediction pixel value and the inter prediction pixel value. For example, if the value of the weight value w that minimizes the difference is equal to or greater than a predetermined value (for example, the central value 4), the quantization matrix of FIG. 8(b) may be used for the sub-block using weighted intra / inter prediction, and if it is smaller, the quantization matrix of FIG. 8(a) may be used for the sub-block using weighted intra / inter prediction. This makes it possible to reduce the amount of code by omitting the coding of the quantization matrix of FIG. 8(c) while reducing the deterioration of image quality for the prediction method with a larger weight. Alternatively, a quantization matrix to be used for a sub-block using weighted intra / inter prediction may be newly generated according to the value of the weight value w. For example, it may be calculated using the following formula (2). QM[x][y]={w×QM inter [x][y] + (8-w) × QM intra [x][y]}>>3…(2) In the above formula (2), QM[x][y] is the element (quantization step value) at the coordinates (x, y) of the quantization matrix used for the subblock calculated using weighted intra / inter prediction. QM inter [x][y] is the element at coordinate (x, y) of the quantization matrix used for the inter-prediction subblock. Similarly, QM intra [x][y] is an element at coordinates (x, y) of the quantization matrix for intra prediction. This allows the amount of code to be reduced by the amount of code omitted from the quantization matrix in Fig. 8(c) while performing appropriate quantization control according to the weighting value w, thereby improving subjective image quality.
[0064] Furthermore, in this embodiment, the quantization matrix for the subblock using weighted intra / inter prediction is uniquely determined, but it may be selectable by introducing an identifier. For example, FIG. 6(b) shows a case where the quantization matrix coding method information code is newly introduced to selectively code the quantization matrix for the subblock using weighted intra / inter prediction. For example, when the quantization matrix coding method information code indicates 0, FIG. 8(a) which is the quantization matrix for the subblock using intra prediction is used for the subblock using weighted intra / inter prediction. When the quantization matrix coding method information code indicates 1, FIG. 8(b) which is the quantization matrix for the subblock using inter prediction is used for the subblock using weighted intra / inter prediction. On the other hand, when the quantization matrix code indicates 2, FIG. 8(c) which is individually coded is used for the subblock using weighted intra / inter prediction. This makes it possible to selectively realize the reduction in the amount of quantization matrix code and unique quantization control for the subblock using weighted intra / inter prediction.
[0065] [Second embodiment] In the second embodiment, an image decoding device that decodes encoded data generated by the image encoding device of the first embodiment will be described. Fig. 2 is a block diagram showing the configuration of the image decoding device.
[0066] The image decoding device includes a control unit 250 that controls the components described below and controls the entire device. The control unit 250 includes a CPU, a ROM that stores programs executed by the CPU and various parameters, and a RAM used as a work area for the CPU. Note that an OS (operating system), programs, and parameters stored in the ROM or other non-volatile storage device may be loaded into the RAM, and then the program may be executed under the control of the OS.
[0067] The image decoding device also has an input terminal 201, a separation decoding unit 202, a decoding unit 203, an inverse quantization and inverse transform unit 204, an image reproduction unit 205, a frame memory 206, an in-loop filter unit 207, an output terminal 208, and a quantization matrix decoding unit 209.
[0068] The configuration and operation of the image decoding device in the above-mentioned configuration will be described below. Note that the image decoding device is configured to input the bit stream generated by the image encoding device described above on a frame-by-frame basis.
[0069] The separate decoding unit 202 receives an encoded bitstream via an input terminal 201, separates the bitstream into encoded data related to information on decoding processing and coefficients, and decodes the encoded data present in the header of the bitstream. The separate decoding unit 202 of this embodiment separates encoded data of a quantization matrix from the encoded bitstream and supplies the encoded data to a quantization matrix decoding unit 209. The separate decoding unit 202 also separates encoded data of image data from the encoded bitstream and supplies the encoded data to a decoding unit 203. In short, the separate decoding unit 202 performs the reverse operation of the integrated encoding unit 111 in FIG. 1.
[0070] The quantization matrix decoding unit 209 decodes the coded data of the quantization matrix sent from the separation decoding unit 202 to reproduce and store the quantization matrix.
[0071] The decoding unit 203 decodes the coded data input from the demultiplexing decoding unit 202, and reproduces the quantized coefficients and the prediction information.
[0072] The inverse quantization and inverse transform unit 204, like the inverse quantization and inverse transform unit 106 in FIG. 1, inverse quantizes the quantized coefficients using the reproduced quantization matrix to obtain transform coefficients, and then performs inverse orthogonal transform to reproduce the prediction error data.
[0073] The image reproduction unit 205 generates predicted image data based on the input prediction information by appropriately referring to the frame memory 206. Then, the image reproduction unit 205 generates image data by adding the prediction error data reproduced by the inverse quantization and inverse transform unit 204 to this predicted image data, and stores the image data in the frame memory 206.
[0074] 1, the in-loop filter unit 207 performs in-loop filter processing such as a deblocking filter on the reconstructed image stored in the frame memory 206, and stores the filtered image data again in the frame memory 206. Then, the output terminal 208 outputs the reconstructed image data to an external device (e.g., a display device).
[0075] Next, the operation of each component in the image decoding device in FIG. 2 will be described in more detail.
[0076] In the second embodiment, the bit stream generated in the first embodiment is input in units of frames.
[0077] A bitstream for one frame input via an input terminal 201 is supplied to a separate decoding unit 202. The separate decoding unit 202 separates the bitstream into coded data related to information on decoding processing and coefficients, and decodes the coded data present in the header of the bitstream. More specifically, the separate decoding unit 202 reproduces coded data of a quantization matrix. The separate decoding unit 202 of this embodiment first extracts coded data of the quantization matrices of FIGS. 8(a) to 8(c) from the sequence header of the bitstream shown in FIG. 6(a), and supplies the coded data to a quantization matrix decoding unit 209. The separate decoding unit 202 then reproduces coded data for each sub-block of a basic block of picture data, and supplies the coded data to a decoding unit 203.
[0078] The quantization matrix decoding unit 209 first decodes the input quantization matrix code data to reproduce the one-dimensional difference matrix shown in Fig. 10(a)-(c). In this embodiment, as in the first embodiment, the decoding is performed using the coding table shown in Fig. 11(a) (or Fig. 11(b)). However, the coding table is not limited to this, and other coding tables may be used as long as they are the same as those in the first embodiment. Furthermore, the quantization matrix decoding unit 209 inversely scans the reproduced one-dimensional difference matrix to reproduce the two-dimensional quantization matrix. Here, the operation is the reverse of the operation of the quantization matrix encoding unit 113 in the first embodiment. That is, the quantization matrix decoding unit 209 in this embodiment reproduces and holds three types of quantization matrices shown in Fig. 8(a)-(c) from the difference matrix shown in Fig. 10(a)-(c) using the scanning method shown in Fig. 9.
[0079] The decoding unit 203 decodes the encoded data to regenerate the quantization coefficients and the prediction information. Then, the decoding unit 203 supplies the regenerated quantization coefficients to the inverse quantization and inverse transform unit 204, and supplies the regenerated prediction information to the image reproduction unit 205.
[0080] The inverse quantization and inverse transform unit 204 selects one of the quantization matrices reproduced by the quantization matrix decoding unit 209. Then, the inverse quantization and inverse transform unit 204 inverse quantizes the input quantization coefficients using the selected quantization matrix to generate orthogonal transform coefficients. The inverse quantization and inverse transform unit 204 further performs inverse orthogonal transform to reproduce prediction error data, and supplies the reproduced prediction information to the image reproduction unit 205. The inverse quantization and inverse transform unit 204 of this embodiment determines the quantization matrix to be used in the inverse quantization process according to the prediction mode of the block to be decoded, which is determined according to the prediction information reproduced by the decoding unit 203. That is, the quantization matrix of FIG. 8(a) is selected for a subblock using intra prediction, the quantization matrix of FIG. 8(b) is selected for a subblock using inter prediction, and the quantization matrix of FIG. 8(c) is selected for a subblock using weighted intra / inter prediction. However, the quantization matrix used is not limited to this, and it is sufficient if it is the same as the quantization matrix used in the transform / quantization unit 105 and the inverse quantization / inverse transform unit 106 in the first embodiment.
[0081] The image reproduction unit 205 appropriately refers to the frame memory 206 based on the prediction information input from the decoding unit 203, and reproduces the predicted image data. In this embodiment, similar to the prediction unit 104 of the first embodiment, three types of prediction methods are used: intra prediction, inter prediction, and weighted intra / inter prediction. The specific prediction process is similar to that of the prediction unit 104 of the first embodiment, and therefore will not be described. The image reproduction unit 205 reproduces image data by adding the prediction error data input from the inverse quantization / inverse transform unit 204 to this predicted image data, and stores the image data in the frame memory 206. The stored image data becomes a prediction reference candidate when decoding other sub-blocks.
[0082] 1, the in-loop filter unit 207 reads out reconstructed image data from the frame memory 206 and performs in-loop filtering such as deblocking filtering. Then, the in-loop filter unit 207 stores the filtered image data in the frame memory 206 again.
[0083] The reproduced image stored in the frame memory 206 is finally outputted from an output terminal 208 to the outside.
[0084] Hereinafter, a processing procedure of one frame decoding processing in the image decoding device according to the second embodiment will be described with reference to the flowchart in Fig. 4. Note that each step in the following description is executed under the control of the control unit 250.
[0085] First, in S401, the demultiplexing / decoding unit 202 demultiplexes the bit stream into information related to the decoding process and coded data related to coefficients, and decodes the coded data of the header portion. More specifically, the demultiplexing / decoding unit 202 reproduces the coded data of the quantization matrix.
[0086] In S402, the quantization matrix decoding unit 209 decodes the coded data of the quantization matrix reproduced in S401, and reproduces the one-dimensional difference matrix shown in Figures 10(a) to (c). Furthermore, the quantization matrix decoding unit 209 inversely scans the reproduced one-dimensional difference matrix, and reproduces and holds the two-dimensional quantization matrix.
[0087] That is, in this embodiment, the quantization matrix decoding unit 209 reproduces and stores the three types of quantization matrices shown in Figures 8(a) to (c) using the scanning method shown in Figure 9, respectively, for the difference matrices shown in Figures 10(a) to (c).
[0088] In S403, the decoding unit 203 decodes the coded data separated in S401, and reproduces the quantized coefficients and the prediction information.
[0089] In S404, the inverse quantization and inverse transform unit 204 performs inverse quantization on the quantized coefficients using the quantization matrix reproduced in S402 to obtain transform coefficients. The inverse quantization and inverse transform unit 204 further performs inverse orthogonal transform to reproduce prediction error data. The inverse quantization and inverse transform unit 204 of this embodiment determines the quantization matrix to be used according to the prediction mode determined by the prediction information reproduced in S403. That is, the quantization matrix of FIG. 8(a) is used for the subblock using intra prediction, the quantization matrix of FIG. 8(b) is used for the subblock using inter prediction, and the quantization matrix of FIG. 8(c) is used for the subblock using weighted intra / inter prediction. However, the quantization matrix to be used is not limited to this, and may be the same as the quantization matrix used in S306 and S307 of the first embodiment.
[0090] In S405, the image reproduction unit 205 reproduces predicted image data from the prediction information generated in S403. As in S305 in the first embodiment, the image reproduction unit 205 in this embodiment uses three types of prediction methods: intra prediction, inter prediction, and weighted intra / inter prediction. Furthermore, the image reproduction unit 205 adds the prediction error data generated in S404 to the reproduced predicted image data to reproduce image data.
[0091] In S406, the control unit 250 determines whether or not the decoding of all basic blocks in the frame has been completed. If the decoding has been completed, the process proceeds to S407. If not, the process returns to S403 to decode the next basic block.
[0092] In S407, the in-loop filter unit 207 performs in-loop filter processing on the image data reproduced in S405, generates a filtered image, and ends the processing.
[0093] With the above configuration and operation, it is possible to decode a bitstream with improved subjective image quality by controlling quantization for each frequency component, even for sub-blocks generated using weighted intra / inter prediction in the first embodiment.
[0094] In this embodiment, quantization matrices are defined separately for the three types of prediction methods, i.e., intra prediction, inter prediction, and weighted intra / inter prediction, and all three types of quantization matrices are decoded, but some of them may be shared.
[0095] For example, it is possible to dequantize sub-blocks using weighted intra / inter prediction using the quantization matrix in Fig. 8(a) in the same way as sub-blocks using intra prediction, and omit decoding of the quantization matrix in Fig. 8(c). This makes it possible to reduce the amount of code corresponding to the quantization matrix in Fig. 8(c) and to decode a bitstream that reduces image quality degradation caused by errors due to intra prediction, such as block distortion.
[0096] Similarly, for sub-blocks using weighted intra / inter prediction, it is also possible to perform inverse quantization using the quantization matrix in Fig. 8(b) in the same way as for sub-blocks using inter prediction, and omit the decoding of the quantization matrix in Fig. 8(c). This makes it possible to reduce the amount of code corresponding to the quantization matrix in Fig. 8(c) and to decode a bitstream in which image quality degradation caused by errors due to inter prediction, such as jerky motion, is reduced.
[0097] Alternatively, in the above-mentioned formula (1), a quantization matrix to be used for a subblock using weighted intra / inter prediction may be adaptively determined according to the value of the weight value w indicating the weight of the intra prediction pixel value and the inter prediction pixel value. For example, if the value of w is equal to or greater than a predetermined value (for example, a central value of 4), the quantization matrix of FIG. 8(b) may be used for the subblock using weighted intra / inter prediction, and if it is smaller, the quantization matrix of FIG. 8(a) may be used for the subblock using weighted intra / inter prediction. This makes it possible to reduce image quality degradation for the prediction method with a larger weight, while decode a bitstream in which the amount of code is reduced by omitting the coding of the quantization matrix of FIG. 8(c). Alternatively, as in the above-mentioned formula (2), a quantization matrix to be used for a subblock using weighted intra / inter prediction may be newly generated according to the value of the weight value w. This makes it possible to decode a bitstream in which the subjective image quality is improved by performing appropriate quantization control according to the weight value w, while reducing the amount of code by omitting the coding of the quantization matrix of FIG. 8(c).
[0098] Furthermore, in this embodiment, the quantization matrix for the subblock using weighted intra / inter prediction is uniquely determined, but it may be selectable by introducing an identifier. For example, FIG. 6(b) shows a case where the quantization matrix coding method information code is newly introduced to selectively code the quantization matrix for the subblock using weighted intra / inter prediction. For example, when the quantization matrix coding method information code indicates 0, FIG. 8(a) which is the quantization matrix for the subblock using intra prediction is used for the subblock using weighted intra / inter prediction. When the quantization matrix coding method information code indicates 1, FIG. 8(b) which is the quantization matrix for the subblock using inter prediction is used for the subblock using weighted intra / inter prediction. On the other hand, when the quantization matrix coding method information code indicates 2, FIG. 8(c) which is individually coded is used for the subblock using weighted intra / inter prediction. This makes it possible to decode a bitstream which selectively realizes the reduction in the amount of quantization matrix code and the unique quantization control for the subblock using weighted intra / inter prediction.
[0099] [Third embodiment] In the above embodiment, each processing unit shown in Fig. 1 and Fig. 2 is configured as hardware. However, the processing performed by each processing unit shown in these figures may be configured as a computer program.
[0100] FIG. 5 is a block diagram showing an example of the hardware configuration of a computer applicable to the image display device according to each of the above embodiments.
[0101] The CPU 501 controls the entire computer using computer programs and data stored in the RAM 502 and ROM 503, and executes the processes described above as being performed by the image processing device according to each of the above embodiments. That is, the CPU 501 functions as each of the processing units shown in FIGS.
[0102] The RAM 502 has an area for temporarily storing computer programs and data loaded from an external storage device 506, data acquired from the outside via an I / F (interface) 507, etc. Furthermore, the RAM 502 has a work area used when the CPU 501 executes various processes. That is, the RAM 502 can be allocated as a frame memory, for example, or can provide various other areas as appropriate.
[0103] The ROM 503 stores setting data for the computer, a boot program, etc. The operation unit 504 is composed of a keyboard, a mouse, etc., and can be operated by a user of the computer to input various instructions to the CPU 501. The display unit 505 displays the results of processing by the CPU 501. The display unit 505 is composed of, for example, a liquid crystal display.
[0104] The external storage device 506 is a large-capacity information storage device, such as a hard disk drive. The external storage device 506 stores an OS (operating system) and computer programs for causing the CPU 501 to realize the functions of each unit shown in Figures 1 and 2. Furthermore, the external storage device 506 may store each image data to be processed.
[0105] Computer programs and data stored in the external storage device 506 are loaded into the RAM 502 as appropriate under the control of the CPU 501, and become the subject of processing by the CPU 501. A network such as a LAN or the Internet, and other devices such as a projector or display device can be connected to the I / F 507, and the computer can obtain and transmit various information via this I / F 507. Reference numeral 508 denotes a bus that connects the above-mentioned components.
[0106] In the above configuration, when the power supply of the present device is turned on, the CPU 501 executes a boot program in the ROM 503, loads the OS stored in the external storage device 506 into the RAM 502, and starts the OS. As a result, the present device becomes capable of communication via the interface 507 and functions as an information processing device. Then, under the control of the OS, the CPU 501 loads an application (corresponding to FIG. 3) relating to image coding from the external storage device 506 into the RAM 502 and executes it, so that the CPU 501 functions as the various processing units shown in FIG. 1, and the present device functions as an image coding device. On the other hand, when the CPU 501 loads an application (corresponding to FIG. 4) relating to image decoding from the external storage device 506 into the RAM 502 and executes it, the CPU 501 functions as the various processing units shown in FIG. 2, and the present device functions as an image decoding device.
[0107] (Other Examples) The present invention can also be realized by a process in which a program for implementing one or more of the functions of the above-described embodiments is supplied to a system or device via a network or a storage medium, and one or more processors in a computer of the system or device read and execute the program. The present invention can also be realized by a circuit (e.g., ASIC) that implements one or more of the functions. [Explanation of symbols]
[0108] 101...input terminal, 102...block division unit, 103...quantization matrix storage unit, 104...prediction unit, 105...transformation and quantization unit, 106...inverse quantization and inverse transformation unit, 107...image reproduction unit, 108...frame memory, 109...in-loop filter unit, 110...encoding unit, 111...integrated encoding unit, 112...output terminal, 113...quantization matrix encoding unit
Claims
1. An image encoding device that encodes an image, comprising: a prediction means for generating a predicted image for a current block to be coded and obtaining a prediction error which is a difference between the current block and the predicted image; a transform means for frequency transforming the prediction error obtained by the prediction means to derive transform coefficients; a quantization means for quantizing the transform coefficients obtained by the transform means using a quantization matrix; and a coding means for entropy coding the quantized transform coefficients obtained by the quantization means, the quantization matrix is a first quantization matrix for intra prediction or a second quantization matrix for inter prediction; When the prediction means generates the predicted image for the current block by right-shifting, by a predetermined number, at least an addition result of a multiplication result of an intra-predicted pixel value obtained by intra prediction for the current block and a first value and a multiplication result of an inter-predicted pixel value obtained by inter prediction for the current block and a second value, the quantization means uses the second quantization matrix for inter prediction as the quantization matrix used to quantize the transform coefficients, the first value and the second value are determined from a weight value; Only one integer value of the plurality of integer values is used as the weight value used to generate the predicted image for the current block.
1. An image encoding device comprising:
2. 2. The image encoding device according to claim 1, wherein a sum of the first value and the second value is two to the power of the predetermined number.
3. An image decoding device for decoding an image, comprising: decoding means for decoding the quantized transform coefficients; inverse quantization means for inverse quantizing the quantized transform coefficients using a quantization matrix to derive transform coefficients; inverse transform means for inverse transforming said transform coefficients to derive a prediction error; a prediction means for generating a predicted image for a current block and decoding the current block using the predicted image and the prediction error; the quantization matrix is a first quantization matrix for intra prediction or a second quantization matrix for inter prediction; When the prediction means generates the predicted image for the current block by right-shifting, by a predetermined number, at least an addition result of a multiplication result of an intra-predicted pixel value obtained by intra prediction for the current block and a first value and a multiplication result of an inter-predicted pixel value obtained by inter prediction for the current block and a second value, the inverse quantization means uses the second quantization matrix for inter prediction as the quantization matrix used to inverse quantize the quantized transform coefficients, the first value and the second value are determined from a weight value; Only one integer value of the plurality of integer values is used as the weight value used to generate the predicted image for the current block.
2. An image decoding device comprising:
4. 4. The image decoding device according to claim 3, wherein a sum of the first value and the second value is two to the power of the predetermined number.
5. 1. An image encoding method for encoding an image, comprising the steps of: a prediction step of generating a predicted image for a current block to be encoded and obtaining a prediction error that is a difference between the current block and the predicted image; a transformation step of frequency transforming the prediction error obtained in the prediction step in order to derive transformation coefficients; a quantization step of quantizing the transform coefficients obtained in the transform step using a quantization matrix; and an encoding step of entropy-encoding the quantized transform coefficients obtained in the quantization step, the quantization matrix is a first quantization matrix for intra prediction or a second quantization matrix for inter prediction; in the prediction step, when the predicted image for the current block is generated by right-shifting, by a predetermined number, at least an addition result of a multiplication result of an intra-predicted pixel value obtained by intra prediction for the current block and a first value and a multiplication result of an inter-predicted pixel value obtained by inter prediction for the current block and a second value, the quantization step uses the second quantization matrix for inter prediction as the quantization matrix used to quantize the transform coefficients, the first value and the second value are determined from a weight value; Only one integer value of the plurality of integer values is used as the weight value used to generate the predicted image for the current block.
13. An image coding method comprising:
6. 6. The image coding method according to claim 5, wherein the sum of the first value and the second value is two to the power of the predetermined number.
7. 1. An image decoding method for decoding an image, comprising the steps of: a decoding step of decoding the quantized transform coefficients; a dequantization step of dequantizing the quantized transform coefficients using a quantization matrix to derive transform coefficients; an inverse transform step of inversely transforming the transform coefficients to derive a prediction error; A prediction step of generating a predicted image for a current block and decoding the current block using the predicted image and the prediction error, the quantization matrix is a first quantization matrix for intra prediction or a second quantization matrix for inter prediction; In the prediction step, when the predicted image for the target block is generated by right-shifting by a predetermined number at least a result of adding a result of multiplying an intra-predicted pixel value obtained by intra prediction for the target block by a first value and a result of multiplying an inter-predicted pixel value obtained by inter prediction for the target block by a second value, the second quantization matrix for inter prediction is used as the quantization matrix used to inverse quantize the quantized transform coefficients in the inverse quantization step, the first value and the second value are determined from a weight value; Only one integer value of the plurality of integer values is used as the weight value used to generate the predicted image for the current block.
2. An image decoding method comprising:
8. 8. The image decoding method according to claim 7, wherein the sum of the first value and the second value is two to the power of the predetermined number.
9. A program for causing a computer to execute each step of the image coding method according to claim 5 when the program is read and executed by the computer.
10. A program for causing a computer to execute each step of the image decoding method according to claim 7 when the computer reads and executes the program.
Citation Information
Patent Citations
Image processing device and method
JP2013005298A
Image decoding method, image encoding method, image decoding device, image encoding device, programs, and integrated circuits
WO2011052217A1
Image encoder, image encoding method, program, image decoder, image decoding method and program
JP2013038758A
