Encoding device, decoding device, and program
By controlling deblocking filter strength using both quantization parameters and matrices, the encoding and decoding devices improve image quality and encoding efficiency by reducing block distortions.
Patent Information
- Application Number
- JP2021543783
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-09-03
- Filing Date
- 2020-09-01
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2040-09-01
AI Technical Summary
Conventional video encoding methods fail to effectively control the strength of deblocking filters, leading to insufficient reduction of block distortions due to the lack of consideration of quantization matrices, resulting in uneven image quality across block boundaries.
An encoding and decoding device that controls the deblocking filter strength based on both quantization parameters and matrices, using a filter control unit to adjust the filter strength based on quantization parameters and matrices, thereby improving image quality and encoding efficiency.
The proposed solution enhances image quality by reducing block noise and distortions, achieving better encoding efficiency by appropriately controlling the deblocking filter strength.
Smart Images

Figure 0007544722000010 
Figure 0007544722000015 
Figure 0007544722000012
Abstract
Description
[Technical field]
[0001] The present invention relates to an encoding device, a decoding device, and a program. [Background technology]
[0002] Video coding methods that perform coding processing on a block-by-block basis, such as those typified by the series of standards recommended by the Moving Picture Experts Group (MPEG) committee, have the characteristic that the quality between blocks is not uniform because coding is performed under different conditions for each block.
[0003] This feature has the advantage that it is possible to control the coding so that the degradation of the image quality is not perceived visually by controlling the coding so that, for example, an area with signal characteristics that are easy for humans to detect is coded to a high quality signal, and an area with signal characteristics that are difficult to detect is coded to a low quality signal, depending on the signal characteristics of the partial area of the image. On the other hand, because coding is controlled on a block-by-block basis, the quality difference of the image quality becomes apparent at the block boundary, and block-like distortion may be detected.
[0004] In order to reduce such signal degradation, deblocking filter processing is commonly used in recent coding methods. A deblocking filter is a filter for reducing signal gaps, and therefore generally has low-pass filter characteristics.
[0005] If a deblocking filter is applied in a fixed manner, the signal degradation caused by the filter process may have a greater effect than the quality improvement at the boundaries between high-quality regions, and conversely, the filter may not be effective enough at the boundaries between regions that have been coded at excessively low quality.
[0006] In view of such circumstances, in conventional video coding methods, the filter strength of a deblocking filter is controlled based on a quantization parameter (specifically, the average value of the quantization parameters of blocks on either side of a boundary) (see, for example, Non-Patent Document 1). Here, the quantization parameter refers to a parameter for which one value is set for one block and which specifies the coarseness (step size) of quantization of the block. [Prior art documents] [Non-patent literature]
[0007] [Non-Patent Document 1] Recommendation ITU-T H.265,(12 / 2016),“High efficiency video coding”,International Telecommunication Union DISCLOSURE OF THEINVENTION
[0008] In addition to the quantization parameters mentioned above, parameters that control the quality within the blocks into which an image is divided include quantization matrices (sometimes called scaling lists or scaling factors) that control the frequency characteristics within the blocks in order to control quality according to the intensity of visual perception.
[0009] A quantization matrix is a matrix consisting of values (weighting coefficients) that are set for each i×j element component according to the block size, and is used to adjust the quantization coarseness for each component ranging from low to high frequencies of the transform coefficients.
[0010] However, although conventional video coding methods control the filter strength of a deblocking filter in consideration of a quantization parameter, which is a unique parameter that is set for each block, they do not take into consideration the quantization matrix when controlling the filter strength.
[0011] For this reason, there is no method for controlling the filter strength of the deblocking filter to deal with the generation of block noise caused by the quantization matrix, and there is a problem in that the effect of reducing block noise by the deblocking filter is insufficient.
[0012] Therefore, an object of the present invention is to provide an encoding device, a decoding device, and a program that improve image quality and encoding efficiency by appropriately controlling a deblocking filter.
[0013] A coding device according to a first aspect is a coding device that divides an image into blocks and codes the image in blocks, and includes a transform / quantization unit that performs a transform process and a quantization process on a prediction residual that is a difference between a current block obtained by dividing the image into blocks and a prediction block generated by predicting the current block, an inverse quantization / inverse transform unit that restores the prediction residual by performing an inverse quantization process and an inverse transform process on a transform coefficient generated by the transform / quantization unit, a synthesis unit that restores the current block by synthesizing the restored prediction residual and the prediction block, a deblocking filter that performs a filter process on a boundary between the restored current block and an adjacent block adjacent to the current block, and a filter control unit that controls a filter strength of the deblocking filter based on a quantization parameter and a quantization matrix used in the quantization process and the inverse quantization process, wherein the quantization parameter is a parameter for which one value is set for one block, and the quantization matrix is a matrix consisting of values set for each component in the one block.
[0014] A decoding device according to a second aspect is a decoding device that performs decoding on a block-by-block basis generated by dividing an image, and includes an entropy decoding unit that decodes an encoded stream and outputs transform coefficients corresponding to a block to be decoded, an inverse quantization and inverse transform unit that performs inverse quantization and inverse transform processing on the transform coefficients output by the entropy decoding unit to restore a prediction residual, a synthesis unit that synthesizes the restored prediction residual and a prediction block generated by predicting the block to be decoded to restore the block to be decoded, a deblocking filter that performs a filter process on a boundary between the restored block to be decoded and an adjacent block adjacent to the block to be decoded, and a filter control unit that controls a filter strength of the deblocking filter based on a quantization parameter and a quantization matrix used in the inverse quantization process, wherein the quantization parameter is a parameter for which one value is set for one block, and the quantization matrix is a matrix consisting of values set for each component in the one block.
[0015] The program according to the third aspect causes a computer to function as the encoding device according to the first aspect.
[0016] The program according to the fourth aspect causes a computer to function as the decryption device according to the second aspect.
[0017] According to the present invention, it is possible to provide an encoding device, a decoding device, and a program that improve image quality and encoding efficiency by appropriately controlling a deblocking filter. [Brief description of the drawings]
[0018] [Figure 1] FIG. 1 is a diagram illustrating a configuration of an encoding device according to an embodiment. [Diagram 2] FIG. 2 is a diagram illustrating an example of a quantization matrix. [Diagram 3] FIG. 11 is a diagram illustrating an example of the operation of a deblocking filter according to the embodiment. [Figure 4]FIG. 2 is a diagram illustrating a configuration of a filter control unit of the encoding device according to the embodiment. [Diagram 5] FIG. 2 is a diagram illustrating a configuration of a decoding device according to an embodiment. [Figure 6] FIG. 2 is a diagram illustrating a configuration of a filter control unit of a decoding device according to an embodiment. [Figure 7] FIG. 4 is a diagram illustrating an example of an operation flow of a filter control unit according to the embodiment. [Figure 8] FIG. 13 is a diagram illustrating a configuration of a filter control unit of an encoding device according to a modified example. [Figure 9] FIG. 13 is a diagram illustrating a configuration of a filter control unit of a decoding device according to a modified example. [Figure 10] 13 is a diagram illustrating an example of an operation flow of a filter control unit according to a modified example. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0019] An encoding device and a decoding device according to an embodiment will be described with reference to the drawings. The encoding device and the decoding device according to the embodiment respectively encode and decode moving images as represented by MPEG. In the following description of the drawings, the same or similar parts are denoted by the same or similar reference numerals.
[0020] <Encoding device configuration> First, the configuration of the encoding device according to this embodiment will be described. Fig. 1 is a diagram showing the configuration of an encoding device 1 according to this embodiment. The encoding device 1 is a device that performs encoding in units of blocks obtained by dividing an image.
[0021] As shown in FIG. 1, the encoding device 1 includes a block division unit 100, a subtraction unit 110, a transformation and quantization unit 120, an entropy encoding unit 130, an inverse quantization and inverse transform unit 140, a synthesis unit 150, a deblocking filter 160, a filter control unit 161, a memory 170, and a prediction unit 180.
[0022] The block division unit 100 divides an input image of a frame (or picture) constituting a moving image into a plurality of image blocks, and outputs the image blocks obtained by division to the subtraction unit 110. The size of the image block is, for example, 32×32 pixels, 16×16 pixels, 8×8 pixels, or 4×4 pixels. The shape of the image block is not limited to a square, but may be a rectangle (non-square). The image block is a unit (block to be coded) for coding by the coding device 1, and is a unit (block to be coded) for decoding by the decoding device. Such an image block is sometimes called a CU (Coding Unit).
[0023] The block division unit 100 divides the luminance signal and the color difference signal into blocks. In the following, the case where the shape of the block division is the same for the luminance signal and the color difference signal will be mainly described, but the division may be controlled independently for the luminance signal and the color difference signal. When there is no particular distinction between the luminance block and the color difference block, they are simply called the block to be coded.
[0024] The subtraction unit 110 calculates a prediction residual representing a difference (error) between a current block to be coded output from the block division unit 100 and a prediction block obtained by predicting the current block to be coded by the prediction unit 180. The subtraction unit 110 calculates the prediction residual by subtracting each pixel value of the prediction block from each pixel value of the block, and outputs the calculated prediction residual to the transformation / quantization unit 120.
[0025] The transform / quantization unit 120 performs transform processing and quantization processing on a block-by-block basis. The transform / quantization unit 120 includes a transform unit 121 and a quantization unit 122.
[0026] The transform unit 121 performs a transform process on the prediction residual output from the subtraction unit 110 to calculate a transform coefficient for each frequency component, and outputs the calculated transform coefficient to the quantization unit 122. The transform process (transformation) refers to a process of transforming a pixel domain signal into a frequency domain signal, such as discrete cosine transform (DCT), discrete sine transform (DST), Karhunen-Loeb transform (KLT), and transforms obtained by converting these into integers. The transform process may also include a transform skip that adjusts the pixel domain signal by scaling or the like without transforming it into a frequency domain signal.
[0027] The quantization unit 122 quantizes the transformation coefficients output from the transformation unit 121 using the quantization parameters and the quantization matrix, and outputs the quantized transformation coefficients to the entropy coding unit 130 and the inverse quantization / inverse transform unit 140. The quantization unit 122 also outputs information related to the quantization process (specifically, information on the quantization parameters and the quantization matrix used in the quantization process) to the entropy coding unit 130, the inverse quantization unit 141, and the filter control unit 161.
[0028] Here, the quantization parameter is a parameter for which one value is set for one block. Specifically, the quantization parameter is a parameter that is commonly applied to each transform coefficient in a block and determines the coarseness (step size) of quantization.
[0029] A quantization matrix is a matrix of values set for each component in one block. Specifically, a quantization matrix is a matrix of values (weighting coefficients) set for each component of i×j elements according to the block size, and is used to adjust the quantization coarseness for each component ranging from low frequency to high frequency of the transform coefficients.
[0030] FIG. 2 is a diagram showing an example of a quantization matrix. In FIG. 2, an example where i×j=4×4 is shown. In the example shown in FIG. 2, the quantization matrix has a larger value as the horizontal and vertical orders become larger. In such a quantization matrix, the conversion coefficients related to the elements arranged further to the bottom right, that is, the conversion coefficients in the higher frequency range, are quantized with lower accuracy. Therefore, by utilizing the human visual characteristic that the lower the frequency range, the more sensitive the spatial changes in shading and hue are, it is permissible to reduce the amount of information in the higher frequency range by quantization without degrading the subjective image quality.
[0031] The quantization matrix can be set for each combination of the prediction mode (intra prediction or inter prediction) of the block to be coded, the block size (e.g., 2x2, 4x4, 8x8, 16x16, 32x32, 64x64), and one luminance and two color difference signals (in the case of an RGB signal, the R signal, the B signal, and the G signal).
[0032] The entropy coding unit 130 performs entropy coding on the transform coefficients output from the quantization unit 122, compresses the data, generates a coded stream (bit stream), and outputs the coded stream to the outside of the coding device 1. For the entropy coding, Huffman codes, CABAC (Context-based Adaptive Binary Arithmetic Coding), etc. can be used.
[0033] In addition, the entropy coding unit 130 obtains information such as the size, shape, etc. of each block to be coded from the block division unit 100, obtains information regarding the quantization process from the quantization unit 122, and obtains information regarding prediction (e.g., prediction mode and motion vector information) from the prediction unit 180, and also codes this information.
[0034] The inverse quantization and inverse transform unit 140 performs inverse quantization processing and inverse transform processing on a block-by-block basis. The inverse quantization and inverse transform unit 140 includes an inverse quantization unit 141 and an inverse transform unit 142.
[0035] The inverse quantization unit 141 performs an inverse quantization process corresponding to the quantization process performed by the quantization unit 122. Specifically, the inverse quantization unit 141 restores the transform coefficients by inverse quantizing the transform coefficients output from the quantization unit 122 using a quantization parameter and a quantization matrix, and outputs the restored transform coefficients to the inverse transform unit 142.
[0036] The inverse transform unit 142 performs an inverse transform process corresponding to the transform process performed by the transform unit 121. For example, when the transform unit 121 performs a DCT, the inverse transform unit 142 performs an inverse DCT. The inverse transform unit 142 performs an inverse transform process on the transform coefficients output from the inverse quantization unit 141 to restore the prediction residual, and outputs the restored prediction residual, which is the restored prediction residual, to the synthesis unit 150.
[0037] The synthesis unit 150 synthesizes, on a pixel-by-pixel basis, the reconstructed prediction residual output from the inverse transform unit 142 with the predicted block output from the prediction unit 180. The synthesis unit 150 adds each pixel value of the reconstructed prediction residual to each pixel value of the predicted block to reconstruct (decode) the block to be coded, and outputs the reconstructed decoded image (reconstructed block) on a block-by-block basis to the deblocking filter 160.
[0038] The deblocking filter 160 performs a filter process on the block boundary between two blocks consisting of a restored block and an adjacent block adjacent to the restored block, and outputs the restored block after the filter process to the memory 170. The filter process is a process for reducing signal degradation caused by processing on a block-by-block basis, and is a filter process for smoothing signal gaps at the block boundary between two adjacent blocks. The deblocking filter 160 is generally configured as a low-pass filter that smoothes signal fluctuations.
[0039] FIG. 3 is a diagram showing an example of the operation of the deblocking filter 160 according to this embodiment. In the example shown in FIG. 3, the deblocking filter 160 performs a filter process on block boundaries for each block of 8×8 pixels. The deblocking filter 160 also performs a filter process in units of 4 rows or 4 columns. Blocks P and Q shown in FIG. 3 are one unit of the filter process of the deblocking filter 160, and show an example in which the block size is 4×4 pixels. Each of the blocks P and Q may be called a sub-block. Details of the operation of the deblocking filter 160 will be described later.
[0040] The filter control unit 161 controls the deblocking filter 160. Specifically, the filter control unit 161 controls a boundary strength (Bs) indicating whether or not to perform a filter process on the block boundary of the target block pair, and the filter strength of the deblocking filter 160. The boundary strength Bs refers to a parameter for determining whether or not to apply a filter process and the type of the filter process. Note that the control of whether or not to perform a filter process can be regarded as a control of whether or not to set the boundary strength Bs to 1 or more, or to zero.
[0041] The filter control unit 161 controls the deblocking filter 160 based on the fluctuation of pixel values in the region near the boundary of the current block pair, the prediction mode, the quantization parameter, and the value of the motion vector used in motion compensation prediction (inter prediction).
[0042] Although details will be described later, the filter control unit 161 in this embodiment controls the filter strength of the deblocking filter 160 based on the quantization parameter and quantization matrix used in the quantization process in the quantization unit 120 and the inverse transform process in the inverse quantization unit 141.
[0043] In this way, by controlling the filter strength of the deblocking filter taking into consideration not only the quantization parameter, which is a unique parameter set on a block-by-block basis, but also the quantization matrix, it becomes possible to control the filter strength of the deblocking filter 160 against the occurrence of block noise caused by the quantization matrix, and the effect of reducing block distortion by the deblocking filter 160 can be improved.
[0044] The memory 170 accumulates the reconstructed blocks output from the deblocking filter 160 as decoded images on a frame-by-frame basis. The memory 170 outputs the stored decoded images to the prediction unit 180.
[0045] The prediction unit 180 performs prediction processing on a block-by-block basis to generate a prediction block corresponding to the current block to be coded, and outputs the generated prediction block to the subtraction unit 110 and the synthesis unit 150. The prediction unit 180 includes an inter prediction unit 181, an intra prediction unit 182, and a switching unit 183.
[0046] The inter prediction unit 181 uses the decoded image stored in the memory 170 as a reference image, calculates a motion vector by a method such as block matching, predicts the block to be coded, generates an inter prediction block, and outputs the generated inter prediction block to the switching unit 183. The inter prediction unit 181 selects an optimal inter prediction method from inter prediction using multiple reference images (typically, bi-prediction) and inter prediction using one reference image (unidirectional prediction), and performs inter prediction using the selected inter prediction method. The inter prediction unit 181 outputs information related to the inter prediction (motion vector, etc.) to the entropy coding unit 130 and the filter control unit 161.
[0047] The intra prediction unit 182 selects an optimal intra prediction mode to be applied to the encoding target block from among a plurality of intra prediction modes, and predicts the encoding target block using the selected intra prediction mode. The intra prediction unit 182 generates an intra prediction block by referring to decoded pixel values adjacent to the encoding target block in the decoded image stored in the memory 170, and outputs the generated intra prediction block to the switching unit 183. The intra prediction unit 182 also outputs information related to the selected intra prediction mode to the entropy coding unit 130 and the filter control unit 161.
[0048] The switching unit 183 switches between the inter predicted block output from the inter prediction unit 181 and the intra predicted block output from the intra prediction unit 182, and outputs either the predicted block to the subtraction unit 110 and the synthesis unit 150.
[0049] As described above, the encoding device 1 according to this embodiment includes a transform / quantization unit 120 that performs transform processing and quantization processing on a prediction residual that represents the difference between a block to be encoded and a prediction block obtained by predicting the block to be encoded, an inverse quantization / inverse transform unit 140 that performs inverse quantization processing and inverse transform processing on the transform coefficients obtained by the transform / quantization unit to restore the prediction residual, a synthesis unit 150 that synthesizes the restored prediction residual and the prediction block to restore the block to be encoded, a deblocking filter 160 that performs filtering processing on the boundary between the restored block to be encoded and an adjacent block adjacent to the block to be encoded, and a filter control unit 161 that controls the filter strength of the deblocking filter 160 based on the quantization parameter and the quantization matrix used in the quantization processing and inverse quantization processing.
[0050] Next, the configuration of the filter control unit 161 according to this embodiment will be described. The filter control unit 161 according to this embodiment controls the filter strength of the deblocking filter 160 based on the quantization parameter and quantization matrix used in the quantization process and inverse quantization process for the block to be coded and the quantization parameter and quantization matrix used in the quantization process and inverse quantization process for the adjacent block. In the following, it is assumed that the block to be coded or its sub-block is a block P, and the adjacent block or its sub-block is a block Q.
[0051] Fig. 4 is a diagram showing the configuration of the filter control unit 161 according to this embodiment. As shown in Fig. 4, the filter control unit 161 according to this embodiment has a boundary strength determination unit 161a, a representative value derivation unit 161b, an offset calculation unit 161c, a threshold derivation unit 161d, and a filter strength control unit 161e.
[0052] The boundary strength determination unit 161a determines the boundary strength Bs based on, for example, Table 1 below, and outputs the determined value of boundary strength Bs to the threshold derivation unit 161d and the filter strength control unit 161e. In this embodiment, the value of boundary strength Bs is set to 0, 1, or 2. Note that the boundary strengths for the luminance signal and color difference signal blocks may be calculated separately, or a combination of the boundary strengths of the luminance signal and color difference signal blocks may be determined as one boundary strength.
[0053] [Table 1]
[0054] As shown in Table 1, when intra prediction is applied to at least one of blocks P and Q, the boundary strength determination unit 161a sets the value of Bs to 2.
[0055] On the other hand, the boundary strength determination unit 161a sets the Bs value to 1 if inter prediction is applied to both blocks P and Q and at least one of the following conditions (a) to (d) is satisfied, and sets the Bs value to 0 otherwise.
[0056] (a) At least one of blocks P and Q contains significant transform coefficients (i.e., non-zero transform coefficients).
[0057] (b) The number of motion vectors or reference pictures of blocks P and Q are different.
[0058] (c) The absolute value of the difference between the motion vectors of blocks P and Q is equal to or greater than a threshold value (eg, 1 pixel).
[0059] When the determined value of the boundary strength Bs is 0, the boundary strength determination unit 161a controls the deblocking filter 160 so as not to perform a filter process on the boundary between the blocks P and Q.
[0060] The representative value derivation unit 161b calculates a representative value m of the quantization matrix used in the quantization process and the inverse quantization process for the block P. pp The representative value m of the quantization matrix used in the quantization process and the inverse quantization process for the block Q is derived. pq Derive the representative value m pp and m pq The representative value m pp and m pq When no particular distinction is made, simply use the representative value m p It is called.
[0061] The representative value m derived by the representative value derivation unit 161b p The method shall be one of the following 1) to 3).
[0062] 1) Representative value m p is the average value of multiple values constituting the low-frequency component of the quantization matrix.
[0063] In the case of quantizing the orthogonally transformed prediction residual with a quantization matrix, the low-frequency components that have the greatest effect on block distortion are limited to m pDerive it. Specifically, as shown in the following formula (1), the representative value derivation unit 161b calculates the average value of m[j][i] that satisfies the low frequency range, i < s, j < t (for example, s = t = 4) as the representative value m p to be.
[0064]
Number
[0065] Generally, the quantization matrix means the weighting coefficient for the low frequency range where the closer i and j are to 0, and the weighting becomes smaller considering the human visual characteristics. However, as i and j increase, the weighting increases (see Figure 2). Also, generally, the transform coefficients tend to be larger when i and j are closer to 0 and smaller as i and j increase. Therefore, we have decided to derive m p by limiting it to the low frequency components.
[0066] 2) The representative value m p is one value corresponding to the lowest frequency range of the quantization matrix.
[0067] In the case of quantizing the orthogonally transformed prediction residual with the quantization matrix, the representative value derivation unit 161b sets the lowest frequency coefficient m[0][0], which has the most influence on the block distortion, as the representative value m p to be.
[0068] m p = m[0][0] (2) This method only considers the influence on the block distortion of the lowest frequency range. Compared with the method in 1) above, it has less influence on the deblocking filter control. However, since it is realized by substituting only one coefficient, it is a very lightweight realization method.
[0069] 3) The representative value m p is the weighted average value of a plurality of values constituting all components of the quantization matrix.
[0070] The representative value derivation unit 161b calculates the representative value m pBy using all the coefficients, cases where many coefficients occur in the high frequency range can be effectively reflected in the deblocking filter control. Since a large weighting coefficient is generally used for the high frequency range in the quantization matrix (MxN), the representative value m p Therefore, the representative value derivation unit 161b takes into consideration visual characteristics and increases the weight of the low-frequency components to perform averaging using the weighting of the quantization matrix, as shown in the following equation (3).
[0071]
number
[0072] Here, c[j][i] is a decimal value less than or equal to 1.0, and generally has a weighting that approaches 0 in the high frequency range. The specific value is designed depending on the system.
[0073] In addition, the above-mentioned method 1) and method 3) may be combined. Specifically, the representative value derivation unit 161b calculates m p While deriving the above, a weighted average may be performed by increasing the weight of the lowest-range coefficient of the quantization matrix.
[0074] The offset calculation unit 161c calculates the representative value m pp and m pq Based on this, an offset value is calculated for each of blocks P and Q.
[0075] Specifically, the offset calculation unit 161c calculates the representative value m pp The offset calculation unit 161c calculates an offset value QppOffset for the block P using the above formula, and outputs the calculated offset value QppOffset to the threshold derivation unit 161d. For example, the offset calculation unit 161c calculates the offset value QppOffset using the following formula (4).
[0076] QppOffset=log 2 (m pp / md )×6 (4) However, m d is a value that is specified in the system as the default quantization matrix value. In this example, m d Set to 16.
[0077] Similarly, the offset calculation unit 161c calculates the representative value m pq The offset calculation unit 161c calculates an offset value QpqOffset for the block Q using the above formula, and outputs the calculated offset value QpqOffset to the threshold derivation unit 161d. For example, the offset calculation unit 161c calculates the offset QpqOffset using the following formula (5).
[0078] QpqOffset=log 2 (m pq / m d )×6 (5) In the formulas (4) and (5), the quantization parameter Qp is a parameter that increases and decreases according to a logarithmic function, and the representative value m p m d We divide by and take the logarithm.
[0079] In addition, in the case of hardware implementation, the offset calculation unit 161c uses division and log 2 Equations (4) and (5) may be implemented using lookup tables instead of processing functions.
[0080] For example, instead of processing equation (4), when the lookup table LUT is set to LUT[]={18, 21, 23, 26, 29, 32, 36, 41, 46, 51, 58, 64, 72, 81, 91, 102, 115, 128, 144, 162, 182, 204, 229, 256}, QppOffset may be calculated by the following processing. if (m pp <m d ) { sign = -1 M = m d × m d / m pp } else { sign = 1 M = m pp } Q = 0 while (M >= LUT[Q]) { Q++ } QppOffset = sign × Q
[0081] Similarly, instead of the process of equation (5), QpqOffset may be calculated by the following process. if (m pq <m d ) { sign = -1 M = m d × m d / m pq } else { sign = 1 M = m pq } Q = 0 while (M >= LUT[Q]) { Q++ } QpqOffset = sign × Q
[0082] Note that the above is an example of calculating QppOffset and QpqOffset using a lookup table, and the representative value m of the quantization matrix pp and m qq Based on m d As long as division and logarithmic processing are performed using the LUT, the present invention is not limited to the above example.
[0083] The threshold derivation unit 161d calculates the quantization parameter Qp used in the quantization process and the inverse quantization process for the block P. Pand the quantization parameter Qp used in the quantization and inverse quantization processes for the block Q. Q and the threshold values β and t for controlling the filter strength of the deblocking filter 160 based on the offset values QppOffset and QpqOffset calculated by the offset calculation unit 161c. C Derive the thresholds β and t C to the filter strength control unit 161e.
[0084] First, the threshold derivation unit 161d calculates a variable qP, for example, by the following formula (6).
[0085] qP=((Qp Q +QpqOffset+Qp P +QppOffset+1)>>1) (6) Here, “>>” indicates a shift operator (right shift operation). Equation (6) basically expresses the quantization parameter Qp P and the quantization parameter Qp of block Q. Q This is a formula for calculating the average of QppOffset and QpqOffset, which are based on the quantization matrix. Note that the formula (6) is merely an example, and other formulas may be used as long as they reflect the offset values QppOffset and QpqOffset based on the quantization matrix.
[0086] Secondly, the threshold derivation unit 161d calculates Q for deriving the threshold β, for example, by the following formula (7).
[0087] Q=Clip3(0,63,qP+(slice_beta_offset_div2<<1)) (7) Here, "<<" indicates a shift operator (left shift operation). "Clip3(X,Y,Z)" is a clip operator that returns X if Z is smaller than X, returns Y if Z is larger than Y, and returns Z otherwise. slice_beta_offset_div2 is one of the parameters to be signaled to the decoding device 2.
[0088] In addition, the threshold derivation unit 161d calculates a threshold t C Calculate Q to derive.
[0089] Q=Clip3(0,65,qP+2*(bS?1)+(slice_tc_offset_div2<<1)) (8) Here, “bS” is the Bs value output by the boundary strength determining unit 161a. slice_tc_offset_div2 is one of the parameters signaled to the decoding device 2.
[0090] Third, the threshold derivation unit 161d calculates the thresholds β and t from the calculated Q according to Table 2 below. C Derive.
[0091] [Table 2]
[0092] The filter strength control unit 161e determines the value of the boundary strength Bs output by the boundary strength determination unit 161a, and the thresholds β and t C The filter strength of the deblocking filter 160 is controlled based on the above.
[0093] When the value of the boundary strength Bs is 1 or 2, the filter strength control unit 161e may control the deblocking filter 160 to perform filtering only when the following formula (9) is satisfied (see FIG. 3).
[0094]
number
[0095] Furthermore, when performing filtering, the filter strength control unit 161e may apply a strong filter when all of the following conditional expressions (10) to (15) are satisfied, and may apply a weak filter in other cases (see FIG. 3).
[0096]
number
[0097] In this way, the filter control unit 161 according to this embodiment takes into consideration not only the quantization parameter, which is a unique parameter set for each block, but also the quantization matrix to control the filter strength of the deblocking filter 160. This makes it possible to control the filter strength of the deblocking filter 160 in response to the occurrence of block noise caused by the quantization matrix, and improves the effect of reducing block distortion by the deblocking filter 160.
[0098] <Configuration of the Decryption Device> Next, the configuration of the decoding device according to this embodiment will be described, focusing mainly on the differences from the configuration of the encoding device described above. Fig. 5 is a diagram showing the configuration of a decoding device 2 according to this embodiment. The decoding device 2 is a device that decodes a current block from an encoded stream.
[0099] As shown in FIG. 5, the decoding device 2 includes an entropy decoding unit 200, an inverse quantization and inverse transform unit 210, a synthesis unit 220, a deblocking filter 230, a filter control unit 231, a memory 240, and a prediction unit 250.
[0100] The entropy decoding unit 200 decodes the encoded stream generated by the encoding device 1, and decodes various kinds of signaling information. Specifically, the entropy decoding unit 200 obtains information related to the quantization process applied to the block to be decoded, and outputs the obtained information to the inverse quantization unit 211 and the filter control unit 231. The entropy decoding unit 200 also obtains information related to the prediction applied to the block to be decoded (e.g., prediction type information, motion vector information), and outputs the obtained information to the prediction unit 250 and the filter control unit 231.
[0101] Moreover, the entropy decoding unit 200 decodes the coded stream, obtains the quantized transform coefficients, and outputs the obtained transform coefficients to the inverse quantization and inverse transform unit 210 (inverse quantization unit 211).
[0102] The inverse quantization and inverse transform unit 210 performs inverse quantization processing and inverse transform processing on a block-by-block basis. The inverse quantization and inverse transform unit 210 includes an inverse quantization unit 211 and an inverse transform unit 212.
[0103] The inverse quantization unit 211 performs an inverse quantization process corresponding to the quantization process performed by the quantization unit 122 of the encoding device 1. The inverse quantization unit 211 restores the transform coefficients of the block to be decoded by inverse quantizing the quantized transform coefficients output from the entropy decoding unit 200 using a quantization parameter and a quantization matrix, and outputs the restored transform coefficients to the inverse transform unit 212.
[0104] The inverse transform unit 212 performs inverse transform processing corresponding to the transform processing performed by the transform unit 121 of the encoding device 1. The inverse transform unit 212 performs inverse transform processing on the transform coefficients output from the inverse quantization unit 211 to restore the prediction residual, and outputs the restored prediction residual (restored prediction residual) to the synthesis unit 220.
[0105] The synthesis unit 220 reconstructs (decodes) the block to be decoded by synthesizing the prediction residual output from the inverse transform unit 212 and the prediction block output from the prediction unit 250 on a pixel-by-pixel basis, and outputs the reconstructed block to the deblocking filter 230.
[0106] The deblocking filter 230 performs an operation similar to that of the deblocking filter 160 of the encoding device 1. The deblocking filter 230 performs a filtering process on a boundary between a pair of blocks (blocks P and Q) consisting of a reconstructed block output from the synthesis unit 220 and a block adjacent to the reconstructed block, and outputs the reconstructed block after the filtering process to the memory 240.
[0107] The filter control unit 231 performs the same operation as the filter control unit 161 of the encoding device 1, based on the information output from the entropy decoding unit 200. The filter control unit 231 selects the boundary strength Bs by, for example, the method shown in Table 1, and controls the filter strength of the deblocking filter 160 by equations (1) to (15).
[0108] The memory 240 stores the reconstructed blocks output from the deblocking filter 230 as decoded images on a frame-by-frame basis. The memory 240 outputs the decoded images on a frame-by-frame basis to the outside of the decoding device 2.
[0109] The prediction unit 250 performs prediction on a block-by-block basis. The prediction unit 250 includes an inter prediction unit 251, an intra prediction unit 252, and a switching unit 253.
[0110] The inter prediction unit 251 predicts a current block to be decoded by inter prediction using a decoded image stored in the memory 240 as a reference image. The inter prediction unit 251 generates an inter prediction block by performing inter prediction using motion vector information output from the entropy decoding unit 200, and outputs the generated inter prediction block to the switching unit 253.
[0111] The intra prediction unit 252 refers to reference pixels adjacent to the block to be decoded in the decoded image stored in the memory 240, and predicts the block to be decoded by intra prediction based on the information output from the entropy decoding unit 200. Then, the intra prediction unit 252 generates an intra prediction block, and outputs the generated intra prediction block to the switching unit 253.
[0112] The switching unit 253 switches between the inter-predicted block output from the inter-prediction unit 251 and the intra-predicted block output from the intra-prediction unit 252 , and outputs either the predicted block to the synthesis unit 220 .
[0113] As described above, the decoding device 2 according to this embodiment includes an entropy decoding unit 200 that outputs transform coefficients corresponding to a block to be decoded by decoding an encoded stream, an inverse quantization / inverse transform unit 210 that performs inverse quantization processing and inverse transform processing on the transform coefficients output by the entropy decoding unit 200 to restore a prediction residual, a synthesis unit 220 that synthesizes the restored prediction residual and a prediction block obtained by predicting the block to be decoded to restore the block to be decoded, a deblocking filter 230 that performs filtering processing on the boundary between the restored block to be decoded and an adjacent block adjacent to the block to be decoded, and a filter control unit 231 that controls the filter strength of the deblocking filter 230 based on the quantization parameter and quantization matrix used in the inverse quantization processing.
[0114] Next, the configuration of the filter control unit 231 according to this embodiment will be described. Fig. 6 is a diagram showing the configuration of the filter control unit 231 according to this embodiment. As shown in Fig. 6, the filter control unit 231 according to this embodiment has a boundary strength determination unit 231a, a representative value derivation unit 231b, an offset calculation unit 231c, a threshold derivation unit 231d, and a filter strength control unit 231e.
[0115] The boundary strength determination unit 231a, the representative value derivation unit 231b, the offset calculation unit 231c, the threshold derivation unit 231d, and the filter strength control unit 231e perform operations similar to those of the boundary strength determination unit 161a, the representative value derivation unit 161b, the offset calculation unit 161c, the threshold derivation unit 161d, and the filter strength control unit 161e of the encoding device 1, respectively.
[0116] <Example of filter control section operation> Next, an example of the operation of the filter control section 161 and the filter control section 231 according to this embodiment will be described. Since the filter control section 161 and the filter control section 231 perform the same operation, the filter control section 231 will be described here as an example. Fig. 7 is a diagram showing an example of the operation flow of the filter control section 231 according to this embodiment.
[0117] 7, in step S1, the boundary strength determination unit 231a determines the boundary strength Bs by the method shown in Table 1, and outputs the determined value of the boundary strength Bs to the threshold derivation unit 231d and the filter strength control unit 231e. If the determined value of the boundary strength Bs is 0, the processes from step S2 onwards are not performed, and the filter process is not performed on the boundary between blocks P and Q.
[0118] In step S2, the representative value derivation unit 231b calculates a representative value m pp The representative value m of the quantization matrix used in the inverse quantization process for the block Q is derived. pq Derive the representative value m pp and m pq The offset calculation unit 231c outputs the representative value m p As the above, any one of 1) to 3) is used.
[0119] In step S3, the offset calculation unit 231c calculates the representative value m pp and m pq Specifically, the offset calculation unit 231c calculates an offset value for each of the blocks P and Q based on the representative value m pp The offset calculation unit 231c calculates the offset value QppOffset for the block P by the above-mentioned formula (4) using the representative value m pq Using this, the offset value QpqOffset for the block Q is calculated according to the above-mentioned equation (5), and the calculated offset value QpqOffset is output to the threshold derivation unit 231d.
[0120] In step S4, the threshold derivation unit 231d calculates the quantization parameter Qp P and the quantization parameter Qp used in the inverse quantization process for block Q. Qand the offset values QppOffset and QpqOffset calculated by the offset calculation unit 231c, the variable qP is calculated by the above-mentioned formula (6).
[0121] In step S5, the threshold derivation unit 231d calculates the variable Q by the above-mentioned formulas (7) and (8) based on the variable qP, and derives the thresholds β and t C Derive.
[0122] In step S6, the filter strength control unit 231e calculates the value of the boundary strength Bs output by the boundary strength determination unit 231a, and the thresholds β and t C The filter strength of the deblocking filter 230 is controlled based on the above.
[0123] In this way, the filter control unit 231 according to this embodiment takes into consideration not only the quantization parameter, which is a unique parameter set for each block, but also the quantization matrix to control the filter strength of the deblocking filter 230. This makes it possible to control the filter strength of the deblocking filter 230 in response to the occurrence of block noise caused by the quantization matrix, and improves the effect of reducing block noise by the deblocking filter 230.
[0124] <Example of change> Next, a modified example of the embodiment will be described, focusing mainly on the differences from the above-described embodiment.
[0125] First, the encoding device 1 according to this modified example will be described. In the encoding device 1 according to this modified example, the entropy encoding unit 130 transmits to the decoding device an array (hereinafter, referred to as "offset array") consisting of offset values defined for each of a plurality of quantization matrix candidates, included in the encoded stream. Specifically, the offset array stores offset values for each quantization matrix set according to a combination of the prediction mode, block size, and signal type (one luminance and two chrominance signals) of the encoding target block. The offset values are used to control the filter strength in the deblocking filter process, as will be described in detail later.
[0126] Fig. 8 is a diagram showing the configuration of filter control unit 161 according to this modified example. As shown in Fig. 8, filter control unit 161 according to this modified example has a boundary strength determination unit 1161a, an offset derivation unit 1161b, a threshold derivation unit 1161c, and a filter strength control unit 1161d.
[0127] The boundary strength determination unit 1161a determines the boundary strength Bs based on, for example, Table 1 above, and outputs the determined value of boundary strength Bs to the threshold derivation unit 1161c and the filter strength control unit 1161d. In this modified example, the value of boundary strength Bs is set to 0, 1, or 2. Note that the boundary strengths for the luminance signal and color difference signal blocks may be calculated separately, or a combination of the boundary strengths for the luminance signal and color difference signal blocks may be determined as one boundary strength.
[0128] As shown in Table 1, when intra prediction is applied to at least one of blocks P and Q, the boundary strength determination unit 1161a sets the value of Bs to 2.
[0129] On the other hand, the boundary strength determination unit 1161a sets the Bs value to 1 if inter prediction is applied to both blocks P and Q and at least one of the following conditions (a) to (d) is satisfied, and sets the Bs value to 0 otherwise.
[0130] (a) At least one of blocks P and Q contains significant transform coefficients (i.e., non-zero transform coefficients).
[0131] (b) The number of motion vectors or reference pictures of blocks P and Q are different.
[0132] (c) The absolute value of the difference between the motion vectors of blocks P and Q is equal to or greater than a threshold value (eg, 1 pixel).
[0133] If the determined value of the boundary strength Bs is 0, the boundary strength determination unit 1161a controls the deblocking filter 160 so as not to perform filtering on the boundary between the blocks P and Q.
[0134] The offset derivation unit 1161b derives an offset value QppOffset corresponding to the quantization matrix used in the quantization process and inverse quantization process for block P, and an offset value QpqOffset corresponding to the quantization matrix used in the quantization process and inverse quantization process for block Q, based on the above-mentioned offset array.
[0135] For example, when the number of the quantization matrix used in the quantization process and the inverse quantization process for the block P is k, the offset derivation unit 1161b acquires an offset value m[k] in the offset array and sets the acquired offset value m[k] as QppOffset. Here, k may be an index value indicating a block type determined according to a combination of a prediction mode, a block size, and a signal type. The offset derivation unit 1161b may convert the offset value m[k] as shown in the following formula (16) to set it as QppOffset.
[0136] QppOffset=log 2 (m pp / m d )×6 (16) However, m d is a value that is specified in the system as the default quantization matrix value. In this example, m d Set to 16.
[0137] Similarly, when the number of the quantization matrix used in the quantization process and the inverse quantization process for the block Q is l, the offset derivation unit 1161b acquires an offset value m[l] in the offset array and sets the acquired offset value m[l] as QpqOffset. Here, l may be an index value indicating a block type determined according to a combination of a prediction mode, a block size, and a signal type. The offset derivation unit 1161b may convert the offset value m[l] as shown in the following formula (17) to set it as QpqOffset.
[0138] QpqOffset=log 2 (m pq / m d )×6 (17) In equations (16) and (17), the quantization parameter Qp is a parameter that increases and decreases according to a logarithmic function, and the representative value m p m d We divide by and take the logarithm.
[0139] In addition, in the offset derivation unit 1161b, when implemented in hardware, division and log 2 Equations (16) and (17) may be implemented using lookup tables instead of processing functions.
[0140] For example, instead of processing equation (16), when the lookup table LUT is LUT[]={18, 21, 23, 26, 29, 32, 36, 41, 46, 51, 58, 64, 72, 81, 91, 102, 115, 128, 144, 162, 182, 204, 229, 256}, QppOffset may be calculated by the following processing. if (m pp <m d ) [ sign = -1 M = m d × m d / m pp ] else [ sign = 1 M = m pp ] Q = 0 while (M >= LUT[Q]) [ Q++ ] QppOffset = sign × Q
[0141] Similarly, instead of the process of equation (17), QpqOffset may be calculated by the following process. if (m pq <m d ) [ sign = -1 M = m d × m d / m pq ] else [ sign = 1 M = m pq ] Q = 0 while (M >= LUT[Q]) [ Q++ ] QpqOffset = sign × Q
[0142] Note that the above is an example of calculation of QppOffset and QpqOffset using a lookup table, and the calculation is not limited to the above example.
[0143] The threshold derivation unit 1161c calculates the quantization parameter Qp used in the quantization process and the inverse quantization process for the block P. P and the quantization parameter Qp used in the quantization and inverse quantization processes for the block Q. Q and the threshold values β and t CDerive the thresholds β and t C to the filter strength control unit 1161d.
[0144] First, the threshold derivation unit 1161c calculates a variable qP, for example, by the following equation (18).
[0145] qP=((Qp Q +QpqOffset+Qp P +QppOffset+1)>>1) (18) Here, “>>” denotes a shift operator (right shift operation). Equation (18) basically expresses the quantization parameter Qp P and the quantization parameter Qp of block Q. Q This is a formula for calculating the average of and, in this formula, offset values QppOffset and QpqOffset based on the quantization matrix are introduced. Note that the formula (18) is merely an example, and other formulas may be used as long as they reflect the offset values QppOffset and QpqOffset based on the quantization matrix.
[0146] Secondly, the threshold derivation unit 1161c calculates Q for deriving the threshold β, for example, by the following equation (19).
[0147] Q=Clip3(0,63,qP+(slice_beta_offset_div2<<1)) (19) Here, "<<" indicates a shift operator (left shift operation). "Clip3(X,Y,Z)" is a clip operator that returns X if Z is smaller than X, returns Y if Z is larger than Y, and returns Z otherwise. slice_beta_offset_div2 is one of the parameters to be signaled to the decoding device 2.
[0148] In addition, the threshold derivation unit 1161c calculates a threshold t C Calculate Q to derive.
[0149] Q=Clip3(0,65,qP+2*(bS-1)+(slice_tc_offset_div2<<1)) (20) Here, “bS” is the Bs value output by the boundary strength determining unit 1161a. slice_tc_offset_div2 is one of the parameters signaled to the decoding device 2.
[0150] Thirdly, the threshold derivation unit 1161c calculates the thresholds β and t C Derive.
[0151] The filter strength control unit 1161d determines the value of the boundary strength Bs output by the boundary strength determination unit 1161a, and the thresholds β and t C The filter strength of the deblocking filter 160 is controlled based on the above.
[0152] When the value of the boundary strength Bs is 1 or 2, the filter strength control unit 1161d may control the deblocking filter 160 to perform filtering only when the above formula (9) is satisfied (see FIG. 3).
[0153] Furthermore, when performing filtering, the filter strength control unit 1161d may apply a strong filter when all of the above conditional expressions (10) to (15) are satisfied, and may apply a weak filter in other cases (see FIG. 3).
[0154] In this way, the filter control unit 161 according to this modification takes into consideration not only the quantization parameter, which is a unique parameter set for each block, but also the quantization matrix to control the filter strength of the deblocking filter 160. This makes it possible to control the filter strength of the deblocking filter 160 in response to the occurrence of block noise caused by the quantization matrix, and improves the effect of reducing block distortion by the deblocking filter 160.
[0155] Next, the decoding device 2 according to this modified example will be described.
[0156] In the decoding device 2 according to this modified example, the entropy decoding unit 200 decodes the encoded stream generated by the encoding device 1, and decodes various kinds of signaling information. Specifically, the entropy decoding unit 200 acquires information related to the quantization process applied to the block to be decoded, and outputs the acquired information to the inverse quantization unit 211 and the filter control unit 231. The entropy decoding unit 200 also acquires information related to the prediction applied to the block to be decoded (e.g., prediction type information, motion vector information), and outputs the acquired information to the prediction unit 250 and the filter control unit 231. Furthermore, the entropy decoding unit 200 acquires an offset array, and outputs the acquired offset array to the filter control unit 231.
[0157] In this way, the decoding device 2 according to the present modified example has an entropy decoding unit 200 that decodes an encoded stream and outputs an array consisting of offset values defined for each of a plurality of quantization matrix candidates and a transform coefficient corresponding to a block to be decoded, an inverse quantization / inverse transform unit 210 that performs inverse quantization processing and inverse transform processing on the transform coefficients output by the entropy decoding unit 200 to restore a prediction residual, a synthesis unit 220 that synthesizes the restored prediction residual and a prediction block obtained by predicting the block to be decoded to restore the block to be decoded, a deblocking filter 230 that performs filtering processing on the boundary between the restored block to be decoded and an adjacent block adjacent to the block to be decoded, and a filter control unit 231 that controls the filter strength of the deblocking filter 230 based on the quantization parameter and quantization matrix used in the inverse quantization processing and the offset array.
[0158] Next, the configuration of filter control section 231 according to this modified example will be described. Fig. 9 is a diagram showing the configuration of filter control section 231 according to this modified example. As shown in Fig. 9, filter control section 231 according to this modified example has boundary strength determination section 2231a, offset derivation section 2231b, threshold derivation section 2231c, and filter strength control section 2231d.
[0159] The boundary strength determining unit 2231a, the offset derivation unit 2231b, the threshold derivation unit 2231c, and the filter strength control unit 2231d perform the same operations as the boundary strength determining unit 1161a, the offset derivation unit 1161b, the threshold derivation unit 1161c, and the filter strength control unit 1161d of the encoding device 1, respectively.
[0160] Next, an example of the operation of filter control section 161 and filter control section 231 according to this modified example will be described. Since filter control section 161 and filter control section 231 perform the same operation, the following description will be given taking filter control section 231 as an example. Fig. 10 is a diagram showing an example of the operation flow of filter control section 231 according to this modified example.
[0161] 10, in step S11, the boundary strength determination unit 2231a determines the boundary strength Bs by the method shown in Table 1, and outputs the determined value of boundary strength Bs to the threshold derivation unit 2231c and the filter strength control unit 2231d. If the determined value of boundary strength Bs is 0, the processes from step S12 onwards are not performed, and no filter process is performed on the boundary between blocks P and Q.
[0162] In step S12, based on the offset array transmitted from the encoding device 1, the offset derivation unit 2231b calculates an offset value QppOffset corresponding to the quantization matrix used in the inverse quantization process for block P, and calculates an offset value QpqOffset corresponding to the quantization matrix used in the inverse quantization process for block Q, and outputs the offset values QppOffset and QpqOffset calculated by the offset derivation unit 2231b to the threshold derivation unit 2231c.
[0163] In step S13, the threshold derivation unit 2231c calculates the quantization parameter Qp P and the quantization parameter Qp used in the inverse quantization process for block Q. Q and the offset values QppOffset and QpqOffset derived by the offset derivation unit 2231b, the variable qP is calculated by the above-mentioned equation (18).
[0164] In step S14, the threshold derivation unit 2231c calculates the variable Q by the above-mentioned formulas (19) and (20) based on the variable qP, and derives the thresholds β and t C Derive.
[0165] In step S15, the filter strength control unit 2231d calculates the value of the boundary strength Bs output by the boundary strength determination unit 2231a, and the thresholds β and t C The filter strength of the deblocking filter 230 is controlled based on the above.
[0166] In this way, the filter control unit 231 according to this modification takes into consideration not only the quantization parameter, which is a unique parameter set for each block, but also the quantization matrix to control the filter strength of the deblocking filter 230. This makes it possible to control the filter strength of the deblocking filter 230 in response to the occurrence of block noise caused by the quantization matrix, and improves the effect of reducing block distortion by the deblocking filter 230.
[0167] <Other embodiments> In the encoding device 1 and the decoding device 2 according to the above-mentioned embodiment, the filter control units 161 and 231 are configured to calculate offset values QppOffset and QpqOffset for each target block pair using a representative value of the quantization matrix applied to block P and a representative value of the quantization matrix applied to block Q.
[0168] However, to simplify processing, offset values may be calculated and stored in memory for the quantization matrix set for each combination of prediction mode (intra prediction or inter prediction), block size (e.g., 2x2, 4x4, 8x8, 16x16, 32x32, 64x64), and one luminance and two chrominance signals (in the case of RGB signals, R signal, B signal, G signal), and the offset value may be called from memory based on the prediction mode and block size, whether each block of the target block pair is a luminance signal or two chrominance signals.
[0169] A program may be provided that causes a computer to execute each process performed by the encoding device 1. A program may be provided that causes a computer to execute each process performed by the decoding device 2. The program may be recorded in a computer-readable medium. Using a computer-readable medium, it is possible to install the program in a computer. Here, the computer-readable medium on which the program is recorded may be a non-transient recording medium. The non-transient recording medium is not particularly limited, and may be, for example, a recording medium such as a CD-ROM or a DVD-ROM.
[0170] The circuits for executing the processes performed by the encoding device 1 may be integrated, and the encoding device 1 may be configured as a semiconductor integrated circuit (chip set, SoC). The circuits for executing the processes performed by the decoding device 2 may be integrated, and the decoding device 2 may be configured as a semiconductor integrated circuit (chip set, SoC).
[0171] The above describes the embodiments in detail with reference to the drawings, but the specific configuration is not limited to that described above, and various design changes, etc. are possible without departing from the spirit of the invention.
[0172] This application claims priority to Japanese Patent Application No. 2019-159971 (filed September 2, 2019) and Japanese Patent Application No. 2019-160251 (filed September 3, 2019), the entire contents of which are incorporated herein by reference.
Claims
1. An encoding device that divides an image into blocks and encodes the image in blocks, comprising: a transform / quantization unit that performs a transform process and a quantization process on a prediction residual that is a difference between a current block to be coded, which is obtained by dividing the image into blocks, and a predicted block generated by predicting the current block to be coded; an inverse quantization and inverse transform unit that performs inverse quantization and inverse transform processing on the transform coefficients generated by the transform and quantization unit to restore the prediction residual; a synthesis unit that synthesizes the reconstructed prediction residual and the prediction block to reconstruct the encoding target block; a deblocking filter that performs filtering on a boundary between the restored encoding target block and an adjacent block adjacent to the encoding target block; A filter control unit that controls a filter strength of the deblocking filter based on a quantization parameter and a quantization matrix used in the quantization process and the inverse quantization process, the quantization parameter is a parameter in which one value is set for one block, and the quantization matrix is a matrix of values set for each component in the one block; the filter control unit has a representative value derivation unit that derives a representative value of the quantization matrix, the representative value is a weighted average of a plurality of values constituting only low-frequency components of the quantization matrix, and in the weighting, a weight of one value corresponding to a lowest frequency component of the quantization matrix among the plurality of values is greater than weights of other values; The encoding device, wherein the filter control unit controls the filter strength based on the representative value.
2. The encoding device according to claim 1, characterized in that the filter control unit controls the filter strength based on the quantization parameter and the quantization matrix used in the quantization process and the inverse quantization process for the block to be encoded, and the quantization parameter and the quantization matrix used in the quantization process and the inverse quantization process for the adjacent block.
3. The representative value derivation unit The encoding device according to claim 2, characterized in that the representative value of the quantization matrix used in the quantization process and the inverse quantization process for the block to be encoded and the representative value of the quantization matrix used in the quantization process and the inverse quantization process for the adjacent block are derived.
4. The filter control unit includes: an offset calculation unit that calculates an offset value for each of the encoding target block and the neighboring blocks based on the representative value derived by the representative value derivation unit; The encoding device according to claim 3, further comprising a threshold derivation unit that derives a threshold for controlling the filter strength based on the quantization parameter used in the quantization process and the inverse quantization process for the block to be encoded, the quantization parameter used in the quantization process and the inverse quantization process for the adjacent block, and the offset value calculated by the offset calculation unit.
5. an entropy coding unit that codes the transform coefficients generated by the transform / quantization unit and outputs a coded stream; the filter control unit controls a filter strength of the deblocking filter based on the quantization parameter and the quantization matrix used in the quantization process and the inverse quantization process, and an array of offset values defined for each of a plurality of quantization matrix candidates; The encoding device according to claim 1 , wherein the entropy encoding unit transmits the sequence by including it in the encoded stream.
6. The encoding device according to claim 5, characterized in that the filter control unit controls the filter strength based on the quantization parameter and the quantization matrix used in the quantization process and the inverse quantization process for the block to be encoded, and the quantization parameter and the quantization matrix used in the quantization process and the inverse quantization process for the adjacent block.
7. The filter control unit includes: The encoding device according to claim 6, further comprising an offset derivation unit that derives, based on the array, an offset value corresponding to the quantization matrix used in the quantization process and the inverse quantization process for the block to be encoded, and an offset value corresponding to the quantization matrix used in the quantization process and the inverse quantization process for the adjacent block.
8. The filter control unit includes: The encoding device according to claim 7, further comprising a threshold derivation unit that derives a threshold for controlling the filter strength based on the quantization parameter used in the quantization process and the inverse quantization process for the block to be encoded, the quantization parameter used in the quantization process and the inverse quantization process for the adjacent block, and the offset value derived by the offset derivation unit.
9. A decoding device that performs decoding on a block-by-block basis by dividing an image, an entropy decoding unit that decodes the encoded stream to output a transform coefficient corresponding to a block to be decoded; an inverse quantization and inverse transform unit that performs inverse quantization processing and inverse transform processing on the transform coefficients output by the entropy decoding unit to restore a prediction residual; a synthesis unit that synthesizes the reconstructed prediction residual and a prediction block generated by predicting the block to be decoded to reconstruct the block to be decoded; a deblocking filter that performs a filtering process on a boundary between the restored decoding target block and an adjacent block adjacent to the decoding target block; A filter control unit that controls a filter strength of the deblocking filter based on a quantization parameter and a quantization matrix used in the inverse quantization process, the quantization parameter is a parameter in which one value is set for one block, and the quantization matrix is a matrix of values set for each component in the one block; the filter control unit controls the filter strength based on a representative value of the quantization matrix; A decoding device characterized in that the representative value is a weighted average of multiple values that constitute only the low-frequency components of the quantization matrix, and in the weighting, the weight of one value among the multiple values that corresponds to the lowest frequency component of the quantization matrix is greater than the weight of the other values.
10. the entropy decoding unit further outputs an array including offset values defined for each of a plurality of quantization matrix candidates by decoding the encoded stream; 10. The decoding device according to claim 9, wherein the filter control unit controls a filter strength of the deblocking filter based on the quantization parameter and the quantization matrix used in the inverse quantization process, and the array.
11. The decoding device according to claim 10, characterized in that the filter control unit controls the filter strength based on the quantization parameter and the quantization matrix used in the inverse quantization process for the block to be decoded and the quantization parameter and the quantization matrix used in the inverse quantization process for the adjacent block.
12. The filter control unit includes: The decoding device according to claim 11, further comprising an offset derivation unit that derives, based on the array, an offset value corresponding to the quantization matrix used in the inverse quantization process for the block to be decoded and an offset value corresponding to the quantization matrix used in the inverse quantization process for the adjacent block.
13. The filter control unit includes: The decoding device according to claim 12, further comprising a threshold derivation unit that derives a threshold for controlling the filter strength based on the quantization parameter used in the inverse quantization process for the block to be decoded, the quantization parameter used in the inverse quantization process for the adjacent block, and the offset value derived by the offset derivation unit.
14. A program for causing a computer to function as the encoding device according to claim 1.
15. A program for causing a computer to function as the decoding device according to claim 9.
Citation Information
Patent Citations
Method and device of adaptive deblocking filtering using quantization matrix
JP2008182562A
Quantization matrix and deblocking filter adjustments for video coding
US20130259120A1
Image-processing device and method
WO2012165095A1
