Video coding method and device, and recording medium storing bitstream
By configuring a block vector list and using adaptive linear filters, the method addresses the challenge of efficiently compressing high resolution video, improving compression performance and prediction accuracy while reducing complexity.
Patent Information
- Application Number
- PCT/KR2024/016898
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-01-15
- Filing Date
- 2024-10-31
- Publication Date
- 2025-05-08
AI Technical Summary
The increasing demand for high resolution video requires efficient compression technologies that existing methods struggle to meet, particularly in terms of complexity and accuracy in predictive block generation.
The method involves configuring a block vector list for the current block, generating predictive blocks based on this list, and using adaptive linear filters to improve prediction accuracy. This includes determining the search range using a predetermined offset vector and selecting block vectors based on cost calculations involving the current and reference blocks.
This approach enhances compression performance, reduces complexity, and improves prediction accuracy by adaptively configuring block vector sets and using optimal linear filters, thereby increasing the efficiency of video encoding and decoding processes.
Smart Images

Figure KR2024016898_08052025_PF_FP_ABST
Abstract
Description
Video coding method and device, and recording medium storing bitstream
[0001] The present invention relates to a video signal processing method and device.
[0002] The market demand for high-resolution video is growing, necessitating technologies capable of efficiently compressing high-resolution images. To address this market need, the ISO / IEC's Moving Picture Expert Group (MPEG) and the ITU-T's Video Coding Expert Group (VCEG) jointly formed the Joint Collaborative Team on Video Coding (JCT-VC). They completed development of the HEVC (High Efficiency Video Coding) video compression standard in January 2013 and have been actively conducting research and development on next-generation compression standards.
[0003] Video compression largely consists of intraprediction, interprediction, transform, quantization, entropy coding, and in-loop filtering. Among these, intraprediction refers to a technique that generates a prediction block for the current block using reconstructed pixels surrounding the current block. The encoder encodes the intraprediction mode used for intraprediction, and the decoder performs intraprediction by reconstructing the encoded intraprediction mode.
[0004] The present disclosure provides a method and device for constructing a block vector list.
[0005] The present disclosure seeks to provide a block vector-based prediction method and device.
[0006] The video decoding method and device according to the present disclosure can generate a block vector list for a current block and generate a prediction block of the current block based on the block vector list. Here, the block vector list can include a plurality of block vectors. At least one of the plurality of block vectors can be derived based on a cost between a template of the current block and a template of a reference block. The reference block can belong to a current picture to which the current block belongs and can belong to a pre-restored area before the current block.
[0007] In the image decoding method and device according to the present disclosure, the search range can be determined based on a predetermined offset vector. The offset vector can be determined based on at least one of a block vector (or motion vector) of the current block or a block vector (or motion vector) of a block surrounding the current block.
[0008] In the image decoding method and device according to the present disclosure, any one block vector among a plurality of block vectors belonging to the block vector list can be selected, and the selected block vector can be corrected based on information for subpixel prediction.
[0009] In the image decoding method and device according to the present disclosure, the information for subpixel prediction can be implicitly derived based on the cost of the current integer pixel and the costs of the surrounding integer pixels of the current integer pixel. Here, the current integer pixel can be indicated by the selected block vector.
[0010] In the image decoding method and device according to the present disclosure, a plurality of block vector sets can be configured based on the block vector list, and each block vector set can include one or more block vectors.
[0011] In the image decoding method and device according to the present disclosure, among the block vectors belonging to the block vector set, a block vector having a cost greater than a predetermined threshold value can be excluded from the block vector set.
[0012] In the image decoding method and device according to the present disclosure, block vectors excluded from the block vector set can be used to construct another block vector set.
[0013] In the image decoding method and device according to the present disclosure, at least one of the plurality of block vectors belonging to the block vector list can be derived based on a combination of block vectors pre-added to the block vector list.
[0014] In the image decoding method and device according to the present disclosure, at least one of the plurality of block vectors belonging to the block vector list can be derived based on a block vector or a motion vector of a block surrounding the current block.
[0015] In the image decoding method and device according to the present disclosure, filter coefficients of a linear filter can be derived based on a template of the current block and a template of the reference block, and a prediction block of the current block can be generated by applying the filter coefficients to the reference block.
[0016] In the image decoding method and device according to the present disclosure, the linear filter may be any one selected from among a plurality of linear filters belonging to a filter candidate set.
[0017] In the image decoding method and device according to the present disclosure, the template of the current block may be divided into a plurality of sub-regions. Here, a first sub-region among the plurality of sub-regions may be a region for deriving filter coefficients of the linear filter, and a second sub-region among the plurality of sub-regions may be a region for calculating a cost based on the filter coefficients of the linear filter.
[0018] The video encoding method and device according to the present disclosure can generate a block vector list for a current block, and can generate a prediction block of the current block based on the block vector list. Here, the block vector list can include a plurality of block vectors. At least one of the plurality of block vectors can be derived based on a cost between a template of the current block and a template of a reference block. The reference block can belong to a current picture to which the current block belongs and can belong to a pre-restored area before the current block.
[0019] A computer-readable recording medium according to the present disclosure can store a bitstream encoded by the image encoding method.
[0020] According to the present disclosure, the compression performance of a decoder / encoder can be improved and the complexity can be reduced by changing or expanding the search range.
[0021] According to the present disclosure, the accuracy of prediction can be improved by improving the method of constructing a block vector set.
[0022] According to the present disclosure, the accuracy of a prediction block can be improved based on an adaptive linear filter, and the performance of a decoder / encoder can be improved by implicitly deriving an optimal linear filter.
[0023] According to the present disclosure, signaling overhead of information for subpixel prediction can be reduced.
[0024] According to the present disclosure, the compression efficiency of an encoder can be improved by constructing and using a single integrated block vector list.
[0025] FIG. 1 is a block diagram showing an image encoding device according to the present disclosure.
[0026] FIG. 2 is a block diagram showing an image decoding device according to the present disclosure.
[0027] FIG. 3 illustrates a method for generating a prediction block based on a block vector as an example according to the present disclosure.
[0028] FIG. 4 illustrates a method for constructing a block vector set as an embodiment according to the present disclosure.
[0029] Figure 5 shows examples of filter shapes that can be used in linear filter mode.
[0030] The video decoding method and device according to the present disclosure can induce an intra prediction mode for the current block by applying a filter to a template of the current block, induce a weight for the intra prediction mode, and generate a prediction block generated based on the intra prediction mode and a final prediction block of the current block based on the weight.
[0031] In the image decoding method and device according to the present disclosure, the template is a peripheral area adjacent to the current block, and the peripheral area may include at least one of a left area, an upper area, or an upper left area.
[0032] In the image decoding method and device according to the present disclosure, the range of the template to which the filter is applied can be variably determined based on the height and width of the current block.
[0033] In the image decoding method and device according to the present disclosure, the center sample among the reference samples input to the filter may belong to at least one of the first reference sample line that is 1 sample away from the boundary of the current block or the second reference sample line that is 2 samples away from the boundary of the current block.
[0034] In the video decoding method and device according to the present disclosure, if there is an unavailable sample among the reference samples input to the filter, the unavailable sample is replaced with an available sample, and the available sample can be generated based on a predetermined interpolation method or a predetermined intra prediction mode.
[0035] In the video decoding method and device according to the present disclosure, the step of deriving the intra prediction mode may include the step of generating a HoG table for a template of the current block, and the HoG table may further include a frequency for each intra prediction mode.
[0036] In the image decoding method and device according to the present disclosure, the step of deriving the intra prediction mode may include a step of generating a HoG of the current block based on a DIMD HoG of a surrounding block.
[0037] In the video decoding method and device according to the present disclosure, the step of deriving the intra prediction mode may include a step of generating an HoG for a reference block specified by a predetermined block vector.
[0038] In the image decoding method and device according to the present disclosure, the final prediction block can be generated based on a weighted sum of a prediction block generated based on the intra prediction mode and a prediction block generated based on the planar mode.
[0039] In the image decoding method and device according to the present disclosure, the Planar mode can be adaptively induced into any one of a general Planar mode, a vertical Planar mode, or a horizontal Planar mode.
[0040] The video encoding method and device according to the present disclosure can derive an intra prediction mode for the current block by applying a filter to a template of the current block, derive a weight for the intra prediction mode, and generate a prediction block generated based on the intra prediction mode and a final prediction block of the current block based on the weight.
[0041] A computer-readable recording medium according to the present invention can store a bitstream encoded by the image encoding method.
[0042] Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings attached to this specification so that those skilled in the art can easily implement the present invention. However, the present invention may be implemented in various different forms and is not limited to the embodiments described herein. In addition, in the drawings, parts irrelevant to the description have been omitted to clearly explain the present invention, and similar parts have been designated with similar reference numerals throughout the specification.
[0043] Throughout this specification, when a part is said to be 'connected' to another part, this includes not only cases where they are directly connected, but also cases where they are electrically connected with another element in between.
[0044] Additionally, whenever a part throughout this specification is said to "include" a component, this does not mean that other components are excluded, but rather that other components may be included, unless otherwise specifically stated.
[0045] Additionally, while terms such as first, second, etc. may be used to describe various components, these components should not be limited by these terms. These terms are used solely to distinguish one component from another.
[0046] Additionally, in the embodiments of the devices and methods described herein, some components of the devices or some steps of the methods may be omitted. Furthermore, the order of some components of the devices or some steps of the methods may be changed. Furthermore, other components or other steps may be inserted into some components of the devices or some steps of the methods.
[0047] Additionally, some components or some steps of the first embodiment of the present invention may be added to the second embodiment of the present invention, or some components or some steps of the second embodiment may be replaced.
[0048] In addition, the components shown in the embodiments of the present invention are independently depicted to represent different characteristic functions, and this does not mean that each component is composed of separate hardware or a single software component. That is, each component is described by listing each component for convenience of explanation, and at least two components among each component may be combined to form a single component, or a single component may be divided into multiple components to perform a function. Such integrated and separate embodiments of each component are also included in the scope of the present invention as long as they do not deviate from the essence of the present invention.
[0049] In this specification, a block can be variously expressed as a unit, an area, a unit, a partition, etc., and a sample can be variously expressed as a pixel, a pel, a pixel, etc.
[0050] Hereinafter, embodiments of the present invention will be described in more detail with reference to the attached drawings. In describing the present invention, duplicate descriptions of identical components will be omitted.
[0051] FIG. 1 is a block diagram showing an image encoding device according to the present disclosure.
[0052] Referring to FIG. 1, a video encoding device (100) may include a picture segmentation unit (110), a prediction unit (120, 125), a transformation unit (130), a quantization unit (135), a reordering unit (160), an entropy encoding unit (165), an inverse quantization unit (140), an inverse transformation unit (145), a filter unit (150), and a memory (155).
[0053] The picture segmentation unit (110) can segment the input picture into at least one processing unit. At this time, the processing unit may be a prediction unit (PU), a transform unit (TU), or a coding unit (CU). Hereinafter, in the embodiments of the present disclosure, the coding unit may be used to mean a unit that performs encoding or a unit that performs decoding.
[0054] A prediction unit may be divided into at least one square or rectangular shape of the same size within a single coding unit, or may be divided such that one prediction unit among the divided prediction units within a single coding unit has a different shape and / or size from another prediction unit. When a prediction unit that performs intra prediction based on a coding unit is generated and is not the minimum coding unit, intra prediction can be performed without being divided into a plurality of NxN prediction units.
[0055] The prediction unit (120, 125) may include an inter prediction unit (120) that performs inter prediction or inter prediction, and an intra prediction unit (125) that performs intra prediction or intra prediction. It may determine whether to use inter prediction or intra prediction for a prediction unit, and determine specific information (e.g., intra prediction mode, motion vector, reference picture, etc.) according to each prediction method. A residual value (residual block) between the generated prediction block and the original block may be input to the transformation unit (130). In addition, prediction mode information, motion vector information, etc. used for prediction may be encoded together with the residual value by the entropy encoding unit (165) and transmitted to the decoder.
[0056] The inter prediction unit (120) may predict a prediction unit based on information of at least one picture among the previous or subsequent pictures of the current picture, and in some cases, may predict a prediction unit based on information of a portion of an encoded region within the current picture. The inter prediction unit (120) may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.
[0057] The reference picture interpolation unit can receive reference picture information from the memory (155) and generate pixel information less than an integer pixel from the reference picture. In the case of luminance pixels, a DCT-based 8-tap interpolation filter with different filter coefficients can be used to generate pixel information less than an integer pixel in units of 1 / 4 pixels. In the case of a chrominance signal, a DCT-based 4-tap interpolation filter with different filter coefficients can be used to generate pixel information less than an integer pixel in units of 1 / 8 pixels.
[0058] The motion prediction unit can perform motion prediction based on a reference picture interpolated by the reference picture interpolation unit. Various methods such as FBMA (Full search-based Block Matching Algorithm), TSS (Three Step Search), and NTS (New Three-Step Search Algorithm) can be used to derive a motion vector. The motion vector can have a motion vector value in units of 1 / 2 or 1 / 4 pixels based on the interpolated pixel. The motion prediction unit can predict the current prediction unit by using different motion prediction methods. Various methods such as Skip Mode, Merge Mode, AMVP Mode, Intra Block Copy Mode, and Affine Mode can be used as motion prediction methods.
[0059] The intra prediction unit (125) can generate a prediction unit based on reference pixel information surrounding the current block, which is pixel information within the current picture. If the surrounding block of the current prediction unit is a block on which inter prediction has been performed and the reference pixel is a pixel on which inter prediction has been performed, the reference pixel included in the block on which inter prediction has been performed can be replaced and used with reference pixel information of the surrounding block on which intra prediction has been performed. That is, if the reference pixel is not available, the unavailable reference pixel information can be replaced and used with at least one reference pixel among the available reference pixels.
[0060] Additionally, a residual block containing residual value information, which is the difference between the prediction unit that performed the prediction based on the prediction unit generated in the prediction unit (120, 125) and the original block of the prediction unit, can be generated. The generated residual block can be input to the transformation unit (130).
[0061] In the transformation unit (130), the residual block including the residual value information of the prediction unit generated through the original block and the prediction unit (120, 125) can be transformed using a transformation method such as DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), or KLT. Whether to apply DCT, DST, or KLT 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.
[0062] The quantization unit (135) can quantize values converted to the frequency domain by the transformation unit (130). The quantization coefficients can vary depending on the block or the importance of the image. The values produced by the quantization unit (135) can be provided to the dequantization unit (140) and the reordering unit (160).
[0063] The rearrangement unit (160) can perform rearrangement of coefficient values for quantized residual values.
[0064] The rearrangement unit (160) can change a two-dimensional block-shaped coefficient into a one-dimensional vector form through a coefficient scanning method. For example, the rearrangement unit (160) can change the two-dimensional block-shaped coefficient into a one-dimensional vector form by scanning from the DC coefficient to the coefficient of the high-frequency region using a zig-zag scan method. Depending on the size of the transformation unit and the intra prediction mode, a vertical scan that scans the two-dimensional block-shaped coefficient in the column direction or a horizontal scan that scans the two-dimensional block-shaped coefficient in the row direction may be used instead of the zig-zag scan. That is, depending on the size of the transformation unit and the intra prediction mode, it is possible to determine which scan method among the zig-zag scan, the vertical scan, and the horizontal scan is to be used.
[0065] The entropy encoding unit (165) can perform entropy encoding based on the values produced by the rearrangement unit (160). Entropy encoding can use various encoding methods such as, for example, Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC). In this regard, the entropy encoding unit (165) can encode residual value coefficient information of the encoding unit from the rearrangement unit (160) and the prediction units (120, 125). In addition, according to the present disclosure, it is possible to signal and transmit information indicating that motion information is derived and used on the decoder side and information on a technique used to derive motion information.
[0066] The inverse quantization unit (140) and the inverse transformation unit (145) inversely quantize the values quantized in the quantization unit (135) and inversely transform the values transformed in the transformation unit (130). The residual values generated in the inverse quantization unit (140) and the inverse transformation unit (145) can be combined with the predicted prediction units predicted through the motion estimation unit, motion compensation unit, and intra prediction unit included in the prediction unit (120, 125) to generate a reconstructed block.
[0067] The filter unit (150) may include at least one of a deblocking filter, an offset correction unit, and an ALF (Adaptive Loop Filter). The deblocking filter may remove block distortion caused by boundaries between blocks in a restored picture. The offset correction unit may correct the offset from the original image on a pixel-by-pixel basis for the image on which deblocking has been performed. In order to perform offset correction for a specific picture, a method may be used in which the pixels included in the image are divided into a certain number of regions, the regions to be offset are determined, and the offset is applied to the regions, or the offset is applied by considering edge information of each pixel. The ALF (Adaptive Loop Filtering) may be performed based on a value obtained by comparing the filtered restored image with the original image. After dividing the pixels included in the image into a predetermined group, one filter to be applied to the group is determined, and filtering may be performed differentially for each group.
[0068] The memory (155) can store a restored block or picture produced through the filter unit (150), and the stored restored block or picture can be provided to the prediction unit (120, 125) when performing inter prediction.
[0069] FIG. 2 is a block diagram showing an image decoding device according to the present disclosure.
[0070] Referring to FIG. 2, the image decoding device (200) may include an entropy decoding unit (210), a rearrangement unit (215), an inverse quantization unit (220), an inverse transformation unit (225), a prediction unit (230, 235), a filter unit (240), and a memory (245).
[0071] When a video bitstream is input to a video encoding device, the input bitstream can be decoded in the opposite procedure to that of the video encoding device.
[0072] The entropy decoding unit (210) can perform entropy decoding in a procedure opposite to that of the entropy encoding unit of the video encoder. For example, various methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) can be applied in response to the method performed in the video encoder.
[0073] The entropy decoding unit (210) can decode information related to intra prediction and inter prediction performed in the encoder.
[0074] The reordering unit (215) can perform reordering based on the method by which the bitstream entropy-decoded by the entropy decoding unit (210) is reordered by the encoding unit. The coefficients expressed in the form of a one-dimensional vector can be reordered by restoring them back to coefficients in the form of a two-dimensional block.
[0075] The inverse quantization unit (220) can perform inverse quantization based on the quantization parameters provided by the encoder and the coefficient values of the rearranged block.
[0076] The inverse transform unit (225) can perform inverse transform, i.e., inverse DCT, inverse DST, and inverse KLT, on the transforms performed by the transform unit, i.e., DCT, DST, and KLT, on the quantization result performed by the image encoder. The inverse transform can be performed based on the transmission unit determined by the image encoder. In the inverse transform unit (225) of the image decoder, a transform technique (e.g., DCT, DST, KLT) can be selectively performed according to a plurality of pieces of information, such as a prediction method, the size of the current block, and the prediction direction.
[0077] The prediction unit (230, 235) can generate a prediction block based on the prediction block generation related information provided by the entropy decoding unit (210) and the previously decoded block or picture information provided by the memory (245).
[0078] As described above, when performing intra prediction or intra prediction in the same manner as the operation in the image encoder, if the size of the prediction unit and the size of the transformation unit are the same, intra prediction for the prediction unit is performed based on the pixels on the left side of the prediction unit, the pixels on the upper left side, and the pixels on the upper side. However, when performing intra prediction, if the size of the prediction unit and the size of the transformation unit are different, intra prediction can be performed using reference pixels based on the transformation unit. In addition, intra prediction using NxN division only for the minimum coding unit can be used.
[0079] The prediction unit (230, 235) may include a prediction unit determination unit, an inter prediction unit, and an intra prediction unit. The prediction unit determination unit may receive various information such as prediction unit information input from the entropy decoding unit (210), prediction mode information of an intra prediction method, and motion prediction-related information of an inter prediction method, and may distinguish a prediction unit from a current encoding unit and determine whether the prediction unit performs inter prediction or intra prediction. On the other hand, if the encoder (100) does not transmit motion prediction-related information for the inter prediction, but instead transmits information indicating that motion information is to be derived and used on the decoder side and information on a technique used to derive motion information, the prediction unit determination unit determines whether the inter prediction unit (230) performs prediction based on the information transmitted from the encoder (100).
[0080] The inter prediction unit (230) can perform inter prediction on the current prediction unit based on information included in at least one picture among the previous picture or the subsequent picture of the current picture including the current prediction unit, using information required for inter prediction of the current prediction unit provided by the image encoder. In order to perform inter prediction, it can be determined based on the encoding unit whether the motion prediction method of the prediction unit included in the corresponding encoding unit is one of Skip Mode, Merge Mode, AMVP Mode, Intra Block Copy Mode, and Affine Mode.
[0081] The intra prediction unit (235) can generate a prediction block based on pixel information within the current picture. If the prediction unit is a prediction unit that has performed intra prediction, intra prediction can be performed based on intra prediction mode information of the prediction unit provided by the image encoder.
[0082] The intra prediction unit (235) may include an Adaptive Intra Smoothing (AIS) filter, a reference pixel interpolation unit, and a DC filter. The AIS filter is a unit that performs filtering on the reference pixels of the current block and can determine whether to apply the filter based on the prediction mode of the current prediction unit and apply it. AIS filtering can be performed on the reference pixels of the current block using the prediction mode and AIS filter information of the prediction unit provided by the image encoder. If the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.
[0083] The reference pixel interpolation unit can interpolate the reference pixel to generate a reference pixel of a pixel unit less than an integer value when the prediction mode of the prediction unit is a prediction unit that performs intra prediction based on the pixel value interpolated from the reference pixel. When the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating the reference pixel, the reference pixel may not be interpolated. The DC filter can generate a prediction block through filtering when the prediction mode of the current block is the DC mode.
[0084] The restored block or picture may be provided to a filter unit (240). The filter unit (240) may include a deblocking filter, an offset correction unit, and an ALF.
[0085] Information about whether a deblocking filter has been applied to a corresponding block or picture can be received from a video encoding device, and if a deblocking filter has been applied, information about whether a strong or weak filter has been applied. The deblocking filter of the video decoder can receive information related to the deblocking filter provided by the video encoder, and the video decoder can perform deblocking filtering on the corresponding block.
[0086] The offset correction unit can perform offset correction on the restored image based on the type of offset correction applied to the image during encoding and information on the offset value. ALF can be applied to the encoding unit based on information on whether ALF is applied and ALF coefficient information provided from the encoder. This ALF information can be provided by being included in a specific parameter set.
[0087] The memory (245) can store a restored picture or block so that it can be used as a reference picture or reference block, and can also provide the restored picture to an output unit.
[0088] In video coding, interprediction removes temporal redundancy by patching a prediction block similar to the current block from a previously encoded reference picture. In contrast, intraprediction generates a prediction block based on reference samples. Meanwhile, block vector-based prediction assumes that regions similar to the current block exist within the same picture, and thus uses a technique to patch regions similar to the current block from previously encoded or encoded regions within the same picture.
[0089] Block vector-based prediction can be defined as a method of generating an implicit block vector list on the decoder side to reduce the amount of bits used for signaling block vectors, and generating a prediction block based on an index that specifies a block vector in the block vector list. Block vectors used before the current block can be stored and managed in a table, and the table can be utilized when block vector-based prediction is used in a block to be encoded / decoded thereafter. Block vector-based prediction can be used by Intra Block Copy (IBC) or Intra Template Matching Prediction (TMP). Hereinafter, a method of generating a prediction block based on block vectors will be described in detail with reference to FIG. 3.
[0090] Referring to FIG. 3, a block vector list for the current block can be generated (S300).
[0091] A block vector list can be generated based on the block vectors of blocks previously encoded / decoded before the current block. The blocks previously encoded / decoded before the current block may be neighboring blocks adjacent to the current block. Here, the neighboring blocks may include at least one of an upper neighboring block, a left neighboring block, an upper-left neighboring block, a lower-left neighboring block, or an upper-right neighboring block. Alternatively, the neighboring blocks may further include blocks that are not adjacent to the current block.
[0092] A block vector list can be generated by performing template matching based on a template of a current block within a predetermined search range. The predetermined search range may belong to a region that has been previously restored before the current block within a picture to which the current block belongs. The template of the current block is a surrounding region adjacent to the current block, wherein the surrounding region may include at least one of an upper surrounding region, a left surrounding region, or an upper-left surrounding region. The template of the current block may be composed of K sample lines, and K may be an integer of 1, 2, 3, 4, or more. The block vector list may include a plurality of block vectors. For example, the search range may be calculated as in the following mathematical expression 1.
[0093] [Mathematical Formula 1]
[0094] SearchRange_w = max(64, a*BlockW)
[0095] SearchRange_h = max(64, a*BlockH)
[0096] SearchRegion_w = SearchRange_w*2 + BlockW
[0097] SearchRegion_h = SearchRange_h*2 + BlockH
[0098] The entire search range can be divided into predetermined block units (e.g., 1x1, 2x2, 3x3, or 4x4 units), and a block vector list can be constructed by calculating the cost between the template corresponding to the central sample position of each block unit and the template of the current block. The cost can be calculated based on the Sum of Absolute Difference (SAD), the Sum of Absolute Transformed Difference (SATD), or the MSE. Alternatively, the cost can be calculated based on a combination of at least two of the above-mentioned SAD, SATD, or MSE. The following cost can also be interpreted in the same meaning.
[0099] For example, a search can be performed in 3x3 units to construct a block vector list including 30 block vectors. The 30 block vectors in the block vector list can be rearranged in ascending order of cost. For all or some of the 30 block vectors, inter-template costs can be calculated for 8 surrounding sample locations, and a block vector list can be constructed based on 19 block vectors with the smallest cost. The 8 surrounding sample locations can refer to 8 sample locations adjacent to the central sample location within the 3x3 unit.
[0100] The aforementioned search range can be expanded or modified. For convenience of explanation, the aforementioned search range will be referred to as the first search range. To distinguish it from the first search range, the expanded or modified search range will be referred to as the second search range.
[0101] The second search range according to the present disclosure may be determined based on a predetermined offset vector. The offset vector may specify a position shifted by a predetermined offset from the position of the current block. An area extended by N samples from the area specified by the offset vector may be determined as the search range. Here, N may be an integer greater than or equal to 1.
[0102] A block vector derived based on an Intra Block Copy (IBC) may be used as the offset vector. Alternatively, a block vector derived by performing template matching based on a template of a current block within a predetermined search range may be used as the offset vector. Alternatively, a block vector (or motion vector) of a neighboring block adjacent to the current block may be used as the offset vector. Here, the neighboring block may include at least one of a left neighboring block, an upper neighboring block, a lower left neighboring block, an upper right neighboring block, or an upper left neighboring block. For example, only the block vector of the left neighboring block may be used as the offset vector. Alternatively, the offset vector may be derived based on the block vectors of a plurality of neighboring blocks. However, the present invention is not limited thereto. A block that is not adjacent to the current block but has been encoded / decoded before the current block may also be used.
[0103] Alternatively, the second search range may be determined based on a combination of at least two of the first search range, the block vector (or motion vector) of the current block, or the block vector (or motion vector) of the surrounding block.
[0104] Referring to FIG. 3, a prediction block of the current block can be generated based on a block vector list (S310).
[0105] The encoder can determine an optimal mode by applying predefined Intra TMP modes to the current block based on the block vector list of the current block. The encoder can signal information indicating the optimal mode to the decoder. The predefined Intra TMP modes can include at least one of a sub-pel mode, a fusion mode, or a linear filter mode. The decoder can determine the Intra TMP mode of the current block based on the signaled information, and apply the determined Intra TMP mode to the current block based on the block vector list of the current block to generate a prediction block.
[0106] Alternatively, the encoder and decoder may only have one Intra TMP mode defined, where the Intra TMP mode may be a sub-pixel mode, a combined mode, or a linear filter mode.
[0107] Subpixel mode
[0108] Any one of a plurality of block vectors belonging to a block vector list can be selected. The encoder can signal an index (tmpIdx) indicating the selected block vector to the decoder. The decoder can select any one of a plurality of block vectors belonging to the block vector list based on the signaled index (tmpIdx). A prediction block of the current block can be generated based on the selected block vector.
[0109] The selected block vector may be a vector having the precision of an integer pixel. The selected block vector may be corrected based on information for sub-pixel prediction. The corrected block vector may be a vector having the precision of a sub-pixel. The information for sub-pixel prediction may include at least one of first information (tmpSubPelPrecision) indicating the precision of the block vector or second information (tmpSubPelDirection) indicating the direction of the block vector. The first information may have a value between 0 and 3, and the values between 0 and 3 may indicate sub-pixel precisions of 1-pel, 1 / 2-pel, 1 / 4-pel, and 3 / 4-pel, respectively. The second information may have a value between 0 and 7, and the values between 0 and 7 may indicate the top, bottom, left, right, top-left, top-right, bottom-left, and bottom-right directions, respectively, based on the position of the integer pixel.
[0110] To reduce the signaling overhead of information for subpixel prediction, the information for subpixel prediction may be implicitly derived in the decoder.
[0111] To construct a block vector list (or block vector set), the cost between the template of the current block and the template of the reference block within the search range can be calculated. At this time, the cost for all or some integer pixels existing in the search range can be stored. The cost of a subpixel can be predicted based on the cost of the integer pixels.
[0112] For example, the Error Surface technique can be used to predict the cost of a subpixel. The transmission of syntax for subpixel prediction can be replaced by the Error Surface technique. According to the Error Surface technique, if among three integer pixels (i.e., the current integer pixel, the left integer pixel, and the right integer pixel), the current integer pixel has the smallest cost and the left integer pixel has the largest cost, the location of the subpixel expected to have the smallest cost can be assumed to be located between the current integer pixel and the right integer pixel.
[0113] A block vector of a sub-pixel unit can be predicted based on the cost of neighboring integer pixels adjacent to a current integer pixel. Here, the current integer pixel may be an integer pixel indicated by the block vector (or, an upper left sample in a reference block specified by the block vector). The neighboring integer pixels may include at least one of a left integer pixel, an upper integer pixel, a right integer pixel, or a lower integer pixel. The sub-pixel unit may mean a 1 / 16-pel unit. Alternatively, the sub-pixel unit may mean a 1 / 2-pel, a 1 / 4-pel, or a 3 / 4-pel unit.
[0114] For example, a block vector in sub-pixel units can be predicted based on the cost of the current integer pixel and the costs of the surrounding integer pixels. However, if the cost of the current integer pixel is N times or more smaller than the costs of the surrounding integer pixels, the block vector in sub-pixel units may not be predicted.
[0115] If the cost of the current integer pixel is M times or more greater than the cost of the surrounding integer pixels, the precision of the block vector in sub-pixel units can be adjusted. Based on the difference between the cost of the current integer pixel and the cost of the surrounding integer pixels, the precision of the predicted block vector in sub-pixel units can be adjusted.
[0116] The cost of a new integer pixel can be calculated based on the combination of the cost of the current integer pixel and the cost of the surrounding integer pixels, and a block vector in sub-pixel units can be predicted based on this.
[0117] It is also possible to predict a block vector of a sub-pixel unit based on a combination of at least two of the block vector prediction methods of the above-described encoding unit.
[0118] Since the decoder can store the cost of block vectors corresponding to all or some integer pixels existing within the search range, when predicting block vectors in sub-pixel units according to the proposed method, the overhead of the syntax for sub-pixel prediction can be reduced.
[0119] The aforementioned subpixel mode can be replaced by a single mode. The single mode can be distinguished from the combined mode described below in that it generates a prediction block based on a single block vector selected from a list of block vectors. Alternatively, the subpixel mode and the single mode can be defined separately.
[0120] Combined mode
[0121] The combined mode may be a mode that generates prediction blocks based on at least two block vectors selected from a block vector list.
[0122] A block vector list can be divided into multiple block vector sets. Each block vector set can be composed of one or more block vectors. Each block vector set can be composed of up to five block vectors. For example, if a block vector list is composed of 15 block vectors, the block vector list can be divided into three block vector sets, and each block vector set can be composed of five block vectors. In this case, the indices 0, 1, and 2 can be assigned to the three block vector sets, respectively, and the block vectors belonging to the block vector sets can have indices 0 to 4, 5 to 9, and 10 to 14, respectively.
[0123] If the cost difference between block vectors within each block vector set is large, the block vector may be excluded from the block vector set. For example, among the block vectors belonging to the block vector set, block vector(s) with a cost greater than a predetermined threshold may be excluded from the block vector set. The threshold may be set differently for each block vector set. Here, the threshold may be set as in the following mathematical expression 2.
[0124] [Equation 2]
[0125] Threshold set0 = SAD Idx0 << 1
[0126] Threshold set1 = SAD Idx5 *1.2
[0127] Threshold set2 = SAD Idx10 *1.2
[0128] In Equation 2, Threshold set0 can mean a threshold applied to a set of block vectors with an index of 0. SAD Idx0 can mean the cost of a block vector with an index of 0 within a set of block vectors with an index of 0. Threshold set1 can mean a threshold applied to a set of block vectors with an index of 1. SAD Idx5 can mean the cost of a block vector with an index of 5 within a set of block vectors with an index of 1. Threshold set2 can mean a threshold applied to a set of block vectors with an index of 2. SAD Idx10 can mean the cost of a block vector with an index of 10 within a set of block vectors with an index of 2.
[0129] Example 1
[0130] One or more block vectors can be filtered based on the cost between block vectors belonging to the block vector set. Here, filtering may mean a process of removing one or more block vectors from the block vector set.
[0131] Since the indices assigned to block vectors belonging to a block vector set are fixed, the filtered block vector may not be included in other block vector set(s).
[0132] Since the block vectors in the block vector list are sorted in ascending order of cost, the filtered block vectors from the block vector set with index N can also be added to the block vector set with index (N+1). This allows for generating predicted blocks with higher accuracy.
[0133] All or some of the block vectors in the block vector list can be grouped into multiple block vector sets. Here, some of the block vectors may be the top T (e.g., 15) block vectors with the smallest cost among all the block vectors in the block vector list.
[0134] During the process of constructing a block vector set, one or more block vectors may be excluded from the block vector set based on a predetermined threshold, as discussed above. The block vector(s) excluded based on the threshold may be used in another block vector set. Hereinafter, a method for constructing a block vector set will be described with reference to FIG. 4.
[0135] The meanings of the variables, constants, and functions in Figure 4 are as follows.
[0136] 1) numBVSets: Block vector set index that specifies one of multiple block vector sets.
[0137] 2) BVIndex: A block vector index that specifies one of multiple block vectors belonging to a block vector set.
[0138] 3) maxBVCand: maximum value of block vector index (or maximum number of block vectors included in the block vector list)
[0139] 4) numFusionBV: The number of block vectors that make up the current block vector set.
[0140] 5) SAD(): SAD of the input block vector
[0141] 6) BVCand[]: Block vector array
[0142] 7) scale[]: An array of coefficients for calculating thresholds based on the block vector set index.
[0143] 8) theta: threshold corresponding to the current block vector set index
[0144] 9) maxFusionBV: The maximum number of block vectors that can be included in the block vector set.
[0145] 10) fusionBV[]: Block vector array (2D array) that constitutes each block vector set
[0146] fusionBV[] can be constructed according to the algorithm in Fig. 4. The signaling method of the combined mode can be adaptively changed based on the variable numBVSets.
[0147] The above threshold (theta) can be derived based on the cost obtained in the process of constructing the block vector list. For example, the threshold can be used as a value obtained by multiplying or adding a real number of one or more to the smallest cost among the block vectors constituting the current block vector set. Alternatively, the threshold can be derived through a weighted sum of one or more smallest costs in the block vector list. Alternatively, the threshold can be adjusted to a larger or smaller value based on the block vector set index and / or the number of block vectors constituting the block vector set. Alternatively, the threshold can be derived based on the spatial correlation and / or cost between the template indicated by the block vector to be compared with the threshold and the template of the current block. The threshold for the current block vector set can also be derived through a combination of at least two of the above-described threshold derivation methods.
[0148] One or more block vectors excluded from the above-described filtering process can be used when constructing another block vector set. A new block vector set can be constructed based only on one or more block vectors that are not excluded from the above-described filtering process. Alternatively, a new block vector set can be constructed based on one or more block vectors excluded from the above-described filtering process. Alternatively, a new block vector set can be constructed based on the block vectors excluded from the above-described filtering process and the block vectors that are not excluded from the above-described filtering process. Alternatively, a new block vector set can be constructed based only on one or more block vectors excluded from the above-described filtering-based block vector set construction methods. A block vector set can also be constructed through a combination of at least two of the above-described filtering-based block vector set construction methods.
[0149] The accuracy of the combined mode can be improved by using block vectors excluded from the current block set in the next block vector set. Furthermore, block vectors excluded through the filtering process can be utilized to construct a larger number of block vector sets.
[0150] A block vector set for the current block can be constructed based on the prediction mode of a reference block previously encoded / decoded before the current block. Here, the reference block may belong to the same picture as the current block or may be spatially adjacent to the current block.
[0151] For example, if a reference block is encoded / decoded in a combined mode of Intra TMP mode, at least one of the block vector sets of the reference block may be added to the block vector set of the current block. Alternatively, at least one of the block vector sets of the current block may be replaced with the block vector set of the reference block.
[0152] For example, if the reference block is decoded / decoded in the sub-pixel mode or linear filter mode of the Intra TMP mode, at least one of the block vector sets of the reference block may be added to the block vector set of the current block. Alternatively, at least one of the block vector sets of the current block may be replaced with the block vector set of the reference block.
[0153] For example, if the reference block is encoded / decoded in Intra Block Copy (IBC) mode, at least one of the block vector sets of the reference block may be added to the block vector set of the current block. Alternatively, at least one of the block vector sets of the current block may be replaced with the block vector set of the reference block.
[0154] For example, if a reference block has one or more motion vectors (or block vectors), the motion vectors may be added to the block vector set of the current block. Alternatively, at least one block vector belonging to the block vector set of the current block may be replaced with the motion vector of the reference block. However, the motion vector of the reference block may be scaled by considering the temporal distance between the current picture and the reference picture of the reference block. In this case, the scaled motion vector may be added to the block vector set of the current block.
[0155] For example, information (coding parameters) regarding the intra or inter prediction mode of a reference block may be added to the block vector set of the current block. Alternatively, at least one block vector belonging to the block vector set of the current block may be replaced with the above information.
[0156] A block vector set of the current block can be constructed through a combination of at least two of the above-described embodiments.
[0157] Tables 1 and 2 illustrate how to signal block vector set indices using the Truncated Rice (TR) binarization method. The signaling method may vary depending on the number of block vector sets available to the current block. Any binarization method that can distinguish the maximum bit length using a prefix, suffix, etc. may be used. Table 1 illustrates a case where the number of block vector sets is three, and Table 2 illustrates a case where the number of block vector sets is four.
[0158] Block vector set index binarization 00110211
[0159] Block vector set index binarization 0011021103111
[0160] For example, the value of numBVSets can be adjusted to be less than or equal to the original value based on the cost between the predicted block generated from the block vector set and the original block. Alternatively, a threshold value can be derived based on the cost of one or more block vectors, and the value of numBVSets can be adjusted to be less than or equal to the original value based on this threshold value.
[0161] Example 2
[0162] For each block vector that can be utilized in IBC and / or Intra TMP, the cost between the template of the current block and the template of the reference block pointed to by the block vector can be calculated, and the block vector list can be sorted based on the calculated cost.
[0163] Multiple block vector sets can be constructed based on the above block vector list. Each block vector set can have N or fewer block vector(s). Here, N can be an integer greater than or equal to 1.
[0164] For example, a block vector set can be constructed based on the top K block vectors in ascending order of cost. Alternatively, a block vector set can be constructed based on the bottom K block vectors in ascending order of cost. Here, K can be an integer greater than or equal to 1.
[0165] For example, among the block vectors sorted in ascending order of cost, a block vector set can be constructed based on block vectors that are sequentially spaced apart from the block vector index with the smallest cost by a predetermined interval. Here, the predetermined interval can be an integer greater than or equal to 1. Among the block vectors sorted in ascending order of cost, a block vector set can be constructed based on block vectors that are sequentially spaced apart from the block vector index with the largest cost by a predetermined interval. Here, the predetermined interval can be an integer greater than or equal to 1.
[0166] For example, a block vector set can be constructed based on one or more block vectors having indices that are multiples of M, where M can be an integer greater than or equal to 0. The value of M can be different for each block vector set index.
[0167] A block vector set can be constructed through a combination of at least two of the above-described embodiments.
[0168] Each of the above block vector sets can be filtered based on at least one of a cost between templates (e.g., cost of a block vector), a block vector set index, or the number of block vectors belonging to the block vector set.
[0169] For example, block vector(s) having a cost greater than or equal to a predetermined threshold may be excluded from the block vector set. The threshold may be derived as the value obtained by multiplying the smallest cost within the block vector set by C. Alternatively, the threshold may be derived as the value obtained by multiplying the largest cost within the block vector set by C. Here, C may be a real number greater than or equal to 0. Block vectors excluded from a block vector set may not be included in other block vector sets.
[0170] For example, the maximum number of block vectors that can be configured in a block vector set having an index of N can be determined based on the number of block vectors configured in a block vector set having an index of (N-1). Specifically, the maximum number of block vectors that can be configured in a block vector set having an index of N can be set to be equal to the number of block vectors configured in a block vector set having an index of (N-1). Alternatively, the maximum number of block vectors that can be configured in a block vector set having an index of N can be set to a value obtained by adding or subtracting P from the number of block vectors configured in a block vector set having an index of (N-1). Here, P can be an integer greater than or equal to 1.
[0171] For example, among the block vectors belonging to the block vector set having an index of N, the top X block vector(s) in ascending order of cost can be reused in the block vector set having an index of (N+1). Alternatively, among the block vectors belonging to the block vector set having an index of N, the bottom X block vector(s) in ascending order of cost can be reused in the block vector set having an index of (N+1). Here, X can be an integer greater than or equal to 1.
[0172] For example, a new block vector can be generated by a weighted sum of at least two block vectors among the block vectors belonging to the block vector set having an index of (N-1), and the generated new block vector can be added to the block vector set having an index of N.
[0173] A block vector set can be generated or filtered based on a combination of at least two of the above-described embodiments.
[0174] One or more new block vectors can be generated based on a combination of block vectors belonging to a block vector list, and the generated new block vector(s) can be added to the block vector list.
[0175] For example, a new block vector can be generated based on the weighted sum of the top N block vectors in ascending order of cost within the block vector list. A new block vector can be generated based on the weighted sum of the bottom N block vectors in ascending order of cost within the block vector list. Here, N can be an integer greater than or equal to 2. A new block vector can be generated based on the weighted sum of the block vector with the smallest cost and the block vector with the largest cost within the block vector list.
[0176] For example, among the block vectors sorted in ascending order of cost in the block vector list, a new block vector can be generated based on a weighted sum of block vectors that are sequentially spaced apart from the block vector index with the smallest cost by a predetermined interval. Among the block vectors sorted in ascending order of cost in the block vector list, a new block vector can be generated based on a weighted sum of block vectors that are sequentially spaced apart from the block vector index with the largest cost by a predetermined interval. Here, the predetermined interval can be an integer greater than or equal to 1.
[0177] For example, a new block vector can be generated based on a weighted sum of block vectors with indices that are multiples of M, where M can be an integer greater than or equal to 0. The above process can be performed repeatedly for different values of M.
[0178] A new block vector can be generated based on a combination of at least two of the above-described embodiments.
[0179] The method described above can be used to create one or more new block vectors, and the block vector list can be updated based on these new block vectors. A block vector set can be constructed or an additional block vector set can be created based on the updated block vector list.
[0180] The aforementioned method can be used continuously in the encoder and decoder. Alternatively, the aforementioned method can be used adaptively in the encoder and decoder. To this end, information indicating the availability / use of the aforementioned method can be encoded in the encoder and signaled to the decoder. Alternatively, information indicating the availability / use of the aforementioned method can be implicitly derived in the encoder and decoder.
[0181] Example 3
[0182] The encoder and decoder may define two or more intra prediction modes utilizing block vector lists. In this case, a block vector list according to each intra prediction mode may be generated. Alternatively, a single block vector list (hereinafter referred to as a unified block vector list) that applies equally to the two or more intra prediction modes may be generated.
[0183] The integrated block vector list according to the present disclosure can be generated based on a combination of the block vector list construction methods discussed above. For example, the integrated block vector list can include at least one of a block vector derived through template matching with the template of the current block within a predetermined search range, or a block vector of a block previously encoded / decoded.
[0184] For example, the integrated block vector list can be used when the intra prediction mode of the current block is Intra TMP (or a combined mode of Intra TMP). The integrated block vector list can be used when the intra prediction mode of the current block is IBC (or a combined mode of IBC).
[0185] For example, a unified block vector list can be generated based on block vectors surrounding the current block. Specifically, a unified block vector list can be generated based on the block vectors of neighboring blocks spatially adjacent to the current block. A unified block vector list can also be generated based on the block vectors of neighboring blocks not adjacent to the current block. A unified block vector list can be generated by sequentially using the block vector(s) that were encoded / sub-encoded prior to the current block.
[0186] For example, a unified block vector list can be generated based on motion vectors surrounding the current block. The motion vectors can be distinguished from block vectors in that they specify reference blocks within a picture that has a different temporal order (e.g., POC) from the current picture.
[0187] Specifically, the motion vector of a neighboring block spatially adjacent to the current block can be set as a block vector and added to the unified block vector list. The motion vector of a neighboring block spatially adjacent to the current block can be scaled, the scaled motion vector can be set as a block vector and added to the unified block vector list.
[0188] The motion vector of a block that is not spatially adjacent to the current block can be set as a block vector and added to the unified block vector list. The motion vector of a block that is not spatially adjacent to the current block can be scaled, the scaled motion vector can be set as a block vector, and this can be added to the unified block vector list.
[0189] The motion vector immediately preceding the current block can be set as a block vector and added to the unified block vector list. The motion vector immediately preceding the current block can be scaled, the scaled motion vector can be set as a block vector, and added to the unified block vector list.
[0190] The motion vector(s) previously encoded / decoded in the current block can be set as block vector(s) and added to the unified block vector list. The motion vector(s) previously encoded / decoded in the current block can be scaled, and the scaled motion vector(s) can be set as block vector(s) and added to the unified block vector list.
[0191] One or more new block vectors can be generated by taking the average of at least two block vectors belonging to the integrated block vector list, and can be added to the integrated block vector list.
[0192] The aforementioned block vector set may be constructed based on the integrated block vector list, or an additional block vector set may be generated.
[0193] At least two block vectors can be selected from the previously generated block vector list (or, integrated block vector list). To this end, the encoder can encode the indices of the at least two block vectors and signal them to the decoder. The decoder can select at least two block vectors from the block vector list (or, integrated block vector list) based on the signaled indices. Prediction blocks can be generated based on the selected block vectors. The prediction block of the current block can be generated based on the generated prediction blocks.
[0194] Alternatively, multiple block vector sets may be constructed based on a block vector list or a unified block vector list. In this case, the encoder may encode an index that specifies one of the multiple block vector sets and signal it to the decoder. The decoder may then specify one of the multiple block vector sets based on the signaled index.
[0195] Prediction blocks can be generated based on all or part of the block vectors belonging to the above-mentioned specified block vector set. A prediction block of the current block can be generated based on the generated prediction blocks. Some of the block vectors can be specified based on an explicitly signaled block vector index. Alternatively, some of the block vectors can be implicitly specified in the encoder and decoder.
[0196] At least two prediction blocks may be generated based on a combination of at least two of the above-described embodiments 1 to 3.
[0197] Below, we will examine a method for generating a prediction block of the current block based on the generated prediction blocks.
[0198] A prediction block of the current block can be generated through a weighted sum of the above-generated prediction blocks (first method). Here, the weights for the weighted sum can be derived based on the costs of the block vectors used to generate the prediction blocks.
[0199] Alternatively, a predetermined filter (e.g., Weiner filter) may be applied to the generated prediction blocks to generate a prediction block of the current block (second method). The filter coefficients (or filtering weights) of the predetermined filter may be explicitly encoded in the encoder and signaled to the decoder.
[0200] Alternatively, a prediction block of the current block can be generated by selectively using either the first or second method (the third method). To this end, a flag (weight type flag) for selecting either the first or second method can be signaled.
[0201] Linear filter mode
[0202] The linear filter mode may be a mode that derives filter coefficients of a linear filter based on a template and generates a prediction block of the current block based on the derived filter coefficients.
[0203] Specifically, the filter coefficients of a linear filter can be derived based on the template of the current block and the template of the reference block. Here, the reference block can be specified based on any one of a plurality of block vectors belonging to the block vector list. The filter coefficients of the linear filter can be applied to the reference block to generate a predicted block of the current block.
[0204] The filter coefficients of the linear filter can be derived based on at least one of a current sample, a reference sample, or a neighboring sample adjacent to the reference sample. Here, the current sample may refer to a sample belonging to a template area of the current block. The reference sample may be a sample belonging to the template area of the reference block, and may be a sample corresponding to the position of the current sample. The neighboring samples adjacent to the reference sample may include at least one of an upper neighboring sample, a left neighboring sample, a lower neighboring sample, or a right neighboring sample.
[0205] For example, all samples within the template region of a reference block can be used as the reference samples. If there are a total of 64 samples within the template region of the reference block, the optimal filter coefficients can be derived through the Gaussian Elimination technique as shown in the following mathematical expression 3.
[0206] [Equation 3]
[0207]
[0208] In mathematical expression 3, C i represents the value of the reference sample, and N i , S i , E i and W i may represent the values of the upper, lower, right, and left surrounding samples of the corresponding reference sample, respectively (where i is an integer greater than or equal to 0 and less than or equal to 63). B may be a predetermined offset. c0 to c5 may be filter coefficients applied to the reference sample, surrounding samples, and offset, respectively. ref i can represent the value of the current sample corresponding to the reference sample.
[0209] A prediction block of the current block can be generated by applying filter coefficients to samples of a reference block in a predetermined scan order (e.g., raster scan).
[0210] The linear filter mode can use an N-tap linear filter. Here, N can be a fixed value that is identically pre-defined for the encoder and decoder. For example, N can be 5. However, the present invention is not limited thereto, and N can be an integer of 3, 6, 7, 9, or a higher integer. Multiple linear filters can be defined for the encoder and decoder, and any one of the multiple linear filters can be selectively used. The multiple pre-filters can have different numbers of taps. Alternatively, the multiple linear filters can have the same number of taps but different filter coefficients. Alternatively, the multiple linear filters can have different numbers of taps and filter coefficients.
[0211] Figure 5 shows examples of filter shapes that can be used in linear filter mode.
[0212] All or part of the filter shapes illustrated in Fig. 5 may correspond to the plurality of linear filters described above. Various linear filters may be defined depending on the filter application area (or the positions of the samples input to the linear filter). For example, a linear filter that inputs the upper, lower, left, and right surrounding samples relative to the current sample may be used. Alternatively, a linear filter that inputs the upper left, upper right, lower left, and lower right surrounding samples relative to the current sample may be used.
[0213] The filter application area may be expanded or reduced based on the size of the current block and / or reference block. Here, the reference block may refer to a block that belongs to the current picture and has been encoded / decoded before the current block.
[0214] The filter application area may be expanded or reduced based on the ratio of the height and width of the current block and / or surrounding blocks. Alternatively, the filter application area may be adjusted to an asymmetrical area based on the ratio of the height and width of the current block and / or surrounding blocks.
[0215] The linear filter used in the reference block of the current block can be used in the current block.
[0216] A linear filter combining at least two of the examples of linear filters described above may also be used.
[0217] The filter candidate set including the above filter shape and / or multiple linear filters can be explicitly / implicitly configured based on Video Parameter Set (VPS), Sequence Parameter Set (SPS), Picture Parameter Set (PPS), Picture Header (PH), Slice Header (SH), Slice Data, Coding Unit, or any user setting.
[0218] When a linear filter mode is used, a prediction block can be generated based on at least one linear filter among multiple linear filters. The linear filter used in this case can be derived explicitly or implicitly in the decoder.
[0219] The template of the current block can be divided into multiple sub-regions. Among the multiple sub-regions, the first sub-region may be a region for deriving filter coefficients of each linear filter. Among the multiple sub-regions, the second sub-region may be a region for calculating costs based on the filter coefficients of each linear filter. The template of the reference block can also be divided in the same manner as the template of the current block.
[0220] For example, a template can be divided into multiple sub-regions based on the size of the current block and / or reference block.
[0221] For example, filter coefficients can be derived based on sub-regions located close to the current block and / or reference block. Conversely, costs can be calculated based on sub-regions located far from the current block and / or reference block.
[0222] For example, filter coefficients can be derived based on sub-regions located far from the current block and / or reference block. Conversely, costs can be calculated based on sub-regions located close to the current block and / or reference block.
[0223] For example, the first sub-region may be defined as a set of odd-numbered columns within the template, and the second sub-region may be defined as a set of even-numbered columns within the template. Alternatively, the first sub-region may be defined as a set of even-numbered columns within the template, and the second sub-region may be defined as a set of odd-numbered columns within the template. Alternatively, the first sub-region may be defined as a set of odd-numbered rows within the template, and the second sub-region may be defined as a set of even-numbered rows within the template. Alternatively, the first sub-region may be defined as a set of even-numbered rows within the template, and the second sub-region may be defined as a set of odd-numbered rows within the template.
[0224] For example, a template can be divided into multiple sub-regions based on the height and width ratio of the current block and / or reference block.
[0225] Templates can be distinguished based on a combination of at least two of the above-described embodiments.
[0226] Even if the template of the current block is divided into multiple sub-regions, filter coefficients can be derived based on the entire template, and costs can be calculated based on some regions within the template. Here, some regions may be sub-regions located close to the current block. Alternatively, the some regions may be sub-regions located far from the current block. Alternatively, the some regions may be defined as a set of odd-numbered columns within the template. Alternatively, the some regions may be defined as a set of even-numbered columns within the template. Alternatively, the some regions may be defined as a set of odd-numbered rows within the template. Alternatively, the some regions may be defined as a set of even-numbered rows within the template. Hereinafter, some regions may be interpreted with the same meaning.
[0227] Alternatively, even if the template of the current block is divided into multiple sub-regions, the filter coefficients can be derived based on some regions within the template and the cost can be calculated based on the entire template.
[0228] Alternatively, filter coefficients can be derived based on the entire template, without dividing into sub-regions, and costs can be calculated based on the entire template.
[0229] For each of the pre-defined linear filters, filter coefficients can be derived. Based on each linear filter, a cost between a predicted sample and a restored sample can be calculated. Here, the predicted sample may be generated by applying a linear filter to a sample belonging to the entire template or a portion of a reference block. The restored sample may be a sample belonging to the template of the current block and corresponding to a sample to which the linear filter has been applied. A cost is calculated for each of the pre-defined linear filters, and one of the pre-defined linear filters can be selected based on the calculated cost. The linear filter with the smallest cost among the calculated costs can be selected.
[0230] Since the templates of the current block and the reference block are equally accessible to the encoder and decoder, the encoder and decoder can implicitly determine the linear filter using the same method. Alternatively, the encoder can determine the optimal linear filter or filter shape by calculating the RD cost for each linear filter or filter shape belonging to the filter candidate set. The encoder can also explicitly signal the information specifying the determined optimal linear filter or filter shape by encoding it to the decoder.
[0231] The predicted block of the current block can be generated based on the linear filter selected through the aforementioned method. When at least two linear filters are selected, a predicted block can be generated based on each linear filter, and the predicted block of the current block can be generated through a weighted sum of the generated predicted blocks.
[0232] The various embodiments of the present disclosure are not intended to list all possible combinations but rather to illustrate representative aspects of the present disclosure, and the matters described in the various embodiments may be applied independently or in combinations of two or more.
[0233] Additionally, various embodiments of the present disclosure may be implemented by hardware, firmware, software, or a combination thereof. In the case of hardware implementation, the embodiments may be implemented by one or more ASICs (Application Specific Integrated Circuits), DSPs (Digital Signal Processors), DSPDs (Digital Signal Processing Devices), PLDs (Programmable Logic Devices), FPGAs (Field Programmable Gate Arrays), general processors, controllers, microcontrollers, microprocessors, etc.
[0234] The scope of the present disclosure includes software or machine-executable instructions (e.g., operating systems, applications, firmware, programs, etc.) that cause operations according to the methods of various embodiments to be executed on a device or a computer, and a non-transitory computer-readable medium having such software or instructions stored thereon and executable on the device or computer.
Claims
1. A step of generating a block vector list for the current block; and A step of generating a prediction block of the current block based on the block vector list, The above block vector list includes a plurality of block vectors, At least one of the plurality of block vectors is derived based on a cost between the template of the current block and the template of the reference block, A method for decoding an image, wherein the above reference block belongs to a current picture to which the current block belongs and belongs to an area previously restored before the current block.
2. In paragraph 1, The above search range is determined based on a predetermined offset vector, A method for decoding an image, wherein the offset vector is determined based on at least one of a block vector of the current block or a block vector of a surrounding block of the current block.
3. In paragraph 1, One block vector among a plurality of block vectors belonging to the above block vector list is selected, An image decoding method, wherein the above-mentioned selected block vector is corrected based on information for subpixel prediction.
4. In paragraph 3, The information for the above subpixel prediction is implicitly derived based on the cost of the current integer pixel and the cost of the surrounding integer pixels of the current integer pixel, A method for decoding an image, wherein the current integer pixel is indicated by the selected block vector.
5. In paragraph 1, Multiple block vector sets are constructed based on the above block vector list, A method for decoding an image, wherein each block vector set includes one or more block vectors.
6. In paragraph 5, An image decoding method, wherein a block vector having a cost greater than a predetermined threshold among block vectors belonging to a block vector set is excluded from the block vector set.
7. In paragraph 6, A method for decoding an image, wherein block vectors excluded from the above block vector set are used to construct another block vector set.
8. In paragraph 1, An image decoding method, wherein at least one of a plurality of block vectors belonging to the above block vector list is derived based on a combination of block vectors pre-added to the above block vector list.
9. In paragraph 1, A method for decoding an image, wherein at least one of a plurality of block vectors belonging to the block vector list is derived based on a block vector or a motion vector of a block surrounding the current block.
10. In paragraph 1, The filter coefficients of the linear filter are derived based on the template of the current block and the template of the reference block, An image decoding method in which a prediction block of the current block is generated by applying the filter coefficients to the reference block.
11. In paragraph 10, A method for decoding an image, wherein the linear filter is one selected from among a plurality of linear filters belonging to a filter candidate set.
12. In paragraph 10, The template of the current block above is divided into multiple sub-areas, An image decoding method, wherein a first sub-region among the plurality of sub-regions is a region for deriving filter coefficients of the linear filter, and a second sub-region among the plurality of sub-regions is a region for calculating a cost based on the filter coefficients of the linear filter.
13. A step of generating a block vector list for the current block; and A step of generating a prediction block of the current block based on the block vector list, The above block vector list includes a plurality of block vectors, At least one of the plurality of block vectors is derived based on a cost between the template of the current block and the template of the reference block, A method for encoding an image, wherein the above reference block belongs to a current picture to which the current block belongs and belongs to an area that has been previously restored before the current block.
14. A computer-readable storage medium storing a bitstream generated based on the image encoding method according to Article 13.
Citation Information
Patent Citations
Device And Method For Setting Mosquito Net Or Wind Proof Sheet Using Velcro
KR1020240175491A
Mold Processing Machine and Injection Molding Method for Manufacturing Dental Equipment
KR1020250062020A
Ultra-thin glass plate cutting device and cutting method using the same
KR102589336B1
Method, apparatus, and medium for video processing
WO2023098829A1