Image encoding / decoding method and apparatus, and recording medium storing bit stream

By using intra-frame template matching and block copy modes to predict image blocks in the image encoding/decoding process, the problem of low high-resolution and high-quality image encoding/decoding efficiency is solved, and transmission and storage costs are reduced.

CN120500845APending Publication Date: 2025-08-15HYUNDAI MOTOR CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202480007272.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-03-13
Filing Date
2024-03-13
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

The prior art is inefficient in high resolution, high quality image encoding/decoding processes, resulting in increased transmission and storage costs.

Method used

The image block is partitioned in geometric segmentation mode using intra template matching mode and intra block copy mode, and the current block is divided into first and second partitions by segmenting boundaries, and prediction is made based on the reference template or reference block.

Benefits of technology

Improves the overall efficiency of image encoding/decoding and reduces transmission and storage costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120500845A_ABST
    Figure CN120500845A_ABST
Patent Text Reader

Abstract

The present invention provides an image decoding method comprising the steps of: segmenting a current block into a first partition and a second partition according to a segmentation boundary; determining whether 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, the block vector indicating a reference block within a block vector search range of the current block; determining a reference block referenced by the first partition based on the block vector; and predicting a first partition based on the reference block.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to an image encoding / decoding method and apparatus, and a recording medium for storing a bitstream. More particularly, the present disclosure relates to an image encoding / decoding method and apparatus using an intra-frame prediction method, and a recording medium for storing a bitstream. Background Art

[0002] Recently, in various application fields, the demand for high-resolution, high-quality images (such as ultra-high-definition (UHD) images) has been increasing. As the resolution and quality of image data become higher, the amount of data increases relatively compared to existing image data. Therefore, when image data is transmitted using a medium such as existing wired and wireless broadband lines or stored using existing storage media, the transmission and storage costs increase. In order to solve these problems that arise as the resolution and quality of image data become higher, there is a need for efficient image encoding / decoding technology for images with higher resolution and quality.

[0003] In geometric partitioning mode, methods for applying different prediction modes to resulting partitions have been discussed. Specifically, various methods for improving prediction accuracy of a block by increasing the number of types of prediction modes that can be applied to a partition have been discussed. Summary of the Invention

[0004] Technical issues

[0005] An object of the present disclosure is to provide a method and apparatus for encoding / decoding an image with improved encoding / decoding efficiency.

[0006] Another object of the present disclosure is to provide a recording medium for storing a bit stream generated by the image decoding method or apparatus provided by the present disclosure.

[0007] Technical Solution

[0008] According to an embodiment of the present disclosure, an image decoding method may include: dividing a current block into a first partition and a second partition according to a partition boundary; determining whether an intra-frame template matching mode is applied to the first partition; when the intra-frame template matching mode is applied to the first partition, determining a template of the first partition; within a template search range of the current block, determining a reference template corresponding to the template of the first partition; based on the reference template, determining a reference block referenced by the first partition; and predicting the first partition based on the reference block.

[0009] According to an embodiment, the first partition may include an upper left sample of the current block, and the template of the first partition may include at least one of a left area located to the left of the first partition, an upper area located above the first partition, and an upper left area located above the left of the first partition.

[0010] According to an embodiment, when the current block is adjacent to the upper boundary of the slice or picture including the current block, the template may include the left area instead of the upper area and the upper left area, and when the current block is adjacent to the left boundary of the slice or picture including the current block, the template may include the upper area instead of the left area and the upper left area.

[0011] According to an embodiment, the width of the upper region may be the same as the upper width of the first partition, and the height of the left region may be the same as the left height of the first partition.

[0012] According to an embodiment, the width of the upper region may be the same as the width of the current block, and the height of the left region may be the same as the height of the current block.

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

[0014] According to an embodiment, the lower left region and the upper right region may be determined according to an extended partition boundary of the current block.

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

[0016] According to an embodiment, the first partition may include the top-left sample of the current block.

[0017] According to an embodiment, the first partition may not include the upper left sample of the current block but may be adjacent to at least one of the left boundary and the 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 above the first partition.

[0018] According to an embodiment, the second partition may apply one of an inter prediction mode, an intra prediction mode, an intra block copy mode, and an intra template matching mode.

[0019] According to an embodiment, the prediction method applied to the second partition may be determined regardless of whether the intra template matching mode is applied to the first partition.

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

[0021] According to an embodiment, when the intra 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 configured to be different from each other.

[0022] According to an embodiment of the present disclosure, a method for encoding an image may include: dividing a current block into a first partition and a second partition according to a partition boundary; determining whether an intra-frame template matching mode is applied to the first partition; when the intra-frame template matching mode is applied to the first partition, determining a template of the first partition; determining a reference template corresponding to the template of the first partition within a template search range of the current block; based on the reference template, determining a reference block referenced by the first partition; and predicting the first partition based on the reference block.

[0023] A non-transitory computer-readable recording medium according to an embodiment of the present disclosure may store a bitstream generated by a method for encoding an image.

[0024] The transmission method according to an embodiment of the present disclosure may transmit a bit stream generated by a method for encoding an image.

[0025] An image decoding method according to an embodiment of the present disclosure may include: dividing a current block into a first partition and a second partition according to a partition boundary; determining whether an intra block copy mode is applied to the first partition; when the intra block copy mode is applied to the first partition, determining a block vector of the first partition, the block vector representing a reference block within a block vector search range of the current block; based on the block vector, determining a reference block referenced by the first partition; and predicting the first partition based on the reference block.

[0026] According to an embodiment, whether the intra block copy mode is applied to the first partition can be determined based on the first partition area flag, and when the intra block copy mode is not applied to the first partition, the intra block copy mode can be applied to the second partition, and when the intra block copy mode is applied to the first partition, whether the intra block copy mode is applied to the second partition can be determined based on the second partition area flag.

[0027] According to an embodiment, whether the intra block copy mode is applied to the first partition may be determined based on the first partition region flag, and whether the intra block copy mode is applied to the second partition may be determined based on the second partition region flag.

[0028] According to an embodiment, the second partition may apply one of an inter prediction mode, an intra prediction mode, an intra block copy mode, and an intra template matching mode.

[0029] According to an embodiment, regardless of whether the intra block copy mode is applied to the first partition, the prediction method applied to the second partition may be determined.

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

[0031] According to an embodiment, when the intra 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 configured to be different from each other.

[0032] According to an embodiment, when the intra block copy mode is applied to the first partition and the inter 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.

[0033] According to an embodiment, the image decoding method may further include: obtaining a difference vector indicating a difference between a block vector of the first partition and a motion vector of the second partition, and deriving a block vector of the first partition based on the motion vector and the difference vector of the second partition.

[0034] According to an embodiment of the present disclosure, a method for encoding an image may include: partitioning a current block into a first partition and a second partition according to a partition boundary; determining whether an intra block copy mode is applied to the first partition; when the intra block copy mode is applied to the first partition, determining a block vector of the first partition, the block vector representing a reference block within a block vector search range of the current block; based on the block vector, determining a reference block referenced by the first partition; and predicting the first partition based on the reference block.

[0035] A non-transitory computer-readable recording medium according to an embodiment of the present disclosure may store a bitstream generated by a method for encoding an image.

[0036] The transmission method according to an embodiment of the present disclosure may transmit a bit stream generated by a method for encoding an image.

[0037] The features briefly summarized above with respect to the present disclosure are provided merely as examples to explain the detailed description and are not to be construed as limiting the scope of the present disclosure.

[0038] Beneficial effects

[0039] The present disclosure proposes various embodiments of a method for applying an intra template matching mode to partitions in a geometric partitioning mode.

[0040] In addition, the present disclosure proposes various embodiments of a method for applying the intra block copy mode to partitions in the geometric partitioning mode.

[0041] In addition, the present disclosure proposes various embodiments of a method for efficiently encoding a block vector to which an intra block copy mode is applied in a geometric partitioning mode.

[0042] According to various embodiments, as the prediction accuracy of the geometric partitioning mode is improved, the overall coding efficiency can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 is a block diagram illustrating a configuration of an encoding device according to an embodiment of the present disclosure.

[0044] Figure 2 is a block diagram showing a configuration of a decoding device according to an embodiment of the present disclosure.

[0045] Figure 3 FIG2 is a diagram schematically illustrating a video decoding system to which the present disclosure is applicable.

[0046] Figure 4 The combination of intra-prediction and inter-prediction that can occur in geometric partitioning mode is shown.

[0047] Figure 5 A method for generating prediction blocks according to partitioned intra template matching mode in geometric partitioning mode is shown.

[0048] Figure 6 An embodiment is shown of a template comprising left, above and left-upper reference samples for intra template matching of a partition comprising the upper left sample of a block.

[0049] Figure 7An embodiment is shown of a template that includes not only left, top, and left-top reference samples but also reference samples of a region determined according to an extended segmentation boundary.

[0050] Figure 8 An embodiment is shown that includes not only left, top, and upper-left reference samples, but also lower-left and upper-right reference samples.

[0051] Figure 9 A method of predicting the second partition of the current block according to the intra template matching mode is shown.

[0052] Figure 10 An embodiment is shown of a template including left and top reference samples for intra template matching of a partition that does not include the top left sample of a block.

[0053] Figure 11 A method for predicting partitions based on intra block copy mode in geometric partitioning mode is described.

[0054] Figure 12 A method of predicting a second partition of a current block according to an intra block copy mode is shown.

[0055] Figure 13 A method of generating a prediction block based on intra block copy of a region where intra prediction is performed in a geometric partitioning mode is shown.

[0056] Figure 14 A method of reducing the information size of a block vector by using a unidirectional motion vector is shown.

[0057] Figure 15 An embodiment of a prediction method according to a geometric partitioning mode in which an intra template matching mode is applied is shown.

[0058] Figure 16 An embodiment of a prediction method according to a geometric partitioning mode in which the intra block copy mode is applied is shown.

[0059] Figure 17 The following exemplifies a content streaming system to which the embodiments of the present disclosure can be applied.

[0060] Best Practice

[0061] According to an embodiment of the present disclosure, an image decoding method may include: dividing a current block into a first partition and a second partition according to a partition boundary; determining whether an intra-frame template matching mode is applied to the first partition; when the intra-frame template matching mode is applied to the first partition, determining a template of the first partition; within a template search range of the current block, determining a reference template corresponding to the template of the first partition; based on the reference template, determining a reference block referenced by the first partition; and predicting the first partition based on the reference block. DETAILED DESCRIPTION

[0062] The present disclosure may have various modifications and embodiments, and specific embodiments are shown in the drawings and are elaborated in detail in the detailed description. However, this is not intended to limit the present disclosure to specific embodiments, but should be understood to include all modifications, equivalents or replacements within the spirit and scope of the present disclosure. In various aspects, similar reference numerals in the drawings indicate the same or similar functions. The shapes and sizes of the elements in the drawings can be provided for a clearer description by way of example. The detailed description of the exemplary embodiments described below refers to the drawings, which illustrate specific embodiments by way of example. These embodiments are described in sufficient detail to enable those skilled in the art to practice these embodiments. It should be understood that various embodiments are different from each other, but not necessarily mutually exclusive. For example, the specific shapes, structures and characteristics described herein can be implemented in other embodiments without departing from the spirit and scope of the present disclosure regarding one embodiment. It should also be understood that the position or arrangement of the various components in each disclosed embodiment can be changed without departing from the spirit and scope of the embodiment. Therefore, the specific embodiments described below are not intended to be restrictive, and the scope of the exemplary embodiments is limited only by the full range of equivalents to which the appended claims and these claims are entitled (if appropriately described).

[0063] In this disclosure, the terms first, second, etc. may be used to describe various components, but these components should not be limited by these terms. These terms are used only to distinguish one component from another. For example, a first component may be referred to as a second component, and similarly, a second component may be referred to as a first component without departing from the scope of this disclosure. The term is and / or includes a combination of multiple related descriptive items or any item among multiple related descriptive items.

[0064] The components shown in the embodiments of the present disclosure are independently depicted to indicate different characteristic functions, and do not mean that each component is formed as a separate hardware or software configuration unit. That is, for ease of explanation, each component is listed and included as a separate component, and at least two components may be combined to form a single component, or one component may be divided into multiple components to perform functions, and embodiments in which components are integrated and embodiments in which each component is divided are also included in the scope of the present disclosure as long as they do not deviate from the essence of the present disclosure.

[0065] The terms used in this disclosure are only used to describe specific embodiments and are not intended to limit the present disclosure. Unless the context clearly indicates otherwise, singular expressions include plural expressions. In addition, some parts of the present disclosure are not necessary parts for performing the necessary functions in the present disclosure, and can be optional parts that are only used to improve performance. The present disclosure can be realized by only including the necessary parts (excluding parts that are only used to improve performance) for realizing the essence of the present disclosure, and the structure that only includes necessary parts (excluding optional parts that are only used to improve performance) is also included in the scope of the present disclosure.

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

[0067] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. When describing an embodiment of the present specification, if it is determined that a detailed description of a related known configuration or function may obscure the subject matter of the present specification, the detailed description will be omitted, and the same reference numerals will be used for the same components in the accompanying drawings, and repeated description of the same components will be omitted.

[0068] Terminology Description

[0069] Hereinafter, "image" may refer to a picture constituting a video, or may refer to the video itself. For example, "encoding and / or decoding of an image" may refer to "encoding and / or decoding of a video," or may refer to "encoding and / or decoding of a picture constituting a video."

[0070] Hereinafter, "moving image" and "video" may be used interchangeably with each other in the same meaning. Furthermore, a target image may be an encoding target image serving as an encoding target and / or a decoding target image serving as a decoding target. Furthermore, a 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.

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

[0072] Hereinafter, a "target block" may be an encoding target block that is an encoding target and / or a decoding target block that is a decoding target. In addition, a target block may be a current block that is a target of current encoding and / or decoding. For example, "target block" and "current block" may be used with the same meaning and may be used interchangeably.

[0073] Hereinafter, "block" and "unit" may be used interchangeably with each other. Furthermore, "unit" may refer to a luma component block and its corresponding chroma component blocks to distinguish a unit from a block. For example, a coding tree unit (CTU) may consist of one luma component (Y) coding tree block (CTB) and two associated chroma component (Cb, Cr) coding tree blocks.

[0074] Hereinafter, "sample", "picture element" and "pixel" may be used with the same meaning and may be used interchangeably. Herein, a sample may represent a basic unit constituting a block.

[0075] Hereinafter, “inter-frame” and “inter-screen” may be used with the same meaning and may be used interchangeably.

[0076] Hereinafter, “intra-frame” and “intra-screen” may be used with the same meaning and may be used interchangeably.

[0077] Figure 1 is a block diagram illustrating a configuration of an encoding device according to an embodiment of the present disclosure.

[0078] 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 encode one or more images sequentially.

[0079] refer to Figure 1 , the encoding device 100 may include an image segmentation unit 110, an intra-frame prediction unit 120, a motion prediction unit 121, a motion compensation unit 122, a switch 115, a subtractor 113, a transform unit 130, a quantization unit 140, an entropy encoding unit 150, a dequantization unit 160, an inverse transform unit 170, an adder 117, a filter unit 180 and a reference picture buffer 190.

[0080] In addition, the encoding device 100 can generate a bit stream including information encoded by encoding the input image and output the generated bit stream. The generated bit stream can be stored in a computer-readable recording medium or can be streamed through a wired / wireless transmission medium.

[0081] The image segmentation unit 110 can segment the input image into various forms to improve the efficiency of video encoding / decoding. That is, the input video is composed of multiple pictures, and a picture can be segmented and processed hierarchically for compression efficiency, parallel processing, etc. For example, a picture can be segmented into one or more tiles or slices, and then segmented again into multiple CTUs (coding tree units). Alternatively, a picture can first be segmented into multiple sub-pictures defined as rectangular slice groups, and each sub-picture can be segmented into tiles / slices. Here, sub-pictures can be used to support the functions of partially independent encoding / decoding and transmitting pictures. Since multiple sub-pictures can be reconstructed separately, it has the advantage of easy editing in applications that configure multi-channel input into a single picture. In addition, tiles can be divided horizontally to generate small blocks. Here, small blocks can be used as basic units for parallel processing within the picture. In addition, a CTU can be recursively segmented into a quadtree (QT), and the end node of the segmentation can be defined as a decoding unit (CU). The CU can be split into prediction units (PUs) as prediction units and transform units (TUs) as transform units to perform prediction and segmentation. At the same time, the CU can be used as a prediction unit and / or a transform unit itself. Here, for flexible segmentation, each CTU can be recursively split into a multi-type tree (MTT) and a quadtree (QT). The CTU splitting into multi-type trees can start from the end node of the QT, and the MTT can be composed of a binary tree (BT) and a ternary tree (TT). For example, the MTT structure can be classified into a vertical binary splitting mode (SPLIT_BT_VER), a horizontal binary splitting mode (SPLIT_BT_HOR), a vertical ternary splitting mode (SPLIT_TT_VER), and a horizontal ternary splitting mode (SPLIT_TT_HOR). In addition, the minimum block size (MinQTSize) of the quadtree of the luminance block during partitioning can be set to 16×16, the maximum block size (MaxBtSize) of the binary tree can be set to 128×128, and the maximum block size (MaxTtSize) of the ternary tree can be set to 64×64. In addition, the minimum block size (MinBtSize) of the binary tree and the minimum block size (MinTtSize) of the ternary tree can be specified as 4×4, and the maximum depth (MaxMttDepth) of the multi-type tree can be specified as 4. In addition, in order to improve the coding efficiency of the I slice, a dual tree of the CTU partition structure that uses the luminance component and the chrominance component differently can be applied. On the other hand, in P and B slices, the luminance and chrominance coding tree blocks (CTBs) within the CTU can be partitioned into a single tree that shares the coding tree structure.

[0082] The encoding device 100 can perform encoding on the input image in intra mode and / or inter mode. Alternatively, the encoding device 100 can perform encoding on the input image in a third mode other than intra mode and inter mode (for example, IBC mode, palette mode, etc.). However, if the third mode has functional characteristics similar to those of intra mode or inter mode, the third mode may be classified as intra mode or inter mode for ease of explanation. In the present disclosure, the third mode is separately classified and described only when a specific description of the third mode is required.

[0083] 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 represent the intra prediction mode, and the inter mode can represent the inter prediction mode. The encoding device 100 can generate a prediction block for the input block of the input image. In addition, the encoding device 100 can encode the residual block using the residual of the input block and the prediction block after generating the prediction block. The input image can be referred to as the current image of the current encoding target. The input block can be referred to as the current block as the current encoding target or the encoding target block.

[0084] When the prediction mode is intra mode, the intra prediction unit 120 can use samples of blocks that have been 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, or generate prediction samples of the input block through spatial prediction. Here, intra prediction can refer to intra-frame prediction.

[0085] As the intra prediction method, non-directional prediction modes such as DC mode and planar mode and directional prediction modes (for example, 65 directions) may be applied. Here, the intra prediction method may be expressed as an intra prediction mode or an intra-screen prediction mode.

[0086] When the prediction mode is inter mode, the motion prediction unit 121 can retrieve the area that best matches the input block from the reference image during the motion prediction process and derive a motion vector by using the retrieved area. In this case, the search area can be used as the area. The reference image can be stored in the reference picture buffer 190. Here, when encoding / decoding for the reference image is performed, it can be stored in the reference picture buffer 190.

[0087] The motion compensation unit 122 may generate a prediction block of the current block by performing motion compensation using a motion vector. Here, inter prediction may mean inter-picture prediction or motion compensation.

[0088] When the value of the motion vector is not an integer, the motion prediction unit 121 and the motion compensation unit 122 may generate a prediction block by applying an interpolation filter to a partial area of the reference picture. In order to perform inter-frame prediction or motion compensation, it may be determined whether the motion prediction and motion compensation mode of the prediction unit included in the decoding unit is one of skip mode, merge mode, advanced motion vector prediction (AMVP) mode, and decoding unit-based intra block copy (IBC) mode, and inter-frame prediction or motion compensation may be performed according to each mode.

[0089] In addition, based on the above-mentioned inter-frame prediction method, the AFFINE mode based on sub-PU prediction, the SbTMVP (sub-block based temporal motion vector prediction) mode, the MMVD (merged with MVD) mode based on PU prediction, and the GPM (geometric partitioning mode) mode can be applied. In addition, in order to improve the performance of each mode, HMVP (history-based MVP), PAMVP (paired average MVP), CIIP (joint intra / inter prediction), AMVR (adaptive motion vector resolution), BDOF (bidirectional optical flow), BCW (bidirectional prediction with CU weight), LIC (local illumination compensation), TM (template matching), OBMC (overlapping block motion compensation), etc. can be applied.

[0090] The subtractor 113 may generate a residual block by using the difference between the input block and the prediction block. The residual block may be referred to as a residual signal. The residual signal may mean the difference between the original signal and the prediction signal. Alternatively, the residual signal may be a signal generated by transforming or quantizing, or transforming and quantizing the difference between the original signal and the prediction signal. The residual block may be a residual signal of a block unit.

[0091] The transform unit 130 may generate a transform coefficient by performing a transform on the residual block 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 skip transforming the residual block.

[0092] The quantization level may be generated by applying quantization to a transform coefficient or a residual signal. Hereinafter, the quantization level may also be referred to as a transform coefficient in embodiments.

[0093] For example, a 4×4 luminance residual block generated by intra prediction is transformed using a basis vector based on DST (Discrete Sine Transform), and the remaining residual block can be transformed using a basis vector based on DCT (Discrete Cosine Transform). In addition, the transform block is divided into a quadtree shape for one block using RQT (Residual Quadtree) technology, and after transforming and quantizing each transform block divided by RQT, a coded block flag (CBF) can be transmitted when all coefficients become 0 to improve coding efficiency.

[0094] As another alternative, the MTS (Multiple Transform Selection) technique that selectively uses multiple transform bases to perform transforms can be applied. That is, instead of partitioning the CU into TUs through RQT, a function similar to TU partitioning can be performed through the SBT (Sub-Block Transform) technique. Specifically, SBT is only applied to inter-frame prediction blocks, and unlike RQT, the current block can be partitioned into 1 / 2 or 1 / 4 sizes in the vertical or horizontal direction, and then the transform can be performed on only one block in the block. For example, if it is partitioned vertically, the transform can be performed on the leftmost or rightmost block, and if it is partitioned horizontally, the transform can be performed on the topmost or bottommost block.

[0095] In addition, LFNST (Low Frequency Non-separable Transform) can be applied. LFNST is a secondary transform technique that additionally transforms the residual signal transformed into the frequency domain by DCT or DST. LFNST additionally transforms the 4×4 or 8×8 low-frequency region in the upper left corner so that the residual coefficients can be concentrated in the upper left corner.

[0096] The quantization unit 140 may generate a quantization level by quantizing the transform coefficient or the residual signal according to a quantization parameter (QP) and output the generated quantization level. Here, the quantization unit 140 may quantize the transform coefficient by using a quantization matrix.

[0097] For example, a quantizer with a QP value of 0 to 51 may be used. Alternatively, if the image size is large and high coding efficiency is required, a QP of 0 to 63 may be used. In addition, a DQ (dependent quantization) method using two quantizers instead of one quantizer may 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 by a state transition model.

[0098] The entropy coding unit 150 may generate a bitstream by performing entropy coding on the values calculated by the quantization unit 140 or the decoding parameter values calculated when performing coding according to a probability distribution, and output the bitstream. The entropy coding unit 150 may perform entropy coding on information about samples of an image and information for decoding the image. For example, the information for decoding the image may include syntax elements.

[0099] When entropy coding is applied, symbols are represented so that a smaller number of bits are allocated to symbols with a high probability of occurrence and a larger number of bits are allocated to symbols with a low probability of occurrence, and therefore, the size of the bit stream for the symbol to be encoded can be reduced. The entropy coding unit 150 can use a coding method such as Exponential Golomb, CAVLC (Context Adaptive Variable Length Coding), CABAC (Context Adaptive Binary Arithmetic Coding), etc. to perform entropy coding. For example, the entropy coding unit 150 can perform entropy coding by using a variable length coding / coding (VLC) table. In addition, the entropy coding unit 150 can derive a binarization method of the target symbol and a probability model of the target symbol / bin, and perform arithmetic decoding by using the derived binarization method and context model.

[0100] In this regard, when CABAC is applied, in order to reduce the size of the probability table stored in the decoding device, the table probability update method can be changed to a table update method using a simple equation and applied. In addition, two different probability models can be used to obtain more accurate symbol probability values.

[0101] In order to encode a transform coefficient level (quantized level), the entropy encoding unit 150 may change a two-dimensional block form coefficient into a one-dimensional vector form through a transform coefficient scanning method.

[0102] The decoding parameters may include information (flags, indexes, etc.) encoded in the encoding device 100 and sent to the decoding device 200 using a signal, such as syntax elements, and information derived in the encoding or decoding process, and may mean information required when encoding or decoding an image.

[0103] Here, signaling a flag or an index may mean that the corresponding flag or index is entropy-encoded in an encoder and included in a bitstream, and may mean that the corresponding flag or index is entropy-decoded from the bitstream in a decoder.

[0104] The encoded current image can be used as a reference image for another image to be processed later. Therefore, 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.

[0105] The quantized level may be dequantized in the dequantization unit 160 or inversely transformed in the inverse transform unit 170. The dequantized and / or inversely transformed coefficients may be added to the prediction block by the adder 117. Here, the dequantized and / or inversely transformed coefficients may refer to coefficients on which at least one of dequantization and inverse transformation is performed, and may refer to a reconstructed residual block. The dequantization unit 160 and the inverse transform unit 170 may be performed as inverse processes of the quantization unit 140 and the transform unit 130.

[0106] The reconstructed block may pass through the filter unit 180. The filter unit 180 may apply all or some of the filter techniques, such as a deblocking filter, sample adaptive offset (SAO), an adaptive loop filter (ALF), a bilateral filter (BIF), and LMCS (luminance mapping with chroma scaling), to the reconstructed sample, reconstructed block, or reconstructed image. The filter unit 180 may be referred to as a loop filter. In this case, the term "loop filter" is also used to exclude LMCS.

[0107] A deblocking filter can remove block distortion generated at the boundaries between blocks. To determine whether to apply a deblocking filter, a determination can be made based on samples included in a number of rows or columns included in the block whether to apply the deblocking filter to the current block. When applying a deblocking filter to a block, different filters can be applied depending on the desired deblocking filter strength.

[0108] To compensate for coding errors using sample adaptive offset, an appropriate offset value can be added to the sample value. Sample adaptive offset can correct the offset between the deblocked image and the original image on a sample-by-sample basis. A method can be used in which the samples included in the image are divided into a predetermined number of regions, the regions to which an offset is applied are determined, and the offset is applied to the determined regions, or a method can be used in which the offset is applied taking into account edge information about each sample.

[0109] The bilateral filter (BIF) can also correct the offset from the original image on a sample level basis for an image on which deblocking has been performed.

[0110] The adaptive loop filter can perform filtering based on the comparison result of the reconstructed image and the original image. The samples included in the image can be divided into predetermined groups, the filter to be applied to each group can be determined, and differential filtering can be performed for each group. Information on whether to apply the ALF can be signaled by the decoding unit (CU), and the form and coefficients of the adaptive loop filter to be applied to each block can be changed.

[0111] In LMCS (Lumence Mapping with Chroma Scaling), luma mapping (LM) refers to remapping luma values using a piecewise linear model, and chroma scaling (CS) refers to a technique for scaling the residual values of chroma components according to the average luma value of a prediction signal. Specifically, LMCS can be used as an HDR correction technique that reflects the characteristics of HDR (High Dynamic Range) images.

[0112] The reconstructed block or reconstructed image that has passed through the filter unit 180 may be stored in the reference picture buffer 190. The reconstructed block that has passed through the filter unit 180 may be part of a reference image. That is, the reference image is a reconstructed image composed of the reconstructed block that has passed through the filter unit 180. The stored reference image may be used later in inter-frame prediction or motion compensation.

[0113] Figure 2 is a block diagram showing a configuration of a decoding device according to an embodiment of the present disclosure.

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

[0115] refer to Figure 2 , the decoding device 200 may include an entropy decoding unit 210, a dequantization unit 220, an inverse transform unit 230, an intra-frame prediction unit 240, a motion compensation unit 250, an adder 201, a switch 203, a filter unit 260 and a reference picture buffer 270.

[0116] The decoding device 200 can receive the bit stream output from the encoding device 100. The decoding device 200 can receive the bit stream stored in a computer-readable recording medium, or can receive the bit stream transmitted via a wired / wireless transmission medium. The decoding device 200 can decode the bit stream in intra-frame mode or inter-frame mode. In addition, the decoding device 200 can generate a reconstructed image or a decoded image generated by decoding, and output the reconstructed image or the decoded image.

[0117] When the prediction mode for decoding is intra mode, the switch 203 may be switched to intra. Alternatively, when the prediction mode for decoding is inter mode, the switch 203 may be switched to inter.

[0118] The decoding device 200 can obtain a reconstructed residual block by decoding the input bit stream and generate a prediction block. When the reconstructed residual block and the prediction block are obtained, the decoding device 200 can generate a reconstructed block that becomes the decoding target by adding the reconstructed residual block and the prediction block. The decoding target block can be referred to as the current block.

[0119] The entropy decoding unit 210 may generate symbols by entropy decoding the bit stream according to the probability distribution. The generated symbols may include symbols in the form of quantized levels. Here, the entropy decoding method may be the inverse process of the above-mentioned entropy encoding method.

[0120] The entropy decoding unit 210 may change the coefficients of the one-dimensional vector shape into coefficients of the two-dimensional block shape through a transform coefficient scanning method to decode transform coefficient levels (quantized levels).

[0121] The quantized levels may be dequantized in the dequantization unit 220 or inversely transformed in the inverse transform unit 230. The quantized levels may be the result of dequantization and / or inverse transformation and may be generated as a reconstructed residual block. Here, the dequantization unit 220 may apply a quantization matrix to the quantized levels. The dequantization unit 220 and the inverse transform unit 230 used in the decoding device may apply the same techniques as the dequantization unit 160 and the inverse transform unit 170 used in the encoding device described above.

[0122] When intra mode is used, the intra prediction unit 240 can generate a prediction block by performing spatial prediction on the current block using sample values of blocks decoded around the decoding target block. The intra prediction unit 240 applied to the decoding device can apply the same technology as the intra prediction unit 120 applied to the above-mentioned encoding device.

[0123] When the inter-frame mode is used, the motion compensation unit 250 can generate a prediction block by performing motion compensation on the current block using the motion vector and the reference image stored in the reference picture buffer 270. When the value of the motion vector is not an integer value, the motion compensation unit 250 can generate a prediction block by applying an interpolation filter to a partial area within the reference image. In order to perform motion compensation, it can be determined based on the decoding unit whether the motion compensation method of the prediction unit included in the corresponding decoding unit is skip mode, merge mode, AMVP mode, or current picture reference mode, 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 above-mentioned encoding device.

[0124] The adder 201 can generate a reconstructed block by adding the reconstructed residual block and the prediction block. The filter unit 260 can apply at least one of inverse LMCS, deblocking filter, sample adaptive offset, and adaptive loop filter to the reconstructed block or reconstructed image. The filter unit 260 applied to the decoding device can apply the same filtering technology as the filtering technology applied to the filter unit 180 of the encoding device described above.

[0125] The filter unit 260 may output a reconstructed image. The reconstructed block or image may be stored in the reference picture buffer 270 and used for inter-frame prediction. The reconstructed block that has passed through the filter unit 260 may be part of a reference image. That is, the reference image may be a reconstructed image composed of the reconstructed blocks that have passed through the filter unit 260. The stored reference image may be used later in inter-frame prediction or motion compensation.

[0126] Figure 3 FIG2 is a diagram schematically illustrating a video decoding system to which the present disclosure is applicable.

[0127] The video decoding system according to the 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 stream via a digital storage medium or a network.

[0128] The encoding device 10 according to the embodiment may include a video source generation unit 11, an encoding unit 12, and a transmission unit 13. The decoding device 20 according to the embodiment may include a receiving 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 receiving 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.

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

[0130] The encoding unit 12 can encode the input video / image. The encoding unit 12 can perform a series of processes for compression and coding efficiency, such as prediction, transformation, and quantization. The encoding unit 12 can output encoded data (encoded video / image information) in the form of a bit stream. The detailed configuration of the encoding unit 12 can also be the same as the above Figure 1 The encoding device 100 is configured in the same manner.

[0131] The transmission unit 13 can transmit the encoded video / image information or data output in the form of a bitstream to the receiving unit 21 of the decoding device 20 in the form of a file or stream via a digital storage medium or a network. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmission unit 13 may include components for generating a media file in a predetermined file format and may also include components for transmission via a broadcast / communication network. The receiving unit 21 extracts / receives the bitstream from the storage medium or network and transmits it to the decoding unit 22.

[0132] The decoding unit 22 can decode the video / image by performing a series of processes corresponding to the operations of the encoding unit 12, such as dequantization, inverse transformation, and prediction. The detailed configuration of the decoding unit 22 can also be the same as that described above. Figure 2 The decoding device 200 is configured in the same manner.

[0133] The rendering unit 23 may render the decoded video / image. The rendered video / image may be displayed by the display unit.

[0134] In this disclosure, various implementations of a geometric partitioning mode (GPM) are described. According to the geometric partitioning mode, a block is partitioned into two partitions by a linear partition boundary, each of the two resulting partitions is independently predicted using a different prediction method, and a prediction block is generated for each partition. Furthermore, the final prediction block for the geometric partitioning mode is generated by forming a weighted sum of the prediction signals of the prediction blocks for each partition.

[0135] Here, in order to improve the prediction accuracy of the geometric partition mode, not only the intra prediction mode but also the intra block copy (IBC) mode or the intra template matching (IntraTMP) mode may be applied to each resultant partition according to the geometric partition mode.

[0136] Figure 4 The combination of intra-prediction and inter-prediction that can occur in geometric partitioning mode is shown.

[0137] According to an embodiment, the two partitions obtained in the geometric partitioning mode can each be independently predicted by intra prediction or inter prediction.

[0138] Inter-inter prediction combination is applied to Figure 4 Block 402. According to the prediction combination, two partitions can be predicted independently based on different information. Here, unidirectional motion compensation is performed for each partition.

[0139] The intra-inter prediction combination is applied to Figure 4 Blocks 404 and 406 of FIG. According to the prediction combination, one of the two partitions is predicted according to intra prediction, and the other is predicted according to inter prediction. Here, for the partition using inter prediction, unidirectional motion compensation is performed, and the partition using intra prediction is predicted based on the intra prediction mode.

[0140] Intra-intra prediction combination is applied to Figure 4 Block 408. According to the prediction combination, two partitions are independently predicted based on different intra prediction modes.

[0141] Here, the intra prediction mode includes a normal intra prediction mode, an intra template matching mode, and an intra block copy mode. In addition, the normal intra prediction mode includes a DC mode using reference samples adjacent to the current block, a planar mode, and an angular mode.

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

[0143] According to an embodiment, the intra-intra prediction combination may be implemented as a combination of different conventional intra prediction modes, a combination of intra block copy modes based on different block vectors, a combination of intra template matching modes based on different templates, a combination of a conventional intra prediction mode and an intra block copy mode, a combination of a conventional intra prediction mode and an intra template matching mode, or a combination of an intra block copy mode and an intra template matching mode.

[0144] Hereinafter, a method for using intra template matching in the geometric partitioning mode will be described.

[0145] For intra prediction applied to partitions in geometric partitioning mode, a method for performing prediction of partitions by using intra template matching is proposed. Intra template matching can be applied to partitions to which intra prediction is applied. Figure 4 Blocks 404, 406 and 408.

[0146] Figures 5 to 8 Various template examples are described for intra template matching of a partition including the top left sample.

[0147] Figure 5A method for generating prediction blocks according to partitioned intra template matching mode in geometric partitioning mode is shown.

[0148] according to Figure 5 , the current block 500 is partitioned into a first partition 502 including the upper left vertex sample and a second partition 504 not including the sample by a linear partition boundary. Here, the first partition 502 is encoded by the intra template matching mode which is an intra prediction method, and the second partition 504 is encoded by the inter prediction method.

[0149] For intra template matching of the first partition 502, an L-shaped current template 506 is defined, which is composed of reference samples adjacent to the first partition 502. In addition, a reference template 514 that is most similar to the current template 506 is searched in the reconstructed area. In addition, a block corresponding to the reference template 514 can be selected as the prediction block 512.

[0150] According to an embodiment, the area in which the reference template is searched may be limited to a predefined search range. Alternatively, the predefined search range may be composed of some or all of R1, R2, R3, and R4. Here, R1 is defined as the current coding tree block, R2 is defined as the upper left coding tree block of the current coding tree block, R3 is defined as the upper coding tree block of the current coding tree block, and R4 is defined as the left coding tree block of the current coding tree block. However, this is an example, and R1, R2, R3, and R4 may be defined by any other size and position. In addition, the search range may include not only R1, R2, R3, and R4, but also any other blocks.

[0151] If the area in which the reference template is searched is extended, the probability of finding a reference template similar to the current template can be increased, but the amount of calculation for finding the reference template will also increase. On the other hand, if the area in which the reference template is searched is reduced, the probability of finding a reference template similar to the current template will be reduced, but the amount of calculation for finding the reference template will also be reduced.

[0152] According to an embodiment, if the current block is in geometric partition mode and intra prediction is performed on a partition of the current block, information about the intra prediction mode applied to the partition may be encoded. In addition, the encoded information may be transmitted to a decoder, and the decoder may apply the intra template matching mode to the partition based on the information.

[0153] According to an embodiment, the size of the ┏-shaped template adjacent to the current block 500 can also be arbitrarily determined (L1×h+w1×L2+L1×L2). Here, w and h represent the horizontal length and vertical length of the current block 500, respectively. In addition, L1 and L2 represent the left width and top width of the current template 506, respectively. In addition, w1 represents the horizontal length 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.

[0154] Figure 6 An embodiment is shown of a template comprising left, above and left-upper reference samples for intra template matching of a partition comprising the upper left sample of a block.

[0155] Figure 6 Templates of four embodiments 600 , 620 , 640 and 660 of the partitioning method are shown.

[0156] In embodiments 1 to 4 600, 620, 640 and 660, the current block is composed of two partitions, and intra template matching is applied to the partition including the upper left sample. In addition, the template of each embodiment is composed of an upper area, a left area and an upper left area. The left area is located on the left side of the intra template matching partition and is determined by the left height (H1 or H) of the intra template matching partition and the width L1 of the template. The upper area is located above the intra template matching partition and is determined by the upper width (W1 or W) of the intra template matching partition and the width L2 of the template. The upper left area is located in the upper left part of the intra template matching partition and is determined by the widths L1 and L2 of the intra template matching partition.

[0157] According to embodiment 1 600, based on partition division, the upper width W1 of partition 604 is determined to be smaller than the width W of current block 602, and the left height H1 of partition 604 is determined to be smaller than the height H of current block 602. Therefore, the template of embodiment 1 600 consists of an upper region (W1×L2) 606, a left region (L1×H1) 608, and an upper left region (L1×L2) 610 of partition 604.

[0158] According to Embodiment 2 620, based on partition division, the upper width W1 of partition 624 is determined to be smaller than the width W of current block 622, and the left height H1 of partition 624 is determined to be equal to the height H of current block 622. Template 620 of Embodiment 2 is composed of an upper region (W1×L2) 626, a left region (L1×H) 628, and an upper left region (L1×L2) 630 of partition 624. Furthermore, regardless of the partition division boundary, the height and size of left region 628 are constant at H and L1×H, respectively.

[0159] According to embodiment 3 640, based on partition division, the upper width W1 of partition 644 is determined to be equal to the width W of current block 642, and the left height H1 of partition 644 is determined to be smaller than the height H of current block 642. The template of embodiment 3 640 is composed of an upper region (W1×L2) 646, a left region (L1×H1) 648, and an upper left region (L1×L2) 650 of partition 644. Furthermore, regardless of the partition boundary, the width and size of upper region 646 are constant at W and W×L2, respectively.

[0160] According to embodiment 4 660, based on partition segmentation, the upper width W1 of partition 664 is determined to be equal to the width W of current block 662, and the left height H1 of partition 664 is determined to be equal to the height H of current block 662. Therefore, the template of embodiment 4 660 consists of an upper region (W1×L2) 666, a left region (L1×H1) 668, and an upper left region (L1×L2) 670 of partition 664. Furthermore, regardless of the partition boundary, the width and size of upper region 666 are constant at W and W×L2, respectively. Furthermore, regardless of the partition boundary, the height and size of left region 668 are constant at H and L1×H, respectively. That is, all regions of the template are constant, regardless of the partition boundary.

[0161] exist Figure 6 In each embodiment of the present invention, the template is described as including all of the upper region, the left region, and the upper left region, but depending on the embodiment, the template may include only the upper region or the left region. For example, when the current block is adjacent to the upper boundary of the picture or slice, the template may include only the left region. On the other hand, when the current block is adjacent to the left boundary of the picture or slice, the template may include only the upper region. In addition, depending on whether there is a reference sample corresponding to each region, the region included in the template can be determined. Alternatively, regardless of the current block, the region included in the template can be determined based on the prediction accuracy.

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

[0163] Figure 7 An embodiment is shown of a template that includes not only left, top, and left-top reference samples but also reference samples of a region determined according to an extended segmentation boundary.

[0164] The current block 700 is composed of a partition 702 and an inter-frame partition 704. In addition, 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 the extended segmentation boundary. In addition, the lower left region 714 is located below the left region 708 and is determined by the extended segmentation boundary. According to the segmentation boundary, Figure 7 The upper region 706, the left region 708 and the upper left region 710 can be determined by Figure 6 The upper areas 606, 626, 646 and 666, the left areas 608, 628, 648 and 668 and the upper left areas 610, 630, 650 and 670 are determined in the same way.

[0165] The upper right region ((W2×L2) / 2) 712 is determined by the template's upper right region width W2 and upper side width L2. The upper right region width W2 is determined by the extended segmentation boundary and upper side width L2. Furthermore, the lower left region ((L1×H2) / 2) 714 is determined by the template's lower left region height H2 and left side width L1. The lower left region height H2 is determined by the extended segmentation boundary and the template's left side width L1.

[0166] According to the partition boundary of the current block 700, the upper right region 712 and the lower left region 714 are added to the template so that the range of the template is extended. Since the range of the template is extended based on the partition boundary, the prediction accuracy of the reference block matched by the template can be improved.

[0167] exist Figure 7 , the upper region 706, the left region 708, the upper left region 710, the upper right region 712, and the lower left region 714 are all described as being included in the template, but 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 the picture or slice, the template may include only the left region 708 and the lower left region 714. On the other hand, if the current block 700 is located at the leftmost end of the picture or slice, the template may include only the upper region 706 and the upper right region 712. In addition, the regions included in the template may be determined depending on whether there are reference samples corresponding to each region. Alternatively, regardless of the current block 700, the regions included in the template may be determined based on the prediction accuracy.

[0168] Figure 8 An embodiment is shown that includes not only left, top, and upper-left reference samples, but also lower-left and upper-right reference samples.

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

[0170] The upper area (W×L2) 806 is determined by the width W of the current block 800 and the upper width L2 of the template. The left area (L1×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×L2) 810 is determined by the left width L1 and the upper width L2 of the template.

[0171] The upper right region 812 is determined by the random 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 have values such as 1, 1 / 2, 1 / 4, ..., 1 / 2k. 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.

[0172] In addition, the lower left region 814 is determined by the random 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 can have values such as 1, 1 / 2, 1 / 4, ..., 1 / 2k. Alternatively, H1 can have a fixed value. Alternatively, H1 can be determined based on the partitioning method of the current block 800. For example, as the left height of the partition 802 increases, H1 can increase.

[0173] The prediction accuracy of the reference block from template matching may be improved by extending the range of the template of the partition 802 to all reference blocks around the current block 800 .

[0174] exist Figure 8 In the example, the upper region, left region, upper left region, lower left region, and upper right region are described as being included in the template, but depending on the embodiment, the template may include only some of the five regions. For example, when the current block is located at the top of the picture or slice, the template may include only the left region and the lower left region. On the other hand, when the current block is located at the leftmost end of the picture or slice, the template may include only the upper region and the upper right region. In addition, the regions included in the template may be determined depending on whether there are reference samples corresponding to each region. Alternatively, the regions included in the template may be determined based on the prediction accuracy regardless of the current block.

[0175] Figures 6 to 8 Templates with arbitrary shapes not described in can be used for intra-frame template matching. Figures 6 to 8 In the description, if the partition including the upper left sample is in the intra template matching mode, the method of determining the template shape is described, but if another partition not including the upper left sample is also in the intra template matching mode, the shape of the template can also be determined in the same way.

[0176] Figures 9 and 10 Various template examples are described for intra template matching of a partition that does not include the top left sample.

[0177] Figure 9 A method of predicting the second partition of the current block according to the intra template matching mode is shown.

[0178] exist Figure 9 , the current block 900 is in geometric partition mode and is partitioned by a linear partition boundary into a first partition 902 including a sample at the upper left vertex and a second partition 904 not including the sample. Here, the second partition 904 is encoded by the intra template matching mode which is an intra prediction method, and the first partition 902 is encoded by inter prediction.

[0179] For intra-frame template matching of the second partition 904, a rectangular current template 906 consisting of reference samples adjacent to the second partition 904 is defined. In addition, a reference template 914 that is most similar to the current template 906 is searched in the reconstructed area. In addition, a block corresponding to the reference template 914 can be selected as the prediction block 912. Search Figure 9 The area of the reference template can be limited to Figure 5 The search scope described in .

[0180] According to an embodiment, the size (w2×L2) and shape of the rectangular template adjacent to the current block 900 may also be arbitrarily determined. Here, w2 represents the upper height of the second partition 904, and L2 represents the upper width of the current template 906. Here, w2 and L2 are arbitrary positive integers.

[0181] Figure 10 An embodiment is shown of a template including left and top reference samples for intra template matching of a partition that does not include the top left sample of a block.

[0182] Figure 10 Templates of four embodiments 1000 , 1020 and 1040 of the partitioning method are shown.

[0183] In embodiments 1 to 3 1000, 1020, and 1040, the current block is composed of two partitions, and intra template matching is applied to the partition that does not include the upper left sample. According to the segmentation method, the template of each embodiment includes at least one of an upper region and a left region. The left region is located to the left of the intra template matching partition and is determined by the left height H1 of the intra template matching partition and the width L1 of the template. The upper region is located above the intra template matching partition and is determined by the upper width W1 of the intra template matching partition 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.

[0184] According to embodiment 1 1000, due to the partitioning, a portion of the boundary of partition 1004 overlaps with a portion of the upper boundary of current block 1002 and a portion of the left boundary of current block 1002. Therefore, the template of embodiment 1 1000 is composed of an upper region (W1×L2) 1006 and a left region (L1×H1) 1008 of partition 1004.

[0185] According to embodiment 2 1020 , due to partitioning, a portion of the boundary of partition 1024 overlaps a portion of the upper boundary of current block 1022 . Therefore, the template of embodiment 2 1020 consists of an upper region ( W1×L2 ) 1026 of partition 1024 .

[0186] According to the third embodiment 1040 , due to the partition division, a portion of the boundary of the partition 1044 overlaps a portion of the left boundary of the current block 1042 . Therefore, the template of the third embodiment 1040 is composed of a left region ( L1×H1 ) 1046 .

[0187] Hereinafter, a method for determining a prediction method of two partitions of a block in which intra template matching for the partitions is allowed will be described.

[0188] If both the first partition and the second partition of the current block are predicted by intra prediction, the intra template matching mode can be applied to one or more of the two partitions. Here, in the encoder, information indicating which mode of the conventional intra prediction mode and the intra template matching mode is applied to the first partition can be encoded. Similarly, in the encoder, information indicating which mode of the conventional intra prediction mode and the intra template matching mode is applied to the second partition can be encoded. This information can be transmitted to the decoder and decoded in the decoder.

[0189] According to an embodiment, the intra template matching mode may be applied to only one of the first partition and the second partition. Therefore, the intra template matching mode may be applied to only one of the first partition and the second partition, while the normal intra prediction mode may be applied to the other partition. If the intra template matching mode is applied to only one partition, the encoder may encode and transmit information indicating the partition to which the intra template matching mode is applied and information about the normal intra prediction mode of the partition to which the intra template matching mode is not applied. In addition, this information is parsed in the decoder.

[0190] Based on the information about the conventional intra prediction mode of the partition, it can be determined whether to perform intra template matching. For example, if the predetermined mode is applied to a partition to which the conventional intra prediction mode is applied, the conventional intra prediction mode can be applied to another partition instead of the intra template matching mode. On the other hand, if the predetermined mode is not applied to a partition to which the conventional intra prediction mode is applied, the intra template matching mode can be applied to another partition. The predetermined mode may include a planar mode, a DC mode, a horizontal mode, or a vertical mode. Alternatively, the predetermined mode may include another conventional intra prediction mode.

[0191] According to an embodiment, the intra-frame template matching mode can be applied to both the first partition and the second partition of the current block. Here, for each partition, the encoder can encode and transmit information indicating whether the intra-frame template matching mode is applied separately. In addition, the decoder can decode the information for each partition. In addition, if the intra-frame 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 second partition can be determined to not overlap with each other or to have a minimum overlapping area.

[0192] According to an embodiment, it can be determined whether the intra template matching mode is applied to the first partition and the second partition according to the segmentation method of the current block. For example, for a partition that is not adjacent to the upper boundary or left boundary of the current block, it can be determined that the intra template matching mode is not applied. Alternatively, it can be determined whether the intra template matching mode is applied to the partition based on the degree of overlap between the upper boundary and the left boundary of the current block and the boundary of the partition. Alternatively, it can be determined whether the intra template matching mode is applied to the partition based on whether the partition includes a sample at a specific position of the current block. Alternatively, it can be determined whether the intra template matching mode is applied to the partition based on the horizontal length, vertical length, aspect ratio and / or size of a specific segmented partition (e.g., a small-sized partition).

[0193] The method proposed in this embodiment can be applied according to the size of the block. For example, the proposed method can be applied only when the horizontal length and / or vertical length of the block is equal to or greater than a predetermined value (e.g., 4) or / and equal to or less than 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. On the other hand, the proposed method can be applied only when the height of the block is less than a predetermined integer multiple of the width. Alternatively, according to an embodiment, the proposed method can be applied only when the product of the horizontal length and the vertical length of the block is equal to or greater than an arbitrary value (e.g., 32).

[0194] Hereinafter, a method of applying intra block copy in the geometric partitioning mode will be described.

[0195] Figures 11 to 12 The intra block copy mode applied to the geometric partitioning mode is described.

[0196] Figure 11 A method for predicting partitions based on intra block copy mode in geometric partitioning mode is described.

[0197] Intra block copy mode can be used in addition to Figure 4 In the remaining prediction combinations other than the inter-frame prediction combination in . Figure 11 , the current block 1100 is partitioned into a first partition 1102 and a second partition 1104. Here, the first partition 1102 is encoded by an intra block copy mode which is an intra prediction method, and the second partition 1104 is encoded by an inter prediction method.

[0198] In the reconstructed area, the encoder searches for a matching block 1112 that is most similar to the first partition 1102. In addition, the most similar matching block 1112 may be selected as a prediction block for the first partition 1102.

[0199] According to an 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 some or all of R1, R2, R3, and R4. Here, R1 is defined as the current coding tree block, R2 is defined as the upper left coding tree block of the current coding tree block, R3 is defined as the upper coding tree block of the current coding tree block, and R4 is defined as the left coding tree block of the current coding tree block. However, this is an example, and R1, R2, R3, and R4 may be defined by any other size and position. In addition, the search range may include not only R1, R2, R3, and R4, but also any other blocks.

[0200] The intra block copy mode is performed based on the block vector 1114. Therefore, the block vector information is transmitted and parsed by the encoder. In addition, based on the block vector information, the decoder can predict the predetermined partition according to the intra block copy mode.

[0201] exist Figure 11 In the embodiment, the intra block copy mode is applied to the first partition, but according to an embodiment, the intra block copy mode may be applied to the second partition in the same method as described above.

[0202] Figure 12 A method of predicting a second partition of a current block according to an intra block copy mode is shown.

[0203] exist Figure 12 , the current block 1200 is in geometric partition mode and is partitioned by a linear partition boundary into a first partition 1202 including the upper left vertex sample and a second partition 1204 not including the sample. Here, the second partition 1204 is encoded using the intra block copy mode, which is an intra prediction method, and the first partition 1202 is encoded using inter prediction.

[0204] In the reconstructed area, the encoder searches for a matching block 1212 that is most similar to the second partition 1204. In addition, the most similar matching block 1212 may be selected as the prediction block of the second partition 1204. Herein, the search range of the matching block 1212 may be limited to Figure 11 The search scope described in .

[0205] exist Figure 11 and Figure 12 In

[15] , the geometric partitioning mode to which the intra block copy mode can be applied is performed based on the block vector. Therefore, the block vector information should be encoded and transmitted by the encoder. In addition, the decoder can perform intra block copy of the partition based on the block vector information.

[0206] If both the first partition and the second partition of the current block are predicted by intra prediction, the intra block copy mode may be applied to one or more of the two partitions. Here, in the encoder, information indicating which mode, the conventional intra prediction mode and the intra block copy mode, is applied to the first partition may be encoded. Similarly, in the encoder, information indicating which mode, the conventional intra prediction mode and the intra block copy mode, is applied to the second partition may be encoded. This information may be transmitted to the decoder and decoded in the decoder.

[0207] According to an embodiment, the intra block copy mode may be applied to only one of the first partition and the second partition. Therefore, the intra block copy mode may be applied to only one of the first partition and the second partition, while the intra prediction mode may be applied to the other partition. If the intra block copy mode is applied to only one partition, the encoder may encode and transmit information indicating the partition to which the intra block copy mode is applied and information about the normal intra prediction mode of the partition to which the intra block copy mode is not applied. In addition, this information is parsed in the decoder.

[0208] Based on information about the conventional intra prediction mode of the partition to which the conventional intra prediction mode is applied, it can be determined whether to perform intra block copying. For example, if the intra prediction mode of the partition to which the intra prediction mode is applied is a predetermined mode, the intra prediction mode can be applied to other partitions instead of the intra block copy mode. On the other hand, if the intra prediction mode of the partition to which the intra prediction mode is applied is not a predetermined mode, the intra block copy mode can be applied to other partitions. The predetermined mode may include a planar mode, a DC mode, a horizontal mode, or a vertical mode. Alternatively, the predetermined mode may include another intra prediction mode.

[0209] Depending on the embodiment, the intra block copy mode may be applied to both the first partition and the second partition of the current block. Here, for each partition, the encoder may encode and transmit information indicating whether the intra block copy mode is applied individually. Furthermore, for partitions to which the intra block copy mode is applied, the encoder may encode and transmit block vector information for each partition. Furthermore, the decoder may decode this information for each partition.

[0210] According to an embodiment, if the current block is in geometric partitioning mode and the intra block copy mode is applied to a partition of the current block, information about the prediction method of each partition may be parsed (transmitted) as follows. First, by parsing information about the first partition (first partition flag), the prediction mode for the first partition is determined in the normal intra prediction mode and the intra block copy mode. If the first partition is in the normal intra prediction mode, the information about the second partition (second partition flag) is not parsed, and the prediction mode of the second partition is determined to be the intra block copy mode. If the first partition is in the intra block copy mode, by parsing information about the second partition (second partition flag), the prediction mode for the second partition is determined in the normal intra prediction mode and the intra block copy mode. Here, for the partition to which the intra block copy mode is applied, the block vector information of the partition may be additionally parsed.

[0211] According to an embodiment, if the current block is in geometric partition mode and the intra block copy mode is applied to a partition of the current block, the parsing (transmission) method is as follows. By parsing information about the first partition (first partition flag), the prediction mode for the first partition is determined in the normal intra prediction mode and the intra block copy mode. In addition, independently of the first partition, by parsing information about the second partition (second partition flag), the prediction mode for the second partition is determined in the normal intra prediction mode and the intra block copy mode. Here, for the partition to which the intra block copy mode is applied, the block vector information of the partition may be additionally parsed.

[0212] The method proposed in this embodiment can be applied according to the size of the block. For example, the proposed method can be applied only when the horizontal length and / or vertical length of the block is equal to or greater than an arbitrary value (e.g., 4) or / and equal to or less than an arbitrary 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. On the other hand, the proposed method can be applied only when the height of the block is less than a predetermined integer multiple of the width. Alternatively, according to an embodiment, the proposed method can be applied only when the product of the horizontal length and vertical length of the block is equal to or greater than an arbitrary value (e.g., 32).

[0213] exist Figures 13 and 14 In

[0014] , a method for efficiently transmitting / parsing block vector information for intra block copy mode in geometric partitioning mode is described.

[0214] In geometric partitioning mode, if the intra block copy mode is applied to more than one partition, the block vector information of the partitions should be efficiently encoded. Here, if the amount of block vector information to be encoded is large, decoding efficiency may decrease. Therefore, the following embodiment will describe a method for efficiently encoding block vectors.

[0215] Figure 13 A method of generating a prediction block based on intra block copy of a region where intra prediction is performed in a geometric partitioning mode is shown.

[0216] exist Figure 13 In , 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 integers, 0≤tN<t. Figure 13 , the reference picture 1320 is temporally located before the current picture 1310 , but this is merely an example, and the reference picture 1320 may be temporally located after the current picture 1310 .

[0217] exist Figure 13, a current block 1300 is in geometric partition mode and is partitioned into a first partition 1302 and a second partition 1304 by a linear partition boundary. Here, intra prediction may be applied to the first partition 1302, while inter prediction may be applied to the second partition 1304. A unidirectional motion vector 1324 of the second partition 1304 to which inter prediction is applied is MV2. Furthermore, a block vector 1314 of the first partition 1302 to which intra prediction is applied is BV1. To reduce the size of information regarding the block vector 1314 of the first partition 1302, the unidirectional motion vector 1324 of the second partition 1304 may be referenced.

[0218] Figure 14 A method of reducing the information size of a block vector by using a unidirectional motion vector is shown.

[0219] exist Figure 14 The dotted line indicates Figure 13 The unidirectional motion vector MV21324, and the solid line represents Figure 13 1314. The unidirectional motion vector MV21324 and the block vector BV11314 may be similar to each other. Therefore, considering this characteristic, instead of encoding the block vector BV11314 and the unidirectional motion vector MV21324 independently, the unidirectional motion vector MV21324 and the difference vector DV 1400 between the unidirectional motion vector MV21324 and the block vector BV11314 may be encoded. Therefore, the size of the block vector information to be transmitted to the decoder can be effectively reduced. Equation 1 shows a method for calculating the vector difference DV.

[0220] [Equation 1]

[0221] DV x =MV2 x -BV1 x

[0222] DV y =MV2 y -BV1 y

[0223] In Equation 1, MV2x, BV1x, and DVx represent 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, MV2y, BV1y, and DVy represent 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.

[0224] In contrast to the above embodiment, the block vector BV1 1314 and the difference vector DV 1400 between the block vector BV1 1314 and the unidirectional motion vector MV2 1324 may be encoded.

[0225] Figure 15 An embodiment of a prediction method according to a geometric partitioning mode in which an intra template matching mode is applied is shown.

[0226] In step 1502, the current block is partitioned into a first partition and a second partition along a partition boundary.

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

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

[0229] According to an embodiment, the prediction method of the second partition can be determined based on the prediction method of the first partition, or the prediction method of the first partition can be determined based on the prediction method of the second partition. For example, when the intra template matching mode is applied to the first partition and the intra prediction mode is applied to the second partition, the second partition can be predicted by one of the predetermined intra prediction methods. On the other hand, when the intra template matching mode is not applied to the first partition and the intra prediction mode is applied to the second partition, the second partition can be predicted by a prediction method not included in the predetermined intra prediction method. The predetermined intra prediction method may include at least one of a planar mode, a DC mode, a horizontal mode, and a vertical mode. As another example, when the intra template matching mode is applied to the first partition and the conventional intra prediction mode is applied to the second partition, the second partition can be predicted by the conventional intra prediction mode.

[0230] According to an embodiment, when the intra 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 configured to be different from each other.

[0231] At step 1506 , when the intra template matching mode is applied to the first partition, a template of the first partition is determined.

[0232] According to an embodiment, the first partition may include an upper left sample of the current block, and the template of the first partition may include at least one of a left area located to the left of the first partition, an upper area located above the first partition, and an upper left area located above the left of the first partition.

[0233] According to an embodiment, if the current block is adjacent to the upper boundary of the slice or picture including the current block, the template may include the left region instead of the upper region and the upper left region. On the other hand, if the current block is adjacent to the left boundary of the slice or picture including the current block, the template may include the upper region instead of the left region and the upper left region.

[0234] According to an embodiment, the width of the upper area of the template may be configured to be the same as the upper width of the first partition, and the height of the left area of the template may be configured to be the same as the left height of the first partition. Alternatively, the width of the upper area of the template may be configured to be the same as the width of the current block, and the height of the left area of the template may be configured to be the same as the height of the current block.

[0235] According to an 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 based on the extended segmentation boundary of the current block.

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

[0237] According to an embodiment, the first partition may include the top-left sample of the current block.

[0238] According to an embodiment, the first partition may not include the upper left sample of the current block but may be adjacent to at least one of the left boundary and the 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 above the first partition.

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

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

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

[0242] According to the prediction method performed in steps 1502 to 1512, the current block may be encoded or decoded. According to the prediction method performed in steps 1502 to 1512, the bit stream generated by the encoder may be stored in a recording medium or transmitted outside the encoder. If the intra template matching mode is applied to the second partition, then Figure 15 The method can be applied not only to the first partition but also to the second partition.

[0243] Figure 16 An embodiment of a prediction method according to a geometric partitioning mode in which the intra block copy mode is applied is shown.

[0244] In step 1602, the current block is partitioned into a first partition and a second partition along a partition boundary.

[0245] At step 1604 , it is determined whether the intra block copy mode is applied to the first partition.

[0246] According to an embodiment, one of an inter-frame prediction mode, an intra-frame prediction mode, an intra-frame block copy mode, and an intra-frame template matching mode may be applied to each of the first partition and the second partition. The prediction method applied to the first partition and the second partition may be determined independently of each other. Based on the first partition region flag, it may be determined whether the intra-frame block copy mode is applied to the first partition. Additionally, based on the second partition region flag, it may be determined whether the intra-frame block copy mode is applied to the second partition.

[0247] According to an embodiment, based on the first partition region flag, it can be determined whether the intra block copy mode is applied to the first partition. In addition, if the intra block copy mode is not applied to the first partition, it can be determined that the intra block copy mode is applied to the second partition. On the other hand, if the intra block copy mode is applied to the first partition, it can be determined whether the intra block copy mode is applied to the second partition based on the second partition region flag.

[0248] According to an embodiment, the prediction method of the second partition can be determined based on the prediction method of the first partition, or the prediction method of the first partition can be determined based on the prediction method of the second partition. For example, when the intra block copy mode is applied to the first partition and the intra prediction mode is applied to the second partition, the second partition can be predicted by one of the predetermined intra prediction methods. On the other hand, when the intra block copy mode is not applied to the first partition and the intra prediction mode is applied to the second partition, the second partition can be predicted by a prediction method not included in the predetermined intra prediction method. The predetermined intra prediction method may include at least one of a planar mode, a DC mode, a horizontal mode, and a vertical mode. Alternatively, when the intra block copy mode is applied to the first partition and the intra prediction mode is applied to the second partition, the second partition can be predicted by a conventional intra prediction mode.

[0249] According to an embodiment, when the intra 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 configured to be different from each other.

[0250] At step 1606 , when the intra block copy mode is applied to the first partition, a block vector of the first partition is determined, the block vector representing a reference block within a block vector search range of the current block.

[0251] According to an embodiment, when intra block copy mode is applied to a first partition and inter prediction mode is applied to a second partition, a block vector for the first partition may be derived based on a motion vector for the second partition. Here, a difference vector representing the difference between the block vector for the first partition and the motion vector for the second partition may be obtained, and the block vector for the first partition may be derived based on the motion vector and the difference vector for the second partition. Alternatively, the block vector for the second partition may be derived based on the motion vector and the difference vector for the first partition.

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

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

[0254] According to the prediction method performed at steps 1602 to 1610, the current block may be encoded or decoded. In addition, according to the prediction method performed at steps 1602 to 1610, the bit stream generated by the encoder may be stored in a recording medium or transmitted outside the encoder. If the intra block copy mode is applied to the second partition, then Figure 16 The method can be applied not only to the first partition but also to the second partition.

[0255] Figure 17 The following exemplifies a content streaming system to which the embodiments of the present disclosure can be applied.

[0256] like Figure 17 As shown, the content streaming media system applying the embodiment of the present disclosure may mainly include an encoding server, a streaming media server, a web server, a media storage device, a user device and a multimedia input device.

[0257] The encoding server compresses the content received from the multimedia input device (such as a smart phone, camera, CCTV, etc.) into digital data to generate a bit stream and transmits it to the streaming server. As another example, if the multimedia input device (such as a smart phone, camera, CCTV, etc.) directly generates the bit stream, the encoding server can be omitted.

[0258] A bitstream may be generated by applying the image encoding method and / or the image encoding device according to the embodiments of the present disclosure, and the streaming server may temporarily store the bitstream during transmission or reception of the bitstream.

[0259] The streaming server transmits multimedia data to the user device via a web server based on user requests. The web server can also serve as a medium for notifying the user of any available services. When the user requests a desired service from the web server, the web server transmits it to the streaming server, which then sends the multimedia data to the user. In this case, the content streaming system may include a separate control server, which can control commands and responses between devices within the content streaming system.

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

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

[0262] Each server in the above content streaming system may operate as a distributed server, in which case the data received from each server may be distributed and processed.

[0263] The above embodiments may be performed in the same or corresponding manner in an encoding device and a decoding device. In addition, at least one or a combination of at least one of the above embodiments may be used to encode / decode an image.

[0264] The order of applying the above embodiments may be different in the encoding device and the decoding device. Alternatively, the order of applying the above embodiments may be the same in the encoding device and the decoding device.

[0265] The above embodiments may be performed for each of the luminance signal and the chrominance signal. Alternatively, the above embodiments for the luminance signal and the chrominance signal may be performed identically.

[0266] In the above embodiments, the method is described based on a flowchart having a series of steps or units, but the present disclosure is not limited to the order of the steps, but some steps can be performed simultaneously with other steps or in a different order. In addition, it should be understood by those skilled in the art that the steps in the flowchart are not mutually exclusive, and other steps can be added to the flowchart or some steps can be deleted from the flowchart without affecting the scope of the present disclosure.

[0267] The embodiments may be implemented in the form of program instructions executable by various computer components and recorded in a computer-readable recording medium. The computer-readable recording medium may include independent program instructions, data files, data structures, etc., or a combination of program instructions, data files, data structures, etc. The program instructions recorded in the computer-readable recording medium may be specially designed and constructed for the present disclosure, or may be well known to those skilled in the art in the field of computer software technology.

[0268] 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.

[0269] Examples of computer-readable recording media include: magnetic recording media such as hard disks, floppy disks, and magnetic tapes; optical data storage media such as CD-ROMs or DVD-ROMs; magneto-optical media such as floppy disks; and hardware devices such as read-only memory (ROM), random access memory (RAM), flash memory, etc., which are specially constructed to store and implement program instructions. Examples of program instructions include not only machine language codes formatted by a compiler, but also high-level language codes that can be implemented by a computer using an interpreter. A hardware device can be configured to be operated by one or more software modules, or vice versa, to perform the processes according to the present disclosure.

[0270] Although the present disclosure has been described with respect to specific items such as detailed elements and limited embodiments and drawings, they are only provided to help a more comprehensive understanding of the present disclosure, and the present disclosure is not limited to the above embodiments. It will be understood by those skilled in the art that various modifications and changes can be made based on the above description.

[0271] Therefore, the spirit of the present disclosure should not be limited to the above-described embodiments, and the full scope of the appended claims and their equivalents should fall within the scope and spirit of the present invention.

[0272] Industrial Applicability

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

Claims

1. A method for decoding an image, the method comprising: Split the current block into a first partition and a second partition along a partition boundary; determining whether an intra block copy mode is applied to the first partition; determining a block vector of the first partition when the intra block copy mode is applied to the first partition, the block vector representing a reference block within a block vector search range of the current block; Based on the block vector, determining a reference block referenced by the first partition; and Based on the reference block, the first partition is predicted.

2. The method according to claim 1, wherein determining whether the intra block copy mode is applied to the first partition based on a first partition area flag, wherein, when the intra block copy mode is not applied to the first partition, the intra block copy mode is applied to the second partition, and When the intra block copy mode is applied to the first partition, it is determined whether the intra block copy mode is applied to the second partition based on a second partition area flag.

3. The method according to claim 1, wherein Based on a first partition area flag, it is determined whether the intra block copy mode is applied to the first partition, and based on a second partition area flag, it is determined whether the intra block copy mode is applied to the second partition.

4. The method according to claim 1, wherein The second partition applies one of an inter prediction mode, an intra prediction mode, the intra block copy mode, and an intra template matching mode.

5. The method according to claim 4, wherein Regardless of whether the intra block copy mode is applied to the first partition, a prediction method applied to the second partition is determined.

6. The method according to claim 4, wherein: When the intra block copy mode is applied to the first partition and the intra prediction mode is applied to the second partition, predicting the second partition by one of predetermined intra prediction methods, wherein, when the intra block copy mode is not applied to the first partition and the intra prediction mode is applied to the second partition, the second partition is predicted by a prediction method not included in the predetermined intra prediction method, and The predetermined intra-frame prediction method includes at least one of a planar mode, a DC mode, a horizontal mode and a vertical mode.

7. The method according to claim 4, wherein: When the intra block copy mode is applied to the first partition and the intra prediction mode is applied to the second partition, the second partition is predicted by one of conventional intra prediction methods.

8. The method according to claim 4, wherein: When the intra 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 configured to be different from each other.

9. The method according to claim 1, wherein: When the intra block copy mode is applied to the first partition and the inter 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. The method according to claim 9, further comprising: obtaining a difference vector representing a difference between the block vector of the first partition and the motion vector of the second partition, The block vector of the first partition is derived based on the motion vector and the difference vector of the second partition.

11. A method for image encoding, the method comprising: Split the current block into a first partition and a second partition along a partition boundary; determining whether an intra block copy mode is applied to the first partition; determining a block vector of the first partition when the intra block copy mode is applied to the first partition, the block vector representing a reference block within a block vector search range of the current block; Based on the block vector, determining a reference block referenced by the first partition; and Based on the reference block, the first partition is predicted.

12. A computer-readable recording medium for storing a bit stream generated by an image encoding method, in, The image encoding method comprises: Split the current block into a first partition and a second partition along a partition boundary; determining whether an intra block copy mode is applied to the first partition; determining a block vector of the first partition when the intra block copy mode is applied to the first partition, the block vector representing a reference block within a block vector search range of the current block; Based on the block vector, determining a reference block referenced by the first partition; and Based on the reference block, the first partition is predicted.

13. A method for transmitting a bitstream, wherein the bitstream is generated by an image encoding method, the method comprising: Encoding the image based on the image encoding method; and transmitting said bitstream containing the encoded image, The image encoding method includes: Split the current block into a first partition and a second partition along a partition boundary; determining whether an intra block copy mode is applied to the first partition; determining a block vector of the first partition when the intra block copy mode is applied to the first partition, the block vector representing a reference block within a block vector search range of the current block; Based on the block vector, determining a reference block referenced by the first partition; and Based on the reference block, the first partition is predicted.