Image encoding / decoding method and apparatus, and recording medium having bitstream stored therein

By applying intra-screen template matching or block copy modes within geometric segmentation, the method efficiently encodes and decodes high-resolution video data, addressing the challenge of high data volumes and costs associated with high-quality video transmission and storage.

WO2024191196A1PCT designated stage expired Publication Date: 2024-09-19HYUNDAI MOTOR CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/KR2024/003237
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-03-13
Filing Date
2024-03-13
Publication Date
2024-09-19

AI Technical Summary

Technical Problem

The increasing demand for high-resolution, high-quality video data, such as UHD images, leads to higher data volumes, resulting in increased transmission and storage costs, necessitating more efficient video encoding/decoding technologies.

Method used

The proposed method involves dividing video blocks into partitions and applying intra-screen template matching or block copy modes for improved prediction accuracy, using geometric segmentation to efficiently encode and decode video data, thereby reducing data volume and costs.

Benefits of technology

This approach enhances coding efficiency by improving prediction accuracy and reducing data volume, thereby lowering transmission and storage costs for high-resolution video data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure KR2024003237_19092024_PF_FP_ABST
    Figure KR2024003237_19092024_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present invention is an image decoding method comprising the steps of: partitioning the current block into a first partition and a second partition according to a partition boundary; determining whether or not an intra block copy mode is applied to the first partition; if the intra block copy mode is applied to the first partition, determining a block vector of the first partition indicating a reference block within the block vector search range of the current block; on the basis of the block vector, determining a reference block to which the first partition refers; and predicting the first partition on the basis of the reference block.
Need to check novelty before this filing date? Find Prior Art

Description

Video encoding / decoding method, device, and recording medium storing bitstream

[0001] The present invention relates to a video encoding / decoding method, a device, and a recording medium storing a bitstream. Specifically, the present invention relates to a video encoding / decoding method and device using an intra-screen prediction method, and a recording medium storing a bitstream.

[0002] Recently, the demand for high-resolution, high-quality images, such as UHD (Ultra High Definition) images, is increasing across various application fields. As image data becomes higher in resolution and quality, the relative amount of data increases compared to conventional image data. Therefore, transmitting image data using existing media such as wired or wireless broadband lines or storing it using existing storage media leads to increased transmission and storage costs. To address these issues arising from the increasing resolution and quality of image data, high-efficiency image encoding / decoding technologies for higher-resolution and higher-quality images are required.

[0003] In geometric partitioning mode, methods for applying different prediction modes to each partition have been discussed. Specifically, various methods are being discussed to improve block prediction accuracy by increasing the number of prediction modes applicable to each partition.

[0004] The purpose of the present invention is to provide a video encoding / decoding method and device with improved encoding / decoding efficiency.

[0005] In addition, the present invention aims to provide a recording medium storing a bitstream generated by the image decoding method or device provided in the present invention.

[0006] A video decoding method according to one embodiment of the present invention may include the steps of: dividing a current block into a first partition and a second partition according to a division boundary; determining whether an in-screen template matching mode is applied to the first partition; determining a template of the first partition when the in-screen template matching mode is applied to the first partition; determining a reference template corresponding to the template of the first partition in a template search range of the current block; determining a reference block referenced by the first partition based on the reference template; and predicting the first partition based on the reference block.

[0007] According to one embodiment, the first partition may include a sample of the upper left side of the current block, and the template of the first partition may include at least one of a left region located on the left side of the first partition, an upper region located on the upper side of the first partition, and an upper left region located on the upper left side of the first partition.

[0008] According to one embodiment, when the current block is adjacent to the upper boundary of the slice or picture including the current block, the template may be characterized in that it does not include the upper region and the upper left region, but includes the left region, and when the current block is adjacent to the left boundary of the slice or picture including the current block, the template does not include the left region and the upper left region, but includes the upper region.

[0009] According to one embodiment, the width of the upper region may be equal to the upper width of the first partition, and the height of the left region may be equal to the left height of the first partition.

[0010] According to one embodiment, the width of the upper region may be equal to the width of the current block, and the height of the left region may be equal to the height of the current block.

[0011] According to one embodiment, the template of the first partition may further include at least one of a lower left region adjacent to the lower side of the left region and an upper right region adjacent to the right side of the upper region.

[0012] According to one embodiment, the lower left region and the upper right region may be characterized in that they are determined according to an extended segmentation boundary of the current block.

[0013] According to one embodiment, the lower left region may be determined to be adjacent in a lower left direction from the lower left vertex of the current block, and the upper right region may be determined to be adjacent in an upper right direction from the upper right vertex of the current block.

[0014] According to one embodiment, the first partition may be characterized by including an upper left sample of the current block.

[0015] According to one embodiment, the first partition does not include an upper left sample of the current block and is adjacent to at least one of a left boundary and an upper boundary of the current block, and when the first partition is adjacent to the left boundary of the current block, the template of the first partition may include a left area located on the left side of the first partition, and when the first partition is adjacent to the upper boundary of the current block, the template of the first partition may include an upper area located on the upper side of the first partition.

[0016] According to one embodiment, the second partition may be characterized in that one of an inter-screen prediction mode, an intra-screen prediction mode, an intra-screen block copy mode, and an intra-screen template matching mode is applied.

[0017] According to one embodiment, the prediction method to be applied to the second partition may be determined regardless of whether an in-screen template matching mode is applied to the first partition.

[0018] According to one embodiment, when the in-screen template matching mode is applied to the first partition and the in-screen prediction mode is applied to the second partition, the second partition is predicted by one of predetermined in-screen prediction methods, and when the in-screen template matching mode is not applied to the first partition and the in-screen prediction mode is applied to the second partition, the second partition is predicted by one of prediction methods not included in the predetermined in-screen prediction methods, and the predetermined in-screen prediction methods may include at least one of a planar mode, a DC mode, a horizontal mode, and a vertical mode. When the in-screen template matching mode is applied to the first partition and the in-screen prediction mode is applied to the second partition, the second partition may be predicted by existing in-screen prediction modes.

[0019] According to one embodiment, when the screen template matching mode is applied to both the first partition and the second partition, it may be characterized in that the template of the first partition and the template of the second partition are set not to be identical.

[0020] A video encoding method according to one embodiment of the present invention may include the steps of: dividing a current block into a first partition and a second partition according to a division boundary; determining whether an in-screen template matching mode is applied to the first partition; determining a template of the first partition when the in-screen template matching mode is applied to the first partition; determining a reference template corresponding to the template of the first partition in a template search range of the current block; determining a reference block referenced by the first partition based on the reference template; and predicting the first partition based on the reference block.

[0021] A non-transitory computer-readable recording medium according to one embodiment of the present invention stores a bitstream generated by the image encoding method.

[0022] A transmission method according to one embodiment of the present invention transmits a bitstream generated by the image encoding method.

[0023] A video decoding method according to one embodiment of the present invention may include the steps of dividing a current block into a first partition and a second partition according to a division boundary, determining whether an in-screen block copy mode is applied to the first partition, determining a block vector of the first partition indicating a reference block within a block vector search range of the current block when the in-screen block copy mode is applied to the first partition, determining a reference block referenced by the first partition based on the block vector, and predicting the first partition based on the reference block.

[0024] According to one embodiment, it may be characterized in that, based on a first partition flag, it is determined whether the in-screen block copy mode is applied to the first partition, and if the in-screen block copy mode is not applied to the first partition, the in-screen block copy mode is applied to the second partition, and if the in-screen block copy mode is applied to the first partition, it is determined whether the in-screen block copy mode is applied to the second partition, based on a second partition flag.

[0025] According to one embodiment, it may be characterized in that whether the in-screen block copy mode is applied to the first partition is determined based on the first partition flag, and whether the in-screen block copy mode is applied to the second partition is determined based on the second partition flag.

[0026] According to one embodiment, the second partition may be characterized in that one of an inter-screen prediction mode, an intra-screen prediction mode, an intra-screen block copy mode, and an intra-screen template matching mode is applied.

[0027] According to one embodiment, the prediction method to be applied to the second partition may be determined regardless of whether the block copy mode within the screen is applied to the first partition.

[0028] According to one embodiment, when the intra-screen block copy mode is applied to the first partition and the intra-screen prediction mode is applied to the second partition, the second partition is predicted by one of predetermined intra-screen prediction methods, and when the intra-screen block copy mode is not applied to the first partition and the intra-screen prediction mode is applied to the second partition, the second partition is predicted by one of prediction methods not included in the predetermined intra-screen prediction methods, and the predetermined intra-screen prediction methods may include at least one of a planar mode, a DC mode, a horizontal mode, and a vertical mode. When the intra-screen block copy mode is applied to the first partition and the intra-screen prediction mode is applied to the second partition, the second partition may be predicted by existing intra-screen prediction modes.

[0029] According to one embodiment, when the screen block copy mode is applied to both the first partition and the second partition, the block vector of the first partition and the block vector of the second partition may be set so as not to be identical.

[0030] According to one embodiment, when the within-screen block copy mode is applied to the first partition and the between-screen prediction mode is applied to the second partition, the block vector of the first partition may be derived based on the motion vector of the second partition.

[0031] According to one embodiment, the image decoding method may further include a step of obtaining a difference vector representing a difference between a block vector of the first partition and a motion vector of the second partition, wherein the block vector of the first partition is derived based on the motion vector of the second partition and the difference vector.

[0032] A video encoding method according to one embodiment of the present invention may include the steps of dividing a current block into a first partition and a second partition according to a division boundary, determining whether an in-screen block copy mode is applied to the first partition, determining a block vector of the first partition indicating a reference block within a block vector search range of the current block when the in-screen block copy mode is applied to the first partition, determining a reference block referenced by the first partition based on the block vector, and predicting the first partition based on the reference block.

[0033] A non-transitory computer-readable recording medium according to one embodiment of the present invention stores a bitstream generated by the image encoding method.

[0034] A transmission method according to one embodiment of the present invention transmits a bitstream generated by the image encoding method.

[0035] The features briefly summarized above of the present invention are merely exemplary aspects of the detailed description of the present invention described below and do not limit the scope of the present invention.

[0036] The present invention proposes various embodiments of a method for applying an in-screen template matching mode to a partition in a geometric partitioning mode.

[0037] Additionally, the present invention proposes various embodiments of a method for applying an in-screen block copy mode to a partition in a geometric partitioning mode.

[0038] Additionally, the present invention proposes various embodiments of a method for efficiently encoding a block vector for applying an in-screen block copy mode in a geometric partitioning mode.

[0039] According to the above various embodiments, as the prediction accuracy of the geometric segmentation mode is improved, the overall encoding efficiency can be improved.

[0040] Figure 1 is a block diagram showing the configuration according to one embodiment of an encoding device to which the present invention is applied.

[0041] Figure 2 is a block diagram showing the configuration according to one embodiment of a decryption device to which the present invention is applied.

[0042] FIG. 3 is a diagram schematically showing a video coding system to which the present invention can be applied.

[0043] Figure 4 illustrates a combination of intra-screen prediction and inter-screen prediction that can occur in geometric segmentation mode.

[0044] Figure 5 illustrates a method for generating prediction blocks according to a screen template matching mode in a partition in a geometric partitioning mode.

[0045] FIG. 6 illustrates an embodiment of a template including left, top, and top-left reference samples for template matching within a screen of a partition including the top-left sample of a block.

[0046] Figure 7 illustrates an embodiment of a template that includes reference samples of an area determined along an extended segmentation boundary, as well as reference samples of the left, upper, and upper left sides.

[0047] Figure 8 illustrates an embodiment of a template that includes reference samples on the left, upper, and upper left sides, as well as reference samples on the lower left and upper right sides.

[0048] Figure 9 illustrates a method for predicting the second partition of the current block according to the template matching mode within the screen.

[0049] Figure 10 illustrates an embodiment of a template including left and upper reference samples for template matching within a screen of a partition that does not include the upper left sample of a block.

[0050] Figure 11 illustrates a method for predicting partitions according to the block copy mode within the screen in the geometric partitioning mode.

[0051] Figure 12 illustrates a method for predicting the second partition of the current block according to the block copy mode within the screen.

[0052] Figure 13 illustrates a method for generating a prediction block based on an intra-screen block copy for an area performing intra-screen prediction in a geometric partitioning mode.

[0053] Figure 14 shows a method for reducing the size of information of a block vector using a unidirectional motion vector.

[0054] Fig. 15 shows an embodiment of a prediction method according to a geometric segmentation mode to which an in-screen template matching mode is applied.

[0055] Fig. 16 shows an embodiment of a prediction method according to a geometric division mode to which an in-screen block copy mode is applied.

[0056] Figure 17 illustrates an example of a content streaming system to which an embodiment according to the present invention can be applied.

[0057] According to one embodiment of the present invention, a video decoding method may include the steps of: dividing a current block into a first partition and a second partition according to a division boundary; determining whether an in-screen template matching mode is applied to the first partition; determining a template of the first partition when the in-screen template matching mode is applied to the first partition; determining a reference template corresponding to the template of the first partition in a template search range of the current block; determining a reference block referenced by the first partition based on the reference template; and predicting the first partition based on the reference block.

[0058] The present invention is susceptible to various modifications and embodiments. Therefore, specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the present invention to specific embodiments, but rather to encompass all modifications, equivalents, and substitutes falling within the spirit and scope of the present invention. In the drawings, similar reference numerals designate the same or similar functions throughout. The shape and size of elements in the drawings may be provided by way of example only for clarity. The detailed description of the exemplary embodiments described below refers to the accompanying drawings, which illustrate specific embodiments. These embodiments are described in sufficient detail to enable those skilled in the art to practice the embodiments. It should be understood that the various embodiments, while different, are not necessarily mutually exclusive. For example, specific shapes, structures, and characteristics described herein may be implemented in other embodiments without departing from the spirit and scope of the present invention. Furthermore, it should be understood that the location or arrangement of individual components within each disclosed embodiment may be modified without departing from the spirit and scope of the embodiment. Accordingly, the detailed description set forth below is not intended to be taken in a limiting sense, and the scope of the exemplary embodiments, if properly described, is defined only by the appended claims, along with the full scope equivalents to which such claims are entitled.

[0059] In the present invention, terms such as first, second, etc. may be used to describe various components, but the components should not be limited by these terms. These terms are used solely to distinguish one component from another. For example, without departing from the scope of the present invention, the first component may be referred to as the second component, and similarly, the second component may also be referred to as the first component. The term "and / or" includes a combination of multiple related described items or any of multiple related described items.

[0060] The components shown in the embodiments of the present invention are independently depicted to represent different characteristic functions, and do not mean that each component is composed of separate hardware or a single software component. That is, each component is listed and included as a separate component for convenience of explanation, and at least two components among each component may be combined to form a single component, or a single component may be divided into multiple components to perform a function, and such integrated and separate embodiments of each component are also included in the scope of the present invention as long as they do not deviate from the essence of the present invention.

[0061] The terminology used herein is merely used to describe specific embodiments and is not intended to limit the present invention. The singular expression includes the plural expression unless the context clearly indicates otherwise. In addition, some components of the present invention are not essential components that perform essential functions in the present invention and may be optional components merely for performance enhancement. The present invention may be implemented by including only components essential to realizing the essence of the present invention, excluding components used only for performance enhancement, and a structure including only essential components, excluding optional components used only for performance enhancement, is also within the scope of the present invention.

[0062] In an embodiment, the term "at least one" may mean one of a number greater than or equal to 1, such as 1, 2, 3, and 4. In an embodiment, the term "a plurality of" may mean one of a number greater than or equal to 2, such as 2, 3, and 4.

[0063] Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In describing the embodiments of this specification, if it is determined that a detailed description of a related known configuration or function may obscure the gist of this specification, the detailed description will be omitted. The same reference numerals will be used for identical components in the drawings, and duplicate descriptions of identical components will be omitted.

[0064]

[0065] Glossary of Terms

[0066] Hereinafter, “video” may mean a single picture constituting a video, or may refer to the video itself. For example, “encoding and / or decoding of a video” may mean “encoding and / or decoding of a video,” or may mean “encoding and / or decoding of one of the videos constituting the video.”

[0067] Hereinafter, the terms "video" and "movie" may be used interchangeably and have the same meaning. Furthermore, the target image may be an encoding target image, which is the target of encoding, and / or a decoding target image, which is the target of decoding. Furthermore, the target image may be an input image input to an encoding device, or an input image input to a decoding device. Here, the target image may have the same meaning as the current image.

[0068] Hereinafter, “image”, “picture”, “frame” and “screen” may be used with the same meaning and may be used interchangeably.

[0069] Hereinafter, the term "target block" may refer to an encoding target block, which is the target of encoding, and / or a decoding target block, which is the target of decoding. Furthermore, the target block may refer to a current block, which is the target of current encoding and / or decoding. For example, the terms "target block" and "current block" may be used interchangeably and have the same meaning.

[0070] Hereinafter, "block" and "unit" may be used with the same meaning and may be used interchangeably. In addition, "unit" may mean including a luminance component block and a corresponding chroma component block to distinguish it from a block. For example, a coding tree unit (CTU) may be composed of one luma component (Y) coding tree block (CTB) and two chroma component (Cb, Cr) coding tree blocks associated with it.

[0071] Hereinafter, “sample,” “pixel,” and “pixel” may be used interchangeably and have the same meaning. Here, a sample may represent a basic unit that constitutes a block.

[0072] Hereinafter, “inter” and “between screens” may be used interchangeably and have the same meaning.

[0073] Hereinafter, “intra” and “within screen” may be used interchangeably and have the same meaning.

[0074]

[0075] Figure 1 is a block diagram showing the configuration according to one embodiment of an encoding device to which the present invention is applied.

[0076] The encoding device (100) may be an encoder, a video encoding device, or an image encoding device. A video may include one or more images. The encoding device (100) may sequentially encode one or more images.

[0077] Referring to FIG. 1, the encoding device (100) may include an image segmentation unit (110), an intra prediction unit (120), a motion prediction unit (121), a motion compensation unit (122), a switch (115), a subtractor (113), a transformation unit (130), a quantization unit (140), an entropy encoding unit (150), an inverse quantization unit (160), an inverse transformation unit (170), an adder (117), a filter unit (180), and a reference picture buffer (190).

[0078] Additionally, the encoding device (100) can generate a bitstream including encoded information through encoding an input image and output the generated bitstream. The generated bitstream can be stored in a computer-readable recording medium or can be streamed via a wired / wireless transmission medium.

[0079] The video segmentation unit (110) can segment the input video into various forms to increase the efficiency of video encoding / decoding. That is, the input video is composed of multiple pictures, and one picture can be hierarchically segmented and processed for compression efficiency, parallel processing, etc. For example, one picture can be segmented into one or more tiles or slices, which can then be segmented into multiple Coding Tree Units (CTUs). Alternatively, one picture can first be segmented into multiple sub-pictures defined as groups of rectangular slices, and each sub-picture can then be segmented into the tiles / slices. Here, the sub-pictures can be utilized to support the function of partially independently encoding / decoding and transmitting the picture. Since multiple sub-pictures can each be individually restored, there is an advantage of easy editing in applications that configure multi-channel input into a single picture. In addition, tiles can be segmented horizontally to generate bricks. Here, a brick can be utilized as the basic unit of parallel processing within a picture. In addition, one CTU can be recursively split into a quadtree (QT), and the terminal node of the split can be defined as a coding unit (CU). The CU can be split into a prediction unit (PU) and a transformation unit (TU), and prediction and splitting can be performed. Meanwhile, the CU can be utilized as a prediction unit and / or a transformation unit itself. Here, for flexible splitting, each CTU can be recursively split into a multi-type tree (MTT) as well as a quadtree (QT). Splitting of a CTU into a multi-type tree can start from the terminal node of a QT, and the MTT can be composed of a binary tree (BT) and a triple tree (TT).For example, the MTT structure can be divided into vertical binary split mode (SPLIT_BT_VER), horizontal binary split mode (SPLIT_BT_HOR), vertical ternary split mode (SPLIT_TT_VER), and horizontal ternary split mode (SPLIT_TT_HOR). In addition, the minimum block size (MinQTSize) of the quad tree of the luminance block during splitting can be set to 16x16, the maximum block size (MaxBtSize) of the binary tree can be set to 128x128, and the maximum block size (MaxTtSize) of the triple tree can be set to 64x64. In addition, the minimum block size (MinBtSize) of the binary tree and the minimum block size (MinTtSize) of the triple tree can be set to 4x4, and the maximum depth (MaxMttDepth) of the multi-type tree can be set to 4. Additionally, to improve the encoding efficiency of the I slice, a dual tree can be applied that uses different CTU partition structures for the luminance and chrominance components. On the other hand, in the P and B slices, the luminance and chrominance CTBs (Coding Tree Blocks) within the CTU can be partitioned into a single tree that shares the coding tree structure.

[0080] The encoding device (100) may perform encoding on the input image in intra mode and / or inter mode. Alternatively, the encoding device (100) may perform encoding on the input image in a third mode (e.g., IBC mode, Palette mode, etc.) other than the intra mode and inter mode. However, if the third mode has functional characteristics similar to the intra mode or inter mode, it may be classified as intra mode or inter mode for convenience of explanation. In the present invention, the third mode will be classified and described separately only when a specific description is required.

[0081] When the intra mode is used as the prediction mode, the switch (115) can be switched to intra, and when the inter mode is used as the prediction mode, the switch (115) can be switched to inter. Here, the intra mode can mean the intra prediction mode, and the inter mode can mean the inter-screen prediction mode. The encoding device (100) can generate a prediction block for an input block of an input image. In addition, after the prediction block is generated, the encoding device (100) can encode a residual block using the residual of the input block and the prediction block. The input image can be referred to as a current image that is currently a target of encoding. The input block can be referred to as a current block that is currently a target of encoding or an encoding target block.

[0082] When the prediction mode is intra mode, the intra prediction unit (120) can use samples of blocks already encoded / decoded around the current block as reference samples. The intra prediction unit (120) can perform spatial prediction on the current block using the reference samples, and can generate prediction samples for the input block through spatial prediction. Here, intra prediction can mean prediction within the screen.

[0083] As an intra prediction method, non-directional prediction modes such as DC mode and Planar mode, as well as directional prediction modes (e.g., 65 directions) can be applied. Here, the intra prediction method can be expressed as an intra prediction mode or an intra prediction mode.

[0084] When the prediction mode is inter mode, the motion prediction unit (121) can search for an area that best matches the input block from the reference image during the motion prediction process and derive a motion vector using the searched area. At this time, the area can be used as a search area. The reference image can be stored in the reference picture buffer (190). Here, when encoding / decoding for the reference image is processed, it can be stored in the reference picture buffer (190).

[0085] The motion compensation unit (122) can generate a prediction block for the current block by performing motion compensation using a motion vector. Here, inter prediction may mean inter-screen prediction or motion compensation.

[0086] The above motion prediction unit (121) and motion compensation unit (122) can generate a prediction block by applying an interpolation filter to a portion of the reference image when the value of the motion vector does not have an integer value. In order to perform inter-screen prediction or motion compensation, it is possible to determine whether the motion prediction and motion compensation method of the prediction unit included in the corresponding encoding unit is one of Skip Mode, Merge Mode, Advanced Motion Vector Prediction (AMVP) mode, and Intra Block Copy (IBC) mode based on the encoding unit, and inter-screen prediction or motion compensation can be performed according to each mode.

[0087] In addition, based on the above inter-screen prediction method, the AFFINE mode of sub-PU based prediction, the SbTMVP (Subblock-based Temporal Motion Vector Prediction) mode, and the MMVD (Merge with MVD) mode and the GPM (Geometric Partitioning Mode) mode of PU based prediction can be applied. In addition, in order to improve the performance of each mode, the HMVP (History based MVP), the PAMVP (Pairwise Average MVP), the CIIP (Combined Intra / Inter Prediction), the AMVR (Adaptive Motion Vector Resolution), the BDOF (Bi-Directional Optical-Flow), the BCW (Bi-predictive with CU Weights), the LIC (Local Illumination Compensation), the TM (Template Matching), and the OBMC (Overlapped Block Motion Compensation) can be applied.

[0088] The subtractor (113) can generate a residual block using the difference between the input block and the predicted block. The residual block may also be referred to as a residual signal. The residual signal may refer to the difference between the original signal and the predicted signal. Alternatively, the residual signal may be a signal generated by transforming, quantizing, or transforming and quantizing the difference between the original signal and the predicted signal. The residual block may be a residual signal in block units.

[0089] The transform unit (130) can perform a transform on the residual block to generate a transform coefficient and output the generated transform coefficient. Here, the transform coefficient may be a coefficient value generated by performing a transform on the residual block. When the transform skip mode is applied, the transform unit (130) may also skip the transform on the residual block.

[0090] Quantized levels can be generated by applying quantization to transform coefficients or residual signals. In the following embodiments, quantized levels may also be referred to as transform coefficients.

[0091] For example, a 4x4 luminance residual block generated through within-screen prediction can be transformed using a basis vector based on DST (Discrete Sine Transform), and the remaining residual blocks can be transformed using a basis vector based on DCT (Discrete Cosine Transform). In addition, through RQT (Residual Quad Tree) technology, the transform block is divided into a quad tree shape for one block, and after performing transformation and quantization on each transform block divided through RQT, a coded block flag (cbf) can be transmitted to increase encoding efficiency when all coefficients become 0.

[0092] Another alternative is to apply Multiple Transform Selection (MTS) technology, which selectively performs transformation using multiple transformation bases. That is, instead of dividing CUs into TUs via RQT, a Sub-block Transform (SBT) technology can perform a function similar to TU division. Specifically, SBT is applied only to inter-screen prediction blocks, and unlike RQT, it can divide the current block into ½ or ¼ blocks vertically or horizontally, and then perform transformation on only one of the blocks. For example, in a vertically divided block, the transformation can be performed on the leftmost or rightmost block, and in a horizontally divided block, the transformation can be performed on the topmost or bottommost block.

[0093] Additionally, LFNST (Low Frequency Non-Separable Transform), a secondary transform technique that further transforms the residual signal converted to the frequency domain through DCT or DST, can be applied. LFNST additionally performs a transform on the low-frequency region of 4x4 or 8x8 in the upper left, which allows the residual coefficients to be concentrated in the upper left.

[0094] The quantization unit (140) can generate a quantized level by quantizing a transform coefficient or residual signal according to a quantization parameter (QP), and can output the generated quantized level. At this time, the quantization unit (140) can quantize the transform coefficient using a quantization matrix.

[0095] For example, a quantizer with QP values ​​of 0 to 51 can be used. Alternatively, if the image size is larger and high encoding efficiency is required, a QP of 0 to 63 can be used. In addition, a Dependent Quantization (DQ) method that uses two quantizers instead of a single quantizer can be applied. DQ performs quantization using two quantizers (e.g., Q0 and Q1), but even without signaling information about the use of a specific quantizer, the quantizer to be used for the next transform coefficient can be selected based on the current state through a state transition model.

[0096] The entropy encoding unit (150) can generate a bitstream by performing entropy encoding according to a probability distribution on values ​​produced by the quantization unit (140) or coding parameter values ​​produced during the encoding process, and can output the bitstream. The entropy encoding unit (150) can perform entropy encoding on information about image samples and information for decoding the image. For example, the information for decoding the image can include syntax elements, etc.

[0097] When entropy encoding is applied, a small number of bits are allocated to symbols with a high occurrence probability, and a large number of bits are allocated to symbols with a low occurrence probability, thereby representing the symbols, whereby the size of the bit string for the symbols to be encoded can be reduced. The entropy encoding unit (150) can use an encoding method such as exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), or Context-Adaptive Binary Arithmetic Coding (CABAC) for entropy encoding. For example, the entropy encoding unit (150) can perform entropy encoding using a Variable Length Coding / Code (VLC) table. In addition, the entropy encoding unit (150) may perform arithmetic encoding using the binarization method, probability model, and context model derived from the binarization method of the target symbol and the probability model of the target symbol / bin.

[0098] In this regard, when applying CABAC, the table probability update method can be changed to a simple formula-based table update method to reduce the size of the probability table stored in the decryption device. Furthermore, two different probability models can be used to obtain more accurate symbol probability values.

[0099] The entropy encoding unit (150) can change a two-dimensional block form coefficient into a one-dimensional vector form through a transform coefficient scanning method to encode a transform coefficient level (quantized level).

[0100] Coding parameters may include not only information (flags, indexes, etc.) encoded in an encoding device (100) and signaled to a decoding device (200), such as syntax elements, but also information derived during an encoding process or a decoding process, and may mean information necessary when encoding or decoding an image.

[0101] Here, signaling a flag or index may mean that the encoder entropy encodes the flag or index and includes it in the bitstream, and that the decoder entropy decodes the flag or index from the bitstream.

[0102] The encoded current image can be used as a reference image for other images to be processed later. Accordingly, the encoding device (100) can reconstruct or decode the encoded current image again and store the reconstructed or decoded image as a reference image in the reference picture buffer (190).

[0103] The quantized level can be dequantized in the dequantization unit (160) and inversely transformed in the inverse transformation unit (170). The dequantized and / or inversely transformed coefficients can be combined with a prediction block through an adder (117), and a reconstructed block can be generated by combining the dequantized and / or inversely transformed coefficients and the prediction block. Here, the dequantized and / or inversely transformed coefficients refer to coefficients on which at least one of dequantization and inverse transformation has been performed, and may refer to a reconstructed residual block. The dequantization unit (160) and the inverse transformation unit (170) can be performed in the reverse process of the quantization unit (140) and the transformation unit (130).

[0104] The restoration block may pass through a filter unit (180). The filter unit (180) may apply a deblocking filter, a sample adaptive offset (SAO), an adaptive loop filter (ALF), a bilateral filter (BIF), a Luma Mapping with Chroma Scaling (LMCS), etc. as a filtering technique, in whole or in part, to the restoration sample, restoration block, or restoration image. The filter unit (180) may also be referred to as an in-loop filter. In this case, the in-loop filter is also used as a name excluding LMCS.

[0105] A deblocking filter can remove block distortion that occurs at the boundaries between blocks. Whether to apply a deblocking filter to the current block can be determined based on the samples contained in several columns or rows within the block. When applying a deblocking filter to a block, different filters can be applied depending on the required deblocking filtering strength.

[0106] Sample adaptive offset can be used to compensate for encoding errors by adding an appropriate offset value to sample values. Sample adaptive offset can compensate for the offset from the original image on a sample-by-sample basis for deblocked images. This can be done by dividing the samples contained in the image into a fixed number of regions, determining the regions to be offset, and applying the offset to those regions. Alternatively, the offset can be applied by considering the edge information of each sample.

[0107] Bilateral filter (BIF) can also compensate for the offset from the original image on a sample-by-sample basis for the deblocked image.

[0108] An adaptive loop filter can perform filtering based on a comparison between a reconstructed image and the original image. By dividing the samples contained in the image into predetermined groups and determining the filter to be applied to each group, filtering can be performed differentially for each group. Information regarding whether to apply an adaptive loop filter can be signaled for each coding unit (CU), and the shape and filter coefficients of the adaptive loop filter applied to each block can vary.

[0109] In LMCS (Luma Mapping with Chroma Scaling), luma mapping (LM) refers to remapping luminance values ​​through a piece-wise linear model, and chroma scaling (CS) refers to a technique that scales the residual values ​​of chrominance components according to the average luminance value of the prediction signal. In particular, LMCS can be utilized as an HDR correction technique that reflects the characteristics of HDR (High Dynamic Range) images.

[0110] The restored block or restored image that has passed through the filter unit (180) may be stored in the reference picture buffer (190). The restored block that has passed through the filter unit (180) may be a part of the reference image. In other words, the reference image may be a restored image composed of restored blocks that have passed through the filter unit (180). The stored reference image may be used for inter-screen prediction or motion compensation thereafter.

[0111] Figure 2 is a block diagram showing the configuration according to one embodiment of a decryption device to which the present invention is applied.

[0112] The decoding device (200) may be a decoder, a video decoding device, or an image decoding device.

[0113] Referring to FIG. 2, the decoding device (200) may include an entropy decoding unit (210), an inverse quantization unit (220), an inverse transformation unit (230), an intra prediction unit (240), a motion compensation unit (250), an adder (201), a switch (203), a filter unit (260), and a reference picture buffer (270).

[0114] The decoding device (200) can receive a bitstream output from the encoding device (100). The decoding device (200) can receive a bitstream stored in a computer-readable recording medium, or a bitstream streamed through a wired / wireless transmission medium. The decoding device (200) can perform decoding on the bitstream in intra mode or inter mode. In addition, the decoding device (200) can generate a restored image or a decoded image through decoding, and can output the restored image or the decoded image.

[0115] If the prediction mode used for decryption is intra mode, the switch (203) can be switched to intra. If the prediction mode used for decryption is inter mode, the switch (203) can be switched to inter.

[0116] The decoding device (200) can decode the input bitstream to obtain a reconstructed residual block and generate a prediction block. Once the reconstructed residual block and the prediction block are obtained, the decoding device (200) can generate a reconstructed block to be decoded by adding the reconstructed residual block and the prediction block. The block to be decoded may be referred to as a current block.

[0117] The entropy decoding unit (210) can generate symbols by performing entropy decoding according to a probability distribution for the bitstream. The generated symbols may include symbols in the form of quantized levels. Here, the entropy decoding method may be the reverse process of the entropy encoding method described above.

[0118] The entropy decoding unit (210) can change a one-dimensional vector-shaped coefficient into a two-dimensional block-shaped coefficient through a transform coefficient scanning method to decode a transform coefficient level (quantized level).

[0119] The quantized level can be dequantized in the dequantization unit (220) and inversely transformed in the inverse transformation unit (230). The quantized level can be generated as a restored residual block as a result of performing the dequantization and / or inverse transformation. At this time, the inverse quantization unit (220) can apply a quantization matrix to the quantized level. The inverse quantization unit (220) and inverse transformation unit (230) applied to the decoding device can apply the same technology as the inverse quantization unit (160) and inverse transformation unit (170) applied to the encoding device described above.

[0120] When intra mode is used, the intra prediction unit (240) can generate a predicted block by performing spatial prediction on the current block using sample values ​​of already decoded blocks surrounding the block to be decoded. The intra prediction unit (240) applied to the decoding device can apply the same technology as the intra prediction unit (120) applied to the encoding device described above.

[0121] When the inter mode is used, the motion compensation unit (250) can generate a prediction block by performing motion compensation using a motion vector and a reference image stored in the reference picture buffer (270) on the current block. The motion compensation unit (250) can generate a prediction block by applying an interpolation filter to a portion of the reference image when the value of the motion vector does not have an integer value. In order to perform motion compensation, it is possible to determine whether the motion compensation method of the prediction unit included in the corresponding encoding unit is skip mode, merge mode, AMVP mode, or current picture reference mode based on the encoding unit, and motion compensation can be performed according to each mode. The motion compensation unit (250) applied to the decoding device can apply the same technology as the motion compensation unit (122) applied to the encoding device described above.

[0122] The adder (201) can add the restored residual block and the predicted block to generate a restored block. The filter unit (260) can apply at least one of an Inverse-LMCS, a deblocking filter, a sample adaptive offset, and an adaptive loop filter to the restored block or restored image. The filter unit (260) applied to the decoding device can apply the same filtering technology as that applied to the filter unit (180) applied to the encoding device described above.

[0123] The filter unit (260) can output a restored image. The restored block or restored image can be stored in the reference picture buffer (270) and used for inter prediction. The restored block that has passed through the filter unit (260) can be a part of the reference image. In other words, the reference image can be a restored image composed of restored blocks that have passed through the filter unit (260). The stored reference image can be used for inter-screen prediction or motion compensation thereafter.

[0124] FIG. 3 is a diagram schematically showing a video coding system to which the present invention can be applied.

[0125] A video coding system according to one embodiment may include an encoding device (10) and a decoding device (20). The encoding device (10) may transmit encoded video and / or image information or data to the decoding device (20) in the form of a file or streaming through a digital storage medium or a network.

[0126] An encoding device (10) according to one embodiment may include a video source generation unit (11), an encoding unit (12), and a transmission unit (13). A decoding device (20) according to one embodiment may include a reception unit (21), a decoding unit (22), and a rendering unit (23). The encoding unit (12) may be referred to as a video / image encoding unit, and the decoding unit (22) may be referred to as a video / image decoding unit. The transmission unit (13) may be included in the encoding unit (12). The reception unit (21) may be included in the decoding unit (22). The rendering unit (23) may include a display unit, and the display unit may be configured as a separate device or an external component.

[0127] The video source generation unit (11) can obtain video / images through a process of capturing, synthesizing, or generating video / images. The video source generation unit (11) can include a video / image capture device and / or a video / image generation device. The video / image capture device can include, for example, one or more cameras, a video / image archive including previously captured video / images, etc. The video / image generation device can include, for example, a computer, a tablet, a smartphone, etc., and can (electronically) generate video / images. For example, a virtual video / image can be generated through a computer, etc., in which case the video / image capture process can be replaced with a process of generating related data.

[0128] The encoding unit (12) can encode the input video / image. The encoding unit (12) can perform a series of procedures such as prediction, transformation, and quantization for compression and encoding efficiency. The encoding unit (12) can output encoded data (encoded video / image information) in the form of a bitstream. The detailed configuration of the encoding unit (12) can also be configured in the same manner as the encoding device (100) of FIG. 1 described above.

[0129] The transmission unit (13) can transmit encoded video / image information or data output in the form of a bitstream to the reception unit (21) of the decoding device (20) via a digital storage medium or a network in the form of a file or streaming. The digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmission unit (13) can include an element for generating a media file through a predetermined file format and can include an element for transmission via a broadcasting / communication network. The reception unit (21) can extract / receive the bitstream from the storage medium or network and transmit it to the decoding unit (22).

[0130] The decoding unit (22) can decode video / image by performing a series of procedures such as inverse quantization, inverse transformation, and prediction corresponding to the operation of the encoding unit (12). The detailed configuration of the decoding unit (22) can also be configured in the same manner as the decoding device (200) of FIG. 2 described above.

[0131] The rendering unit (23) can render the decrypted video / image. The rendered video / image can be displayed through the display unit.

[0132]

[0133] In the present invention, various embodiments of a geometric partitioning mode (GPM) are described. According to the geometric partitioning mode, a block is divided into two partitions by a straight partitioning boundary, and each of the two partitions is independently predicted using different prediction methods, thereby generating a prediction block for each partition. The prediction signals of the prediction blocks for each partition are then weighted and added to generate a final prediction block in the geometric partitioning mode.

[0134] At this time, in order to improve the prediction accuracy of the geometric partitioning mode, not only the intra prediction mode, but also the intra block copy (IBC) mode or the intra template matching (IntraTMP) mode can be applied to each partition divided according to the geometric partitioning mode.

[0135]

[0136] Figure 4 illustrates a combination of intra-screen prediction and inter-screen prediction that can occur in geometric segmentation mode.

[0137] According to one embodiment, two partitions divided according to a geometric partitioning mode can be independently predicted by intra-screen prediction or inter-screen prediction, respectively.

[0138] Block (402) of FIG. 4 applies inter-screen prediction combination. According to this prediction combination, two partitions can be independently predicted based on different motion information. At this time, unidirectional motion compensation is performed for each partition.

[0139] Blocks (404) and (406) of FIG. 4 apply an intra-screen prediction combination. According to the prediction combination, one of the two partitions is predicted based on intra-screen prediction, and the other is predicted based on inter-screen prediction. At this time, unidirectional motion compensation is performed on the partition using inter-screen prediction, and the partition using intra-screen prediction is predicted based on the intra-screen prediction mode.

[0140] In block (408) of Fig. 4, an intra-intra prediction combination is applied. According to the prediction combination, two partitions are independently predicted based on different intra-intra prediction modes.

[0141] Here, the intra-prediction mode includes the regular intra-prediction mode, the intra-template matching mode, and the intra-block copy mode. In addition, the regular intra-prediction mode includes the DC mode, the planar mode, the directional mode, etc., which utilize reference samples adjacent to the current block.

[0142] According to one embodiment, the intra-screen inter-prediction combination can be implemented as a combination of a regular intra-screen prediction mode and an inter-screen prediction mode, a combination of an intra-screen template matching mode and an inter-screen prediction mode, or a combination of an intra-screen block copy mode and an inter-screen prediction mode.

[0143] According to one embodiment, the intra-screen prediction combinations can be implemented as combinations of different regular intra-screen prediction modes, combinations of intra-screen block copy modes based on different block vectors, combinations of intra-screen template matching modes based on different templates, combinations of regular intra-screen prediction modes and intra-screen block copy modes, combinations of regular intra-screen prediction modes and intra-screen template matching modes, or combinations of intra-screen block copy modes and intra-screen template matching modes.

[0144]

[0145] Below, a method of using intra template matching in geometric segmentation mode is described.

[0146] When intra-screen prediction is applied to a partition in geometric partitioning mode, a method of performing prediction of the partition using intra-screen template matching is proposed. Intra-screen template matching can be applied to blocks (404, 406, 408) of FIG. 4 where intra-screen prediction is applied.

[0147]

[0148] Figures 5 to 8 illustrate examples of various templates for template matching within a screen of a partition including an upper left sample.

[0149] Figure 5 illustrates a method for generating prediction blocks according to a template matching mode within a screen in a geometric partitioning mode.

[0150] According to FIG. 5, the current block (500) is divided into a first partition (502) that includes a sample of the upper left corner by a straight-line partitioning boundary and a second partition (504) that does not. Here, the first partition (502) is encoded using an intra-screen template matching mode, which is one of the intra-screen prediction methods, and the second partition (504) is encoded using an inter-screen prediction.

[0151] For on-screen template matching of the first partition (502), an L-shaped current template (506) composed of reference samples adjacent to the first partition (502) is defined. Then, a reference template (514) most similar to the current template (506) is searched for in the reconstructed area. Then, a block corresponding to the reference template (514) can be selected as a prediction block (512).

[0152] According to one embodiment, the region in which the reference template is searched may be limited to a predefined search range. Alternatively, the predefined search range may be composed of all or part of R1, R2, R3, and R4. Here, R1 is defined as a current encoding tree block, R2 is defined as an upper-left encoding tree block of the current encoding tree block, R3 is defined as an upper encoding tree block of the current encoding tree block, and R4 is defined as a left encoding tree block of the current encoding tree block. However, this is only one example, and R1, R2, R3, and R4 may be defined as other arbitrary sizes and positions. In addition, the search range may further include other arbitrary blocks in addition to R1, R2, R3, and R4.

[0153] Expanding the search area for reference templates increases the likelihood of finding a reference template similar to the current template, but may also increase the computational effort required to find the reference template. Conversely, narrowing the search area for reference templates decreases the likelihood of finding a reference template similar to the current template, but may also reduce the computational effort required to find the reference template.

[0154] According to one embodiment, if the current block is in geometric partitioning mode and intra-screen prediction is performed for a partition of the current block, information about the intra-screen prediction mode applied to the partition may be encoded. The encoded information may be transmitted to a decoder, and the decoder may apply an intra-screen template matching mode to the partition based on the information.

[0155] According to one embodiment, the size (L1 xh + w1 x L2 + L1 x L2) of the neighboring ┏-shaped template of the current block (500) can also be arbitrarily determined. Here, w and h represent the width and height of the current block (500), respectively. And L1 and L2 represent the left width and the top width of the current template (506), respectively. And w1 represents the width of the first partition (502). Here, w, h, L1, L2, and w1 are arbitrary positive integers. Here, w and h are the width and height of the current block, and L1, L2, and w1 are arbitrary positive integers.

[0156]

[0157] FIG. 6 illustrates an embodiment of a template including left, top, and top-left reference samples for template matching within a screen of a partition including the top-left sample of a block.

[0158] Figure 6 illustrates templates of four embodiments (600, 620, 640, 660) according to the partition division method.

[0159] The current block of Examples 1 to 4 (600, 620, 640, 660) consists of two partitions, and the template matching within the screen is applied to the partition including the upper left sample. And the template of each embodiment consists of an upper region, a left region, and an upper left region. The left region is located on the left side of the template matching partition within the screen and is determined by the left height (H1 or H) of the template matching partition within the screen and the width L1 of the template. The upper region is located on the upper side of the template matching partition within the screen and is determined by the upper width (W1 or W) of the template matching partition within the screen and the width L2 of the template. The upper left region is located on the upper left side of the template matching partition within the screen and is determined by the widths L1 and L2 of the templates of the template matching partition within the screen.

[0160] According to Example 1 (600), depending on the partition division, the upper width W1 of the partition (604) is determined to be smaller than the width W of the current block (602), and the left height H1 of the partition (604) is determined to be smaller than the height H of the current block (602). Accordingly, the template of Example 1 (600) is composed of an upper region (W1 x L2) (606), a left region (L1 x H1) (608), and an upper left region (L1 x L2) (610) of the partition (604).

[0161] According to Example 2 (620), depending on the partition division, the upper width W1 of the partition (624) is determined to be smaller than the width W of the current block (622), and the left height H1 of the partition (624) is determined to be equal to the height H of the current block (622). The template of Example 2 (620) is composed of an upper region (W1 x L2) (626), a left region (L1 x H) (628), and an upper left region (L1 x L2) (630) of the partition (624). And regardless of the division boundary of the partition, the height and size of the left region (628) are constant as H and L1 x H, respectively.

[0162] According to Example 3 (640), depending on the partition division, the upper width W1 of the partition (644) is determined to be equal to the width W of the current block (642), and the left height H1 of the partition (644) is determined to be smaller than the height H of the current block (642). The template of Example 3 (640) is composed of an upper region (W x L2) (646), a left region (L1 x H1) (648), and an upper left region (L1 x L2) (650) of the partition (644). And regardless of the division boundary of the partition, the width and size of the upper region (646) are constant as W, W x L2.

[0163] According to Example 4 (660), depending on the partition division, the upper width W1 of the partition (664) is determined to be equal to the width W of the current block (662), and the left height H1 of the partition (664) is determined to be equal to the height H of the current block (662). Therefore, the template of Example 4 (660) is composed of an upper region (W x L2) (666), a left region (L1 x H) (668), and an upper left region (L1 x L2) (670) of the partition (664). And regardless of the partition boundary of the partition, the width and size of the upper region (666) are constant as W, W x L2. Also, regardless of the partition boundary of the partition, the height and size of the left region (668) are constant as H, L1 x H, respectively. That is, the entire area of ​​the template is constant regardless of the partition boundary of the partition.

[0164] Although each embodiment of FIG. 6 depicts the template as including an upper region, a left region, and an upper left region, depending on the embodiment, the template may include only the upper region or only the left region. For example, if the current block is adjacent to the upper boundary of a picture or slice, the template may include only the left region. Conversely, if the current block is adjacent to the left boundary of a picture or slice, the template may include only the upper region. Additionally, the region included in the template may be determined based on the presence or absence of a reference sample corresponding to each region. Alternatively, the region included in the template may be determined based on prediction accuracy, regardless of the current block.

[0165] Here, W and H are the width and height of the current block, and W1, H1, L1, and L2 are arbitrary positive integers.

[0166]

[0167] Figure 7 illustrates an embodiment of a template that includes reference samples of an area determined along an extended segmentation boundary, as well as reference samples of the left, upper, and upper left sides.

[0168] The current block (700) is composed of a partition (702) and an inter-screen partition (704). The template is composed of an upper region (706), a left region (708), an upper-left region (710), an upper-right region (712), and a lower-left region (714). The upper-right region (712) is located to the right of the upper region (706) and is determined by an extended partition boundary. The lower-left region (714) is located below the left region (708) and is determined by an extended partition boundary. The upper region (706), left region (708), and upper left region (710) of FIG. 7 can be determined in the same manner as the upper region (606, 626, 646, 666), left region (608, 628, 648, 668), and upper left region (610, 630, 650, 670) of FIG. 6, according to the division boundary.

[0169] The upper right region ((W2 x L2) / 2) (712) is determined by the upper right region width W2 and the top width L2 of the template. The upper right region width W2 is determined by the extended segmentation boundary and the top width L2 of the template. And the lower left region ((L1 x H2) / 2) (714) is determined by the lower left region height H2 and the left side width L1 of the template. The lower left region height H2 is determined by the extended segmentation boundary and the left side width L1 of the template.

[0170] According to the segmentation boundary of the current block (700), the upper right region (712) and the lower left region (714) are added to the template, thereby expanding the scope of the template. By expanding the scope of the template based on the segmentation boundary, the prediction accuracy of the reference block according to template matching can be improved.

[0171] Although FIG. 7 depicts the template as including all of the upper region (706), the left region (708), the upper left region (710), the upper right region (712), and the lower left region (714), depending on the embodiment, the template may include only some of the five regions. For example, if the current block (700) is located at the top of a picture or slice, the template may include only the left region (708) and the lower left region (714). Conversely, if the current block (700) is located at the left end of a picture or slice, the template may include only the upper region (706) and the upper right region (712). Additionally, the regions included in the template may be determined based on the presence or absence of reference samples corresponding to each region. Alternatively, the regions included in the template may be determined based on prediction accuracy, regardless of the current block (700).

[0172]

[0173] Figure 8 illustrates an embodiment of a template that includes reference samples on the left, upper, and upper left sides, as well as reference samples on the lower left and upper right sides.

[0174] The current block (800) is composed of a partition (802) and an inter-screen partition (804). The template is composed of an upper region (806), a left region (808), an upper left region (810), an upper right region (812), and a lower left region (814). The five regions are determined by the size of the current block (800), regardless of the partitioning method of the current block (800).

[0175] The upper area (W x L2) (806) is determined by the width W of the current block (800) and the top width L2 of the template. The left area (L1 x H) (808) is determined by the height H of the current block (800) and the left width L1 of the template. The upper left area (L1 x L2) (810) is determined by the left width L1 and the top width L2 of the template.

[0176] The upper right region (812) is determined by an arbitrary value W1 and the upper width L2 of the template. Here, W1 can be determined based on the value of W. For example, W1 can be N times W. N can be 1, 1 / 2, 1 / 4, ..., 1 / 2. k It can have values ​​such as W1. Alternatively, W1 can have a fixed value. Alternatively, W1 can be determined based on the partitioning method of the current block (800). For example, as the upper width of the partition (802) increases, W1 can increase.

[0177] And the lower left region (814) is determined by an arbitrary value H1 and the left width L1 of the template. Here, H1 can be determined based on the value of H. For example, H1 can be N times H. N is 1, 1 / 2, 1 / 4, ..., 1 / 2 k It can have values ​​such as H1. Alternatively, H1 can have a fixed value. Alternatively, H1 can be determined based on the partitioning method of the current block (800). For example, H1 can increase as the left height of the partition (802) increases.

[0178] By extending the range of the template of the partition (802) to all reference samples around the current block (800), the prediction accuracy of the reference block according to template matching can be improved.

[0179] Although FIG. 8 depicts the template as including the upper region, left region, upper left region, lower left region, and upper right region, depending on the embodiment, the template may include only some of the five regions. For example, if the current block is located at the top of a picture or slice, the template may include only the left region and lower left region. Conversely, if the current block is located at the left end of a picture or slice, the template may include only the upper region and upper right region. Additionally, the regions included in the template may be determined based on the presence or absence of reference samples corresponding to each region. Alternatively, the regions included in the template may be determined based on prediction accuracy, regardless of the current block.

[0180]

[0181] Any form of template not described in FIGS. 6 to 8 may be used for template matching within the screen. Furthermore, although the method for determining the form of a template is described in FIGS. 6 to 8 when a partition containing the upper left sample is in template matching mode within the screen, the form of a template may be determined in the same manner when another partition not containing the upper left sample is in template matching mode within the screen.

[0182]

[0183] Figures 9 and 10 illustrate examples of various templates for on-screen template matching of a partition that does not include the upper left sample.

[0184] Figure 9 illustrates a method for predicting the second partition of the current block according to the template matching mode within the screen.

[0185] In Fig. 9, the current block (900) is divided into a first partition (902) that includes a sample of the upper left corner by a straight-line partitioning boundary in a geometric partitioning mode and a second partition (904) that does not. Here, the second partition (904) is encoded in an intra-screen template matching mode, which is one of the intra-screen prediction methods, and the first partition (902) is encoded in an inter-screen prediction mode.

[0186] For template matching within the screen of the second partition (904), a current template (906) having a rectangular shape and composed of reference samples adjacent to the second partition (904) is defined. Then, a reference template (914) most similar to the current template (906) is searched for in the restored area. Then, a block corresponding to the reference template (914) can be selected as a prediction block (912). The area in which the reference template of FIG. 9 is searched for can be limited to the search range described in FIG. 5.

[0187] According to one embodiment, the size (w2 x L2) and shape of the neighboring rectangular template of the current block (900) can also be arbitrarily determined. Here, w2 represents the length of the top of the second partition (904), and L2 represents the top width of the current template (906). Here, w2 and L2 are arbitrary positive integers.

[0188]

[0189] Figure 10 illustrates an embodiment of a template including left and upper reference samples for template matching within a screen of a partition that does not include the upper left sample of a block.

[0190] Figure 10 shows templates of four embodiments (1000, 1020, 1040) according to the partition division method.

[0191] The current block of Examples 1 to 3 (1000, 1020, 1040) consists of two partitions, and template matching within the screen is applied to the partition that does not include the upper left sample. The template of each embodiment includes at least one of an upper region and a left region according to a partitioning method. The left region is located on the left side of the template matching partition within the screen and is determined by the left height H1 of the template matching partition within the screen and the width L1 of the template. The upper region is located on the upper side of the template matching partition within the screen and is determined by the upper width W1 of the template matching partition within the screen and the width L2 of the template. The upper width W1 of the partition is determined to be smaller than the width W of the current block, and the left height H1 of the partition is determined to be smaller than the height H of the current block.

[0192] According to Example 1 (1000), depending on the partitioning, a part of the boundary of the partition (1004) overlaps a part of the upper boundary and a part of the left boundary of the current block (1002). Therefore, the template of Example 1 (1000) is composed of an upper region (W1 x L2) (1006) and a left region (L1 x H1) (1008) of the partition (1004).

[0193] According to Example 2 (1020), depending on the partitioning, a part of the boundary of the partition (1024) overlaps a part of the upper boundary of the current block (1022). Therefore, the template of Example 2 (1020) is composed of an upper region (W1 x L2) (1026) of the partition (1024).

[0194] According to Example 3 (1040), depending on the partitioning, a part of the boundary of the partition (1044) overlaps with a part of the left boundary of the current block (1042). Therefore, the template of Example 3 (1040) consists of a left region (L1 x H1) (1046).

[0195]

[0196] Below, a method for determining the prediction method of two partitions of a block where template matching within the partition is allowed is described.

[0197] If both the first partition and the second partition of the current block are predicted by intra-picture prediction, the intra-picture template matching mode may be applied to at least one of the two partitions. At this time, in the encoder, information indicating which mode among the regular intra-picture prediction mode and the intra-picture template matching mode is applied to the first partition may be encoded. Similarly, in the encoder, information indicating which mode among the regular intra-picture prediction mode and the intra-picture template matching mode is applied to the second partition may be encoded. The information may be transmitted to the decoder and decoded by the decoder.

[0198] According to one embodiment, the intra-screen template matching mode may be applied to only one of the first partition or the second partition. Accordingly, the intra-screen template matching mode may be applied to one of the first partition and the second partition, and the regular intra-screen prediction mode may be applied to the other partition. If the intra-screen template matching is applied to only one partition, the encoder encodes and transmits information indicating the partition to which the intra-screen template matching mode is applied and the regular intra-screen prediction mode information of the partition to which the intra-screen template matching mode is not applied. The information is then parsed by the decoder.

[0199] Whether to perform template matching within a screen can be determined based on the regular screen prediction mode information of the partition. For example, if a predetermined mode is applied to a partition to which the regular screen prediction mode is applied, the regular screen prediction mode can be applied instead of the template matching mode within a screen to other partitions. Conversely, if the predetermined mode is not applied to a partition to which the regular screen prediction mode is applied, the template matching mode within a screen can be applied to other partitions. The predetermined mode can include a planar mode, a DC mode, a horizontal mode, or a vertical mode. Alternatively, the predetermined mode can include another regular screen prediction mode.

[0200] According to one embodiment, the in-screen template matching mode may be applied to both the first partition and the second partition of the current block. At this time, the encoder may encode and transmit information indicating whether the in-screen template matching mode is applied individually to each partition. The decoder may decode the information of each partition. In addition, if the in-screen template matching mode is applied to both the first partition and the second partition of the current block, the templates of the first partition and the templates of the second partition may be determined so as not to overlap each other or to minimize the overlapping area.

[0201] According to one embodiment, whether the in-screen template matching mode is applied to the first partition and the second partition may be determined based on the partitioning method of the current block. For example, the in-screen template matching mode may not be applied to a partition that is not adjacent to the upper boundary or the left boundary of the current block. Alternatively, whether the in-screen template matching mode is applied to a partition may be determined based on how much the upper boundary and the left boundary of the current block overlap with the boundary of the partition. Alternatively, whether the in-screen template matching mode is applied to a partition may be determined based on whether the partition includes a sample at a specific location of the current block. Alternatively, whether the in-screen template matching mode is applied may be determined based on the width, height, aspect ratio, and / or size of a specific partition that is divided (e.g., a small-sized partition).

[0202]

[0203] The method proposed in this embodiment can be applied depending on the size of the block. For example, the proposed method can be applied only when the width and / or height of the block is greater than or equal to a predetermined value (e.g., 4) or less than or equal to a predetermined value (e.g., 64). Alternatively, the proposed method can be applied only when the width of the block is less than a predetermined integer multiple of the height. Conversely, the proposed method can be applied only when the height of the block is less than a predetermined integer multiple of the width. Alternatively, depending on the embodiment, the proposed method can be applied only when the product of the width and height of the block is greater than or equal to a predetermined value (e.g., 32).

[0204]

[0205] Below, a method for applying intra block copy in geometric partition mode is described.

[0206] Figures 11 and 12 illustrate the intra block copy mode applied to the geometric segmentation mode.

[0207] Figure 11 illustrates a method for predicting partitions according to the block copy mode within the screen in the geometric partitioning mode.

[0208] The intra-screen block copy mode can be used in the remaining prediction combinations except for the inter-screen prediction combinations in FIG. 4. According to FIG. 11, the current block (1100) is divided into a first partition (1102) and a second partition (1104). Here, the first partition (1102) is encoded using the intra-screen block copy mode, which is one of the intra-screen prediction methods, and the second partition (1104) is encoded using inter-screen prediction.

[0209] The encoder searches for a matching block (1112) that is most similar to the first partition (1102) in the restored region. The most similar matching block (1112) can be selected as the prediction block of the first partition (1102).

[0210] According to one embodiment, the area in which the matching block (1112) is searched may be limited to a predefined search range. Alternatively, the predefined search range may be composed of all or part of R1, R2, R3, and R4. Here, R1 is defined as a current encoding tree block, R2 is defined as an upper left encoding tree block of the current encoding tree block, R3 is defined as an upper encoding tree block of the current encoding tree block, and R4 is defined as a left encoding tree block of the current encoding tree block. However, this is only one example, and R1, R2, R3, and R4 may be defined as other arbitrary sizes and positions. In addition, the search range may further include other arbitrary blocks in addition to R1, R2, R3, and R4.

[0211] The block copy mode within the screen is performed based on a block vector (1114). Accordingly, the block vector information is transmitted and parsed by the encoder. Then, the decoder can predict a given partition according to the block vector information according to the block copy mode within the screen.

[0212] In Fig. 11, the on-screen block copy mode is applied to the first partition, but depending on the embodiment, the on-screen block copy mode may be applied to the second partition in the same manner as described above.

[0213]

[0214] Figure 12 illustrates a method for predicting the second partition of the current block according to the block copy mode within the screen.

[0215] In Fig. 12, the current block (1200) is divided into a first partition (1202) that includes a sample of the upper left corner by a straight-line partitioning boundary in a geometric partitioning mode and a second partition (1204) that does not. Here, the second partition (1204) is encoded in an intra-block copy mode, which is one of the intra-picture prediction methods, and the first partition (1202) is encoded in an inter-picture prediction mode.

[0216] The encoder searches for a matching block (1212) that is most similar to the second partition (1204) in the restored region. The most similar matching block (1212) may be selected as the prediction block of the second partition (1204). Here, the search range of the matching block (1212) may be limited to the search range described in FIG. 11.

[0217]

[0218] In Figures 11 and 12, the geometric partitioning mode to which the on-screen block copy mode can be applied is performed based on a block vector. Therefore, block vector information must be encoded and transmitted in the encoder. And, in the decoder, on-screen block copy of the partition can be performed based on the block vector information.

[0219] If both the first partition and the second partition of the current block are predicted by intra-picture prediction, the intra-picture block copy mode may be applied to one or more of the two partitions. At this time, in the encoder, information indicating which mode among the regular intra-picture prediction mode and the intra-picture block copy mode is applied to the first partition may be encoded. Similarly, in the encoder, information indicating which mode among the regular intra-picture prediction mode and the intra-picture block copy mode is applied to the second partition may be encoded. The information may be transmitted to the decoder and decoded by the decoder.

[0220] According to one embodiment, the intra-screen block copy mode may be applied to only one of the first partition or the second partition. Accordingly, the intra-screen block copy mode may be applied to only one of the first partition and the second partition, and the intra-screen prediction mode may be applied to the other partition. If the intra-screen block copy mode is applied to only one partition, the encoder encodes and transmits information indicating the partition to which the intra-screen block copy mode is applied and the regular intra-screen prediction mode information of the partition to which the intra-screen block copy mode is not applied. The information is then parsed by the decoder.

[0221] Whether to perform intra-screen block copy can be determined based on the regular intra-screen prediction mode information of the partition to which the regular intra-screen prediction mode is applied. For example, if the intra-screen prediction mode of the partition to which the intra-screen prediction mode is applied is a predetermined mode, the intra-screen prediction mode can be applied to other partitions instead of the intra-screen block copy mode. Conversely, if the intra-screen prediction mode of the partition to which the intra-screen prediction mode is applied is not a predetermined mode, the intra-screen block copy mode can be applied to other partitions. The predetermined mode can include a Planar mode, a DC mode, a Horizontal mode, or a Vertical mode. Alternatively, the predetermined mode can include another intra-screen prediction mode.

[0222] According to one embodiment, the in-screen block copy mode may be applied to both the first and second partitions of the current block. In this case, the encoder may encode and transmit information indicating whether the in-screen block copy mode is applied individually for each partition. In addition, the encoder may encode and transmit block vector information of each partition to which the in-screen block copy mode is applied. In addition, the decoder may decode the above information of each partition.

[0223] According to one embodiment, when the current block is in geometric partition mode and the intra-screen block copy mode is applied to a partition of the current block, the prediction method information of each partition can be parsed (transmitted) as follows. First, information about the first partition (the first partition flag) is parsed to determine the prediction mode for the first partition among the regular intra-screen prediction mode and the intra-screen block copy mode. If the first partition is in the regular intra-screen prediction mode, information about the second partition (the second partition flag) is not parsed, and the prediction mode for the second partition is determined among the regular intra-screen prediction mode and the intra-screen block copy mode. If the first partition is in the intra-screen block copy mode, information about the second partition (the second partition flag) is parsed to determine the prediction mode for the second partition among the regular intra-screen prediction mode and the intra-screen block copy mode. At this time, for a partition to which the intra-screen block copy mode is applied, block vector information for the corresponding partition can be additionally parsed.

[0224] According to one embodiment, when the current block is in geometric partition mode and the intra-screen block copy mode is applied to a partition of the current block, the parsing (transmission) method is as follows. Information about the first partition (the first partition flag) is parsed to determine a prediction mode for the first partition among the regular intra-screen prediction mode and the intra-screen block copy mode. Then, independently of the first partition, information about the second partition (the second partition flag) is parsed to determine a prediction mode for the second partition among the regular intra-screen prediction mode and the intra-screen block copy mode. At this time, for a partition to which the intra-screen block copy mode is applied, block vector information for the corresponding partition may be additionally parsed.

[0225]

[0226] The proposed method in this embodiment can be applied depending on the size of the block. For example, the proposed method can be applied only when the width and / or height of the block is greater than or equal to a certain value (e.g., 4) and / or less than or equal to a certain value (e.g., 64). Alternatively, the proposed method can be applied only when the width of the block is less than a certain integer multiple of the height. Conversely, the proposed method can be applied only when the height of the block is less than a certain integer multiple of the width. Alternatively, depending on the embodiment, the proposed method can be applied only when the product of the width and height of the block is greater than or equal to a certain value (e.g., 32).

[0227]

[0228] In Figures 13 and 14, a method for efficiently transmitting / parsing block vector information in a block copy mode within a screen in a geometric partitioning mode is described.

[0229] When applying the block copy mode within a screen to one or more partitions in geometric partitioning mode, the block vector information for the partitions must be efficiently encoded. However, if the amount of encoded block vector information is large, encoding efficiency may deteriorate. Therefore, the following embodiments describe a method for efficiently encoding block vectors.

[0230]

[0231] Figure 13 illustrates a method for generating a prediction block based on an intra-screen block copy for an area performing intra-screen prediction in a geometric partitioning mode.

[0232] In Fig. 13, the current picture (1310) is a picture at time t, and the reference picture (1320) is a picture at time tN. Here, t and N are arbitrary positive integer values, 0 ≤ tN < t. In Fig. 13, the reference picture (1320) is positioned before the current picture (1310) in time, but this is merely an example, and the reference picture (1320) may be positioned after the current picture (1310) in time.

[0233] In Fig. 13, the current block (1300) is divided into a first partition (1302) and a second partition (1304) by a straight-line division boundary in a geometric division mode. At this time, intra-screen prediction may be applied to the first partition (1302), and inter-screen prediction may be applied to the second partition (1304). The unidirectional motion vector (1324) of the second partition (1304) to which inter-screen prediction is applied is MV2. And, the block vector (1314) of the first partition (1302) to which intra-screen prediction is applied is BV1. In order to reduce the size of the information of the block vector (1314) of the first partition (1302), the unidirectional motion vector (1324) of the second partition (1304) may be referenced.

[0234]

[0235] Figure 14 shows a method for reducing the size of information of a block vector using a unidirectional motion vector.

[0236] In Fig. 14, the dotted line represents the unidirectional motion vector (1324) MV2 of Fig. 13, and the solid line represents the block vector (1314) BV1 of Fig. 13. The unidirectional motion vector (1324) MV2 and the block vector (1314) BV1 are likely to be similar to each other. Therefore, considering this characteristic, instead of independently encoding the block vector (1314) BV1 and the unidirectional motion vector (1324) MV2, the differential vector (DV) (1400) between the unidirectional motion vector (1324) MV2 and the block vector (1314) BV1 can be encoded. Therefore, the size of the block vector information to be transmitted to the decoder can be efficiently reduced. Mathematical expression 1 shows a method for calculating the vector difference DV.

[0237] [Mathematical Formula 1]

[0238]

[0239] MV2 in Equation 1 x , BV1 x , DV x represents the x-component of the unidirectional motion vector, the x-component of the block vector, and the difference between the x-component of the unidirectional motion vector and the x-component of the block vector, respectively. In Equation 1, MV2 y , BV1 y , DV y represents the y component of the unidirectional motion vector, the y component of the block vector, and the difference between the y component of the unidirectional motion vector and the y component of the block vector, respectively.

[0240] Contrary to the above embodiment, a differential vector (DV) (1400) between a block vector (1314) BV1 and a unidirectional motion vector (1324) MV2 can be encoded.

[0241]

[0242] Fig. 15 shows an embodiment of a prediction method according to a geometric segmentation mode to which an in-screen template matching mode is applied.

[0243] In step 1502, the current block is divided into a first partition and a second partition according to the partitioning boundary.

[0244] At step 1504, it is determined whether the screen template matching mode is applied to the first partition.

[0245] According to one embodiment, the first partition and the second partition may each be applied with one of an inter-screen prediction mode, an intra-screen prediction mode, an intra-screen block copy mode, and an intra-screen template matching mode. The prediction methods applied to the first partition and the second partition may be determined independently of each other.

[0246] According to one embodiment, the prediction method of the second partition may be determined based on the prediction method of the first partition, or conversely, the prediction method of the first partition may be determined based on the prediction method of the second partition. For example, if an intra-screen template matching mode is applied to the first partition and an intra-screen prediction mode is applied to the second partition, the second partition may be predicted by one of the predetermined intra-screen prediction methods. Conversely, if the intra-screen template matching mode is not applied to the first partition and an intra-screen prediction mode is applied to the second partition, the second partition may be predicted by one of the prediction methods that are not included in the predetermined intra-screen prediction methods. The predetermined intra-screen prediction methods may include at least one of a planar mode, a DC mode, a horizontal mode, and a vertical mode. As another example, if an intra-screen template matching mode is applied to the first partition and a regular intra-screen prediction mode is applied to the second partition, the second partition may be predicted by the regular intra-screen prediction modes.

[0247] In one embodiment, when the screen template matching mode is applied to both the first partition and the second partition, the template of the first partition and the template of the second partition may be set not to be identical.

[0248] In step 1506, if the screen template matching mode is applied to the first partition, the template of the first partition is determined.

[0249] According to one embodiment, the first partition includes a sample of the upper left side of the current block, and the template of the first partition may include at least one of a left region located on the left side of the first partition, an upper region located on the upper side of the first partition, and an upper left region located on the upper left side of the first partition.

[0250] In one embodiment, if the current block is adjacent to the upper boundary of the slice or picture containing the current block, the template may include the left region, but not the upper region and the upper left region. Conversely, if the current block is adjacent to the left boundary of the slice or picture containing the current block, the template may include the upper region, but not the left region and the upper left region.

[0251] In one embodiment, the width of the upper region of the template may be set to be equal to the upper width of the first partition, and the height of the left region of the template may be set to be equal to the left height of the first partition. Alternatively, the width of the upper region of the template may be set to be equal to the width of the current block, and the height of the left region of the template may be set to be equal to the height of the current block.

[0252] According to one embodiment, the template of the first partition may further include at least one of a lower left region adjacent to the lower side of the left region and an upper right region adjacent to the right side of the upper region. In addition, the lower left region and the upper right region may be determined according to the extended partition boundary of the current block.

[0253] According to one embodiment, the lower left region may be determined to be adjacent in the lower left direction from the lower left vertex of the current block, and the upper right region may be determined to be adjacent in the upper right direction from the upper right vertex of the current block.

[0254] In one embodiment, the first partition may include the upper left sample of the current block.

[0255] According to one embodiment, the first partition does not include an upper left sample of the current block and is adjacent to at least one of a left boundary and an upper boundary of the current block, and when the first partition is adjacent to the left boundary of the current block, the template of the first partition may include a left area located to the left of the first partition, and when the first partition is adjacent to the upper boundary of the current block, the template of the first partition may include an upper area located to the upper side of the first partition.

[0256] In step 1508, a reference template corresponding to the template of the first partition is determined in the template search range of the current block.

[0257] In step 1510, a reference block referenced by the first partition is determined based on the reference template.

[0258] At step 1512, a first partition is predicted based on the reference block.

[0259] According to the prediction method performed in steps 1502 to 1512, the current block can be encoded or decoded. And the bitstream generated by the encoder according to the prediction method performed in steps 1502 to 1512 can be stored in a recording medium or transmitted externally from the encoder. When the template matching mode within the screen is applied to the second partition, the method of FIG. 15 can be applied not only to the first partition but also to the second partition.

[0260]

[0261] Fig. 16 shows an embodiment of a prediction method according to a geometric division mode to which an in-screen block copy mode is applied.

[0262] In step 1602, the current block is divided into a first partition and a second partition according to the partitioning boundary.

[0263] At step 1604, it is determined whether the first partition is subject to in-screen block copy mode.

[0264] According to one embodiment, the first partition and the second partition may each be applied with one of an inter-screen prediction mode, an intra-screen prediction mode, an intra-screen block copy mode, and an intra-screen template matching mode. The prediction methods applied to the first partition and the second partition may be determined independently. Based on the first partition area flag, it may be determined whether the intra-screen block copy mode is applied to the first partition. And, based on the second partition area flag, it may be determined whether the intra-screen block copy mode is applied to the second partition.

[0265] According to one embodiment, based on the first partition flag, it may be determined whether the in-screen block copy mode is applied to the first partition. If the in-screen block copy mode is not applied to the first partition, it may be determined to apply the in-screen block copy mode to the second partition. Conversely, if the in-screen block copy mode is applied to the first partition, it may be determined whether the in-screen block copy mode is applied to the second partition based on the second partition flag.

[0266] According to one embodiment, the prediction method of the second partition may be determined based on the prediction method of the first partition, or conversely, the prediction method of the first partition may be determined based on the prediction method of the second partition. For example, if the intra-screen block copy mode is applied to the first partition and the intra-screen prediction mode is applied to the second partition, the second partition may be predicted by one of the predetermined intra-screen prediction methods. Conversely, if the intra-screen block copy mode is not applied to the first partition and the intra-screen prediction mode is applied to the second partition, the second partition may be predicted by one of the prediction methods that are not included in the predetermined intra-screen prediction methods. The predetermined intra-screen prediction methods may include at least one of a planar mode, a DC mode, a horizontal mode, and a vertical mode. Alternatively, if the intra-screen block copy mode is applied to the first partition and the intra-screen prediction mode is applied to the second partition, the second partition may be predicted by regular intra-screen prediction modes.

[0267] In one embodiment, when the in-screen block copy mode is applied to both the first partition and the second partition, the block vector of the first partition and the block vector of the second partition may be set not to be identical.

[0268]

[0269] In step 1606, when the screen block copy mode is applied to the first partition, a block vector of the first partition indicating a reference block within the block vector search range of the current block is determined.

[0270] According to one embodiment, when the intra-screen block copy mode is applied to the first partition and the inter-screen prediction mode is applied to the second partition, the block vector of the first partition can be derived based on the motion vector of the second partition. At this time, a difference vector representing the difference between the block vector of the first partition and the motion vector of the second partition can be obtained, and the block vector of the first partition can be derived based on the motion vector of the second partition and the difference vector. Conversely, the motion vector of the second partition can be derived based on the block vector of the first partition and the difference vector.

[0271] In step 1608, a reference block referenced by the first partition is determined based on the block vector.

[0272] At step 1610, a first partition is predicted based on the reference block.

[0273] According to the prediction method performed in steps 1602 to 1610, the current block can be encoded or decoded. And the bitstream generated by the encoder according to the prediction method performed in steps 1602 to 1610 can be stored in a recording medium or transmitted externally from the encoder. When the block copy mode within the screen is applied to the second partition, the method of FIG. 16 can be applied not only to the first partition but also to the second partition.

[0274]

[0275] FIG. 17 is a drawing exemplifying a content streaming system to which an embodiment according to the present invention can be applied.

[0276] As illustrated in FIG. 17, a content streaming system to which an embodiment of the present invention is applied may largely include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.

[0277] The encoding server compresses content input from multimedia input devices such as smartphones, cameras, and CCTVs into digital data, generates a bitstream, and transmits it to the streaming server. Alternatively, if multimedia input devices such as smartphones, cameras, and CCTVs directly generate bitstreams, the encoding server may be omitted.

[0278] The above bitstream can be generated by an image encoding method and / or an image encoding device to which an embodiment of the present invention is applied, and the streaming server can temporarily store the bitstream during the process of transmitting or receiving the bitstream.

[0279] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server can act as an intermediary to inform the user of available services. When a user requests a desired service from the web server, the web server transmits the request to the streaming server, and the streaming server can transmit multimedia data to the user. At this time, the content streaming system may include a separate control server, and in this case, the control server may control commands / responses between each device within the content streaming system.

[0280] The streaming server can receive content from a media repository and / or encoding server. For example, when receiving content from the encoding server, the content can be received in real time. In this case, to provide a smooth streaming service, the streaming server can store the bitstream for a certain period of time.

[0281] Examples of the user devices may include mobile phones, smart phones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation devices, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glasses, HMDs), digital TVs, desktop computers, digital signage, etc.

[0282] Each server within the above content streaming system can be operated as a distributed server, in which case data received from each server can be processed in a distributed manner.

[0283]

[0284] The above embodiments can be performed in the same or corresponding manner in an encoding device and a decoding device. In addition, an image can be encoded / decoded using at least one or a combination of at least one of the above embodiments.

[0285] The order in which the above embodiments are applied may be different in the encoding device and the decoding device. Alternatively, the order in which the above embodiments are applied may be the same in the encoding device and the decoding device.

[0286] The above embodiments can be performed for each of the luminance and chrominance signals. Alternatively, the above embodiments can be performed identically for the luminance and chrominance signals.

[0287] In the above embodiments, the methods are described based on a flowchart as a series of steps or units. However, the present invention is not limited to the order of the steps, and some steps may occur in a different order or simultaneously with other steps described above. Furthermore, those skilled in the art will understand that the steps depicted in the flowchart are not exclusive, and other steps may be included, or one or more steps in the flowchart may be deleted without affecting the scope of the present invention.

[0288] The above embodiments may be implemented in the form of program commands that can be executed by various computer components and recorded on a computer-readable recording medium. The computer-readable recording medium may include program commands, data files, data structures, etc., either singly or in combination. The program commands recorded on the computer-readable recording medium may be those specifically designed and constructed for the present invention, or may be known and usable by those skilled in the art of computer software.

[0289] The bitstream generated by the encoding method according to the above embodiment can be stored in a non-transitory computer-readable recording medium. In addition, the bitstream stored in the non-transitory computer-readable recording medium can be decoded by the decoding method according to the above embodiment.

[0290] Here, examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical recording media such as CD-ROMs and DVDs, magneto-optical media such as floptical disks, and hardware devices specifically configured to store and execute program instructions such as ROMs, RAMs, and flash memories. Examples of program instructions include not only machine language codes such as those generated by a compiler, but also high-level language codes that can be executed by a computer using an interpreter, etc. The hardware devices may be configured to operate as one or more software modules to perform processing according to the present invention, and vice versa.

[0291] Although the present invention has been described above with specific details such as specific components and limited examples and drawings, these are provided only to help a more general understanding of the present invention, and the present invention is not limited to the above examples, and those with ordinary knowledge in the technical field to which the present invention pertains can make various modifications and variations from this description.

[0292] Therefore, the idea of ​​the present invention should not be limited to the embodiments described above, and all things that are modified equally or equivalently to the following claims as well as the claims are considered to fall within the scope of the idea of ​​the present invention.

[0293] The present invention can be used in a device for encoding / decoding an image and a recording medium storing a bitstream.

Claims

1. In the video decryption method, A step of dividing the current block into a first partition and a second partition according to the partition boundary; A step of determining whether the screen block copy mode is applied to the first partition; When the screen block copy mode is applied to the first partition, a step of determining a block vector of the first partition representing a reference block within the block vector search range of the current block; A step of determining a reference block referenced by the first partition based on the block vector; and An image decoding method comprising a step of predicting the first partition based on the reference block.

2. In paragraph 1, Based on the first partition area flag, it is determined whether the screen block copy mode is applied to the first partition, If the on-screen block copy mode is not applied to the above first partition, the on-screen block copy mode is applied to the above second partition, A video decoding method, characterized in that when the in-screen block copy mode is applied to the first partition, it is determined whether the in-screen block copy mode is applied to the second partition based on a second partition area flag.

3. In paragraph 1, A video decoding method, characterized in that whether the within-screen block copy mode is applied to the first partition is determined based on a first partition area flag, and whether the within-screen block copy mode is applied to the second partition is determined based on a second partition area flag.

4. In paragraph 1, The above second partition is, A video decoding method characterized in that one of an inter-screen prediction mode, an intra-screen prediction mode, an intra-screen block copy mode, and an intra-screen template matching mode is applied.

5. In paragraph 4, A video decoding method, characterized in that a prediction method to be applied to the second partition is determined regardless of whether an in-screen block copy mode is applied to the first partition.

6. In paragraph 4, When the in-screen block copy mode is applied to the first partition and the in-screen prediction mode is applied to the second partition, the second partition is predicted by one of the predetermined in-screen prediction methods, If the in-screen block copy mode is not applied to the first partition and the in-screen prediction mode is applied to the second partition, the second partition is predicted by one of the prediction methods not included in the predetermined in-screen prediction methods. An image decoding method, characterized in that the above-described intra-screen prediction methods include at least one of a planar mode, a DC mode, a horizontal mode, or a vertical mode.

7. In paragraph 4, A video decoding method, characterized in that when an in-screen block copy mode is applied to the first partition and an in-screen prediction mode is applied to the second partition, the second partition is predicted by one of the regular in-screen prediction methods.

8. In paragraph 4, An image decoding method, characterized in that when the screen block copy mode is applied to both the first partition and the second partition, the block vector of the first partition and the block vector of the second partition are set not to be identical.

9. In paragraph 1, A video decoding method, characterized in that when an intra-screen block copy mode is applied to the first partition and an inter-screen prediction mode is applied to the second partition, the block vector of the first partition is derived based on the motion vector of the second partition.

10. In paragraph 9, The above image decoding method further includes a step of obtaining a difference vector representing the difference between the block vector of the first partition and the motion vector of the second partition, An image decoding method, characterized in that the block vector of the first partition is derived based on the motion vector of the second partition and the difference vector.

11. In the video encoding method, A step of dividing the current block into a first partition and a second partition according to the partition boundary; A step of determining whether the screen block copy mode is applied to the first partition; When the screen block copy mode is applied to the first partition, a step of determining a block vector of the first partition representing a reference block within the block vector search range of the current block; A step of determining a reference block referenced by the first partition based on the block vector; and An image encoding method, comprising a step of predicting the first partition based on the reference block.

12. In a computer-readable recording medium storing a bitstream generated by a video encoding method, In a video encoding method, A step of dividing the current block into a first partition and a second partition according to the partition boundary; A step of determining whether the screen block copy mode is applied to the first partition; When the screen block copy mode is applied to the first partition, a step of determining a block vector of the first partition representing a reference block within the block vector search range of the current block; A step of determining a reference block referenced by the first partition based on the block vector; and A recording medium comprising a step of predicting the first partition based on the reference block.

13. A bitstream transmission method for transmitting a bitstream generated by a video encoding method, A step of encoding an image based on the above image encoding method; and Comprising a step of transmitting a bitstream including the encoded image, The above image encoding method is, A step of dividing the current block into a first partition and a second partition according to the partition boundary; A step of determining whether the screen block copy mode is applied to the first partition; When the screen block copy mode is applied to the first partition, a step of determining a block vector of the first partition representing a reference block within the block vector search range of the current block; A step of determining a reference block referenced by the first partition based on the block vector; and A bitstream transmission method comprising a step of predicting the first partition based on the reference block.

Citation Information

Patent Citations

  • Ribbon manufacturing apparatus and method of manufacturing ribbon for packaging

    KR1020230032833A

  • A method for operating a large engine and a large engine

    KR1020230034149A

  • Selective switch for parallel processing

    US11240524B2

  • Geometric partition mode with intra block copy

    US20230034458A1

  • Geometry partitioning for affine motion compensated prediction in video coding

    WO2023283028A1