Encoding device, decoding device, and program
By introducing filter control unit in VVC encoding and decoding devices, the application of deblocking filter is controlled according to the difference in weighted coefficients between blocks, and the visual degradation and coding efficiency reduction caused by inter-blocking discontinuity under weighted biprediction is solved, and image quality and coding efficiency are improved.
Patent Information
- Application Number
- JP2024074538
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-08-29
- Filing Date
- 2024-05-01
- Publication Date
- 2025-04-02
- Estimated Expiration
- 2040-08-28
AI Technical Summary
In VVC, when the weighted biprediction is applied to two adjacent blocks, if the weighted coefficients of each block are different, it will increase the discontinuity between blocks, which will lead to visual degradation and degradation of coding efficiency.
By introducing a filter control unit in the encoding and decoding device, the application of deblocking filter is controlled according to the weighting coefficients of each block, ensuring that the weighting coefficients between blocks are different, and the deblocking filter is appropriately applied to reduce discontinuity.
Effectively improve image quality and encoding efficiency, reducing visual degradation due to inter-block discontinuity.
Smart Images

Figure 0007656120000005 
Figure 0007656120000006 
Figure 0007656120000007
Abstract
Description
[Technical field]
[0001] The present invention relates to an encoding device, a decoding device, and a program. [Background technology]
[0002] In HEVC (High Efficiency Video Coding) and VVC (Versatile Video Coding), which is a next-generation coding method, a deblocking filter is adopted as a filter in a coding loop (for example, see Non-Patent Document 1). The deblocking filter is an in-loop filter for suppressing distortion at the boundary between blocks when coding is performed on a block-by-block basis.
[0003] The filter control unit that controls the deblocking filter applies a deblocking filter to a boundary portion between the two blocks when intra prediction is applied to at least one of two blocks consisting of a block to be coded and its adjacent block. When inter prediction is applied to both of the two adjacent blocks, the filter control unit determines whether to apply a deblocking filter to the boundary portion between the two blocks according to the values of the motion vectors of the two blocks and the degree of similarity of the reference destinations (reference images).
[0004] On the other hand, VVC is expected to adopt a weighted bi-prediction technology called BCW (Bi-prediction with CU-level Weight). Conventional bi-prediction generates a predicted image by simply averaging two reference images, but weighted bi-prediction generates a predicted image by taking a weighted average of two reference images. The weighting coefficients used for this weighted average are selected from a set of multiple predefined weighting coefficients. [Prior art documents] [Non-patent literature]
[0005] [Non-Patent Document 1] Recommendation ITU-T H.265,(12 / 2016), “High efficiency video coding”, International Telecommunication Union DISCLOSURE OF THEINVENTION
[0006] When inter prediction is applied to both of two adjacent blocks, even if the values of the motion vectors of the blocks and the references thereof are highly similar, the following problem may occur. Specifically, when weighted bi-prediction is applied to each block and the weighting coefficients applied to each block are different from each other, the discontinuity between the blocks becomes high, which may cause visual degradation.
[0007] Therefore, the present invention provides an encoding device, a decoding device, and a program that improve image quality and encoding efficiency by appropriately controlling a deblocking filter.
[0008] The coding device according to a first aspect is a coding device that performs coding on a block basis obtained by dividing an image, and includes: a prediction unit that performs a weighted average on a plurality of images using a weighting factor to generate a prediction block of a block to be coded; a transformation and quantization unit that performs a transformation process and a quantization process on a prediction residual that represents a difference between the block to be coded and the prediction block; an inverse quantization and inverse transform unit that performs an inverse quantization process and an inverse transform process on a transform coefficient obtained by the transformation and quantization unit to restore the prediction residual; a synthesis unit that synthesizes the restored prediction residual and the prediction block to restore the block to be coded; a deblocking filter that performs a filter process on a boundary portion between two blocks consisting of the restored block to be coded and an adjacent block; and a filter control unit that controls the deblocking filter based on the weighting factor applied to each of the two blocks by the prediction unit.
[0009] A decoding device according to a second aspect is a decoding device that performs decoding on a block-by-block basis obtained by dividing an image, and includes an entropy decoding unit that decodes an encoded stream and outputs quantized transform coefficients corresponding to a block to be decoded, an inverse quantization / 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 prediction unit that performs a weighted average on a plurality of images using a weighting factor to generate a prediction block of the block to be decoded, a synthesis unit that synthesizes the restored prediction residual and the prediction block to restore the block to be decoded, a deblocking filter that performs a filter processing on a boundary portion between two blocks consisting of the restored block to be decoded and an adjacent block, and a filter control unit that controls the deblocking filter based on the weighting factor applied to each of the two blocks by the prediction unit.
[0010] The program according to the third aspect causes a computer to function as the encoding device according to the first aspect.
[0011] The program according to the fourth aspect causes a computer to function as the decryption device according to the second aspect.
[0012] 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]
[0013] [Figure 1] FIG. 1 is a diagram illustrating a configuration of an encoding device according to an embodiment. [Diagram 2] FIG. 11 is a diagram illustrating an example of the operation of a deblocking filter according to the embodiment. [Diagram 3] 5A to 5C are diagrams for explaining a specific example of the operation of a filter control unit according to the embodiment. [Figure 4] FIG. 2 is a diagram illustrating a configuration of a decoding device according to an embodiment. [Diagram 5]FIG. 4 is a diagram illustrating an example of an operation flow of a filter control unit according to the embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0014] 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.
[0015] <Encoding device> 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.
[0016] 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.
[0017] 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).
[0018] The block division unit 100 divides the luminance signal and the chrominance signal into blocks. In the following, the case where the shape of the block division is the same for the luminance signal and the chrominance signal will be mainly described, but the division may be controlled independently for the luminance signal and the chrominance signal. When there is no particular distinction between the luminance block and the chrominance block, they are simply called the block to be coded.
[0019] 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.
[0020] 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.
[0021] 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 a discrete cosine transform (DCT), a discrete sine transform (DST), a Karhunen-Loeb transform (KLT), and transforms obtained by converting these to integers.
[0022] The quantization unit 122 quantizes the transform coefficients output from the transform unit 121 using a quantization parameter (Qp) and a quantization matrix, and outputs the quantized transform coefficients to the entropy coding unit 130 and the inverse quantization and inverse transform unit 140. Note that the quantization parameter (Qp) is a parameter commonly applied to each transform coefficient in a block, and is a parameter that determines the coarseness of quantization. The quantization matrix is a matrix having quantization values for quantizing each transform coefficient as elements.
[0023] The entropy coding unit 130 performs entropy coding on the transform coefficients output from the quantization unit 122, compresses the data to generate 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. The entropy coding unit 130 also obtains information on the size and shape of each coding target block from the block division unit 100, obtains information on prediction (for example, prediction mode and motion vector information) from the prediction unit 180, and codes these pieces of information.
[0024] 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.
[0025] 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 (Qp) and a quantization matrix, and outputs the restored transform coefficients to the inverse transform unit 142.
[0026] 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.
[0027] 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.
[0028] The deblocking filter 160 performs filtering on the boundary between two blocks (hereinafter referred to as a "target block pair") consisting of a reconstructed block and an adjacent block adjacent to the reconstructed block, and outputs the filtered reconstructed block to the memory 170. The filtering is a process for reducing signal degradation caused by block-by-block processing, and is a filtering process for smoothing signal gaps at the boundary between the target block pair. The deblocking filter 160 is generally configured as a low-pass filter that smoothes signal fluctuations.
[0029] The filter control unit 161 controls the deblocking filter 160. Specifically, the filter control unit 161 controls whether or not to perform a filter process on the target block pair, and the boundary strength (Bs: Boundary 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 the control of whether or not to set the boundary strength Bs to 1 or more, or to zero.
[0030] 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). The operation of the filter control unit 161 will be described in detail later.
[0031] 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.
[0032] 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.
[0033] 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.
[0034] In this embodiment, the inter prediction unit 181 has a weighted bi-prediction unit 181a that generates an inter prediction block by taking a weighted average of two reference images. The weighting coefficient used for this weighting average is selected from a set of multiple weighting coefficients defined in advance. Specifically, when one reference image is "P0", the other reference image is "P1", and the weighting coefficient is "w", the weighted bi-prediction unit 181a generates an inter prediction block by the following formula (1).
[0035]
number
[0036] Here, the weighting factor “w” is selected from the set consisting of −2, 2, 4, 6, and 10. Such weighted bi-prediction can improve prediction accuracy compared to conventional bi-prediction, in which an inter-predicted block is generated by simply averaging two reference pictures.
[0037] 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.
[0038] 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.
[0039] As described above, the encoding device 1 according to this embodiment includes a weighted bi-prediction unit 181a that performs weighted averaging on a plurality of reference images using a weighting factor selected from a weighting factor set consisting of a plurality of weighting factors to generate a prediction block of a block to be encoded, a transform / quantization unit 120 that performs transformation processing and quantization processing on a prediction residual representing the difference between the block to be encoded and the prediction block, 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 120 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, and a deblocking filter 160 that performs filtering processing on the boundary portion between two blocks consisting of the restored block to be encoded and an adjacent block.
[0040] Next, the operation of the deblocking filter 160 and the filter control unit 161 according to this embodiment will be described. Fig. 2 is a diagram showing an example of the operation of the deblocking filter 160 according to this embodiment. In Fig. 2, a block Q is a reconstructed block corresponding to the block to be coded, and a block P is a reconstructed block adjacent to this block Q.
[0041] 2, the block size on which the deblocking filter 160 performs filtering is 8×8 pixels. The filter control unit 161 obtains the boundary strength Bs based on, for example, the following Table 1. In this embodiment, the value of the boundary strength Bs is set to 0, 1, or 2.
[0042] [Table 1]
[0043] As shown in FIG. 2 and Table 1, when intra prediction is applied to at least one of blocks P and Q, the filter control unit 161 sets the value of Bs to 2.
[0044] On the other hand, the filter control unit 161 sets the Bs value to 1 if motion compensation prediction (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.
[0045] (a) At least one of blocks P and Q contains significant transform coefficients (i.e., non-zero transform coefficients).
[0046] (b) The number of motion vectors or reference pictures of blocks P and Q are different.
[0047] (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).
[0048] (d) The weighting coefficients for weighted bi-prediction of blocks P and Q are different.
[0049] In the motion compensation prediction of the present invention, a decoded frame in the past or future can be used as a reference image based on the frame to be coded. For example, when the two reference pixels used in bi-prediction for generating predicted images of block P and block Q are P0, P1, and Q0 and Q1, respectively, P0 and Q0 may refer to a decoded frame in the past, and P1 and Q1 may refer to a decoded frame in the future. In such a case, as described above, the Bs value is determined based on the values of the motion vectors and the degree of match of the references that generate the predicted block (Pbi-pred) of block P by bi-prediction and the predicted block (Qbi-pred) of block Q by bi-prediction, and whether the weighting coefficients used to generate Pbi-pred and Qbi-pred match.
[0050] On the other hand, even if the motion vectors of P0 and Q0, P1 and Q1 point to different reference destinations, such as when P0 and Q1 refer to past decoded frames and P1 and Q0 refer to future decoded frames, or when P1 and Q0 refer to past decoded frames and P0 and Q1 refer to future decoded frames, the following processing may be performed. Specifically, when the motion vector values of P0 and Q1 and the reference destinations are highly consistent and the motion vector values of P1 and Q0 and the reference destinations are highly consistent, the Bs value may be determined according to whether the weighting coefficient used in generating the predicted image of the block P and the weighting coefficient used in generating the predicted image of the block Q satisfy a certain condition.
[0051] For example, even if the weighting factor Wp used in generating the predicted image of block P is 2 and the weighting factor Wq used in generating the predicted image of block Q is 6, if the values of the motion vectors of P1 and Q0 and the degree of matching of the reference destinations are high, Wp=8-Wq If the above condition is satisfied, the Bs value is set to 0.
[0052] The weight flags indicating the weight coefficients w=-2, 2, 4, 6, 10 may be assigned as 0, 1, 2, 3, 4, respectively. Specifically, when Wp is 2, the weight flag Fp of block P is 1. On the other hand, when Wq is 6, the weight flag Fq of block Q is 3. In this manner, the weight coefficients applied to each block are represented using the weight flags from 0 to 4 as described above. When assigning flags indicating weight coefficients in this manner, the Bs value is determined based on the flags assigned to blocks P and Q.
[0053] For example, if the motion vector values and reference destinations of P0 and Q0, and P1 and Q1 have a high degree of coincidence, and the values of the flags Fp and Fq corresponding to the weights Wp and Wq applied to the respective blocks are the same, the value of Bs is set to 0. On the other hand, if the motion vector values and reference destinations of P0 and Q1, and P1 and Q0 have a high degree of coincidence, and the values of Fp and Fq are Fp = N-1-Fq If this condition is satisfied, the Bs value is set to 0. Here, N is the number of selectable flags, which is 5 in the above example.
[0054] The filter control unit 161 controls the deblocking filter 160 so as not to perform filtering when the value of the boundary strength Bs is 0. Below, a description will be given taking the vertical block boundary shown in FIG.
[0055] When the value of the boundary strength Bs is 1 or 2, the filter control unit 161 may control the deblocking filter 160 to perform filtering only when the following formula (1) is satisfied.
[0056]
number
[0057] When performing filtering, the filter control section 161 may apply a strong filter when all of the following conditional expressions (2) to (7) are satisfied, and may apply a weak filter in other cases.
[0058]
number
[0059] However, the thresholds β and t C The value of is the average value Q of the quantization parameters of adjacent blocks P and Q. av It depends on the.
[0060] In this way, the filter control unit 161 according to this embodiment controls the deblocking filter 160 not to perform filtering based on the weighting factor applied to one of the blocks P and Q being the same as the weighting factor applied to the other of the blocks P and Q, as in (d) above. On the other hand, the filter control unit 161 according to this embodiment controls the deblocking filter 160 to perform filtering based on the weighting factor applied to one of the blocks P and Q being different from the weighting factor applied to the other of the blocks P and Q.
[0061] As a result, when inter-prediction is applied to both of two adjacent blocks, when weighted bi-prediction is applied to each block, and when the weighting coefficients applied to each block are different, visual degradation caused by discontinuity between blocks can be suppressed by applying filtering processing by deblocking filter 160.
[0062] Next, a specific example of the operation of filter control section 161 according to the present embodiment will be described. Fig. 3 is a diagram for explaining a specific example of the operation of filter control section 161 according to the present embodiment.
[0063] As shown in Figure 3, it is assumed that the predictions applied to blocks P and Q are both bi-predictive, and that neither blocks P nor Q contain any non-zero transform coefficients.
[0064] The two motion vectors used by block P for bi-prediction are P0 and P1. The two motion vectors used by block Q for bi-prediction are Q0 and Q1. P0 and Q0 refer to the same frame, and P1 and Q1 refer to the same frame. In addition, the difference between the values of the motion vectors of P0 and Q0 is equal to or less than a threshold, and the difference between the values of the motion vectors of P1 and Q1 is equal to or less than a threshold.
[0065] In such a case, none of the above conditions (a) to (c) is satisfied. However, if weighted bi-prediction is applied to blocks P and Q and the weighting factor “w” applied to each block is different, discontinuity may occur between blocks P and Q.
[0066] In this embodiment, the above condition (d) is newly introduced. Therefore, even if none of the above conditions (a) to (c) are satisfied, if the above condition (d) is satisfied, the Bs value can be set to 1 to control the deblocking filter 160 to perform filtering.
[0067] <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. 4 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.
[0068] As shown in FIG. 4, 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.
[0069] The entropy decoding unit 200 decodes the coded stream generated by the coding device 1, and decodes various kinds of signaling information. Specifically, the entropy decoding unit 200 obtains information on the prediction applied to the current 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.
[0070] 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).
[0071] 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.
[0072] 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 (Qp) and a quantization matrix, and outputs the restored transform coefficients to the inverse transform unit 212.
[0073] 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.
[0074] 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.
[0075] 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 current blocks, which is made up 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.
[0076] 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 a boundary strength Bs, for example, by the method shown in Table 1, and controls the deblocking filter 230 according to the selected boundary strength Bs.
[0077] 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.
[0078] 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.
[0079] 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.
[0080] In this embodiment, the inter prediction unit 251 includes a weighted bi-prediction unit 251a that generates an inter prediction block by taking a weighted average of two reference images. The weighted bi-prediction unit 251a generates the inter prediction block by the above formula (1).
[0081] 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.
[0082] 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 .
[0083] As described above, the decoding device 2 according to this embodiment includes an entropy decoding unit 200 that decodes an encoded stream and outputs quantized transform coefficients corresponding to a block to be decoded, an inverse quantization / inverse transform unit 210 that performs inverse quantization and inverse transform processing on the transform coefficients output by the entropy decoding unit 200 to restore a prediction residual, a weighted bi-prediction unit 251a that performs weighted averaging on a plurality of reference images using a weighting factor selected from a weighting factor set consisting of a plurality of weighting factors to generate a prediction block for the block to be decoded, a synthesis unit 220 that synthesizes the restored prediction residual and the prediction block to restore the block to be decoded, and a deblocking filter 230 that performs filtering on the boundary portion between two blocks consisting of the restored block to be decoded and an adjacent block.
[0084] Here, the filter control unit 231 performs the operation as shown in Fig. 3. That is, even if none of the above conditions (a) to (c) are satisfied, when the above condition (d) is satisfied, the filter control unit 231 sets the Bs value to 1. This makes it possible to control the deblocking filter 160 to perform filtering when the weighting coefficients of the weighted bi-prediction of the blocks P and Q are different.
[0085] <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. 5 is a diagram showing an example of the operation flow of the filter control section 231 according to this embodiment.
[0086] 5, in step S1, the filter control unit 231 determines whether or not intra prediction is applied to at least one of the current block pair consisting of blocks P and Q. If intra prediction is applied to at least one of the current block pair (step S1: YES), in step S2, the filter control unit 231 controls the deblocking filter 230 to perform filtering. Specifically, the filter control unit 231 selects boundary strength Bs=2.
[0087] If intra prediction is not applied to either of the current block pair (step S1: NO), that is, if inter prediction is applied to both of the current block pair, in step S3, the filter control unit 231 determines whether or not at least one of the current block pair includes a non-zero transform coefficient. If at least one of the current block pair includes a non-zero transform coefficient (step S3: YES), in step S4, the filter control unit 231 controls the deblocking filter 230 to perform a filter process. Specifically, the filter control unit 231 selects a boundary strength Bs=1.
[0088] If none of the target block pair includes a non-zero transform coefficient (step S3: NO), that is, if the prediction block is used as the restored block as is, in step S5, the filter control unit 231 determines whether the number of motion vectors and the reference image (reference destination frame) of the target block pair are different. If the number of motion vectors and the reference image of the target block pair are different (step S5: YES), in step S4, the filter control unit 231 controls the deblocking filter 230 to perform a filter process. Specifically, the filter control unit 231 selects a boundary strength Bs=1.
[0089] If the number of motion vectors and the reference image of the target block pair are the same (step S5: NO), in step S6, the filter control unit 231 determines whether the difference between the motion vectors of the target block pair is equal to or greater than a threshold. If the difference between the motion vectors of the target block pair is equal to or greater than a threshold (step S6: YES), in step S4, the filter control unit 231 controls the deblocking filter 230 to perform a filtering process. Specifically, the filter control unit 231 selects a boundary strength Bs=1.
[0090] If the difference between the motion vectors of the target block pair is less than the threshold (step S6: NO), for example, if the values of the motion vectors of the target block pair are the same, in step S7, the filter control unit 231 determines whether the weighting coefficients "w" of the weighted bi-prediction of the target block pair are different. If the weighting coefficients "w" of the weighted bi-prediction of the target block pair are different (step S7: YES), in step S4, the filter control unit 231 controls the deblocking filter 230 to perform a filter process. Specifically, the filter control unit 231 selects boundary strength Bs=1.
[0091] On the other hand, if the weighting coefficients “w” of the weighted bi-prediction of the current block pair are the same (step S7: NO), in step S8, the filter control unit 231 controls the deblocking filter 230 not to perform filtering. Specifically, the filter control unit 231 selects boundary strength Bs=0.
[0092] <Other embodiments> 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.
[0093] 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).
[0094] 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.
[0095] This application claims priority to Japanese Patent Application No. 2019-157240 (filed August 29, 2019), the entire contents of which are incorporated herein by reference.
Claims
1. An encoding device that encodes an image in units of blocks obtained by dividing the image, a prediction unit that performs weighted averaging on a plurality of images using a weighting coefficient to generate a predicted block of a block to be coded; a transform / quantization unit that performs a transform process and a quantization process on a prediction residual that represents a difference between the encoding target block and the prediction block; an inverse quantization and inverse transform unit that performs an inverse quantization process and an inverse transform process on the transform coefficients obtained by the transform and quantization unit to restore the prediction residual; a synthesis unit that synthesizes the reconstructed prediction residual and the predicted block to reconstruct the encoding target block; a deblocking filter that performs a filter process on a boundary portion between the restored encoding target block and an adjacent block; and a filter control unit that controls the deblocking filter based on the weighting coefficients applied by the prediction unit to each of the two blocks.
2. The encoding device according to claim 1, characterized in that the filter control unit controls the deblocking filter based on whether the weighting factor applied to one of the two blocks is the same as the weighting factor applied to the other of the two blocks.
3. The filter control unit includes: controlling the deblocking filter so as not to perform the filtering process based on the weighting factor applied to one of the two blocks being equal to the weighting factor applied to the other of the two blocks; The encoding device according to claim 2, characterized in that the deblocking filter is controlled to perform the filtering process based on the difference between the weighting factor applied to one of the two blocks and the weighting factor applied to the other of the two blocks.
4. 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 quantized 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 prediction unit that performs a weighted average on a plurality of images using a weighting coefficient to generate a prediction block of the block to be decoded; a synthesis unit that synthesizes the reconstructed prediction residual and the predicted block to reconstruct the block to be decoded; a deblocking filter that performs a filter process on a boundary portion between the restored decoding target block and an adjacent block; A decoding device comprising: a filter control unit that controls the deblocking filter based on the weighting coefficients applied by the prediction unit to each of the two blocks.
5. The decoding device according to claim 4, characterized in that the filter control unit controls the deblocking filter based on whether the weighting factor applied to one of the two blocks is the same as the weighting factor applied to the other of the two blocks.
6. The filter control unit includes: controlling the deblocking filter so as not to perform the filtering process based on the weighting factor applied to one of the two blocks being equal to the weighting factor applied to the other of the two blocks; The decoding device according to claim 5, characterized in that the deblocking filter is controlled to perform the filtering process based on the difference between the weighting factor applied to one of the two blocks and the weighting factor applied to the other of the two blocks.
7. A program for causing a computer to function as the encoding device according to claim 1.
8. A program for causing a computer to function as the decoding device according to claim 4.
Citation Information
Patent Citations
Image processing device and image processing method
WO2018123444A1