Video decoding method and apparatus, and video encoding method and apparatus

The method and device improve video encoding and decoding efficiency by generating and signaling accurate block vectors within frames, addressing inefficiencies in high-resolution video processing.

WO2025147089A1PCT designated stage expired Publication Date: 2025-07-10INTELLECTUAL DISCOVERY CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/KR2025/000020
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-01-03
Filing Date
2025-01-02
Publication Date
2025-07-10

AI Technical Summary

Technical Problem

Existing video encoding and decoding technologies face challenges in accurately and efficiently processing high-resolution or high-definition video content, particularly in generating precise block vectors for intra and inter block predictions, leading to inefficiencies in compression and decoding processes.

Method used

A method and device for video encoding and decoding that generates multiple block vector candidates by tracking block vectors within a current frame, improving accuracy through a process of determining optimal block vectors among candidates, and signaling these vectors with a minimum number of bits.

Benefits of technology

Enhances the accuracy of block vector searches and reduces the amount of information needed for signaling, thereby improving prediction performance and reducing the amount of prediction-related information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure KR2025000020_10072025_PF_FP_ABST
    Figure KR2025000020_10072025_PF_FP_ABST
Patent Text Reader

Abstract

A video decoding method of the present disclosure comprises: setting an initial block vector of the current block by using at least one block vector derived with respect to a neighboring block processed before the current block; if a first reference block indicated by the initial block vector in the current picture has been encoded in an IBC mode or an IntraTMP mode, determining a block vector candidate by using a block vector of the first reference block and the initial block vector; determining a block vector candidate list including the block vector candidate; and obtaining a prediction value of the current block by using a block vector selected from block vector candidates included in the block vector candidate list.
Need to check novelty before this filing date? Find Prior Art

Description

Video decoding method and device, and video encoding method and device

[0001] The present disclosure relates to the field of video encoding and decoding. More specifically, the present disclosure relates to a method for performing prediction using a block vector indicating the location of a reference block in a current frame.

[0002] With the development and widespread adoption of hardware capable of playing and storing high-resolution or high-definition video content, the need for codecs that effectively encode or decode this content is increasing. Recently, methods for effectively compressing such high-definition or high-definition video content have been implemented. Representative examples of codecs include High Efficiency Video Coding (HEVC) and Versatile Video Coding (VVC).

[0003] In HEVC, a picture is divided into one or more tiles / slices, which are then divided into multiple CTUs (Coding Tree Units). VVC can first divide a picture into multiple sub-pictures. A sub-picture is defined as a group of rectangular slices and was added to VVC to support the function of partially independently encoding / decoding and transmitting a picture. A sub-picture can be divided into tiles / slices, similar to HEVC. VVC also adds a new picture division structure called brick. Bricks are created by horizontally dividing tiles and are the basic unit of parallel processing. In order to process higher resolution images than HEVC, VVC uses a CTU (Coding Tree Unit) with a maximum size of 256x256, which is 16 times larger than HEVC, as the basic unit of encoding / decoding.

[0004] In intra-block prediction, to remove redundancy within the screen, a prediction block is generated using reconstructed pixels adjacent to the current coding block, and a difference value is generated from the current coding block. Unlike intra-block prediction, inter-block prediction generates a prediction block by searching for the block most similar to the current coding block in the previous or subsequent frame. Similar to inter-block prediction, a technique that searches for and uses the most similar block in the current frame for intra-block prediction is currently being used in standard codecs.

[0005] When generating a block vector through a search within the current frame, a candidate-based block vector search method and device are disclosed to find a more precise block vector, generate a prediction block most similar to the current frame, and obtain coding efficiency by minimizing block vector information.

[0006] Embodiments of the present disclosure disclose a video decoding / encoding method and device that generates a plurality of block vector candidates through a process of tracking a block vector pointing to another reference block referenced by a reference block pointed to by a block vector of a current block within a current frame, and improves the accuracy of a block vector by generating an optimal block vector among the plurality of block vector candidates.

[0007] In addition, embodiments of the present disclosure disclose a video decoding / encoding method and device that performs intra prediction using a plurality of block vector candidates obtained through a tracking process of a block vector of a current frame.

[0008] As an example, a video decoding method according to an embodiment of the present disclosure includes the steps of: setting an initial block vector of a current block using at least one block vector derived for a neighboring block processed before the current block; determining a first reference block pointed to by the initial block vector within a current picture; determining whether the first reference block is encoded in an Intra Block Copy (IBC) mode or an Intra Template Matching Prediction (IntraTMP) mode; determining a block vector candidate using the block vector of the first reference block and the initial block vector when the first reference block is encoded in the IBC mode or the IntraTMP mode; determining a block vector candidate list including the block vector candidate; and obtaining a prediction value of the current block using a block vector selected from among block vector candidates included in the block vector candidate list.

[0009] In one embodiment, the initial block vector of the current block may be set using one of: a first block vector candidate having an index of 0 among at least one block vector candidate derived for a neighboring block having an IBC mode or an IntraTMP mode; a first block vector candidate having an index of 0 among rearranged block vector candidates obtained by cost-based rearrangement of at least one block vector candidate derived for the neighboring block; a block vector candidate generated by a weighted sum of a plurality of block vector candidates derived for the neighboring block; and a block vector candidate generated by a weighted sum of a plurality of rearranged block vector candidates obtained by cost-based rearrangement of at least one block vector candidate derived for the neighboring block.

[0010] In one embodiment, the initial block vector of the current block may be determined as a reordering vector candidate indicated by the block vector selection information among reordering block vector candidates derived from at least one block vector candidate derived for a surrounding block having an IBC mode or an IntraTMP mode based on block vector selection information included in a bitstream, based on cost.

[0011] In one embodiment, the step of determining whether the first reference block is encoded in the IBC mode or the IntraTMP mode may include determining that the first reference block is encoded in the IBC mode or the IntraTMP mode if at least one of reference pixels at predetermined locations including the center, upper left corner, upper right corner, lower left corner, and lower right corner locations within the first reference block is encoded in the IBC mode or the IntraTMP mode.

[0012] In one embodiment, the block vector of the first reference block may be determined as a block vector pointing to a second reference block within the current picture referenced by a previous block containing a reference pixel encoded in the IBC mode or IntraTMP mode.

[0013] In one embodiment, the method may further include: determining a block vector pointing to an (N+2)-th reference block referenced by a reference pixel in an (N+1)-th reference block (N is a natural number) when at least one of the reference pixels at a predetermined position in the (N+1)-th reference block is encoded in the IBC mode or the IntraTMP mode; determining whether to add a block vector candidate generated using the block vector pointing to the (N+2)-th reference block to the block vector candidate list; and adding a block vector candidate generated using the block vector pointing to the (N+2)-th reference block to the block vector candidate list when it is determined as a result of the determination that the block vector candidate generated using the block vector pointing to the (N+2)-th reference block is to be added to the block vector candidate list.

[0014] In one embodiment, the step of determining whether to add a block vector candidate generated using a block vector pointing to the (N+2)th reference block to the block vector candidate list may include determining that, if the number of block vector candidates included in the block vector candidate list is less than a predetermined number, a block vector candidate generated using a block vector pointing to the (N+2)th reference block is to be added to the block vector candidate list.

[0015] In one embodiment, the step of determining whether to add a block vector candidate generated using a block vector pointing to the (N+2)th reference block to the block vector candidate list may include determining not to add a block vector candidate generated using a block vector pointing to the (N+2)th reference block to the block vector candidate list if the number of block vector candidates included in the block vector candidate list has already reached the predetermined number, or if the reference area referenced by the current block pointed to by the block vector candidate generated using the block vector pointing to the (N+2)th reference block goes beyond one of a search area of ​​an IBC mode or an IntraTMP mode or a Coding Tree Unit (CTU), a slice, a tile, or a frame boundary.

[0016] In one embodiment, the step of determining a block vector candidate using the block vector of the first reference block and the initial block vector may include repeatedly performing a process of determining a block vector pointing to an (M+2)-th reference block referenced by a reference pixel in the (M+1)-th reference block when at least one of reference pixels at a predetermined position in an M-th (M is an integer greater than or equal to 2) reference block after the first reference block is encoded in the IBC mode or the IntraTMP mode, thereby determining a final K-th (K is an integer greater than or equal to 2)-th reference block that satisfies a predetermined termination condition, and determining a block vector of a (K-1)-th reference block pointing to the final K-th reference block as a final block vector candidate, and adding only the final block vector candidate to the block vector candidate list.

[0017] In one embodiment, if there is no reference pixel encoded in the IBC mode or IntraTMP mode among the reference pixels at a predetermined position within the Kth reference block, or if the number of block vector candidates included in the block vector candidate list has already reached the predetermined number, or if the reference area referenced by the current block pointed to by the block vector candidate generated using the block vector pointing to the (K+1)th reference block referenced by the Kth reference block goes beyond the search area of ​​the IBC mode or IntraTMP mode or one of the CTU, slice, tile, or frame boundary, the final Kth reference block satisfying the predetermined termination condition may be determined.

[0018] In one embodiment, the step of obtaining a prediction value of the current block using one block vector selected from among block vector candidates included in the block vector candidate list may further include the steps of cost-based reordering of the block vector candidates included in the block vector candidate list, obtaining index information indicating one of the cost-based reordered block vector candidates from a bitstream, and determining a block vector of the current block based on the index information.

[0019] In one embodiment, the step of determining a block vector candidate using the block vector of the first reference block and the initial block vector may determine the block vector candidate by adding the initial block vector and the block vector of the first reference block.

[0020] A video encoding method according to one embodiment of the present disclosure comprises the steps of: setting an initial block vector of a current block using at least one block vector derived for a neighboring block processed before a current block; determining a first reference block pointed to by the initial block vector within a current picture; determining whether the first reference block is encoded in an Intra Block Copy (IBC) mode or an Intra Template Matching Prediction (IntraTMP) mode; determining a block vector candidate using the block vector of the first reference block and the initial block vector when the first reference block is encoded in the IBC mode or the IntraTMP mode; determining a block vector candidate list including the block vector candidate; obtaining a prediction value of the current block using one block vector selected from among block vector candidates included in the block vector candidate list and determining a final block vector candidate from among the block vector candidates based on a cost; and adding index information pointing to the final block vector candidate to a bitstream.

[0021] In one embodiment of the present disclosure, a video decoding device performing a video decoding method and a video encoding device performing a video encoding method are disclosed.

[0022] In one embodiment of the present disclosure, a computer-readable recording medium having recorded thereon a program for executing a video decoding method or a video encoding method on a computer is disclosed.

[0023] According to embodiments of the present disclosure, when generating a block vector through a search within a current frame, the accuracy of the block vector search can be increased and block vector information signaling information can be generated by utilizing a minimum number of bits.

[0024] According to embodiments of the present disclosure, when generating a block vector for a block encoded in IBC (Intra Block Copy) or IntraTMP (Intra Template Matching Prediction) mode, the accuracy of block vector search can be increased and block vector information can be efficiently signaled by utilizing a minimum number of bits.

[0025] In addition, according to embodiments of the present disclosure, prediction performance can be improved and the amount of information related to prediction can be reduced by performing prediction using a more accurate block vector.

[0026] Figure 1 is a block diagram illustrating the configuration and operation of a video encoder for encoding an image.

[0027] Figure 2 is a drawing for explaining an embodiment of a method for dividing blocks of an image.

[0028] Figures 3 and 4 are drawings for explaining embodiments of an intra prediction method.

[0029] Figure 5 is a block diagram illustrating the configuration and operation of a video decoder for decoding an image.

[0030] FIG. 6 is a diagram for explaining an embodiment of an intra prediction method in IBC (Intra Block Copy) mode.

[0031] FIG. 7 is a diagram for explaining an embodiment of an intra prediction method in IntraTMP (Intra Template Matching Prediction) mode.

[0032] FIG. 8 is a flowchart illustrating a video decoding method according to one embodiment of the present disclosure.

[0033] FIG. 9 is a diagram illustrating a block vector generation method according to one embodiment of the present disclosure.

[0034] FIG. 10 illustrates reference pixel locations within a reference block used in generating a block vector according to one embodiment of the present disclosure.

[0035] FIG. 11 illustrates an example of previous blocks including reference pixels within a reference block used in generating a block vector according to one embodiment of the present disclosure.

[0036] FIG. 12 illustrates a process of updating a block vector using a block vector of a reference block according to one embodiment of the present disclosure.

[0037] FIG. 13 is a flowchart illustrating a video decoding method according to another embodiment of the present disclosure.

[0038] FIG. 14 is a flowchart illustrating a video encoding method according to one embodiment of the present disclosure.

[0039] Hereinafter, a video encoding and decoding method and device according to an embodiment of the present invention will be described in detail with reference to the attached drawings.

[0040] In the following description of the present invention, detailed descriptions of related known functions or configurations will be omitted if they are deemed to unnecessarily obscure the gist of the invention. Furthermore, the terms described below are defined in light of their functions within the present invention and may vary depending on the intent or custom of the user or operator. Therefore, their definitions should be based on the overall content of the present invention.

[0041] In addition, in order to efficiently explain the technical components that make up the present invention, the preferred embodiments of the present invention implemented below omit, as much as possible, the system functional components that are already provided in each system functional configuration or are commonly provided in the technical field to which the present invention belongs, and focus on explaining the functional components that must be additionally provided for the present invention.

[0042] Anyone having ordinary skill in the art to which the present invention pertains will be able to easily understand the functions of components that have been conventionally used among the functional configurations that are not illustrated below, and will also be able to clearly understand the relationship between the components omitted as described above and the components added for the present invention.

[0043] In this specification, a device that encodes an image to generate a video signal bitstream is referred to as an encoding device, an encoding device, or an encoder, and a device that decodes the video signal bitstream to restore an image is referred to as a decoding device, a decoding device, or a decoder.

[0044] A pixel or pel is the smallest unit that constitutes an image, and the terms pixel and sample can be used interchangeably. A sample can generally represent a pixel or a pixel value, or it can represent only a pixel or pixel value of the luminance component, or only a pixel or pixel value of the chroma component.

[0045] In addition, the unit is used to refer to a basic unit of image processing or a specific location of a picture, and represents an image area including at least one of a luminance component and a chrominance component. Specifically, the unit can be used as a concept including a coding tree unit (CTU), a coding unit (CU), a prediction unit (PU), and a transform unit (TU). In addition, a block represents an image area including a specific component among luminance components and chrominance components, and an MxN block can represent a set of samples or transform coefficients consisting of M columns and N rows. Here, the terms unit, block, partition, signal, and area may be used interchangeably.

[0046] Meanwhile, a picture refers to a field or a frame, and these can be used interchangeably. For example, if the image is an interlaced image, one frame is divided into an odd (or odd, top) field and an even (or even, bottom) field, and each field is composed of a single picture unit, which can be encoded or decoded. If the image is a progressive image, one frame can be composed as a picture, which can be encoded or decoded.

[0047] FIG. 1 is a block diagram illustrating an encoding device according to an embodiment of the present invention, and is intended to explain the configuration and operation of a video encoder for encoding an image.

[0048] Referring to FIG. 1, a video encoder (100) may be configured to include a transformation unit (110), a quantization unit (120), an inverse quantization unit (130), an inverse transformation unit (140), a filtering unit (150), a prediction unit (160), a DPB (Decoded Picture Buffer, 170), and an entropy coding unit (180).

[0049] 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 (160), to obtain a conversion coefficient value.

[0050] For example, the Discrete Cosine Transform (DCT), the Discrete Sine Transform (DST), or the Wavelet Transform can be used.

[0051] The transform kernel used for transforming the residual block may be a transform kernel having separable vertical and horizontal transform properties. In this case, the transform for the residual block may be performed separately as vertical and horizontal transforms. For example, the encoder may perform a vertical transform by applying the transform kernel in the vertical direction of the residual block. Alternatively, the encoder may perform a horizontal transform by applying the transform kernel in the horizontal direction of the residual block.

[0052] Meanwhile, the transform kernel may be used as a term referring to a set of parameters used for transforming the residual signal, such as a transform matrix, a transform array, a transform function, or a transform, and may be any one of a plurality of available kernels, and transform kernels based on different transform types may be used for each of the vertical transform and the horizontal transform.

[0053] The transformation coefficients may be distributed such that higher coefficients are distributed toward the upper left corner of the block, and coefficients closer to '0' are distributed toward the lower right corner of the block. Furthermore, as the current block size increases, there is a possibility that many '0' coefficients exist in the lower right area. To reduce the transformation complexity of large blocks, only the upper left area can be left, and the remaining areas can be reset to '0'.

[0054] Additionally, error signals may exist only in some regions of a coding block, in which case the conversion process may be performed only on some arbitrary regions. For example, in a block of size 2Nx2N, error signals may exist only in the first 2NxN block, in which case the conversion process may be performed only on the first 2NxN block, but the conversion process may not be performed on the second 2NxN block and may not be encoded or decoded.

[0055] The encoder may perform additional transformations before the transform coefficients are quantized. The transformation method described above may be referred to as a primary transform, and the additional transformation may be referred to as a secondary transform.

[0056] The secondary transform can be optional for each residual block. For example, the encoder can improve coding efficiency by performing the secondary transform in areas where it is difficult to focus energy in the low-frequency region using the primary transform alone.

[0057] Specifically, a secondary transformation may be additionally performed on blocks in which residual values ​​appear significantly in directions other than the horizontal or vertical direction of the residual block, and the secondary transformation may not be performed separately into vertical transformation and horizontal transformation, unlike the primary transformation. Such a secondary transformation may be referred to as a low frequency non-separable transform (LFNST).

[0058] The quantization unit (120) quantizes the transformation coefficient value output from the transformation unit (110).

[0059] In order to increase coding efficiency, a method is used in which, instead of coding the picture signal as is, a picture is predicted using an already coded area through a prediction unit (160), and a restored picture is obtained by adding a residual value between the original picture and the predicted picture to the predicted picture.

[0060] To avoid mismatches between the encoder and decoder, when performing prediction in the encoder, information available in the decoder must also be used, and for this purpose, the encoder can perform a process of reconstructing the current block that it has encoded.

[0061] The inverse quantization unit (130) inversely quantizes the transform coefficient values, and the inverse transformation unit (140) restores the residual values ​​using the inverse quantized transform coefficient values.

[0062] The filtering unit (150) performs filtering operations using a deblocking filter, a sample adaptive offset (SAO), an adaptive loop filter (ALF), etc. to improve the quality of the restored picture and enhance encoding efficiency.

[0063] A deblocking filter is a filter for removing distortion within a block generated at the boundary between blocks in a restored picture. The encoder can determine whether to apply a deblocking filter to a boundary based on the distribution of pixels included in several columns or rows based on an arbitrary boundary within a block.

[0064] When a deblocking filter is applied, the filtering unit (150) can apply a long filter, a strong filter, or a weak filter depending on the deblocking filtering strength, and can process horizontal filtering and vertical filtering in parallel.

[0065] Sample Adaptive Offset (SAO) can be used to correct the offset from the original image on a pixel-by-pixel basis for a residual block to which a deblocking filter is applied. In order to correct the offset for a specific picture, the filtering unit (150) can use a method (Band Offset) that divides the pixels included in the image into a certain number of regions, determines the regions to perform offset correction, and applies the offset to the regions. In addition, the filtering unit (150) can use a method (Edge Offset) that applies the offset by considering the edge information of each pixel.

[0066] Adaptive Loop Filtering (ALF) is a method that divides pixels in an image into predetermined groups, determines a filter to be applied to each group, and performs differential filtering for each group. Information regarding whether to apply an adaptive loop filter can be signaled on a coding unit basis, and the shape and filter coefficients of the ALF filter to be applied can vary depending on the block. Furthermore, the same adaptive loop filter can be applied regardless of the characteristics of the target block.

[0067] The filtered picture can be stored in DPB (170) to be used as a reference picture.

[0068] The prediction unit (160) includes an intra / IBC prediction unit (161) and an inter prediction unit (165). The intra / IBC prediction unit (161) performs intra prediction, IntraTMP prediction, and IBC prediction within the current picture, and the inter prediction unit (165) performs inter prediction to predict the current picture using a reference picture stored in the DPB (170).

[0069] The intra / IBC prediction unit (161) performs intra prediction from restored areas within the current picture and transmits intra encoding information to the entropy coding unit (180). Here, 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 about a reference sample.

[0070] In addition, the intra / IBC prediction unit (161) can perform IBC (Intra BLock Copy) prediction from restored samples within the current picture and transfer the IBC encoding information to the entropy coding unit (180). In this case, the intra / IBC prediction unit (161) can obtain a block vector value indicating a reference region used for prediction of the current region by referring to a specific region within the current picture, and can perform IBC prediction using the obtained block vector value.

[0071] In addition, the intra / IBC prediction unit (161) can perform IntraTMP prediction, which generates prediction information by searching for a reference block on its own through a template matching process from restored samples within the current picture. In IntraTMP mode, the use of a reference block within the same frame as the IBC mode as prediction information for the target block is the same as the IBC mode, but the block vector (BV), which is motion information for the target block, is not transmitted to the decoding device, and the decoding device can search for the reference block through the same template matching process as the encoding side to generate prediction information.

[0072] The intra / IBC prediction unit (161) can transmit IBC encoding information including at least one of the size information of the reference area and block vector information (index information for block vector prediction of the current block within the motion candidate list, block vector difference information) to the entropy coding unit (160).

[0073] The inter prediction unit (165) refers to a specific area of ​​the restored reference picture to find the part most similar to the current area, obtains a motion vector value which is the distance between the areas, and transmits motion information (reference direction indication information (L0 prediction, L1 prediction, bidirectional prediction), reference picture index, motion vector information, etc.) for the obtained reference area to the entropy coding unit (180).

[0074] Additionally, the inter prediction unit (165) performs motion compensation using motion information to generate a prediction block for the current block, and transmits inter encoding information including motion information for the reference area to the entropy coding unit (180).

[0075] Meanwhile, the quantized transform coefficients in the form of a two-dimensional array can be rearranged into a one-dimensional array for entropy coding.

[0076] The method of scanning the quantized transform coefficients can be determined according to the size of the transform block and the intra prediction mode, and diagonal, vertical, and horizontal scans can be applied, and the scan information can be signaled on a block-by-block basis or derived from the decoder according to a set rule.

[0077] The entropy coding unit (180) generates a bitstream by entropy coding information representing quantized transform coefficients, intra-coding information, and inter-coding information, and for this purpose, a variable length coding (VLC) method and an arithmetic coding method can be used.

[0078] Variable-length coding (VLC) converts input symbols into a series of codewords, each of which can be of variable length. For example, frequently occurring symbols can be represented by shorter codewords, while less frequently occurring symbols can be represented by longer codewords.

[0079] As a variable length coding method, a context-based adaptive variable length coding (CAVLC) method can be used.

[0080] Arithmetic coding converts consecutive data symbols into a single prime number using the probability distribution of each data symbol, thereby obtaining the optimal prime number bits required to express each symbol.

[0081] As an arithmetic coding method, the context-based adaptive binary arithmetic code (CABAC) method can be used.

[0082] CABAC is a binary arithmetic encoding method that utilizes multiple context models generated based on experimentally derived probabilities. The context models can also be referred to as context models. First, if the symbols are not in binary form, the encoder binarizes each symbol using methods such as exp-Golomb. The binarized 0s and 1s can be represented as bins.

[0083] The CABAC initialization process is divided into context initialization and arithmetic coding initialization. Context initialization initializes the occurrence probability of each symbol, determined by the symbol type, quantization parameter (QP), and slice type (I, P, B). A context model with this initialization information can use probability-based values ​​obtained through experiments.

[0084] The context model provides the probability of occurrence of the Least Probable Symbol (LPS) or Most Probable Symbol (MPS) for the symbol currently being coded, and information (valMPS) on which empty value between 0 and 1 corresponds to the MPS.

[0085] One of several context models is selected through a context index (ctxIdx), and the context index can be derived through information of the block currently to be encoded or information of surrounding blocks.

[0086] Initialization for binary arithmetic coding is performed based on the probability model selected from the context model. Binary arithmetic coding is performed by dividing the data into probability intervals based on the occurrence probabilities of 0 and 1, and then encoding the probability interval corresponding to the bin to be processed becomes the entire probability interval for the next bin to be processed.

[0087] The location information within the probability interval processed for the last bin is output. However, since the probability interval cannot be infinitely divided, if it shrinks to a certain size, a renormalization process is performed to expand the probability interval and output the corresponding location information. Furthermore, after each bin is processed, a probability update process can be performed, which sets a new probability for the next bin to be processed based on the information from the processed bin.

[0088] As described above, the generated bitstream is encapsulated into NAL (Network Abstraction Layer) units as basic units.

[0089] NAL units are divided into VCL (Video Coding Layer) 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 may exist.

[0090] A NAL unit consists of NAL header information and data, a Raw Byte Sequence Payload (RBSP). The NAL header information includes summary information about the RBSP. The RBSP of a VCL NAL unit contains an integer number of encoded coding tree units.

[0091] In order to decode a bitstream in a decoder, the bitstream must first be divided into NAL units, and then each divided NAL unit must be decoded. Meanwhile, the information required for decoding the bitstream can be transmitted as part of a picture parameter set (PPS), a sequence parameter set (SPS), a video parameter set (VPS), etc.

[0092] Meanwhile, the configuration and operation of the encoder described with reference to FIG. 1 are according to one embodiment of the present invention, and some configurations may be omitted or added as needed.

[0093] Additionally, a single picture may be encoded by dividing it into sub-pictures, slices, tiles, etc. A sub-picture may include one or more slices or tiles. When a single picture is encoded by dividing it into multiple slices or tiles, all slices or tiles within the picture must be decoded before it can be displayed on the screen.

[0094] When a single picture is encoded into multiple subpictures, only any subpicture can be decoded and displayed on the screen. A slice can contain multiple tiles or subpictures, and a tile can contain multiple subpictures or slices.

[0095] Subpictures, slices, and tiles can be encoded or decoded independently of each other, which is effective for parallel processing and processing speed improvement, but the amount of bits may increase because the encoded information of adjacent subpictures, slices, and tiles cannot be used.

[0096] And subpictures, slices, and tiles can be encoded by being divided into multiple coding tree units (CTUs).

[0097] A coding tree unit can be composed of a luminance coding tree block (CTB) of size 128x128 and two chrominance coding tree blocks of size 64x64.

[0098] A single coding tree unit may be undivided and constitute a single coding unit (CU) itself, or may be divided into multiple coding units as illustrated in Fig. 2. A coding unit may be composed of a luminance coding block (CB) and two chrominance coding blocks.

[0099] A coding unit may consist of one transform unit (TU), or may be split into multiple transform units. A transform unit may consist of a luminance transform block (TB) and two chrominance transform blocks.

[0100] Here, a coding unit represents a basic unit for processing a picture in the process of prediction, transformation, quantization, entropy coding, and decoding, and the size and shape of a coding unit within a picture may not be constant.

[0101] A coding unit may have a square or non-square shape, and a rectangular coding unit may include a vertical coding unit whose height is greater than its width and a horizontal coding unit whose width is greater than its height.

[0102] The coding tree unit is first partitioned into a Quad Tree (QT) structure, such that a single node of size 2NX2N can be partitioned into four nodes of size NXN. Furthermore, the Quad Tree partitioning can be performed recursively, and not all nodes need to be partitioned to the same depth.

[0103] Leaf nodes of a quadtree can be further partitioned into a multi-type tree (MTT) structure. For example, in a multi-type tree structure, a single node can be partitioned into a binary or ternary tree structure with horizontal or vertical partitioning. Accordingly, a multi-type tree structure can have four partitioning structures: vertical binary partitioning, horizontal binary partitioning, vertical ternary partitioning, and horizontal ternary partitioning.

[0104] In each tree structure, both the width and height of a node can have a power of 2. For example, in a binary tree (BT) structure, a node of size 2NX2N can be split into two NX2N nodes by vertical binary splitting, and into two 2NXN nodes by horizontal binary splitting.

[0105] Also, in the Ternary Tree (TT) structure, a node of size 2NX2N can be split into nodes of size (N / 2)X2N, NX2N, and (N / 2)X2N by vertical ternary splitting, and into nodes of size 2NX(N / 2), 2NXN, and 2NX(N / 2) by horizontal ternary splitting. This multi-type tree splitting can be performed recursively.

[0106] A leaf node of a multi-type tree can be a coding unit. If the coding unit is no larger than the maximum transformation length, the coding unit can be used as a unit for prediction and transformation without further splitting. On the other hand, if the width or height of the coding unit is larger than the maximum transformation length, the coding unit can be split into multiple transformation units without explicit signaling regarding the splitting.

[0107] The tree partitioning structure as described above may have the same shape (Single Tree) for the luminance block and the chrominance block, or different shapes (Dual Tree) for the luminance block and the chrominance block.

[0108] Meanwhile, the block division from the coding tree unit (CTU) to the coding unit (CU) as described above can be performed through a rate-distortion optimization (RDO) process, whereby the division structure with the smallest rate-distortion cost (RD cost) value within the allowable size and depth conditions is selected to determine the final coding unit.

[0109] Hereinafter, embodiments of the intra prediction method will be described in more detail with reference to FIGS. 3 and 4.

[0110] For intra prediction, intra prediction mode information indicating an intra prediction direction may be signaled, and the intra prediction mode information indicates any one of a plurality of intra prediction modes constituting an intra prediction mode set.

[0111] As illustrated in FIG. 3, the intra prediction mode set may include a planar mode, a DC mode, and 65 directional modes, and each intra prediction mode may be indicated through an intra prediction mode index.

[0112] For example, intra prediction mode index "0" indicates planar mode, intra prediction mode index "1" indicates DC mode, and intra prediction mode indexes "2" to "66" can indicate different directional modes, respectively.

[0113] The directional modes each indicate different angles within a preset angular range, for example, a directional mode can indicate an angle within an angular range from 45 degrees to -135 degrees clockwise.

[0114] In this case, the intra prediction mode index "2" may indicate the Horizontal Diagonal (HDIA) mode, the intra prediction mode index "18" may indicate the Horizontal (HOR) mode, the intra prediction mode index "34" may indicate the Diagonal (DIA) mode, the intra prediction mode index "50" may indicate the Vertical (VER) mode, and the intra prediction mode index "66" may indicate the Vertical Diagonal (VDIA) mode.

[0115] If the current block is a non-square block, 20 additional wide angular modes can be used, indicating angles greater than 45 degrees clockwise or less than -135 degrees.

[0116] Based on the intra prediction mode information as described above, reference samples to be used for intra prediction for the current block are determined.

[0117] For example, if the intra prediction mode index indicates a specific directional mode, the reference sample corresponding to that angle from the current sample of the current block is used for prediction for the current sample.

[0118] As described above, for intra prediction, surrounding already restored samples are used as reference samples, and the reference samples may be restored samples located to the left or above the current block.

[0119] Referring to FIG. 4, the reference samples may be samples adjacent to the left boundary and upper boundary of the current block.

[0120] For example, if the size of the current block is NxN and samples of a single reference line adjacent to the current block are used for intra prediction, reference samples can be set using (2N*2+1) surrounding samples located on the left (L, Left), top (T, Top), and top-left (TL, Top-left) of the current block.

[0121] Meanwhile, samples of multiple reference lines (MRL) may be used for intra prediction of the current block, and the multiple reference lines may be composed of n reference lines located within a preset range from the current block. In this case, separate reference line index information indicating the reference lines to be set as reference pixels may be signaled.

[0122] Additionally, if at least some of the samples to be used as reference samples have not yet been restored, reference samples can be obtained through a reference sample padding process, and a reference sample filtering process can be performed to reduce errors in intra prediction.

[0123] FIG. 5 is a block diagram illustrating a decoding device according to an embodiment of the present invention, and is intended to explain the configuration and operation of a video decoder for decoding an image.

[0124] Referring to FIG. 5, a video decoder (200) may be configured to include an entropy decoding unit (210), an inverse quantization unit (220), an inverse transformation unit (230), a filtering unit (240), a prediction unit (260), and a DPB (Decoded Picture Buffer, 270).

[0125] The entropy decoding unit (210) entropy decodes the bitstream to extract transform coefficient information, intra-coding information, inter-coding information, etc. for each region.

[0126] For example, the entropy decoding unit (210) can obtain a binary code for transform coefficient information of a specific area from a bitstream, and can obtain a quantized transform coefficient by de-binarizing the binary code.

[0127] The inverse quantization unit (220) inversely quantizes the quantized transform coefficients, and the inverse transform unit (230) restores the residual value using the inverse quantized transform coefficients. The inverse transform unit (230) can obtain the residual value by additionally performing a second inverse transform after performing a first inverse transform on a transform block including the inverse quantized transform coefficients.

[0128] Meanwhile, the residual value obtained from the inverse transformation unit (230) is combined with the predicted value obtained from the prediction unit (260) to restore the original pixel value.

[0129] The filtering unit (240) performs a filtering operation using a deblocking filter, a sample adaptive offset, an adaptive loop filter, etc. to improve the image quality of the restored picture, and the filtered picture can be output or stored in the DPB (270) to be used as a reference picture for the next picture.

[0130] The prediction unit (260) includes an intra / IBC prediction unit (261) and an inter prediction unit (265), and generates a prediction picture by utilizing the encoding type decoded through the entropy decoding unit (210), the transform coefficient for each region, and the intra / inter encoding information.

[0131] To restore the current block in which decoding is performed, the decoded region of the current picture or other pictures containing the current block can be used. A picture (or tile / slice) that performs intra prediction or intra BC prediction using only the current picture for restoration is called an intra picture or I picture (or tile / slice), and a picture (or tile / slice) that can perform all of intra prediction, inter prediction, and intra BC prediction is called an inter picture (or tile / slice).

[0132] Meanwhile, 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).

[0133] That is, a P picture (or tile / slice) uses at most one motion information set to predict each block, and a B picture (or tile / slice) uses at most two motion information sets to predict each block. Here, a motion information set may include one or more motion vectors and one reference picture index.

[0134] The intra / IBC prediction unit (261) generates a prediction block using intra encoding information and restored samples within the current picture, and the intra encoding information may include at least one of an intra prediction mode, an MPM (Most Probable Mode) flag, and an MPM index.

[0135] The intra / IBC prediction unit (261) can predict sample values ​​of the current block using restored samples located on the left and / or upper side of the current block as reference samples.

[0136] 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, and may be samples located on a line within a preset distance from the left boundary of the current block among samples of neighboring blocks 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 neighboring blocks of the current block may include at least one of a left (L) block, an upper (A) block, a below left (BL) block, an above right (AR) block, or an above left (AL) block adjacent to the current block.

[0137] Additionally, the intra / IBC prediction unit (261) can restore the current region by referring to a specific region including restored samples within the current picture. To this end, the intra / IBC prediction unit (261) can perform IBC prediction using IBC encoding information obtained from the entropy decoding unit (210), and the IBC encoding information can include block vector information.

[0138] Additionally, the intra / IBC prediction unit (261) can perform IntraTMP prediction, which generates prediction information by searching for a reference block on its own through a template matching process from restored samples within the current picture.

[0139] The inter prediction unit (265) generates a prediction block using the reference picture and inter encoding information stored in the DPB (270), and the inter encoding information may include a set of motion information (reference picture index, motion vector information, etc.) of the current block for the reference block.

[0140] Meanwhile, inter prediction can include L0 prediction, L1 prediction, and bidirectional prediction (Bi-prediction).

[0141] L0 prediction refers to prediction using a single reference picture included in the L0 picture list, and L1 prediction refers to prediction using a single reference picture included in the L1 picture list. For this, a set of motion information (e.g., motion vector and reference picture index) may be required.

[0142] Bidirectional prediction can utilize up to two reference regions, which may reside in the same reference picture or in different pictures. Accordingly, among the two sets of motion information used in bidirectional prediction, two motion vectors may correspond to the same reference picture index or to different reference picture indices.

[0143] At this time, the reference pictures are pictures that are located temporally before or after the current picture, and may be completed pictures that have already been restored, and the two reference areas used in the bidirectional prediction method may be areas selected from the L0 picture list and the L1 picture list, respectively.

[0144] The inter prediction unit (265) can obtain a reference block of the current block using a motion vector and a reference picture index, and the reference block exists in a reference picture corresponding to the reference picture index.

[0145] Additionally, the sample values ​​of a block specified by a motion vector or their interpolated values ​​can be used as a predictor of the current block. For motion prediction with subpel-level pixel accuracy, an 8-tap interpolation filter can be used for the luminance signal, and a 4-tap interpolation filter can be used for the chrominance signal.

[0146] Meanwhile, the configuration and operation of the decoder described with reference to FIG. 5 are according to one embodiment of the present invention, and some configurations may be omitted or added as needed, and the decoder may decode an image by performing the reverse process of the encoding method of the encoder described above.

[0147] FIG. 6 illustrates an embodiment of an intra prediction method in IBC (Intra Block Copy) mode.

[0148] Referring to Figure 6, in the IBC mode, prediction information of the current block, which is the encoding target block, is obtained from a reference block that has already been decoded and is located within the same frame.

[0149] At this time, the vector information from the current block, which is the encoding target block, to the reference block is referred to as a block vector (BV).

[0150] Although the IBC prediction method described above is an intra-frame prediction method, it is similar to an inter-frame prediction method in that it derives and transmits motion information of the current block to be encoded.

[0151] The IBC prediction method can be divided into ibc_skip / merge mode and ibc_amvp mode, and ibc_skip / merge and ibc_amvp can use skip, merge, AMVP (Advanced Motion Vector Prediction) and similar encoding, information transmission and decoding methods in inter-frame prediction.

[0152] In ibc_skip / merge mode, the block vector (BV) value of the current block can be derived using the merge_idx information. In ibc_amvp mode, the block vector (BV) value of the corresponding block can be derived using the mvd, mvp, and amvr values.

[0153] FIG. 7 is a diagram illustrating an embodiment of an intra prediction method in IntraTMP (Intra Template Matching Prediction) mode.

[0154] As described above, in IBC mode, a block vector (BV), which is motion information for a target block, is derived and transmitted to the decoding device to use a reference block within the same frame as prediction information for the current block.

[0155] Meanwhile, in IntraTMP mode, the use of a reference block within the same frame as the prediction information for the target block is the same as in IBC mode, but the block vector (BV), which is motion information for the target block, is not transmitted to the decoding device, and the decoding device can find the prediction information by searching for the reference block on its own through a template matching process.

[0156] Referring to FIG. 7, a template area is defined around a target block (IntraTMP block), and a template area (Best matching Template) that most closely matches the template area of ​​the target block in the reconstructed area of ​​blocks within the same frame is searched for, thereby obtaining a reference block (ref. block).

[0157] And, based on the position of the reference block (ref. block) obtained as described above, the block vector (intraTMP BV) value for (IntraTMP block) can be derived.

[0158] As described above, IntraTMP prediction is one of the intra-frame prediction modes, in which a block vector (BV) of a target block can be derived in a decoding device, and the block vector (BV) value can be used for intra prediction in the same manner as the block vector (BV) value of the IBC mode.

[0159] Meanwhile, the IntraTMP method as described above can also be used in the process of refining or compensating block vector (BV) values.

[0160] For example, for a block encoded in IBC mode, after finding the location of the initial reference block using the transmitted block vector (BV) value, an updated reference block can be obtained by more precisely correcting the block vector (BV) value through template matching in a certain area around the initial reference block.

[0161] Hereinafter, the prediction operation according to embodiments of the present disclosure will be described in detail. In particular, the following description focuses on the prediction operation within the current frame according to IBC mode or IntraTMP mode. However, this is not limited thereto, and the method for generating block vectors within a frame according to embodiments of the present disclosure can also be applied when searching for motion vectors during inter-frame prediction, i.e., inter-prediction.

[0162] In addition, the prediction operation within a frame according to the IBC mode or IntraTMP mode described below can be performed by the intra / IBC prediction unit (161) of the video encoder (100) illustrated in FIG. 1 or the intra / IBC prediction unit (261) of the video decoder (200) illustrated in FIG. 5.

[0163] FIG. 8 is a flowchart illustrating a video decoding method according to one embodiment of the present disclosure, and FIG. 9 is a diagram illustrating a block vector generation method according to one embodiment of the present disclosure.

[0164] Referring to FIG. 8, the intra / IBC prediction unit (261) sets an initial block vector of the current block using at least one block vector derived for a neighboring block processed before the current block (S810). For example, referring to FIG. 9, the intra / IBC prediction unit (261) sets an initial block vector (BV0) of the current block (910) using a block vector (NV) derived for a neighboring block (905) processed before the current block (910) and encoded in the IBC mode or the IntraTMP mode. The process of deriving the block vector (NV) for the neighboring block (905) can be derived according to the IBC mode or the IntraTMP mode of FIGS. 6 and 7 described above.

[0165] Syntax information indicating whether to use a method of generating an updated block vector from an initial block vector according to an embodiment of the present disclosure may be transmitted in units such as a sequence, GOP, Frame, Slice, Tile, CTU, CU, etc. Hereinafter, a block vector generated by updating an initial block vector according to the embodiments of the present disclosure using a block vector of at least one reference block may be referred to as AR-BVP (Auto relocated block vector prediction). When AR-BVP according to the embodiments of the present disclosure is not applied, a block vector derived according to the conventional IBC mode or IntraTMP mode may be used to predict the current block.

[0166] The intra / IBC prediction unit (261) obtains syntax information indicating whether AR-BVP included in the bitstream is applied, and if it is determined that AR-BVP is applied based on the syntax information, the unit can set an initial block vector of the current block using at least one block vector derived for a surrounding block processed before the current block.

[0167] The initial block vector can be set explicitly or implicitly.

[0168] For example, the intra / IBC prediction unit (261) can implicitly set an initial block vector by selecting one or more candidates for IBC merge / AMVP and Intra Template matching merge / AMVP already derived from neighboring blocks of the current block. Here, the neighboring blocks may be neighboring blocks adjacent to the current block and neighboring blocks that are not adjacent to the current block but have been processed before the current block. Information on whether to derive an initial block vector using one or more block vector candidates for IBC merge / AMVP and Intra Template matching merge / AMVP already derived from neighboring blocks may be transmitted in units such as sequence, GOP, Frame, Slice, Tile, CTU, and CU.

[0169] The intra / IBC prediction unit (261) may set an initial block vector using one of the following: a first block vector candidate having an index of 0 among at least one block vector candidate derived for a neighboring block having an IBC mode or an IntraTMP mode; a first block vector candidate having an index of 0 among the rearranged block vector candidates obtained by rearranging at least one block vector candidate derived for a neighboring block based on a cost; a block vector candidate generated by a weighted sum of multiple block vector candidates derived for a neighboring block; and a block vector candidate generated by a weighted sum of multiple rearranged block vector candidates obtained by rearranging at least one block vector candidate derived for a neighboring block based on a cost. Various methods such as SAD (Sum of Absolute Difference) and SSE (sum of square error, SSE) may be used as the cost-based function.

[0170] When the intra / IBC prediction unit (261) sorts block vector candidates based on cost, it can sort the block vector candidates in ascending order. That is, the block vector candidate with the lowest cost is sorted as the first block vector candidate with index 0, and as the cost increases, it can be sorted as the block vector candidate in a later order.

[0171] When generating an initial block vector as a weighted sum of multiple block vector candidates derived for surrounding blocks, or when generating an initial block vector as a weighted sum of multiple block vector candidates based on cost, the initial block vector may be implicitly set in one of the following ways.

[0172] - Any block vector candidate included in the block vector candidate group obtained by utilizing template matching for the block vector candidates of IBC merge / AMVP and Intra Template matching merge / AMVP of the surrounding blocks can be set as the initial block vector (in this case, the intra / IBC prediction unit (261) selects any block vector candidate included in the block vector candidate group, sets the selected block vector candidate as the initial block vector, and then updates the initial block vector as described below to add the generated block vector candidate to the block vector candidate list. If the number of block vector candidates included in the block vector candidate list is less than a predetermined number (for example, 30), the intra / IBC prediction unit (261) selects another block vector candidate included in the block vector candidate group, sets the selected other block vector candidate as the initial block vector again, and then updates the set initial block vector as described below to generate a block vector candidate and adds the generated block vector candidate to the block vector candidate list. Any block vector candidate included in the block vector candidate group can be selected explicitly or implicitly. For example: For example, random block vector candidates can be selected sequentially starting from index 0 (the first candidate).

[0173] - Among the block vector candidates obtained by utilizing the block vector candidates of IBC merge / AMVP, Intra Template matching merge / AMVP of the surrounding blocks or Template matching, the candidate of index 0 (first candidate) and the candidate of index 1 (second candidate) are combined based on a weight ratio of 1:1 or weight ratio information included in a pre-determined table, and then the value is set as the initial block vector (in this case, a table including ratio information can be signaled in the bitstream).

[0174] - Block vector candidates of IBC merge / AMVP and Intra Template matching merge / AMVP of surrounding blocks are obtained by utilizing template matching. The candidate of index 0 (first candidate) and the candidate of index 1 (second candidate) are weighted using the ratio of template matching costs, and then the value obtained by combining the weight ratio is set as the initial block vector.

[0175] - Select three or more block vector candidates from the block vector candidates of IBC merge / AMVP, Intra Template matching merge / AMVP of the surrounding blocks, or the block vector candidates obtained by utilizing Template matching, and set the value obtained by combining the weight ratio of the three or more selected block vectors as the initial block vector (in this case, the weight ratio is 1:1:1, or the weight ratio can be separately signaled in the bitstream, or the weight can be set by utilizing the ratio of the Template matching cost).

[0176] - From the block vector candidates of IBC merge / AMVP, Intra Template matching merge / AMVP of the surrounding blocks, or the block vector candidates reordered based on cost using Template matching, the candidate of index 0 (the first candidate) and the candidate of index 1 (the second candidate) are combined based on a weight ratio of 1:1 or weight ratio information included in a pre-determined table, and then the value is set as the initial block vector (in this case, a table including ratio information can be signaled in the bitstream. The table can include predetermined ratio information, and index information pointing to one of multiple ratio information can be signaled as ratio information).

[0177] - Block vector candidates of IBC merge / AMVP and Intra Template matching merge / AMVP of surrounding blocks are reordered based on cost using Template matching, and then the candidate of index 0 (first candidate) and the candidate of index 1 (second candidate) are weighted using the ratio of Template matching costs, and then the combined value with the weight ratio is set as the initial block vector.

[0178] - Select three or more block vector candidates from the block vector candidates of IBC merge / AMVP, Intra Template matching merge / AMVP of the surrounding blocks, or the block vector candidates reordered based on cost using Template matching, and set the value obtained by combining the weight ratio of the three or more selected block vectors as the initial block vector (in this case, the weight ratio can be 1:1:1, or the weight ratio can be separately signaled in the bitstream, or the weight can be set using the ratio of the Template matching cost).

[0179] Not limited thereto, the intra / IBC prediction unit (261) can implicitly set an initial block vector without separate signaling information among block vector candidates included in a block vector candidate group that is reordered based on cost by using information such as information on surrounding available block vectors, QP values, the ratio of intra / inter blocks, the size of coding blocks, the width / height ratio of coding blocks, the number of block vector candidates included in the block vector candidate group, the values ​​of block vectors in the block vector candidate group, the number / position of intra search-based techniques such as IBC and intra template matching used in surrounding blocks, etc.

[0180] As another example, the intra / IBC prediction unit (261) can explicitly set an initial block vector by selecting one or more candidates for IBC merge / AMVP and Intra Template matching merge / AMVP already derived from the surrounding blocks of the current block.

[0181] Whether to set the initial block vector using one or more block vector candidates can be signaled in units such as sequence, GOP, Frame, Slice, Tile, CTU, CU, etc.

[0182] When an initial block vector is set based on one block vector candidate, the intra / IBC prediction unit (261) can set a block vector candidate indicated by block vector selection information (index information) among at least one block vector candidate derived for a surrounding block having an IBC mode or an IntraTMP mode as an initial block vector based on block vector selection information included in the bitstream.

[0183] In addition, when an initial block vector is set based on one block vector candidate, the intra / IBC prediction unit (261) can set a rearranged vector candidate indicated by block vector selection information (index information) among rearranged block vector candidates that are rearranged based on cost among at least one block vector candidate derived for a surrounding block having an IBC mode or an IntraTMP mode based on block vector selection information included in the bitstream as an initial block vector.

[0184] When an initial block vector is set based on a plurality of block vector candidates, the intra / IBC prediction unit (261) selects a plurality of block vector candidates based on block vector selection information included in a bitstream among at least one block vector candidate derived for a surrounding block having an IBC mode or an IntraTMP mode, and calculates a weighted sum of the plurality of block vector candidates using a weight set based on a 1:1 ratio or a template matching cost or a pre-determined table to set the initial block vector. When the weight is set based on a table, the bitstream may include table information regarding weight information of the block vector candidates and be signaled.

[0185] In addition, when the initial block vector is set based on a plurality of block vector candidates, the intra / IBC prediction unit (261) selects a plurality of block vector candidates based on block vector selection information included in the bitstream among the rearranged block vector candidates that are rearranged based on cost among at least one block vector candidate derived for a surrounding block having an IBC mode or an IntraTMP mode, and calculates the sum of the weights of the plurality of block vector candidates using the weights set based on a 1:1 or template matching cost ratio or a pre-determined table to set the initial block vector. When the weights are set based on the table, the bitstream may include and signal table information regarding the weight information of the block vector candidates.

[0186] In addition, as in the embodiment described above, the initial block vector is not limited to a block vector included in the candidates of IBC merge / AMVP and Intra Template matching merge / AMVP already derived from the surrounding blocks of the current block, and the Intra / IBC prediction unit (261) may select an initial block vector from the candidates of IBC merge / AMVP and Intra Template matching merge / AMVP derived for the current block. Even when the initial block vector is set from a candidate of IBC merge / AMVP, Intra Template matching merge / AMVP derived for the current block, the initial block vector can be set from a candidate of IBC merge / AMVP, Intra Template matching merge / AMVP derived for the current block through various methods, similar to the method of setting the initial block vector from a candidate of IBC merge / AMVP, Intra Template matching merge / AMVP already derived from the aforementioned neighboring block. Referring again to FIG. 8, when the initial block vector of the current block is set using the block vector derived for the current block or neighboring blocks according to the aforementioned process, the intra / IBC prediction unit (261) determines the first reference block in the current picture indicated by the initial block vector (S820). For example, referring to FIG. 9, the intra / IBC prediction unit (261) can determine the first reference block (920) in the current picture indicated by the initial block vector (BV0).

[0187] The first reference block is an area within the current picture having the same size as the current block. The initial block vector may be a vector pointing between a pixel at a predetermined position in the first reference block and a pixel at a corresponding predetermined position in the current block. For example, the initial block vector may be a vector pointing from the center pixel of the current block to the center pixel of the first reference block. Accordingly, the intra / IBC prediction unit (261) can determine the first reference block by determining the reference pixel position within the current picture pointed to by the initial block vector from each pixel position within the current block.

[0188] When the first reference block is determined, the intra / IBC prediction unit (261) determines whether the first reference block is encoded in IBC mode or IntraTMP mode (S830).

[0189] If the first reference block is encoded as one block, the intra / IBC prediction unit (261) can determine whether the first reference block is encoded in the IBC mode or the IntraTMP mode. For example, if all pixels within the first reference block are included in one block (e.g., PU), the intra / IBC prediction unit (261) can determine the prediction mode of the first reference block to determine whether the first reference block is encoded in the IBC mode or the IntraTMP mode.

[0190] Hereinafter, a process for determining whether the Nth (N is a natural number) reference block is encoded in the IBC mode or the IntraTMP mode will be described. The method for determining whether the reference block described below is encoded in the IBC mode or the IntraTMP mode can be applied to determining whether the Nth reference block pointed to by the block vector of the (N-1)th reference block is encoded in the IBC mode or the IntraTMP mode, in addition to the first reference block.

[0191] FIG. 10 illustrates reference pixel locations within a reference block used in generating a block vector according to one embodiment of the present disclosure, and FIG. 11 illustrates examples of previous blocks including reference pixels within a reference block used in generating a block vector according to one embodiment of the present disclosure.

[0192] A reference block may not be encoded as a single block, but as different blocks. That is, pixels included in a reference block may be included in different blocks (e.g., PUs). For example, FIG. 11 illustrates a case where pixels within an Nth (N is a natural number) reference block (1100) depicted by a solid line are included in different previous blocks (1110, 1120, 1130, 1140, 1150) depicted by dotted lines. Specifically, FIG. 11 illustrates a case where a part of the Nth reference block (1100) including the center pixel (C) among the Nth reference blocks (1100) is included in the first previous block (1110), a part of the Nth reference block (1100) including the upper left corner pixel (LT) is included in the second previous block (1120), a part of the Nth reference block (1100) including the upper right corner pixel (RT) is included in the third previous block (1130), a part of the Nth reference block (1100) including the lower left corner pixel (LB) is included in the fourth previous block (1140), and a part of the Nth reference block (1100) including the lower right corner pixel (RB) is included in the fifth previous block (1150).

[0193] In this way, when pixels included in the Nth reference block are included in different blocks (e.g., PU), the intra / IBC prediction unit (261) can determine whether the Nth reference block is encoded in the IBC mode or the IntraTMP mode according to one of the following methods.

[0194] - If the pixels included in the Nth reference block are included in different blocks and at least one of the different blocks is encoded in IBC mode or IntraTMP mode, the Nth reference block is determined to be encoded in IBC mode or IntraTMP mode.

[0195] - If the pixels included in the Nth reference block are included in different blocks, and a predetermined number or a predetermined ratio of blocks among the different blocks are encoded in the IBC mode or the IntraTMP mode, the Nth reference block is determined to be encoded in the IBC mode or the IntraTMP mode (the predetermined number or ratio may be implicitly determined according to a predetermined method, or may be explicitly included in the bitstream and signaled as a unit such as a sequence, GOP, Frame, Slice, Tile, CTU, or CU).

[0196] - If one or more pixels included in the Nth reference block are encoded in IBC mode or IntraTMP mode, the Nth reference block is determined to be encoded in IBC mode or IntraTMP mode.

[0197] - If a predetermined number or a predetermined ratio of pixels included in the Nth reference block are encoded in the IBC mode or IntraTMP mode, the Nth reference block is determined to be encoded in the IBC mode or IntraTMP mode (the predetermined number or ratio may be implicitly determined according to a predetermined method, or may be explicitly included in the bitstream and signaled as a unit such as a sequence, GOP, Frame, Slice, Tile, CTU, or CU).

[0198] Additionally, the intra / IBC prediction unit (261) can determine that the Nth reference block is encoded in the IBC mode or the IntraTMP mode when the reference pixels at a predetermined location are encoded in the IBC mode or the IntraTMP mode.

[0199] For example, referring to FIG. 10, the intra / IBC prediction unit (261) can determine that the Nth reference block (1000) is encoded in the IBC mode or the IntraTMP mode if at least one of the reference pixels at predetermined positions including the center (C), upper left corner pixel (LT), upper right corner pixel (RT), lower left corner pixel (LB), and lower right corner pixel (RB) positions within the Nth reference block (1000) is encoded in the IBC mode or the IntraTMP mode.

[0200] Referring again to FIG. 8, if the intra / IBC prediction unit (261) determines that the first reference block is encoded in IBC mode or IntraTMP mode, it determines a block vector candidate using the block vector of the first reference block and the initial block vector (S840), and determines a block vector candidate list including the block vector candidate (S850).

[0201] The intra / IBC prediction unit (261) can determine a block vector derived for the first reference block as a block vector of the first reference block when all pixels within the first reference block are included in one block and the first reference block is encoded in the IBC mode or the IntraTMP mode.

[0202] If the pixels included in the Nth reference block are included in different previous blocks, the intra / IBC prediction unit (261) can determine the block vector of the Nth reference block used for generating an additional block vector according to one of the following methods. The block vector determination method of the reference block described below can be applied to determine the block vector of the Nth reference block pointed to by the block vector of the (N-1)th reference block, including the first reference block.

[0203] - Determine the block vector of the previous block that contains the pixel of the Nth reference block corresponding to the pixel at the predetermined position of the current block as the block vector of the Nth reference block (the predetermined position may be implicitly predetermined or may be explicitly signaled by including information about the predetermined position in the bitstream. The predetermined position may be multiple positions)

[0204] - Determine one or more block vectors of the block vectors of the previous blocks including pixels at the center, upper left corner, upper right corner, lower left corner, and lower right corner positions of the Nth reference block corresponding to the center, upper left corner, upper right corner, lower left corner, and lower right corner positions of the current block as the block vector of the Nth reference block (for example, referring to FIG. 10, if the reference pixels at predetermined positions including the center (C), upper left corner pixel (LT), upper right corner pixel (RT), lower left corner pixel (LB), and lower right corner pixel (RB) positions in the Nth reference block (1000) are encoded in the IBC mode or IntraTMP mode, the block vector of the reference pixel position encoded in the IBC mode or IntraTMP mode is determined as the block vector of the Nth reference block (1000))

[0205] - The block vectors of the previous blocks including the pixels at the center, upper left corner, upper right corner, lower left corner, and lower right corner positions of the Nth reference block corresponding to the center, upper left corner, upper right corner, lower left corner, and lower right corner positions of the current block are determined as the block vector of the Nth reference block according to a predetermined priority order (for example, the priority order may be center → upper right corner → lower right corner → upper left corner → lower left corner, and if the previous block including the pixels of the Nth reference block checked according to the priority order is encoded in the IBC mode or IntraTMP mode, the block vector of the previous block is sequentially determined as the block vector of the Nth reference block).

[0206] - If the pixels included in the Nth reference block are included in different previous blocks, the block vector of the Nth reference block is determined by calculating the weighted sum of the block vectors of the previous blocks encoded in IBC mode or IntraTMP mode among the different previous blocks (the weights can be implicitly predetermined or explicitly signaled through the bitstream).

[0207] - If the pixels included in the Nth reference block are included in different previous blocks, template matching is performed for each of the previous blocks encoded in IBC mode or IntraTMP mode, and the block vector of the previous block with the smallest template matching cost is determined as the block vector of the Nth reference block.

[0208] - If the pixels included in the Nth reference block are included in different previous blocks, template matching is performed for each of the previous blocks encoded in IBC mode or IntraTMP mode, the ratio of the template matching cost is set as a weight, and the weighted sum of the previous blocks encoded in IBC mode or IntraTMP mode is calculated to determine the block vector of the Nth reference block.

[0209] - Determine the block vector of the Nth reference block according to an implicitly predetermined method based on information such as information on surrounding available block vectors, QP value, Intra / inter block ratio, size of coding block, aspect ratio of coding block, number of candidates, value of block vector of candidate group, number / location of intra search-based technology such as IBC, Intra Template matching, etc. used in surrounding blocks.

[0210] - If the pixels included in the Nth reference block are included in different previous blocks encoded in the IBC or IntraTMP mode, priority information on which block vector of which previous block is used to determine the block vector of the Nth reference block is explicitly included in the bitstream and transmitted, and the block vector of the Nth reference block is determined based on the priority information (for example, the priority information can be signaled through priority index information indicating one of the priorities included in a predetermined table. For example, priority index 0 is in the order of center -> upper right corner -> lower right corner -> upper left corner -> lower left corner, and priority index 1 is in the order of upper right corner -> upper left corner -> lower right corner -> lower left corner -> center, and the priority of the reference pixel position to be checked can be determined according to the priority index value, and priority index information indicating the priority of the reference pixel position to be checked can be included in the bitstream and signaled. If the previous block including the pixels of the Nth reference block checked according to the priority is encoded in the IBC mode or IntraTMP mode, the blocks of the corresponding previous block are sequentially determined. The vector is determined as the block vector of the Nth reference block. However, the table can be implicitly constructed using information such as the information on the surrounding available block vectors, QP values, the ratio of Intra / Inter blocks, the size of the coding block, the aspect ratio of the coding block, the number of candidates in the candidate group, the values ​​of the block vectors of the candidate group, the number / location of intra search-based techniques such as IBC and Intra Template matching used in the surrounding blocks, etc.)

[0211] Meanwhile, when determining the block vector of the Nth reference block, the precision unit of the block vector can be four-pel, two-pel, integer-pel, half-pel, quarter-pel, octa-pel, etc. The precision unit of the block vector can be determined explicitly or implicitly. When the precision unit of the block vector is explicitly determined, the precision unit of the block vector can be transmitted to the decoder side in units such as sequence, GOP, Frame, Slice, Tile, CTU, CU, etc.

[0212] When the precision unit of a block vector is determined implicitly, the precision of the block vector that must be additionally updated and the precision of the block vector of the starting block in each process of deriving the block vector may differ. That is, the precision unit of the block vector of the Nth reference block may differ from the precision unit of the block vector of the (N-1)th reference block or the current block that points to the Nth reference block.

[0213] In this case, when a difference in block vector precision occurs, the precision of the block vector of the starting block can be used as a standard, and the precision of the block vector that is additionally updated can be changed to the precision of the block vector of the starting block. That is, the precision unit of the block vector of the Nth reference block can be changed based on the precision unit of the block vector of the (N-1)th reference block. For example, when the block vector precision of the first reference block is half-pel unit, and the block vector precision of the second reference block pointed to by the block vector of the first reference block is quarter-pel unit, the block vector of the second reference block can be changed to the half-pel unit, which is the block vector precision of the first reference block.

[0214] In addition, when a difference in block vector precision occurs, the block vector precision that is additionally updated may be used as a standard, and the precision of the block vector of the starting block may be changed to the block vector precision that must be additionally updated. That is, the precision unit of the block vector of the (N-1)th reference block may be changed based on the block vector precision unit of the Nth reference block. For example, when the block vector precision of the first reference block is half-pel unit, and the block vector precision of the second reference block pointed to by the block vector of the first reference block is quarter-pel unit, the block vector of the first reference block may be changed to the block vector precision of the second reference block, which is quarter-pel unit.

[0215] Meanwhile, when the block vector of the reference block is determined through the aforementioned process, the block vector of the reference block can be used to determine a block vector candidate by updating the initial block vector of the current block.

[0216] FIG. 12 illustrates a process of updating a block vector using a block vector of a reference block according to one embodiment of the present disclosure.

[0217] Referring to FIG. 12, if the initial block vector of the current block B1 (1210) is BV0 and the block vector of the reference block B1 (1220) pointed to by the initial block vector (BV0) is BV1, then BV0+BV1, which is the sum of the initial block vector (BV0) and the block vector (BV1) of the reference block B1 (1220), can be used as the block vector candidate (BV0') of the current block (1210). The block vector candidate (BV0') can be added to the block vector candidate list of the current block or can be directly used to generate a prediction value of the current block.

[0218] According to embodiments of the present disclosure, the process of generating a block vector candidate by updating a previous block vector using a block vector of a reference block and adding the generated block vector candidate to a block vector candidate list can be performed recursively.

[0219] Specifically, the intra / IBC prediction unit (261) determines a block vector pointing to an (N+2)-th reference block referenced by the (N+1)-th reference block when at least one of the reference pixels at a predetermined position within the (N+1)-th reference block referenced by the N-th (N is a natural number) reference block is encoded in the IBC mode or the IntraTMP mode, determines whether to add a block vector candidate generated using the block vector pointing to the (N+2)-th reference block to a block vector candidate list, and then, if it is determined as a result of the determination that the block vector candidate generated using the block vector pointing to the (N+2)-th reference block is to be added to the block vector candidate list, the block vector candidate generated using the block vector pointing to the (N+2)-th reference block can be added to the block vector candidate list.

[0220] For example, referring back to FIG. 9, if at least one of the reference pixels at a predetermined position in the second reference block (930) pointed to by the block vector BV1 of the first reference block (952) is encoded in the IBC mode or the IntraTMP mode, the intra / IBC prediction unit (261) may determine a block vector BV2 pointing to a third reference block (940) referenced by the reference pixel in the second reference block (930), and may determine a block vector candidate using the block vector BV2 pointing to the third reference block (940). That is, the intra / IBC prediction unit (261) may determine BV0+BV1+BV2, which is the sum of the initial block vector (BV0), the block vector (BV1) of the first reference block, and the block vector (BV2) of the second reference block, as the block vector candidate (BV0') of the updated current block, and may add BV0' to the block vector candidate list.

[0221] In this way, the intra / IBC prediction unit (261) predicts the block vector BV of the Nth (N is a natural number) reference block (950). N If at least one of the reference pixels at a given position within the (N+1) reference block (960) pointed to is encoded in the IBC mode or the IntraTMP mode, the block vector BV pointing to the (N+2) reference block (970) referenced by the reference pixel within the (N+1) reference block (960) N+1 , and the block vector BV pointing to the (N+2) reference block (970) N+1 The block vector candidate can be determined using . Specifically, the intra / IBC prediction unit (261) determines the block vector BV pointing to the (N+2)th reference block (970) from the initial block vector (BV0). N+1 The value obtained by adding all block vector candidates derived in the process of deriving (BV0+BV1+BV2+쪋+BV N+1 ) can be added to the block vector candidates.

[0222] As described above, according to the embodiments of the present disclosure, a plurality of block vector candidates can be obtained in the process of updating a previous block vector using a block vector of a reference block to generate a block vector candidate and adding the generated block vector candidate to a block vector candidate list. Therefore, a criterion for adding a plurality of block vector candidates to the block vector candidate list is required.

[0223] According to one embodiment of the present disclosure, when generating a block vector candidate by updating a previous block vector using a block vector of a reference block and adding the generated block vector candidate to a block vector candidate list, the following method may be applied.

[0224] - When adding block vector candidates generated from IBC merge / AMVP, Intra Template matching merge / AMVP or block vector candidates reordered based on cost using Template matching, block vector candidates can be added in a predetermined number and at a predetermined position. For example, a predetermined number of block vector candidates can be added after history-based block vector candidates included in the block vector candidate list. Here, the predetermined number can be predetermined or set in units such as sequence, GOP, Frame, Slice, Tile, CTU, or CU.

[0225] - When a reference block is divided into multiple blocks and encoded, an updated block vector candidate can be added to the block vector candidate list using the block vectors of blocks encoded in IBC mode or IntraTMP mode among the multiple blocks. For example, as shown in FIG. 11, a part of the Nth reference block (1100) including the center pixel (C) among the Nth reference blocks (1100) is included in the first previous block (1110), a part of the Nth reference block (1100) including the upper left corner pixel (LT) is included in the second previous block (1120), a part of the Nth reference block (1100) including the upper right corner pixel (RT) is included in the third previous block (1130), a part of the Nth reference block (1100) including the lower left corner pixel (LB) is included in the fourth previous block (1140), and a part of the Nth reference block (1100) including the lower right corner pixel (RB) is included in the fifth previous block (1150), in which case the block vectors of blocks encoded in the IBC mode or the IntraTMP mode among the first to fifth previous blocks (1110 to 1150) are used to determine the current A block vector of a block can be updated to determine a block vector candidate, and the updated block vector candidate can be added to a block vector candidate list. In addition, the updated block vector candidate can be added to the block vector candidate list according to priority within a range of a predetermined number of block vector candidates. For example, it is checked whether previous blocks including reference pixels at predetermined positions in the order of center -> upper right corner -> lower right corner -> upper left corner -> lower left corner pixels among the pixels of a reference block are encoded in IBC mode or IntraTMP mode, and the block vector of the current block is updated using the block vectors of blocks encoded in IBC mode or IntraTMP mode to determine a block vector candidate, and the updated block vector candidate can be added to the block vector candidate list.If a block vector candidate identical to the updated block vector candidate is already included in the block vector candidate list, the updated block vector candidate is not added to the block vector candidate list. The predetermined number of block vector candidates can be arbitrarily determined. For example, the total number of block vector candidates included in the block vector candidate list can be set to a maximum of 30.

[0226] - If a previous block including a reference pixel at a specific position of a reference block within a range of a predetermined number of block vector candidates is a block encoded in the IBC mode or the IntraTMP mode, a block vector of a current block may be updated using the block vector of the previous block at the specific position to determine a block vector candidate, and the updated block vector candidate may be added to the block vector candidate list. For example, if a previous block including a center pixel (C) of a reference block is a block encoded in the IBC mode or the IntraTMP mode, a block vector of a current block may be updated using the block vector of the previous block including the center pixel (C), to determine a block vector candidate, and the updated block vector candidate may be added to the block vector candidate list.

[0227] - When multiple block vector candidates are generated, all of the multiple block vector candidates derived within the range of the predetermined number of block vector candidates can be added to the block vector candidate list. For example, referring to FIG. 9, it is assumed that the block vector (BV1) of the first reference block and the block vector (BV2) of the second reference block are determined through the block vector candidate determination process described above. In this case, BV0+BV1, which is the sum of the initial block vector (BV0) and the block vector (BV1) of the first reference block, and BV0+BV1+BV2, which is the sum of the initial block vector (BV0), the block vector (BV1) of the first reference block, and the block vector (BV2) of the second reference block, can be added to the block vector candidate list. That is, both BV0+BV1 and BV0+BV1+BV2 can be added to the block vector candidate list within the range of the predetermined number of block vector candidates.

[0228] - When multiple block vector candidates are generated, only the final block vector candidate can be added to the block vector candidate list. When at least one of the reference pixels at a predetermined position in the (M+1)-th reference block referenced by the M-th (M is an integer greater than or equal to 2) reference block after the first reference block is encoded in the IBC mode or the IntraTMP mode, a process of determining a block vector pointing to the (M+2)-th reference block referenced by the reference pixel in the (M+1)-th reference block is repeatedly performed, and when a final K-th (K is an integer greater than or equal to 2) reference block satisfying a predetermined termination condition is determined, the final block vector candidate can be determined using the block vector of the (K-1)-th reference block pointing to the final K-th reference block, and only the final block vector candidate can be added to the block vector candidate list. The predetermined termination condition is a condition for terminating the tracking process of the block vector of the reference block. For example, if there is no reference pixel encoded in the IBC mode or the IntraTMP mode among the reference pixels at a predetermined position within the K-th reference block, or if the number of block vector candidates included in the block vector candidate list has already reached a predetermined number, or if the reference area referenced by the current block pointed to by the block vector candidate generated using the block vector pointing to the (K+1)-th reference block referenced by the K-th reference block goes beyond the search area of ​​the IBC mode or the IntraTMP mode or one of the CTU, slice, tile, or frame boundaries, the K-th reference block can be determined as the final K-th reference block that satisfies a predetermined termination condition. For example, referring to FIG. 9, it is assumed that the block vector (BV1) of the first reference block and the block vector (BV2) of the second reference block have been determined through the aforementioned block vector candidate determination process, and the third reference block is the final reference block that satisfies a predetermined termination condition.In this case, BV0+BV1+BV2, which is the sum of the initial block vector (BV0), the block vector (BV1) of the first reference block, and the block vector (BV2) of the second reference block, is determined as the block vector candidate (BV0') of the updated current block, and only BV0' can be added to the block vector candidate list.

[0229] - When multiple block vector candidates are generated, only the optimal block vector candidate based on cost among all the multiple block vector candidates derived within the range of the predetermined number of block vector candidates can be added to the block vector candidate list. For example, referring to FIG. 9, it is assumed that the block vector (BV1) of the first reference block and the block vector (BV2) of the second reference block are determined through the block vector candidate determination process described above. In this case, among BV0+BV1, which is the sum of the initial block vector (BV0) and the block vector (BV1) of the first reference block, and BV0+BV1+BV2, which is the sum of the initial block vector (BV0), the block vector (BV1) of the first reference block, and the block vector (BV2) of the second reference block, a block vector candidate having a smaller cost can be added to the block vector candidate list. That is, a block vector candidate with a smaller cost among BV0+BV1 and BV0+BV1+BV2 can be added to the block vector candidate list.

[0230] Meanwhile, if there is already an identical block vector candidate in the block vector candidate list among the generated block vector candidates, the generated block vector candidate may not be added to the block vector candidate list.

[0231] According to embodiments of the present disclosure, the process of determining a plurality of reference blocks, updating a block vector of a current block using block vectors of the determined plurality of reference blocks, and adding the updated block vector of the current block to a block vector candidate list may be performed until a predetermined termination condition is satisfied. For example, the predetermined termination condition may be one of the following:

[0232] - When the number of block vector candidates included in the block vector candidate list reaches a predetermined number.

[0233] - If there is no previous block encoded in IBC mode or IntraTMP mode among the blocks of the reference block.

[0234] - If there is no reference pixel encoded in IBC mode or IntraTMP mode among the reference pixels at a given location of the reference block.

[0235] - For the current block, if the reference area indicated by the generated block vector candidate is outside the search area of ​​the IBC mode or the IntraTMP mode or one of the CTU (Coding Tree Unit), slice, tile or frame boundaries (for example, in FIG. 9, when the block vector candidate of BV0+BV1+BV2, which is the sum of the initial block vector (BV0), the block vector (BV1) of the first reference block and the block vector (BV2) of the second reference block, is referred to as the block vector of the current block (910), and if it is assumed that the area referred to by the current block (910) by BV0+BV1+BV2 is outside the frame boundary, the block vector (BV2) of the second reference block is not used to generate the block vector candidate. If, the block vector candidate of BV0+BV1, which is the sum of the initial block vector (BV0) and the block vector (BV1) of the first reference block, is referred to as the block vector of the current block (910), then the block vector of the current block (910) is not used to generate the block vector candidate. If the area referenced by block (910) does not exceed the frame boundary, etc., BV0+BV1 is determined as a valid block vector candidate.

[0236] Referring back to FIG. 8, the intra / IBC prediction unit (261) can obtain a prediction value of the current block using a block vector selected from among the block vector candidates included in the block vector candidate list (S860). Which block vector candidate among the block vector candidates included in the block vector candidate list is determined can be explicitly or implicitly determined. For example, the block vector candidates included in the block vector candidate list can be rearranged based on cost, and the block vector candidate with the lowest cost can be determined as the block vector of the current block, or information indicating the block vector of the current block among the block vector candidates included in the block vector candidate list can be included in the bitstream.

[0237] FIG. 13 is a flowchart illustrating a video decoding method according to another embodiment of the present disclosure.

[0238] In a video decoding method according to another embodiment of the present disclosure, compared to the video decoding method according to the embodiment of FIG. 8 described above, a process of constructing a separate block vector candidate list is omitted, and a process of generating a block vector is the same as the block vector generation process according to the embodiment of FIG. 8. Steps S1310 to S1330 of FIG. 13 are the same as steps S810 to S830 of FIG. 8, and a detailed description thereof is omitted.

[0239] That is, a video decoding method according to another embodiment of the present disclosure determines the updated block vector of the current block as the final block vector of the current block without including the block vector of the current block updated in the block vector generation process described above in a separate block vector candidate list, and directly obtains a prediction value of the current block using the block vector of the current block.

[0240] If the intra / IBC prediction unit (261) determines that the first reference block is encoded in the IBC mode or the IntraTMP mode, it updates the initial block vector using the block vector of the first reference block and the initial block vector to determine the block vector of the current block (S1340), and obtains the reference block in the current picture pointed to by the determined block vector of the current block as the prediction value of the current block (S1350).

[0241] For example, referring to FIG. 9, if the block vector of BV0+BV1+BV2, which is the sum of the initial block vector (BV0), the block vector of the first reference block (BV1), and the block vector of the second reference block (BV2), is determined as the final block vector of the current block (910), the intra / IBC prediction unit (261) can determine the reference block pointed to by the block vector of BV0+BV1+BV2 as the predicted value of the current block based on the position of the current block.

[0242] Without being limited thereto, the intra / IBC prediction unit (261) can derive a block vector candidate to be added to the block vector candidate list according to the above-described embodiment, and obtain a prediction value of the current block by determining the block vector candidate as the block vector of the final current block without separately adding the block vector candidate to the block vector candidate list.

[0243] Fig. 14 is a flowchart illustrating a video encoding method according to an embodiment of the present disclosure. The video encoding method according to an embodiment of the present disclosure constructs a block vector candidate list in the same manner as the video decoding method of Fig. 8 described above, determines a block vector of a current block among block vector candidates included in the block vector candidate list, and includes information about the block vector candidate used to determine the block vector of the current block in a bitstream. In the video encoding method according to an embodiment of the present disclosure, steps S1410 to S1450 of Fig. 14 may be performed in the same manner as steps S810 to S850 of Fig. 8.

[0244] Referring to FIG. 14, the intra / IBC prediction unit (161) sets an initial block vector of the current block using at least one block vector derived for a neighboring block processed before the current block (S1410). For example, referring to FIG. 9, the intra / IBC prediction unit (161) sets an initial block vector (BV0) of the current block (910) using a block vector (NV) derived for a neighboring block (905) processed before the current block (910) and encoded in IBC mode or IntraTMP mode.

[0245] When the initial block vector of the current block is set using the block vector derived for the surrounding blocks, the intra / IBC prediction unit (161) determines the first reference block within the current picture pointed to by the initial block vector (S1420). For example, referring to FIG. 9, the intra / IBC prediction unit (161) can determine the first reference block (920) within the current picture pointed to by the initial block vector (BV0).

[0246] When the first reference block is determined, the intra / IBC prediction unit (161) determines whether the first reference block is encoded in IBC mode or IntraTMP mode (S1430).

[0247] If the intra / IBC prediction unit (161) determines that the first reference block is encoded in IBC mode or IntraTMP mode, it determines a block vector candidate using the block vector of the first reference block and the initial block vector (S1440), and determines a block vector candidate list including the block vector candidate (S1450).

[0248] The intra / IBC prediction unit (161) obtains a prediction value of the current block using a block vector selected from among block vector candidates included in the block vector candidate list, selects a block vector candidate with the minimum cost based on cost, and can add index information indicating the selected block vector candidate to the bitstream (S1460).

[0249] The methods described herein may be performed by a processor of a video encoder or video decoder. Furthermore, the encoder may generate a bitstream that is decoded by a video signal processing method, and the bitstream generated by the encoder may be stored in a computer-readable, non-transitory storage medium (recording medium).

[0250] 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 using hardware, firmware, software, or a combination thereof.

[0251] Some embodiments may also be implemented in the form of a computer-executable storage medium containing computer-executable instructions, such as program modules executed by a computer. Computer-readable media may be any available media that can be accessed by a computer, and includes both volatile and nonvolatile media, removable and non-removable media.

[0252] Additionally, computer-readable media may include both computer storage media and communication media. Computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data. Communication media typically includes other data, such as computer-readable instructions, data structures, or program modules, in a modulated data signal, or other transport mechanism, and includes any information delivery media.

Claims

1. In the video decryption method, A step of setting an initial block vector of the current block by using at least one block vector derived for surrounding blocks processed before the current block; A step of determining a first reference block pointed to by the initial block vector within the current picture; A step of determining whether the first reference block is encoded in IBC (Intra Block Copy) mode or IntraTMP (Intra Template Matching Prediction) mode; A step of determining a block vector candidate using the block vector of the first reference block and the initial block vector when the first reference block is encoded in the IBC mode or the IntraTMP mode; A step of determining a block vector candidate list including the above block vector candidate; and A step of obtaining a prediction value of the current block by using a block vector selected from among block vector candidates included in the block vector candidate list, How to decrypt a video.

2. In paragraph 1, The initial block vector of the current block above is, A block vector candidate is set by using one of: a first block vector candidate having an index of 0 among at least one block vector candidate derived for a surrounding block having an IBC mode or an IntraTMP mode; a first block vector candidate having an index of 0 among the rearranged block vector candidates obtained by rearranging the at least one block vector candidate derived for the surrounding block based on a cost; a block vector candidate generated by a weighted sum of a plurality of block vector candidates derived for the surrounding block; and a block vector candidate generated by a weighted sum of a plurality of rearranged block vector candidates obtained by rearranging the at least one block vector candidate derived for the surrounding block based on a cost. How to decrypt a video.

3. In paragraph 1, The initial block vector of the current block above is, Based on the block vector selection information included in the bitstream, at least one block vector candidate derived for a surrounding block having an IBC mode or an IntraTMP mode is determined as a reordered block vector candidate indicated by the block vector selection information among the reordered block vector candidates reordered based on cost. How to decrypt a video.

4. In paragraph 1, The step of determining whether the above first reference block is encoded in IBC mode or IntraTMP mode is as follows: If at least one of the reference pixels at predetermined locations including the center, upper left corner, upper right corner, lower left corner and lower right corner locations within the first reference block is encoded in the IBC mode or IntraTMP mode, it is determined that the first reference block is encoded in the IBC mode or IntraTMP mode. How to decrypt a video.

5. In paragraph 4, The block vector of the above first reference block is is determined by a block vector pointing to a second reference block in the current picture referenced by a previous block containing a reference pixel encoded in the IBC mode or IntraTMP mode; How to decrypt a video.

6. In paragraph 1, A step of determining a block vector pointing to an (N+2)-th reference block referenced by a reference pixel in the (N+1)-th reference block, if at least one of the reference pixels at a predetermined position in the (N+1)-th reference block referenced by the N-th (N is a natural number) reference block is encoded in the IBC mode or the IntraTMP mode; and A step of determining whether to add a block vector candidate generated using a block vector pointing to the (N+2) reference block to the block vector candidate list; and If it is determined as a result of the above judgment that the block vector candidate generated using the block vector pointing to the (N+2)th reference block is to be added to the block vector candidate list, the method further includes a step of adding the block vector candidate generated using the block vector pointing to the (N+2)th reference block to the block vector candidate list. How to decrypt a video.

7. In paragraph 6, The step of determining whether to add a block vector candidate generated using a block vector pointing to the (N+2) reference block to the block vector candidate list is as follows. If the number of block vector candidates included in the above block vector candidate list is less than a predetermined number, it is determined that a block vector candidate generated using a block vector pointing to the (N+2)th reference block is added to the above block vector candidate list. How to decrypt a video.

8. In paragraph 6, The step of determining whether to add a block vector candidate generated using a block vector pointing to the (N+2) reference block to the block vector candidate list is as follows. If the number of block vector candidates included in the above block vector candidate list has already reached the predetermined number, or if the reference area referenced by the current block pointed to by the block vector candidate generated using the block vector pointing to the (N+2)th reference block goes out of the search area of ​​the IBC mode or the IntraTMP mode or one of the CTU (Coding Tree Unit), slice, tile or frame boundaries, it is determined that the block vector candidate generated using the block vector pointing to the (N+2)th reference block is not added to the block vector candidate list. How to decrypt a video.

9. In paragraph 1, The step of determining a block vector candidate using the block vector of the first reference block and the initial block vector is as follows: If at least one of the reference pixels at a predetermined position in the (M+1)-th reference block referenced by the M-th (M is an integer greater than or equal to 2) reference block after the first reference block is encoded in the IBC mode or the IntraTMP mode, a process of determining a block vector pointing to the (M+2)-th reference block referenced by the reference pixel in the (M+1)-th reference block is repeatedly performed to determine a final K-th (K is an integer greater than or equal to 2)-th reference block satisfying a predetermined termination condition, and a block vector of the (K-1)-th reference block pointing to the final K-th reference block is determined as a final block vector candidate and only the final block vector candidate is added to the block vector candidate list. How to decrypt a video.

10. In paragraph 9, If there is no reference pixel encoded in the IBC mode or IntraTMP mode among the reference pixels at a predetermined position within the Kth reference block, or the number of block vector candidates included in the block vector candidate list has already reached the predetermined number, or the reference area referenced by the current block pointed to by the block vector candidate generated using the block vector pointing to the (K+1)th reference block referenced by the Kth reference block goes out of the search area of ​​the IBC mode or IntraTMP mode, or one of the CTU, slice, tile, or frame boundaries, the final Kth reference block satisfying the predetermined termination condition is determined. How to decrypt a video.

11. In paragraph 1, A step of obtaining a prediction value of the current block by using one block vector selected from among the block vector candidates included in the above block vector candidate list. Further comprising the steps of cost-based reordering of block vector candidates included in the block vector candidate list, obtaining index information pointing to one of the cost-based reordered block vector candidates from a bitstream, and determining a block vector of the current block based on the index information. How to decrypt a video.

12. In paragraph 1, The step of determining a block vector candidate using the block vector of the first reference block and the initial block vector is as follows: The block vector candidate is determined by adding the initial block vector and the block vector of the first reference block. How to decrypt a video.

13. A video decoding device performing the method of any one of claims 1 to 12.

14. A computer-readable recording medium having recorded thereon a program for executing the method of any one of claims 1 to 12 on a computer.

15. In a video encoding method, A step of setting an initial block vector of the current block by using at least one block vector derived for surrounding blocks processed before the current block; A step of determining a first reference block pointed to by the initial block vector within the current picture; A step of determining whether the first reference block is encoded in IBC (Intra Block Copy) mode or IntraTMP (Intra Template Matching Prediction) mode; A step of determining a block vector candidate using the block vector of the first reference block and the initial block vector when the first reference block is encoded in the IBC mode or the IntraTMP mode; A step of determining a block vector candidate list including the above block vector candidates; A step of obtaining a prediction value of the current block by using one block vector selected from among the block vector candidates included in the block vector candidate list and determining a final block vector candidate among the block vector candidates based on cost; and Comprising a step of adding index information pointing to the final block vector candidate to the bitstream, Video encoding method.

16. A video encoding device performing the method of Article 15.

17. A computer-readable recording medium recording a program for executing the method of Article 15 on a computer.

Citation Information

Patent Citations

  • Block vector estimation method for multiview video based on intra block copy and decoder

    KR102403817B1

  • Method of handling cell selection and related network device and mobile device

    KR102429846B1

  • Method of providing instant investment means, and computer program recorded on record-medium for executing method thereof

    KR102442335B1

  • Graphite sheet and manufacturing method thereof

    KR102575637B1

  • KR20200104251A