Method and device for encoding / decoding video and machine-readable data media
The method addresses the inefficiencies in high-definition video compression by optimizing merge candidates and redundancy control, enhancing inter-image prediction and overall encoding/decoding performance.
Patent Information
- Authority / Receiving Office
- RU · RU
- Patent Type
- Patents
- Current Assignee / Owner
- GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
- Filing Date
- 2024-05-14
- Publication Date
- 2026-07-07
AI Technical Summary
The increasing data volume associated with high-definition video services poses a challenge for efficient video compression, as existing standards like HEVC are showing limitations in performance.
A method for obtaining and managing merge candidates using motion information lists to improve prediction efficiency in video encoding and decoding, including redundancy control and block merging processes.
Enhances the performance of inter-image prediction by simplifying redundancy control and improving the efficiency of video encoding and decoding processes.
Smart Images

Figure 00000011_ABST
Abstract
Description
FIELD OF TECHNOLOGY TO WHICH THE INVENTION RELATES
[0001] The present invention relates to methods and devices for encoding and decoding video, as well as to a machine-readable storage medium. BACKGROUND OF THE INVENTION
[0002] As display panels become larger, more and higher quality video services are required. The biggest challenge for high-definition video services is the significant increase in data volume, and to address this problem, research into improving the video compression ratio has been actively conducted. As an illustrative example, the Motion Picture Experts Group (MPEG) and the Video Coding Experts Group (VCEG) within the Telecommunication Standardization Sector of the International Telecommunication Union (ITU-T) formed the Joint Team on Video Coding (JCT-VC) in 2009. JCT-VC proposed High Efficiency Video Coding (HEVC), which is a video compression standard with a compression efficiency approximately twice that of H.264 / AVC, and it was approved as a standard on January 25, 2013. With the rapid development of high-definition video services, the efficiency of HEVC is gradually revealing its limitations. SUMMARY OF THE INVENTION
[0003] The object of the present invention is to provide a method for obtaining a merging candidate using a list of motion information of a prediction section and an apparatus for performing the method in encoding / decoding a video signal.
[0004] Another object of the present invention is to provide a redundancy control method comprising checking the redundancy between a merging candidate of a prediction section included in a motion information list of the prediction section and a merging candidate included in a merging candidate list, when encoding / decoding a video signal.
[0005] Another object of the present invention is to provide a method for obtaining merging candidates of blocks included in a merging processing region, and an apparatus for performing the method in encoding / decoding a video signal.
[0006] The technical problems to be solved by the present invention are not limited to the technical problems mentioned above, and other problems not mentioned can be clearly understood by those skilled in the art from the following description.
[0007] In a first aspect of the present invention, a video decoding method is provided, comprising the following steps: obtaining a merge candidate for a current block; adding the obtained merge candidate to a merge candidate list; adding at least one prediction section merge candidate included in a prediction section motion information list to the merge candidate list when the number of merge candidates added to the merge candidate list is less than a first threshold; wherein an index of the at least one prediction section merge candidate is greater than or equal to the difference between the number of prediction section merge candidates included in the prediction section merge candidate list and the second threshold;and whether to add a merging candidate of a prediction section from at least one merging candidate of a prediction section to a merging candidate list is determined based on a comparison result between motion information of the merging candidate of the prediction section and motion information of a merging candidate included in the merging candidate list; obtaining motion information for a current block based on the merging candidate list; and performing motion compensation for the current block based on the obtained motion information.
[0008] In a preferred embodiment, the comparison is performed with respect to at least one merge candidate in the merge candidate list whose index is less than or equal to a third threshold value.
[0009] In a preferred embodiment, the comparison is performed with respect to at least one of a merge candidate obtained from a left neighboring block located on the left side of the current block and a merge candidate obtained from an upper neighboring block located on top of the current block.
[0010] In a preferred embodiment, when determining that there is a merge candidate having motion information that is the same as the motion information of the first merge candidate of the prediction section, the first merge candidate of the prediction section is not added to the merge candidate list, and whether to add the second merge candidate of the prediction section to the merge candidate list is determined based on a comparison result between the motion information of the second merge candidate of the prediction section included in the motion information list of the prediction section and the motion information of the merge candidate included in the merge candidate list.
[0011] In a preferred embodiment, the method further comprises: when determining that the neighboring block of the current block is not included in the predetermined portion, adding a merging candidate of the prediction portion obtained based on the motion information of the neighboring block to the motion information list of the prediction portion; or when determining that the neighboring block is included in the predetermined portion, excluding adding the merging candidate of the prediction portion obtained based on the motion information of the neighboring block to the motion information list of the prediction portion, wherein the predetermined portion is a merging processing region.
[0012] In a preferred embodiment, the method further comprises: adding a merging candidate of a prediction section obtained based on the motion information of a neighboring block included in the motion information list of the prediction section to the merging candidate list when the number of merging candidates added to the merging candidate list is less than a first threshold value.
[0013] In a preferred embodiment, the method further comprises: when the size of the neighboring block of the current block is not less than a predetermined size, adding a merging candidate of the prediction section obtained based on the motion information of the neighboring block to the motion information list of the prediction section; or when the size of the neighboring block is less than a predetermined size, excluding adding a merging candidate of the prediction section obtained based on the motion information of the neighboring block to the motion information list of the prediction section.
[0014] In a preferred embodiment, the method further comprises: adding a merging candidate of a prediction section obtained based on the motion information of a neighboring block included in the motion information list of the prediction section to the merging candidate list when the number of merging candidates added to the merging candidate list is less than a first threshold value.
[0015] A second aspect of the present invention provides a video encoding method, comprising the following steps: obtaining a merge candidate for a current block; adding the obtained merge candidate to a merge candidate list; adding at least one prediction section merge candidate included in a prediction section motion information list to the merge candidate list when the number of merge candidates added to the merge candidate list is less than a first threshold; wherein an index of the at least one prediction section merge candidate is greater than or equal to the difference between the number of prediction section merge candidates included in the prediction section merge candidate list and the second threshold;and whether to add a merging candidate of a prediction section from at least one merging candidate of a prediction section to a merging candidate list is determined based on a comparison result between motion information of the merging candidate of the prediction section and motion information of a merging candidate included in the merging candidate list; obtaining motion information for a current block based on the merging candidate list; and performing motion compensation for the current block based on the obtained motion information.
[0016] In a preferred embodiment, the comparison is performed with respect to at least one merge candidate in the merge candidate list whose index is less than or equal to a third threshold value.
[0017] In a preferred embodiment, the comparison is performed with respect to at least one of a merge candidate obtained from a left neighboring block located on the left side of the current block and a merge candidate obtained from an upper neighboring block located on top of the current block.
[0018] In a preferred embodiment, when determining that there is a merge candidate in the merge candidate list having motion information that is the same as the motion information of the first merge candidate of the prediction section, the first merge candidate of the prediction section is not added to the merge candidate list, and whether to add the second merge candidate of the prediction section to the merge candidate list is determined based on a comparison result between the motion information of the second merge candidate of the prediction section included in the motion information list of the prediction section and the motion information of the merge candidate included in the merge candidate list.
[0019] In a preferred embodiment, the method further comprises: when determining that the neighboring block of the current block is not included in the predetermined portion, adding a merging candidate of the prediction portion obtained based on the motion information of the neighboring block to the motion information list of the prediction portion; or when determining that the neighboring block is included in the predetermined portion, excluding adding the merging candidate of the prediction portion obtained based on the motion information of the neighboring block to the motion information list of the prediction portion, wherein the predetermined portion is a merging processing region.
[0020] In a preferred embodiment, the method further comprises: adding a merging candidate of a prediction section obtained based on the motion information of a neighboring block included in the motion information list of the prediction section to the merging candidate list when the number of merging candidates added to the merging candidate list is less than a first threshold value.
[0021] In a preferred embodiment, the method further comprises: when the size of the neighboring block of the current block is not less than a predetermined size, adding a candidate for merging the prediction section obtained based on the motion information of the neighboring block to the list of motion information of the prediction section; or when the size of the neighboring block is less than a predetermined size, excluding adding a candidate for merging the prediction section obtained based on the motion information of the neighboring block to the list of motion information of the prediction section.
[0022] In a preferred embodiment, the method further comprises: adding a merging candidate of a prediction section obtained based on the motion information of a neighboring block included in the motion information list of the prediction section to the merging candidate list when the number of merging candidates added to the merging candidate list is less than a first threshold value.
[0023] In a third embodiment, a video decoding device is provided that includes a storage device, and the storage device includes software instructions for executing the above decoding method.
[0024] In a fourth embodiment, a video encoding device is provided that includes a storage device, and the storage device includes software instructions for executing the above encoding method.
[0025] In a fifth embodiment, a machine-readable storage medium is provided that contains a computer program and a bit stream stored thereon, wherein the computer program, when executed by a processor, enables the processor to perform the steps of the above-mentioned video encoding method to generate the bit stream.
[0026] The features briefly outlined above with respect to the present invention are merely illustrative aspects of the detailed description of the present invention that will be described below and do not limit the scope of the present invention.
[0027] According to the present invention, the performance of prediction performed between images can be improved by providing a method for obtaining a fusion candidate using a list of motion information of a prediction section.
[0028] According to the present invention, the performance of inter-image prediction can be improved by simplifying the redundancy control between a prediction region fusion candidate and a fusion candidate.
[0029] According to the present invention, the performance of prediction performed between images can be improved by providing a method for obtaining merging candidates of blocks included in a merging processing region.
[0030] The effects that can be obtained from the present invention are not limited to the above-mentioned effects, and other effects not mentioned can be clearly understood by those skilled in the art from the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Fig. 1 is a block diagram showing a video encoder according to one embodiment of the present invention.
[0032] Fig. 2 is a block diagram showing a video decoder according to one embodiment of the present invention.
[0033] Fig. 3 is a view showing a basic element of a coding tree according to one embodiment of the present invention.
[0034] Fig. 4 is a view showing various types of coding block partitioning.
[0035] Fig. 5 is a view showing the partitioning diagram of a code tree element.
[0036] Fig. 6 is a flowchart showing a prediction method performed between images according to one embodiment of the present invention.
[0037] Fig. 7 is a view showing the nonlinear motion of an object.
[0038] Fig. 8 is a flowchart showing a method for prediction performed between images based on affine motion according to one embodiment of the present invention.
[0039] Fig. 9 is a view showing an example of the affine source vectors of each affine motion model.
[0040] Fig. 10 is a view showing an example of affine vectors of sub-blocks in a 4-parameter motion model.
[0041] Fig. 11 is a flowchart showing the process of obtaining the movement information of the current block using the merge mode.
[0042] Fig. 12 is a view showing an example of candidate blocks used to obtain a merge candidate.
[0043] Fig. 13 is a view showing the positions of reference samples.
[0044] Fig. 14 is a view showing an example of candidate blocks used to obtain a merge candidate.
[0045] Fig. 15 is a view showing an example in which the position of the reference count is changed.
[0046] Fig. 16 is a view showing an example in which the position of the reference count is changed.
[0047] Fig. 17 is a flowchart showing the process of updating the prediction section motion information list.
[0048] Fig. 18 is a view showing an embodiment of updating the list of candidates for merging a prediction section.
[0049] Fig. 19 is a view showing an example in which the index of a previously stored prediction region merge candidate is updated.
[0050] Fig. 20 is a view showing the position of an illustrative sub-block.
[0051] Fig. 21 is a view showing an example in which a list of prediction section motion information is generated for each prediction mode performed between images.
[0052] Fig. 22 is a view showing an example in which a prediction section merge candidate included in the long-term motion information list is added to the merge candidate list.
[0053] Fig. 23 is a view showing an example in which redundancy control is performed only with respect to some merge candidates.
[0054] Fig. 24 is a view showing an example in which redundancy control is omitted for a specific merge candidate.
[0055] Fig. 25 is a view showing an example in which candidate blocks included in the same merge processing area as the current block are set to be unavailable as a merge candidate.
[0056] Fig. 26 is a view showing a temporary list of traffic information.
[0057] Fig. 27 is a view showing an example of merging the prediction section motion information list and the time motion information list.
[0058] Fig. 28 and 29 are views showing an example in which a coding section merge candidate contains block address information.
[0059] Fig. 30 and 31 are views showing an example in which a merging candidate of a coding section having address information that is the same as the address information of the current block is set to be unavailable as a merging candidate of the current block.DETAILED DESCRIPTION
[0060] Next, an embodiment of the present invention will be described in detail with reference to the accompanying drawings.
[0061] Video encoding and decoding are performed by a block element. For example, encoding / decoding processes such as transform, quantization, prediction, loop filtering, reconstruction, etc. can be performed on a coding block, transform block, or prediction block.
[0062] Hereinafter, the block to be encoded / decoded will be referred to as the "current block." For example, the current block may represent a coding block, a transform block, or a prediction block according to the current stage of the encoding / decoding process.
[0063] Furthermore, it should be understood that the term "element" used in this description denotes a basic unit for performing a specific encoding / decoding process, and the term "block" denotes an array of samples of a predetermined size. Unless otherwise specified, "block" and "element" may be used with the same meaning. For example, in the embodiment described below, it should be understood that coding block and coding element have the same meaning.
[0064] Fig. 1 is a block diagram showing a video encoder according to one embodiment of the present invention.
[0065] As shown in Fig. 1, the video encoding device 100 may include a part 110 for splitting images, parts 120 and 125 for predicting, a part 130 for transforming, a part 135 for quantizing, a part 160 for permuting, a part 165 for entropy encoding, a part 140 for inverse quantization, a part 145 for inverse transforming, a part 150 for filtering, and a memory device 155.
[0066] Each of the components shown in Fig. 1 is shown independently to represent characteristic functions that differ from each other in the video encoding device, but this does not mean that each component is formed by a configuration element of separate hardware or a single software. That is, each component is included in the list as a component for the convenience of explanation, and at least two of the components can be combined to form a single component, or one component can be divided into multiple components to perform the function. Embodiments with combining and embodiments with separating components are also included in the scope of the present invention if they do not depart from the essence of the present invention.
[0067] Furthermore, some of the components are not essential components that perform the main functions of the present invention, but may be optional components only for improving efficiency. The present invention can be realized by including only the components necessary to realize the essence of the present invention, excluding the components used to improve efficiency. A structure containing only the necessary components, excluding the optional components used to improve efficiency, is also included within the scope of the present invention.
[0068] The image partitioning part 110 may partition an input image into at least one processing element. In this case, the processing element may be a prediction unit (PU), a transformation unit (TU), or a coding unit (CU). The image partitioning part 110 may partition the image into a set consisting of a plurality of coding units, prediction units, and transformation units, and encode the image by selecting the set of coding units, prediction units, and transformation units based on a predetermined criterion (for example, a cost function).
[0069] For example, a single image can be partitioned into multiple coding units. A recursive tree structure, such as a quaternary tree structure, can be used to partition the coding units in the image. A coding unit partitioned into different coding units using the video or the largest coding unit as the root can be partitioned to have the same number of child nodes as the number of partitioned coding units. A coding unit that can no longer be partitioned according to the predefined constraint becomes a leaf node. That is, if only a square partition is assumed for a single coding unit, a single coding unit can be partitioned into no more than four different coding units.
[0070] Further, in the embodiment of the present invention, the coding element may be used in the value of an element that performs encoding or in the value of an element that performs decoding.
[0071] The prediction element may be an element divided into the shape of at least one square, rectangle, etc. of the same size within one coding element, or it may be any prediction element of the prediction elements divided within one coding element that is divided so that it has a shape and / or size different from those of another prediction element.
[0072] If a coding unit is not the smallest coding unit, when a prediction unit that performs intra prediction based on the coding unit is generated, intra prediction may be performed without dividing the image into a plurality of N × N prediction units.
[0073] The prediction portions 120 and 125 may comprise an inter-image prediction portion 120 that performs inter-image prediction, and an intra-prediction portion 125 that performs intra-prediction. It may be determined whether to use inter-image prediction or perform intra-prediction for a prediction element, and specific information (e.g., an intra-prediction mode, a motion vector, a reference image, etc.) may be determined according to each prediction method. In this case, the prediction processing element may differ from the prediction method and specific content determining processing element. For example, the prediction method and the prediction mode may be determined in the prediction element, and the prediction may be performed in the transformation element.The residual coefficient (residual block) between the generated prediction block and the original block can be input into the transform section 130. Furthermore, the prediction mode information, motion vector information, and the like used for prediction can be encoded by the entropy encoding section 165 along with the residual coefficient and transmitted to the decoder. When a specific encoding mode is used, the original block can be encoded as is and transmitted to the decoder without generating a prediction block by the prediction sections 120 and 125.
[0074] The inter-picture prediction portion 120 can predict a prediction element based on information about at least one image from images before or after the current image, and in some cases, it can predict a prediction element based on information about a partial region encoded in the current image. The inter-picture prediction portion 120 can comprise a reference image interpolation portion, a motion prediction portion, and a motion compensation portion.
[0075] The reference image interpolation portion can receive reference image information from the memory 155 and generate sample information for an integer number of samples or less from the reference image. In the case of a luminance sample, an 8-tap DCT-based interpolation filter with a variable filtering coefficient can be used to generate sample information for an integer number of samples or less through an element consisting of 1 / 4 samples. In the case of a color-difference signal, a 4-tap DCT-based interpolation filter with a variable filtering coefficient can be used to generate sample information for an integer number of samples or less through an element consisting of 1 / 8 samples.
[0076] The motion prediction portion can perform motion prediction based on the reference image interpolated by the reference image interpolation portion. Various methods, such as the full-search block matching algorithm (FBMA), three-stage search (TSS), new three-stage search (NTS), etc., can be used as the motion vector calculation method. The motion vector may have a motion vector value in the form of an element consisting of 1 / 2 or 1 / 4 samples, based on the interpolated samples. The motion prediction portion can predict the current prediction element by changing the motion prediction method. Various methods, such as the skip method, the fusion method, the advanced motion vector prediction (AMVP) method, the intra-block copy method, etc., can be used as the motion prediction method.
[0077] The intra-prediction part 125 can generate a prediction element based on reference sample information located around the current block, which is sample information in the current image. When the block located near the current prediction element is a block on which inter-image prediction has been performed, and thus the reference sample is a sample on which inter-image prediction has been performed, the reference sample included in the block on which inter-image prediction has been performed can be used in place of the reference sample information of the nearby block on which intra-prediction has been performed.That is, when a reference sample is unavailable, at least one reference sample from the available reference samples may be used instead of the unavailable reference sample information.
[0078] In intra prediction, the prediction mode may include a prediction mode based on angle information, which uses reference sample information according to the prediction direction, and a prediction mode not based on angle information, which does not use direction information when performing prediction. The mode for predicting luminance information may differ from the mode for predicting color difference information, and the information of the intra prediction mode used to predict luminance information or predicted luminance signal information may be used to predict color difference information.
[0079] If the prediction unit size is the same as the transform unit size, intra-prediction can be performed for the prediction unit based on the left-hand sample, the upper-left sample, and the upper-left sample of the prediction unit when performing intra-prediction. However, if the prediction unit size differs from the transform unit size when performing intra-prediction, intra-prediction can be performed using a reference sample based on the transform unit. Furthermore, intra-prediction using N×N partitioning can only be used for the smallest coding unit.
[0080] Using the intra-prediction method, a prediction block can be generated after applying an adaptive intra-smoothing (AIS) filter to a reference sample according to the prediction mode. The type of AIS filter applied to the reference sample can be varied. To perform the intra-prediction method, the intra-prediction mode of the current prediction unit can be predicted from the intra-prediction mode of a prediction unit existing near the current prediction unit.When the prediction mode of the current prediction element is predicted using the mode information predicted from the neighboring prediction element, if the intra prediction modes of the current prediction element are the same as the nearby prediction element, then information indicating that the prediction modes of the current prediction element are the same as the nearby prediction element can be transmitted using the predetermined flag information, and if the prediction modes of the current prediction element and the nearby prediction element differ from each other, the prediction mode information of the current block can be encoded by performing entropy encoding.
[0081] Furthermore, a residual block may be generated containing a prediction element that has made a prediction based on the prediction element generated by the prediction portions 120 and 125, and residual coefficient information that represents the difference value of the prediction element from the original block. The generated residual block may be input to the transformation portion 130.
[0082] The transforming part 130 can transform the residual block containing the original block and the residual coefficient information of the prediction unit generated by the prediction parts 120 and 125 using a transforming method such as a discrete cosine transform (DCT) or a discrete sine transform (DST). In this case, the DCT transforming basis comprises at least one of DCT2 or DCT8, and the DST transforming basis comprises DST7. The application of DCT or DST to transform the residual block can be determined based on the intra-prediction mode information of the prediction unit used to generate the residual block. The transforming of the residual block can be skipped. A flag indicating whether to skip the transforming of the residual block can be encoded.Skipping the transform may be allowed for a residual block having a size that is less than or equal to a threshold value, either of the luma component or of the chroma component in 4:4:4 format.
[0083] Quantization part 135 may quantize the values converted into the frequency domain by transformation part 130. The quantization coefficients may vary depending on the block or importance of the video. The value calculated by quantization part 135 may be provided to inverse quantization part 140 and permutation part 160.
[0084] The permutation part 160 may perform permutation of the coefficient values for the quantized residual coefficients.
[0085] The permutation portion 160 can change the coefficients of the two-dimensional block shape into a one-dimensional vector shape using a coefficient scanning method. For example, the permutation portion 160 can scan from the DC coefficients to the high-frequency domain coefficients using a zigzag scanning method and change the coefficients into a one-dimensional vector shape. According to the transformation element size and the intra-prediction mode, instead of zigzag scanning, vertical scanning can be used, such as scanning the coefficients of the two-dimensional block shape in the column direction, and horizontal scanning can be used, such as scanning the coefficients of the two-dimensional block shape in the row direction. That is, according to the transformation element size and the intra-prediction mode, the scanning method to be used can be determined from zigzag scanning, vertical scanning, and horizontal scanning.
[0086] The entropy encoding part 165 may perform entropy encoding based on the values calculated by the permutation part 160. Various encoding methods may be used for entropy encoding, such as Exponential Golomb encoding, context-adaptive variable-length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), and the like.
[0087] The entropy coding part 165 can encode various information such as residual coefficient information and block type information of a coding element, prediction mode information, partition element information, prediction element information and transmission element information, motion vector information, reference frame information, block interpolation information and filtering information, which are input from the permutation part 160 and the prediction parts 120 and 125.
[0088] The entropy encoding part 165 may perform entropy encoding of the coefficient value of the coding element inputted from the permutation part 160.
[0089] The inverse quantization part 140 and the inverse transform part 145 perform inverse quantization of the values quantized by the quantization part 135 and inverse transform of the values transformed by the transform part 130. The residual coefficient generated by the inverse quantization part 140 and the inverse transform part 145 can be combined with the prediction element predicted by the motion estimation part, the motion compensation part, and the intra prediction part included in the prediction parts 120 and 125, to generate a reconstructed block.
[0090] The filtering portion 150 may comprise at least one of a deblocking filter, an offset correction element, and an adaptive loop filter (ALF).
[0091] The deblocking filter can remove block distortion occurring at the boundaries between blocks in the reconstructed image. Whether to deblock or apply the deblocking filter to the current block can be determined based on samples contained in multiple columns or rows within the block. A strong filter or a weak filter can be applied according to the required degree of filtering for deblocking when applying the deblocking filter to a block. Additionally, when performing vertical and horizontal filtering during deblocking, vertical and horizontal filtering can be performed in parallel.
[0092] The offset correction element can correct the offset of the original video using the sample element for the video that has been deblocked. To perform offset correction for a specific image, a method can be used to divide the samples included in the video into a certain number of regions, determine the region to be offset, and apply the offset to that region, or a method to apply the offset by taking into account the edge information of each sample.
[0093] Adaptive Loop Filtering (ALF) can be performed based on a value obtained by comparing the reconstructed and filtered video with the original video. After dividing the samples included in the video into predetermined groups, a single filter can be applied to the corresponding group, and filtering can be performed differently for each group. A luminance signal, which represents information related to whether to apply ALF, can be transmitted for each coding unit (CU), and the shape and filtering coefficient of the ALF filter to be applied can vary depending on each block. In addition, an ALF filter of the same type (fixed type) can be applied regardless of the characteristics of the applied block.
[0094] The storage device 155 may store the restored block or image calculated by the filtering portion 150, and the restored and stored block or image may be provided to the prediction portions 120 and 125 when performing the prediction performed between images.
[0095] Fig. 2 is a block diagram showing a video decoder according to one embodiment of the present invention.
[0096] As shown in Fig. 2, video decoder 200 may include a part 210 for entropy decoding, a part 215 for permutation, a part 220 for inverse quantization, a part 225 for inverse transform, parts 230 and 235 for prediction, a part 240 for filtering, and a memory device 245.
[0097] When a video bitstream is input from a video encoder, the input bitstream can be decoded according to the procedure opposite to that of the video encoder.
[0098] The entropy decoding portion 210 may perform entropy decoding according to a procedure opposite to the entropy encoding procedure performed by the entropy decoding portion of the video encoder. For example, various methods corresponding to the method performed by the video encoder may be used, such as Exponential Golomb encoding, context-adaptive variable-length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC).
[0099] The entropy decoding part 210 can decode information related to intra prediction and inter-picture prediction performed by the encoder.
[0100] The permutation section 215 can perform permutation on the bitstream subjected to entropy decoding by the entropy decoding section 210, based on the permutation method performed by the encoder. The coefficients expressed in one-dimensional vector form can be reconstructed and permuted as coefficients in two-dimensional block form. The permutation section 215 can receive information related to the coefficient scanning performed by the encoding section and perform reconstruction using the inverse scanning method based on the scanning order performed by the corresponding encoding section.
[0101] The inverse quantization part 220 may perform inverse quantization based on a quantization parameter provided by the encoder and a coefficient value of the permuted block.
[0102] The inverse transform part 225 may perform the inverse transform on the transform unit, i.e., the DCT or DST performed by the transform part on the quantization result performed by the video encoder, i.e., the inverse DCT or the inverse DST. In this case, the DCT transform base may comprise at least one of DCT2 and DCT8, and the DST transform base may comprise DST7. Alternatively, when the transform in the video encoder is omitted, the inverse transform part 225 may also not perform the inverse transform. The inverse transform may be performed based on the transmission unit determined by the video encoder. The inverse transform part 225 of the video decoder may selectively perform the transform method (e.g., DCT or DST) according to a plurality of pieces of information, such as the prediction method, the size of the current block, the prediction direction, and the like.
[0103] The prediction portions 230 and 235 may generate a prediction block based on information related to generating a prediction block provided by the entropy decoder 210 and information about a previously decoded block or image provided by the memory device 245.
[0104] As described above, if the prediction unit size and the transform unit size are the same, when intra-prediction is performed in the same way as the operation in a video encoder, intra-prediction is performed on the prediction unit based on the sample on the left side, the sample on the upper left side, and the sample above the prediction unit. However, if the prediction unit size and the transform unit size differ when performing intra-prediction, intra-prediction can be performed using a reference sample based on the transform unit. Furthermore, intra-prediction using N×N partitioning can only be used for the smallest coding unit.
[0105] The prediction sections 230 and 235 may comprise a prediction unit determination section, an inter-picture prediction section, and an intra-prediction section. The prediction unit determination section may receive various information, such as prediction unit information input from the entropy decoding section 210, prediction mode information for the intra-prediction method, motion prediction-related information for the inter-picture prediction method, and the like, identify a prediction unit from the current coding unit, and determine whether the prediction unit performs inter-picture prediction or intra-prediction.The inter-picture prediction portion 230 may perform inter-picture prediction with respect to the current prediction element based on information included in at least one picture from the pictures before or after the current picture, including the current prediction element, by using the information required for inter-picture prediction of the current prediction element provided by the video encoder. Alternatively, the inter-picture prediction portion 230 may perform inter-picture prediction based on information about a partial region previously reconstructed in the current picture containing the current prediction element.
[0106] To perform the prediction performed between pictures, it can be determined based on the coding element whether the motion prediction method of the prediction element included in the corresponding coding element is a skip mode, a fusion mode, a motion vector prediction mode (AMVP mode), or an intra-block copy mode.
[0107] The intra-prediction portion 235 can generate a prediction block based on sample information in the current image. When the prediction unit is a prediction unit that has performed intra-prediction, the intra-prediction can be performed based on the intra-prediction mode information of the prediction unit provided by the video encoder. The intra-prediction portion 235 can include an adaptive intra-smoothing (AIS) filter, a reference sample interpolation portion, and a DC filter. The AIS filter is a portion that performs filtering with respect to the reference sample of the current block and can determine whether to apply the filter according to the prediction mode of the current prediction unit and apply the filter. AIS filtering can be performed with respect to the reference sample of the current block by using the prediction mode and AIS filter information of the prediction unit provided by the video encoder.When the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.
[0108] When the prediction mode of the prediction unit is a prediction unit that performs intra-prediction based on a sample value obtained by interpolating a reference sample, the reference sample interpolation portion can generate a reference sample of an element consisting of samples that has an integer value or less by interpolating the reference sample. When the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating a reference sample, the reference sample may not be interpolated. The DC filter can generate a prediction block by filtering when the prediction mode of the current block is a DC mode.
[0109] The reconstructed block or image may be provided to the filtering section 240. The filtering section 240 may include a deblocking filter, an offset correction element, and an ALF.
[0110] The video encoder may provide information on whether to apply a deblocking filter to the corresponding block or image, and whether to apply a strong filter or a weak filter when applying the deblocking filter. The deblocking filter information provided by the video encoder may be supplied to the video decoder's deblocking filter, and the video decoder may perform deblocking filtering on the corresponding block.
[0111] The offset correction element can perform offset correction on the reconstructed video based on the offset correction type and offset value information applied to the video when encoding.
[0112] ALF can be applied to a coding element based on the information on whether to apply ALF and the ALF coefficient information provided by the encoder. ALF information can be provided for inclusion in a specific parameter set.
[0113] The storage device 245 may store the reconstructed image or block and use it as a reference image or a reference block, and may provide the reconstructed image to an output element.
[0114] Fig. 3 is a view showing a basic element of a coding tree according to one embodiment of the present invention.
[0115] The coding unit of maximum size can be defined as a code tree unit. An image is divided into a set of code tree units (CTUs). A code tree unit is a coding unit with the maximum size and can be called a large coding unit (LCU). Fig. 3 shows an example in which an image is divided into a set of code tree units.
[0116] The code tree element size can be determined at the image level or the sequence level. For this purpose, information indicating the code tree element size can be transmitted via an image parameter set or a sequence parameter set.
[0117] For example, the code tree element size for the entire image in the sequence can be set to 128 × 128. Alternatively, at the image level, any size between 128 × 128 and 256 × 256 can be defined as the code tree element size. For example, the code tree element size can be set to 128 × 128 in the first image, and the code tree element size can be set to 256 × 256 in the second image.
[0118] Coding blocks can be generated by splitting a coding tree element. A coding block specifies the basic unit for performing encoding / decoding. For example, prediction or transformation can be performed for each coding block, or a predictive coding mode can be defined for each coding block. In this case, the predictive coding mode specifies the method for generating video prediction. For example, a predictive coding mode can include intra-screen prediction (intra-prediction), inter-screen prediction (inter-picture prediction), continuous picture matching (CPR), intra-block copying (IBC), or combined prediction.For a coding block, a prediction block may be generated by using at least one coding mode with prediction from intra prediction, prediction performed between images, linking to the current image, and combined prediction.
[0119] Information indicating the current block's predictive coding mode can be transmitted via a bitstream. For example, this information can be a 1-bit flag indicating whether the predictive coding mode is intra-picture or inter-picture. Only when the current block's predictive coding mode is determined to be inter-picture can linking to the current picture or combined prediction be used.
[0120] Current image anchoring is used to set the current image as a reference image and obtain the prediction block of the current block from an area that has already been encoded / decoded in the current image. In this case, the current image refers to the image containing the current block. Information indicating whether the current image anchoring applies to the current block can be transmitted via a bitstream. For example, this information can be a 1-bit flag. When the flag is true, the prediction encoding mode of the current block can be determined as anchoring to the current image, and when the flag is false, the prediction mode of the current block can be determined as inter-image prediction.
[0121] Alternatively, the predictive encoding mode of the current block can be determined based on the reference image index. For example, when the reference image index indicates the current image, the predictive encoding mode of the current block can be determined as a current-image-based prediction. When the reference image index indicates an image different from the current image, the predictive encoding mode of the current block can be determined as inter-image prediction. That is, a current-image-based prediction is a prediction method that uses information about the region in which encoding / decoding was performed in the current image, and inter-image prediction is a prediction method that uses information about another image in which encoding / decoding was performed.
[0122] Combined prediction is a coding mode that combines two or more of intra-prediction, inter-picture prediction, and current-picture linking. For example, when applying combined prediction, the first prediction block may be generated based on one of intra-prediction, inter-picture prediction, and current-picture linking, and the second prediction block may be generated based on another of them. When generating the first prediction block and the second prediction block, the final prediction block may be generated by averaging or weighted summing the first prediction block and the second prediction block. Information indicating whether combined prediction is applied may be transmitted via a bitstream. This information may be a 1-bit flag.
[0123] Fig. 4 is a view showing various types of coding block partitioning.
[0124] A coding block can be partitioned into multiple coding blocks based on a quaternary tree partition, a binary tree partition, or a ternary tree partition. The partitioned coding block can be partitioned again into multiple coding blocks based on a quaternary tree partition, a binary tree partition, or a ternary tree partition.
[0125] Quartertree-based partitioning refers to a partitioning method that splits the current block into four blocks. As a result of quaternary tree-based partitioning, the current block can be divided into four square-shaped partitions (see "SPLIT_QT" in Fig. 4(a)).
[0126] Binary tree partitioning refers to a partitioning method that partitions the current block into two blocks. Splitting the current block into two blocks along the vertical direction (i.e., using a vertical line intersecting the current block) can be called binary tree partitioning in the vertical direction, and splitting the current block into two blocks along the horizontal direction (i.e., using a horizontal line intersecting the current block) can be called binary tree partitioning in the horizontal direction. As a result of binary tree partitioning, the current block can be partitioned into two non-square-shaped partitions. "SPLIT_BT_VER" in Fig. 4(b) represents the result of binary tree partitioning in the vertical direction, and "SPLIT_BT_HOR" in Fig. 4(c) represents the result of binary tree partitioning in the horizontal direction.
[0127] Target tree partitioning refers to a partitioning method that partitions the current block into three blocks. Splitting the current block into three blocks along the vertical direction (i.e., using two vertical lines intersecting the current block) can be called ternary tree partitioning in the vertical direction, and splitting the current block into three blocks along the horizontal direction (i.e., using two horizontal lines intersecting the current block) can be called ternary tree partitioning in the horizontal direction. As a result of ternary tree partitioning, the current block can be partitioned into three non-square-shaped partitions. In this case, the width / height of the partition located in the center of the current block can be twice the width / height of the other partitions. "SPLIT_TT_VER" in Fig. 4(d) represents the result of ternary tree partitioning in the vertical direction, and "SPLIT_TT_HOR" in Fig.4(e) presents the result of partitioning based on the ternary tree in the horizontal direction.
[0128] The number of splits of a code tree element can be defined as the split depth. The maximum split depth of a code tree element can be defined at the sequence level or image level. Accordingly, the maximum split depth of a code tree element can be different for each sequence or image.
[0129] Alternatively, the maximum partitioning depth for each partitioning method can be defined separately. For example, the maximum partitioning depth allowed for quaternary tree-based partitioning may be different from the maximum partitioning depth allowed for binary tree-based partitioning and / or ternary tree-based partitioning.
[0130] The encoder may transmit information indicating at least one of the partition type and partition depth of the current block via a bitstream. The decoder may determine the partition type and partition depth of a coding tree element based on the information parsed from the bitstream.
[0131] Fig. 5 is a view showing a partitioning diagram of a code tree element.
[0132] Partitioning a coding block using a partitioning method such as quaternary tree partitioning, binary tree partitioning, and / or ternary tree partitioning may be called multi-tree partitioning.
[0133] Coding blocks generated by applying multi-tree partitioning to a coding block can be called lower coding blocks. When the partition depth of a coding block is k, the partition depth of lower coding blocks is set to k + 1.
[0134] And on the other hand, for coding blocks having partition depth k + 1, the coding block having partition depth k can be called the upper coding block.
[0135] The split type of the current coding block can be determined based on at least one of the split type of the upper coding block and the split type of the neighboring coding block. In this case, the neighboring coding block is the coding block adjacent to the current coding block and may include at least one of the upper neighboring block and the left neighboring block of the current coding block, and the neighboring block adjacent to the upper left corner. In this case, the split type may include at least one of the following: whether the quaternary tree-based split was applied, whether the binary tree-based split was applied, the binary tree-based split direction, whether the ternary tree-based split was applied, and the ternary tree-based split direction.
[0136] To determine the coding block splitting type, information indicating whether the coding block can be split can be transmitted via the bitstream. This information is a 1-bit flag "split_cu_flag." When true, this flag indicates that the coding block is split using a quadtree-based (→ quaternary tree) splitting method.
[0137] When split_cu_flag is true, information indicating whether a coding block is split based on a quaternary tree can be transmitted via the bitstream. This information is a 1-bit flag in the form of split_qt_flag. When the flag is true, the coding block can be split into four blocks.
[0138] For example, in the example shown in Fig. 5, when a coding tree element is partitioned based on a quaternary tree, four coding blocks having a partition depth of 1 are generated. Furthermore, it is shown that the quaternary tree-based partitioning is applied again to the first and fourth coding blocks of the four coding blocks generated as a result of the quaternary tree-based partitioning. As a result, four coding blocks having a partition depth of 2 can be generated.
[0139] Furthermore, coding blocks having a partition depth of 3 can be generated by repeatedly applying quaternary tree-based partitioning to a coding block having a partition depth of 2.
[0140] When quaternary tree-based splitting is not applied to a coding block, it can be determined whether binary tree-based splitting or ternary tree-based splitting is performed on the coding block, taking into account at least one of the following: the size of the coding block, whether the coding block is located on the boundary of an image, the maximum splitting depth, and the splitting type of the adjacent block. When it is determined that binary tree-based splitting or ternary tree-based splitting is to be performed on the coding block, information indicating the splitting direction can be transmitted via a bitstream. The information can be a 1-bit flag in the form of mtt_split_cu_vertical_flag. Based on the flag, it can be determined whether the splitting direction is the vertical direction or the horizontal direction.Additionally, information indicating whether binary tree-based or ternary tree-based partitioning is applied to the coding block can be transmitted via the bitstream. This information can be a 1-bit flag in the form mtt_split_cu_binary_flag. This flag can be used to determine whether binary tree-based or ternary tree-based partitioning is applied to the coding block.
[0141] For example, in the example shown in Fig. 5, it is shown that partitioning based on a binary tree in the vertical direction is applied to a coding block having a partition depth of 1, partitioning based on a ternary tree in the vertical direction is applied to the left coding block of the coding blocks generated as a result of partitioning, and partitioning based on a binary tree in the vertical direction is applied to the right coding block.
[0142] Inter-image prediction is a predictive coding mode that predicts the current block by using information from the previous image. For example, a block in the same position as the current block in the previous image (hereinafter referred to as a co-located block) can be set as the prediction block of the current block. From here on, the prediction block generated based on the block in the same position as the current block will be referred to as a co-located prediction block.
[0143] On the other hand, when an object located in the previous image has moved to a different position in the current image, the current block can be effectively predicted by using the object's motion. For example, when the object's motion direction and size can be determined by comparing the previous image and the current image, the prediction block (or video prediction block) of the current block can be generated taking into account the object's motion information. Hereinafter, the prediction block generated using motion information is referred to as a motion prediction block.
[0144] A residual block can be generated by subtracting a prediction block from the current block. In this case, when there is object motion, the energy of the residual block can be reduced by using the motion prediction block instead of the co-located prediction block, thus improving the compression efficiency of the residual block.
[0145] As described above, generating a prediction block using motion information can be called motion-compensated prediction. In most inter-image predictions, the prediction block can be generated based on motion-compensated prediction.
[0146] The motion information may contain at least one of a motion vector, a reference picture index, a prediction direction, and a bidirectional weight index. The motion vector represents the motion direction and size of an object. The reference picture index indicates the reference picture of the current block from the reference pictures included in the reference picture list. The prediction direction indicates any of unidirectional L0 prediction, unidirectional L1 prediction, and bidirectional prediction (L0 prediction and L1 prediction). According to the prediction direction of the current block, at least one of motion information in the L0 direction and motion information in the L1 direction may be used. The bidirectional weight index indicates the weighting value applied to the L0 prediction block and the weighting value applied to the L1 prediction block.
[0147] Fig. 6 is a flowchart showing a prediction method performed between images according to one embodiment of the present invention.
[0148] As shown in Fig. 6, the inter-picture prediction method includes the steps of determining (S601) an inter-picture prediction mode of a current block, obtaining (S602) motion information of the current block according to the determined inter-picture prediction mode, and performing (S603) motion-compensated prediction for the current block based on the obtained motion information.
[0149] Here, the inter-image prediction mode represents various methods for determining the motion information of the current block and may include an inter-image prediction mode that uses translational motion information and an inter-image prediction mode that uses affine motion information. For example, the inter-image prediction mode that uses translational motion information may include a fusion mode and a motion vector prediction mode, and the inter-image prediction mode that uses affine motion information may include an affine fusion mode and an affine motion vector prediction mode.The motion information of the current block may be determined based on the neighboring block adjacent to the current block or the information analyzed from the bitstream according to the inter-picture prediction mode.
[0150] Next, the prediction method carried out between images using affine motion information will be described in detail.
[0151] Fig. 7 is a view showing the nonlinear motion of an object.
[0152] Nonlinear object motion may be generated in video. For example, as shown in the example in Fig. 7, nonlinear object motion may include zooming in, zooming out, rotating, affine transformations, and so on. When nonlinear object motion occurs, the object's motion cannot be effectively expressed using a translational motion vector. Accordingly, coding efficiency can be improved by using affine motion instead of translational motion in the region where nonlinear object motion occurs.
[0153] Fig. 8 is a flowchart showing a method for prediction performed between images based on affine motion according to one embodiment of the present invention.
[0154] Whether the inter-image prediction method based on affine motion is applied to the current block can be determined based on information analyzed from the bitstream. Specifically, whether the inter-image prediction method based on affine motion is applied to the current block can be determined based on at least one of a flag indicating whether the affine fusion mode is applied to the current block and a flag indicating whether the affine motion vector prediction mode is applied to the current block.
[0155] When the inter-image prediction method based on affine motion is applied to the current block, an affine motion model of the current block can be determined (S801). The affine motion model can be defined as at least one of a six-parameter affine motion model and a four-parameter affine motion model. A six-parameter affine motion model expresses affine motion using six parameters, and a four-parameter affine motion model expresses affine motion using four parameters.
[0156] Equation 1 expresses affine motion using six parameters. Affine motion represents translational motion for a predetermined region defined by affine source vectors.Equation 1
[0157] When affine motion is expressed using six parameters, complex motion can be expressed. However, as the number of bits required to encode each parameter increases, coding efficiency may decrease. Accordingly, affine motion can be expressed using four parameters. Equation 2 expresses affine motion using four parameters.
[0158] Information for defining the affine motion model of the current block can be encoded and transmitted via a bitstream. For example, the information can be a 1-bit flag of the form "affine_type_flag." When the flag value is 0, it can indicate that the 4-parameter affine motion model is applied, and when the flag value is 1, it can indicate that the 6-parameter affine motion model is applied. The flag can be encoded via an element in the form of a slice, tile, or block (e.g., via an element of a coding block or code tree). When the flag is transmitted at the slice level, the affine motion model defined at the slice level can be applied to all blocks belonging to the slice.
[0159] Alternatively, the affine motion model of the current block can be determined based on the affine prediction mode performed between images of the current block. For example, when the affine fusion mode is applied, the affine motion model of the current block can be determined as a 4-parameter motion model. Conversely, when the affine motion vector prediction mode is applied, the information for determining the affine motion model of the current block can be encoded and transmitted via a bitstream. For example, when the affine motion vector prediction mode is applied to the current block, the affine motion model of the current block can be determined based on a 1-bit flag of the form "affine_type_flag."
[0160] Then the affine source vector of the current block can be obtained (S802). When the 4-parameter affine motion model is selected, motion vectors at two checkpoints of the current block can be obtained. Conversely, when the 6-parameter affine motion model is selected, motion vectors at three checkpoints of the current block can be obtained. The motion vector at a checkpoint can be called the affine source vector. A checkpoint may include at least one of the upper left corner, upper right corner, and lower left corner of the current block.
[0161] Fig. 9 is a view showing an example of affine source vectors of each affine motion model.
[0162] In the 4-parameter affine motion model, affine source vectors can be obtained for two of the upper left corner, upper right corner, and lower left corner. For example, as shown in the example in Fig. 9(a), when the 4-parameter affine motion model is selected, an affine vector can be obtained by using the affine source vector sv0 for the upper left corner of the current block (e.g., the upper left sample (x1, y1)) and the affine source vector sv1 for the upper right corner of the current block (e.g., the upper right sample (x1, y1)). It is also possible to use the affine source vector for the lower left corner instead of the affine source vector for the upper left corner, or to use the affine source vector for the lower left corner instead of the affine source vector for the upper right corner.
[0163] In the 6-parameter affine motion model, affine source vectors can be obtained for the upper left corner, upper right corner, and lower left corner. For example, as shown in the example in Fig. 9(b), when the 6-parameter affine motion model is selected, an affine vector can be obtained by using the affine source vector sv0 for the upper left corner of the current block (e.g., the upper left sample (x1, y1)), the affine source vector sv1 for the upper right corner of the current block (e.g., the upper right sample (x1, y1)) and the affine source vector sv2 for the upper left corner of the current block (e.g., the upper left sample (x2, y2)).
[0164] In the embodiment described below, in the 4-parameter affine motion model, the affine source vectors of the upper left checkpoint and the upper right checkpoint will be called the first affine source vector and the second affine source vector, respectively. In the embodiments that use the first affine source vector and the second affine source vector described below, at least one of the first affine source vector and the second affine source vector can be replaced by the affine source vector of the lower left checkpoint (the third affine source vector) or the affine source vector of the lower right checkpoint (the fourth affine source vector).
[0165] Furthermore, in the 6-parameter affine motion model, the affine source vectors of the upper left checkpoint, upper right checkpoint, and lower left checkpoint will be called the first affine source vector, the second affine source vector, and the third affine source vector, respectively. In the embodiments that use the first affine source vector, the second affine source vector, and the third affine source vector described below, at least one of the first affine source vector, the second affine source vector, and the third affine source vector can be replaced by the affine source vector of the lower right checkpoint (the fourth affine source vector).
[0166] An affine vector can be obtained (S803) for each sub-block by using affine source vectors. In this case, the affine vector represents the translational motion vector obtained from the affine source vectors. The affine vector of a sub-block can be called the affine motion vector of the sub-block or the motion vector of the sub-block.
[0167] Fig. 10 is a view showing an example of affine vectors of sub-blocks in a 4-parameter motion model.
[0168] The affine vector of a subblock can be obtained based on the location of the checkpoint, the location of the subblock, and the affine source vector. For example, Equation 3 shows an example of obtaining the affine vector of a subblock.Equation 3
[0169] In Equation 3, (x, y) denotes the position of the sub-block. Here, the position of the sub-block indicates the position of the reference sample included in the sub-block. The reference sample may be the sample located in the upper left corner of the sub-block or the sample for which at least one of the x-coordinate and y-coordinate is the center point. (x0, y0) denotes the position of the first reference point and (sv 0x , sv 0y ) denotes the first affine source vector. In addition, (x1, y1) denotes the position of the second control point and (sv 1x , sv 1y ) denotes the second affine source vector.
[0170] When the first control point and the second control point correspond to the upper left corner and upper right corner of the current block respectively, x1-x0 can be set to a value equal to the width of the current block.
[0171] After this, motion-compensated prediction can be performed (S804) for each sub-block using the affine vector of each sub-block. As a result of motion-compensated prediction, a prediction block can be generated for each sub-block. The prediction blocks of the sub-blocks can be set as the prediction blocks of the current block.
[0172] Then, the prediction method carried out between images using translational motion information will be described in detail.
[0173] The motion information of the current block can be obtained from the motion information of another block of the current block (→ another block). In this case, the other block may be a block encoded / decoded by inter-image prediction before the current block. Setting the motion information of the current block equal to that of the other block can be defined as a fusion mode. Additionally, setting the motion vector of the other block as the motion vector prediction value of the current block can be defined as a motion vector prediction mode.
[0174] Fig. 11 is a flowchart showing the process of obtaining the movement information of the current block using the merge mode.
[0175] A merge candidate for the current block can be obtained (S1101). The merge candidate for the current block can be obtained from the block encoded / decoded by inter-image prediction before the current block.
[0176] Fig. 12 is a view showing an example of candidate blocks used to obtain a merge candidate.
[0177] Candidate blocks may include at least one of neighboring blocks containing a sample adjacent to the current block or non-neighboring blocks containing a sample that is not adjacent to the current block. The samples used to determine candidate blocks are then specified as reference samples. Furthermore, a reference sample adjacent to the current block is called a neighboring reference sample, and a reference sample that is not adjacent to the current block is called a non-neighboring reference sample.
[0178] The adjacent reference sample may be included in the adjacent column of the leftmost column of the current block or the adjacent row of the topmost row of the current block. For example, when the coordinates of the upper left sample of the current block are (0, 0), at least one of the block containing the reference sample at the position (-1, H-1), the block containing the reference sample at the position (W-1, -1), the block containing the reference sample at the position (W, -1), the block containing the reference sample at the position (-1, H), and the block containing the reference sample at the position (-1, -1) may be used as a candidate block. Referring to the graphic materials, the adjacent blocks of index 0-4 may be used as candidate blocks.
[0179] The non-adjacent reference sample represents a sample in which at least one of the x-axis distance and the y-axis distance from the reference sample adjacent to the current block has a predetermined value. For example, at least one of a block containing a reference sample in which the x-axis distance from the left reference sample is a predetermined value, a block containing a non-adjacent sample in which the y-axis distance from the upper reference sample is a predetermined value, and a block containing a non-adjacent sample in which the x-axis distance and the y-axis distance from the upper left reference sample are predetermined values can be used as a candidate block. The predetermined values can represent a natural number such as 4, 8, 12, 16, or the like.When referring to graphic materials, at least one of the index blocks 5-26 may be used as a candidate block.
[0180] A sample which is not located on the same vertical line, horizontal line or diagonal line as the adjacent reference sample can be set as a non-adjacent reference sample.
[0181] Fig. 13 is a view showing the positions of reference samples.
[0182] As shown in the example in Fig. 13, the x coordinates of the upper non-adjacent reference samples can be set to be different from the x coordinates of the upper adjacent reference samples. For example, when the position of the upper adjacent reference sample is (W-1, -1), the position of the upper non-adjacent reference sample, which is distant up to N from the upper adjacent reference sample on the y-axis, can be set to ((W / 2)-1, -1-N), and the position of the upper non-adjacent reference sample, which is distant up to 2N from the upper adjacent reference sample on the y-axis, can be set to (0, -1-2N). That is, the position of the non-adjacent reference sample can be determined based on the position of the adjacent reference sample and the distance from the adjacent reference sample.
[0183] Hereinafter, a candidate block containing a neighboring reference sample among candidate blocks is called a neighboring block, and a block containing a non-neighboring reference sample is called a non-neighboring block.
[0184] When the distance between the current block and the candidate block is greater than or equal to the fifth threshold, the candidate block may be set as unavailable as a merge candidate. The fifth threshold can be determined based on the size of the code tree element. For example, the fifth threshold can be set equal to the height (ctu_height) of the code tree element or a value obtained by adding the offset to the height (e.g., ctu_height ± N) of the code tree element or subtracting the offset from it. The offset N is a value preset in the encoder and decoder and can be set equal to 4, 8, 16, 32, or ctu_height.
[0185] When the difference between the y-coordinate of the current block and the y-coordinate of the sample included in the candidate block is greater than the sixth threshold, the candidate block may be determined to be unavailable as a merge candidate.
[0186] Alternatively, a candidate block that does not belong to the same code tree element as the current block may be set as unavailable as a merge candidate. For example, when the reference sample deviates from the upper boundary of the code tree element to which the current block belongs, the candidate block containing the reference sample may be set as unavailable as a merge candidate.
[0187] When the upper boundary of the current block is adjacent to the upper boundary of a code tree element, many candidate blocks are determined to be unavailable as merge candidates, and thus the encoding / decoding efficiency of the current block may decrease. To solve this problem, candidate blocks can be set so that the number of candidate blocks located on the left side of the current block is greater than the number of candidate blocks located above the current block.
[0188] Fig. 14 is a view showing an example of candidate blocks used to obtain a merge candidate.
[0189] As shown in the example in Fig. 14, the upper blocks belonging to the upper N block columns of the current block and the left blocks belonging to the left M block columns of the current block can be set as candidate blocks. In this case, the number of left candidate blocks can be set to be greater than the number of upper candidate blocks by setting M to be greater than N.
[0190] For example, the difference between the y-coordinate of the reference point in the current block and the y-coordinate of the upper block that can be used as a candidate block can be set to no more than N times the height of the current block. Additionally, the difference between the x-coordinate of the reference point in the current block and the x-coordinate of the left block that can be used as a candidate block can be set to no more than M times the width of the current block.
[0191] For example, in the example shown in Fig. 14, it is shown that the blocks belonging to the upper two columns of blocks of the current block and the blocks belonging to the left five columns of blocks of the current block are set as candidate blocks.
[0192] As another example, when a candidate block does not belong to the same code tree element as the current block, a merge candidate may be obtained by using a block belonging to the same code tree element as the current block or a block containing a reference sample adjacent to the boundary of the code tree element instead of the candidate block.
[0193] Fig. 15 is a view showing an example in which the position of the reference count is changed.
[0194] When a reference sample is included in a code tree element other than the current block, and the reference sample is not adjacent to the boundary of the code tree element, a candidate block may be determined using a reference sample adjacent to the boundary of the code tree element instead of the reference sample.
[0195] For example, in the examples shown in Fig. 15(a) and 15(b), when the upper boundary of the current block and the upper boundary of the coding tree element are in contact with each other, the reference samples at the top of the current block belong to the coding tree element different from the current block. Of the reference samples belonging to the coding tree element different from the current block, a reference sample that is not adjacent to the upper boundary of the coding tree element can be replaced with a sample adjacent to the upper boundary of the coding tree element.
[0196] For example, as shown in the example of Fig. 15(a), the reference sample at position 6 is replaced with the sample at position 6' located at the upper boundary of the coding tree element, and as shown in the example of Fig. 15(b), the reference sample at position 15 is replaced with the sample at position 15' located at the upper boundary of the coding tree element. In this case, the y coordinate of the replacement sample is replaced with a position adjacent to the coding tree element, and the x coordinate of the replacement sample can be set equal to the reference sample. For example, the sample at position 6' may have the same x coordinate as the sample at position 6, and the sample at position 15' may have the same x coordinate as the sample at position 15.
[0197] Alternatively, the value obtained by adding or subtracting the offset to the x-coordinate of the reference sample can be set as the x-coordinate of the replacement sample. For example, when the x-coordinates of the adjacent reference sample located above the current block and the non-adjacent reference sample are the same, the value obtained by adding or subtracting the offset to the x-coordinate of the reference sample can be set as the x-coordinate of the replacement sample. This is intended to prevent the replacement sample replacing the non-adjacent reference sample from being placed in the same position as another non-adjacent reference sample or an adjacent reference sample.
[0198] Fig. 16 is a view showing an example in which the position of the reference count is changed.
[0199] When replacing a reference sample that is included in a code tree element other than the current block and that is not adjacent to the boundary of the code tree element with a sample located on the boundary of the code tree element, the value obtained by adding an offset to or subtracting an offset from the x-coordinate of the reference sample can be set as the x-coordinate of the replacement sample.
[0200] For example, in the example shown in Fig. 16, the reference sample at position 6 and the reference sample at position 15 may be replaced by the sample at position 6' and the sample at position 15', respectively, whose y coordinates are the same as the y coordinates of the row adjacent to the upper boundary of the code tree element. In this case, the x coordinate of the sample at position 6' may be set equal to the value obtained by subtracting W / 2 from the x coordinate of the reference sample at position 6, and the x coordinate of the sample at position 15' may be set equal to the value obtained by subtracting W-1 from the x coordinate of the reference sample at position 15.
[0201] Unlike the examples shown in Fig. 15 and Fig. 16, the y coordinate of the line located above the topmost line of the current block or the y coordinate of the upper boundary of the code tree element may be set as the y coordinate of the replacement reference.
[0202] Although not shown, the sample replacing the reference sample may be determined based on the left boundary of the code tree element. For example, when the reference sample is not included in the same code tree element as the current block and is not adjacent to the left boundary of the code tree element, the reference sample may be replaced with a sample adjacent to the left boundary of the code tree element. In this case, the replacement sample may have a y-coordinate identical to the y-coordinate of the reference sample, or may have a y-coordinate obtained by adding or subtracting an offset from the y-coordinate of the reference sample.
[0203] After this, the block containing the replacement count can be set as a candidate block, and a merge candidate for the current block can be obtained based on the candidate block.
[0204] A merge candidate can also be derived from a temporary neighboring block included in the image that is different from the current block. For example, a merge candidate can be derived from a matching block included in the matching image.
[0205] The motion information of the merge candidate may be set equal to the motion information of the candidate block. For example, at least one of the motion vector, reference image index, prediction direction, and bidirectional weight index of the candidate block may be set as the motion information of the merge candidate.
[0206] A merge candidate list containing merge candidates can be generated (S1102). The merge candidates can be divided into adjacent merge candidates, derived from a neighboring block adjacent to the current block, and non-adjacent merge candidates, derived from a non-adjacent block.
[0207] The indices of merge candidates in the merge candidate list may be assigned in a predetermined order. For example, the index assigned to an adjacent merge candidate may have a value less than the index assigned to a non-adjacent merge candidate. Alternatively, an index may be assigned to each merge candidate based on the index of each block shown in Fig. 12 or 14.
[0208] When a plurality of merge candidates are included in the merge candidate list, at least one of the plurality of merge candidates can be selected (S1103). In this case, information indicating whether the move information of the current block is obtained from an adjacent merge candidate can be transmitted via a bitstream. The information can be a 1-bit flag. For example, the isAdjancentMergeFlag syntax element, which indicates whether the move information of the current block is obtained from an adjacent merge candidate, can be transmitted via a bitstream. When the value of the isAdjancentMergeFlag syntax element is 1, the move information of the current block can be obtained based on an adjacent merge candidate. On the other hand, when the value of the isAdjancentMergeFlag syntax element is 0, the move information of the current block can be obtained based on a non-adjacent merge candidate.
[0209] Table 1 shows the syntax table specifying the isAdjancentMergeFlag syntax element.Table 1
[0210] Information indicating any of a plurality of merge candidates may be transmitted via a bitstream. For example, information indicating the index of any of the merge candidates included in the merge candidate list may be transmitted via a bitstream.
[0211] When isAdjacentMergeflag is 1, the merge_idx syntax element may be passed, specifying any adjacent merge candidate. The maximum value of the merge_idx syntax element can be set to the value obtained by subtracting 1 from the number of adjacent merge candidates.
[0212] When isAdjacentMergeflag is 0, the NA_merge_idx syntax element may be passed, specifying any of the non-adjacent merge candidates. The NA_merge_idx syntax element represents the value obtained by subtracting the number of adjacent merge candidates from the index of the non-adjacent merge candidate. The decoder can select a non-adjacent merge candidate by adding the number of adjacent merge candidates to the index specified by NA_merge_idx.
[0213] When the number of merge candidates included in the merge candidate list is less than the first threshold, a merge candidate included in the prediction region motion information list may be added to the merge candidate list. In this case, the first threshold may be the maximum number of merge candidates that can be included in the merge candidate list, or a value obtained by subtracting an offset from the maximum number of merge candidates. The offset may be a natural number such as 1, 2, or the like. The inter-region motion information list may contain a merge candidate obtained based on the block encoded / decoded before the current block.
[0214] The prediction section motion information list contains a fusion candidate obtained from a block encoded / decoded based on inter-picture prediction in the current picture. For example, the motion information of a fusion candidate included in the prediction section motion information list may be set equal to the motion information of a block encoded / decoded based on inter-picture prediction. In this case, the motion information may contain at least one of a motion vector, a reference picture index, a prediction direction, and a bidirectional weight index.
[0215] For the convenience of explanation, the merge candidate included in the prediction section movement information list will be called the prediction section merge candidate.
[0216] The maximum number of merge candidates that can be included in the prediction region motion information list can be preset by the encoder and decoder. For example, the maximum number of merge candidates that can be included in the prediction region motion information list can be 1, 2, 3, 4, 5, 6, 7, 8, or more (e.g., 16).
[0217] Alternatively, information indicating the maximum number of merge candidates that can be included in the prediction section motion information list may be transmitted via a bitstream. The information may be transmitted at the sequence, image, or slice level. The information may indicate the maximum number of merge candidates that can be included in the prediction section motion information list. Alternatively, the information may indicate the difference between the maximum number of merge candidates that can be included in the prediction section motion information list and the maximum number of merge candidates that can be included in the merge candidate list.
[0218] Alternatively, the maximum number of candidates for merging the prediction area motion information list can be determined according to the image size, slice size, or code tree element size.
[0219] The prediction region motion information list can be initialized by an element of an image, slice, tile, packet, code tree element, or a line of code tree elements (row or column). For example, when a slice is initialized, the prediction region motion information list is also initialized, and the prediction region motion information list may not contain any merge candidates.
[0220] Alternatively, information indicating whether to initialize the prediction section motion information list can be transmitted via a bitstream. This information can be transmitted at the slice, tile, packet, or block level. Until this information indicates initialization of the prediction section motion information list, a preconfigured prediction section motion information list can be used.
[0221] Alternatively, information regarding the initial prediction region fusion candidate may be transmitted via a set of image parameters or a slice header. Despite slice initialization, the prediction region motion information list may contain the initial prediction region fusion candidate. Accordingly, the prediction region fusion candidate may be used for the block that represents the first encoding / decoding target in the slice.
[0222] Alternatively, a prediction section merge candidate included in the prediction section movement information list of the preceding coding tree element may be set as the initial prediction section merge candidate. For example, among the prediction section merge candidates included in the prediction section movement information list of the preceding coding tree element, the prediction section merge candidate with the smallest index or the prediction section merge candidate with the largest index may be set as the initial prediction section merge candidate.
[0223] The blocks are encoded / decoded according to the encoding / decoding order, and the blocks encoded / decoded based on the prediction performed between pictures can be sequentially set as a candidate for merging the prediction section according to the encoding / decoding order.
[0224] Fig. 17 is a flowchart showing the process of updating the prediction section motion information list.
[0225] When inter-image prediction is performed on the current block (S1701), a prediction region fusion candidate can be obtained based on the current block (S1702). The motion information of the prediction region fusion candidate can be set equal to the motion information of the current block.
[0226] When the prediction section motion information list is empty (S1703), the prediction section merging candidate obtained based on the current block can be added to the prediction section motion information list (S1704).
[0227] When the prediction section motion information list already contains a prediction section merge candidate (S1703), redundancy check can be performed on the motion information of the current block (or a prediction section merge candidate obtained based on the current block) (S1705). The purpose of the redundancy check is to determine whether the motion information of the prediction section merge candidate previously stored in the prediction section motion information list and the motion information of the current block are the same. The redundancy check can be performed on all prediction section merge candidates previously stored in the prediction section motion information list.Alternatively, redundancy checking may be performed on prediction section merging candidates having an index that is greater than the seventh threshold value or less than the eighth threshold value among the prediction section merging candidates previously stored in the prediction section motion information list.
[0228] When an inter-picture prediction fusion candidate having the same motion information as the motion information of the current block is not included, the prediction section fusion candidate obtained based on the current block may be added to the prediction section motion information list (S1708). Whether the inter-picture prediction fusion candidates are the same may be determined based on whether the motion information (e.g., motion vector and / or reference image index) of the inter-picture prediction fusion candidate is the same.
[0229] In this case, when the maximum number of prediction section merging candidates has already been stored in the prediction section movement information list (S1706), the oldest prediction section merging candidate is deleted (S1707), and the prediction section merging candidate obtained based on the current block can be added to the prediction section movement information list (S1708). In this case, the oldest prediction section merging candidate can be the prediction section merging candidate with the largest index or the prediction section merging candidate with the smallest index.
[0230] Each prediction region fusion candidate can be identified by an index. When a prediction region fusion candidate obtained from the current block is added to the prediction region motion information list, the lowest index (e.g., 0) is assigned to the prediction region fusion candidate, and the indices of previously stored prediction region fusion candidates can be increased by 1. In this case, when the maximum number of inter-image prediction fusion candidates has already been stored in the prediction region motion information list, the prediction region fusion candidate with the highest index is deleted.
[0231] Alternatively, when a prediction section fusion candidate obtained from the current block is added to the prediction section motion information list, the largest index may be assigned to the prediction section fusion candidate. For example, when the number of inter-image prediction fusion candidates previously stored in the prediction section motion information list is less than the maximum value, an index having the same value as the number of previously stored inter-image prediction fusion candidates may be assigned to the prediction section fusion candidate. Alternatively, when the number of inter-image prediction fusion candidates previously stored in the prediction section motion information list is the same as the maximum value, the prediction section fusion candidate may be assigned an index subtracting 1 from the maximum value.In addition, the prediction region merge candidate with the smallest index is removed, and the indices of the remaining previously stored prediction region merge candidates may be decreased by 1.
[0232] Fig. 18 is a view showing an embodiment of updating the list of candidates for merging a prediction section.
[0233] Presumably, since the prediction region merge candidate obtained from the current block is added to the prediction region merge candidate list, the highest index is assigned to the prediction region merge candidate. Furthermore, presumably, the maximum number of prediction region merge candidates is already stored in the prediction region merge candidate list.
[0234]
[0000] having the smallest index among the previously stored prediction region merge candidates is deleted, and the indices of the remaining prediction region merge candidates may be decreased by 1. In addition, the index of the prediction region merge candidate HmvpCand[n + 1] obtained from the current block may be set to the maximum value (n in the example shown in Fig. 18).
[0235] When a prediction section merge candidate that is the same as a prediction section merge candidate obtained based on the current block is previously stored (S1705), the prediction section merge candidate obtained based on the current block may not be added to the prediction section motion information list (S1709).
[0236] Alternatively, since the prediction region merge candidate obtained based on the current block is added to the prediction region movement information list, a previously stored prediction region merge candidate that is the same as the prediction region merge candidate may be deleted. In this case, the effect is similar to updating the index of a previously stored prediction region merge candidate.
[0237] Fig. 19 is a view showing an example in which the index of a previously stored prediction region merge candidate is updated.
[0238]
[0002] , which is the same as mvCand, is removed from the prediction section motion information list HvmpCandList, and the indices HmvpCand[3]–HmvpCand[n] are increased by 1.
[0239] In addition, the prediction region merge candidate mvCand obtained based on the current block can be added to the end of the prediction region movement information list.
[0240] Alternatively, the index assigned to a previously stored prediction region merge candidate, which is the same as the prediction region merge candidate obtained based on the current block, can be updated. For example, the index of a previously stored prediction region merge candidate can be changed to a minimum value or a maximum value.
[0241] It can be set so as not to add the motion information of blocks included in a predetermined region to the motion information list of the prediction region. For example, a prediction region fusion candidate obtained based on the motion information of a block included in the fusion processing region may not be added to the motion information list of the prediction region. Since the encoding / decoding order is not determined for blocks included in the fusion processing region, it is inappropriate to use the motion information of any one block for inter-image prediction of another block. Accordingly, prediction region fusion candidates obtained based on blocks included in the fusion processing region may not be added to the motion information list of the prediction region.
[0242] Alternatively, it can be set so as not to add the motion information of a block smaller than a preset size to the prediction section motion information list. For example, a prediction section merging candidate obtained based on the motion information of a coding block with a width or height smaller than 4 or 8, or the motion information of a coding block with a size of 4 x 4, may not be added to the prediction section motion information list.
[0243] When motion-compensated prediction is performed by a sub-block element, a prediction section merge candidate may be derived based on the motion information of a representative sub-block from among the plurality of sub-blocks included in the current block. For example, when a sub-block merge candidate is used for the current block, a prediction section merge candidate may be derived based on the motion information of a representative sub-block from among the sub-blocks.
[0244] The motion vectors of sub-blocks can be obtained in the following order. First, one of the merge candidates included in the merge candidate list of the current block is selected, and the initial shift vector (shVector) can be obtained based on the motion vector of the selected merge candidate. Then, the shift sub-block whose reference sample position is (xColSb, yColSb) can be obtained as the initial shift vector, which is added at the position (xSb, ySb) of the reference sample (such as the upper left sample or the center sample) of each sub-block in the coding block. Equation 4 shows the equation for obtaining the shift sub-block.Equation 4
[0245] Then, the motion vector of the matching block corresponding to the center position of the sub-block having (xColSb, yColSb) can be set as the motion vector of the sub-block having (xSb, ySb).
[0246] Illustrative sub-block may mean a sub-block containing the upper left count or the count in the center of the current block.
[0247] Fig. 20 is a view showing the position of an illustrative sub-block.
[0248] Fig. 20(a) shows an example in which a sub-block located at the upper left of the current block is set as an example sub-block, and Fig. 20(b) shows an example in which a sub-block located at the center of the current block is set as an example sub-block. When motion-compensated prediction is performed by a sub-block element, a candidate for merging the prediction portion of the current block can be obtained based on the motion vector of the sub-block containing the upper left sample of the current block, or the sub-block containing the sample at the center of the current block.
[0249] Whether to use the current block as a prediction region fusion candidate can be determined based on the inter-picture prediction mode of the current block. For example, a block encoded / decoded based on the affine motion model may be set as unavailable as a prediction region fusion candidate. Accordingly, even though the current block is encoded / decoded by inter-picture prediction, when the inter-picture prediction mode of the current block is the affine prediction mode, the prediction region motion information list may not be updated based on the current block.
[0250] Alternatively, a prediction region merge candidate may be derived based on at least one sub-block vector from the sub-blocks included in a block encoded / decoded based on the affine motion model. For example, a prediction region merge candidate may be derived using the sub-block located at the top left, the sub-block located at the center, or the sub-block located at the top right of the current block. Alternatively, the average value of the sub-block vectors of a plurality of sub-blocks may be set as the motion vector of the prediction region merge candidate.
[0251] Alternatively, a prediction region merge candidate may be obtained based on the average value of the affine source vectors of a block encoded / decoded based on the affine motion model. For example, the average of at least one of the first affine source vector, the second affine source vector, and the third affine source vector of the current block may be set as the motion vector of the prediction region merge candidate.
[0252] Alternatively, a list of prediction section motion information can be configured for each inter-picture prediction mode. For example, at least one of a list of prediction section motion information for a block encoded / decoded by intra-block copying, a list of prediction section motion information for a block encoded / decoded based on a translational motion model, and a list of prediction section motion information for a block encoded / decoded based on an affine motion model can be defined. According to the inter-picture prediction mode of the current block, any of the plurality of prediction section motion information lists can be selected.
[0253] Fig. 21 is a view showing an example in which a list of prediction section motion information is generated for each prediction mode performed between images.
[0254] When a block is encoded / decoded based on the non-affine motion model, the prediction region merge candidate mvCand obtained based on the block can be added to the non-affine motion information list of the prediction region HmvpCandList. On the other hand, when a block is encoded / decoded based on the affine motion model, the prediction region merge candidate mvAfCand obtained based on the block can be added to the affine motion information list of the prediction region HmvpAfCandList.
[0255] The affine source vectors of a block encoded / decoded based on the affine motion model can be stored in the prediction region merge candidate obtained from the block. Accordingly, the prediction region merge candidate can be used as a merge candidate to obtain the affine source vector of the current block.
[0256] In addition to the prediction segment motion information list described above, an additional prediction segment motion information list may be defined. In addition to the prediction segment motion information list described above (hereinafter referred to as the first prediction segment motion information list), a long-term motion information list (hereinafter referred to as the second inter-segment motion information list) may be defined. In this case, the long-term motion information list contains long-term merging candidates.
[0257] When both the first prediction segment motion information list and the second prediction segment motion information list are empty, the first prediction segment merge candidate can be added to the second prediction segment motion information list. Only after the number of available prediction segment merge candidates in the second prediction segment motion information list reaches the maximum number can a prediction segment merge candidate be added to the first prediction segment motion information list.
[0258] Alternatively, one prediction section merging candidate may be added to both of the second prediction section motion information list and the first prediction section motion information list.
[0259] In this case, the second prediction section motion information list, whose configuration is complete, may no longer be updated. Alternatively, when the decoded section is greater than or equal to the predetermined slice ratio, the second prediction section motion information list may be updated. Alternatively, the second prediction section motion information list may be updated for every N lines of code tree elements.
[0260] On the other hand, the first prediction region motion information list can be updated at any time a block encoded / decoded by inter-picture prediction is generated. However, it can be set so that the prediction region fusion candidate added to the second prediction region motion information list is not used to update the first prediction region motion information list.
[0261] Information for selecting either of the first prediction section motion information list and the second prediction section motion information list may be transmitted via a bitstream. When the number of merge candidates included in the merge candidate list is less than the first threshold, the merge candidates included in the prediction section motion information list specified by the information may be added to the merge candidate list.
[0262] Alternatively, the motion information list of the prediction section can be selected based on the size and shape of the current block, the prediction mode performed between images, whether bidirectional prediction is provided, whether motion vector refinement is provided, or whether triangular partitioning is provided.
[0263] Alternatively, although a prediction section merge candidate included in the first list of prediction section movement information is added, when the number of merge candidates included in the merge candidate list is less than the maximum number of merges, the prediction section merge candidates included in the second list of prediction section movement information may be added to the merge candidate list.
[0264] Fig. 22 is a view showing an example in which a prediction section merge candidate included in the long-term motion information list is added to the merge candidate list.
[0265] When the number of merge candidates included in the merge candidate list is less than the maximum number, the prediction section merge candidates included in the first prediction section motion information list HmvpCandList may be added to the merge candidate list. When the number of merge candidates included in the merge candidate list is less than the maximum number, even though the prediction section merge candidates included in the first prediction section motion information list are added to the merge candidate list, the inter-section merge candidates included in the long-term motion information list HmvpLTCandList may be added to the merge candidate list.
[0266] Table 2 shows the process of adding the prediction segment merge candidates included in the long-term motion information list to the merge candidate list.Table 2
[0267] A prediction region merge candidate may be set to contain additional information in addition to the motion information. For example, the size, shape, or partition information of a block may be additionally stored for a prediction region merge candidate. When constructing a list of merge candidates for the current block, only inter-image prediction merge candidates with the same size, shape, or partition information as or similar to those of the current block are used among the inter-image prediction merge candidates, or inter-image prediction merge candidates with the same size, shape, or partition information as or similar to those of the current block may be added to the merge candidate list first.
[0268] Alternatively, a prediction region motion information list may be generated for each block size, shape, or partition information. From the plurality of prediction region motion information lists, a list of merge candidates for the current block may be generated using the prediction region motion information list corresponding to the shape, size, or partition information of the current block.
[0269] When the number of merge candidates included in the merge candidate list of the current block is less than the first threshold, the prediction region merge candidates included in the prediction region movement information list may be added to the merge candidate list. The addition process is performed in ascending or descending order based on the index. For example, the prediction region merge candidate with the highest index may be added to the merge candidate list first.
[0270] When it is necessary to add a merge candidate of a prediction section included in the prediction section motion information list to the merge candidate list, redundancy control can be performed between the merge candidate of the prediction section and the merge candidates previously stored in the merge candidate list.
[0271] For example, Table 3 shows the process in which a prediction region merge candidate is added to the merge candidate list.Table 3
[0272] Redundancy check can be performed only on some of the prediction segment merge candidates included in the prediction segment movement information list. For example, redundancy check can only be performed on prediction segment merge candidates with an index greater than the seventh threshold or less than the eighth threshold. Alternatively, redundancy check can only be performed on the N merge candidates with the highest index or the N merge candidates with the lowest index.
[0273] Alternatively, redundancy checking may be performed only on certain merge candidates previously stored in the merge candidate list. For example, redundancy checking may be performed only on a merge candidate with an index greater than the ninth threshold or less than the tenth threshold, or on a merge candidate derived from a block at a specific position. In this case, a specific position may contain at least one of the left neighboring block, the upper neighboring block, the upper right neighboring block, and the lower left neighboring block of the current block.
[0274] Fig. 23 is a view showing an example in which redundancy control is performed only on some merge candidates.
[0275] When adding the prediction region merge candidate HmvpCand[j] to the merge candidate list, redundancy check can be performed on the prediction region merge candidate with the two merge candidates mergeCandList[NumMerge-2] and mergeCandList[NumMerge-1] that have the largest indices. In this case, NumMerge can represent the number of spatial merge candidates and temporal merge candidates that are available.
[0276]
[0000] and mergeCandList[1] are the same as HmvpCand[j].
[0277] Alternatively, redundancy check may be performed only on merge candidates obtained at a specific position. For example, redundancy check may be performed on at least one of a merge candidate obtained from a neighboring block located to the left of the current block and a merge candidate obtained from a neighboring block located above the current block. When a merge candidate obtained at a specific position does not exist in the merge candidate list, the merge candidate of the prediction region may be added to the merge candidate list without redundancy check.
[0278] When adding the prediction region merge candidate HmvpCand[j] to the merge candidate list, redundancy check can be performed on the prediction region merge candidate with the two merge candidates mergeCandList[NumMerge-2] and mergeCandList[NumMerge-1] that have the largest indices. In this case, NumMerge can represent the number of spatial merge candidates and temporal merge candidates that are available.
[0279] Redundancy check with a merge candidate can only be performed on some of the prediction segment merge candidates. For example, redundancy check can only be performed on N prediction segment merge candidates with a large index, or N prediction segment merge candidates with a small index, among the prediction segment merge candidates included in the prediction segment motion information list. For example, redundancy check can only be performed on prediction segment merge candidates when the difference between the number of prediction segment merge candidates included in the prediction segment motion information list and the index is less than or equal to the eleventh threshold.When the eleventh threshold is 2, redundancy check may be performed only on the three prediction segment merge candidates with the highest index value among the prediction segment merge candidates included in the prediction segment motion information list. Redundancy check may be omitted for prediction segment merge candidates other than the three prediction segment merge candidates. When redundancy check is omitted, a prediction segment merge candidate may be added to the merge candidate list regardless of whether the prediction segment merge candidate has motion information that is the same as the merge candidate's motion information.
[0280] Otherwise, it may be set to perform redundancy control only on the prediction section merge candidates when the difference between the number of prediction section merge candidates included in the prediction section motion information list and the index is equal to or greater than the twelfth threshold.
[0281] The number of prediction region fusion candidates for which redundancy check is performed can be preset in the encoder and decoder. For example, the thirteenth threshold value can be an integer such as 0, 1, or 2.
[0282] Alternatively, the thirteenth threshold value may be determined based on at least one of the number of merge candidates included in the merge candidate list and the number of prediction section merge candidates included in the prediction section movement information list.
[0283] When a merge candidate that is the same as the first merge candidate of the prediction section is detected and redundancy check is performed with respect to the second merge candidate of the prediction section, redundancy check with the merge candidate that is the same as the first merge candidate of the prediction section may be omitted.
[0284] Fig. 24 is a view showing an example in which redundancy control is omitted for a specific merge candidate.
[0285] When it is necessary to add the prediction region merge candidate HmvpCand[i] with index i to the merge candidate list, redundancy check is performed between the prediction region merge candidate and the merge candidates previously stored in the merge candidate list. In this case, when a merge candidate mergeCandList[j] that is the same as the prediction region merge candidate HmvpCand[i] is detected, redundancy check can be performed between the prediction region merge candidate HmvpCand[i-1] with index i-1 and the merge candidates without adding the prediction region merge candidate HmvpCand[i] to the merge candidate list. In this case, redundancy check between the prediction region merge candidate HmvpCand[i-1] and the merge candidate mergeCandList[j] can be omitted.
[0286]
[0002] are the same. Accordingly, HmvpCand[i] is not added to the merge candidate list, and redundancy check can be performed on HmvpCand[i-1]. In this case, redundancy check between HvmpCand[i-1] and mergeCandList[2] can be omitted.
[0287] When the number of merge candidates included in the merge candidate list of the current block is less than the first threshold, at least one of a pairwise merge candidate and a zero merge candidate may be additionally included, in addition to the inter-block merge candidate. A pairwise merge candidate refers to a merge candidate whose motion vector is the average of the motion vectors of two or more merge candidates, and a zero merge candidate refers to a merge candidate whose motion vector is 0.
[0288] A merge candidate can be added to the merge candidate list of the current block in the following order.
[0289] Spatial merge candidate - Temporal merge candidate - Prediction region merge candidate - (Prediction region affine merge candidate) - Pairwise merge candidate - Null merge candidate.
[0290] A spatial merge candidate refers to a merge candidate obtained from at least one of a neighboring block and a non-neighboring block, and a temporal merge candidate refers to a merge candidate obtained from a previous reference image. An affine fusion candidate for a prediction region refers to a fusion candidate for a prediction region obtained from a block encoded / decoded by the affine motion model.
[0291] The prediction region motion information list can also be used in motion vector prediction mode. For example, when the number of motion vector prediction candidates included in the current block's motion vector prediction candidate list is less than the fourteenth threshold, the prediction region merging candidate included in the prediction region motion information list can be set as the motion vector prediction candidate for the current block. Specifically, the motion vector of the prediction region merging candidate can be set as the motion vector prediction candidate.
[0292] When any of the motion vector prediction candidates included in the current block's motion vector prediction candidate list is selected, the selected candidate can be set as the current block's motion vector predictor. Then, after decoding the current block's motion vector residual coefficient, the current block's motion vector can be obtained by adding the motion vector predictor and the motion vector residual coefficient.
[0293] The current block motion vector prediction candidate list can be configured in the following order.
[0294] Spatial Motion Vector Prediction Candidate - Temporal Motion Vector Prediction Candidate - Inter-Prediction Region Fusion Candidate - (Inter-Prediction Region Affine Fusion Candidate) - Zero Motion Vector Prediction Candidate.
[0295] A spatial motion vector prediction candidate means a motion vector prediction candidate obtained from at least one of a neighboring block and a non-neighboring block, and a temporal motion vector prediction candidate means a motion vector prediction candidate obtained from a previous reference image. An affine fusion prediction region candidate represents a motion vector prediction candidate of a prediction region obtained from a block encoded / decoded by the affine motion model. A zero motion vector prediction candidate represents a candidate having a motion vector value of 0.
[0296] A merge processing region may be defined with a size larger than the size of the coding block. The coding blocks included in the merge processing region are not sequentially encoded / decoded and can be processed in parallel. In this case, the fact that the coding blocks are not sequentially encoded / decoded means that the encoding / decoding order is not determined. Accordingly, the encoding / decoding process of the blocks included in the merge processing region can be performed independently. Alternatively, the blocks included in the merge processing region can share merge candidates. In this case, the merge candidates can be obtained based on the merge processing region.
[0297] According to the characteristics described above, the merge processing area can also be called a parallel processing area, a shared merge area (SMR), or a merge evaluation area (MER).
[0298] A merge candidate for the current block can be obtained based on the coding block. However, when the current block is included in a merge processing region larger than the current block, a candidate block included in the merge processing region that is the same as the current block may be set as unavailable as a merge candidate.
[0299] Fig. 25 is a view showing an example in which candidate blocks included in the same merge processing area as the current block are set to be unavailable as a merge candidate.
[0300] In the example shown in Fig. 25(a), when CU5 is encoded / decoded, blocks containing reference samples adjacent to CU5 may be set as candidate blocks. In this case, candidate blocks X3 and X4 included in the merge processing region that is the same as CU5 may be set unavailable as merge candidates for CU5. On the other hand, candidate blocks X0, X1, and X2, which are not included in the merge processing region that is the same as CU5, may be set available as merge candidates.
[0301] In the example shown in Fig. 25(b), when CU8 is encoded / decoded, blocks containing reference samples adjacent to CU8 may be set as candidate blocks. In this case, candidate blocks X6, X7, and X8, included in the merge processing region that is the same as CU8, may be set as unavailable as merge candidates. On the other hand, candidate blocks X5 and X9, which are not included in the merge processing region that is the same as CU8, may be set as available as merge candidates.
[0302] The merge processing area may be square or non-square in shape. Information for defining the merge processing area may be transmitted via a bitstream. The information may comprise at least one of information indicating the shape of the merge processing area and information indicating the size of the merge processing area. When the merge processing area has a non-square shape, at least one of information indicating the size of the merge processing area, information indicating the width and / or height of the merge processing area, and information indicating the ratio of the width and height of the merge processing area may be transmitted via a bitstream.
[0303] The size of the merging processing region may be determined based on at least one of information transmitted by a bitstream, an image resolution, a slice size, and a tile size.
[0304] When motion compensation prediction is performed on a block included in the merge processing area, a merge candidate prediction area obtained based on the motion information of the block on which motion compensation prediction is performed can be added to the motion information list of the prediction area.
[0305] However, in the case where a prediction section merge candidate obtained from a block included in the merge processing area is added to the prediction section motion information list, when another block in the merge processing area, which is actually encoded / decoded after the block is encoded / decoded, is encoded / decoded, the prediction section merge candidate obtained from the block may be used. That is, although dependencies among blocks must be eliminated, when blocks included in the merge processing area are encoded / decoded, motion prediction compensation may be performed using the motion information of another block included in the merge processing area.In order to solve the problem, although encoding / decoding of a block included in the merging processing area is completed, motion information of the encoded / decoded block may not be added to the motion information list of the prediction area.
[0306] Alternatively, when motion-compensated prediction is performed on blocks included in the merging processing area, the prediction section fusion candidates obtained from the blocks may be added to the prediction section motion information list in a predetermined order. In this case, the predetermined order may be determined according to the scanning order of the coding blocks in the merging processing area or the coding tree element. The scanning order may be at least one of raster scanning, horizontal scanning, vertical scanning, and zigzag scanning. Alternatively, the predetermined order may be determined based on the motion information of each block or the number of blocks having the same motion information.
[0307] Alternatively, a prediction segment merge candidate containing unidirectional motion information may be added to the prediction segment merge list before a prediction segment merge candidate containing bidirectional motion information. Otherwise, a prediction segment merge candidate containing bidirectional motion information may be added to the prediction segment merge list before a prediction segment merge candidate containing bidirectional motion information.
[0308] Alternatively, a prediction section merge candidate may be added to the prediction section movement information list according to the order of high usage frequency or low usage frequency within the merge processing region or the code tree element.
[0309] When the current block is included in the merge processing area and the number of merge candidates included in the merge candidate list of the current block is less than the maximum number, merge candidates of the prediction region included in the prediction region movement information list may be added to the merge candidate list. In this case, a setting may be made to not add a merge candidate of a prediction region obtained from a block included in the merge processing area that is the same as the current block to the merge candidate list of the current block.
[0310] Alternatively, when the current block is included in the merge processing area, it can be set to not use the prediction region merge candidates included in the prediction region movement information list. That is, even if the number of merge candidates included in the current block's merge candidate list is less than the maximum number, the prediction region merge candidates included in the prediction region movement information list may not be added to the merge candidate list.
[0311] A prediction section motion information list for a merging processing region or coding tree element can be configured. This prediction section motion information list temporarily stores the motion information of blocks included in the merging processing region. To distinguish a regular prediction section motion information list from a prediction section motion information list for a merging processing region or coding tree element, the prediction section motion information list for a merging processing region or coding tree element is called a temporary motion information list. Furthermore, a prediction section merge candidate stored in a temporary motion information list is called a temporary merge candidate.
[0312] Fig. 26 is a view showing a temporary list of traffic information.
[0313] A temporary motion information list for a coding tree element or merging processing region can be configured. When motion-compensated prediction is performed on the current block included in the coding tree element or merging processing region, the block's motion information may not be added to the inter-picture prediction motion information list HmvpCandList. Instead, a temporary merging candidate obtained from the block may be added to the temporary motion information list HmvpMERCandList. That is, a temporary merging candidate added to the temporary motion information list may not be added to the motion information list of the prediction section. Accordingly, the motion information list of the prediction section may not contain merging candidates of the prediction section obtained based on the motion information of the blocks included in the coding tree element or merging processing region.
[0314] The maximum number of merge candidates that a temporary motion information list can contain can be set equal to the maximum number of motion information lists in the prediction region. Alternatively, the maximum number of merge candidates that a temporary motion information list can contain can be determined according to the size of the code tree element or the merge processing region.
[0315] The current block included in a coding tree element or a merging processing region may be set so as not to use the temporary motion information list for the corresponding coding tree element or the corresponding merging processing region. That is, when the number of merge candidates included in the merge candidate list of the current block is less than the first threshold, the merge candidates of the prediction section included in the motion information list of the prediction section are added to the merge candidate list, and the temporary merge candidates included in the temporary motion information list may not be added to the merge candidate list. Accordingly, the motion information of other blocks included in the same coding tree element or merging processing region as the current block may not be used for motion-compensated prediction of the current block.
[0316] When the encoding / decoding of all blocks included in the code tree element or the merging processing area is completed, the motion information list of the prediction section and the temporary motion information list can be merged.
[0317] Fig. 27 is a view showing an example of merging the prediction section motion information list and the time motion information list.
[0318] When encoding / decoding of all blocks included in a coding tree element or a merging processing region is completed, as shown in the example in Fig. 27, the motion information list of the prediction section may be updated with temporary merging candidates included in the temporary motion information list.
[0319] In this case, the temporary merge candidates included in the temporary motion information list can be added to the motion information list of the prediction section in the order of the temporary merge candidates inserted into the temporary motion information list (i.e., in the ascending or descending order of the index values).
[0320] As another example, temporary merge candidates included in the temporary motion information list can be added to the motion information list of the prediction section in a predetermined order.
[0321] In this case, the predetermined order may be determined based on the scanning order of coding blocks in the merging processing region or coding tree element. The scanning order may be at least one of raster scanning, horizontal scanning, vertical scanning, and zigzag scanning. Alternatively, the predetermined order may be determined based on the motion information of each block or the number of blocks having the same motion information.
[0322] Alternatively, a temporary merge candidate containing unidirectional information may be added to the inter-hop merge list before a temporary merge candidate containing bidirectional information. Otherwise, a temporary merge candidate containing bidirectional information may be added to the prediction hop merge candidate list before a temporary merge candidate containing bidirectional information.
[0323] Alternatively, a temporary merge candidate may be added to the prediction section motion information list according to the order of high usage frequency or low usage frequency within the merge processing area or code tree element.
[0324] When a temporary merge candidate included in the temporary motion information list is added to the prediction section motion information list, redundancy check may be performed on the temporary merge candidate. For example, when a prediction section merge candidate that is the same as a temporary merge candidate included in the temporary motion information list is previously stored in the prediction section motion information list, the temporary merge candidate may not be added to the inter-section motion information list. In this case, redundancy check may be performed on some prediction section merge candidates included in the prediction section motion information list. For example, redundancy check may be performed on prediction section merge candidates with an index that is greater than the 15th threshold or less than the 16th threshold.For example, when a temporal merge candidate is the same as a merge candidate of a prediction section having an index that is greater than or equal to a predetermined value, the temporal merge candidate may not be added to the motion information list of the prediction section.
[0325] A prediction section merge candidate obtained from a block included in a coding tree element or a merge processing region that is the same as the coding tree element or merge processing region of the current block may be restricted from being used as a merge candidate of the current block. For this purpose, block address information may be additionally stored for the prediction section merge candidate. The block address information may comprise one of a block location, a block address, a block index, a location of a merge processing region containing the block, an address of a merge processing region containing the block, an index of a merge processing region containing the block, a location of a coding tree section containing the block, an address of a coding tree section containing the block, and an index of a coding tree section containing the block.
[0326] Fig. 28 and 29 are views showing an example in which a candidate for merging a coding section contains block address information.
[0327] The motion information of a block encoded by inter-picture prediction can be stored as the motion information of a coding region fusion candidate. For example, the motion vector mv of a block can be stored as the motion vector mvCand of a coding region fusion candidate, and the reference image index RefIdx of the block can be stored as the reference image index RefIdxCand of a coding region fusion candidate.
[0328] Additionally, block address information may be stored for a merge candidate coding region. For example, the BLK_ADR address of the block, the MER_ADDR address of the merge processing region containing the block, or the CTU_ADDR address of the code tree element containing the block may be stored.
[0329] In the example shown in Fig. 28, it is shown that the motion vector mvCand, the reference image index RefIdxCand, and the address MER_ADDR of the merging processing area are stored for the merging candidate of the coding section.
[0330] A plurality of address information elements may be stored for a merging candidate of a coding section. In the example shown in Fig. 29, it is shown that the motion vector mvCand, the reference image index RefIdxCand, the address MER_ADDR of the merging processing area, and the address CTU_ADDR of the coding tree element are stored for the merging candidate of a coding section.
[0331] Whether a coding region merge candidate can be used as a merge candidate for the current block can be determined by comparing the address of the current block with the address of the coding region merge candidate. For example, when the index of the merge processing region containing the current block and the index of the merge processing region specified by the coding region merge candidate are the same, the coding region merge candidate can be set as unavailable as a merge candidate for the current block. Alternatively, when the index of the coding tree region containing the current block is the same as the index of the coding tree region specified by the coding region merge candidate, the coding region merge candidate can be set as unavailable as a merge candidate for the current block.That is, a coding region merge candidate obtained from a block included in a merge processing region or a coding tree element that is the same as the merge processing region or the coding tree element of the current block, or a coding region merge candidate obtained from a block adjacent to the current block, may not be added to the merge candidate list of the current block.
[0332] Fig. 30 and 31 are views showing an example in which a merging candidate of a coding section having address information that is the same as the address information of the current block is set to be unavailable as a merging candidate of the current block.
[0333]
[0005] of index 5 indicates index 2, the merging candidate of the coding section can be set to be unavailable as the merging candidate of the current block.
[0334]
[0005] whose index is 5, because the code tree element index points to 2 and the merge processing region index points to 1, the merge candidate of the coding region may be set to be unavailable as the merge candidate of the current block.
[0335] As another example, when the difference between the address information specified by the coding region merge candidate and the address information of the current block is greater than or equal to the seventeenth threshold, the coding region merge candidate may be set to inaccessible. For example, when the difference between the address or index of the coding tree element specified by the coding region merge candidate and the address or index of the coding tree element to which the current block belongs is greater than or equal to the seventeenth threshold, the coding region merge candidate may be set to inaccessible.
[0336] Alternatively, as another example, when the difference between the address information specified by the coding region merge candidate and the address information of the current block is less than or equal to the eighteenth threshold, the coding region merge candidate may be set to unavailable. For example, when the difference between the address or index specified by the coding region merge candidate and the address or index of the current block is less than or equal to the eighteenth threshold, the coding region merge candidate may be set to unavailable. That is, a coding region merge candidate obtained from a block adjacent to the current block may be set to unavailable as a merge candidate for the current block.
[0337] When a merging candidate of a coding section obtained from the current block is added to the coding section's motion information list, redundancy check may be performed. In this case, redundancy check may involve determining whether the motion information and address information of the merging candidate of the coding section obtained from the current block are the same as the motion information and address information of the merging candidate of the coding section previously stored in the coding section's motion information list.For example, when a coding section merging candidate having a motion vector, a reference image index, and address information that are the same as the motion vector, the reference image index, and the address information of a coding section merging candidate obtained from the current block is previously stored, the coding section merging candidate obtained from the current block may not be added to the motion information list of the coding section.Alternatively, when a coding section merging candidate having a motion vector, a reference image index, and address information that are the same as the motion vector, the reference image index, and the address information of the coding section merging candidate obtained from the current block is previously stored, the previously stored coding section merging candidate can be deleted, and the coding section merging candidate obtained from the current block can be added to the list of coding section motion information. In this case, the largest index or the smallest index can be assigned to the coding section merging candidate obtained from the current block.
[0338] Alternatively, it can be set so as not to analyze whether the address information is the same when performing redundancy check. For example, even if the address information of a coding section merge candidate obtained from the current block differs from the address information of a coding section merge candidate previously stored in the coding section movement information list, when the movement information of both coding section merge candidates is the same, the coding section merge candidate obtained from the current block may not be added to the coding section movement information list.Alternatively, although the address information of the merging candidate of the coding section obtained from the current block is the same as the motion information (→ address information) of the merging candidate of the coding section previously stored in the motion information list of the coding section, when the address information (→ motion information) differs, the previously stored merging candidate of the coding section may be deleted, and the merging candidate of the coding section obtained from the current block may be added to the motion information list of the coding section. In this case, the largest index or the smallest index may be assigned to the merging candidate of the coding section obtained from the current block.
[0339] Intra-prediction is used to predict the current block using reconstructed samples that were encoded / decoded around the current block. In this case, samples reconstructed before applying the filter in the loop can be used for intra-prediction of the current block.
[0340] The intra-prediction method includes matrix-based intra-prediction and general intra-prediction that takes into account the directionality relative to neighboring reconstructed samples. Information indicating the intra-prediction method of the current block can be transmitted via a bitstream. The information can be a 1-bit flag. Alternatively, the intra-prediction method of the current block can be determined based on at least one of the location, size, and shape of the current block, or based on the intra-prediction method of the neighboring block. For example, when the current block is on the image boundary, it can be set so as not to apply matrix-based intra-prediction to the current block.
[0341] Intra-prediction, which is matrix-based intra-prediction, is a method for the encoder and decoder to obtain a prediction block for the current block based on the matrix product between a previously stored matrix and the reconstructed samples around the current block. Information specifying any of a plurality of previously stored matrices can be transmitted via the bitstream. The decoder can determine the matrix for intra-prediction of the current block based on the information and size of the current block.
[0342] General intra prediction is a method of obtaining a prediction block for the current block based on an intra prediction mode not based on corner information or an intra prediction mode based on corner information.
[0343] The resulting residual video can be obtained by subtracting the video prediction from the original video. In this case, when the residual video is converted to the frequency domain, the subjective video quality does not significantly decrease, although high-frequency components are removed from the frequency components. Accordingly, when the high-frequency component values are converted to small values or set to 0, the compression efficiency is increased without generating significant visual distortion. Reflecting this characteristic, the current block can be transformed to decompose the residual video into two-dimensional frequency components. The transformation can be performed using a transform method such as the discrete cosine transform (DCT) or discrete sine transform (DST).
[0344] After transforming the current block using DCT or DST, the transformed current block can be re-transformed. In this case, the DCT- or DST-based transformation can be defined as the first transformation, and the re-transformation of the block to which the first transformation was applied can be defined as the second transformation.
[0345] The first transformation can be performed using any of a variety of candidate transformation bases. For example, the first transformation can be performed using any of DCT2, DCT8, or DCT7.
[0346] Different transformation bases can be used for the horizontal direction and vertical direction. Information indicating the combination of the transformation base in the horizontal direction and the transformation base in the vertical direction can be transmitted via a bitstream.
[0347] The elements for performing the first transformation and the second transformation may be different. For example, the first transformation may be performed on an 8×8 block, and the second transformation may be performed on a 4×4 sub-block of the transformed 8×8 block. In this case, the transformation coefficients of the residual sections for which the second transformation was not performed may be set to 0.
[0348] Alternatively, the first transformation may be performed on a 4×4 block, and the second transformation may be performed on an 8×8 region containing the transformed 4×4 block.
[0349] Information indicating whether the second conversion has been performed can be transmitted via the bit stream.
[0350] The decoder can perform the inverse transformation of the second transform (second inverse transform) and can perform the inverse transformation of the first transform (first inverse transform) as a result of the inverse transform. By performing the second inverse transform and the first inverse transform, residual signals for the current block can be obtained.
[0351] Quantization is used to reduce block energy, and the quantization process involves dividing the conversion coefficient into a specific constant value. This constant value can be obtained using the quantization parameter, and the quantization parameter can be defined as a value from 1 to 63.
[0352] When the encoder performs transform and quantization, the decoder can obtain a residual block by inverse quantization and inverse transform. The decoder can obtain a reconstructed block for the current block by adding the prediction block and the residual block.
[0353] When the reconstructed block of the current block is obtained, the information loss caused by the quantization and encoding process can be reduced through in-loop filtering. The in-loop filter may include at least one of a deblocking filter, an adaptive sample offset (SAO) filter, and an adaptive loop filter (ALF).
[0354] The application of the embodiments described above, focused on the decoding process or the encoding process, to the encoding process or the decoding process is included within the scope of the present invention. Changing the embodiments described in a predetermined order in an order different from the described order is also included within the scope of the present invention.
[0355] Although the above embodiments have been described based on a series of steps or flowcharts, this does not limit the order of execution of the present invention, and they can be executed simultaneously or in a different order as needed. In addition, each of the components (e.g., elements, modules, etc.) constituting the block diagram in the embodiments described above can be implemented as a hardware device or software, or a plurality of components can be combined to be implemented as a single hardware device or software. The embodiments described above can be implemented in the form of software instructions that can be executed by various computer components and recorded in a computer-readable storage medium. The computer-readable storage medium can contain software instructions, data files, data structures, etc. independently or in combination.Machine-readable storage media include, for example, magnetic media such as a hard disk, a floppy disk and a magnetic tape, optical storage media such as a CD-ROM and DVD, magneto-optical media such as a floppy optical disk, and hardware devices specially configured to store and execute software instructions such as ROM, RAM, flash memory, etc. The hardware devices described above may be configured to operate using one or more software modules to perform the process according to the present invention, and vice versa.
[0356] The present invention can be applied to an electronic device that encodes and decodes video.
Claims
1. A video decoding method comprising the following steps: getting a merge candidate for the current block; adding the resulting merge candidate to the list of merge candidates; adding at least one prediction section merge candidate included in the prediction section motion information list to the merge candidate list when the number of merge candidates added to the merge candidate list is less than a first threshold value; wherein the index of the at least one prediction section merge candidate is greater than or equal to the difference between the number of prediction section merge candidates included in the prediction section merge candidate list and the second threshold value; and whether to add a merge candidate of a prediction section from at least one merge candidate of a prediction section to the merge candidate list is determined based on a comparison result between the movement information of the merge candidate of a prediction section and the movement information of a merge candidate included in the merge candidate list; obtaining movement information for the current block based on the list of merge candidates; and Perform motion compensation for the current block based on the received motion information.
2. The method according to claim 1, characterized in that the comparison is performed with respect to at least one merger candidate in the list of merger candidates whose index is less than or equal to the third threshold value.
3. The method according to claim 1, characterized in that the comparison is performed with respect to at least one of the merge candidate obtained from the left neighboring block located on the left side of the current block, and the merge candidate obtained from the upper neighboring block located on top of the current block.
4. The method according to claim 1, characterized in that when determining that there is a merge candidate in the list of merge candidates having movement information that is the same as the movement information of the first merge candidate of the prediction section, the first merge candidate of the prediction section is not added to the list of merge candidates, and whether to add the second merge candidate of the prediction section to the list of merge candidates is determined based on the result of a comparison between the movement information of the second merge candidate of the prediction section included in the list of movement information of the prediction section and the movement information of the merge candidate included in the list of merge candidates.
5. The method according to paragraph 1, characterized in that it additionally includes: when determining that the neighboring block of the current block is not included in the predetermined region, adding a candidate for merging the prediction region obtained based on the motion information of the neighboring block to the motion information list of the prediction region; or when determining that the neighboring block is included in the predetermined region, excluding the addition of a candidate for merging the prediction region obtained based on the motion information of the neighboring block to the list of motion information of the prediction region, wherein the predetermined area represents the merge processing area.
6. The method according to paragraph 5, characterized in that it additionally includes: adding a merge candidate of a prediction section obtained based on the motion information of a neighboring block included in the motion information list of the prediction section to a merge candidate list when the number of merge candidates added to the merge candidate list is less than a first threshold value.
7. The method according to paragraph 1, characterized in that it additionally includes: when the size of the neighboring block of the current block is not less than a predetermined size, adding a merging candidate of the prediction section obtained based on the motion information of the neighboring block to the motion information list of the prediction section; or when the size of the neighboring block is smaller than a predetermined size, excluding the addition of a prediction region merge candidate obtained based on the motion information of the neighboring block to the prediction region motion information list.
8. The method according to paragraph 7, characterized in that it additionally includes: adding a merge candidate of a prediction section obtained based on the motion information of a neighboring block included in the motion information list of the prediction section to a merge candidate list when the number of merge candidates added to the merge candidate list is less than a first threshold value.
9. A video encoding method comprising the following steps: getting a merge candidate for the current block; adding the resulting merge candidate to the list of merge candidates; adding at least one prediction section merge candidate included in the prediction section motion information list to the merge candidate list when the number of merge candidates added to the merge candidate list is less than a first threshold value; wherein the index of the at least one prediction section merge candidate is greater than or equal to the difference between the number of prediction section merge candidates included in the prediction section merge candidate list and the second threshold value; and whether to add a merge candidate of a prediction section from at least one merge candidate of a prediction section to the merge candidate list is determined based on a comparison result between the movement information of the merge candidate of a prediction section and the movement information of a merge candidate included in the merge candidate list; obtaining movement information for the current block based on the list of merge candidates; and Perform motion compensation for the current block based on the received motion information.
10. The method according to claim 9, characterized in that the comparison is performed with respect to at least one merger candidate in the list of merger candidates whose index is less than or equal to the third threshold value.
11. The method according to claim 9, characterized in that the comparison is performed with respect to at least one of a merge candidate obtained from a left neighboring block located on the left side of the current block, and a merge candidate obtained from an upper neighboring block located on top of the current block.
12. The method according to claim 9, characterized in that when determining that there is a merge candidate in the list of merge candidates that has movement information that is the same as the movement information of the first merge candidate of the prediction section, the first merge candidate of the prediction section is not added to the list of merge candidates, and whether to add the second merge candidate of the prediction section to the list of merge candidates is determined based on the result of a comparison between the movement information of the second merge candidate of the prediction section included in the list of movement information of the prediction section and the movement information of the merge candidate included in the list of merge candidates.
13. The method according to paragraph 9, characterized in that it additionally includes: when determining that the neighboring block of the current block is not included in the predetermined region, adding a candidate for merging the prediction region obtained based on the motion information of the neighboring block to the motion information list of the prediction region; or when determining that the neighboring block is included in the predetermined region, excluding the addition of a candidate for merging the prediction region obtained based on the motion information of the neighboring block to the list of motion information of the prediction region, wherein the predetermined area represents the merge processing area.
14. The method according to paragraph 13, characterized in that it additionally includes: adding a merge candidate of a prediction section obtained based on the motion information of a neighboring block included in the motion information list of the prediction section to a merge candidate list when the number of merge candidates added to the merge candidate list is less than a first threshold value.
15. The method according to paragraph 9, characterized in that it additionally includes: when the size of the neighboring block of the current block is not less than a predetermined size, adding a merging candidate of the prediction section obtained based on the motion information of the neighboring block to the motion information list of the prediction section; or when the size of the neighboring block is smaller than a predetermined size, excluding the addition of a prediction region merge candidate obtained based on the motion information of the neighboring block to the prediction region motion information list.
16. The method according to paragraph 15, characterized in that it additionally includes: adding a merge candidate of a prediction section obtained based on the motion information of a neighboring block included in the motion information list of the prediction section to a merge candidate list when the number of merge candidates added to the merge candidate list is less than a first threshold value.
17. A video decoding device comprising a storage device, and the storage device comprises software instructions for performing the method according to any one of claims 1 to 8.
18. A video encoding device comprising a storage device, and the storage device comprises software instructions for performing the method according to any one of claims 9 to 16.
19. A machine-readable storage medium containing a computer program and a bitstream stored thereon, wherein the computer program, when executed by a processor, enables the processor to perform the steps of the video encoding method according to any one of paragraphs 9–16 to generate the bitstream.