Video signal processing method and device therefor
The use of CIIP and intra-frame prediction techniques addresses inefficiencies in existing video signal processing by optimizing prediction modes, resulting in enhanced coding efficiency for video signals.
Patent Information
- Application Number
- PCT/KR2026/006214
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-06-20
- Filing Date
- 2026-05-20
- Publication Date
- 2026-11-26
Smart Images

Figure KR2026006214_26112026_PF_FP_ABST
Abstract
Description
Video signal processing method and apparatus for the same
[0001] The present invention relates to a video signal processing method and an apparatus for the same, and more specifically, to a video signal processing method and apparatus for encoding or decoding a video signal.
[0002] Compression encoding refers to a series of signal processing techniques used to transmit digitized information over communication lines or store it in a form suitable for storage media. Targets of compression encoding include voice, video, and text; specifically, the technology of performing compression encoding on video is called video image compression. Compression encoding of video signals is achieved by removing redundant information by considering spatial correlation, temporal correlation, and probabilistic correlation. However, due to recent advancements in various media and data transmission media, there is a demand for more efficient video signal processing methods and devices.
[0003] The purpose of this specification is to provide a video signal processing method and an apparatus for the same to increase the coding efficiency of a video signal.
[0004] The present specification provides a video signal processing method and an apparatus for the same.
[0005] In the present specification, a video signal decoding device includes a processor, wherein the processor acquires an inter-picture prediction block of the current block and acquires an intra-picture prediction block of the current block, and using the inter-picture prediction block and the intra-picture prediction block, restores the current block through CIIP (Combined Inter / Intra-picture Prediction), and the intra-picture prediction block may be acquired based on the inter-picture prediction block.
[0006] In the present specification, a video signal encoding device includes a processor, wherein the processor acquires an inter-picture prediction block of a current block and acquires an intra-picture prediction block of the current block, and using the inter-picture prediction block and the intra-picture prediction block, encodes the current block through CIIP (Combined Inter / Intra-picture Prediction), wherein the intra-picture prediction block is acquired based on the inter-picture prediction block and can generate a bitstream based on the encoded current block.
[0007] In the present specification, a computer-readable non-transient storage medium for storing a bitstream, wherein the bitstream is decoded by a decoding method, the decoding method comprises: a step of acquiring an inter-picture prediction block of a current block; a step of acquiring an intra-picture prediction block of the current block; and a step of reconstructing the current block through a Combined Inter / Intra-picture Prediction (CIIP) using the inter-picture prediction block and the intra-picture prediction block, wherein the intra-picture prediction block may be acquired based on the inter-picture prediction block.
[0008] In addition, in the present specification, the intra-frame prediction block can be obtained by applying DIMD (Decoder side intra mode derivation) to the inter-frame prediction block.
[0009] In addition, in the present specification, the processor of the video signal decoding / encoding device may, when there are multiple prediction modes obtained by applying DIMD to the inter-frame prediction block, obtain a predetermined number of prediction modes in order of highest frequency among the multiple prediction modes, and obtain the intra-frame prediction block by performing a weighted sum on the prediction blocks obtained using each of the predetermined number of prediction modes.
[0010] In addition, in the present specification, the intra-frame prediction block may be obtained based on a second prediction mode obtained by applying TIMD (Template intra mode derivation) to the inter-frame prediction block.
[0011] In addition, in the present specification, the processor of the video signal decoding / encoding device may obtain the in-frame prediction block by performing a weighted sum on the prediction blocks obtained using each of the plurality of prediction modes when TIMD is applied to the in-frame prediction block and there are multiple prediction modes.
[0012] The above-mentioned intra-screen prediction block can be obtained based on any one of the prediction modes included in the intra-prediction mode buffer corresponding to a specific location of the reference block used to obtain the above-mentioned inter-screen prediction block.
[0013] In addition, the processor of the video signal decoding / encoding device described in the present specification may divide the current block into a plurality of sub-blocks, apply DIMD or TIMD to each of the plurality of sub-blocks to obtain prediction modes corresponding to each of the plurality of sub-blocks, obtain a plurality of prediction blocks based on the prediction modes corresponding to each of the plurality of sub-blocks, and perform a weighted sum on the plurality of prediction blocks to obtain the prediction block within the frame.
[0014] When a Position Dependent Intra Prediction (PDP) is applied to the current block, the intra-screen prediction block can be obtained based on a matrix corresponding to the PDP.
[0015] The present specification provides a method for efficiently processing video signals.
[0016] The effects obtainable in this specification are not limited to those mentioned above, and other unmentioned effects will be clearly understood by those skilled in the art from the description below.
[0017] FIG. 1 is a schematic block diagram of a video signal encoding device according to one embodiment of the present specification.
[0018] FIG. 2 is a schematic block diagram of a video signal decoding device according to one embodiment of the present specification.
[0019] FIG. 3 illustrates an embodiment in which a coding tree unit is divided into coding units within a picture.
[0020] FIG. 4 illustrates a method for signaling the splitting of a quad tree and a multi-type tree according to one embodiment of the present specification.
[0021] FIGS. 5 and 6 illustrate an intra-prediction method according to an embodiment of the present specification in more detail.
[0022] Figure 7 is a diagram showing the locations of surrounding blocks used to construct a list of motion candidates in inter prediction.
[0023] FIG. 8 illustrates a method for determining a reference pixel line based on a template according to one embodiment of the present specification.
[0024] FIG. 9 is a diagram showing block vectors related to an IBC encoding method according to one embodiment of the present specification.
[0025] Figure 10 shows a method for predicting the current block using RRIBC in the horizontal direction.
[0026] Figure 11 shows a method for predicting the current block using RRIBC in the vertical direction.
[0027] FIG. 12 shows a block vector of a block encoded in Intra TMP mode according to one embodiment of the present specification.
[0028] FIG. 13 illustrates a case where the current block is divided by a GPM mode according to one embodiment of the present specification, and the divided area is encoded in an IBC mode.
[0029] FIG. 14 illustrates a method in which a current block is encoded in IBC-CIIP mode according to one embodiment of the present specification.
[0030] FIG. 15 shows an example of a reference region and filter shape used to derive CCCM parameters according to an embodiment of the present specification.
[0031] FIG. 16 illustrates a method for correcting motion information according to one embodiment of the present specification.
[0032] FIGS. 17 and 18 illustrate a method for correcting motion information using a DMVR according to one embodiment of the present specification.
[0033] FIG. 19 shows a location for inducing a surrounding block according to one embodiment of the present specification.
[0034] FIGS. 20 to 23 illustrate affine motion prediction according to one embodiment of the present specification.
[0035] FIGS. 24 and FIGS. 25 illustrate modes of affine motion prediction according to one embodiment of the present specification.
[0036] FIGS. 26 and 27 illustrate the induction of an affine motion predictor according to one embodiment of the present specification.
[0037] FIGS. 28 and 29 illustrate a method for deriving affine candidates from a history parameter-based affine model according to one embodiment of the present specification.
[0038] FIG. 30 illustrates a method for deriving an auto-relocated block vector (Auto relocated BV) according to one embodiment of the present specification.
[0039] FIG. 31 illustrates a method for inducing automatic relocation movement candidates according to one embodiment of the present specification.
[0040] FIG. 32 illustrates a matrix-based intra-prediction method according to one embodiment of the present specification.
[0041] FIG. 33 illustrates a method for obtaining a CIIP prediction signal according to one embodiment of the present specification.
[0042] Figure 34 illustrates a method in which a video signal processing device acquires a prediction signal within a CIIP frame using the BV-PSG method, which is a prediction mode within a CIIP frame.
[0043] FIGS. 35 and 36 illustrate a method of applying an MVG-DIMD method utilizing motion vectors according to one embodiment of the present specification to a prediction mode induction within a CIIP screen.
[0044] FIGS. 37 to 40 illustrate an MVG-TIMD method according to one embodiment of the present specification.
[0045] Figures 41 and 42 illustrate how a video signal processing device performs the MVG-RIMD method.
[0046] FIG. 43 illustrates an MVG-DIMD method performed in sub-block units according to one embodiment of the present specification.
[0047] FIG. 44 illustrates an MVG-TIMD method performed in sub-block units according to one embodiment of the present specification.
[0048] FIGS. 45 and 46 illustrate an MVG-RIMD method performed in sub-block units according to one embodiment of the present specification.
[0049] FIGS. 47 to 49 show reference areas used when a prediction signal within a CIIP screen is generated in sub-block units according to one embodiment of the present specification.
[0050] FIG. 50 illustrates a method for generating prediction blocks in sub-block units according to one embodiment of the present specification.
[0051] FIG. 51 illustrates a syntax element according to one embodiment of the present specification.
[0052] FIG. 52 illustrates a method in which a video signal processing device according to one embodiment of the present specification generates a CIIP prediction signal.
[0053] FIG. 53 illustrates a method in which a video signal processing device processes a video signal according to one embodiment of the present specification.
[0054] The terms used in this specification have been selected to be as widely used as possible, taking into account their functions in the present invention; however, these may vary depending on the intent, convention, or emergence of new technologies of those skilled in the art. In addition, in certain cases, terms have been arbitrarily selected by the applicant, and in such cases, their meanings will be described in the relevant description of the invention. Therefore, it should be noted that the terms used in this specification should be interpreted based on their actual meanings and the overall content of this specification, rather than merely their names.
[0055] In this specification, 'A and / or B' may be interpreted as having the same meaning as 'comprising at least one of A or B'.
[0056] Some terms in this specification may be interpreted as follows. Depending on the case, "coding" may be interpreted as "encoding" or "decoding." In this specification, a device that performs encoding of a video signal to generate a video signal bitstream is referred to as an encoding device or an encoder, and a device that performs decoding of a video signal bitstream to restore a video signal is referred to as a decoding device or a decoder. Additionally, in this specification, "video signal processing device" is used as a conceptual term encompassing both encoders and decoders. "Information" is a term that includes values, parameters, coefficients, elements, etc., and since its meaning may be interpreted differently depending on the case, the present invention is not limited thereto. "Unit" is used to refer to a basic unit of image processing or a specific location of a picture, and refers to an image region that includes at least one of a luminance (luma) component and a chroma component. Additionally, 'block' refers to an image region containing specific components among luminance components and chrominance components (i.e., Cb and Cr). However, depending on the embodiment, terms such as 'unit', 'block', 'partition', 'signal', and 'region' may be used interchangeably. Furthermore, in this specification, 'current block' refers to a block scheduled for current encoding, and 'reference block' refers to a block that has already been encoded or decoded and is used as a reference in the current block. Additionally, in this specification, terms such as 'luma', 'luminance', and 'Y' may be used interchangeably. Furthermore, in this specification, terms such as 'chroma', 'chroma', 'chrominance', and 'Cb or Cr' may be used interchangeably, and since the chrominance component is divided into two types, Cb and Cr, each chrominance component may be used separately. Additionally, in this specification, 'unit' may be used as a concept that includes a coding unit, a prediction unit, and a transformation unit."Picture" refers to a field or a frame, and depending on the embodiment, these terms may be used interchangeably. Specifically, if the captured image is an interlaced image, a single frame is separated into an odd (or odd, top) field and an even (or even, bottom) field, and each field is configured as a single picture unit for encoding or decoding. If the captured image is a progressive image, a single frame is configured as a picture for encoding or decoding. Furthermore, in this specification, terms such as "error signal," "residual signal," "residual signal," "residual signal," and "difference signal" may be used interchangeably. Additionally, in this specification, terms such as "intra-prediction mode," "intra-prediction directional mode," "in-frame prediction mode," and "in-frame prediction directional mode" may be used interchangeably. Furthermore, in this specification, terms such as "inter-prediction mode" and "inter-frame prediction mode" may be used interchangeably. Additionally, terms such as 'motion' and 'movement' may be used interchangeably in this specification. Furthermore, in this specification, 'left', 'upper left', 'upper', 'upper right', 'right', 'lower right', 'lower side', and 'lower left' may be used interchangeably with 'left end', 'upper left end', 'top', 'upper right end', 'right end', 'lower right end', 'bottom', and 'lower left end'. Additionally, 'element' and 'member' may be used interchangeably. POC (Picture Order Count) represents temporal position information of a picture (or frame), may be the playback order displayed on the screen, and each picture may have a unique POC. Additionally, in this specification, the size of a block may be the sum or product of the width and height of the block. Alternatively, the size of a block may refer to the number of samples within the block.Bit depth refers to the range of sample values expressed in bits; when the bit depth is 8 bits, the range of sample values is from 0 to 255. Internal bit depth refers to the bit depth when the bit depth is expanded to effectively encode an image in a video signal processing device (e.g., encoder, decoder). Generally, a video signal processing device expands the bit depth before encoding the image and reduces it back to the bit depth of the original input image when outputting after decoding. For example, encoding and decoding are performed by expanding an image with an 8-bit depth to an image with a 10-bit depth.
[0057] FIG. 1 is a schematic block diagram of a video signal encoding device (100) according to one embodiment of the present specification. Referring to FIG. 1, the encoding device (100) of the present invention includes a conversion unit (110), a quantization unit (115), an inverse quantization unit (120), an inverse conversion unit (125), a filtering unit (130), a prediction unit (150), and an entropy coding unit (160).
[0058] The conversion unit (110) converts the residual signal, which is the difference between the input video signal and the prediction signal generated by the prediction unit (150), to obtain a conversion coefficient value. For example, the Discrete Cosine Transform (DCT), Discrete Sine Transform (DST), or Wavelet Transform may be used. The Discrete Cosine Transform and Discrete Sine Transform divide the input picture signal into blocks to perform the conversion. In the conversion, the coding efficiency may vary depending on the distribution and characteristics of the values within the conversion area. The conversion kernel used for the conversion of the residual block may be a conversion kernel having separable characteristics of vertical conversion and horizontal conversion. In this case, the conversion of the residual block can be performed by separating it into vertical conversion and horizontal conversion. For example, the encoder can perform a vertical conversion by applying the conversion kernel in the vertical direction of the residual block. Additionally, the encoder may perform a horizontal transformation by applying a transformation kernel in the horizontal direction of the residual block. In this disclosure, the term "transformation kernel" may be used to refer to a set of parameters used for transforming a residual signal, such as a transformation matrix, a transformation array, a transformation function, or a transformation. For example, the transformation kernel may be any one of a plurality of available kernels. Furthermore, transformation kernels based on different transformation types may be used for the vertical transformation and the horizontal transformation, respectively.
[0059] Transformation coefficients are distributed such that higher coefficients are found towards the top-left corner of the block, while coefficients closer to '0' are found towards the bottom-right corner. As the current block size increases, there is a higher likelihood of '0' coefficients existing in the bottom-right region. To reduce the transformation complexity of large blocks, only an arbitrary top-left region can be retained, and the remaining regions can be reset to '0'.
[0060] Additionally, an error signal may exist only in some regions of a coding block. In this case, the conversion process may be performed only on some arbitrary regions. As an example of implementation, in a block of size 2Nx2N, an error signal may exist only in the first 2NxN block, and the conversion process may be performed only on the first 2NxN block, but the second 2NxN block may not be encoded or decoded without the conversion process being performed. Here, N can be any positive integer.
[0061] The encoder may perform an additional transformation before the transformation coefficients are quantized. The aforementioned transformation method is referred to as a primary transform, and the additional transformation may be referred to as a secondary transform. The secondary transform may be optional for each residual block. According to one embodiment, the encoder may improve coding efficiency by performing a secondary transform on regions where it is difficult to concentrate energy in the low-frequency region using only the primary transform. For example, a secondary transform may be additionally performed on blocks where residual values appear significantly in directions other than the horizontal or vertical direction of the residual block. Unlike the primary transform, the secondary transform may not be performed separately into a vertical transform and a horizontal transform. Such a secondary transform may be referred to as a Low Frequency Non-Separable Transform (LFNST).
[0062] The quantization unit (115) quantizes the conversion coefficient value output from the conversion unit (110).
[0063] To increase coding efficiency, instead of coding the picture signal as is, a method is used to predict the picture using an already coded region through a prediction unit (150), and to obtain a restored picture by adding the residual value between the original picture and the predicted picture to the predicted picture. To prevent mismatches from occurring in the encoder and decoder, information that is also available in the decoder must be used when performing prediction in the encoder. To this end, the encoder performs a process of restoring the currently encoded block. The inverse quantization unit (120) inversely quantizes the transform coefficient value, and the inverse transform unit (125) restores the residual value using the inversely quantized transform coefficient value. Meanwhile, the filtering unit (130) performs filtering operations to improve the quality of the restored picture and enhance coding efficiency. For example, a deblocking filter, a Sample Adaptive Offset (SAO), and an adaptive loop filter may be included. The filtered picture is stored in a decoded picture buffer (DPB, 156) to be output or used as a reference picture.
[0064] A deblocking filter is a filter designed to remove distortion within blocks generated at the boundaries between blocks in a restored picture. The encoder can determine whether to apply a deblocking filter to a given boundary based on the distribution of pixels within a few columns or rows relative to an arbitrary edge within the block. When a deblocking filter is applied to a block, the encoder can apply a Long Filter, Strong Filter, or Weak Filter depending on the filtering intensity. Additionally, horizontal and vertical filtering can be processed in parallel. Sample Adaptive Offset (SAO) can be used to correct the offset from the original image on a pixel-by-pixel basis for residual blocks to which the deblocking filter has been applied. To correct the offset for a specific picture, the encoder can use a Band Offset method, which divides the pixels contained in the image into a certain number of regions, determines the region to be corrected, and applies the offset to that region. Alternatively, the encoder may use an Edge Offset method, which applies an offset by considering the edge information of each pixel. Cross-component SAO (CC-SAO) is a method for compensating samples. In CC-SAO, similar to conventional SAO, the video signal processor classifies the reconstructed samples into categories and derives an offset for each category to add to the reconstructed samples. While conventional SAO uses only the luminance and chrominance components, CC-SAO classifies categories using all three components: luminance and two chrominance components. An Adaptive Loop Filter (ALF) is a method that divides pixels included in an image into specific groups, determines a single filter to be applied to each group, and performs differential filtering for each group.Information regarding whether to apply ALF can be signaled at the coding unit level, and the shape and coefficients of the ALF filter to be applied may vary depending on each block. Additionally, an ALF filter of the same form (fixed form) may be applied regardless of the characteristics of the target block. Bilateral Filter (BF) filtering is a method that applies a sample-level offset derived from the difference in change between neighboring samples on a sample-by-sample basis.
[0065] The prediction unit (150) includes an intra prediction unit (152) and an inter prediction unit (154). The intra prediction unit (152) performs intra prediction within the current picture, and the inter prediction unit (154) performs inter prediction by predicting the current picture using a reference picture stored in the decoded picture buffer (156). The intra prediction unit (152) performs intra prediction from restored regions within the current picture and transmits intra encoding information to the entropy coding unit (160). The intra encoding information may include at least one of an intra prediction mode, an MPM (Most Probable Mode) flag, an MPM index, and information regarding a reference sample. The inter prediction unit (154) may again be configured to include a motion estimation unit (154a) and a motion compensation unit (154b). The motion estimation unit (154a) refers to a specific area of the restored reference picture to find the part most similar to the current area and obtains a motion vector value, which is the distance between the areas. Motion information for the reference area obtained by the motion estimation unit (154a), such as reference direction indicator information (L0 prediction, L1 prediction, bidirectional prediction), reference picture index, motion vector information, etc., is transmitted to the entropy coding unit (160) so that it can be included in the bitstream. Using the motion information transmitted from the motion estimation unit (154a), the motion compensation unit (154b) performs inter-motion compensation to generate a prediction block for the current block. The inter-prediction unit (154) transmits inter-coding information containing motion information for the reference area to the entropy coding unit (160).
[0066] According to an additional embodiment, the prediction unit (150) may include an intra block copy (IBC) prediction unit (not shown). The IBC prediction unit performs IBC prediction from restored samples within the current picture and transmits IBC encoding information to the entropy coding unit (160). The IBC prediction unit obtains a block vector value indicating a reference area used for predicting the current area by referencing a specific area within the current picture. The IBC prediction unit may perform IBC prediction using the obtained block vector value. The IBC prediction unit transmits IBC encoding information to the entropy coding unit (160). The IBC encoding information may include at least one of size information of the reference area and block vector information (index information for predicting the block vector of the current block within the motion candidate list, block vector difference information).
[0067] When the above picture prediction is performed, the conversion unit (110) converts the residual value between the original picture and the predicted picture to obtain a conversion coefficient value. At this time, the conversion can be performed in units of specific blocks within the picture, and the size of the specific block can be varied within a preset range. The quantization unit (115) quantizes the conversion coefficient value generated by the conversion unit (110) and transmits the quantized conversion coefficient to the entropy coding unit (160).
[0068] The quantized transformation coefficients in the form of a two-dimensional array described above can be rearranged into a one-dimensional array for entropy coding. The method of scanning the quantized transformation coefficients can be determined by the size of the transformation block and the in-frame prediction mode, which scanning method will be used. As an example of implementation, diagonal, vertical, and horizontal scans may be applied. This scan information can be signaled in block units and can be derived according to pre-determined rules.
[0069] The entropy coding unit (160) generates a video signal bitstream by entropy coding information representing quantized conversion coefficients, intra-coding information, and inter-coding information. In the entropy coding unit (160), methods such as Variable Length Coding (VLC) and arithmetic coding may be used. Variable Length Coding (VLC) converts input symbols into a series of codewords, and the length of the codewords may be variable. For example, frequently occurring symbols are represented as short codewords, and infrequently occurring symbols are represented as long codewords. As a variable length coding method, Context-based Adaptive Variable Length Coding (CAVLC) may be used. Arithmetic coding converts a series of data symbols into a single prime number using the probability distribution of each data symbol, and arithmetic coding can obtain the optimal prime number bit required to represent each symbol. Context-based Adaptive Binary Arithmetic Coding (CABAC) can be used as arithmetic coding.
[0070] CABAC is a method of binary arithmetic encoding that utilizes multiple context models generated based on probabilities obtained through experiments. A context model can also be referred to as a context model. First, if a symbol is not in binary form, the encoder binarizes each symbol using tools such as exp-Golomb. Binarized 0s or 1s can be described as bins. The CABAC initialization process is divided into context initialization and arithmetic coding initialization. Context initialization is the process of initializing the occurrence probability of each symbol, which is determined by the symbol type, quantization parameters (QP), and slice type (whether it is I, P, or B). A context model possessing this initialization information can use probability-based values obtained through experiments. The context model provides the occurrence probability of the LPS (Least Probable Symbol) or MPS (Most Probable Symbol) for the symbol currently being coded, as well as information (valMPS) regarding which bin value (0 or 1) corresponds to the MPS. One of several context models is selected through the context index (ctxIdx), and the context index can be derived from information about the block currently to be encoded or information about surrounding blocks. Initialization for binary arithmetic coding is performed based on the probability model selected from the context model. Binary arithmetic encoding proceeds by dividing into probability intervals based on the occurrence probabilities of 0 and 1, and then making the probability interval corresponding to the bin to be processed the entire probability interval for the next bin to be processed. Location information within the probability interval where the last bin was processed is output. However, since the probability interval cannot be divided indefinitely, if it shrinks to within a certain size, a renormalization process is performed to widen the probability interval and output the corresponding location information. Additionally, after each bin is processed, a probability update process may be performed to newly set the probability for the next bin to be processed based on the information of the processed bin.A video signal processing device can entropy-code by setting the probability of 0 or 1 occurring without a context model to '0.5', and this can be described as a bypass mode.
[0071] A bitstream may consist of one or more coded video sequences (CVS), and a single CVS may be encoded independently of the others. Each CVS may consist of one or more layers, and each layer may represent a specific image quality or resolution, or a general image, a depth information map, or a transparency map. Additionally, a coded layer video sequence (CLVS) may refer to a layer-wise CVS composed of consecutive (in decoding order) PUs within the same layer. For example, a CLVS for a specific image quality layer may exist, as well as a CLVS for a depth information map.
[0072] The bitstream generated above is encapsulated into Network Abstraction Layer (NAL) units as the basic unit. NAL units are classified into Video Coding Layer (VCL) NAL units containing video data and non-VCL NAL units containing parameter information for decoding video data, and various types of VCL or non-VCL NAL units exist. A NAL unit consists of NAL header information and Raw Byte Sequence Payload (RBSP), which is the data; the NAL header information includes summary information regarding the RBSP. The RBSP of a VCL NAL unit contains an integer number of encoded coding tree units. To decode the bitstream in a video decoder, the bitstream must first be separated into NAL units, and then each separated NAL unit must be decoded. Meanwhile, information required for decoding a video signal bitstream can be transmitted by including it in a Video Parameter Set (VPS), Sequence Parameter Set (SPS), Picture Parameter Set (PPS), Adaptation Parameter Set (APS), etc. The RBSP of the VCL NAL unit may include an integer number of coding tree units. The VPS is a parameter set composed of common syntax by extracting duplicate parameters from the SPS parameter set signaled at each layer in a bitstream that supports image quality, resolution, frame rate scalability, or a bitstream that supports multiview.SPS is a parameter set that includes at least one of the following: a profile containing information on acceptable coding tools (or algorithms) and image formats; a level containing information on the decoder's processing capability regarding processable image resolution, frame rate, and acceptable memory size; a tier containing information on the maximum processable bit rate; and information on image resolution, bit depth, and whether a function is enabled. PPS is a parameter set that includes at least one of the following: image resolution, tile partitioning information, information on whether weight prediction is enabled, quantization parameters, and filtering-related information. APS is a parameter set that includes one of the following information depending on the APS type: ALF filter coefficient information, LMCS-related parameters, and quantization scale parameters. APS is classified into prefix APS, which is signaled before the VCL NAL unit, and suffix APS, which is signaled after the VCL NAL unit. In the case of ALF APS, since it is efficient to apply ALF filter coefficients derived from the previous picture to the next picture, it may be signaled as a suffix APS. Non-VCL NAL units include SEI (Supplemental Enhancement Information) NAL units, which may contain metadata that is not required for picture restoration. SEI NAL units can be used for picture output timing, error loss detection, and concealment. An AU (Access Unit) may be a set of pictures belonging to the same time. A CRA (Clean Random Access) picture is a VCL NAL unit that does not refer to other pictures other than itself for inter-prediction during the decoding process. A CRA picture may be the first picture in the output order or an intra-picture.An IDR (Instantaneous Decoding Refresh) picture is a VCL NAL unit; like a CRA picture, it does not reference other pictures for inter-prediction during the decoding process. An IDR picture can be the first picture in the output order or an intra picture. Pictures decoded after an IDR picture cannot reference pictures decoded before it. A picture decoded after a CRA picture but outputted before it can reference pictures decoded before it. An IRAP (Intra Random Access Point) picture is a picture that allows random access and can be either a CRA picture or an IDR picture.
[0073] Meanwhile, the block diagram of FIG. 1 shows an encoding device (100) according to one embodiment of the present specification, and the separated blocks represent the elements of the encoding device (100) logically distinguished. Accordingly, the elements of the aforementioned encoding device (100) may be mounted as a single chip or as a plurality of chips depending on the design of the device. According to one embodiment, the operation of each element of the aforementioned encoding device (100) may be performed by a processor (not shown).
[0074] FIG. 2 is a schematic block diagram of a video signal decoding device (200) according to one embodiment of the present specification. Referring to FIG. 2, the decoding device (200) of the present invention includes an entropy decoding unit (210), an inverse quantization unit (220), an inverse transformation unit (225), a filtering unit (230), and a prediction unit (250).
[0075] The entropy decoding unit (210) entropies decodes the video signal bitstream to extract transform coefficient information, intra-coding information, inter-coding information, etc. for each region. For example, the entropy decoding unit (210) can obtain a binary code for transform coefficient information of a specific region from the video signal bitstream. Additionally, the entropy decoding unit (210) inversely binarizes the binary code to obtain quantized transform coefficients. The inverse quantization unit (220) inversely quantizes the quantized transform coefficients, and the inverse transform unit (225) restores the residual value using the inversely quantized transform coefficients. The video signal processing device (200) restores the original pixel value by summing the residual value obtained from the inverse transform unit (225) with the predicted value obtained from the prediction unit (250).
[0076] Meanwhile, the filtering unit (230) performs filtering on the picture to improve image quality. This may include a deblocking filter to reduce block distortion and / or an adaptive loop filter to remove distortion from the entire picture. The filtered picture is stored in a decoded picture buffer (DPB, 256) to be output or used as a reference picture for the next picture.
[0077] The prediction unit (250) includes an intra prediction unit (252) and an inter prediction unit (254). The prediction unit (250) generates a prediction picture by utilizing the encoding type decoded through the aforementioned entropy decoding unit (210), the conversion coefficient for each region, and intra / inter encoding information. To restore the current block in which decoding is performed, the decoded regions of the current picture containing the current block or other pictures may be used. A picture (or tile / slice) that uses only the current picture for restoration, i.e., performs intra prediction or intra BC prediction, is called an intra picture or I picture (or tile / slice), and a picture (or tile / slice) capable of performing intra prediction, inter prediction, and intra BC prediction is called an inter picture (or tile / slice). A picture (or tile / slice) that uses at most one motion vector and reference picture index to predict sample values of each block among inter-pictures (or tiles / slices) is called a predictive picture or P picture (or tile / slice), and a picture (or tile / slice) that uses at most two motion vectors and reference picture indices is called a bi-predictive picture or B picture (or tile / slice). In other words, a P picture (or tile / slice) uses at most one set of motion information to predict each block, and a B picture (or tile / slice) uses at most two sets of motion information to predict each block. Here, a set of motion information includes one or more motion vectors and one reference picture index.
[0078] The intra prediction unit (252) generates a prediction block using intra encoding information and restored samples within the current picture. Specifically, samples within the current block can be predicted using reference samples derived using the sample location within the current block and the directionality of the intra prediction mode. If the location of the reference sample is not an integer unit sample, it can be predicted using interpolated reference samples through an interpolation method using adjacent reference samples, which can be referred to as linear-based intra prediction. As described above, the intra encoding information may include at least one of an intra prediction mode, an MPM (Most Probable Mode) flag, and an MPM index. The intra prediction unit (252) predicts the sample values of the current block using restored samples located to the left and / or above the current block as reference samples. In the present disclosure, the restored samples, reference samples, and samples of the current block may represent pixels. Additionally, the sample values may represent pixel values.
[0079] According to one embodiment, reference samples may be samples included in the surrounding blocks of the current block. For example, the reference samples may be samples adjacent to the left boundary of the current block and / or samples adjacent to the upper boundary. Additionally, the reference samples may be samples among the samples of the surrounding blocks of the current block located on a line within a preset distance from the left boundary of the current block and / or samples located on a line within a preset distance from the upper boundary of the current block. In this case, the surrounding blocks of the current block may include at least one of a left (L) block, an upper (A) block, a lower left (BL) block, an upper right (AR) block, or an upper left (AL) block adjacent to the current block. The surrounding blocks of the current block may be reference blocks for predicting the current block.
[0080] The inter-prediction unit (254) generates a prediction block using the reference picture and inter-coding information stored in the decoding picture buffer (256). The inter-coding information may include a set of motion information (reference picture index, motion vector information, etc.) of the current block for the reference block. Inter-prediction may include L0 prediction, L1 prediction, and bi-prediction. L0 prediction refers to a prediction using one reference picture included in the L0 picture list, and L1 prediction refers to a prediction using one reference picture included in the L1 picture list. For this, one set of motion information (e.g., motion vector and reference picture index) may be required. In the bi-prediction method, up to two reference regions may be used, and these two reference regions may exist in the same reference picture or in different pictures. That is, in the pair prediction method, up to two sets of motion information (e.g., motion vectors and reference picture indices) may be used, and the two motion vectors may correspond to the same reference picture index or different reference picture indices. In this case, the reference pictures are pictures located temporally before or after the current picture, and may be pictures that have already been restored and completed. According to one embodiment, the two reference regions used in the pair prediction method may be regions selected from the L0 picture list and the L1 picture list, respectively. Additionally, a prediction method that uses only reference pictures with a POC smaller than the current picture's POC or only reference pictures with a POC larger than the current picture's POC, based on the POC (picture order count) indicating the display order of the current picture, can be called unidirectional prediction.In addition, a prediction method that uses both a reference picture with a POC smaller than the current picture's POC and a reference picture with a POC larger than the current picture's POC, based on the POC (picture order count) representing the display order of the current picture, can be called bi-directional prediction. A prediction method that uses only one reference picture in unidirectional prediction can be called uni-prediction, and a prediction method that uses two reference pictures in unidirectional prediction can be called bi-prediction or paired prediction.
[0081] The inter prediction unit (254) can obtain a reference block of the current block using a motion vector and a reference picture index. The reference block exists within the reference picture corresponding to the reference picture index. Additionally, a sample value of the block specified by the motion vector or an interpolated value thereof can be used as a predictor of the current block. For motion prediction with sub-pel unit pixel accuracy, for example, an 8-tap interpolation filter may be used for the luminance signal and a 4-tap interpolation filter may be used for the chrominance signal. However, the interpolation filter for sub-pel unit motion prediction is not limited thereto. In this way, the inter prediction unit (254) performs motion compensation to predict the texture of the current unit from a previously restored picture. At this time, the inter prediction unit may use a set of motion information.
[0082] According to an additional embodiment, the prediction unit (250) may include an IBC prediction unit (not shown). The IBC prediction unit may restore a current region by referring to a specific region containing restored samples within the current picture. The IBC prediction unit may perform IBC prediction using IBC encoding information obtained from the entropy decoding unit (210). The IBC encoding information may include block vector information.
[0083] A restored video picture is generated by adding the predicted value output from the intra prediction unit (252) or the inter prediction unit (254) and the residual value output from the inverse transformation unit (225). That is, the video signal decoding device (200) restores the current block using the predicted block generated by the prediction unit (250) and the residual obtained from the inverse transformation unit (225).
[0084] Meanwhile, the block diagram of FIG. 2 shows a decoding device (200) according to one embodiment of the present specification, and the separated blocks represent the elements of the decoding device (200) logically distinguished. Accordingly, the elements of the aforementioned decoding device (200) may be mounted as a single chip or multiple chips depending on the design of the device. According to one embodiment, the operation of each element of the aforementioned decoding device (200) may be performed by a processor (not shown).
[0085] Meanwhile, the technology proposed in this specification is applicable to both the methods and devices of encoders and decoders, and the parts described as signaling and parsing may be described for convenience of explanation. Generally, signaling can be described as encoding each syntax from the perspective of an encoder, and parsing as interpreting each syntax from the perspective of a decoder. That is, each syntax can be signaled by being included in a bitstream from the encoder, and the decoder can parse the syntax and use it in the restoration process. In this case, a sequence of bits for each syntax arranged according to a defined hierarchical configuration can be referred to as a bitstream.
[0086] A single picture can be divided and encoded into sub-pictures, slices, tiles, etc. A sub-picture may contain one or more slices or tiles. When a single picture is divided and encoded into multiple slices or tiles, it can only be displayed on the screen after all slices or tiles within the picture have been decoded. Conversely, when a single picture is encoded into multiple sub-pictures, only any sub-picture may be decoded and displayed on the screen. A slice may contain multiple tiles or sub-pictures. Alternatively, a tile may contain multiple sub-pictures or slices. Since sub-pictures, slices, and tiles can be encoded or decoded independently of each other, they are effective for parallel processing and improving processing speed. However, there is a disadvantage in that the bit size increases because the encoded information of adjacent sub-pictures, slices, or tiles cannot be utilized. Sub-pictures, slices, and tiles can be divided and encoded into multiple Coding Tree Units (CTUs).
[0087] FIG. 3 illustrates an embodiment in which a Coding Tree Unit (CTU) is divided into Coding Units (CUs) within a picture. During the coding process of a video signal, the picture may be divided into a sequence of Coding Tree Units (CTUs). A Coding Tree Unit may consist of a Luminance Coding Tree Block (CTB), two Chroma Coding Tree Blocks, and its encoded syntax information. A single Coding Tree Unit may consist of a single Coding Unit, or a single Coding Tree Unit may be divided into multiple Coding Units. A single Coding Unit may consist of a Luminance Coding Block (CB), two Chroma Coding Blocks, and its encoded syntax information. A single Coding Block may be divided into multiple Sub-Coding Blocks. A single Coding Unit may consist of a Transform Unit (TU), or a single Coding Unit may be divided into multiple Transform Units. A single transform unit may consist of a luminance transform block (Transform Block, TB), two chrominance transform blocks, and their encoded syntax information. A coding tree unit may be divided into multiple coding units. A coding tree unit may not be divided and may become a leaf node. In this case, the coding tree unit itself may become a coding unit.
[0088] A coding unit refers to a basic unit for processing a picture during the video signal processing process described above, namely intra / inter prediction, transformation, quantization, and / or entropy coding. Within a single picture, the size and shape of the coding unit may not be constant. The coding unit may have a square or rectangular shape. A rectangular coding unit (or rectangular block) includes a vertical coding unit (or vertical block) and a horizontal coding unit (or horizontal block). In this specification, a vertical block is a block in which the height is greater than the width, and a horizontal block is a block in which the width is greater than the height. Additionally, in this specification, a non-square block may refer to a rectangular block, but the invention is not limited thereto.
[0089] Referring to FIG. 3, the coding tree unit is first divided into a Quad Tree (QT) structure. That is, in the Quad Tree structure, a single node with a size of 2NX2N can be divided into four nodes with a size of NXN. In this specification, a Quad Tree may also be referred to as a quaternary tree. Quad Tree division can be performed recursively, and not all nodes need to be divided to the same depth.
[0090] Meanwhile, the leaf nodes of the aforementioned quad tree can be further divided into a Multi-Type Tree (MTT) structure. According to an embodiment of the present invention, in a multi-type tree structure, a single node can be divided into a binary or ternary tree structure by horizontal or vertical division. That is, in a multi-type tree structure, there are four division structures: vertical binary division, horizontal binary division, vertical ternary division, and horizontal ternary division. According to an embodiment of the present invention, in each of the tree structures, the width and height of the node can both have powers of 2 values. For example, in a binary tree (BT) structure, a node of size 2NX2N can be divided into two NX2N nodes by vertical binary division and into two 2NXN nodes by horizontal binary division. In addition, in a ternary tree (TT) structure, a node of size 2NX2N can be divided into (N / 2)X2N, NX2N, and (N / 2)X2N nodes by vertical ternary partitioning, and into 2NX(N / 2), 2NXN, and 2NX(N / 2) nodes by horizontal ternary partitioning. This multi-type tree partitioning can be performed recursively.
[0091] Leaf nodes of a multi-type tree can be coding units. If a coding unit is not large compared to the maximum transformation length, the coding unit can be used as a unit of prediction and / or transformation without further splitting. In one embodiment, if the width or height of the current coding unit is greater than the maximum transformation length, the current coding unit can be split into multiple transformation units without explicit signaling regarding splitting. Meanwhile, in the aforementioned quad tree and multi-type tree, at least one of the following parameters may be predefined or transmitted via an RBSP of a higher-level set such as PPS, SPS, VPS, etc. 1) CTU size: Size of the quad tree root node, 2) MinQtSize: Allowed minimum QT leaf node size, 3) MaxBtSize: Allowed maximum BT root node size, 4) MaxTtSize: Allowed maximum TT root node size, 5) MaxMttDepth: Maximum allowed depth of MTT splitting from the QT leaf node, 6) MinBtSize: Allowed minimum BT leaf node size, 7) MinTtSize: Allowed minimum TT leaf node size.
[0092] FIG. 4 illustrates an embodiment of a method for signaling the splitting of a quad tree and a multi-type tree. Pre-configured flags may be used to signal the splitting of the aforementioned quad tree and multi-type tree. Referring to FIG. 4, at least one of the following may be used: a flag 'split_cu_flag' indicating whether a node is split, a flag 'split_qt_flag' indicating whether a quad tree node is split, a flag 'mtt_split_cu_vertical_flag' indicating the splitting direction of a multi-type tree node, or a flag 'mtt_split_cu_binary_flag' indicating the splitting shape of a multi-type tree node.
[0093] According to an embodiment of the present invention, a flag 'split_cu_flag' indicating whether the current node is split may be signaled first. If the value of 'split_cu_flag' is 0, it indicates that the current node is not split, and the current node becomes a coding unit. If the current node is a coding tree unit, the coding tree unit includes one unsplit coding unit. If the current node is a quad tree node 'QT node', the current node is a quad tree leaf node 'QT leaf node' and becomes a coding unit. If the current node is a multi-type tree node 'MTT node', the current node is a multi-type tree leaf node 'MTT leaf node' and becomes a coding unit.
[0094] When the value of 'split_cu_flag' is 1, the current node may be split into nodes of a quad tree or a multi-type tree according to the value of 'split_qt_flag'. A coding tree unit is the root node of a quad tree and may be split first into a quad tree structure. In a quad tree structure, 'split_qt_flag' is signaled for each node 'QT node'. When the value of 'split_qt_flag' is 1, the node is split into four square nodes, and when the value of 'split_qt_flag' is 0, the node becomes a quad tree leaf node 'QT leaf node' and is split into multi-type nodes. According to an embodiment of the present invention, quad tree splitting may be restricted depending on the type of the current node. Quad tree splitting may be allowed when the current node is a coding tree unit (root node of a quad tree) or a quad tree node, and quad tree splitting may not be allowed when the current node is a multi-type tree node. Each quad tree leaf node 'QT leaf node' can be further split into a multi-type tree structure. As described above, if 'split_qt_flag' is 0, the current node can be split into multi-type nodes. To indicate the split direction and split shape, 'mtt_split_cu_vertical_flag' and 'mtt_split_cu_binary_flag' can be signaled. If the value of 'mtt_split_cu_vertical_flag' is 1, a vertical split of node 'MTT node' is indicated, and if the value of 'mtt_split_cu_vertical_flag' is 0, a horizontal split of node 'MTT node' is indicated.Also, when the value of 'mtt_split_cu_binary_flag' is 1, the node 'MTT node' is split into 2 rectangular nodes, and when the value of 'mtt_split_cu_binary_flag' is 0, the node 'MTT node' is split into 3 rectangular nodes.
[0095] In a tree partitioning structure, luminance blocks and chrominance blocks can be partitioned in the same form. That is, a chrominance block can partition itself by referencing the partitioning form of the luminance block. If the current chrominance block is smaller than an arbitrarily defined size, the chrominance block may not be partitioned even if the luminance block has been partitioned.
[0096] The luminance block and the chrominance block can have the same tree partitioning structure, which can be referred to as a Single Tree. When the current block is encoded as a Single Tree, the partitioning structure, encoding mode information, and motion information of the luminance and chrominance blocks may be identical, while other information related to error signals may differ between the luminance and chrominance blocks. Additionally, the luminance and chrominance blocks can have different tree partitioning structures, which can be referred to as a Dual Tree. When the current block is encoded as a Dual Tree, at least one of the partitioning structure, encoding mode information, and motion information of the luminance and chrominance blocks may differ.
[0097] There may be a close correlation between the luminance block and the chrominance block corresponding to the luminance block. Therefore, in encoders and decoders, when the current block is encoded and decoded as a dual tree, the chrominance block can be encoded using the luminance block's partitioning information, encoding mode information, motion information, etc.
[0098] A node to be divided into the smallest unit can be processed as a single coding block. If the current block is a coding block, the coding block can be divided into multiple sub-blocks (sub-coding blocks), and the prediction information of each sub-block may be the same or different. As an example of implementation, if the coding unit is in intra mode, the intra prediction mode of each sub-block may be the same or different. Also, if the coding unit is in inter mode, the movement information of each sub-block may be the same or different. Additionally, each sub-block may be capable of encoding or decoding independently of one another. Each sub-block can be distinguished through a sub-block index (sbIdx). Furthermore, when the coding unit is divided into sub-blocks, it may be divided horizontally or vertically, or diagonally. The mode in which the current coding unit is divided into two or four sub-blocks in the horizontal or vertical direction in intra mode is called ISP (Intra Sub Partitions). The mode in which the current coding block is divided diagonally in inter mode is called GPM (Geometric partitioning mode). In GPM mode, the position and direction of the diagonal line are determined using a predetermined angle table, and the index information of the angle table is signaled.
[0099] Motion information may include one or more of reference direction indicator information, reference picture information, motion vector, motion resolution, affine model, CPMV (control point motion vector), block vector, block vector resolution, MHP information, LIC information, filtering information, BCW information, and RRIBC information.
[0100] Reference direction indicator information consists of L0 prediction, L1 prediction, and L0 and L1 predictions; L0 and L1 predictions are single predictions and unidirectional predictions, while L0 and L1 predictions are bidirectional predictions. Additionally, L0 and L1 predictions can be either unidirectional or bidirectional predictions. Here, L0 prediction is performed using reference pictures within the L0 reference picture list, and L1 prediction can be performed using reference pictures within the L1 reference picture list. In the L0 reference picture list, reference pictures with a POC smaller than the current picture's POC can be added based on the current picture's POC. Furthermore, the L0 reference picture list can be organized in order from reference pictures with a POC closer to the current picture's POC to reference pictures with a POC further away. In the L1 reference picture list, reference pictures with a POC larger than the current picture's POC can be added based on the current picture's POC. Additionally, the L1 reference picture list may be organized in order from reference pictures closer to the POC of the current picture to reference pictures further away from the POC. The L0 and L1 reference picture lists may vary for each slice, sub-picture, and picture. Furthermore, the L0 reference picture list may include reference pictures from the L1 reference picture list. And the L1 reference picture list may include reference pictures from the L0 reference picture list.
[0101] Reference picture information may vary per block and may be index information indicating which reference picture from the L0 reference picture list and / or L1 reference picture list the current block is predicted to use. Reference picture information may include one or more of L0 reference picture information and L1 reference picture information.
[0102] A motion vector is information indicating the block in the reference picture that best matches the current block; it is a value representing the distance from the top-left position of the current block within the picture to the reference block in horizontal and vertical coordinates.
[0103] Motion resolution represents the resolution of the motion vector, and motion resolution can be expressed in units of 4 pixels, 1 pixel (integer pixel), 1 / 2 pixel, 1 / 4 pixel, 1 / 8 pixel, 1 / 16 pixel, etc.
[0104] A block vector is information indicating the block that best matches the current block within the already restored area of the current picture; it is a value representing the distance from the top-left position of the current block to the reference block in horizontal and vertical coordinates.
[0105] Block vector resolution can be expressed in units of 4 pixels, 1 pixel (integer pixel), 1 / 2 pixel, 1 / 4 pixel, 1 / 8 pixel, 1 / 16 pixel, etc.
[0106] MHP information may include whether additional motion information is applied and additional motion information.
[0107] LIC information may include whether LIC is applied to the current block.
[0108] Filtering information may include filtering type and coefficient information applied according to the movement resolution of the current block.
[0109] BCW information may include whether BCW is applied to the current block.
[0110] RRIBC information may include information on whether RRIBC is applied and the RRIBC type if the current block is encoded in IBC mode.
[0111] Picture prediction (motion compensation) for coding is performed on indivisible coding units (i.e., leaf nodes of coding tree units). The basic unit that performs this prediction is referred to hereinafter as a prediction unit or prediction block.
[0112] Hereinafter, the term "unit" as used in this specification may be used as a substitute for the prediction unit, which is the basic unit for performing predictions. However, the present invention is not limited thereto, and may be understood more broadly as a concept including the coding unit.
[0113] FIGS. 5 and 6 further illustrate an intra prediction method according to an embodiment of the present specification. As described above, the intra prediction unit predicts sample values of the current block using restored samples located to the left and / or above the current block as reference samples.
[0114] First, FIG. 5 illustrates an example of reference samples used for prediction of the current block in intra prediction mode. According to one example, the reference samples may be samples adjacent to the left boundary of the current block and / or samples adjacent to the upper boundary. As illustrated in FIG. 5, when the size of the current block is WXH and samples of a single reference line adjacent to the current block are used for intra prediction, the reference samples may be set using up to 2W+2H+1 surrounding samples located to the left and / or upper side of the current block.
[0115] Meanwhile, pixels of multiple reference lines may be used for intra prediction of the current block. A multiple reference line may consist of n lines located within a preset range from the current block. According to one embodiment, when pixels of multiple reference lines are used for intra prediction, separate index information indicating the lines to be set as reference pixels may be signaled, and this may be named a reference line index.
[0116] Additionally, if at least some of the samples to be used as reference samples have not yet been restored, the intra prediction unit may obtain reference samples by performing a reference sample padding process. Additionally, the intra prediction unit may perform a reference sample filtering process to reduce the error of the intra prediction. That is, filtered reference samples may be obtained by performing filtering on the surrounding samples and / or the reference samples obtained by the reference sample padding process. The intra prediction unit predicts the samples of the current block using the reference samples obtained in this manner. The intra prediction unit predicts the samples of the current block using unfiltered reference samples or filtered reference samples. In the present disclosure, surrounding samples may include samples on at least one reference line. For example, surrounding samples may include adjacent samples on a line adjacent to the boundary of the current block.
[0117] Next, FIG. 6 illustrates an example of prediction modes used for intra prediction. For intra prediction, intra prediction mode information indicating the direction of intra prediction may be signaled. The intra prediction mode information indicates one of a plurality of intra prediction modes constituting a set of intra prediction modes. If the current block is an intra prediction block, the decoder receives intra prediction mode information of the current block from the bitstream. The intra prediction unit of the decoder performs intra prediction for the current block based on the extracted intra prediction mode information.
[0118] According to an embodiment of the present invention, an intra prediction mode set may include all intra prediction modes used for intra prediction (e.g., a total of 67 intra prediction modes). More specifically, the intra prediction mode set may include a planar mode, a DC mode, and a plurality (e.g., 65) angle modes (i.e., direction modes). Each intra prediction mode may be indicated by a preset index (i.e., an intra prediction mode index). For example, as illustrated in FIG. 6, intra prediction mode index 0 indicates a planar mode, and intra prediction mode index 1 indicates a DC mode. Additionally, intra prediction mode indices 2 through 66 may each indicate different angle modes. Angle modes each indicate different angles within a preset angle range. For example, an angle mode may indicate an angle within an angle range between 45 degrees and -135 degrees clockwise (i.e., a first angle range). The angle mode may be defined based on the 12 o'clock direction. At this time, intra prediction mode index 2 indicates horizontal diagonal (HDIA) mode, intra prediction mode index 18 indicates horizontal (HOR) mode, intra prediction mode index 34 indicates diagonal (DIA) mode, intra prediction mode index 50 indicates vertical (VER) mode, and intra prediction mode index 66 indicates vertical diagonal (VDIA) mode.
[0119] Meanwhile, the pre-set angle ranges may be set differently depending on the shape of the current block. For example, if the current block is a rectangular block, a wide angle mode indicating an angle exceeding 45 degrees or less than -135 degrees clockwise may be additionally used. If the current block is a horizontal block, the angle mode may indicate an angle within an angle range between (45+offset1) degrees and (-135+offset1) degrees clockwise (i.e., a second angle range). In this case, angle modes 67 to 76 that fall outside the first angle range may be additionally used. Additionally, if the current block is a vertical block, the angle mode may indicate an angle within an angle range between (45-offset2) degrees and (-135-offset2) degrees clockwise (i.e., a third angle range). In this case, angle modes -10 to -1 that fall outside the first angle range may be additionally used. According to an embodiment of the present invention, the values of offset1 and offset2 may be determined differently depending on the ratio between the width and height of the rectangular block. Also, offset1 and offset2 can be positive.
[0120] According to a further embodiment of the present invention, a plurality of angle modes constituting an intra-prediction mode set may include a basic angle mode and an extended angle mode. In this case, the extended angle mode may be determined based on the basic angle mode.
[0121] According to one embodiment, the basic angle mode is a mode corresponding to the angle used in the intra prediction of the existing HEVC (High Efficiency Video Coding) standard, and the extended angle mode may be a mode corresponding to the angle newly added in the intra prediction of the next-generation video codec standard. More specifically, the basic angle mode may be an angle mode corresponding to any one of the intra prediction modes {2, 4, 6, …, 66}, and the extended angle mode may be an angle mode corresponding to any one of the intra prediction modes {3, 5, 7, …, 65}. That is, the extended angle mode may be an angle mode between the basic angle modes within the first angle range. Accordingly, the angle indicated by the extended angle mode may be determined based on the angle indicated by the basic angle mode.
[0122] According to another embodiment, the basic angle mode is a mode corresponding to an angle within a preset first angle range, and the extended angle mode may be a wide angle mode that is outside the first angle range. That is, the basic angle mode is an angle mode corresponding to any one of the intra-prediction modes {2, 3, 4, …, 66}, and the extended angle mode may be an angle mode corresponding to any one of the intra-prediction modes {-14, -13, -12, …, -1} and {67, 68, …, 80}. The angle indicated by the extended angle mode may be determined as the opposite angle of the angle indicated by the corresponding basic angle mode. Accordingly, the angle indicated by the extended angle mode may be determined based on the angle indicated by the basic angle mode. Meanwhile, the number of extended angle modes is not limited thereto, and additional extended angles may be defined depending on the size and / or shape of the current block. Meanwhile, the total number of intra-prediction modes included in the set of intra-prediction modes may vary depending on the configuration of the aforementioned basic angle mode and extended angle mode.
[0123] In the above embodiment, the interval between the extended angle modes can be set based on the interval between the corresponding basic angle modes. For example, the interval between the extended angle modes {3, 5, 7, … , 65} can be determined based on the interval between the corresponding basic angle modes {2, 4, 6, … , 66}. Additionally, the interval between the extended angle modes {-14, -13, … , -1} is determined based on the interval between the corresponding opposite basic angle modes {53, 53, … , 66}, and the interval between the extended angle modes {67, 68, … , 80} can be determined based on the interval between the corresponding opposite basic angle modes {2, 3, 4, … , 15}. The angle interval between the extended angle modes can be set to be equal to the angle interval between the corresponding basic angle modes. Additionally, the number of extended angle modes in the intra-prediction mode set can be set to be less than or equal to the number of basic angle modes.
[0124] According to an embodiment of the present invention, an extended angle mode may be signaled based on a basic angle mode. For example, a wide angle mode (i.e., an extended angle mode) may replace at least one angle mode (i.e., a basic angle mode) within a first angle range. The replaced basic angle mode may be an angle mode corresponding to the opposite side of the wide angle mode. That is, the replaced basic angle mode is an angle mode corresponding to an angle in the opposite direction of the angle indicated by the wide angle mode, or an angle mode corresponding to an angle that differs from the angle in the opposite direction by a preset offset index. According to an embodiment of the present invention, the preset offset index is 1. An intra-prediction mode index corresponding to the replaced basic angle mode may be remapped to the wide angle mode to signal the corresponding wide angle mode. For example, wide angle modes {-14, -13, … , -1} may each be signaled by the intra-prediction mode index {52, 53, … , 66}, and wide angle modes {67, 68, … , 80} may be signaled by the intra-prediction mode index {2, 3, … Each can be signaled by { , 15}. In this way, by allowing the intra prediction mode index for the basic angle mode to signal the extended angle mode, the same set of intra prediction mode indexes can be used for signaling the intra prediction mode even if the configurations of the angle modes used for intra prediction in each block are different. Therefore, signaling overhead due to changes in the intra prediction mode configuration can be minimized.
[0125] Meanwhile, whether to use the extended angle mode may be determined based on at least one of the shape and size of the current block. According to one embodiment, if the size of the current block is larger than a preset size, the extended angle mode is used for intra prediction of the current block, and otherwise, only the basic angle mode is used for intra prediction of the current block. According to another embodiment, if the current block is a non-square block, the extended angle mode is used for intra prediction of the current block, and if the current block is a square block, only the basic angle mode is used for intra prediction of the current block.
[0126] The intra prediction unit determines the reference samples and / or interpolated reference samples to be used for intra prediction of the current block based on the intra prediction mode information of the current block. If the intra prediction mode index indicates a specific angle mode, the reference sample or interpolated reference sample corresponding to the specific angle from the current sample of the current block is used for the prediction of the current pixel. Therefore, different sets of reference samples and / or interpolated reference samples may be used for intra prediction depending on the intra prediction mode. Once the intra prediction of the current block is performed using the reference samples and intra prediction mode information, the decoder restores the sample values of the current block by adding the residual signal of the current block obtained from the inverse transform unit to the intra prediction value of the current block.
[0127] The motion information used for inter-prediction may include reference direction indicator information (inter_pred_idc), reference picture indices (ref_idx_l0, ref_idx_l1), and motion vectors (mvL0, mvL1). Reference picture list utilization information (predFlagL0, predFlagL1) may be set according to the reference direction indicator information. As an example of implementation, in the case of unidirectional prediction using the L0 reference picture, predFlagL0 may be set to 1 and predFlagL1 to 0. In the case of unidirectional prediction using the L1 reference picture, predFlagL0 may be set to 0 and predFlagL1 to 1. In the case of bidirectional prediction using both the L0 and L1 reference pictures, predFlagL0 may be set to 1 and predFlagL1 to 1.
[0128] If the current block is a coding unit, the coding unit may be divided into multiple sub-blocks, and the prediction information of each sub-block may be the same or different. For example, if the coding unit is in intra mode, the intra prediction mode of each sub-block may be the same or different. Also, if the coding unit is in inter mode, the movement information of each sub-block may be the same or different. Additionally, each sub-block may be capable of encoding or decoding independently of each other. Each sub-block may be distinguished by a sub-block index (sbIdx).
[0129] The motion vector of the current block is highly likely to be similar to the motion vector of surrounding blocks. Therefore, the motion vectors of surrounding blocks can be used as motion vector predictors (mvp), and the motion vector of the current block can be derived using the motion vectors of surrounding blocks. Additionally, to improve the accuracy of the motion vector, the motion vector difference (mvd) between the optimal motion vector of the current block found from the original image by the encoder and the motion vector predictor can be signaled.
[0130] Motion vectors can have various resolutions, and the resolution of the motion vector can vary on a block-by-block basis. Motion vector resolution can be expressed in integer units, half-pixel units, quarter-pixel units, sixteenth-pixel units, or integer units of 4. Since images such as screen content are simple graphic forms like text, interpolation filters do not need to be applied; therefore, integer units and integer units of 4 can be selectively applied on a block-by-block basis. For blocks encoded in Affine mode, which can express rotation and scale, the shape changes significantly; therefore, integer units, quarter-pixel units, and sixteenth-pixel units can be selectively applied based on the block. Information regarding whether to selectively apply motion vector resolution on a block-by-block basis is signaled by amvr_flag. If applied, which motion vector resolution to apply to the current block is signaled by amvr_precision_idx.
[0131] For blocks where bidirectional prediction is applied, when applying the weighted average, the weights between the two prediction blocks can be applied equally or differently, and information about the weights is signaled through bcw_idx.
[0132] To improve the accuracy of motion prediction values, the Merge or AMVP (advanced motion vector prediction) methods can be selectively used on a block-by-block basis. The Merge method configures the motion information of the current block to be identical to the motion information of adjacent blocks; this method has the advantage of increasing the encoding efficiency of motion information by allowing motion information to propagate spatially without change within a homogeneous motion region. On the other hand, the AMVP method predicts motion information in the L0 and L1 prediction directions respectively to represent accurate motion information and signals the most optimal motion information. After deriving motion information for the current block through the AMVP or Merge method, the decoder uses the reference block located in the motion information derived from the reference picture as the prediction block for the current block.
[0133] In Merge or AMVP, the method for deriving motion information may involve constructing a motion candidate list using motion prediction values derived from neighboring blocks of the current block, and then signaling index information for the optimal motion candidate. In the case of AMVP, since motion candidate lists are derived for L0 and L1 respectively, the optimal motion candidate indices (mvp_l0_flag, mvp_l1_flag) for L0 and L1 respectively are signaled. In the case of Merge, since a single motion candidate list is derived, a single merge index (merge_idx) is signaled. The motion candidate lists derived from a single coding unit can vary, and a motion candidate index or a merge index may be signaled for each motion candidate list. In this case, a mode in which there is no information regarding the remaining block in a block encoded in Merge mode can be referred to as MergeSkip mode.
[0134] Bidirectional motion information for the current block can be derived by combining AMVP and Merge modes. For example, motion information in the L0 direction can be derived using the AMVP method, while motion information in the L1 direction can be derived using the Merge method. Conversely, Merge can be applied to L0 and AMVP to L1. This encoding mode can be referred to as the AMVP-merge mode.
[0135] In this specification, the motion candidate and the motion information candidate may have the same meaning. Additionally, the motion candidate list and the motion information candidate list may have the same meaning.
[0136] SMVD (Symmetric MVD) is a method that reduces the amount of bits of motion information transmitted by making the Motion Vector Difference (MVD) values in the L0 and L1 directions symmetrical in the case of bi-directional prediction. The MVD information in the L1 direction that is symmetrical to the L0 direction is not transmitted, and the reference picture information in the L0 and L1 directions is also not transmitted and can be derived during the decoding process.
[0137] OBMC (Overlapped Block Motion Compensation) is a method that generates prediction blocks for the current block using motion information from surrounding blocks when motion information between blocks differs, and then generates a final prediction block for the current block by weighted averaging the prediction blocks. This has the effect of reducing blocking phenomena occurring at block boundaries in motion-compensated images.
[0138] The video signal processing device can divide the current block into multiple sub-blocks and then determine whether to apply OBMC and the OBMC mode for each sub-block. The OBMC mode can be determined based on different weights. The application of OBMC and the OBMC mode can be determined through a reference template constructed using surrounding samples adjacent to the current sub-block. The video signal processing device can predict a template using motion information of the current sub-block and motion information of surrounding blocks of the current sub-block, and then determine whether to apply OBMC and the OBMC mode based on the SAD or MR-SAD cost between the predicted template and the reference template. An OBMC mode using a template can be referred to as TM OBMC (Template Matching OBMC).
[0139] Generally, merge motion candidates have low motion accuracy. To improve the accuracy of these merge motion candidates, the MMVD (Merge mode with MVD) method can be used. The MMVD method corrects motion information using a single candidate selected from several motion difference value candidates. Information regarding the motion correction value obtained through the MMVD method (e.g., an index indicating a single candidate selected from the motion difference value candidates) can be included in the bitstream and transmitted to the decoder. Compared to the conventional method where motion information difference values are included in the bitstream, the amount of bits can be saved by including information regarding the motion correction value in the bitstream.
[0140] MBVD (Merge Mode with Block Vector Differences) mode is a method for encoding difference values for block vectors, similar to MMVD, which is a merge mode that encodes difference values for motion vectors. The MBVD method determines a block vector by using a single candidate selected from several block vector difference value candidates. Information regarding the block vector difference value obtained through the MBVD method (e.g., an index indicating the single candidate selected from the block vector difference value candidates) can be included in the bitstream and transmitted to the decoder. Compared to the conventional method of including the block vector difference value in the bitstream, bit volume can be saved by including only a portion of the information regarding the block vector difference value in the bitstream.
[0141] Template Matching (TM) is a method that constructs a template using the surrounding pixels of the current block and finds the matching region with the highest similarity to the template to correct motion information. Template Matching is a method that performs motion prediction in the decoder without including motion information in the bitstream in order to reduce the size of the encoded bitstream. In this case, since the decoder does not have the original image, it can roughly derive motion information for the current block by using already restored surrounding blocks.
[0142] BM (Bilateral Matching) may be a method in which a video signal processing device corrects motion information based on the similarity between a reference block in a picture included in an L0 picture list derived based on motion information of the current block and a reference block in a picture included in an L1 picture list.
[0143] The Decoder-side Motion Vector Refinement (DMVR) method is a method that corrects motion information through the correlation of already restored reference images to find more accurate motion information. It uses the bidirectional motion information of the current block to select the point within the two reference pictures that best matches the reference blocks within the reference pictures within an arbitrary defined area of the two reference pictures as the new bidirectional motion. When this DMVR is performed, the encoder can correct motion information by performing DMVR at the block level, and then divide the block into sub-blocks to perform DMVR at the sub-block level to correct the motion information of the sub-blocks. This can be referred to as Multi-pass DMVR (MP-DMVR).
[0144] The video signal processing device can construct an initial list of motion candidates and correct each motion candidate within the initial list using the TM or DMVR method. The video signal processing device can obtain a reordered list of motion candidates by reordering the corrected motion candidates based on the template cost. This can be referred to as ARMC (Adaptive Reordering of Merge Candidates).
[0145] The LIC (Local Illumination Compensation) method is a method for compensating for changes in luminance between blocks. It involves deriving a linear model using neighboring pixels adjacent to the current block, and then compensating for the luminance information of the current block through the linear model.
[0146] Existing video encoding methods perform motion compensation that considers only up, down, left, and right translations, so encoding efficiency is reduced when encoding videos that include movements such as enlargement, reduction, and rotation, which are commonly encountered in reality. To represent movements such as enlargement, reduction, and rotation, an Affine model-based motion prediction technique using a 4-parameter (rotation) or 6-parameter (enlargement, reduction, rotation) model can be applied.
[0147] Bi-Directional Optical Flow (BDOF) is used to correct a prediction block by estimating the amount of pixel change based on optical flow from a reference block of a block composed of bidirectional motion. The motion of the current block can be corrected using motion information derived from the BDOF of this VVC.
[0148] PROF (Prediction refinement with optical flow) is a technology designed to improve the accuracy of sub-block affine motion prediction to be comparable to that of pixel-level motion prediction. Similar to BDOF, PROF is a technique that obtains a final prediction signal by calculating pixel-level correction values for sub-block affine motion-compensated pixel values based on optical flow.
[0149] The CIIP (Combined Inter / Intra-picture Prediction) method generates a final prediction block for the current block by taking a weighted average of the prediction blocks generated by the intra-picture prediction method and the prediction blocks generated by the inter-picture prediction method.
[0150] The Intra Block Copy (IBC) method locates the part most similar to the current block within an already restored area of the current picture and uses that reference block as the prediction block for the current block. In this process, information related to the block vector—the distance between the current block and the reference block—can be included in the bitstream. The decoder can parse the information related to the block vector contained in the bitstream to calculate or set the block vector for the current block.
[0151] The BCW (Bi-prediction with CU-level Weights) method is a method that performs a weighted average of two motion-compensated prediction blocks by adaptively applying weights on a block-by-block basis, rather than generating a prediction block by averaging two motion-compensated prediction blocks from different reference pictures.
[0152] The Intra TMP (Template Matching Prediction) method is a method in which a video signal processing device constructs a reference template using pixel values of neighboring blocks adjacent to the current block, finds the part most similar to the constructed reference template in an already restored area within the current picture, and then uses that reference block (the part found in the already restored area) as a prediction block for the current block.
[0153] The Multi-hypothesis Prediction (MHP) method performs weighted prediction through various prediction signals by transmitting additional motion information to unidirectional and bidirectional motion information during cross-frame prediction.
[0154] The Cross-component Linear Model (CCLM) is a method that predicts a chrominance signal by constructing a linear model utilizing the high correlation between a luminance signal and a chrominance signal located at the same position as the luminance signal. A template is constructed using a reconstructed block among the surrounding blocks adjacent to the current block, and parameters for the linear model are derived through this template. Next, depending on the image format, the reconstructed current luminance block is selectively downsampled to match the size of the chrominance block. Finally, the chrominance block of the current block is predicted using the downsampled luminance block and the corresponding linear model. In this context, the method of using two or more linear models is called Multi-model Linear Mode (MMLM). To derive two linear models for MMLM, the video signal processing device may construct two reference sample groups based on the average value of luminance reference samples and utilize each reference sample group.
[0155] The Gradient Linear Model (GLM) is a method that predicts color difference signals by constructing a model that additionally incorporates the gradient between a luminance sample corresponding to a color difference sample and surrounding luminance samples adjacent to it, in addition to linear models such as CCLM.
[0156] Prediction methods that utilize the correlation between different signals, such as CCLM, MMLM, CCCM, and GLM, can be called Cross-Component Prediction (CCP). In other words, a method of predicting another signal (which can be a chrominance signal, such as Cb or Cr) from a single signal (e.g., a luminance signal) can be called Cross-Component Prediction (CCP).
[0157] The CCP merge method is a method that predicts the color difference block of the current block using CCP models (such as CCLM, MMLM, and CCCM) used in neighboring blocks.
[0158] The encoding modes (prediction modes) described in this specification may be described by omitting the term "mode" or by using the term "method" instead of "mode." For example, a CCLM mode may be described as a CCLM method or CCLM.
[0159] In independent scalar quantization, the input coefficient t k The restored coefficient t' for k is the related quantization index q k It depends only on . That is, the quantization index for any restored coefficient has a different value from the quantization indices for other restored coefficients. In this case, t' k is t k It may be a value including quantization error, and may differ or be the same depending on the quantization parameter. Here, t' k It can be named the restored transformation coefficient or the inverse quantized transformation coefficient, and the quantization index can also be named the quantized transformation coefficient.
[0160] In Uniform Reconstruction Quantizers (URQ), the reconstructed coefficients are arranged at equal intervals. The distance between two adjacent reconstructed values can be called the quantization step size. The reconstructed values may include zero, and the entire set of available reconstructed values can be uniquely defined according to the quantization step size. The quantization step size may vary depending on the quantization parameter.
[0161] In conventional methods, quantization reduces the set of acceptable reconstructed transformation coefficients, and the number of elements in this set can be finite. Consequently, there are limitations in minimizing the average error between the original image and the reconstructed image. Vector quantization can be used as a method to minimize this average error.
[0162] A simple form of vector quantization method used in video encoding is sign data hiding. This is a method in which the encoder does not encode the sign for a single non-zero coefficient, and the decoder determines the sign for that coefficient based on whether the sum of the absolute values of all coefficients is even or odd. To achieve this, at least one coefficient in the encoder can be increased or decreased by '1', and at least one coefficient can be selected and adjusted to be optimal in terms of the cost of rate distortion. As an example of implementation, a coefficient having a value close to the boundary of the quantization interval can be selected.
[0163] Another vector quantization method is Trellis-Coded Quantization, which is utilized in video encoding as an optimal path search technique to obtain optimized quantization values in dependent quantization. In block units, quantization candidates for all coefficients within a block are placed on a trellis graph, and the optimal trellis path between the optimized quantization candidates is searched while considering the cost of rate distortion. Specifically, dependent quantization applied in video encoding can be designed so that the set of acceptable restored transform coefficients depends on the value of the transform coefficient preceding the current transform coefficient in the restoration order. In this case, by selectively using multiple quantizers based on the transform coefficient, the average error between the original image and the restored image is minimized, thereby increasing encoding efficiency.
[0164] Among intra-prediction coding techniques, the Matrix Intra Prediction (MIP) method is a matrix-based intra-prediction method that, unlike prediction methods that derive directionality from pixels of neighboring blocks adjacent to the current block, obtains a prediction signal by utilizing predefined matrix and offset values for pixels to the left and top of neighboring blocks.
[0165] To derive the intra-mode derivation of the current block, an intra-mode derivation derived from the surrounding pixels of a template—which is an arbitrary region adjacent to the current block that has been restored—can be used for the restoration of the current block. First, the decoder generates a prediction template for the template using surrounding pixels (references) adjacent to the template, and the intra-mode derivation that generates the prediction template most similar to the already restored template can be used for the restoration of the current block. This method can be called TIMD (Template intra-mode derivation).
[0166] The TIMD merge mode is a mode used in the current block by inheriting TIMD information from neighboring blocks encoded in TIMD or TIMD merge mode. The TIMD information may be at least one of the following: an intra-prediction directionality mode, information on whether to apply a weighted average, weight information for each intra-prediction mode, and transformation type information. The video signal processing device may construct a TIMD merge list using the TIMD information used in neighboring blocks, and the video signal processing device may add a predetermined maximum number of TIMD information derived from neighboring blocks to the TIMD merge list in order from the closest location to the current block to the furthest location. Here, the predetermined maximum number may be a positive integer greater than or equal to 1, and may be 5. Next, the video signal processing device may rearrange the TIMD merge list based on the template cost and then use the candidate with the minimum cost as the TIMD mode for the current block. And, if the current block is encoded in TIMD merge mode, the video signal processing device may implicitly use the DST7 transform for the residual signal when the size of the current block is 4 or greater and 16 or less, and otherwise use a transform type derived from a neighboring block. Here, the transform type derived from a neighboring block may be transform type information within the TIMD candidate for the current block determined from the TIMD merge list.
[0167] Generally, an encoder can determine a prediction mode for generating a prediction block and generate a bitstream containing information about the determined prediction mode. A decoder can parse the received bitstream to set an intra prediction mode. In this case, the bit amount of information regarding the prediction mode may be about 10% of the total bitstream size. To reduce the bit amount of information regarding the prediction mode, the encoder may not include information about the intra prediction mode in the bitstream. Accordingly, the decoder can derive (determine) an intra prediction mode for the restoration of the current block by utilizing the characteristics of surrounding blocks, and can restore the current block using the derived intra prediction mode. In this case, to derive the intra prediction mode, the decoder may use a method of inferring directional information by applying a Sobel filter in the horizontal and vertical directions to each surrounding pixel adjacent to the current block, and then mapping that directional information to the intra prediction mode. The method by which the decoder derives the intra prediction mode using surrounding blocks can be described as DIMD (Decoder-side intra mode derivation).
[0168] If the current block is a luminance block, the video signal processing device can derive an intra prediction mode through the DIMD and TIMD methods. If the current block is a chrominance block, since there is an already restored luminance block corresponding to the chrominance block, the video signal processing device can derive an intra prediction mode by applying the DIMD and TIMD methods using the restored luminance block, and then use the derived intra prediction mode as the intra prediction mode for the chrominance block. That is, the video signal processing device may derive directional information when the current block is a luminance block, and may not derive directional information when the current block is a chrominance block, and may apply the directional information found in the luminance block to the chrominance block. This mode can be referred to as the "DIMD Chroma" mode or the "TIMD Chroma" mode.
[0169] Figure 7 is a diagram showing the locations of surrounding blocks used to construct a list of motion candidates in inter prediction.
[0170] The surrounding blocks may be blocks of spatial location or blocks of temporal location. A surrounding block spatially adjacent to the current block may be at least one of the Left (A1) block, Left Below (A0) block, Above (B1) block, Above Right (B0) block, or Above Left (B2) block. A surrounding block temporally adjacent to the current block may be a block containing the top-left pixel position of the bottom-right (BR) block of the current block in the corresponding collocated picture. If the surrounding block temporally adjacent to the current block is encoded in intra mode or if the surrounding block temporally adjacent to the current block exists in an unusable location, a block containing the horizontal and vertical center (Center, Ctr) pixel position of the current block in the collocated picture corresponding to the current block may be used as the temporal surrounding block. Motion candidate information derived from a corresponding picture can be referred to as TMVP (Temporal Motion Vector Predictor). Only one TMVP can be derived from a single block, or a single block can be divided into multiple sub-blocks, and a TMVP candidate can be derived for each sub-block. The method of deriving TMVP at the sub-block level can be referred to as sbTMVP (sub-block Temporal Motion Vector Predictor).
[0171] Whether the methods described herein may be applied may be determined based on at least one of the following information: slice type information (e.g., whether it is an I slice, P slice, or B slice), whether it is a tile, whether it is a sub-picture, the size of the current block, the depth of the coding unit, whether the current block is a luminance block or a chrominance block, whether it is a reference frame or a non-reference frame, and temporal hierarchy according to the reference order and hierarchy. The information used to determine whether the methods described herein may be applied may be information agreed upon in advance between the decoder and the encoder. Additionally, such information may be determined according to profiles and levels. Such information may be expressed as variable values, and the bitstream may contain information regarding variable values. That is, the decoder may determine whether the methods described above are applied by parsing information regarding variable values included in the bitstream. For example, whether the methods described above are applied may be determined based on the horizontal length or vertical length of the coding unit. The methods described above may be applied if the width or height is 32 or greater (e.g., 32, 64, 128, etc.). Additionally, the methods described above may be applied if the width or height is less than 32 (e.g., 2, 4, 8, 16). Additionally, the methods described above may be applied if the width or height is 4 or 8.
[0172] FIG. 8 illustrates a method for determining a reference pixel line based on a template according to one embodiment of the present specification.
[0173] The method for determining the optimal reference pixel line for the current block (for the restoration of the current block) based on the template below is described. Here, the reference pixel line may have the same meaning as the reference sample line.
[0174] Referring to FIG. 8, the video signal processing device can construct a reference template using reference pixel lines adjacent to the current block. The video signal processing device can generate prediction samples for the location of the reference template using reference pixel lines 1, 2, 3..., etc. The video signal processing device can calculate the cost between the generated prediction samples and the samples of the reference template. At this time, the cost can be calculated through methods such as SAD (Sum of Absolute Differences) or MRSAD (Mean-Removed SAD). The reference pixel corresponding to the minimum cost may be the optimal reference pixel. Additionally, the encoder can rearrange the calculated costs in ascending order, construct a list of reference pixel lines, and then generate and signal a bitstream containing information about the index of the optimal reference pixel line. The decoder can construct a list of reference pixel lines through the method described above, parse the index of the optimal reference pixel line included in the bitstream, and generate prediction samples using the reference pixel line indicated by the index. As described in this specification, a method for a video signal processing device to determine a reference pixel line based on a template may be described as a Template-based Multiple Reference Line (TMRL) method or a TMRL intra-prediction method. When calculating the template cost, the video signal processing device may use any one of SAD, SATD, MR-SAD, and MR-SATD.SAD (Sum of Absolute Difference) is the sum of absolute values of differences between samples, SATD (Sum of Absolute Transformed Difference) is the sum of absolute values of transformed differences between samples, MR-SAD (Mean Removal SAD) is the sum of absolute values of differences between samples minus the mean, and SATD (Mean Removal SATD) is the sum of absolute values of transformed differences between samples minus the mean. Here, various transformations may be used, and as an example, a Hadamard transformation with low complexity may be used.
[0175] In addition, in this specification, a method in which a video signal processing device generates a plurality of prediction blocks using a plurality of reference pixel lines and then generates a final prediction block by weighted averaging each prediction block may be described as intra fusion.
[0176] FIG. 9 is a diagram showing block vectors related to an IBC encoding method according to one embodiment of the present specification.
[0177] The IBC encoding method (IBC mode) is a method that finds the part most similar to the current block (reference block) within an already restored area of the current picture and uses the reference block as the prediction block for the current block. In this case, the encoder can generate a bitstream containing information related to the block vector, which is the distance between the current block and the reference block. The decoder can parse the information related to the block vector contained in the bitstream to calculate or set the block vector for the current block. The IBC encoding method can be applied to the chrominance block. In the chrominance block, instead of finding a new block vector, the block vector of the luminance block corresponding to the chrominance block can be used as the block vector for the chrominance block; this encoding method can be referred to as the DBV (Direct Block Vector) mode.
[0178] The RRIBC (Reconstruction-Reordered IBC) encoding mode can be used in IBC blocks (blocks to which the IBC encoding method is applied). RRIBC can consist of vertical flips and horizontal flips. In blocks to which RRIBC is applied, the reconstructed block is flipped according to the RRIBC type of the current block. The encoder may flip the original block to be encoded before finding the part most similar to the current block in the reference picture. That is, the most similar part in the reference picture is found using the flipped original block. Therefore, the prediction block uses the unflipped block, and the residual block may also be the unflipped block. The decoder may flip the final reconstructed block according to the RRIBC type of the current block.
[0179] Figure 10 shows a method for predicting the current block using RRIBC in the horizontal direction.
[0180] Figure 11 shows a method for predicting the current block using RRIBC in the vertical direction.
[0181] In FIGS. 10 and 11, (Xn, Yn) represents the center position of the surrounding blocks, and (Xc, Yc) represents the center position of the current block. BV n h , BV n v represent the horizontal block vector and vertical block vector of the surrounding block, respectively, and BV C h , BV C v and represent the horizontal block vector and vertical block vector of the current block, respectively. As shown in Fig. 10, when the RRIBC type of the current block is horizontal, BV C h is 2 * (Xn - Xc) + BV n hIt can be calculated as, and as shown in Fig. 11, if the RRIBC type of the current block is in the vertical direction, BV C v is 2 * (y n - y c ) + BV n v It can be calculated as. In this case, BV n h , BV n v Since it uses the restored block, BV n h , BV n v The sign of can be negative.
[0182] When the current block is encoded in RRIBC, the video signal processing device can determine the optimal block vector by constructing a block vector candidate list. In this case, the video signal processing device may construct the block vector candidate list according to the RRIBC type of the current block. For example, if the RRIBC type of the current block is horizontal, the video signal processing device may construct the block vector candidate list using only the surrounding blocks of the current block encoded in horizontal RRIBC. Additionally, the video signal processing device may construct the block vector candidate list regardless of the RRIBC type of the current block. For example, if the RRIBC type of the current block is horizontal, the block vector candidate list may be constructed using not only the surrounding blocks of the current block encoded in horizontal RRIBC, but also the surrounding blocks of the current block encoded in vertical RRIBC, / or blocks encoded in general motion, and / or blocks encoded in block vectors.
[0183] When a video signal processing device predicts the current block using general motion, the device may construct a motion candidate list based on whether the surrounding blocks of the current block are encoded in IBC mode or RRIBC mode. In this case, if the surrounding blocks of the current block are encoded in RRIBC mode, the device may construct the motion candidate list by additionally considering the RRIBC type. For example, when the video signal processing device constructs a motion candidate list for the current block, if the encoding mode of the surrounding blocks is RRIBC mode and the RRIBC type is vertical or horizontal, the block vector of the surrounding blocks may not be included in the motion candidate list. Alternatively, when the video signal processing device predicts the current block using general motion, the device may construct the motion candidate list regardless of the encoding mode of the surrounding blocks of the current block. That is, the video signal processing device may construct a motion candidate list regardless of whether the surrounding blocks of the current block are encoded in IBC mode or RRIBC mode. For example, when a video signal processing device constructs a motion candidate list for a current block, it may include the block vector of a surrounding block in the motion candidate list even if the encoding mode of the surrounding block of the current block is IBC mode and the RRIBC type is vertical or horizontal direction.
[0184] The RRIBC encoding method is effective for images with symmetrical characteristics. Symmetrical characteristics can refer to perfect horizontal (or vertical) symmetry, where the current block and the reference block are separated by equal distances along a single central axis. The vertical (or horizontal) direction (axis of symmetry) of the current block may lie on the same line as the vertical (or horizontal) direction (axis of symmetry) of the reference block. In this case, the block vector in the vertical (or horizontal) direction may be set to '0', and the block vector in the horizontal direction may be set to any negative value other than '0'. The current block and the reference block may be configured symmetrically, differing by different distances along a single central axis, and the current block and the reference block may lie on different vertical lines. In this case, the block vector in the vertical direction may be set to any negative value other than '0'. That is, a video signal processing device can encode or decode the current block using a symmetric block in which both the horizontal and vertical directions have block vector values of any negative value other than '0'.
[0185] FIG. 12 shows a block vector of a block encoded in Intra TMP mode according to one embodiment of the present specification.
[0186] Referring to FIG. 12, the Intra TMP method (Intra TMP encoding mode) is a method in which a video signal processing device constructs a reference template using pixel values of neighboring blocks adjacent to the current block, finds the part most similar to the reference template within an already restored area (reference block) in the current picture, and then uses the reference block (Ref. luma block in FIG. 12) as a prediction block for the current block. At this time, there may be one or more block vectors used to generate a prediction block for the current luminance block, and FIG. 12 shows the case where there are two block vectors. The video signal processing device can generate a prediction block for the luminance block by weighted averaging the reference blocks predicted from the two block vectors of the current luminance block. This can be referred to as a fusion mode. In the case of a chrominance block, the video signal processing device can derive a block vector from the luminance block corresponding to the chrominance block and then use the block vector to generate a chrominance prediction block. There may be one or more block vectors used to generate a prediction block for the current chrominance block, and FIG. 12 shows the case where there are two block vectors for the chrominance block. In this case, the block vector of the chrominance block may be the same as or different from the block vector derived from the luminance block. In Intra TMP mode, the video signal processing device derives filter coefficients using the correlation between samples around the reference block indicated by the block vector and samples around the current block, and can apply filtering to the reference block indicated by the block vector using the derived filter coefficients. The video signal processing device can use the filtered reference block as the prediction block for the current block. This can be referred to as Intra TMP filtering mode. In Intra TMP mode, the video signal processing device can apply compensation to the current prediction block through the block vector, similar to the LIC method using motion information.
[0187] If the current block is divided into two regions using diagonal lines, such as in GPM mode, and both divided regions are predicted using Intra Prediction Mode (or IBC mode, or Intra TMP), this can be called Spatial GPM (SGPM) mode. Therefore, the combination of modes that can be used for the two divided regions can be one of (Intra Prediction Mode, Intra Prediction Mode), (Intra Prediction Mode, IBC Mode), (IBC Mode, Intra Prediction Mode), or (IBC Mode, IBC Mode). Additionally, in the above combinations, IBC mode can be changed to Intra TMP mode, and a combination of (IBC mode, Intra TMP mode) is also possible.
[0188] FIG. 13 illustrates a case where the current block is divided by a GPM mode according to one embodiment of the present specification, and the divided area is encoded in an IBC mode.
[0189] The current block can be encoded or decoded in IBC-GPM mode. IBC-GPM mode may refer to a mode in which the current block is divided using GPM mode, and the divided regions are encoded in intra prediction mode or IBC prediction mode. Referring to Fig. 13, the current block can be divided into two regions based on the dotted line. At this time, one of the divided regions can be encoded in intra prediction mode, and the other can be encoded in IBC prediction mode. For example, among the divided regions, the left region can be encoded in intra prediction mode, and the right region can be encoded in IBC prediction mode. At this time, the region encoded in IBC prediction mode can be encoded in Intra TMP prediction mode, and this can be described as IntraTMP-GPM mode.
[0190] FIG. 14 illustrates a method in which a current block is encoded in IBC-CIIP mode according to one embodiment of the present specification.
[0191] The video signal processing device can predict the current block using a weighted average between the block predicted in intra mode and the block predicted in IBC mode, which can be referred to as the IBC-CIIP mode. In this case, the block predicted in Intra TMP mode may be used instead of the block predicted in IBC mode, which can be referred to as the IntraTMP-CIIP mode.
[0192] The video signal processing device can obtain a restored luminance block by adding the residual signal for the luminance prediction block of the current block and the luminance block, and can construct a CCP model using the correlation between the restored luminance block and the luminance prediction block. At this time, the CCP model can be one of CCLM, MMLM, GLM, CCCM, MM-CCCM, GL-CCCM, CCCM-ND, and CCCM-MDF. A first chrominance prediction block with the CCP model applied can be generated by applying the CCP model derived from the luminance block to the chrominance prediction block. A final chrominance block can be generated by adding the error signal for the first chrominance prediction block and the chrominance block.
[0193] If the current luminance block is encoded in Intra TMP or IBC mode, the video signal processing device can derive a CCP model through the correlation between the luminance block and the chrominance block of the reference block indicated by the block vector of the current luminance block. Using the derived CCP model and the currently restored luminance block, Cb and Cr prediction blocks, which are chrominance prediction blocks for the current block, can be generated. This is referred to as BVG CCP (block vector guided cross component prediction). The CCP model may include at least one of CCLM, MMLM, GLM, MM-GLM, CCCM, MM-CCCM, GL-CCCM, GL-MM-CCCM, CCCM-ND, MM-CCCM-ND, CCCM-MDF, MM-CCCM-MDF, and Chroma Fusion. If the CCCM model is applied, it may be referred to as BVG CCCM. If the GL-CCCM model is applied, it may be referred to as BVG GL-CCCM. In addition, various CCP models can be applied to BVG CCPs.
[0194] The types of CCP models may include at least one of CCLM, MMLM, GLM, MM-GLM, CCCM, MM-CCCM, GL-CCCM, MM-GL-CCCM, CCCM-ND, MM-CCCM-ND, CCCM-MDF, MM-CCCM-MDF, Chroma Fusion, BVG-CCCM, and CCP Merge. An MMLM may be composed of two CCLMs. If the types of CCP models between CCP models are different, they may be considered different CCP models. If the types of CCP models between CCP models are the same but the parameters between CCP models are different, they may be considered different CCP models. If the number of CCP models between CCP models is different, for example, if the first CCP model is composed of one CCLM and the second CCP model is composed of two CCLMs, they may be considered different CCP models. The types of CCP models may be referred to as CCP modes.
[0195] In chroma fusion (CF), the video signal processing unit can predict the chroma difference signal through a weighted average between the chroma difference block predicted via an intra-prediction mode and the current luminance block, without using a linear model (LM) mode. In this case, the weight parameters can be derived using the CCCM method.
[0196] BVG CCP (Block Vector Guided Cross Component Prediction) may be a method for deriving a CCP model through the correlation between the luminance block and the chrominance block of a reference block indicated by the block vector of the luminance block when the current luminance block is encoded in Intra TMP or IBC mode. Using the derived BVG CCP model and the currently restored luminance block, Cb and Cr prediction blocks, which are chrominance prediction blocks for the current block, can be generated.
[0197] In a Gradient Linear Model (GLM), the video processing unit constructs the model by additionally reflecting the gradient between the luminance sample corresponding to the color difference sample in the linear model and the surrounding luminance samples adjacent to that luminance sample, and can predict the color difference signal through the model.
[0198] The CCP model used to predict color difference blocks constructs a list of CCP candidates using the CCP models used in the surrounding blocks of the current block, and can derive the optimal CCP candidate from the list. This can be referred to as CCP merge mode.
[0199] FIG. 15 shows an example of a reference region and filter shape used to derive CCCM parameters according to an embodiment of the present specification.
[0200] CCCM (Convolutional Cross-Component Intra Prediction Model) is a method for predicting chrominance signals using a non-linear model constructed by utilizing the high correlation between a luminance signal and a chrominance signal located at the same position as the luminance signal. Fig. 15(a) shows the positional relationship between reference samples (vertical diagonal lines, 1520) for applying CCCM to the current prediction block (diagonal diagonal lines, 1510) and side samples (horizontal diagonal lines) required when applying a cross-shaped filter. The current prediction block (MxN) can be composed of reference samples in the top 6 rows (2Mx6), reference samples in the left 6 rows (6x2N), and 6x6 reference samples in the top-left row, with a chroma to luminance sample count ratio of 1:1. When a video signal processing device applies a cross-shaped sample filter (Fig. 15(b)) for CCCM to the chroma sample prediction equation (Fig. 15(c)), cases occur where the reference sample area is exceeded. In this case, the additional samples required may be side samples. The chroma sample prediction relationship of Fig. 15(c) can be applied to each chroma component (i.e., Cb, Cr). The sample at position C (Center) in Fig. 15(b) may be a luminance sample corresponding to the Cb and Cr chroma samples, and N (North), E (East), S (South), and W (West) may be luminance samples adjacent to the luminance sample at position C. Side samples may be additionally required one sample at a time for regions other than the reference sample, depending on the position of the C sample. If the sample value at the position of the side sample is unavailable, the sample value at the unavailable position may be padded with the C sample value. The P value in Fig. 15(c) may be a nonlinear term. The P value can be calculated as P = ( C*C + midVal ) >> bitDepth, and in the case of 10-bit content, P = ( C*C + 512 ) >> 10.In FIG. 15(c), the B value can be an integer offset value as a bias value. The B value can be an intermediate value of bitDepth. For 10-bit content, the B value can be 512.
[0201] MM-CCCM (multi-model CCCM) is a method that derives two CCCM parameters based on the average value of a reference area (or restored current luminance block).
[0202] GL-CCCM (Gradient and location based convolutional cross-component model) is an additional CCCM mode that utilizes gradient and location information. In the case of the existing CCCM mode, the video signal processing unit can derive a chrominance sample for the current block using the luminance sample at the location corresponding to the chrominance sample to be predicted, four samples surrounding that luminance sample, and coefficient information. In the case of the GL-CCCM mode, the video signal processing unit can derive a chrominance sample for the current block by reflecting the vertical and horizontal differences of the luminance sample at the location corresponding to the chrominance sample to be predicted and eight samples surrounding that luminance sample, and also using the location value of the current luminance sample and its coefficient information.
[0203] When CCCM mode is applied, the video signal processing device may apply downsampling filters to match the resolution difference between the luminance block and the chrominance block. This is to reduce the resolution of the luminance block to that of the chrominance block. The mode that applies downsampling filters can be described as CCCM-MDF (CCCM with multiple downsampling filters).
[0204] When an inter-coding mode is applied to the current block, the video signal processing device may derive linear and non-linear models between a luminance prediction block (Y') derived using the motion information of the current block and a first chrominance prediction block (Cb', Cr') derived using the motion information of the current block (Derive filter), generate a restored luminance block of the current block using the luminance residual block of the current block, and generate a second chrominance prediction block of the current block by applying the derived linear and non-linear models to the restored luminance block of the current block (Apply filter). Subsequently, the video signal processing device may generate the final chrominance block (Cb, Cr) of the current block by adding the chrominance residual block to the second chrominance prediction block of the current block predicted using the linear and non-linear models. This method may be described as a cross-component residual model (CCRM). CCRM, Inter CCCM, and Inter CCP may have the same meaning.
[0205] The types of CCP models may include CCLM, MMLM, GLM, MM-GLM, CCCM, MM-CCCM, GL-CCCM, MM-GL-CCCM, CCCM-ND, MM-CCCM-ND, CCCM-MDF, MM-CCCM-MDF, Chroma Fusion, BVG-CCCM, CCP Merge, etc. MMLM may consist of two CCLMs. If the types of CCP models differ between CCP models, they can be considered different CCP models. If the types of CCP models are the same but the parameters differ between CCP models, they can be considered different CCP models. If the number of CCP models differs between CCP models (for example, if the first CCP model consists of one CCLM and the second CCP model consists of two CCLMs), they can be considered different CCP models. The type of a CCP model can be referred to as a CCP mode.
[0206] The video signal processing unit can construct a CCP list using a CCP model derived from the surrounding blocks of the current block, and then predict the chrominance block of the current block using the CCP list; this is referred to as the CCP merge mode. In this case, the surrounding blocks may be one or more of the following: surrounding blocks at spatially adjacent locations, surrounding blocks at spatially non-adjacent locations, temporal surrounding blocks corresponding to the position of the current block in a reference picture, or temporal surrounding blocks corresponding to a position moved by motion information related to the current block in the reference picture. Furthermore, when deriving the CCP model from the surrounding blocks, the CCP model and CCP model parameters used in the surrounding blocks can be added to the list. Additionally, when deriving the CCP model from the surrounding blocks, newly derived CCP models and CCP model parameters can be added to the list using the correlation between the luminance and chrominance of the surrounding blocks. Moreover, CCP models and model parameters derived from a CCP model table stored in a separate memory can be added to the CCP list. Furthermore, newly derived CCP models can be added to the CCP list using combinations of CCP candidates within the CCP list. Additionally, a newly derived CCP model can be added to the CCP list by modifying the model parameters of a CCP candidate within the CCP list. The current block can predict the current color difference block using the model parameters of the optimal CCP candidate from the CCP list. Furthermore, the current block can predict the current color difference block by utilizing only the model type of the optimal CCP candidate from the CCP list, newly deriving the CCP model parameters from adjacent samples of the current block, and then using the newly derived CCP model parameters.
[0207] FIG. 16 illustrates a method for correcting motion information according to one embodiment of the present specification.
[0208] FIG. 16(a) illustrates a process of outputting new motion information by refining (revising) motion information derived from surrounding blocks of the current block. Referring to FIG. 16(a), the decoder can obtain refined motion information by refining motion information regarding surrounding blocks of the current block using various motion correction methods. Referring to FIG. 16(b), the decoder can obtain a list of motion candidates by deriving a list of motion candidates from surrounding blocks of the current block and then refining one or more motion candidates within the derived list using various motion correction methods. The list of motion candidates can be constructed using motion information derived from surrounding blocks of the current block. The decoder can obtain a list of refined motion candidates containing one or more corrected motion candidates by performing a motion correction process on one or more motion candidates within the list of motion candidates, either individually or collectively. Referring to FIG. 16(c), the decoder can obtain refined motion information by refining initial motion information regarding the current block using various motion correction methods. At this time, the motion correction method may be MVD (Motion Vector Difference), TM (Template Matching), BM (Bilateral Matching), MMVD (Merge mode with MVD), TM based on MMVD (Merge mode with MVD), TM based on optical flow, Multipass DMVR, etc.
[0209] FIGS. 17 and 18 illustrate a method for correcting motion information using a DMVR according to one embodiment of the present specification.
[0210] DMVR is a method for acquiring corrected motion information for the current block using the Bilateral Matching (BM) method. The Bilateral Matching (BM) method corrects initial motion information by finding the most similar parts between the surrounding search areas of the L0 reference block and the L1 reference block in a block with bilateral motion, and uses the corrected motion information for the prediction of the current block. The size of the search area can be set to an arbitrary (mxn) size based on a specific point of the reference block. For example, the specific point can be the top-left position or the center position of the reference block, and the arbitrary size can be 16 x 16. The most similar part can be the point corresponding to the smallest cost value calculated by determining the pixel-unit cost value between each block. The cost value can be calculated using the Sum of Absolute Differences (SAD) or Mean-Removed SAD (MRSAD) method. Information regarding which method is used to calculate the cost value may be included in at least one of the bitstream's SPS, PPS, picture header, or slice header. The decoder can calculate a cost value based on the method set by parsing the relevant information. Depending on the search area, the cost value may vary, and the corrected motion information may also vary. The decoder can divide the current block into multiple sub-blocks and correct the motion information using DMVR for each sub-block. This is because the motion information for smaller blocks is more accurate than that for larger blocks. In this case, DMVR is not performed on the large blocks, and DMVR can be performed only on the divided small blocks (e.g., sub-blocks). Referring to FIG. 18, a single block can be divided into several (e.g., four) sub-blocks.The decoder can acquire corrected motion information using DMVR for each divided sub-block. Alternatively, the decoder can use a multiple DMVR method that derives more accurate motion information from the divided small blocks using DMVR, by utilizing the corrected motion information found through DMVR in the large block.
[0211] A video signal processing device can construct a list of motion information candidates using at least one of motion information derived from spatial surrounding blocks, motion information derived from temporal surrounding blocks, history-based motion information, motion information using average values, predetermined motion information, and zero (0,0) motion information.
[0212] FIG. 19 shows a location for inducing a surrounding block according to one embodiment of the present specification.
[0213] When deriving temporal motion information of surrounding blocks (e.g., block vector or motion vector), the video signal processing device can derive motion information from various predefined locations based on the width and height of the current block. Additionally, it can derive motion information of surrounding blocks in a predefined number, for example, the predefined number may be 4. Referring to FIG. 19, the video signal processing device can derive motion information from the locations BR0, Ctr0, BR1, and Ctr1 based on the width and height of the current block. If the predefined number of motion information is not filled, the video signal processing device can derive motion information from the locations BR0, Ctr0, BR1, and Ctr1 recalculated based on two width and height dimensions of the current block. The method of deriving motion information can be repeated until the predefined number of motion information is filled. That is, until the predefined number of motion information is filled, the video signal processing device can derive motion information recalculated based on N times the width and height dimensions of the current block. Here, N can be 5.
[0214] Additionally, the video signal processing device may determine whether to use motion information derived from temporal surrounding blocks as a motion information candidate by judging whether the value is within an arbitrary range, as the derived motion information may not fit the current block if it is located farther away than the position of the current block. For example, the video signal processing device may determine whether to use motion information derived from temporal surrounding blocks as a motion information candidate by using the width and height of the surrounding blocks, the width and height of the current block, the horizontal and vertical values for the center position of the surrounding blocks, or the horizontal and vertical values for the center position of the current block. Specifically, if the absolute value of the difference between the horizontal value for the center position of the surrounding blocks and the horizontal value for the center position of the current block is greater than the value obtained by multiplying the width of the current block (or surrounding blocks) by an arbitrary value, the video signal processing device may not use motion information derived from temporal surrounding blocks as a block vector candidate. Alternatively, if the absolute value of the difference between the vertical value for the center position of a surrounding block and the vertical value for the center position of the current block is greater than the height of the current block (or surrounding block) multiplied by an arbitrary value, the video signal processing device may not use motion information derived from temporal surrounding blocks as a motion information candidate. Here, the arbitrary value can be an integer and can be '3'.
[0215] Whether motion information of a surrounding block can be used as a motion information candidate for the current block or whether motion information of a surrounding block is added to the motion information candidate list may depend on the width and height of the surrounding block, the encoding mode information of the surrounding block (IBC, Intra TMP), information on whether the surrounding block is a spatially derived block or a temporally derived block, the RRIBC type information of the surrounding block, and information on whether one or more of TM (or DMVR), GPM, LIC, OBMC, MHP, and Affine are applied to the surrounding block. For example, if the surrounding block is a block encoded in IBC or Intra TMP mode and at least one of TM (or DMVR), GPM, LIC, OBMC, MHP, and Affine are not applied, the motion information of the surrounding block can be used as a motion information candidate for the current block and can be added to the motion information candidate list. Alternatively, if the current block is encoded in AMVP mode and the RRIBC type of the current block is vertical, and the surrounding block is encoded in IBC mode and the RRIBC type of the surrounding block is horizontal, the motion information of the surrounding block cannot be used as a motion information candidate for the current block and may not be included in the motion information candidate list. If the RRIBC type of the surrounding block is horizontal or vertical and the motion information of the surrounding block can be used as a motion information candidate for the current block, the video signal processing device may use the RRIBC motion information of the surrounding block as a motion information candidate for the current block without changing it, or generate new motion information by adding an arbitrary value to the horizontal and vertical components and then use it as a motion information candidate. Here, the arbitrary value is an integer value determined based on the width and height of the surrounding block or the width and height of the current block, and may be -3, -2, -1, 0, 1, 2, or 3.
[0216] Candidate motion information for the current block can be derived from motion information of neighboring blocks located at arbitrary positions in the horizontal and vertical directions from the top-left position of the current block. Neighboring blocks located at arbitrary positions can be described as non-adjacent blocks, and motion information of neighboring blocks located at arbitrary positions can be described as motion information of non-adjacent blocks. The arbitrary position may vary depending on the width and height of the current block or may be set as an arbitrary integer value. In this case, the arbitrary integer value may be 16, 32, etc. In this case, the arbitrary position may be set within the limits of not exceeding the IBC reference area memory. Whether non-adjacent motion information can be used as motion information candidate or added to the motion information candidate list may depend on whether the non-adjacent motion information is RRIBC motion information. For example, if the current block is encoded in AMVP mode, is not in RRIBC mode, and the motion information derived from a non-adjacent neighbor block is RRIBC motion information, the video signal processing device may not use the motion information derived from the non-adjacent neighbor block as a motion information candidate and may not include it in the motion information candidate list. If the current block is encoded in merge mode and the motion information derived from a non-adjacent neighbor block is RRIBC motion information, the video signal processing device may use the motion information derived from the non-adjacent neighbor block as a motion information candidate and may add it to the motion information candidate list.
[0217] Additionally, motion information candidates for the current block can be derived from motion information stored in a separate memory. The motion information stored in a separate memory can be referred to as HBVP (History-based Block Vector Predictor), and HBVP can be obtained from previously used motion information. Whether an HBVP candidate can be used as a motion information candidate or added to the motion information candidate list depends on whether the HBVP candidate is RRIBC motion information. Whether an HBVP candidate is added to the motion information candidate list depends on the RRIBC type of the temporally adjacent block. For example, if the current block is encoded in AMVP mode, is not in RRIBC mode, and the HBVP candidate is RRIBC motion information, the video signal processing unit may not use the HBVP candidate as a motion information candidate and may not include it in the motion information candidate list. If the current block is encoded in merge mode and the HBVP candidate is RRIBC motion information, the video signal processing unit may use the HBVP candidate as a motion information candidate. If the current block is encoded in merge mode and the HBVP candidate is RRIBC motion information, the video signal processing device may not use the HBVP candidate as a motion information candidate and may not include it in the motion information candidate list. In another embodiment, if the current block is encoded in any way, the HBVP candidate is RRIBC motion information, the video signal processing device may not use the RRIBC motion information as a motion information candidate and may not add it to the motion information candidate list.
[0218] The video signal processing device may generate a new motion information candidate from motion information candidates within the motion information candidate list of the current block and add it to the motion information candidate list. The newly added motion information candidate may be described as a pair-wise motion information candidate. Specifically, the video signal processing device may generate a new motion information candidate by obtaining a first motion information candidate and a second motion information candidate from the motion information candidate list, calculating the average between the horizontal components and the average between the vertical components of the two motion information candidates, and adding the new motion information candidate to the motion information candidate list. At this time, the first motion information candidate and the second motion information candidate may be different motion information.
[0219] If the motion information candidate list is not filled with a predefined number of candidates, the video signal processing device may add predefined motion information candidates to the motion information candidate list in order. The newly added motion information candidates may be motion information using a zero vector in which the horizontal and vertical components of the motion information consist of (0, 0). Additionally, there may be one or more motion candidates newly added based on the zero vector. The reference picture for each zero vector-based motion candidate may vary, and the reference picture for the zero vector-based motion candidate may be set based on the reference picture list.
[0220] FIGS. 20 to 23 illustrate affine motion prediction according to one embodiment of the present specification.
[0221] The video signal processing device can predict the current block by referring to a reference block (2020) of a different shape, size, and angle from the prediction block (2010) of the current picture. In this case, the reference block (2020) may be a block represented by an affine transformation on the current block (2010). Through this, stretching (scaling), rotation, shearing, reflection, orthogonal projection, etc., may be represented.
[0222] The parameters representing affine motion and affine transformation can vary. The more parameters there are, the more diverse motions can be represented compared to cases with fewer parameters, but overhead may occur in signaling or calculations. For example, an affine transformation can be represented by six parameters. Alternatively, an affine transformation can be represented by three control point motion vectors.
[0223] As illustrated in FIG. 20, it is possible to represent complex motions using affine transformations. However, to reduce signaling overhead and computation, simpler affine motion prediction or affine transformations may be used. Simpler affine motion prediction may be possible by restricting motion. Restricting motion may mean that the shape in which the current block transforms into the reference block is restricted.
[0224] Referring to FIG. 21, a video signal processing device can perform affine motion prediction using control point motion vectors v0 and v1. Using two vectors v0 and v1 may be equivalent to using four parameters. The two vectors v0 and v1 or four parameters can indicate what shape the current block is predicted from a reference block. By using such a simple affine transformation, movements such as rotation and scaling (zoom in / out) can be represented. Referring to FIG. 21, the current block, indicated by a solid line, can be predicted from a reference picture. In this case, the location represented by the dotted line in FIG. 21 can be used in the reference picture. Through the affine transformation, each point (pixel) of the current block can be mapped to another point.
[0225]
[0226] Equation 1 is a formula for calculating a motion vector field. The control point motion vector v0 in FIG. 21 is (v_0x, v_0y) and may be the motion vector of the top-left corner control point. Additionally, the control point motion vector v1 is (v_1x, v_1y) and may be the motion vector of the top-right corner control point. In this case, the motion vector (v_x, v_y) at the (x, y) position can be calculated using Equation 1. Therefore, the motion vector for each pixel position or any position can be estimated based on Equation 1.
[0227] Also, in Equation 1, (x, y) may be relative coordinates within the block. For example, (x, y) may be the position when the top-left position of the block is (0, 0). If v0 is a control point motion vector for position (x0, y0) on the picture and v1 is a control point motion vector for position (x1, y1) on the picture, the position (x, y) within the block can be represented using the same coordinates as the positions of v0 and v1, and can be represented by changing x and y in Equation 1 to (x-x0) and (y-y0), respectively. Also, w (width of the block) may be (x1-x0).
[0228] Affine motion can be represented using multiple control point motion vectors or multiple parameters.
[0229] Referring to FIG. 22, the video signal processing device can perform affine motion prediction using three control point motion vectors v0, v1, and v2. Using three control motion vectors v0, v1, and v2 may be equivalent to using six parameters. The three control point motion vectors v0, v1, and v2 or the six parameters may indicate from which shape the current block is predicted. Referring to FIG. 22, the current block represented by the solid line can be predicted from the reference picture. In this case, the location represented by the dotted line in FIG. 22 may be used in the reference picture. Through affine transformation, each point (pixel) of the current block can be mapped to another point.
[0230]
[0231] Equation 2 is a formula for calculating the motion vector field. The control point motion vector v0 in FIG. 22 is (mv_0^x, mv_0^y) and may be the motion vector of the top-left corner control point. The control point motion vector v1 is (mv_1^x, mv_1^y) and may be the motion vector of the top-right corner control point. The control point motion vector v2 is (mv_2^x, mv_2^y) and may be the motion vector of the bottom-left corner control point. In this case, the motion vector (mv_x, mv_y) at the (x, y) position can be calculated using Equation 2. Therefore, the position of each pixel or the motion vector for any position can be estimated using Equation 2.
[0232] Also, in Equation 2, (x, y) may be relative coordinates within the block. For example, (x, y) may be the position when the top-left position of the block is (0, 0). If v0 is a control point motion vector for position (x0, y0) on the picture, v1 is a control point motion vector for position (x1, y1) on the picture, and v2 is a control motion vector for position (x2, y2) on the picture, the position (x, y) within the block can be represented using the same coordinates as the positions of v0, v1, and v2, and can be represented by changing x and y in Equation 2 to (x-x0) and (y-y0), respectively. Also, w (width of the block) may be (x1-x0), and h (height of the block) may be (y2 - y0).
[0233] As described in this specification, a motion vector field exists, and the video signal processing device can calculate a motion vector for each pixel. Referring to FIG. 23, a sub-block-based affine transformation may be performed to simplify the calculation of the motion vector. The small square in FIG. 23(a) may be a sub-block. The video signal processing device may obtain a representative motion vector of the sub-block. Then, the video signal processing device may use the representative motion vector for the pixels of the sub-block. The reference block described through FIG. 20 to 22 may correspond to the sub-block of FIG. 23. Alternatively, the motion vector may be expressed more simply by applying only translation motion to the sub-block. v0, v1, and v2 in FIG. 23(a) may be control point motion vectors.
[0234] The size of the sub-block can be M*N. M and N can be calculated based on Equation 3. Meanwhile, the size of the sub-block may be fixed, for example, the fixed size may be 4x4.
[0235]
[0236] MvPre in Equation 3 may be motion vector fraction accuracy. Also, (v_0x, v_0y), (v_1x, v_1y), and (v_2x, v_2y) may be the motion vectors of the top-left, top-right, and bottom-left control points of the current block, respectively. (v_0x, v_0y), (v_1x, v_1y), and (v_2x, v_2y) can be obtained through Equation 1.
[0237] Additionally, the video signal processing device can acquire a representative motion vector of a sub-block using the center sample position of the sub-block. Furthermore, the motion vector of the sub-block can be generated using a motion vector with higher accuracy than a normal motion vector. To achieve this, motion compensation interpolation filters can be applied.
[0238] FIGS. 24 and FIGS. 25 illustrate modes of affine motion prediction according to one embodiment of the present specification.
[0239] An example of affine motion prediction may be an affine inter mode or an affine AMVP inter mode. A flag indicating whether the affine inter mode is applied may exist. In this case, the flag may be included in the bitstream and signaled. Referring to FIG. 24, there may be blocks at positions A, B, and C near v0, and blocks at positions D and E near v1. In this case, the motion vectors corresponding to each block at positions A, B, C, D, and E may be vA, vB, vC, vD, and vE. A candidate list for motion vectors or motion vector predictors may be constructed using the motion vectors of these blocks. The candidate list may be constructed using the following formula.
[0240] {(v0, v1)|v0 = {vA, vB, vC}, v1 = {vD, vE}}
[0241] That is, the video signal processing device can create a pair (v0, v1) using v0 selected from vA, vB, and vC, and v1 selected from vD and vE. In this case, the video signal processing device can scale the motion vector based on the picture order count (POC) of the picture containing the reference block of the neighboring block, the POC containing the reference block of the current block (or CU), and the POC of the current block (or CU). When a candidate list is constructed using pairs, information indicating which pair within the candidate list is used can be included in the bitstream and signaled. Additionally, if the candidate list is not sufficiently filled, the video signal processing device may include candidates for other inter-predictions in the candidate list. For example, the video signal processing device may include AMVP candidates in the candidate list. Furthermore, the video signal processing device may not use the v0 and v1 of the pair selected from the candidate list directly as the control point motion vectors for affine motion prediction, but may use them after correction based on the difference. At this time, information regarding the difference for correction can be included in the bitstream and signaled. That is, the video signal processing unit can obtain v0' and v1' by adding the difference to v0 and v1 of a pair selected from the candidate list, and use v0' and v1' as control point motion vectors for affine motion prediction. Additionally, the affine inter mode can be used when the coding unit is larger than a certain size.
[0242] An example of affine motion prediction may be an affine merge mode. Whether the affine merge mode is used may be indicated by a flag, and the flag may be included in the bitstream and signaled. When the affine merge mode is used, the video signal processing device may obtain (calculate) the control point motion vector of the current block from the motion vectors of the surrounding blocks when affine motion prediction is used in the surrounding blocks of the current block. For example, the surrounding blocks that the video signal processing device checks whether affine motion prediction is used may be as shown in FIG. 25(a). The video signal processing device may check whether affine motion prediction is used in the order of A, B, C, D, E in FIG. 25(a), and when it checks the block where affine motion prediction is used, it may obtain the control point motion vector of the current block using the motion vector of the block (or surrounding blocks) where affine motion prediction is used. A, B, C, D, and E in Fig. 25(a) may be blocks located to the left, above, above right, left bottom, and above left of the current block.
[0243] Referring to FIG. 25(b), the video signal processing device can calculate v0 and v1 using the motion vectors of the block at position A (or surrounding blocks) when the block at position A used affine motion prediction. The motion vectors of the block at position A (or surrounding blocks) may be v2, v3, and v4.
[0244] A video signal processing device can improve accuracy by referencing blocks closest to each control point motion vector when deriving control point motion vectors. For example, referring to FIGS. 25(a) and (b), the video signal processing device may refer to the left block (Block A) when deriving v0 and the upper block (Block B) when deriving v1. Alternatively, the video signal processing device may refer to blocks at positions A, D, or E when deriving v0 and blocks at positions B or C when deriving v1.
[0245] FIGS. 26 and 27 illustrate the induction of an affine motion predictor according to one embodiment of the present specification.
[0246] Control point motion vectors may be required for affine motion prediction. A video signal processing unit can calculate a motion vector field, that is, a motion vector for a sub-block or a specific location, based on the control point motion vectors. The control point motion vectors can be described as seed vectors.
[0247] At this time, a control point motion vector can be obtained based on a prediction. For example, the prediction can be the control point motion vector. Alternatively, a control point motion vector can be obtained from a prediction corrected based on a difference. Specifically, a video signal processing device can obtain the control point motion vector by adding or subtracting a difference from the prediction.
[0248] At this time, the predictor for the control point motion vector may be derived from the control point motion vector or motion vector of a neighboring block that has undergone affine motion prediction (affine motion compensation). For example, if a block at a preset location has undergone affine motion prediction, the video signal processing device may derive a predictor for affine motion compensation of the current block from the control point motion vector or motion vector of the affine motion-predicted block. The preset location may include locations adjacent to the current block and locations that are not adjacent. Referring to FIG. 26, the preset locations may be A0, A1, B0, B1, and B2. The video signal processing device may reference the control point motion vector or motion vector of the preset location spatially or temporally. The video signal processing device may obtain candidates for affine motion compensation using the method described through FIG. 26. At this time, the candidates may be described as inherited candidates. The order in which the video signal processing device references the preset locations may be a predetermined order.
[0249] The control point motion vector for affine motion compensation is described below.
[0250] Control point motion vectors may be required for affine motion compensation. A video signal processing unit can calculate a motion vector field, that is, a motion vector for a sub-block or a specific location, based on the control point motion vectors. The control point motion vectors can be described as seed vectors.
[0251] At this time, a control point motion vector can be obtained based on a prediction. For example, the prediction can be the control point motion vector. Alternatively, a control point motion vector can be obtained from a prediction corrected based on a difference. Specifically, a video signal processing device can obtain the control point motion vector by adding or subtracting a difference from the prediction.
[0252] In this case, the predictor of the control point motion vector can be derived from the motion vector of a surrounding block. For example, the video signal processing device may use the motion vector of a surrounding block to derive the predictor of the motion vector, whether it is an affine motion-compensated motion vector or not. For example, when deriving each control point motion vector of the current block, the video signal processing device may use the motion vector of a preset location for the control point motion vector as the predictor of the control point motion vector. The preset location may include a location adjacent to the current block.
[0253] Referring to FIG. 27, the video signal processing device can determine control point motion vectors mv0, mv1, and mv2. At this time, the preset positions may be A, B, C, D, E, F, and G. Motion vectors corresponding to A, B, and C can be used as predictors for mv0. Additionally, motion vectors corresponding to D and E can be used as predictors for mv1. Additionally, motion vectors corresponding to F and G can be used as predictors for mv2.
[0254] Additionally, the order in which control point locations are referenced to determine each predictor of mv0, mv1, and mv2 may be predetermined. Furthermore, multiple preset locations referenced as predictors for the control point motion vectors may exist for each control point, and combinations of these preset locations may be fixed.
[0255] A video signal processing device can obtain a candidate for affine motion compensation using the method described in FIG. 27. The candidate for affine motion compensation can be described as a constructed candidate, an inter candidate, or a virtual candidate.
[0256] The video signal processing device can generate a candidate list of affine motion compensation or a candidate list of control point motion vectors of affine motion compensation by the method or a combination of methods described in FIGS. 24 to 27.
[0257] FIGS. 28 and 29 illustrate a method for deriving affine candidates from a history parameter-based affine model according to one embodiment of the present specification.
[0258] The video signal processing device can derive a restored affine candidate using affine motion information that was encoded and decoded in affine mode earlier in the encoding and decoding order, rather than motion information of a block adjacent to the current block. Specifically, the video signal processing device can obtain affine parameters (a, b, c, d) from the CPMV of the block encoded in affine mode, the width of the block, and the height of the block. Then, the video signal processing device can store the affine parameters in a history-parameter table (HPT). Equation 4 represents an equation for calculating affine motion from affine parameters. Affine parameters can be obtained in the reverse order of Equation 4. The HPT can be configured for a reference picture list and a reference picture index, respectively. For example, if the block encoded in affine mode is L0 prediction and reference picture index 1 is used, the video signal processing device can store the affine parameters in HPT_L0_1 or HPT(L0, 1). The HPT is updated in blocks encoded in affine mode, and the parameter values stored in the HPT can be initialized to a preset value before the first CTU is encoded in each CTU line of a picture / subpicture / slice / tile. The preset value can be '0'. Alternatively, the preset value can be a commonly used affine parameter.
[0259] The video signal processing device can retrieve a, b, c, and d stored in the history-affine-parameter-based candidate (HPT) using one of the motion information of blocks A0, A1, A2, B0, B1, B2, and B3 in FIG. 29, and then obtain the HAPC using Equation 4. In FIG. 29, (a0, b0, c0, d0) may be one of the affine parameters (a, b, c, d). (mv in Equation 4 h base , mv vbase ) may be one of the movement information of blocks A0, A1, A2, B0, B1, B2, and B3, and as an example of implementation, may be the movement information of block A0. (x base , y base ) may be the center position coordinates of one of blocks A0, A1, A2, B0, B1, B2, or B3, and as an example of implementation, may be the center position coordinates of block A0. (x, y) may be the sample position coordinates within the current block. By substituting the top-left, top-right, and bottom-left coordinates of the current block into (x, y) in Equation 4, the MV of the top-left sample position, the MV of the top-right sample position, and the MV of the bottom-left sample position of the current block can be obtained. Therefore, depending on the affine type (4-parameter, 6-parameter), the HAPC can be calculated as up to 3 CPMVs (corner-position MVs) (in the case of 6-parameter). Alternatively, the video signal processing device can calculate the MV of the sample coordinates (x, y) within the current block using the calculated CPMV, the sample coordinates (x, y) within the current block, the width of the current block, and the height of the current block.
[0260]
[0261] The video signal processing device does not use motion information of surrounding blocks adjacent to the current block, but uses motion information of surrounding blocks not adjacent to the current block (mv h base , mv v base HAPC can be derived using ). In this case, (x base , y base ) can be the central location coordinates of the surrounding blocks.
[0262] Referring to FIG. 29, the video signal processing device adds affine parameters to the HPT and MV base Information and Pos baseInformation can be stored together. The video signal processing unit [stores] the affine parameters and MV stored in the HPT. base Information and Pos base HAPC can be obtained through information and mathematical formula 4.
[0263] The video signal processing device obtains motion information (mv) of surrounding blocks not adjacent to the current block for the next block to be encoded / decoded. h base , mv v base It can be set to ). And the video signal processing device (x base , y base After setting ) as the center position coordinates of the surrounding blocks, it can be saved to HPT.
[0264] When an Intra TMP or IBC encoding mode is applied to the current block, the video signal processing device can generate a predicted block using a block vector derived from a block vector candidate list. In this case, the video signal processing device may construct the block vector candidate list using at least one of the following: a block vector derived from spatially adjacent blocks, a block vector derived from spatially distant adjacent blocks, a block vector derived from temporal adjacent blocks, a history-based block vector, an auto-relocated block vector (Auto relocated BV), a block vector using an average value, a predetermined block vector, and a zero (0,0) block vector.
[0265] FIG. 30 illustrates a method for deriving an auto-relocated block vector (Auto relocated BV) according to one embodiment of the present specification.
[0266] The video signal processing device can add an auto-relocated block vector (Auto relocated BV) derived from surrounding blocks of the current block to the block vector candidate list of the current block. Referring to FIG. 30, the block vector used to derive the reference block (B1) for the current block (B0) (BV 0,1 It can be expressed as ), and the block vector used to derive the reference block (B2) from the current block (B0) is (BV 0,2 It can be expressed as ), and in the current block (B0), the reference block (B n+1 The block vector used to derive ) is (BV 0,n+1 It can be expressed as ). In this specification, the block vector (BV 0,n+1 ) can be described as an auto-relocated block vector,
[0267] Referring to FIG. 30(a), the video signal processing device derives a block vector (BV) from a surrounding block of the current block (B0). 0,1 After finding the reference block (B1) indicated by ), the block vector (BV) used for the prediction of the reference block (B1) 1,2 A block vector (BV) positioned relative to the current block (B0) 0,2 ) can be obtained. At this time, the block vector (BV used for prediction of the reference block (B1) can be obtained. 1,2 Block vector (BV) arranged relative to the current block (B0) 0,2 ) can be called an auto-relocating block vector. Auto-relocating block vector (BV 0,2 ) is a block vector (BV) derived from the surrounding blocks of the current block (B0). 0,1 The block vector (BV) used for the prediction of ) and the reference block (B1) 1,2 It can be derived as the sum of ). Block vector (BV 0,1 ) may be a block vector candidate included in the block vector candidate list for the current block. The video signal processing device block vector (BV0,1 Automatic relocation block vector (BV) derived based on ) 0,2) can be added to the block vector candidate list. The video signal processing device determines whether the automatic relocation block vector exists in the block vector candidate list, and if it does not exist, it can add the automatic relocation block vector to the block vector candidate list. The automatic relocation block vector is not self-derived and requires a reference block vector. Therefore, the video signal processing device can derive the automatic relocation block vector if there is at least one candidate in the block vector candidate list. The video signal processing device can add a pre-specified candidate to the block vector candidate list, and then derive the automatic relocation block vector candidate and add it to the block vector candidate list. The pre-specified candidate may be at least one of the following: a block vector candidate derived from spatial neighboring blocks, a block vector candidate derived from spatially non-adjacent but distant neighboring blocks, a block vector candidate derived from temporal neighboring blocks, a history-based block vector candidate, a block vector candidate using an average value, a predetermined block vector candidate, or a zero (0,0) block vector candidate. Specifically, the video signal processing device may sequentially derive block vector candidates derived from spatial neighbor blocks, block vector candidates derived from spatially non-adjacent and distant neighbor blocks, block vector candidates derived from temporal neighbor blocks, and history-based block vector candidates, add them to a block vector candidate list, and then derive automatic relocation block vector candidates using block vector candidates within the block vector candidate list and add them to the block vector candidate list.If no candidate exists in the block vector candidate list constructed by sequentially deriving block vector candidates derived from spatial neighbor blocks, block vector candidates derived from spatially non-adjacent and distant neighbor blocks, block vector candidates derived from temporal neighbor blocks, and history-based block vector candidates, the video signal processing device may not derive an automatic relocation block vector candidate.
[0268] The video signal processing device may sequentially derive block vector candidates derived from spatial neighboring blocks, block vector candidates derived from spatially non-adjacent but distant neighboring blocks, block vector candidates derived from temporal neighboring blocks, history-based block vector candidates, block vector candidates using average values, predetermined block vector candidates, and zero (0,0) block vector candidates, add them to a block vector candidate list, and then derive an automatic relocation block vector candidate and add it to the block vector candidate list. If no candidate exists in the block vector candidate list constructed by sequentially deriving block vector candidates derived from spatial neighboring blocks, block vector candidates derived from spatially non-adjacent but distant neighboring blocks, block vector candidates derived from temporal neighboring blocks, history-based block vector candidates, block vector candidates using average values, predetermined block vector candidates, and zero (0,0) block vector candidates, the video signal processing device may not derive an automatic relocation block vector candidate. Alternatively, if no candidate exists in the block vector candidate list constructed by deriving block vector candidates derived from spatial neighbor blocks, block vector candidates derived from spatially non-adjacent but distant neighbor blocks, block vector candidates derived from temporal neighbor blocks, history-based block vector candidates, block vector candidates using average values, predetermined block vector candidates, and zero (0,0) block vector candidates in order, the video signal processing device may derive an automatically relocated block vector candidate based on a predetermined block vector and add it to the block vector candidate list. The predetermined block vector may be one of (X, 0), (0, Y), or (X, Y), and X and Y may be integers.
[0269] The automatic relocation block vector can be derived from a position moved by the block vector relative to the center position of the current block. Referring to FIG. 30(b), the video signal processing device derives the block vector (BV) relative to the center position of the current block (B0). 0,n The block vector can be derived at the position (Ctr) moved by ). At this time, the block vector (BV) is derived based on the center position of the current block (B0). 0,n A block vector may not exist at the position (Ctr) moved by ). In this case, the video signal processing device, the block vector (BV 0,n A reference block area can be established based on the position moved by ) (Ctr) and the current block size. Then, the video signal processing device checks whether block vectors exist in the order of the top-left position (LT), top-right position (RT), bottom-left position (LB), and bottom-right position (RB) of the reference block area, and then checks for valid block vectors and block vectors (BV 0,nAn automatic relocation block vector can be derived based on ). The video signal processing device can add the derived automatic relocation block vector to a block vector candidate list. In the reference block area, the block vector can be derived from any location within the reference block area. Additionally, the block vector can be derived according to a pre-specified location and a pre-specified search order. The pre-specified location may vary depending on the unit in which the block vector is stored in memory. For example, if the video signal processing device stores block vectors every 4x4 unit, it can derive the block vector from at least one 4x4 block among the 4x4 blocks within the reference block area. The pre-specified search order may be a raster scan method (searching sequentially from the top-left position of the reference block area to the top-right position, and then searching the next line position in order). Another pre-specified search order may be to search the center position first, and then search the blocks in order from the closest 4x4 blocks to the farthest 4x4 blocks from the center position. The video signal processing device can determine whether a block vector exists by determining whether the encoding mode of the block at the location being searched is Intra TMP or IBC during the process of searching for a block vector, and if the encoding mode is Intra TMP or IBC, it can derive the block vector. The reference block area may be of a pre-specified size, such as 8x8, 16x16, etc.
[0270] If the encoding mode of the current block is Intra TMP or IBC, the encoder may include information regarding the block vector type in the bitstream for signaling. The block vector type can be classified into a block vector containing only the vertical component of the current block, a block vector containing only the horizontal component, or a block vector containing both vertical and horizontal components. The decoder may parse the information regarding the block vector type to set the block vector for the current block. When the video signal processing device searches for an automatic relocation block vector, it may vary the search position based on at least one of the following: the block vector type of the current block, the encoding mode of the current block, and the RRIBC type information of the current block. For example, if the block vector type of the current block is a block vector type containing only the vertical component, the video signal processing device may use a block vector containing only the vertical component from the reference block as the automatic relocation block vector.
[0271] FIG. 31 illustrates a method for inducing automatic relocation movement candidates according to one embodiment of the present specification.
[0272] The video signal processing device may configure auto-relocated motion candidates by adding them to the motion candidate list for the current block. Auto-relocated motion candidates may be derived using motion candidates derived from the surrounding blocks of the current block or by using motion candidates within the motion candidate list. After the video signal processing device finds the reference block indicated by the motion vector (or block vector) derived from the surrounding blocks of the current block, the motion vector obtained by relocating (recalculating) the motion vector (or block vector) used for predicting the reference block relative to the current block can be called the auto-relocated motion vector. Alternatively, after the video signal processing device finds the reference block indicated by the motion vector derived from the motion candidates within the motion candidate list, the motion vector obtained by relocating (recalculating) the motion vector (or block vector) used for predicting the reference block relative to the current block can be called the auto-relocated motion vector.
[0273] Referring to FIG. 31, MVL0 k(0) may be an initial motion vector used to derive automatic relocation motion candidates. First, the video signal processing unit MVL0 of the current block of the current picture k(0) Within the reference picture indicated by (RefPicL0 k(0) Motion vectors or block vectors can be derived from the reference block of ). MVL0 k(0) Block vector BV from the reference block within the reference picture indicated by k(0) is induced, and BV k(0) Another motion vector MVL0 from the reference block indicated by k(1) can be derived. Also, MVL0 k(1)Another motion vector or block vector can be derived from the reference block indicated by, and the video signal processing device performs this process repeatedly m times to finally MVL0 k(m) This can derive the indicated reference block (RefBlk). The video signal processing device derives the reference picture (RefPicL0) based on the current block (CurBlk). k(m) Motion vector (MVL0) to the reference block (RefBlk) within ) k / m ) can be set as the automatic relocation motion vector. Automatic relocation motion vector (MVL0 k / m ) is MVL0 k(0) + BV k(0) + MVL0 k(1) + MVL0 k(2) + … + MVL0 k(m) It can be calculated as. Also, the reference picture for the automatic relocation motion vector is RefPicL0 k(m) It can be. In this case, when the process of deriving the reference block is performed repeatedly m times, m can be the depth at which the automatic relocation motion vector is derived.
[0274] FIG. 32 illustrates a matrix-based intra-prediction method according to one embodiment of the present specification.
[0275] A method of performing intra prediction using a model (or matrix) that infers the relationship between the current block and reference samples through a large amount of image data can be called a matrix-based position-dependent intra prediction (PDP). Referring to FIG. 32, a video signal processing device can generate a prediction block P(x, y) for the current block using a restored reference sample (r in FIG. 32(a)) r(k) adjacent to the current block to be predicted (p in FIG. 32(a)) and a predefined matrix F(x, y, k) (see mathematical formula in FIG. 32(b)). The matrix can be determined based on the size of the current block and the intra prediction directionality mode. Additionally, the size of the reference sample can be determined based on the size of the current block. For example, if the width and height of the current block are smaller than or equal to a predefined first size, T1 and T2 may be a predefined second size. If the width and height of the current block are larger than a pre-specified first size, T1 and T2 may be a pre-specified third size. Here, the pre-specified first size may be 16, the pre-specified second size may be 2, and the pre-specified third size may be 1. Also, in FIG. 32, W and H represent the width and height of the current block. Unlike conventional MIP methods, if a PDP is applicable to the current block, the video signal processing device may generate a prediction block for the current block using matrix-based intra prediction via the PDP, rather than using intra prediction via the conventional intra prediction directional mode.At this time, whether a PDP can be applied to the current block may be determined based on at least one of the following: the size of the current block, the number of samples of the current block, the ratio between the width and height of the current block, the intra-predicted directional mode of the current block, whether the current block is a luminance block or a chrominance block, whether an inferred matrix exists, whether a reference sample exists, the encoding mode of the current block, and the reference sample line. Here, if the encoding mode of the current block is one of DIMD, OBIC, CIIP, SGPM, TIMD, TMRL, Directional Planar, EIP, MIP, ISP, IBC, Intra TMP, BDPCM, Palette, Inter mode, LM, GPM, or CCCM, the current block may not be able to use a PDP-based method. The video signal processing device may determine whether a PDP mode is applicable based on the intra-predicted directional mode of the current block. For example, the video signal processing device may determine that the PDP mode is applicable to the current block only if the intra prediction directional mode of the current block is a pre-specified mode. The pre-specified mode may vary depending on the encoding mode of the current block. If the encoding mode of the current block is an MPM-based intra prediction mode, and the intra prediction mode is a planar (or directional planar) mode, DC mode, or even angle mode, the video signal processing device may generate a prediction block for the current block using matrix-based intra prediction via PDP instead of using intra prediction via the existing intra prediction directional mode. The encoding mode of the current block may be one of DIMD, OBIC, CIIP, SGPM, TIMD, TMRL, Directional Planar, EIP, MIP, ISP, IBC, Intra TMP, BDPCM, Palette, Inter mode, LM, GPM, or CCCM.The video signal processing device may apply the PDP to the current block only if the reference sample used to predict the current block via the PDP is within the slice and / or tile to which the current block belongs. The video signal processing device may determine that the PDP cannot be applied to the current block if the reference sample used to predict the current block via the PDP is in a different slice and tile other than the slice and / or tile to which the current block belongs. When the PDP mode is applied to the current block, the reference sample used may be determined based on the intra-prediction mode of the current block. For example, if the intra-prediction mode is a pre-specified mode, the size of the reference sample may be a pre-specified first size. Otherwise, if the intra-prediction mode is not a pre-specified mode, the size of the reference sample may be a pre-specified second size. Here, the pre-specified mode may be a range where the intra-prediction mode (see FIG. 6) is greater than or equal to 19 and less than or equal to 49. Referring to FIG. 32, the pre-specified first size may be W x T1 for the top reference sample and T2 x (H + T1) for the left reference sample. Referring to FIG. 32, the pre-specified second size may be 2W x T1 for the top reference sample and T2 x (2H + T1) for the left reference sample. Here, W x T1 may have a horizontal length of W and a vertical length of T1.
[0276] In this specification, the intra prediction mode list may have the same meaning as the intra prediction mode set.
[0277] In this specification, the Combined Inter / Intra-picture Prediction (CIIP) method is a method for generating a prediction block for a current block by generating a final prediction block by weighted averaging the prediction blocks generated by the intra-picture prediction method and the prediction blocks generated by the inter-picture prediction method. The prediction block generated by the inter-picture prediction may be generated based on a reference picture restored prior to the current picture.
[0278] A CIIP inter-frame prediction block refers to a prediction block generated from a reference picture restored prior to the current picture in CIIP prediction, and may have the same meaning as a CIIP inter-frame prediction signal. A CIIP intra-frame prediction block refers to a prediction block generated by referencing restoration information within the current picture in CIIP prediction, and may have the same meaning as a CIIP intra-frame prediction signal.
[0279] The CIIP inter-frame prediction mode refers to a prediction mode for generating prediction blocks between CIIP frames, and the CIIP intra-frame prediction mode may refer to a prediction mode for generating prediction blocks within a CIIP frame.
[0280] Predictive mode derivation methods may include MVG-DIMD, MVG-TIMD, MVG-RIMD, DIMD, TIMD, etc., and predictive mode derivation methods may be used to derive predictive modes within CIIP screens.
[0281] Motion vector guided-Decoder side Intra Mode Derivation (MVG-DIMD) may be a method in which an inter-frame prediction block derived based on a set of motion information of the current block can be defined as a reference block, and a video signal processing device applies DIMD to the reference block to derive an intra-frame prediction mode.
[0282] Motion vector guided-Template matching based Intra Mode Derivation (MVG-TIMD) may be a method in which an inter-frame prediction block derived from a set of motion information of the current block can be defined as a reference block, and a video signal processing device applies TIMD to the reference block to derive an intra-frame prediction mode.
[0283] Motion Vector Guided-Reference Block Based Intra Mode Derivation (MVG-RIMD) may be a method in which an inter-frame prediction block derived from a set of motion information of the current block can be defined as a reference block, and a video signal processing device derives a prediction mode by referencing an intra-frame prediction mode buffer corresponding to the reference block area. The intra-frame prediction mode buffer may be a buffer that stores the intra-frame prediction mode of a block for which prediction is completed. When the current block is predicted as an intra-frame prediction mode, the prediction mode used may be stored in the intra-frame prediction mode buffer. In the case where the current block is predicted as a prediction mode outside the set of intra-frame prediction modes (e.g., IBC, IntraTMP, etc.), the video signal processing device may perform DIMD on the prediction block and store the derived intra-frame prediction mode information in the intra-frame prediction mode buffer.
[0284] Block Vector Based Prediction Signal Generation (BV-PSG) can refer to a method of utilizing the blocks of the region restored to the current block in the current picture as prediction blocks within the CIIP screen.
[0285] FIG. 33 illustrates a method for obtaining a CIIP prediction signal according to one embodiment of the present specification.
[0286] The video signal processing device can determine at least one of the motion information set of the current block and the CIIP inter-frame prediction signal by using at least one of a reference picture, the current block source signal, the CIIP inter-frame prediction mode, and the motion information set of a previously restored block. The video signal processing device can generate the CIIP inter-frame prediction signal according to the CIIP inter-frame prediction mode. The CIIP inter-frame prediction mode may be at least one of a merge mode, an affine merge mode, an sbTMVP merge mode, and a TM merge mode.
[0287] In addition, the video signal processing device can determine at least one of a CIIP frame prediction mode and a CIIP frame prediction signal by using at least one of a reference block template, a current block template, a reference block prediction mode, a CIIP frame inter-frame prediction signal, and a current block motion information set.
[0288] In addition, the video signal processing device can acquire a CIIP prediction signal by using at least one of a CIIP inter-frame prediction signal, a CIIP intra-frame prediction signal, and a CIIP intra-frame prediction mode.
[0289] Referring to FIG. 33, the video signal processing device can generate a CIIP inter-frame prediction signal for the current block based on a CIIP inter-frame prediction mode (S3310). Specifically, when a merge mode is applied to the current block, the video signal processing device can construct a merge candidate list by inheriting a set of motion information (e.g., reference picture index, motion vector information, etc.) of a previous restored block. The video signal processing device can obtain a set of motion information for the current block from the merge candidate list. When an affine merge mode is applied to the current block, the video signal processing device can construct an affine merge candidate list by inheriting information on the set of motion information of a block previously predicted by an affine mode. The video signal processing device can obtain a set of motion information for the current block from the affine merge candidate list. When a TM merge mode is applied to the current block, the video signal processing device can obtain a corrected set of motion information by correcting the set of motion information for the current block through template matching. The video signal processing device can perform motion compensation based on the set of motion information and obtain a CIIP inter-frame prediction signal. When the sbTMVP merge mode is applied to the current block, the video signal processing device may construct an sbTMVP merge candidate list by inheriting the motion information set information of the block previously predicted in sbTMVP mode, and may obtain the motion information set of the current block from the sbTMVP merge candidate list.
[0290] The merge list configured by the video signal processing device to induce the CIIP inter-frame prediction mode may include at least one candidate among the merge mode, affine merge mode, sbTMVP merge mode, and TM merge mode. For example, the video signal processing device may configure a merge list including the affine merge mode and the sbTMVP merge candidate.
[0291] A video signal processing device can acquire a prediction signal within a CIIP frame (S3320). The prediction block between CIIP frames may contain a pattern similar to the current block. The video signal processing device can derive an intra-frame prediction mode that reflects the pattern of the current block from the pattern contained in the prediction block between CIIP frames. The intra-frame prediction mode derived from the prediction block between CIIP frames may be a different intra-frame prediction mode that does not overlap with the intra-frame prediction mode derived from the adjacent restoration area of the current block. The CIIP intra-frame prediction mode may be at least one of a list of intra-frame prediction modes (e.g., planar mode, DC mode, and a plurality (e.g., 65) angle modes) or BV-PSG (Block Vector based Prediction Signal Generation) and PDPC (Position dependent intra prediction combination). The CIIP intra-frame prediction mode may use one of the intra prediction mode list, BV-PSG, or PDPC as the default mode. For example, the CIIP intra-frame prediction mode may be Planar mode, intra prediction mode 30, or BV-PSG mode.
[0292] The video signal processing device can acquire a CIIP prediction signal based on a CIIP inter-frame prediction signal and a CIIP intra-frame prediction signal (S3330). FIG. 34 shows a method in which the video signal processing device acquires a CIIP intra-frame prediction signal using the BV-PSG method, which is a CIIP intra-frame prediction mode.
[0293] The BV-PSG method is a method in which a reference block similar to the current block within the current frame is used as a predicted block within the CIIP screen, and the location of the reference block can be indicated by a block vector (BV) representing the location of the reference block relative to the current block. The BV can be obtained through at least one of the IBC or IntraTMP methods, or through inheritance between adjacent or non-adjacent blocks, history-based inheritance, hash-based search, etc. Alternatively, the BV can be obtained by directly searching for the reference block.
[0294] Referring to FIG. 34, if the acquired BV value is (-27, -26), this can indicate a reference block located at -27 pixels along the x-axis and -26 pixels along the y-axis relative to the current block. The video signal processing device can use the BV to acquire a predicted block similar to the current block, and the predicted block can be used as a prediction signal within the CIIP screen.
[0295] PDPC may be one of the filtering methods applied to an intra-prediction block to mitigate discontinuous changes in sample values occurring at the boundary between the intra-prediction block and an adjacent block. PDPC can be performed by gradually reducing the reference sample contribution in the corresponding direction as the position of the predicted pixel moves further away from the top or left boundary. When the CIIP intra-frame prediction mode is PDPC, an intra-frame prediction signal can be generated using the PDPC method described above.
[0296] When one of the sets of intra-prediction modes is used as the CIIP intra-frame prediction mode, the video signal processing device can induce the intra-prediction mode by using at least one of the prediction mode induction methods described above.
[0297] When one of the intra prediction mode lists is used as the CIIP intra-frame prediction mode, the video signal processing device can induce the intra prediction mode using at least one method among MVG-DIMD, MVG-TIMD, MVG-RIMD, DIMD, or TIMD.
[0298] FIGS. 35 and 36 illustrate a method of applying an MVG-DIMD method utilizing motion vectors according to one embodiment of the present specification to a prediction mode induction within a CIIP screen.
[0299] When a prediction mode within a CIIP frame is obtained through the MVG-DIMD method, the video signal processing device can use the prediction signal between CIIP frames as a reference block for deriving the prediction signal within the CIIP frame. When MVG-DIMD is applied in the video signal processing device, the prediction mode within the CIIP frame can be derived by applying DIMD to the reference block.
[0300] When applying MVG-DIMD, the video signal processing device may apply a Sobel filter to the reference block in the horizontal and vertical directions to extract directional information, and then map the extracted directional information to an intra prediction mode to induce an intra angle mode. Specifically, to induce an intra angle mode, the video signal processing device may apply the Sobel filter by moving at intervals of N pixels, starting from the top-left pixel of the reference block. In this case, the Sobel filter may be 3x3 in size, and N may be a fixed value or variable based on the size of the current block. For example, if the product of the width and height of the current block is 16 or greater, N may be 2, and if the product of the width and height of the current block is less than 16, N may be 1. The video signal processing device may construct a histogram based on the frequency with which each mode is selected using the angle modes induced by applying the Sobel filter. In this case, the histogram may be defined as HoG (Histogram of Gradient).
[0301] The video signal processing device can select M modes having the highest amplitude in the HoG to determine the final CIIP intra prediction mode of the MVG-DIMD, and can generate a prediction signal within the CIIP frame using the determined CIIP intra prediction mode. In this case, when M is 1, the video signal processing device can determine one intra prediction mode as the prediction mode within the CIIP frame and generate a prediction signal within the CIIP frame. Referring to FIG. 35, the video signal processing device can determine the intra prediction mode 37 as the prediction mode within the CIIP frame and generate a prediction signal within the CIIP frame using the intra prediction mode 37, as the intra prediction mode 37 may have the highest amplitude in the HoG for the reference block. When M is 2 or greater, the video signal processing device can determine the intra prediction mode corresponding to the top M candidates as the prediction mode within the CIIP frame and generate a prediction signal within the CIIP frame by performing a weighted sum on each prediction block generated by the intra prediction mode corresponding to the M candidates.
[0302] Referring to FIG. 36, when M is 2, the video signal processing device may determine that intra prediction mode 37 is the first CIIP screen prediction mode and intra prediction mode 35 is the second CIIP screen prediction mode when intra prediction mode 37 corresponds to the first rank and intra prediction mode 35 corresponds to the second rank in the HoG of the reference block. The video signal processing device may generate a final CIIP screen prediction signal by performing a weighted sum with weights and applied to each of the first and second CIIP screen prediction modes. represents the weight for the first CIIP screen prediction mode, and represents the weight for the second CIIP screen prediction mode. The weights may have the same value for each candidate and may be values proportional to the amplitude of the HoG. For example, when M is 2, the weight may be 1:1. Or when M is 2, the weight may be 3:1.
[0303] FIGS. 37 to 40 illustrate an MVG-TIMD method according to one embodiment of the present specification.
[0304] When a prediction mode within a CIIP frame is derived using MVG-TIMD, the video signal processing device may use the reference block used to acquire the prediction signal between CIIP frames as a reference block for deriving the prediction signal within the CIIP frame. Alternatively, the video signal processing device may use the prediction block between CIIP frames, which is composed of the prediction signal between CIIP frames, as a reference block for deriving the prediction signal within the CIIP frame.
[0305] Referring to FIGS. 37 and 38, in the MVG-TIMD method, a reference block can be defined as an actual template, and a video signal processing device can generate a prediction template by performing prediction in an intra-prediction mode by referencing N adjacent pixel lines of the template. Furthermore, the video signal processing device can determine the intra-prediction mode used to generate the prediction template most similar to the actual template as the CIIP intra-frame prediction mode. At this time, one of the upper line, left line, or upper and left lines can be used as the reference pixel line for generating the prediction template. N can be an integer greater than or equal to 1, or can be 4. The template cost may refer to an indicator for comparing the similarity between the actual template and the prediction template. The template cost can be determined based on either SAD or MR-SAD.
[0306] Additionally, referring to FIGS. 39 and 40, in the MVG-TIMD method, a reference block can be defined as an actual template, and a video signal processing device can generate a prediction template by performing prediction in an intra prediction mode by referencing N adjacent pixel lines of the current block. Furthermore, the video signal processing device can determine the intra prediction mode used to generate the prediction template most similar to the actual template as the prediction mode within the CIIP frame. At this time, one of the upper line, the left line, or both the upper and left lines can be used as the reference pixel line for generating the prediction template. N can be an integer greater than or equal to 1, or it can be 4. The template cost may refer to an indicator for comparing the similarity between the actual template and the prediction template. The template cost can be determined based on either SAD or MR-SAD.
[0307] The video signal processing device may sort the intra prediction modes in ascending order based on the template cost and determine the top M intra prediction modes as the final CIIP intra prediction modes of the MVG-TIMD method. Then, the video signal processing device may generate a prediction signal within the CIIP frame using the final CIIP intra prediction modes. M may be an integer greater than or equal to 1. When M is 1, the video signal processing device may determine one intra prediction mode as the prediction mode within the CIIP frame and generate a prediction signal within the CIIP frame. As shown in FIGS. 37 and 39, for a reference block (actual template), the prediction template generated by intra prediction mode 87 may have the lowest template cost, and the video signal processing device may determine intra prediction mode 87 as the prediction mode within the CIIP frame and generate a prediction signal within the CIIP frame using intra prediction mode 87. When M is 2 or greater, the video signal processing device can determine the intra prediction mode corresponding to the top M candidates as the CIIP in-frame prediction mode, and generate a CIIP in-frame prediction signal by performing a weighted sum on each prediction signal generated by the intra prediction mode corresponding to the M candidates. As shown in FIGS. 38 and 40, when M is 2, the intra prediction mode 87 based on the template cost between the reference block (actual template) and the prediction template may be ranked 1st and 86 may be ranked 2nd. The video signal processing device can determine the intra prediction mode 87 as the first CIIP in-frame prediction mode and the intra prediction mode 86 as the second CIIP in-frame prediction mode, and generate a final CIIP in-frame prediction signal by performing a weighted sum with weights and applied to the two prediction modes, respectively. Here, represents the weight for the first CIIP in-frame prediction mode, and represents the weight for the second CIIP in-frame prediction mode. The weights may be the same value for each candidate or values that vary depending on the template cost.For example, when M is 2, the weights can be 1:1 or 3:1.
[0308] Figures 41 and 42 illustrate how a video signal processing device performs the MVG-RIMD method.
[0309] In the case where a prediction mode within a CIIP frame is derived in the MVG-RIMD method, the video signal processing device may use the intra prediction mode buffer of the reference block area used for acquiring the prediction signal between CIIP frames as a reference intra prediction mode buffer for deriving the prediction signal within the CIIP frame. When using the MVG-RIMD method, the video signal processing device may derive the prediction mode within the CIIP frame by referring to the information of the intra prediction mode buffer.
[0310] The intra prediction mode buffer refers to a buffer in which intra-frame prediction mode information of the reference block area is stored, and the intra prediction mode buffer may store the intra prediction mode used for actual prediction or an intra prediction mode that reflects the pattern of the reference block. The intra prediction mode buffer may store an intra prediction mode derived by DIMD for the prediction block. If the prediction block is predicted in CIIP mode, the video signal processing device may store a Planar prediction mode in the intra prediction mode buffer corresponding to the prediction block location. Alternatively, if the prediction block is predicted in CIIP mode, the CIIP intra-frame prediction mode may be stored in the intra prediction mode buffer as the prediction mode corresponding to the prediction block location.
[0311] When MVG-RIMD is applied to the current block, the video signal processing device can refer to the intra prediction mode buffer corresponding to the reference block area and derive (acquire) an intra prediction mode corresponding to at least one of the top-left, top-right, bottom-left, bottom-right, and center of the reference block area as a CIIP in-frame prediction mode. Then, the video signal processing device can generate a CIIP in-frame prediction signal using the derived prediction mode. For example, referring to FIG. 41, the intra prediction mode corresponding to the top-left position of the reference block (block within the reference picture) may be 19, and the video signal processing device can derive the intra prediction mode 19 as a CIIP in-frame prediction mode and generate a CIIP in-frame prediction signal using the intra prediction mode 19.
[0312] When MVG-RIMD is applied to the current block, the video signal processing device can refer to the intra prediction mode buffer corresponding to the reference block area and induce the intra prediction mode corresponding to the most areas within the reference block (appearing with the highest frequency) as the CIIP in-frame prediction mode. Then, the video signal processing device can generate a CIIP in-frame prediction signal using the induced intra prediction mode. For example, referring to FIG. 42, the intra prediction mode buffer corresponding to the reference block area may store 5 intra prediction modes 19, 20 intra prediction modes 32, and 5 intra prediction modes 67. The video signal processing device can induce the most frequent intra prediction mode 32 as the CIIP in-frame prediction mode and generate a CIIP in-frame prediction signal using intra prediction mode 32.
[0313] When a video signal processing device derives and determines a CIIP in-frame prediction mode by using at least one of MVG-DIMD, MVG-TIMD, and MVG-RIMD, if the intra prediction mode derived by applying TIMD to N restored pixel lines on the upper left side of the current block is a planar (or DC) mode, the CIIP in-frame prediction mode may be determined as a planar (or DC) mode. If the intra prediction mode derived by applying TIMD to N restored pixel lines on the upper left side of the current block is not a planar (or DC) mode, the intra prediction mode derived by at least one of MVG-DIMD, MVG-TIMD, and MVG-RIMD may be determined as the CIIP in-frame prediction mode. For example, when N is 4, if the intra prediction mode derived by applying TIMD to 4 restored pixel lines on the upper left side of the current block is a planar mode, the CIIP in-frame prediction mode of the current block may be determined as a planar mode.
[0314] MVG-DIMD, MVG-TIMD, and MVG-RIMD can be performed on a sub-block basis.
[0315] The video signal processing device can derive a prediction mode within the CIIP screen by referring to at least one of the intra prediction modes of the neighbor blocks located above, to the left, top-left, bottom-left, and top-right of the current block, the width of the current block, and the height of the current block. For example, the video signal processing device can derive one of the intra prediction modes of the neighbor blocks located above, to the left, top-left, bottom-left, and top-right of the current block as a prediction mode within the CIIP screen. For example, the video signal processing device can derive the intra prediction mode of the neighbor block located above the current block as a prediction mode within the CIIP screen. Alternatively, the video signal processing device can derive a prediction mode within the CIIP screen from neighbor blocks at different locations depending on the width and height of the current block. Alternatively, if the width of the current block is longer than the height of the current block, the video signal processing device can derive the intra prediction mode of the neighbor block above the current block as a prediction mode within the CIIP screen. Alternatively, if the horizontal length of the current block is longer than the vertical length of the current block, the video signal processing device may induce the intra prediction mode of the left neighbor block of the current block to the CIIP in-frame prediction mode.
[0316] The video signal processing device can determine N predetermined prediction modes among Intra prediction mode, Planar, DC, IBC, and IntraTMP, which are derived by one of the prediction mode derivation methods, as prediction modes within the CIIP screen. Additionally, the video signal processing device can generate a prediction block within the CIIP screen by weighting the respective prediction blocks generated by the determined N prediction modes within the CIIP screen. N can be an integer greater than or equal to 1, or it can be 2. For example, if N is 2, each selected prediction mode within the CIIP screen can be referred to as the first prediction mode within the CIIP screen and the second prediction mode within the CIIP screen. For example, the first prediction mode within the screen can be the Planar mode, and the second prediction mode within the screen can be the Intra prediction mode derived by MVG-DIMD. The video signal processing device can perform a weighted average of the prediction block predicted by the first prediction mode within the CIIP screen and the prediction block predicted by the second prediction mode within the CIIP screen, and the weights applied to each prediction block can be referred to as the first prediction mode within the CIIP screen weight and the second prediction mode within the CIIP screen weight. The prediction mode weight within the first screen and the prediction mode weight within the second screen may have the same value. The prediction mode weight within the first screen and the prediction mode weight within the second screen may have different values. For example, the prediction mode weight within the first screen may be greater than the prediction mode weight within the second screen.
[0317] A subblock can refer to each subblock formed when the current block is divided into M x N subblocks, where the current block has a width of w and a height of h. M represents the number of subblocks divided along the horizontal direction (or horizontal axis), and N represents the number of subblocks divided along the vertical direction (or vertical axis). Therefore, the width of each subblock can be w / M and the height can be h / N. For example, if the current block has a width of 16 and a height of 16, and M=1 and N=4, the current block can be divided into 4 subblocks in the vertical direction. Similarly, if M=4 and N=1, the current block can be divided into 4 subblocks in the horizontal direction. Alternatively, M and N can be fixed values. For example, M and N can be fixed at 2.
[0318] Alternatively, M and N may be values determined based on the size of the current block. For example, if the height of the current block is greater than 16, M may be 4, and if the width of the current block is greater than 16, N may be 4. If the height of the current block is 16 or less, M may be 2, and if the width of the current block is 16 or less, N may be 2.
[0319] Alternatively, M and N can be determined based on the size of the sub-block. For example, if the size of the sub-block is fixed at 4 x 4, and the current block has a width of 32 and a height of 32, then M and N can be 4.
[0320] FIG. 43 illustrates an MVG-DIMD method performed in sub-block units according to one embodiment of the present specification.
[0321] In this specification, an MVG-DIMD method performed on a sub-block basis may be described as sub-block MVG-DIMD. Sub-block MVG-DIMD may be a method in which a video signal processing device acquires a reference block based on a motion vector (MV) used in CIIP inter-frame prediction, divides the reference block into sub-block sizes, performs DIMD on each sub-block, and induces a CIIP in-frame prediction mode of the sub-block. The derived CIIP in-frame prediction mode of the sub-block may be used to generate a CIIP in-frame prediction block.
[0322] Referring to FIG. 43, when M=2 and N=2, the video signal processing device can divide the reference block into four sub-blocks with a width of w / 2 and a height of h / 2 and perform MVG-DIMD for each sub-block. For convenience of explanation, among the four sub-blocks, the sub-block located at the top left is described as the first reference sub-block, the sub-block located at the top right as the second reference sub-block, the sub-block located at the bottom left as the third reference sub-block, and the sub-block located at the bottom right as the fourth reference sub-block. The video signal processing device can obtain the HoG for each sub-block by independently performing DIMD on each of the first, second, third, and fourth reference sub-blocks, and can derive a prediction mode having the largest amplitude from the HoG of each sub-block. The derived prediction mode can be determined as the prediction mode within the CIIP screen of each sub-block and can be used to generate the prediction block within the CIIP screen.
[0323] FIG. 44 illustrates an MVG-TIMD method performed in sub-block units according to one embodiment of the present specification.
[0324] In this specification, an MVG-TIMD method performed on a sub-block basis may be described as sub-block MVG-TIMD. Sub-block MVG-TIMD may be a method in which a video signal processing device acquires a reference block based on a motion vector (MV) utilized in CIIP inter-frame prediction, divides the reference block into sub-block sizes, performs TIMD on each sub-block, and induces a CIIP frame prediction mode of the sub-block. The derived CIIP frame prediction mode of the sub-block may be used to generate a CIIP frame prediction block.
[0325] Referring to FIG. 44, when M=2 and N=2, the video signal processing device can divide the reference block into four sub-blocks with a width of w / 2 and a height of h / 2 and perform MVG-TIMD on each sub-block. For convenience of explanation, among the four sub-blocks, the sub-block located at the top left is described as the first reference sub-block, the sub-block located at the top right as the second reference sub-block, the sub-block located at the bottom left as the third reference sub-block, and the sub-block located at the bottom right as the fourth reference sub-block. The video signal processing device can perform TIMD independently on each of the first, second, third, and fourth reference sub-blocks to calculate the template cost corresponding to each sub-block, and can derive a prediction mode having the minimum template cost for each sub-block. The derived prediction mode can be determined as the prediction mode within the CIIP screen of each sub-block and can be used to generate the prediction block within the CIIP screen.
[0326] FIGS. 45 and 46 illustrate an MVG-RIMD method performed in sub-block units according to one embodiment of the present specification.
[0327] In this specification, an MVG-RIMD method performed in sub-block units may be described as sub-block MVG-RIMD. Sub-block MVG-RIMD may be a method in which a video signal processing device acquires a reference block based on a motion vector (MV) utilized in CIIP inter-frame prediction, divides the reference block into sub-block sizes, and derives a prediction mode within a CIIP frame by referring to an intra prediction mode buffer corresponding to each sub-block. The derived prediction mode within a CIIP frame of the sub-block may be used to generate a prediction block within a CIIP frame. The video signal processing device may derive an intra prediction mode corresponding to at least one position among the top-left, top-right, bottom-left, bottom-right, and center of the sub-block area as a prediction mode within a CIIP frame by referring to an intra prediction mode buffer corresponding to each sub-block area. Alternatively, when applying sub-block MVG-RIMD, the video signal processing device may refer to the intra prediction mode buffer corresponding to each sub-block area and guide the intra prediction mode corresponding to the largest area within the sub-block area into the CIIP screen prediction mode.
[0328] When M=2 and N=2, the video signal processing device can divide the reference block into four sub-blocks with a width of w / 2 and a height of h / 2 and perform MVG-RIMD on each sub-block. For convenience of explanation, among the four sub-blocks, the sub-block located at the top-left is described as the first reference sub-block, the sub-block located at the top-right is described as the second reference sub-block, the sub-block located at the bottom-left is described as the third reference sub-block, and the sub-block located at the bottom-right is described as the fourth reference sub-block. Referring to FIG. 45, the video signal processing device can derive the prediction mode at the top-left of the intra prediction mode buffer of each sub-block as the prediction mode within the CIIP frame of each sub-block by referring to the intra prediction mode buffers corresponding to the first reference sub-block, the second reference sub-block, the third reference sub-block, and the fourth reference sub-block, respectively. The derived prediction mode can be used to generate the prediction block within the CIIP frame. Referring to FIG. 46, the video signal processing device can derive the prediction mode most frequently selected in each sub-block area as the CIIP prediction mode by referring to the intra prediction mode buffers corresponding to the first reference sub-block, the second reference sub-block, the third reference sub-block, and the fourth reference sub-block, respectively. The derived prediction mode can be used to generate prediction blocks within the CIIP screen.
[0329] FIGS. 47 to 49 show reference areas used when a prediction signal within a CIIP screen is generated in sub-block units according to one embodiment of the present specification.
[0330] Referring to FIGS. 47 through 49, the video signal processing device can generate a prediction block within a CIIP screen with width w and height h by dividing it into four sub-blocks. For convenience of explanation, among the four sub-blocks, the sub-block located at the top left is described as the first CIIP screen sub-block, the sub-block located at the top right is described as the second CIIP screen sub-block, the sub-block located at the bottom left is described as the third CIIP screen sub-block, and the sub-block located at the bottom right is described as the fourth CIIP screen sub-block. When a prediction block within a CIIP screen is generated in units of sub-blocks, the video signal processing device can generate the prediction signal within the CIIP screen of each sub-block by using the template of the reference block as the reference area.
[0331] Referring to FIG. 47, regions A through G may correspond to reference regions. A sub-block prediction signal within the first CIIP screen may be generated by referencing reference regions A and C, and a sub-block prediction signal within the second CIIP screen may be generated by referencing reference regions B and G. Additionally, a sub-block prediction signal within the third CIIP screen may be generated by referencing reference regions E and D, and a sub-block prediction signal within the fourth CIIP screen may be generated by referencing reference regions F and H.
[0332] Referring to FIG. 48, the areas labeled A through D may correspond to reference areas. A sub-block prediction signal within the first CIIP screen is generated by referencing reference areas A and C, and a sub-block prediction signal within the second CIIP screen may be generated by referencing reference areas B and C. Additionally, a sub-block prediction signal within the third CIIP screen is generated by referencing reference areas A and D, and a sub-block prediction signal within the fourth CIIP screen may be generated by referencing reference areas B and D.
[0333] Referring to FIG. 49, the areas labeled A through D may correspond to reference areas. A video signal processing device can generate a sub-block prediction signal within a first CIIP screen by referring to reference areas A and C. A video signal processing device can obtain reference areas G and E from the sub-block prediction signal within the first CIIP screen. A video signal processing device can generate a sub-block prediction signal within a second CIIP screen by referring to B and G, and can generate a sub-block prediction signal within a third CIIP screen by referring to D and E. A video signal processing device can obtain reference area F from the sub-block prediction signal within the second CIIP screen and reference area H from the sub-block prediction signal within the third CIIP screen. A video signal processing device can generate a fourth CIIP sub-block prediction signal by referring to F and H.
[0334] When a video signal processing device generates predicted blocks within a CIIP frame in sub-block units, it can apply filtering to remove discontinuities between sub-blocks.
[0335] When prediction blocks are generated in units of sub-blocks using one of MVG-DIMD, MVG-TIMD, or MVG-RIMD, the video signal processing device can generate prediction blocks for each sub-block using the prediction mode within the CIIP frame derived for each sub-block and the respective reference area for the sub-block as described above.
[0336] FIG. 50 illustrates a method for generating prediction blocks in sub-block units according to one embodiment of the present specification.
[0337] Referring to FIG. 50, when a video signal processing device generates prediction blocks in sub-block units using one of MVG-DIMD, MVG-TIMD, or MVG-RIMD, the video signal processing device can generate each prediction block for the current block using a prediction mode within the CIIP screen derived for each sub-block, and then generate a final prediction block using a predefined weight in the sub-block unit for each prediction block. Specifically, the current block can be divided into four sub-blocks. For convenience of explanation, among the four sub-blocks, the sub-block located at the top-left is described as the first CIIP screen sub-block, the sub-block located at the top-right is described as the second CIIP screen sub-block, the sub-block located at the bottom-left is described as the third CIIP screen sub-block, and the sub-block located at the bottom-right is described as the fourth CIIP screen sub-block. In addition, the prediction mode corresponding to the sub-block within the first CIIP screen is described as the prediction mode within the first CIIP screen, the prediction mode corresponding to the sub-block within the second CIIP screen is described as the prediction mode within the second CIIP screen, the prediction mode corresponding to the sub-block within the third CIIP screen is described as the prediction mode within the third CIIP screen, and the prediction mode corresponding to the sub-block within the fourth CIIP screen is described as the prediction mode within the fourth CIIP screen. The video signal processing device can generate the first CIIP screen prediction block, the second CIIP screen prediction block, the third CIIP screen prediction block, and the fourth CIIP screen prediction block by predicting the current block using the first CIIP screen prediction mode, the second CIIP screen prediction mode, the third CIIP screen prediction mode, and the fourth CIIP screen prediction mode.Next, the video signal processing device may apply a first sub-block unit weight to an area corresponding to a first sub-block within the CIIP screen of each CIIP screen prediction block, apply a second sub-block unit weight to an area corresponding to a second sub-block within the CIIP screen, apply a third sub-block unit weight to an area corresponding to a third sub-block within the CIIP screen, and apply a fourth sub-block unit weight to an area corresponding to a fourth sub-block within the CIIP screen. At this time, the first sub-block unit weight () applied to the first CIIP screen prediction block may be set higher than the weight () of the second, third, and fourth sub-blocks. The second sub-block unit weight () applied to the second CIIP screen prediction block may be set higher than the weight () of the first, third, and fourth sub-blocks. The third sub-block unit weight () applied to the third CIIP screen prediction block may be set higher than the weight () of the first, second, and fourth sub-blocks. The fourth sub-block unit weight () applied to the fourth CIIP screen prediction block may be set higher than the weights () of the first, second, and third sub-blocks. For example, referring to FIG. 50, the first sub-block unit weight applied to the first CIIP screen prediction block may be 52, and the second, third, and fourth sub-block unit weights may be 4. The second sub-block unit weight applied to the second CIIP screen prediction block may be 52, and the first, third, and fourth sub-block unit weights may be 4. The third sub-block unit weight applied to the third CIIP screen prediction block may be 52, and the first, second, and fourth sub-block unit weights may be 4. The fourth sub-block unit weight applied to the fourth CIIP screen prediction block may be 52, and the first, second, and third sub-block unit weights may be 4. The video signal processing device may generate the final CIIP screen prediction block by dividing the blocks on which the weighted sum was performed by 64.
[0338] The video signal processing device may determine at least one of whether the prediction mode induction method is performed in sub-block units according to the CIIP inter-frame prediction mode, whether prediction blocks within the CIIP frame are generated in sub-block units, whether weights in sub-block units are applied for the generation of prediction blocks within the CIIP frame, and the size of the sub-block. For example, if the CIIP inter-frame prediction mode is one of sbTMVP merge or affine merge mode, the video signal processing device may induce the CIIP intra-frame prediction mode in sub-block units. Alternatively, if the CIIP inter-frame prediction mode is one of sbTMVP merge or affine merge mode, the video signal processing device may generate prediction blocks within the CIIP frame in sub-block units. Alternatively, if the CIIP inter-frame prediction mode is one of sbTMVP merge or affine merge mode, the video signal processing device may apply weights in sub-block units for the generation of prediction blocks within the CIIP frame. When the prediction block between CIIP screens is in one of the sbTMVP merge or affine merge modes, the size and number of sub-blocks of the prediction block within the CIIP screen may be the same as the size and number of sub-blocks of the prediction block between CIIP screens.
[0339] The prediction mode within the CIIP frame may be one of the modes in the set of intra prediction modes, an intra prediction mode derived by a prediction mode derivation method (TIMD, DIMD, MVG-TIMD, MVG-DIMD, MVG-RIMD), at least one of BV-PSG and PDPC. In this case, the mode derived by TIMD, DIMD, MVG-TIMD, MVG-DIMD, and MVG-RIMD may be a single mode. In this case, the mode derived by TIMD, DIMD, MVG-TIMD, MVG-DIMD, and MVG-RIMD may be a mode obtained through the weighted sum of signals predicted by multiple intra prediction modes.
[0340] The PDP method may be applied to the current block. If the CIIP intra-frame prediction mode is determined to be one of the sets of intra-prediction modes predictable by the PDP mode, the video signal processing device may perform prediction using the matrix indicated by the intra-prediction mode, without performing intra-prediction through the intra-prediction directional mode for the current block. If the CIIP intra-frame prediction mode is determined to be one of the sets of intra-prediction modes that cannot be predicted by the PDP mode, the video signal processing device may perform prediction by changing the CIIP intra-frame prediction mode to a mode predictable by the PDP mode. For example, when Planar (or Directional Planar), DC, and even directional intra-prediction modes are specified as modes usable for PDP-based prediction, and the odd directional intra-prediction mode 5 is determined as the CIIP intra-frame prediction mode, the video signal processing device may change the CIIP intra-frame prediction mode to 4 or 6. In this case, the CIIP intra-frame prediction signal may be generated through PDP-based prediction using the changed intra-prediction mode. If the prediction mode within the CIIP screen is determined to be one of the sets of intra prediction modes that cannot be predicted by the PDP mode, the video signal processing device can generate a prediction signal within the CIIP screen through the existing intra prediction directional mode instead of PDP prediction.
[0341] The prediction mode within the CIIP screen may be at least one of the following: a mode from the intra prediction mode list, an intra prediction mode derived by a prediction mode derivation method (e.g., TIMD, DIMD, MVG-TIMD, MVG-DIMD, MVG-RIMD, etc.), BV-PSG, and PDPC.
[0342] The video signal processing device may calculate the template cost for one mode among the intra prediction mode set or for R modes among the intra prediction modes derived by the prediction mode derivation method, and use the prediction mode with the lowest cost as the CIIP in-frame prediction mode. In this case, the actual template may be N restored pixel lines above and to the left, or above and to the left, of the current block. The prediction template may be a template predicted by referencing M restored pixel lines above and to the left, or above and to the left, of the actual template. The size of the prediction template may be the same as the actual template. For example, when R is 2, M is 4, and N is 1, the video signal processing device may derive the CIIP in-frame prediction mode using the TIMD and MVG-DIMD methods. If the CIIP in-frame prediction mode derived by TIMD is intra prediction mode 19 and the CIIP in-frame prediction mode derived by MVG-DIMD is intra prediction mode 32, the video signal processing device may generate a prediction template using the two CIIP in-frame prediction modes and calculate the cost between the prediction template and the actual template. In this case, the actual template may be four restored pixel lines on the upper and left sides of the current block, and the predicted template may be a template predicted by referencing one restored pixel line on the upper and left sides of the actual template. If the template cost of the CIIP in-frame prediction mode derived by TIMD (e.g., intra prediction mode 19) is 2103 and the template cost of the CIIP in-frame prediction mode derived by MVG-DIMD (e.g., intra prediction mode 32) is 1292, the video signal processing device may use the intra prediction mode 32 as the final CIIP in-frame prediction mode. Then, the CIIP in-frame prediction signal may be generated using the intra prediction mode 32.
[0343] FIG. 51 illustrates a syntax element according to one embodiment of the present specification.
[0344] Referring to FIG. 51, the video signal processing device can determine whether to use CIIP mode, CIIP inter-frame prediction mode, and CIIP intra-frame prediction mode based on syntax elements (syntactic elements) related to CIIP.
[0345] Specifically, the encoder may include a syntax element (ciip_flag) in the bitstream by signaling whether the prediction mode of the current block is CIIP. The decoder may parse the ciip_flag from the bitstream to determine whether the prediction mode of the current block is CIIP mode. For example, if the value of ciip_flag is a first value, it may indicate that the prediction mode of the current block is CIIP mode, and if the value of ciip_flag is a second value, it may indicate that the prediction mode of the current block is not CIIP mode. In this case, the first value and the second value may be different values, such as 0 and 1, respectively.
[0346] If the prediction mode of the current block is CIIP mode, the encoder may include a syntax element (ciip_affine_flag) in the bitstream by signaling whether the CIIP inter-frame prediction mode is affine merge mode. The decoder may parse ciip_affine_flag from the bitstream to determine whether the CIIP inter-frame prediction mode of the current block is affine merge mode. For example, if the value of ciip_affine_flag is a first value, it may indicate that the CIIP inter-frame prediction mode of the current block is affine merge mode, and if the value of ciip_affine_flag is a second value, it may indicate that the CIIP inter-frame prediction mode of the current block is not affine merge mode (e.g., merge mode, TM merge mode, etc.). If the prediction mode of the current block is CIIP mode and the CIIP inter-frame prediction mode is not affine merge mode, the encoder may signal and include a syntax element (ciip_tm_flag) indicating whether the CIIP inter-frame prediction mode is TM merge mode in the bitstream. The decoder may parse ciip_tm_flag from the bitstream to determine whether the CIIP prediction mode of the current block is TM merge mode. For example, if the value of ciip_tm_flag is the first value, the CIIP prediction mode of the current block may be TM merge mode, and if the value of ciip_tm_flag is the second value, the CIIP prediction mode of the current block may be a mode other than TM merge mode (e.g., merge mode). In this case, the first value and the second value may be different values, 0 and 1, respectively.
[0347] If the prediction mode of the current block is CIIP mode and the prediction mode between CIIP frames is not affine merge mode, the encoder may signal and include in the bitstream a syntax element (ciip_pdpc_flag) indicating whether the prediction mode within the CIIP frame is PDPC mode. Conversely, if the prediction mode of the current block is not CIIP mode, or if it is CIIP mode and the prediction mode between CIIP frames is affine merge mode, the encoder may not signal ciip_pdpc_flag and ciip_pdpc_flag may not be included in the bitstream. If ciip_pdpc_flag is not included in the bitstream, the decoder may not parse ciip_pdpc_flag and may not use PDPC as the prediction mode within the CIIP frame. Alternatively, if ciip_pdpc_flag is included in the bitstream, the decoder may parse ciip_pdpc_flag. When the decoder parses ciip_pdpc_flag, if the value of ciip_pdpc_flag is the first value, the prediction mode within the CIIP screen may be PDPC mode, and if the value of ciip_pdpc_flag is the second value, the prediction mode within the CIIP screen may not be PDPC mode. In this case, the first value and the second value may be different values, 0 and 1, respectively.
[0348] The video signal processing device may determine whether to signal or parse ciip_intra_mode_flag based on whether the CIIP intra-prediction mode is PDPC mode. ciip_intra_mode_flag may be a syntax element indicating which CIIP intra-prediction mode the current block was encoded in, among one of the intra-prediction mode sets, the intra-prediction mode derived by the prediction mode derivation method, BV-PSG, and PDPC. If the CIIP intra-prediction mode is PDPC mode, the video signal processing device may determine the CIIP intra-prediction mode as PDPC without signaling or parsing ciip_intra_mode_flag. If the CIIP intra-prediction mode is not PDPC mode, the video signal processing device may determine the CIIP intra-prediction mode by signaling or parsing ciip_intra_mode_flag. Specifically, if the prediction mode within the CIIP frame is PDPC mode, the encoder may not signal ciip_intra_mode_flag and ciip_intra_mode_flag may not be included in the bitstream. Conversely, if the prediction mode within the CIIP frame is not PDPC mode, the encoder may signal ciip_intra_mode_flag and include it in the bitstream. If the prediction mode within the CIIP frame is not PDPC mode, the decoder may parse ciip_intra_mode_flag from the bitstream to determine the prediction mode within the CIIP frame to apply to the current block.If the value of ciip_intra_mode_flag is the first value, it may indicate one mode among the intra-predicted mode set, one method among the prediction mode derivation method, and at least one mode among BV-PSG and PDPC; and if the value of ciip_intra_mode_flag is the second value, it may indicate any one of the remaining modes among one mode among the intra-predicted mode set, one method among the prediction mode derivation method, BV-PSG and PDPC, excluding the mode indicated by the first value. For example, the value of ciip_intra_mode_flag may indicate a planar mode and an intra-predicted mode derived by TIMD. In this case, if the value of ciip_intra_mode_flag is the first value, it may indicate a planar mode, and if the value of ciip_intra_mode_flag is the second value, it may indicate an intra-predicted mode derived by TIMD. Alternatively, the value of ciip_intra_mode_flag may indicate an intra prediction mode induced by TIMD and an intra prediction mode induced by MVG-DIMD. In this case, if the value of ciip_intra_mode_flag is the first value, the video signal processing device may induce a CIIP in-frame prediction mode by TIMD, and if the value of ciip_intra_mode_flag is the second value, the video signal processing device may induce a CIIP in-frame prediction mode by MVG-DIMD. In this case, the first value and the second value may be different values, 0 and 1, respectively.
[0349] The order in which ciip_affine_flag, ciiip_tm_flag, ciip_intra_mode_flag, and ciip_pdpc_flag are signaled or parsed is not limited to the order shown in FIG. 51 and can be changed. Additionally, signaling of one or more syntactic elements among ciip_affine_flag, ciiip_tm_flag, ciip_intra_mode_flag, and ciip_pdpc_flag may be omitted.
[0350] Based on whether the prediction signal within the CIIP frame is generated in PDP mode, at least one syntax element of ciip_intra_mode_flag and ciip_pdpc_flag may not be signaled or parsed. For example, if the current block satisfies the conditions for performing PDP mode, the encoder may not signal ciip_pdpc_flag and may not include it in the bitstream, and the decoder may determine the prediction mode within the CIIP frame as a separate mode other than PDPC without parsing ciip_pdpc_flag. The separate mode may be a CIIP frame prediction mode derived by TIMD.
[0351] The video signal processing device can independently generate a prediction signal within the CIIP frame for the chrominance block. The video signal processing device can derive a prediction mode within the CIIP frame by applying a prediction mode derivation method to each Cb and Cr chrominance signal. The video signal processing device can derive a prediction mode within the CIIP frame by applying a prediction mode derivation method to the Cb (or Cr) chrominance signal. The video signal processing device can derive a prediction mode within the CIIP frame by applying a prediction mode derivation method to the luminance signal of the reference block or the Cb (or Cr) chrominance signal. Additionally, the video signal processing device can inherit and use the prediction mode used in the Cb (or Cr) chrominance signal for the Cr (or Cb) chrominance signal as is. Furthermore, the video signal processing device can generate a prediction signal within the CIIP frame by inheriting the CIIP frame prediction mode of the corresponding luminance block for the chrominance block. The video signal processing device can apply CCP technology to the prediction signal of the luminance block to convert the luminance block into a chrominance block and use it as the CIIP frame prediction block for the chrominance signal. Alternatively, the video signal processing device can apply CCP technology to the prediction signal of the luminance block to convert the luminance block into a chrominance block and use it as a CIIP inter-frame prediction block for the chrominance signal.
[0352] The reference block used for deriving the CIIP intra-prediction mode may be a block to which at least one of LIC, OBMC, DMVR, and BDOF filtering is applied.
[0353] FIG. 52 illustrates a method in which a video signal processing device according to one embodiment of the present specification generates a CIIP prediction signal.
[0354] The video signal processing device can obtain a final CIIP prediction signal by weighting the CIIP inter-frame prediction signal and the CIIP intra-frame prediction signal. can be the weight for the CIIP inter-frame prediction signal, and can be the weight for the CIIP intra-frame prediction signal. and can have fixed values. For example, : can be 1:1 or 3:1.
[0355] and can be set to different values by at least one of the prediction mode within the CIIP screen and the pixel position within the current block. Referring to FIG. 52(a) and (c), when the prediction mode within the CIIP screen is a near-horizontal mode (i.e., 2 <= intra prediction mode < 34), : for area 0 of the vertically divided quadrant area can be set to 2:6, : for area 1 to 3:5, : for area 2 to 5:3, and for area 3 to 6:2. Referring to FIG. 52(b) and (c), when the prediction mode within the CIIP screen is a near-vertical mode (i.e., 34 <= intra prediction mode < 66), the ratio for area 0 among the areas divided into four horizontal sections can be set to 2:6, the ratio for area 1 to 3:5, the ratio for area 2 to 5:3, and the ratio for area 3 to 6:2.
[0356] If the current block is encoded in CIIP mode, the video signal processing device may generate a final CIIP prediction block by performing a weighted sum on the CIIP intra-frame prediction block and the CIIP inter-frame prediction block. Then, the video signal processing device may derive an intra-prediction mode with DIMD for the internal samples of the final CIIP prediction block or the CIIP inter-frame prediction block, and may derive a transformation kernel (or transformation method, set of transformation kernels) based on the derived intra-prediction mode. Alternatively, the video signal processing device may derive a transformation kernel (or transformation method, set of transformation kernels) based on the prediction mode of the intra-prediction mode buffer. If the current block is encoded in CIIP mode, the video signal processing device may derive an intra-prediction mode with DIMD using at least one of the CIIP intra-frame prediction block, the CIIP inter-frame prediction block, and the final CIIP prediction block, and may derive a transformation kernel (or transformation method, set of transformation kernels) based on the derived intra-prediction mode. The transformation kernel (or transformation method, set of transformation kernels) may be a transformation kernel used for MTS, LFNST, NSPT transformations and inverse transformations.
[0357] The video signal processing device may store CIIP intra-frame prediction modes in the intra prediction mode buffer. If there is only one CIIP intra-frame prediction mode, the video signal processing device may store that prediction mode in the intra prediction mode buffer. If two or more CIIP intra-frame prediction modes are used, the video signal processing device may calculate the template cost for each mode and store the intra prediction mode with the smallest cost in the intra prediction mode buffer. For example, if intra prediction mode 40 is used as the CIIP intra-frame prediction mode, the intra-frame prediction mode information for the current block may be stored as 40. Alternatively, if a weighted sum of intra prediction modes 40 and 32 is used as the CIIP intra-frame prediction mode, the video signal processing device may calculate the template cost for each intra prediction mode. If the template cost for intra prediction mode 40 is 1020 and the template cost for 32 is 2291, intra prediction mode 40 may be stored in the intra prediction mode buffer.
[0358] The video signal processing device can store the intra-frame prediction mode derived by DIMD for the CIIP prediction block in an intra-prediction mode buffer. For example, when DIMD is applied to the CIIP prediction block and the intra-prediction mode 40 prediction mode is derived, the intra-frame prediction mode information for the current block can be stored as intra-prediction mode 40.
[0359] The aforementioned CIIP inter-frame prediction mode may be applied by replacing it with at least one of IntraTMP or IBC. When at least one of IntraTMP or IBC is used as the CIIP inter-frame prediction mode, the reference picture may be identical to the current picture. When at least one of IntraTMP or IBC is used as the CIIP inter-frame prediction mode, the reference block utilized in the intra-frame prediction mode derivation method may be obtained using a block vector. The method for deriving the intra-frame prediction mode, excluding the process of obtaining the reference block, may be performed in the same manner as the aforementioned intra-frame prediction mode derivation method. The video signal processing device uses at least one of IntraTMP or IBC as the CIIP inter-frame prediction mode, and when prediction is performed in sub-block units using the CIIP inter-frame prediction mode, the CIIP intra-frame prediction mode can be derived in sub-block units. The video signal processing device uses at least one of IntraTMP or IBC as the CIIP inter-frame prediction mode, and when prediction is performed in sub-block units using the CIIP inter-frame prediction mode, the CIIP intra-frame prediction block can be predicted in sub-block units.
[0360] FIG. 53 illustrates a method in which a video signal processing device processes a video signal according to one embodiment of the present specification.
[0361] Hereinafter, a method for a video signal processing device to restore the current block is described with reference to FIG. 53.
[0362] The video signal processing device can acquire an inter-frame prediction block of the current block (S5310). The video signal processing device can acquire an intra-frame prediction block of the current block (S5320). The video signal processing device can restore the current block through CIIP (Combined Inter / Intra-picture Prediction) using the inter-frame prediction block and the intra-frame prediction block (S5330). At this time, the intra-frame prediction block can be acquired based on the inter-frame prediction block.
[0363] The above-mentioned intra-screen prediction block can be obtained based on a first prediction mode obtained by applying DIMD (Decoder side intra mode derivation) to the above-mentioned inter-screen prediction block.
[0364] When there are multiple prediction modes obtained by applying DIMD to the above-mentioned inter-frame prediction blocks, the video signal processing device may obtain a preset number of prediction modes in order of highest frequency among the above-mentioned multiple prediction modes, and obtain the above-mentioned intra-frame prediction blocks by performing a weighted sum on the prediction blocks obtained using each of the above-mentioned preset number of prediction modes.
[0365] The above-mentioned intra-screen prediction block can be obtained based on a second prediction mode obtained by applying TIMD (Template intra mode derivation) to the above-mentioned inter-screen prediction block.
[0366] When there are multiple prediction modes obtained by applying TIMD to the above-mentioned inter-frame prediction blocks, the video signal processing device can obtain the within-frame prediction block by performing a weighted sum on the prediction blocks obtained using each of the multiple prediction modes.
[0367] The above-mentioned intra-screen prediction block can be obtained based on any one of the prediction modes included in the intra-prediction mode buffer corresponding to a specific location of the reference block used to obtain the above-mentioned inter-screen prediction block.
[0368] A video signal processing device can divide the current block into a plurality of sub-blocks, apply DIMD or TIMD to each of the plurality of sub-blocks to obtain prediction modes corresponding to each of the plurality of sub-blocks, obtain a plurality of prediction blocks based on the prediction modes corresponding to each of the plurality of sub-blocks, and obtain a prediction block within the frame by performing a weighted sum on the plurality of prediction blocks.
[0369] When a Position Dependent Intra Prediction (PDP) is applied to the current block, the intra-screen prediction block can be obtained based on a matrix corresponding to the PDP.
[0370] The methods described above in this specification may be performed through a processor of a decoder (video signal decoding device) or an encoder (video signal encoding device). Additionally, the encoder may generate a bitstream that is decoded by the methods described above. Furthermore, the bitstream generated by the encoder may be stored in a computer-readable non-transient storage medium (recording medium).
[0371] Although this specification is described primarily from the perspective of a decoder, it can operate in the same way in an encoder. The term "parsing" in this specification is described with an emphasis on the process of obtaining information from a bitstream, but from the perspective of an encoder, it can be interpreted as configuring that information into the bitstream. Therefore, the term "parsing" is not limited to decoder operations but can be interpreted to include the act of configuring a bitstream in an encoder. Furthermore, such a bitstream may be configured by being stored on a computer-readable recording medium.
[0372] The embodiments of the present invention described above may be implemented through various means. For example, the embodiments of the present invention may be implemented by hardware, firmware, software, or a combination thereof.
[0373] In the case of implementation by hardware, the method according to the embodiments of the present invention 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), processors, controllers, microcontrollers, microprocessors, etc.
[0374] In the case of implementation by firmware or software, the method according to the embodiments of the present invention may be implemented in the form of a module, procedure, or function that performs the functions or operations described above. The software code may be stored in memory and executed by a processor. The memory may be located inside or outside the processor and may exchange data with the processor by various means already known.
[0375] Some embodiments may also be implemented in the form of a recording medium containing computer-executable instructions, such as program modules executed by a computer. A computer-readable medium may be any available medium accessible by a computer and includes both volatile and non-volatile media, and both removable and inremovable media. Additionally, a computer-readable medium may include both computer storage media and communication media. A computer storage medium includes both volatile and non-volatile, removable and inremovable media implemented by any method or technique for storing information, such as computer-readable instructions, data structures, program modules, or other data. A communication medium typically includes other data of modulated data signals, such as computer-readable instructions, data structures, or program modules, or other transmission mechanisms, and includes any information transmission medium.
[0376] The foregoing description of the present invention is for illustrative purposes only, and those skilled in the art will understand that other specific forms can be easily modified without altering the technical spirit or essential features of the present invention. Therefore, the embodiments described above should be interpreted as illustrative in all respects and not as restrictive. For example, each component described as a single unit may be implemented in a distributed manner, and components described as distributed may likewise be implemented in a combined form.
[0377] The scope of the present invention is defined by the claims set forth below rather than by the detailed description above, and all modifications or variations derived from the meaning and scope of the claims and equivalent concepts thereof should be interpreted as being included within the scope of the present invention.
Claims
In a video signal decoding device, Includes a processor, The above processor is, Obtain the inter-screen prediction block of the current block, and Obtain the predicted block within the screen of the above current block, and Using the above-mentioned inter-picture prediction block and the above-mentioned intra-picture prediction block, the above-mentioned current block is restored through CIIP (Combined Inter / Intra-picture Prediction), and A video signal decoding device in which the above-mentioned intra-frame prediction block is obtained based on the above-mentioned inter-frame prediction block. In Article 1, The prediction block within the screen above is, A video signal decoding device obtained based on a first prediction mode obtained by applying DIMD (Decoder side intra mode derivation) to the above-mentioned inter-frame prediction block. In Paragraph 2, The above processor is, In the case where there are multiple prediction modes obtained by applying DIMD to the above-mentioned inter-screen prediction block: Among the above plurality of prediction modes, a pre-set number of prediction modes are obtained in order of highest frequency, and A video signal decoding device that obtains a prediction block within the screen by performing a weighted sum on prediction blocks obtained using each of the above-mentioned number of prediction modes. In Article 1, The prediction block within the screen above is, A video signal decoding device obtained based on a second prediction mode obtained by applying TIMD (Template intra mode derivation) to the above-mentioned inter-frame prediction block. In Paragraph 4, The above processor is, In the case where there are multiple prediction modes obtained by applying TIMD to the above-mentioned inter-screen prediction block: A video signal decoding device that obtains an in-frame prediction block by performing a weighted sum on prediction blocks obtained using each of the plurality of prediction modes. In Article 1, The prediction block within the screen above is, A video signal decoding device that is acquired based on any one of the prediction modes included in an intra-prediction mode buffer corresponding to a specific position of a reference block used to acquire the above-mentioned inter-frame prediction block. In Article 1, The above processor is, The above current block is divided into multiple sub-blocks, and DIMD or TIMD is applied to each of the plurality of sub-blocks to obtain prediction modes corresponding to each of the plurality of sub-blocks, and A plurality of prediction blocks are obtained based on prediction modes corresponding to each of the plurality of sub-blocks above, and A video signal decoding device that obtains an in-frame prediction block by performing a weighted sum on the plurality of prediction blocks. In Article 1, A video signal decoding device in which, when a Position Dependent Intra Prediction (PDP) is applied to the current block, the intra-frame prediction block is obtained based on a matrix corresponding to the PDP. In a video signal encoding device, Includes a processor, The above processor is, Obtain the inter-screen prediction block of the current block, and Obtain the predicted block within the screen of the above current block, and Using the above-mentioned inter-picture prediction block and the above-mentioned intra-picture prediction block, the current block is encoded through CIIP (Combined Inter / Intra-picture Prediction), and The above-mentioned in-screen prediction block is obtained based on the above-mentioned inter-screen prediction block, and A video signal encoding device that generates a bitstream based on the above-mentioned encoded current block. In Article 9, The prediction block within the screen above is, A video signal encoding device obtained based on a first prediction mode obtained by applying DIMD (Decoder side intra mode derivation) to the above-mentioned inter-frame prediction block. In Article 10, The above processor is, In the case where there are multiple prediction modes obtained by applying DIMD to the above-mentioned inter-screen prediction block: Among the above plurality of prediction modes, a pre-set number of prediction modes are obtained in order of highest frequency, and A video signal encoding device that obtains a prediction block within a screen by performing a weighted sum on prediction blocks obtained using each of the above-mentioned number of prediction modes. In Article 9, The prediction block within the screen above is, A video signal encoding device obtained based on a second prediction mode obtained by applying TIMD (Template intra mode derivation) to the above-mentioned inter-frame prediction block. In Paragraph 12, The above processor is, In the case where there are multiple prediction modes obtained by applying TIMD to the above-mentioned inter-screen prediction block: A video signal encoding device that obtains an in-frame prediction block by performing a weighted sum on prediction blocks obtained using each of the plurality of prediction modes. In Article 9, The prediction block within the screen above is, A video signal encoding device that is acquired based on any one of the prediction modes included in an intra-prediction mode buffer corresponding to a specific location of a reference block used to acquire the above-mentioned inter-frame prediction block. In Article 9, The above processor is, The above current block is divided into multiple sub-blocks, and DIMD or TIMD is applied to each of the plurality of sub-blocks to obtain prediction modes corresponding to each of the plurality of sub-blocks, and A plurality of prediction blocks are obtained based on prediction modes corresponding to each of the plurality of sub-blocks above, and A video signal encoding device that obtains an in-frame prediction block by performing a weighted sum on the plurality of prediction blocks. In Article 9, A video signal encoding device in which, when a Position Dependent Intra Prediction (PDP) is applied to the current block, the intra-frame prediction block is obtained based on a matrix corresponding to the PDP. In a computer-readable non-transient storage medium storing a bitstream, the bitstream is decoded by a decoding method, and the decoding method is Step of obtaining a cross-screen prediction block of the current block; A step of obtaining a predicted block within the screen of the current block; and The method includes a step of restoring the current block through CIIP (Combined Inter / Intra-picture Prediction) using the above-mentioned inter-picture prediction block and the above-mentioned intra-picture prediction block, and The above-mentioned in-screen prediction block is a non-transient storage medium obtained based on the above-mentioned in-screen prediction block. In Paragraph 17, The prediction block within the screen above is, A non-transient storage medium obtained based on a first prediction mode obtained by applying DIMD (Decoder side intra mode derivation) to the above-mentioned inter-frame prediction block. In Paragraph 18, The above decoding method is, In the case where there are multiple prediction modes obtained by applying DIMD to the above-mentioned inter-screen prediction block: A step of obtaining a predetermined number of prediction modes in order of highest frequency among the plurality of prediction modes above; A non-transient storage medium further comprising the step of obtaining a prediction block within the screen by performing a weighted sum on prediction blocks obtained using each of the above-mentioned number of prediction modes. In Paragraph 17, The prediction block within the screen above is, A non-transient storage medium obtained based on a second prediction mode obtained by applying TIMD (Template intra mode derivation) to the above-mentioned inter-frame prediction block.
