Image encoding / decoding method and device, and recording medium on which bitstream is stored

Geometric segmentation in image compression technologies addresses encoding complexity and prediction accuracy issues by dividing blocks into partitions based on angle and distance indices, enhancing efficiency and accuracy in high-resolution image processing.

WO2026010377A1PCT designated stage Publication Date: 2026-01-08LG ELECTRONICS INC
View PDF 5 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing image compression technologies struggle to efficiently handle high-resolution and high-quality images, particularly in terms of encoding and decoding complexity and prediction accuracy.

Method used

Implementing a block segmentation method based on geometric segmentation, which divides blocks into partitions using angle and distance indices to generate prediction blocks and reduce encoding complexity while improving prediction accuracy.

Benefits of technology

This approach enhances encoding efficiency and improves prediction accuracy by better matching image characteristics and reducing residual data, leading to improved inter prediction performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure KR2025009465_08012026_PF_FP_ABST
    Figure KR2025009465_08012026_PF_FP_ABST
Patent Text Reader

Abstract

An image decoding method and device according to the present disclosure may: divide the current block into first and second partitions on the basis of geometric division information of the current block; generate first and second prediction blocks for the first and second partitions, respectively; generate a prediction block of the current block on the basis of the first and second prediction blocks; and reconstruct the current block on the basis of the prediction block. Any one of a plurality of geometric division types can be specified on the basis of an angle index and a distance index corresponding to the geometric division information. The angle index can indicate any one from among a plurality of division angle candidates that can be used by the current block.
Need to check novelty before this filing date? Find Prior Art

Description

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

[0001] The present invention relates to a video encoding / decoding method and device, and a recording medium storing a bitstream.

[0002] Recently, the demand for high-resolution, high-quality images, such as HD (High Definition) images and UHD (Ultra High Definition) images, is increasing in various application fields, and accordingly, high-efficiency image compression technologies are being discussed.

[0003] There are various technologies for image compression, such as inter prediction technology that predicts pixel values ​​included in the current picture from pictures before or after the current picture, intra prediction technology that predicts pixel values ​​included in the current picture using pixel information within the current picture, and entropy encoding technology that assigns short codes to values ​​with high frequency of appearance and long codes to values ​​with low frequency of appearance, and these technologies can be used to effectively compress and transmit or store image data.

[0004] The present disclosure provides a block segmentation method and device based on geometric segmentation.

[0005] The present disclosure provides a method and device for predicting a partition according to geometric division.

[0006] The present disclosure provides a method and device for blending partitions according to geometric division.

[0007] The video decoding method and device according to the present disclosure can divide the current block into first and second partitions based on geometric segmentation information of the current block, generate first and second prediction blocks for the first and second partitions, respectively, generate a prediction block of the current block based on the first and second prediction blocks, and reconstruct the current block based on the prediction block. Here, any one of a plurality of geometric segmentation types can be specified based on an angle index and a distance index corresponding to the geometric segmentation information. The angle index can indicate any one of a plurality of segmentation angle candidates available to the current block.

[0008] In the image decoding method and device according to the present disclosure, the plurality of split angle candidates can be divided into a first angle group having a vertical direction, a second angle group having a horizontal direction, and a third angle group having a diagonal direction.

[0009] In the image decoding method and device according to the present disclosure, among the plurality of segmentation angle candidates, the number of segmentation angle candidates belonging to the first angle group may be greater than the number of segmentation angle candidates belonging to the third angle group.

[0010] In the image decoding method and device according to the present disclosure, among the plurality of segmentation angle candidates, the number of segmentation angle candidates belonging to the second angle group may be greater than the number of segmentation angle candidates belonging to the third angle group.

[0011] In the image decoding method and device according to the present disclosure, among the plurality of segmentation angle candidates, the number of segmentation angle candidates belonging to the first angle group may be less than or equal to the number of segmentation angle candidates belonging to the second angle group.

[0012] In the image decoding method and device according to the present disclosure, the plurality of split angle candidates may include at least one of a first angle having a distance ratio of the horizontal axis to the vertical axis of -1:8, a second angle having a distance ratio of the horizontal axis to the vertical axis of -1:4, or a third angle having a distance ratio of the horizontal axis to the vertical axis of -3:8.

[0013] In the image decoding method and device according to the present disclosure, the plurality of split angle candidates may not include at least one of a fourth angle having a distance ratio of the horizontal axis to the vertical axis of -5:8, a fifth angle having a distance ratio of the horizontal axis to the vertical axis of -3:4, or a sixth angle having a distance ratio of the horizontal axis to the vertical axis of -7:8.

[0014] In the image decoding method and device according to the present disclosure, the plurality of split angle candidates may include at least one of a first angle having a distance ratio of the horizontal axis to the vertical axis of -8:3, a second angle having a distance ratio of the horizontal axis to the vertical axis of -4:1, or a third angle having a distance ratio of the horizontal axis to the vertical axis of -8:1.

[0015] In the image decoding method and device according to the present disclosure, the plurality of split angle candidates may not include at least one of a fourth angle having a distance ratio of the horizontal axis to the vertical axis of -8:7, a fifth angle having a distance ratio of the horizontal axis to the vertical axis of -4:3, or a sixth angle having a distance ratio of the horizontal axis to the vertical axis of -8:5.

[0016] In the image decoding method and device according to the present disclosure, the plurality of geometric segmentation types can be determined based on at least one of the size or shape of the current block.

[0017] The video encoding method and device according to the present disclosure may divide the current block into first and second partitions based on geometric partitioning information of the current block, generate first and second prediction blocks for the first and second partitions, respectively, generate a prediction block of the current block based on the first and second prediction blocks, generate a residual block of the current block based on the prediction block of the current block, derive transform coefficients of the current block based on the residual block, and encode residual information regarding the transform coefficients. Here, any one of a plurality of geometric partitioning types may be specified based on an angle index and a distance index corresponding to the geometric partitioning information. The angle index may indicate any one of a plurality of partitioning angle candidates available to the current block.

[0018] A computer-readable digital storage medium is provided, which stores encoded video / image information that causes a decoding device according to the present disclosure to perform a video decoding method.

[0019] A computer-readable digital storage medium storing video / image information generated by a video encoding method according to the present disclosure is provided.

[0020] A method and device for transmitting video / image information generated by a video encoding method according to the present disclosure are provided.

[0021] Through geometric segmentation according to the present disclosure, block segmentation that better matches image characteristics can be performed, and further, encoding complexity according to geometric segmentation can be reduced.

[0022] The encoding efficiency of inter prediction can be improved through prediction according to the geometric division mode according to the present disclosure.

[0023] The blending method of the geometric segmentation mode according to the present disclosure can improve the accuracy of prediction and reduce residual data.

[0024] FIG. 1 illustrates a video / image coding system according to the present disclosure.

[0025] FIG. 2 is a schematic block diagram of an encoding device to which an embodiment of the present disclosure can be applied and in which encoding of a video / image signal is performed.

[0026] FIG. 3 is a schematic block diagram of a decoding device to which an embodiment of the present disclosure can be applied and in which decoding of a video / image signal is performed.

[0027] FIG. 4 illustrates a decoding method performed by a decoding device (300) as an embodiment according to the present disclosure.

[0028] FIGS. 5 to 19 illustrate an example of a geometric division method according to an embodiment of the present disclosure.

[0029] FIG. 20 illustrates a schematic configuration of a decoding device (300) that performs a decoding method according to the present disclosure.

[0030] FIG. 21 illustrates an encoding method performed by an encoding device (200) as an embodiment according to the present disclosure.

[0031] Fig. 22 illustrates a schematic configuration of an encoding device (200) that performs an encoding method according to the present disclosure.

[0032] FIG. 23 illustrates an example of a content streaming system to which embodiments of the present disclosure can be applied.

[0033] The present disclosure may be modified in various ways and encompasses numerous embodiments. Specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the present disclosure to specific embodiments, but rather to encompass all modifications, equivalents, and alternatives falling within the spirit and technical scope of the present disclosure. Throughout the description of each drawing, similar reference numerals have been used to designate similar components.

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

[0035] When a component is referred to as being "connected" or "connected" to another component, it should be understood that it may be directly connected or connected to that other component, but that there may be other components intervening. Conversely, when a component is referred to as being "directly connected" or "connected" to another component, it should be understood that there are no other components intervening.

[0036] The terminology used in this application is only used to describe specific embodiments and is not intended to limit the present disclosure. The singular expression includes the plural expression unless the context clearly indicates otherwise. In this application, it should be understood that the terms "comprise" or "have" indicate the presence of a feature, number, step, operation, component, part, or combination thereof described in the specification, but do not preclude the possibility of the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.

[0037] The present disclosure relates to video / image coding. For example, the methods / embodiments disclosed in this specification can be applied to methods disclosed in the versatile video coding (VVC) standard. In addition, the methods / embodiments disclosed in this specification can be applied to methods disclosed in the essential video coding (EVC) standard, the AOMedia Video 1 (AV1) standard, the second generation of audio video coding standard (AVN2), or the next generation of video / image coding standards (e.g., H.267 or H.268).

[0038] This specification presents various embodiments of video / image coding, and unless otherwise stated, the embodiments may be performed in combination with each other.

[0039] In this specification, a video may refer to a set of images over time. A picture generally refers to a unit representing one image at a specific time point, and a slice / tile is a unit that constitutes part of a picture in coding. A slice / tile may include one or more coding tree units (CTUs). A picture may be composed of one or more slices / tiles. A tile is a rectangular area consisting of multiple CTUs within a specific tile column and a specific tile row of a picture. A tile column is a rectangular area of ​​CTUs that has a height equal to the height of the picture and a width specified by the syntax requirements of the picture parameter set. A tile row is a rectangular area of ​​CTUs that has a height specified by the picture parameter set and a width equal to the width of the picture. CTUs within a tile are arranged consecutively according to the CTU raster scan, while tiles within a picture may be arranged consecutively according to the tile raster scan. A slice may contain an integer number of complete tiles or an integer number of contiguous complete CTU rows within a picture, which may be exclusively contained within a single NAL unit. Meanwhile, a picture may be divided into two or more subpictures. A subpicture may be a rectangular region of one or more slices within a picture.

[0040] A pixel, or pel, can refer to the smallest unit that constitutes a picture (or image). Additionally, the term "sample" can be used as a counterpart to a pixel. A sample can generally represent a pixel or a pixel value, and can represent only the pixel / pixel value of the luminance component, or only the pixel / pixel value of the chrominance component.

[0041] A unit may represent a basic unit of image processing. A unit may include at least one of a specific region of a picture and information related to the region. One unit may include one luma block and two chroma (e.g., cb, cr) blocks. In some cases, the term "unit" may be used interchangeably with terms such as "block" or "area." In general, an MxN block may include a set (or array) of samples (or sample array) or transform coefficients consisting of M columns and N rows.

[0042] As used herein, "A or B" can mean "only A," "only B," or "both A and B." In other words, as used herein, "A or B" can be interpreted as "A and / or B." For example, as used herein, "A, B or C" can mean "only A," "only B," "only C," or "any combination of A, B and C."

[0043] As used herein, a slash ( / ) or a comma can mean "and / or." For example, "A / B" can mean "A and / or B." Accordingly, "A / B" can mean "only A," "only B," or "both A and B." For example, "A, B, C" can mean "A, B, or C."

[0044] In this specification, "at least one of A and B" may mean "only A", "only B" or "both A and B". Additionally, in this specification, the expressions "at least one of A or B" or "at least one of A and / or B" may be interpreted identically to "at least one of A and B".

[0045] Additionally, in this specification, “at least one of A, B and C” can mean “only A,” “only B,” “only C,” or “any combination of A, B and C.” Additionally, “at least one of A, B or C” or “at least one of A, B and / or C” can mean “at least one of A, B and C.”

[0046] Additionally, parentheses used herein may mean "for example." Specifically, when "prediction (intra-prediction)" is indicated, "intra-prediction" may be suggested as an example of "prediction." In other words, "prediction" in this specification is not limited to "intra-prediction," and "intra-prediction" may be suggested as an example of "prediction." Furthermore, even when "prediction (i.e., intra-prediction)" is indicated, "intra-prediction" may be suggested as an example of "prediction."

[0047] Technical features individually described in a single drawing in this specification may be implemented individually or simultaneously.

[0048] FIG. 1 illustrates a video / image coding system according to the present disclosure.

[0049] Referring to FIG. 1, a video / image coding system may include a first device (source device) and a second device (receiving device).

[0050] A source device can transmit encoded video / image information or data to a receiving device via a digital storage medium or a network in the form of a file or streaming. The source device may include a video source, an encoding device, and a transmitting device. The receiving device may include a receiving device, a decoding device, and a renderer. The encoding device may be referred to as a video / image encoding device, and the decoding device may be referred to as a video / image decoding device. The transmitter may be included in the encoding device. The receiver may be included in the decoding device. The renderer may include a display unit, and the display unit may be configured as a separate device or an external component.

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

[0052] An encoding device can encode input video / images. The encoding device can perform a series of procedures, such as prediction, transformation, and quantization, to improve compression and coding efficiency. The encoded data (encoded video / image information) can be output in the form of a bitstream.

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

[0054] The decoding device can decode the video / image by performing a series of procedures such as inverse quantization, inverse transformation, and prediction corresponding to the operation of the encoding device.

[0055] The renderer can render decoded video / images. The rendered video / images can be displayed through the display unit.

[0056] FIG. 2 is a schematic block diagram of an encoding device to which an embodiment of the present disclosure can be applied and in which encoding of a video / image signal is performed.

[0057] Referring to FIG. 2, the encoding device (200) may be configured to include an image partitioner (210), a prediction unit (predictor) 220, a residual processor (residual processor) 230, an entropy encoder (entropy encoder) 240, an adder (adder) 250, a filter (filter) 260, and a memory (memory) 270. The prediction unit (220) may include an inter prediction unit (221) and an intra prediction unit (222). The residual processor (230) may include a transformer (transformer) 232, a quantizer (quantizer) 233, a dequantizer (dequantizer) 234, and an inverse transformer (inverse transformer) 235. The residual processing unit (230) may further include a subtractor (231). The addition unit (250) may be called a reconstructor or a recontructed block generator. The image segmentation unit (210), the prediction unit (220), the residual processing unit (230), the entropy encoding unit (240), the addition unit (250), and the filtering unit (260) described above may be configured by one or more hardware components (e.g., an encoding device chipset or processor) according to an embodiment. In addition, the memory (270) may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware component may further include the memory (270) as an internal / external component.

[0058] The image segmentation unit (210) can segment an input image (or picture, frame) input to the encoding device (200) into one or more processing units. For example, the processing unit may be called a coding unit (CU). In this case, the coding unit may be recursively segmented from a coding tree unit (CTU) or a largest coding unit (LCU) according to a QTBTTT (Quad-tree binary-tree ternary-tree) structure.

[0059] For example, a single coding unit may be split into multiple coding units with deeper depths based on a quad-tree structure, a binary tree structure, and / or a ternary structure. In this case, for example, the quad-tree structure may be applied first, and the binary tree structure and / or the ternary structure may be applied later. Alternatively, the binary tree structure may be applied before the quad-tree structure. The coding procedure according to the present specification may be performed based on the final coding unit that is no longer split. In this case, based on coding efficiency according to image characteristics, etc., the largest coding unit may be used directly as the final coding unit, or, if necessary, the coding unit may be recursively split into coding units of lower depths, and the coding unit with the optimal size may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and restoration, which will be described later.

[0060] As another example, the processing unit may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may each be split or partitioned from the final coding unit described above. The prediction unit may be a unit of sample prediction, and the transform unit may be a unit for deriving a transform coefficient and / or a unit for deriving a residual signal from a transform coefficient.

[0061] The term "unit" may be used interchangeably with terms such as "block" or "area" depending on the case. In general, an MxN block can represent a set of samples or transform coefficients consisting of M columns and N rows. A sample can generally represent a pixel or a pixel value, and can represent only the pixel / pixel value of the luminance component, or only the pixel / pixel value of the chrominance component. A sample can be used as a term corresponding to a pixel or pel in a picture (or image).

[0062] The encoding device (200) can generate a residual signal (residual block, residual sample array) by subtracting a prediction signal (prediction block, prediction sample array) output from an inter prediction unit (221) or an intra prediction unit (222) from an input video signal (original block, original sample array), and the generated residual signal is transmitted to a conversion unit (232). In this case, a unit that subtracts a prediction signal (prediction block, prediction sample array) from an input video signal (original block, original sample array) within the encoding device (200) may be called a subtraction unit (231).

[0063] The prediction unit (220) can perform a prediction on a block to be processed (hereinafter, referred to as a current block) and generate a predicted block including prediction samples for the current block. The prediction unit (220) can determine whether intra prediction or inter prediction is applied on a current block or CU basis. The prediction unit (220) can generate various information related to prediction, such as prediction mode information, as described later in the description of each prediction mode, and transmit the information to the entropy encoding unit (240). The information related to prediction can be encoded by the entropy encoding unit (240) and output in the form of a bitstream.

[0064] The intra prediction unit (222) can predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located a certain distance away from the current block depending on the prediction mode. In intra prediction, the prediction modes may include one or more non-directional modes and multiple directional modes. The non-directional mode may include at least one of a DC mode or a planar mode. The directional mode may include 33 directional modes or 65 directional modes depending on the degree of detail in the prediction direction. However, this is only an example, and a greater or lesser number of directional modes may be used depending on the settings. The intra prediction unit (222) may also determine the prediction mode applied to the current block by using the prediction mode applied to the template region.

[0065] The inter prediction unit (221) can derive a prediction block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information can be predicted in units of blocks, subblocks, or samples based on the correlation of the motion information between the template region and the current block. The motion information can include a motion vector and a reference picture index. The motion information can further include inter prediction direction information (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the template region can include a spatial template region (spatial neighboring block) existing in the current picture and a temporal template region (temporal neighboring block) existing in the reference picture. The reference picture including the reference block and the reference picture including the temporal template region may be the same or different. The temporal template region may be called a collocated reference block, a collocated CU (colCU), etc., and a reference picture including the temporal template region may be called a collocated picture (colPic). For example, the inter prediction unit (221) may configure a motion information candidate list based on template regions, and generate information indicating which candidate is used to derive the motion vector and / or reference picture index of the current block. Inter prediction may be performed based on various prediction modes, and for example, in the case of skip mode and merge mode, the inter prediction unit (221) may use the motion information of the template region as the motion information of the current block. In the case of skip mode, unlike the merge mode, a residual signal may not be transmitted.In the motion vector prediction (MVP) mode, the motion vector of the template area is used as a motion vector predictor, and the motion vector of the current block can be indicated by signaling the motion vector difference.

[0066] The prediction unit (220) can generate a prediction signal based on various prediction methods described below. For example, the prediction unit can apply intra prediction or inter prediction for prediction of a single block, and can also apply intra prediction and inter prediction simultaneously. This can be called combined inter and intra prediction (CIIP) mode. In addition, the prediction unit can be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block. The IBC prediction mode or palette mode can be used for content image / video coding such as games, such as screen content coding (SCC). IBC basically performs prediction within the current picture, but can be performed similarly to inter prediction in that it derives a reference block within the current picture. That is, IBC can utilize at least one of the inter prediction techniques described herein. Palette mode can be viewed as an example of intra coding or intra prediction. When the palette mode is applied, sample values ​​within a picture can be signaled based on information about the palette table and palette index. The prediction signal generated through the prediction unit (220) can be used to generate a restoration signal or a residual signal.

[0067] The transform unit (232) can apply a transform technique to the residual signal to generate transform coefficients. For example, the transform technique can include at least one of a Discrete Cosine Transform (DCT), a Discrete Sine Transform (DST), a Karhunen-Loeve Transform (KLT), a Graph-Based Transform (GBT), or a Conditionally Non-linear Transform (CNT). Here, GBT refers to a transform obtained from a graph when the relationship information between pixels is expressed as a graph. CNT refers to a transform obtained based on generating a prediction signal using all previously restored pixels. In addition, the transform process can be applied to a pixel block having a square size and the same size, or can be applied to a block of a non-square variable size.

[0068] The quantization unit (233) quantizes the transform coefficients and transmits them to the entropy encoding unit (240), and the entropy encoding unit (240) can encode the quantized signal (information about the quantized transform coefficients) and output it as a bitstream. The information about the quantized transform coefficients can be called residual information. The quantization unit (233) can rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on the coefficient scan order, and can also generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form.

[0069] The entropy encoding unit (240) can perform various encoding methods such as exponential Golomb, context-adaptive variable length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), etc. The entropy encoding unit (240) can also encode information necessary for video / image restoration (e.g., values ​​of syntax elements, etc.) together or separately from quantized transform coefficients.

[0070] Encoded information (e.g., encoded video / image information) can be transmitted or stored in the form of a bitstream in units of NAL (network abstraction layer) units. The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may further include general constraint information. In the present specification, information and / or syntax elements transmitted / signaled from an encoding device to a decoding device may be included in the video / image information. The video / image information may be encoded through the above-described encoding procedure and included in the bitstream. The bitstream may be transmitted via a network or stored in a digital storage medium. Here, the network may include a broadcasting network and / or a communication network, and the digital storage medium may include various storage media, such as a USB, SD, CD, DVD, Blu-ray, HDD, or SSD. The signal output from the entropy encoding unit (240) may be configured as an internal / external element of the encoding device (200) by a transmitting unit (not shown) and / or a storing unit (not shown), or the transmitting unit may be included in the entropy encoding unit (240).

[0071] The quantized transform coefficients output from the quantization unit (233) can be used to generate a prediction signal. For example, by applying inverse quantization and inverse transformation to the quantized transform coefficients through the inverse quantization unit (234) and the inverse transform unit (235), a residual signal (residual block or residual samples) can be restored. The addition unit (250) can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed residual signal to the prediction signal output from the inter prediction unit (221) or the intra prediction unit (222). When there is no residual for the block to be processed, such as when skip mode is applied, the predicted block can be used as a reconstructed block. The addition unit (250) may be called a restoration unit or a reconstructed block generation unit. The generated restoration signal can be used for intra prediction of the next processing target block within the current picture, and can also be used for inter prediction of the next picture after filtering as described below. Meanwhile, LMCS (luma mapping with chroma scaling) may be applied during the picture encoding and / or restoration process.

[0072] The filtering unit (260) can improve subjective / objective picture quality by applying filtering to the restoration signal. For example, the filtering unit (260) can apply various filtering methods to the restoration picture to generate a modified restoration picture, and store the modified restoration picture in the memory (270), specifically, in the DPB of the memory (270). The various filtering methods can include deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc. The filtering unit (260) can generate various information regarding filtering and transmit it to the entropy encoding unit (240). The information regarding filtering can be encoded by the entropy encoding unit (240) and output in the form of a bitstream.

[0073] The modified restored picture transmitted to the memory (270) can be used as a reference picture in the inter prediction unit (221). Through this, when inter prediction is applied, the encoding device can avoid prediction mismatch between the encoding device (200) and the decoding device, and can also improve encoding efficiency.

[0074] The DPB of the memory (270) can store the modified restored picture to be used as a reference picture in the inter prediction unit (221). The memory (270) can store motion information of a block from which motion information in the current picture is derived (or encoded) and / or motion information of blocks in a picture that has already been restored. The stored motion information can be transferred to the inter prediction unit (221) to be used as motion information in a spatial template area or motion information in a temporal template area. The memory (270) can store restored samples of restored blocks in the current picture and transfer them to the intra prediction unit (222).

[0075] FIG. 3 is a schematic block diagram of a decoding device to which an embodiment of the present disclosure can be applied and in which decoding of a video / image signal is performed.

[0076] Referring to FIG. 3, the decoding device (300) may be configured to include an entropy decoder (310), a residual processor (320), a predictor (330), an adder (340), a filter (350), and a memory (360). The predictor (330) may include an inter-prediction unit (332) and an intra-prediction unit (331). The residual processor (320) may include a dequantizer (321) and an inverse transformer (321).

[0077] The entropy decoding unit (310), residual processing unit (320), prediction unit (330), addition unit (340), and filtering unit (350) described above may be configured by a single hardware component (e.g., a decoding device chipset or processor) depending on the embodiment. In addition, the memory (360) may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware component may further include the memory (360) as an internal / external component.

[0078] When a bitstream including video / image information is input, the decoding device (300) can restore the image corresponding to the process in which the video / image information is processed in the encoding device of FIG. 2. For example, the decoding device (300) can derive units / blocks based on block division-related information obtained from the bitstream. The decoding device (300) can perform decoding using a processing unit applied in the encoding device. Accordingly, the processing unit of decoding may be a coding unit, and the coding unit may be divided from a coding tree unit or a maximum coding unit according to a quad tree structure, a binary tree structure, and / or a ternary tree structure. One or more transform units may be derived from the coding unit. Then, the restored image signal decoded and output through the decoding device (300) can be reproduced through a reproduction device.

[0079] The decoding device (300) can receive a signal output from the encoding device of FIG. 2 in the form of a bitstream, and the received signal can be decoded through the entropy decoding unit (310). For example, the entropy decoding unit (310) can parse the bitstream to derive information (e.g., video / image information) necessary for image restoration (or picture restoration). The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may further include general constraint information. The decoding device can decode the picture further based on the information on the parameter set and / or the general constraint information. The signaling / received information and / or syntax elements described later in this specification can be decoded through the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit (310) can decode information in a bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output the values ​​of syntax elements required for image restoration and the quantized values ​​of transform coefficients for residuals. More specifically, the CABAC entropy decoding method receives a bin corresponding to each syntax element in the bitstream, determines a context model using information of the syntax element to be decoded and decoding information of the surrounding and decoding target blocks or information of symbols / bins decoded in the previous step, and predicts the occurrence probability of the bin according to the determined context model to perform arithmetic decoding of the bin to generate a symbol corresponding to the value of each syntax element.At this time, the CABAC entropy decoding method can update the context model using the information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model. Information regarding prediction among the information decoded by the entropy decoding unit (310) is provided to the prediction unit (inter prediction unit (332) and intra prediction unit (331)), and residual values ​​on which entropy decoding is performed by the entropy decoding unit (310), i.e., quantized transform coefficients and related parameter information, can be input to the residual processing unit (320). The residual processing unit (320) can derive a residual signal (residual block, residual samples, residual sample array). In addition, information regarding filtering among the information decoded by the entropy decoding unit (310) can be provided to the filtering unit (350). Meanwhile, a receiving unit (not shown) that receives a signal output from an encoding device may be further configured as an internal / external element of a decoding device (300), or the receiving unit may be a component of an entropy decoding unit (310).

[0080] Meanwhile, a decoding device according to the present specification may be called a video / video / picture decoding device, and the decoding device may be divided into an information decoding device (video / video / picture information decoding device) and a sample decoding device (video / video / picture sample decoding device). The information decoding device may include the entropy decoding unit (310), and the sample decoding device may include at least one of the inverse quantization unit (321), the inverse transformation unit (322), the addition unit (340), the filtering unit (350), the memory (360), the inter prediction unit (332), and the intra prediction unit (331).

[0081] The inverse quantization unit (321) can inverse quantize the quantized transform coefficients and output the transform coefficients. The inverse quantization unit (321) can rearrange the quantized transform coefficients into a two-dimensional block form. In this case, the rearrangement can be performed based on the coefficient scanning order performed in the encoding device. The inverse quantization unit (321) can perform inverse quantization on the quantized transform coefficients using quantization parameters (e.g., quantization step size information) and obtain transform coefficients.

[0082] In the inverse transform unit (322), the transform coefficients are inversely transformed to obtain a residual signal (residual block, residual sample array).

[0083] The prediction unit (320) can perform a prediction on the current block and generate a predicted block including prediction samples for the current block. The prediction unit (320) can determine whether intra-prediction or inter-prediction is applied to the current block based on the information regarding the prediction output from the entropy decoding unit (310), and can determine a specific intra / inter-prediction mode.

[0084] The prediction unit (320) can generate a prediction signal based on various prediction methods described below. For example, the prediction unit (320) can apply intra prediction or inter prediction for prediction of a single block, and can also apply intra prediction and inter prediction simultaneously. This can be called combined inter and intra prediction (CIIP) mode. In addition, the prediction unit can be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block. The IBC prediction mode or palette mode can be used for content image / video coding such as games, such as screen content coding (SCC). IBC basically performs prediction within the current picture, but can be performed similarly to inter prediction in that it derives a reference block within the current picture. That is, IBC can utilize at least one of the inter prediction techniques described herein. Palette mode can be viewed as an example of intra coding or intra prediction. When palette mode is applied, information about the palette table and palette index may be included and signaled in the video / image information.

[0085] The intra prediction unit (331) can predict the current block by referring to samples within the current picture. The referenced samples may be located in the neighborhood of the current block, or may be located a certain distance away from the current block, depending on the prediction mode. In intra prediction, the prediction modes may include one or more non-directional modes and multiple directional modes. The intra prediction unit (331) may also determine the prediction mode applied to the current block by using the prediction mode applied to the template region.

[0086] The inter prediction unit (332) can derive a prediction block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information can be predicted in units of blocks, subblocks, or samples based on the correlation of the motion information between the template region and the current block. The motion information can include a motion vector and a reference picture index. The motion information can further include inter prediction direction information (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the template region can include a spatial template region (spatial neighboring block) existing in the current picture and a temporal template region (temporal neighboring block) existing in the reference picture. For example, the inter prediction unit (332) can construct a motion information candidate list based on the template regions, and derive the motion vector and / or reference picture index of the current block based on the received candidate selection information. Inter prediction can be performed based on various prediction modes, and information about the prediction can include information indicating an inter prediction mode for the current block.

[0087] The addition unit (340) can generate a restoration signal (restored picture, restoration block, restoration sample array) by adding the acquired residual signal to the prediction signal (prediction block, prediction sample array) output from the prediction unit (including the inter-prediction unit (332) and / or intra-prediction unit (331)). When there is no residual for the block to be processed, such as when skip mode is applied, the prediction block can be used as the restoration block.

[0088] The addition unit (340) may be referred to as a restoration unit or restoration block generation unit. The generated restoration signal may be used for intra prediction of the next processing target block within the current picture, may be output after filtering as described below, or may be used for inter prediction of the next picture. Meanwhile, LMCS (luma mapping with chroma scaling) may be applied during the picture decoding process.

[0089] The filtering unit (350) can improve subjective / objective image quality by applying filtering to the restored signal. For example, the filtering unit (350) can apply various filtering methods to the restored picture to generate a modified restored picture, and transmit the modified restored picture to the memory (360), specifically, to the DPB of the memory (360). The various filtering methods can include deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.

[0090] The (modified) reconstructed picture stored in the DPB of the memory (360) can be used as a reference picture in the inter prediction unit (332). The memory (360) can store motion information of a block from which motion information is derived (or decoded) in the current picture and / or motion information of blocks in an already reconstructed picture. The stored motion information can be transferred to the inter prediction unit (332) to be used as motion information of a spatial template area or motion information of a temporal template area. The memory (360) can store reconstructed samples of reconstructed blocks in the current picture and transfer them to the intra prediction unit (331).

[0091] In this specification, the embodiments described in the filtering unit (260), the inter prediction unit (221), and the intra prediction unit (222) of the encoding device (200) can be applied to the filtering unit (350), the inter prediction unit (332), and the intra prediction unit (331) of the decoding device (300) in the same or corresponding manner, respectively.

[0092] FIG. 4 illustrates an image decoding method performed by a decoding device (300) as an embodiment according to the present disclosure.

[0093] Based on the geometric partitioning information of the current block, the current block can be divided into first and second partitions (S400).

[0094] Geometric segmentation information can specify an angle index and a distance index. Based on the angle index and the distance index, the geometric segmentation type of the current block can be determined. Geometric segmentation information can be signaled via the bitstream. One or more geometric segmentation information can be signaled for the current block.

[0095] The angle index may refer to the angle of the segmentation line for geometric segmentation. The angle index may indicate any one of multiple segmentation angle candidates available to the current block. The distance index may refer to the distance from the center of the current block to the segmentation line. The distance index may refer to any one of multiple segmentation distance candidates available to the current block.

[0096] Hereinafter, with reference to FIGS. 5 and 6, we will examine a method for defining the angle of a division line for geometric division.

[0097] Method 1

[0098] The angle of the dividing line according to the present disclosure can be defined by dividing 360 degrees into N parts. Here, the N parts can be based on equal angles or unequal angles. Here, N can be an integer of 32, 48, 64, or higher.

[0099] For example, FIG. 5 defines the angles of the division lines by dividing 360 degrees into 32 equal angles of 11.25 degrees. Each of the 32 division lines can be designated by assigning an angle index of 0 to 31. In this case, the plurality of division angle candidates according to the present disclosure can include all or part of the angles of the 32 division lines.

[0100] Alternatively, depending on the characteristics of the image, the segmentation angle candidates can be defined to have more fine-grained angles around the horizontal and vertical directions rather than the diagonal direction.

[0101] For example, smaller angles may be used around horizontal and vertical angles corresponding to angle indices of 0, 8, 16, and 24 in FIG. 5, and larger angles may be used around diagonal angles corresponding to indices of 4, 12, 20, and 28. The smaller angle may mean an angle smaller than a reference angle. For example, the smaller angle may be (1 / K) times the reference angle. K may be an integer greater than or equal to 2, 4, 8, or 2. The reference angle may mean an angle obtained by dividing 360 degrees into N equal angles. For example, if 360 degrees is divided into 32 equal angles, the reference angle may be 11.25 degrees. On the other hand, the larger angle may mean an angle larger than the reference angle. For example, the larger angle may be K times the reference angle. K can be an integer equal to 2, 3, 4, 5, or higher.

[0102] Method 2

[0103] The angle of the dividing line according to the present disclosure may be defined based on a pre-defined slope. Fig. 6 defines angles of up to 64 dividing lines based on a pre-defined slope. The angle of each dividing line may be defined in the format of m:n based on the distance ratio of the horizontal axis to the vertical axis constituting a specific slope. m:n may mean the ratio of the movement distance (m) in the horizontal axis direction to the movement distance (n) in the vertical axis direction from the center of coordinates of (0, 0). The angles of the dividing lines according to Fig. 6 and the corresponding angle indices may be as shown in the following Table 1.

[0104] Angle Index Angle Angle Index Angle 00:1320:-11-1:8331:-82-1:4341:-43-3:8353:-84-1:2361:-25-5:8375:-86-3:4383:-47-7:8397:-88-1:1401:-19-8:7418:-710-4:3424:-311-8:5438:-512-2:1442:-113-8:3458:-314-4:1464:-115-8:1478:-116 -1:0481:017-8:-1498:118-4:-1504:119-8:-3518:320-2:-1522:121-8:-5538:522-4:-3544:323-8:-7558:724-1:-1561:125-7:-8577:826-3:-4583:427-5:-8595:828-1:-2601:229-3:-8613:830-1:-4621:431-1:-8631:8

[0105] The plurality of split angle candidates according to the present disclosure may include all or some of the angles having angle indices of 0 to 63 defined in Table 1.

[0106] Hereinafter, for the convenience of explanation, the angles defined in Table 1 and the angle indices assigned thereto will be described. According to Table 1, the angle corresponding to the i-th angle index is substantially the same as the angle corresponding to the (i+32)-th angle index. Therefore, in the embodiment described below, when the angle corresponding to the i-th angle index is included in the split angle candidates, it can be understood that the angle corresponding to the (i+32)-th angle index is also included in the split angle candidates. Conversely, when the angle corresponding to the i-th angle index is excluded from the split angle candidates, it can be understood that the angle corresponding to the (i+32)-th angle index is also excluded from the split angle candidates. Referring to Fig. 6, the angles corresponding to the angle indices 1 to 15 may have a symmetrical relationship with the angles corresponding to the angle indices 31 to 17, respectively. Therefore, in the embodiment described below, when the angle corresponding to the i-th angle index is included in the split angle candidates, it can be understood that the angle having a symmetrical relationship with the i-th angle index is also included in the split angle candidates. Conversely, if the angle corresponding to the i-th angle index is excluded from the split angle candidates, it can be understood that the angle having a symmetrical relationship with the i-th angle index is also excluded from the split angle candidates. This understanding can be equally applied to other embodiments of the present specification.

[0107] The angles of the segmentation lines pre-defined in the encoding device and the decoding device (or the segmentation angle candidates available to the current block) can be broadly divided into a first angle group having a vertical direction, a second angle group having a horizontal direction, and a third angle group having a diagonal direction.

[0108] The first angle group may be a group of angles having vertical directionality. The angles having vertical directionality may be defined as a vertical angle and one or more surrounding angles adjacent thereto. For example, the first angle group according to Table 1 may include angle indices of 0 and 32 corresponding to vertical angles. In addition, the first angle group may include at least one of angle indices of 1 to 3, 29 to 31, 33 to 35, and 61 to 63 as surrounding angles.

[0109] The second angle group may be a group of angles having horizontal directionality. The angles having horizontal directionality may be defined as angles in the horizontal direction and one or more surrounding angles adjacent thereto. For example, the second angle group according to Table 1 may include angle indices of 16 and 48 corresponding to angles in the horizontal direction. In addition, the second angle group may include at least one of angle indices of 13 to 15, 17 to 19, 45 to 47, and 49 to 51 as surrounding angles.

[0110] The third angle group may be a group of angles having diagonal directionality. The angles having diagonal directionality may be defined by an angle in the diagonal direction and one or more surrounding angles adjacent thereto. For example, the third angle group according to Table 1 may include angle indices of 6, 24, 40, and 56 corresponding to angles in the diagonal direction. In addition, the third angle group may include at least one of angle indices of 5 to 7, 9 to 11, 21 to 23, 25 to 27, 37 to 39, 41 to 43, 53 to 55, and 57 to 59 as surrounding angles.

[0111] Meanwhile, the angle indices of 4, 28, 36, and 60 may be defined as belonging to the first angle group or the third angle group. Similarly, the angle indices of 12, 20, 44, and 52 may be defined as belonging to the second angle group or the third angle group. Hereinafter, for convenience of explanation, it is assumed that the angle indices of 4, 28, 36, and 60 belong to the first angle group, and the angle indices of 12, 20, 44, and 52 belong to the second angle group.

[0112] Depending on the characteristics of the image, the segmentation angle candidates can be defined to have more fine-grained angles around the horizontal and / or vertical angles rather than the diagonal angles.

[0113] In this case, among the split angle candidates available to the current block, the number of split angle candidates belonging to the first angle group may be greater than the number of split angle candidates belonging to the third angle group. Among the split angle candidates available to the current block, the number of split angle candidates belonging to the second angle group may be greater than the number of split angle candidates belonging to the third angle group.

[0114] Among the split angle candidates available to the current block, the number of split angle candidates belonging to the first angle group may be equal to the number of split angle candidates belonging to the second angle group. However, this is merely an example, and the number of split angle candidates belonging to the first angle group may be more or less than the number of split angle candidates belonging to the second angle group.

[0115] For example, among the split angle candidates available for the current block, the number of split angle candidates belonging to the first angle group and the second angle group may be 14 each, and the number of split angle candidates belonging to the third angle group may be 4. Here, the 14 split angle candidates belonging to the first angle group may be angles corresponding to angle indices of 0, 1, 2, 4, 28, 30 to 34, 36, 60, 62, and 63. The 17 split angle candidates belonging to the second angle group may be angles corresponding to angle indices of 12, 14 to 18, 20, 44, 46 to 50, and 52. The 4 split angle candidates belonging to the third angle group may be angles corresponding to angle indices of 8, 24, 40, and 56.

[0116] Alternatively, among the available split angle candidates for the current block, the number of split angle candidates belonging to the first angle group and the second angle group may be 10 each, and the number of split angle candidates belonging to the third angle group may be 4. Here, the 10 split angle candidates belonging to the first angle group may be angles corresponding to angle indices of 0, 2, 4, 28, 30, 32, 34, 36, 60, and 62. The 10 split angle candidates belonging to the second angle group may be angles corresponding to angle indices of 12, 14, 16, 18, 20, 44, 46, 48, 50, and 52. The 4 split angle candidates belonging to the third angle group may be angles corresponding to angle indices of 8, 24, 40, and 56.

[0117] Alternatively, among the available split angle candidates for the current block, the number of split angle candidates belonging to the first angle group may be 10, the number of split angle candidates belonging to the second angle group may be 6, and the number of split angle candidates belonging to the third angle group may be 4. Here, the 10 split angle candidates belonging to the first angle group may be angles corresponding to angle indices of 0, 2, 4, 28, 30, 32, 34, 36, 60, and 62. The 6 split angle candidates belonging to the second angle group may be angles corresponding to angle indices of 12, 16, 20, 44, 48, and 52. The 4 split angle candidates belonging to the third angle group may be angles corresponding to angle indices of 8, 24, 40, and 56.

[0118] Alternatively, among the split angle candidates available to the current block, the number of split angle candidates belonging to the first angle group may be 6, the number of split angle candidates belonging to the second angle group may be 10, and the number of split angle candidates belonging to the third angle group may be 4. Here, the 6 split angle candidates belonging to the first angle group may be angles corresponding to angle indices of 0, 4, 28, 32, 36, and 60. The 10 split angle candidates belonging to the second angle group may be angles corresponding to angle indices of 12, 14, 16, 18, 20, 44, 46, 48, 50, and 52. The 4 split angle candidates belonging to the third angle group may be angles corresponding to angle indices of 8, 24, 40, and 56.

[0119] The split angle candidates may include at least one of the angles corresponding to the angle indices 1 to 3 of Table 1. The split angle candidates may not include at least one of the angles corresponding to the angle indices 5 to 7 of Table 1. In this case, the number of angles used as split angle candidates among the angles corresponding to the angle indices 1 to 3 may be greater than the number of angles used as split angle candidates among the angles corresponding to the angle indices 5 to 7.

[0120] For example, the split angle candidates may be configured to include an angle corresponding to an angle index of 1, but not include an angle corresponding to at least one of the angle indices 2, 3, 5 to 7. Alternatively, the split angle candidates may be configured to include an angle corresponding to an angle index of 2, but not include an angle corresponding to at least one of the angle indices 1, 3, 5 to 7. Alternatively, the split angle candidates may be configured to include angles corresponding to angle indices 1 and 2, but not include an angle corresponding to at least one of the angle indices 3, 5 to 7. Alternatively, the split angle candidates may be configured to include angles corresponding to angle indices 1, 2, and 6, but not include an angle corresponding to at least one of the angle indices 3, 5, and 7.

[0121] The split angle candidates may include at least one of the angles corresponding to the angle indices 13 to 15 of Table 1. The split angle candidates may not include at least one of the angles corresponding to the angle indices 9 to 11 of Table 1. In this case, the number of angles used as split angle candidates among the angles corresponding to the angle indices 13 to 15 may be greater than the number of angles used as split angle candidates among the angles corresponding to the angle indices 9 to 11.

[0122] For example, the split angle candidates may be configured to include an angle corresponding to an angle index of 15, but not include an angle corresponding to at least one of the angle indices 9 to 11, 13, and 14. Alternatively, the split angle candidates may be configured to include an angle corresponding to an angle index of 14, but not include an angle corresponding to at least one of the angle indices 9 to 11, 13, and 15. Alternatively, the split angle candidates may be configured to include angles corresponding to angle indices 14 and 15, but not include an angle corresponding to at least one of the angle indices 9 to 11, and 13. Alternatively, the split angle candidates may be configured to include angles corresponding to angle indices 10, 14, and 15, but not include an angle corresponding to at least one of the angle indices 9, 11, and 13.

[0123] As described above, by increasing the number of segmentation angle candidates adjacent to the horizontal and / or vertical angles and decreasing the number of segmentation angle candidates adjacent to the diagonal angles, segmentation angle candidates that match the characteristics of the image can be utilized.

[0124] The number of geometric partition types available to the current block may vary depending on the size of the current block.

[0125] Example 1

[0126] From a trade-off perspective between performance improvements and complexity associated with using various angles and distances, increasing the number of geometric partition types when the current block size is small may actually decrease encoding efficiency. Therefore, the geometric partition mode according to the present disclosure can reduce the number of available geometric partition types depending on the current block size.

[0127] For example, if the current block is determined to be a small block, the number of geometric partition types available to the current block may be reduced. That is, if the current block corresponds to a small block, the number of geometric partition types available to the current block may be fewer than that of a large block.

[0128] If the current block is not determined to be a small block, the number of available geometric partitioning types may be N. On the other hand, if the current block is determined to be a small block, the number of available geometric partitioning types may be (NK). Here, N may represent the number of geometric partitioning types available in the current sequence, picture, or slice. If the current block is determined to be a small block, a process may be performed to reduce the number of available geometric partitioning types for the current block from N to (NK).

[0129] Whether the current block is a small block can be determined based on the size of the current block.

[0130] For example, if the product of the width and height of the current block is less than a predefined threshold (T1), the current block may be determined to be a small block. Otherwise, the current block may be determined not to be a small block. The value of T1 may be any of 64, 128, 256, 512, or 1024.

[0131] Alternatively, whether the current block is a small block can be determined based on the length of the width and height of the current block itself. Here, a small block can mean an Mxh block or a wxM block. If the current block corresponds to an Mxh block or a wxM block, the current block can be determined to correspond to a small block. Otherwise, the current block can be determined not to correspond to a small block. The value of M can be a predefined integer, and can be any one of 2, 4, 8, 16, or 32. w and h can respectively mean the width and height of the current block.

[0132] Alternatively, if at least one of the width or height of the current block is less than a predefined threshold (T2), the current block may be determined to be a small block. Otherwise, the current block may be determined not to be a small block. The value of T2 may be any one of 16, 8, or 4.

[0133] Alternatively, whether the current block is a small block may be determined by considering both the product of the width and height of the current block and at least one of the width or height of the current block. If the product of the width and height of the current block is less than a predefined threshold (T1) and at least one of the width or height of the current block is less than a predefined threshold (T2), the current block may be determined to be a small block. Otherwise, the current block may be determined not to be a small block.

[0134] For example, if the product of the width and height of the current block is less than 256, the number of geometric partition types available to the current block may be 64. Conversely, if the product of the width and height of the current block is greater than or equal to 256, the number of geometric partition types available to the current block may be 112.

[0135] The criteria for determining whether a block is small may vary depending on the characteristics of the sequence, such as slices, temporal layer information (Temporal ID), or quantization parameters (QPs). For example, the threshold for small temporal layer information values ​​may differ from the threshold for large temporal layer information values.

[0136] Example 2

[0137] In the geometric partitioning mode according to the present disclosure, the number of available geometric partitioning types can be increased depending on the size of the current block. When the size of the current block is large, encoding efficiency can be improved by increasing the number of geometric partitioning types.

[0138] For example, if the current block is determined to be a large block, the number of geometric partition types available to the current block may be increased. That is, if the current block corresponds to a large block, the number of geometric partition types available to the current block may be greater than that of a small block.

[0139] If the current block is not determined to be a large block, the number of available geometric partitioning types may be N. On the other hand, if the current block is determined to be a large block, the number of available geometric partitioning types may be (N+K). Here, N may represent the number of geometric partitioning types available in the current sequence, picture, or slice. If the current block is determined to be a large block, a process of increasing the number of available geometric partitioning types for the current block from N to (N+K) may be performed.

[0140] Whether the current block is a large block can be determined based on the size of the current block.

[0141] For example, if the product of the width and height of the current block is greater than a predefined threshold (T3), the current block may be determined to be a large block. Otherwise, the current block may be determined to not be a large block. The value of T3 may be any of 256, 512, 1024, 2048, or 4096.

[0142] Alternatively, whether the current block is a large block can be determined based on the length of the width and height of the current block itself. Here, a small block can mean an Mxh block or a wxM block. If the current block corresponds to an Mxh block or a wxM block, the current block can be determined to correspond to a large block. Otherwise, the current block can be determined not to correspond to a large block. The value of M can be a predefined integer, and can be any one of 8, 16, 32, or 64. w and h can mean the width and height of the current block, respectively.

[0143] For example, if the product of the width and height of the current block is greater than 512, the number of geometric partition types available to the current block may be 112. Conversely, if the product of the width and height of the current block is less than or equal to 512, the number of geometric partition types available to the current block may be 64.

[0144] Example 3

[0145] The number of geometric partition types can also be determined based on a combination of the aforementioned embodiments 1 and 2. The number of available geometric partition types can be reduced or increased depending on the size of the current block. In this way, different numbers of geometric partition types can be utilized depending on the size of the current block.

[0146] For example, the allowed block sizes can be roughly divided into three ranges, and different numbers of geometric partitioning types can be defined for the three ranges.

[0147] If the product of the width and height of the current block is less than 256, the number of geometric partition types available to the current block can be A. If the product of the width and height of the current block is greater than or equal to 256 and less than 1024, the number of geometric partition types available to the current block can be B. If the product of the width and height of the current block is greater than or equal to 1024, the number of geometric partition types available to the current block can be C. The values ​​of A, B, and C can be predefined integers. The value of A can be less than the value of B. The value of B can be less than the value of C. The value of A can be any of 16, 32, 48, or 64. The value of B can be any of 32, 48, 64, 80, or 96. The value of C can be a multiple of 4 or a multiple of 16. For example, the value of C can be an integer of 64, 80, 96, 112, or higher.

[0148] The number of available geometric segmentation types can be adaptively determined based on at least one of temporal layer information (Temporal ID), quantization parameter (QP), or whether the current slice to which the current block belongs is a low-delay picture.

[0149] For example, the number of geometric segmentation types available for a current slice may be increased or decreased based on the temporal layer information of the current slice. For example, if the temporal layer information of the current slice is greater than a predefined threshold (T1), the number of available geometric segmentation types may be decreased. The value of T1 may be a predefined integer, and may be any one of 3, 4, 5, or 6. Alternatively, if the temporal layer information of the current slice is less than a predefined threshold (T2), the number of available geometric segmentation types may be decreased. The value of T2 may be a predefined integer, and may be any one of 1, 2, 3, or 4.

[0150] For example, the number of geometric partition types available for a current slice may be increased or decreased depending on the QP of the current slice. For example, if the QP of the current slice is greater than the QP of the initial I slice of the current Group of Pictures (GOP) or sequence by K, the number of available geometric partition types may be decreased. The value of K may be a predefined integer, and may be any one of 3, 4, 5, or 6.

[0151] For example, the number of available geometric segmentation types may be increased or decreased depending on whether the current slice corresponds to a low-latency picture. For example, if the current slice corresponds to a low-latency picture, the number of available geometric segmentation types may be decreased.

[0152] In the above-described embodiment, reducing the number of geometric partition types may mean reducing the number of geometric partition types supported by the sequence, picture, or slice from N to (NK).

[0153] Below, we will look at geometric partitioning types based on combinations of angle indices and distance indices.

[0154] Figure 7 illustrates an example of segmentation angle candidates having more refined angles around the horizontal and vertical angles.

[0155] As illustrated in the left drawing of Fig. 7, angles corresponding to a total of 32 angle indices can be used as segmentation angle candidates. The 32 angle indices can correspond to angle indices of 0 to 2, 4, 8, 12, 14 to 18, 20, 24, 28, 30 to 34, 36, 40, 44, 46 to 50, 52, 56, 60, 62, and 63 in Table 1, respectively.

[0156] Table 2 shows an example of configuring a total of 112 geometric partition types based on combinations between angle indices from 0 to 31 and four distance indices per angle index. Specifically, among a total of 128 geometric partition types corresponding to combinations between a total of 32 angle indices and four distance indices per angle index, 16 geometric partition types corresponding to combinations between angle indices that are symmetrical with respect to +- 180 degrees and a distance index of 0 are removed, thereby configuring a total of 112 geometric partition types.

[0157] merge_gpm_partition_idx0123456789101112131415angleIdx0000111122223333distanceIdx0123012301230123merge_gpm_partition_idx16171819202122232425262728293031angleIdx4444555566667777distanceIdx0123012301230123merge_gpm_partition_idx32333435363738394041424344454647angleIdx888899991010101011111111distanceIdx0123012301230123merge_gpm_partition_idx48495051525354555657585960616263angleIdx12121212131313131414141415151515distanceIdx0123012301230123merge_gpm_partition_idx64656667686970717273747576777879angleIdx16161617171718181819191920202021distanceIdx1231231231231231merge_gpm_partition_idx80818283848586878889909192939495angleIdx21212222222323232424242525252626distanceIdx2312312312312312merge_gpm_partition_idx96979899100101102103104105106107108109110111angleIdx26272727282828292929303030313131distanceIdx3123123123123123

[0158] However, this is only an example, and the number of split angle candidates can be adjusted as shown in the right drawing of Fig. 7. According to the right drawing of Fig. 7, angles corresponding to a total of 20 angle indices can be used as split angle candidates. The split angle candidates shown in the right drawing of Fig. 7 may be split angle candidates corresponding to angle indices of 1, 6, 7, 9, 10, 15, 17, 22, 23, 25, 26, and 31, among the split angle candidates shown in the left drawing of Fig. 7, excluding the split angle candidates.

[0159] Table 3 shows an example of configuring a total of 64 geometric partition types based on combinations of a total of 20 angle indices for geometric partitioning and 4 distance indices for each angle index. Specifically, among a total of 80 geometric partition types corresponding to combinations of a total of 20 angle indices and 4 distance indices for each angle index, a total of 70 geometric partition types can be configured by removing 10 geometric partition types corresponding to combinations of angle indices that are symmetrical around +- 180 degrees and a distance index of 0. Additionally, a total of 64 geometric partition types can be configured by removing 6 geometric partition types corresponding to combinations of angle indices of 0, 8, 16, and 24 (which overlap with the binary and ternary partition types) and distance indices of 0 and 2.

[0160] merge_gpm_partition_idx0123456789101112131415angleIdx0022223333444455distanceIdx1301230123012301merge_gpm_partitio n_idx16171819202122232425262728293031angleIdx5588111111111212121213131313distanceIdx2313012301230123merge_gpm_parti tion_idx32333435363738394041424344454647angleIdx14141414161618181819191920202021distanceIdx0123131231231231merge_g pm_partition_idx48495051525354555657585960616263angleIdx21212424272727282828292929303030distanceIdx2313123123123123

[0161] Alternatively, as shown in Table 4, a total of 56 geometric partition types may be configured based on combinations between 16 angle indices and 4 distance indices per angle index. Here, the 16 angle indices may correspond to some of the total 32 angle indices defined in Table 2. Specifically, among the total 64 geometric partition types corresponding to combinations between the total 16 angle indices and 4 distance indices per angle index, 8 geometric partition types corresponding to combinations between angle indices that are symmetrical with respect to +- 180 degrees and a distance index of 0 may be removed, thereby 56 geometric partition types in total may be configured.

[0162] merge_gpm_partition_idx0123456789101112131415angleIdx0000222244446666distanceIdx0123012301230123merge_gp m_partition_idx16171819202122232425262728293031angleIdx8888101010101212121214141414distanceIdx01230123012 30123merge_gpm_partition_idx32333435363738394041424344454647angleIdx16161618181820202022222224242426dist anceIdx1231231231231231merge_gpm_partition_idx4849505152535455angleIdx2626282828303030distanceIdx23123123

[0163] Alternatively, in Table 4, geometric partition types corresponding to combinations between angle indices of 0, 8, 16, and 24 and some distance indices (i.e., at least one of distance indices from 0 to 4) may be additionally removed. For example, as shown in Table 5, among the 56 geometric partition types in Table 4, geometric partition types corresponding to combinations between angle indices of 0, 8, 16, and 24 and distance indices of 1 and 3 may be removed to form a total of 48 geometric partition types.

[0164] merge_gpm_partition_idx0123456789101112131415angleIdx0022224444666688distanceIdx02012 30123012302merge_gpm_partition_idx16171819202122232425262728293031angleIdx10101010121 212121414141416181818distanceIdx0123012301232123merge_gpm_partition_idx32333435363738 394041424344454647angleIdx20202022222224262626282828303030distanceIdx1231232123123123

[0165] As described above, various geometric partition types can be constructed by combining various angle indices and distance indices. Alternatively, the number of geometric partition types can be adaptively adjusted by excluding geometric partition types corresponding to certain combinations of angle indices and distance indices.

[0166] In the above-described embodiment, it is assumed that four distance indices (i.e., 0 to 3) are used, in which case the distances according to the distance indices of 0 to 3 can be determined as 0, N / 4, 2N / 4, and 3N / 4, respectively. Here, N can be the width or height of the current block. However, this is only an example, and more diverse geometric segmentation types can be configured using eight distance indices (i.e., 0 to 7). In this case, the distances according to the distance indices of 0 to 7 can be determined as 0, N / 8, 2N / 8, 3N / 8, 4N / 8, 5N / 8, 6N / 8, and 7N / 8, respectively.

[0167] Fig. 8 defines angles of 32 dividing lines based on a pre-defined slope. The angles of the dividing lines according to Fig. 8 may be for a 2NxN non-square block. The angles of each dividing line may be defined in the format of m:n based on the distance ratio of the horizontal axis to the vertical axis constituting a specific slope. m:n may mean the ratio of the movement distance (m) in the horizontal axis direction to the movement distance (n) in the vertical axis direction from the center of coordinates of (0, 0). The angles of the dividing lines according to Fig. 8 and the corresponding angle indices may be as shown in Table 6 below.

[0168] Angle Index Angle Angle Index Angle 00:1160:-11-1:4171:-42-1:2181:-23-3:4193:-44-1:1201:-15-3:2213:-26-2:1222:-17-4:1234:-18-1:0241:09-4:-1254:110-2:-1262:111-3:-2273:212-1:-1281:113-3:-4293:414-1:-2301:215-1:-4311:4

[0169] All or part of the angles corresponding to the angle indices 0 to 31 in Table 6 can be used as split angle candidates for a 2NxN non-square block.

[0170] Alternatively, angles close to the vertical direction in Table 6 (e.g., angles corresponding to angle indices 1 to 4) may generate similar prediction blocks because their angular differences are small. Accordingly, angles belonging to the segmentation angle candidates can be adjusted to be distributed in a way that the angular differences between adjacent angles are larger, rather than being concentrated in the vertical direction.

[0171] For example, an angle corresponding to at least one of the angle indices 1 to 4 may not be included in the split angle candidates. Instead, another angle with an angle of m:4 may be included in the split angle candidates, where m may be an integer whose absolute value is greater than 1, 2, 3, or 4.

[0172] The angles of the dividing lines defined in Table 6 can be equally applied to non-square blocks of 4NxN. That is, all or part of the angles corresponding to angle indices 0 to 31 in Table 6 can be used as dividing angle candidates for non-square blocks of 4NxN.

[0173] Alternatively, in Table 6, angles closer to the vertical direction may generate similar predicted blocks because their angular differences are small. Therefore, the angles belonging to the segmentation angle candidates can be adjusted so that they are distributed in a way that the angular differences between adjacent angles are greater, rather than being concentrated in the vertical direction.

[0174] For example, the partition angle candidates for a non-square block of 4NxN can be adjusted to have the angles of the partition lines as in Fig. 9. The angles of the partition lines according to Fig. 9 and the corresponding angle indices can be as in Table 7 below.

[0175] Angle Index Angle Angle Index Angle 00:1160:-11-1:2171:-22-1:1181:-13-3:2193:-24-2:1202:-15-3:1213:-16-4:1224:-17-8:1238:-18-1:0241:09-8:-1258:110-4:-1264:111-3:-1273:112-2:-1282:113-3:-2293:214-1:-130-1:-115-1:-231-1:-2

[0176] Alternatively, if the current block is a block whose width is greater than its height, the number of geometric partition types may be reduced by eliminating some angle(s) close to the vertical direction among the angles of the partition lines. For example, an angle corresponding to at least one of the angle indices 1 to 4 may be excluded from the partition angle candidates. The number of geometric partition types available for NxN blocks, 2NxN blocks, and 4NxN blocks may be different from each other.

[0177] The angles of the segmentation lines defined in Table 6 can be equally applied to Nx2N non-square blocks. That is, all or part of the angles corresponding to the angle indices 0 to 31 in Table 6 can be used as segmentation angle candidates for Nx2N non-square blocks.

[0178] Alternatively, in Table 6, angles closer to the horizontal direction may generate similar predicted blocks because their angular differences are small. Therefore, the angles belonging to the segmentation angle candidates can be adjusted so that they are distributed in a way that the angular differences between adjacent angles are greater, rather than being concentrated in the horizontal direction.

[0179] For example, the partition angle candidates for a non-square block of Nx2N can be adjusted to have the angles of the partition lines as in Fig. 10. The angles of the partition lines according to Fig. 10 and the corresponding angle indices can be as in Table 8 below.

[0180] Angle Index Angle Angle Index Angle 00:1160:-11-1:4171:-42-1:2181:-23-2:3192:-34-1:1201:-15-4:3214:-36-2:1222:-17-4:1234:-18-1:0241:09-4:-1254:110-2:-1262:111-4:-3274:312-1:-1281:113-2:-3292:314-1:-2301:215-1:-4311:4

[0181] The angles of the segmentation lines defined in Table 6 can be equally applied to non-square blocks of Nx4N. That is, all or some of the angles corresponding to angle indices 0 to 31 of Table 6 can be used as segmentation angle candidates for non-square blocks of Nx4N.

[0182] Alternatively, in Table 6, angles closer to the horizontal direction may generate similar predicted blocks because their angular differences are small. Therefore, the angles belonging to the segmentation angle candidates can be adjusted so that they are distributed in a way that the angular differences between adjacent angles are greater, rather than being concentrated in the horizontal direction.

[0183] For example, the partition angle candidates for a non-square block of Nx4N can be adjusted to have the angles of the partition lines as in Fig. 11. The angles of the partition lines according to Fig. 11 and the corresponding angle indices can be as in Table 9 below.

[0184] Angle Index Angle Angle Index Angle 00:1160:-11-1:8171:-82-1:4181:-43-1:3191:-34-1:2201:-25-2:3212:-36-1:1221:-17-2:1232:-18-1:0241:09-2:-1252:110-1:-1261:111-2:-3272:312-1:-2281:213-1:-3291:314-1:-4301:415-1:-8311:8

[0185] Alternatively, if the current block is a block whose height is greater than its width, the number of geometric segmentation types may be reduced by eliminating some angle(s) close to the horizontal direction among the angles of the segmentation line. For example, an angle corresponding to at least one of the angle indices from 4 to 7 may be excluded from the segmentation angle candidates. The number of geometric segmentation types available for NxN blocks, Nx2N blocks, and Nx4N blocks may be different from each other.

[0186] By adaptively increasing or decreasing the number of geometric division types depending on the shape of the current block, the available angles can be adjusted depending on the block shape.

[0187] Fig. 12 illustrates the angles of the partition lines for a 2Nx2N block, assuming that a total of 32 partition line angles are available. Geometric partition information (merge_gpm_partition_idx) can be assigned to geometric partition types according to combinations of the 32 angle indices and distance indices illustrated in Fig. 12, as shown in Table 10.

[0188] merge_gpm_partition_idx0123456789101112131415angleIdx0000111122223333distanceIdx0123012301230123merge_gpm_partition_idx16171819202122232425262728293031angleIdx4444555566667777distanceIdx0123012301230123merge_gpm_partition_idx32333435363738394041424344454647angleIdx888899991010101011111111distanceIdx0123012301230123merge_gpm_partition_idx48495051525354555657585960616263angleIdx12121212131313131414141415151515distanceIdx0123012301230123merge_gpm_partition_idx64656667686970717273747576777879angleIdx16161617171718181819191920202021distanceIdx1231231231231231merge_gpm_partition_idx80818283848586878889909192939495angleIdx21212222222323232424242525252626distanceIdx2312312312312312merge_gpm_partition_idx96979899100101102103104105106107108109110111angleIdx26272727282828292929303030313131distanceIdx3123123123123123

[0189] Figure 13 illustrates an example of reducing the number of geometric segmentation types when the current block is a vertically non-square block. Figures 13(a) and 13(b) illustrate the angles of segmentation lines for Nx2N blocks and Nx4N blocks, respectively. Compared to 2Nx2N blocks, the number of available segmentation line angles can be reduced to 24.

[0190] According to the present disclosure, angle indices applicable to non-square blocks in the vertical direction may be limited to {0, 1, 2, 3, 5, 7, 8, 9, 11, 13, 14, 15, 16, 17, 18, 19, 21, 23, 24, 25, 27, 29, 30, 31}. Geometric partition information (merge_gpm_partition_idx) may be assigned to geometric partition types according to combinations between the applicable angle indices and distance indices, as shown in Table 11.

[0191] merge_gpm_partition_idx0123456789101112131415angleIdx0000111122223333distanceIdx0123012301230123merge_gpm_partition_idx16171819202122232425262728293031angleI dx5555777788889999distanceIdx0123012301230123merge_gpm_partition_idx32333435363 738394041424344454647angleIdx11111111131313131414141415151515distanceIdx0123012 301230123merge_gpm_partition_idx48495051525354555657585960616263angleIdx161616 17171718181819191921212123distanceIdx1231231231231231merge_gpm_partition_idx646 56667686970717273747576777879angleIdx23232424242525252727272929293030distanceId x2312312312312312merge_gpm_partition_idx80818283angleIdx30313131distanceIdx3123

[0192] Figure 14 illustrates an example of reducing the number of geometric segmentation types when the current block is a horizontally non-square block. Figures 14(a) and 14(b) illustrate the angles of segmentation lines for 2NxN blocks and 4NxN blocks, respectively. Compared to 2Nx2N blocks, the number of available segmentation line angles can be reduced to 24.

[0193] According to the present disclosure, angle indices applicable to non-square blocks in the horizontal direction may be limited to {0, 1, 3, 5, 6, 7, 8, 9, 10, 11, 13, 15, 16, 17, 19, 21, 22, 23, 24, 25, 26, 27, 29, 31}. Geometric partition information (merge_gpm_partition_idx) may be assigned to geometric partition types according to combinations between the applicable angle indices and distance indices, as shown in Table 12.

[0194] merge_gpm_partition_idx0123456789101112131415angleIdx0000111133335555distanceIdx0123012301230123merge_gpm_partition_idx16171819202122232425262728293031angleI dx6666777788889999distanceIdx0123012301230123merge_gpm_partition_idx32333435363 738394041424344454647angleIdx10101010111111111313131315151515distanceIdx0123012 301230123merge_gpm_partition_idx48495051525354555657585960616263angleIdx161616 17171719191921212122222223distanceIdx1231231231231231merge_gpm_partition_idx646 56667686970717273747576777879angleIdx23232424242525252626262727272929distanceId x2312312312312312merge_gpm_partition_idx80818283angleIdx29313131distanceIdx3123

[0195] As illustrated in FIGS. 13 and 14, the number of geometric division types applicable to the non-square blocks in the horizontal direction and the non-square blocks in the vertical direction are the same, but the angle and / or distance of at least one geometric division type may be different from each other.

[0196] Depending on the shape and size of the current block, different combinations of angle indices and distance indices may be applied. That is, depending on whether the current block satisfies specific shape and size conditions, the geometric segmentation types applicable to the current block may be determined differently. The size condition may mean whether the size of the current block is less than or equal to a specific value pre-defined in the encoding device and the decoding device. Here, the size may be defined as at least one of width, height, or the product of the width and height. The conditions for the width, the height, and the product of the width and height may be defined independently, or multiple conditions may be combined to define them.

[0197] For example, if the block is a non-square block in the vertical direction, such as an Nx2N or Nx4N block, and the block size is smaller than a pre-defined specific value, the number of available angle indices remains 24 as shown in FIG. 13, but the number of available distance indices may be reduced. Alternatively, if the block is a non-square block in the vertical direction and the block size is smaller than a pre-defined specific value, the number of available angle indices may be reduced to a number less than 24, and the number of available distance indices may be maintained at 4. Alternatively, if the block is a non-square block in the vertical direction and the block size is smaller than a pre-defined specific value, both the available angle indices and the distance indices may be reduced. When reducing the available angle indices, at least one of the angle indices 5 to 11 and 21 to 27 illustrated in FIG. 13 may be additionally excluded.

[0198] For example, if the block is a horizontally non-square block, such as a 2NxN or 4NxN block, and the block size is smaller than a pre-defined specific value, the number of available angle indices remains 24 as shown in FIG. 14, but the number of available distance indices may be reduced. Alternatively, if the block is a horizontally non-square block and the block size is smaller than a pre-defined specific value, the number of available angle indices may be reduced to a number less than 24, and the number of available distance indices may be maintained at 4. Alternatively, if the block is a horizontally non-square block and the block size is smaller than a pre-defined specific value, both the available angle indices and the distance indices may be reduced. When reducing the available angle indices, at least one of the angle indices 0 to 3, 13 to 19, and 29 to 31 shown in FIG. 14 may be additionally excluded.

[0199] N block types may be defined for applying the geometric partition mode. The N block types may be classified based on at least one of the size or shape of the block. Available geometric partition types may be defined for each block type. In this case, the number of available geometric partition types may vary depending on the block type. At least one of the available geometric partition types may be different from other block types depending on the block type. The value of N may be an integer greater than 1. In the present disclosure, it is assumed that the value of N is 6. However, this is merely an example, and the value of N may be an integer greater than 2, 3, 4, 5, or more. Depending on the value of N, the number of geometric partition types or geometric partition types defined for each block type may vary.

[0200] The six block types according to the present disclosure can be classified into small block type (GEO_TYPE_SMALL), 2NxN block type (GEO_TYPE_2NxN), 4NxN block type (GEO_TYPE_4NxN), Nx2N block type (GEO_TYPE_Nx2N), Nx4N block type (GEO_TYPE_Nx4N), and large block type (GEO_TYPE_LARGE).

[0201] A block may be classified as a small block type (GEO_TYPE_SMALL) if the width and / or height of the block are less than or equal to a predefined threshold, or if the product of the width and height of the block is less than or equal to a predefined M. The value of M may be any one of 64, 128, or 256. For convenience of explanation, the value of M is assumed to be 64 in the following.

[0202] A block that does not fall into the above small block type and has a width to height ratio of 2:1 can be classified as a 2NxN block type. For example, blocks such as 16x8, 32x16, 64x32, and 128x64 can be classified as a 2NxN block type.

[0203] A block that does not fall into the above small block type and has a width to height ratio of 4:1 can be classified as a 4NxN block type. For example, blocks such as 32x8, 64x16, and 128x32 can be classified as a 4NxN block type.

[0204] A block that does not fall into the above small block type and has a width to height ratio of 1:2 can be classified as an Nx2N block type. For example, blocks such as 8x16, 16x32, 32x64, and 64x128 can be classified as an Nx2N block type.

[0205] A block whose width and height ratio is 1:4 and does not fall into the above small block types can be classified as an Nx4N block type. For example, blocks such as 8x32, 16x64, and 32x128 can be classified as an Nx4N block type.

[0206] Blocks that do not fall into the above small block types and are not non-square blocks can be classified as large block types. For example, blocks such as 16x16, 32x32, 64x64, and 128x128 can be classified as large block types.

[0207] Based on the size and shape of the current block, the current block can be classified into one of multiple block types for application of the geometric partitioning mode. Based on the block type of the current block, the geometric partitioning types available to the current block can be determined.

[0208] Based on the prediction mode of the current block, the current block can be classified into one of multiple block types for applying the geometric partitioning mode. Based on the partitioning type of the current block, the geometric partitioning types available to the current block can be determined. In the geometric partitioning mode, the prediction mode of each partition can vary, such as NORMAL mode, Intra mode, MMVD mode, Template Matching (TM) mode, and Intra Block Copy (IBC) mode. When a prediction mode other than NORMAL mode is applied, the prediction accuracy can be improved. Accordingly, a more simplified block type can be applied to blocks to which the NORMAL mode is applied.

[0209] For example, the current block can be classified based on four of the six block types described above. Here, the four block types can include at least one of a small block type (GEO_TYPE_SMALL), a 4NxN block type (GEO_TYPE_4NxN), an Nx4N block type (GEO_TYPE_Nx4N), or a large block type (GEO_TYPE_LARGE).

[0210] If the block type of the current block is a large block type, there may be 112 geometric partition types available for the current block. Here, the large block type may be limited to blocks where the product of the block's width and height is greater than a predefined threshold (N) and the block's width and height are equal. The value of N may be 64. However, this is only an example, and the value of N may be 128, 256, or 512. Alternatively, instead of the product of the block's width and height, the block's width or height may be compared to another predefined threshold (M) to determine whether the block corresponds to the large block type. The value of M may be any one of 4, 8, 16, or 32. Alternatively, the sum of the block's width and height may be compared to another predefined threshold to determine whether the block corresponds to the large block type.

[0211] Fig. 12 illustrates angles of 32 segmentation lines for a large block type, and Table 10 illustrates 112 geometric segmentation types according to combinations of angle indices and distance indices corresponding to the 32 angles. According to Fig. 12 and Table 10, if the current block corresponds to a large block type, the current block can be segmented based on any one of a total of 112 geometric segmentation types.

[0212] When the block type of the current block is a 2NxN block type, 84 geometric partitioning types may be available for the current block. FIG. 15 illustrates angles of 24 partitioning lines for the 2NxN block type, and Table 13 illustrates 84 geometric partitioning types according to combinations of angle indices and distance indices corresponding to the 24 angles. According to FIG. 15 and Table 13, when the current block corresponds to a 2NxN block type, the current block can be partitioned based on any one of a total of 84 geometric partitioning types.

[0213] merge_gpm_partition_idx0123456712131415angleIdx000011113333distanceIdx012301230123mer ge_gpm_partition_idx202122232425262728293031angleIdx555566667777distanceIdx0123012301 23merge_gpm_partition_idx32333435363738394041424344454647angleIdx88889999101010101111 1111distanceIdx0123012301230123merge_gpm_partition_idx5253545560616263angleIdx1313131 315151515distanceIdx01230123merge_gpm_partition_idx64656667686973747579angleIdx161616 17171719191921distanceIdx1231231231merge_gpm_partition_idx808182838485868788899091929 39495angleIdx21212222222323232424242525252626distanceIdx2312312312312312merge_gpm_par tion_idx96979899103104105109110111angleIdx26272727292929313131distanceIdx3123123123

[0214] If the block type of the current block is a 4NxN block type, 70 geometric partitioning types may be available for the current block. Fig. 16 illustrates angles of 20 partitioning lines for the 4NxN block type, and Table 14 illustrates 70 geometric partitioning types according to combinations of angle indices and distance indices corresponding to the 20 angles. According to Fig. 16 and Table 14, if the current block corresponds to a 4NxN block type, the current block may be partitioned based on any one of a total of 70 geometric partitioning types.

[0215] merge_gpm_partition_idx0123891011angleIdx00002222distanceIdx01230123merge_gpm_partition_idx161718192425262728293031angleIdx444466667777distanceIdx01230123 0123merge_gpm_partition_idx323334353637383940414243angleIdx8888999910101010di stanceIdx012301230123merge_gpm_partition_idx4849505156575859angleIdx121212121 4141414distanceIdx01230123merge_gpm_partition_idx646566707172767778angleIdx161616181818202020distanceIdx123123123merge_gpm_partition_idx828384858687888990 9192939495angleIdx2222222323232424242525252626distanceIdx12312312312312merge_ gpm_partition_idx96100101102106107108angleIdx26282828303030distanceIdx3123123

[0216] When the block type of the current block is an Nx2N block type, 84 geometric partitioning types may be available for the current block. Fig. 17 illustrates angles of 24 partitioning lines for the Nx2N block type, and Table 15 illustrates 84 geometric partitioning types according to combinations of angle indices and distance indices corresponding to the 24 angles. According to Fig. 17 and Table 15, when the current block corresponds to an Nx2N block type, the current block can be partitioned based on any one of a total of 84 geometric partitioning types.

[0217] merge_gpm_partition_idx0123456789101112131415angleIdx0000111122223333distanceIdx01230 12301230123merge_gpm_partition_idx2021222328293031angleIdx55557777distanceIdx01230123 merge_gpm_partition_idx323334353637383944454647angleIdx8888999911111111distanceIdx012 301230123merge_gpm_partition_idx525354555657585960616263angleIdx131313131414141415151 515distanceIdx012301230123merge_gpm_partition_idx64656667686970717273747579angleIdx16 161617171718181819191921distanceIdx1231231231231merge_gpm_partition_idx80818586878889 90919293angleIdx2121232323242424252525distanceIdx23123123123merge_gpm_partition_idx97 9899103104105106107108109110111angleIdx272727292929303030313131distanceIdx123123123123

[0218] If the block type of the current block is an Nx4N block type, 70 geometric partitioning types may be available for the current block. FIG. 18 illustrates angles of 20 partitioning lines for the Nx4N block type, and Table 16 illustrates 70 geometric partitioning types according to combinations of angle indices and distance indices corresponding to the 20 angles. According to FIG. 18 and Table 16, if the current block corresponds to an Nx4N block type, the current block may be partitioned based on any one of a total of 70 geometric partitioning types.

[0219] merge_gpm_partition_idx01234567891011angleIdx000011112222distanceIdx012301230123merge_gpm_partition_idx1617181924252627angleIdx44446666distanceIdx01230123 merge_gpm_partition_idx3233343540414243angleIdx888810101010distanceIdx01230123merge_gpm_partition_idx484950515657585960616263angleIdx1212121214141414151515 15distanceIdx012301230123merge_gpm_partition_idx646566676869707172767778angleIdx161616171717181818202020distanceIdx123123123123merge_gpm_partition_idx82838 48889909495angleIdx2222222424242626distanceIdx12312312merge_gpm_partition_idx 96100101102106107108109110111angleIdx26282828303030313131distanceIdx3123123123

[0220] If the block type of the current block is a small block type, 64 geometric partition types may be available for the current block. Here, the small block type may be limited to blocks for which the product of the block's width and height is less than or equal to a predefined threshold (N). The value of N may be 64. However, this is only an example, and the value of N may be 128, 256, or 512. Alternatively, instead of the product of the block's width and height, the block's width or height may be compared to another predefined threshold (M) to determine whether the block corresponds to the small block type. The value of M may be any one of 4, 8, 16, or 32. Alternatively, the sum of the block's width and height may be compared to another predefined threshold to determine whether the block corresponds to the small block type.

[0221] Fig. 19 illustrates the angles of 20 segmentation lines for the small block type, and Table 17 illustrates 64 geometric segmentation types according to combinations of angle indices and distance indices corresponding to the 20 angles. According to Fig. 19 and Table 17, if the current block corresponds to the small block type, the current block can be segmented based on any one of the 64 geometric segmentation types.

[0222] merge_gpm_partition_idx134567891011angleIdx0011112222distanceIdx1301230123merge_gpm_partition_idx1617181924252627angleIdx44446666distanceIdx01230123 merge_gpm_partition_idx333540414243angleIdx8810101010distanceIdx130123merge_gpm_partition_idx484950515657585960616263angleIdx121212121414141415151515 distanceIdx012301230123merge_gpm_partition_idx6466676869707172767778angleIdx1616171717181818202020distanceIdx13123123123merge_gpm_partition_idx828384 88909495angleIdx22222224242626distanceIdx1231312merge_gpm_partition_idx961 00101102106107108109110111angleIdx26282828303030313131distanceIdx3123123123

[0223] The current block can calculate the cost for each of the available geometric partition types, and compose a list by sorting the geometric partition types in ascending order of the calculated costs.

[0224] Among the geometric partition types in the above list, the top K geometric partition types can be determined in ascending order of cost. The current block can be partitioned based on any one of the top K geometric partition types. Here, the top K geometric partition types can be geometric partition types having a cost less than or equal to a predetermined threshold among the geometric partition types in the list. Geometric partition types having a cost greater than the predetermined threshold can be excluded from the list.

[0225] The above cost may refer to a cost calculated using a predefined method depending on the geometric partitioning type. For example, it may refer to the template matching (TM) cost using a template, which is a set of samples adjacent to the current block.

[0226] Depending on the geometric partition type and partition index, different templates may be used. The top and left templates of the current block may be used as templates for calculating the template matching cost for the geometric partition type. If the geometric partition type is a vertical angle and the partition index is 1, the template matching cost may be calculated using only the top template of the current block. Here, the vertical angle may be an angle corresponding to an angle index of 0 or 16 as shown in FIG. 12. If the current block is divided by a vertical angle, a partition index of 1 may represent a right partition. If the geometric partition type is a horizontal angle and the partition index is 1, the template matching cost may be calculated using only the left template of the current block. Here, the horizontal angle may be an angle corresponding to an angle index of 8 or 24 as shown in FIG. 12. If the current block is divided by a horizontal angle, a partition of 1 may represent a bottom partition.

[0227] The above threshold may refer to a predefined constant value. Alternatively, the threshold may be defined as the product of the cost of a specific position in a list sorted in ascending cost-based order and a predefined constant value. Here, the specific position may be the first position in the list. Alternatively, the specific position may be a position preceding the target position for which cost calculation using the threshold is performed.

[0228] The geometric partition type can be specified based on the geometric partition information of the current block. At this time, a mapping table defining angle indices and distance indices mapped to the geometric partition information can be used. The angle indices and distance indices mapped to the geometric partition information can be specified from the mapping table, and the current block can be partitioned based on the specified angle indices and distance indices.

[0229] The maximum number of geometric partition types supported by the encoding device and the decoding device can be N. The value of N is a predefined integer, and can be any one of 112, 84, 70, or 64. The maximum number of geometric partition types supported by SGPM (Sptatial GPM) can be M. The value of M is a predefined integer, and can be any one of 26, 32, 48, or 64. The maximum number of geometric partition types supported by Geometry Partition Mode-based IBC (GPM-IBC) can be K. The value of K is a predefined integer, and can be any one of 32, 48, or 64. The value of N must be greater than or equal to the values ​​of M and K.

[0230] A mapping table (or list) according to the present disclosure can be configured according to the following rules.

[0231] Among the geometric partition types having vertical and horizontal angles, a geometric partition type having a specific distance can be added to the mapping table in order of priority. At this time, one or more geometric partition types having a vertical angle can be added, and one or more geometric partition types having a horizontal angle can be added. Alternatively, geometric partition types having a vertical angle and geometric partition types having a horizontal angle can be added alternately up to a predefined L number. The value of L is a predefined integer, and can be any one of 4, 6, or 8.

[0232] Thereafter, geometric partition types can be added to the mapping table based on priorities according to the angle and distance of the partition line. For example, among geometric partition types with distance indices of 0 and 2, for geometric partition types with symmetrical angles, a geometric partition type with a distance index of 2 can be added to the mapping table in preference to a geometric partition type with a distance index of 0. For example, when a total of 32 angle indices are defined, the symmetrical angle may mean an angle corresponding to an angle index of 16 to 31 that is symmetrical to an angle corresponding to an angle index of 0 to 15, respectively.

[0233] Geometric partition types with angles in the upper-left-lower-right diagonal direction and angles in the lower-left-upper-right diagonal direction can be added to the mapping table first. Then, angles with intermediate values ​​between the upper-left-lower-right diagonal direction and the vertical direction, and angles with intermediate values ​​between the lower-left-upper-right diagonal direction and the horizontal direction, can be sequentially added to the mapping table. Afterwards, the remaining geometric partition types can be added to the mapping table.

[0234] After the addition of geometric partition types with distance indices of 0 and 2 is completed, geometric partition types with an index of 1 can be added to the mapping table considering the priority order according to the angle described above. After the addition of geometric partition types with a distance index of 1 is completed, geometric partition types with a distance index of 3 can be added to the mapping table.

[0235] Tables 18 to 32 are examples of mapping tables applied to the six geometric partition types described above, and may be configured according to the mapping table configuration method described above. In Tables 18 to 32, merge_gpm_partition_idx may refer to geometric partition information or a geometric partition type according to geometric partition information, and gpm_idx_2_mode may refer to a mapping index for the corresponding geometric partition type.

[0236] If the block type of the current block corresponds to a large block type, a total of 112 geometric partition types can be available, as defined in Table 10. However, in SGPM, GPM-IBC, and normal modes, the mapping table can be configured so that a smaller mapping index is assigned to a geometric partition type with a higher occurrence frequency.

[0237] Table 18 shows the mapping relationship between mapping indices and geometric partition types based on a total of 112 geometric partition types.

[0238]

[0239] According to Table 18, among the geometric partition types with vertical and horizontal angles, the geometric partition types with distance indices of 0 and 2 can be configured to come first in the mapping table. In particular, they can be configured at the front of the mapping table so that they can be used to map the top-priority geometric partition types in SGPM and GPM-IBC. At this time, the geometric partition types with vertical angles and the geometric partition types with horizontal angles can be configured alternately.

[0240] After configuring some of the geometric partition types having vertical and horizontal angles to be the most advanced in the mapping table, some of the geometric partition types having upper-left-lower-right diagonal angles and lower-left-upper-right diagonal angles can be configured in a lower priority in the mapping table. At this time, among the geometric partition types having upper-left-lower-right diagonal angles and lower-left-upper-right diagonal angles and having distance indices of 0 and 2, for geometric partition types having symmetrical angles (for example, angles having angle indices of 16 or greater), geometric partition types having distance indices of 2 can be configured preferentially.

[0241] Afterwards, geometric partition types with a distance index of 1 can be configured in the order of the angles configured, and geometric partition types with a distance index of 3 can be configured in the mapping table in the latter order.

[0242]

[0243] According to Table 19, among the geometric partition types with vertical and horizontal angles, the geometric partition types with distance indices of 1 and 3 can be configured to come first in the mapping table. In particular, they can be configured at the front of the mapping table so that they can be used to map the top-priority geometric partition types in SGPM and GPM-IBC. At this time, the geometric partition types with vertical angles and the geometric partition types with horizontal angles can be configured alternately.

[0244] After configuring some of the geometric partition types having vertical and horizontal angles to be the most advanced in the mapping table, some of the geometric partition types having upper-left-lower-right diagonal angles and lower-left-upper-right diagonal angles can be configured in a lower priority in the mapping table. At this time, among the geometric partition types having upper-left-lower-right diagonal angles and lower-left-upper-right diagonal angles and having distance indices of 0 and 2, for geometric partition types having symmetrical angles (for example, angles having angle indices of 16 or greater), geometric partition types having distance indices of 2 can be configured preferentially.

[0245] Afterwards, geometric partition types with a distance index of 1 can be configured in the order of the angles configured, and geometric partition types with a distance index of 3 can be configured in the mapping table in the latter order.

[0246] If the block type of the current block corresponds to a 2NxN block type, a total of 84 geometric partition types can be available, as defined in Table 13. However, in SGPM, GPM-IBC, and normal modes, the mapping table can be configured so that a smaller mapping index is assigned to a geometric partition type with a higher occurrence frequency.

[0247] Table 20 shows the mapping relationship between mapping indices and geometric partition types based on a total of 84 geometric partition types.

[0248]

[0249] According to Table 20, among the geometric partition types with vertical and horizontal angles, the geometric partition types with distance indices of 0 and 2 can be configured to come first in the mapping table. In particular, they can be configured at the front of the mapping table to be used for mapping the top-priority geometric partition types in SGPM and GPM-IBC. At this time, the geometric partition types with vertical angles and the geometric partition types with horizontal angles can be configured alternately.

[0250] After configuring some of the geometric partition types having vertical and horizontal angles to be the most advanced in the mapping table, some of the geometric partition types having upper-left-lower-right diagonal angles and lower-left-upper-right diagonal angles can be configured in the mapping table in a later order. However, the diagonal angles here may be different from the diagonal angles in the square block described above. For example, the angle indices corresponding to the diagonal angles in the square block may be 4, 12, 20, and 28, and the angle indices corresponding to the diagonal angles in the 2NxN block may be 6, 10, 22, and 26. At this time, among the geometric partition types having an angle in the upper left-lower right diagonal direction and an angle in the lower left-upper right diagonal direction, and having a distance index of 0 and 2, for geometric partition types having a symmetrical angle (for example, an angle with an angle index of 16 or greater), geometric partition types having a distance index of 2 can be preferentially configured.

[0251] Afterwards, geometric partition types with a distance index of 1 can be configured in the order of the angles configured, and geometric partition types with a distance index of 3 can be configured in the mapping table in the latter order.

[0252] If the maximum number of geometric partition types supported by the current block is less than the maximum number of geometric partition types supported by the encoding device and the decoding device, the mapping table may be configured by filling in geometric partition types that are not available in the mapping table in a later order, or the mapping table may be configured by limiting the maximum number of geometric partition types supported by the current block.

[0253]

[0254] According to Table 21, among the geometric partition types with vertical and horizontal angles, the geometric partition types with distance indices of 1 and 3 can be configured to be the first in the mapping table. In particular, they can be configured at the front of the mapping table to be used for mapping the top-priority geometric partition types in SGPM and GPM-IBC.

[0255] After configuring some of the geometric partition types having vertical and horizontal angles to be the most advanced in the mapping table, some of the geometric partition types having upper-left-lower-right diagonal angles and lower-left-upper-right diagonal angles can be configured in a lower priority in the mapping table. At this time, among the geometric partition types having upper-left-lower-right diagonal angles and lower-left-upper-right diagonal angles and having distance indices of 0 and 2, for geometric partition types having symmetrical angles (for example, angles having angle indices of 16 or greater), geometric partition types having distance indices of 2 can be configured preferentially.

[0256] Afterwards, geometric partition types with a distance index of 1 can be configured in the order of the angles configured, and geometric partition types with a distance index of 3 can be configured in the mapping table in the latter order.

[0257]

[0258] According to Table 22, among the geometric partition types having vertical and horizontal angles, the geometric partition types having vertical angles can be configured to come first in the mapping table, reflecting the size and shape of the block to which the geometric partition mode is applied. The eight geometric partition types that come first in the mapping table can be configured with seven geometric partition types corresponding to vertical angles (e.g., angle indices of 0 and 16) and angle indices of 0, 2, and 1, and one geometric partition type corresponding to horizontal angles (e.g., angle index of 8) and distance index of 0. This is because vertical partitioning may be more likely to be selected than horizontal partitioning, depending on the block characteristic that the width is twice the height. Thereafter, the mapping table can be configured in a method identical to / similar to the above-described embodiment.

[0259] If the block type of the current block corresponds to a 4NxN block type, a total of 70 geometric partition types can be available, as defined in Table 14. However, in SGPM, GPM-IBC, and normal modes, the mapping table can be configured so that a smaller mapping index is assigned to a geometric partition type with a higher occurrence frequency.

[0260] Table 23 shows the mapping relationship between mapping indices and geometric partition types based on a total of 70 geometric partition types.

[0261]

[0262] According to Table 23, among the geometric partition types with vertical and horizontal angles, the geometric partition types with distance indices of 0 and 2 can be configured to come first in the mapping table. In particular, they can be configured at the front of the mapping table to be used for mapping the top-priority geometric partition types in SGPM and GPM-IBC. At this time, the geometric partition types with vertical angles and the geometric partition types with horizontal angles can be configured alternately.

[0263] After configuring some of the geometric partition types having vertical angles and horizontal angles to be the most advanced in the mapping table, some of the geometric partition types having upper-left-lower-right diagonal angles and lower-left-upper-right diagonal angles can be configured in a lower priority in the mapping table. However, the diagonal angles here may be different from the diagonal angles in the square blocks and 2NxN blocks described above. For example, the angle indices corresponding to the diagonal angles in the square blocks may be 4, 12, 20, and 28, and the angle indices corresponding to the diagonal angles in the 2NxN blocks may be 6, 10, 22, and 26. The angle indices corresponding to the diagonal angles in the 4NxN blocks may be 7, 9, 23, and 25. At this time, among the geometric partition types having an angle in the upper left-lower right diagonal direction and an angle in the lower left-upper right diagonal direction, and having a distance index of 0 and 2, for geometric partition types having a symmetrical angle (for example, an angle with an angle index of 16 or greater), geometric partition types having a distance index of 2 can be preferentially configured.

[0264] Afterwards, geometric partition types with a distance index of 1 can be configured in the order of the angles configured, and geometric partition types with a distance index of 3 can be configured in the mapping table in the latter order.

[0265] If the maximum number of geometric partition types supported by the current block is less than the maximum number of geometric partition types supported by the encoding device and the decoding device, the mapping table may be configured by filling in geometric partition types that are not available in the mapping table in a later order, or the mapping table may be configured by limiting the maximum number of geometric partition types supported by the current block.

[0266]

[0267] According to Table 24, among the geometric partition types with vertical and horizontal angles, the geometric partition types with distance indices of 1 and 3 can be configured to be the first in the mapping table. In particular, they can be configured at the very front of the mapping table to be used for mapping the top-priority geometric partition types in SGPM and GPM-IBC.

[0268] After configuring some of the geometric partition types having vertical and horizontal angles to be the most advanced in the mapping table, some of the geometric partition types having upper-left-lower-right diagonal angles and lower-left-upper-right diagonal angles can be configured in a lower priority in the mapping table. At this time, among the geometric partition types having upper-left-lower-right diagonal angles and lower-left-upper-right diagonal angles and having distance indices of 0 and 2, for geometric partition types having symmetrical angles (for example, angles having angle indices of 16 or greater), geometric partition types having distance indices of 2 can be configured preferentially.

[0269] Afterwards, geometric partition types with a distance index of 1 can be configured in the order of the angles configured, and geometric partition types with a distance index of 3 can be configured in the mapping table in the latter order.

[0270]

[0271] According to Table 25, among the geometric partition types having vertical and horizontal angles, the geometric partition types having vertical angles can be configured to come first in the mapping table, reflecting the size and shape of the block to which the geometric partition mode is applied. The eight geometric partition types that come first in the mapping table can be configured with seven geometric partition types corresponding to vertical angles (e.g., angle indices of 0 and 16) and angle indices of 0, 2, and 1, and one geometric partition type corresponding to horizontal angles (e.g., angle index of 8) and distance index of 0. This is because vertical partitioning may be more likely to be selected than horizontal partitioning, depending on the block characteristic that the width is four times the height. Thereafter, the mapping table can be configured in a method identical / similar to the above-described embodiment.

[0272] If the block type of the current block corresponds to the Nx2N block type, a total of 84 geometric partition types can be available, as defined in Table 15. However, in SGPM, GPM-IBC, and normal modes, the mapping table can be configured so that a smaller mapping index is assigned to a geometric partition type with a higher occurrence frequency.

[0273] Table 26 shows the mapping relationship between mapping indices and geometric partition types based on a total of 84 geometric partition types.

[0274]

[0275] According to Table 26, among the geometric partition types with vertical and horizontal angles, the geometric partition types with distance indices of 0 and 2 can be configured to come first in the mapping table. In particular, they can be configured at the front of the mapping table so that they can be used to map the top-priority geometric partition types in SGPM and GPM-IBC. At this time, the geometric partition types with vertical angles and the geometric partition types with horizontal angles can be configured alternately.

[0276] After configuring some of the geometric partition types having vertical and horizontal angles to be the most advanced in the mapping table, some of the geometric partition types having upper-left-lower-right diagonal angles and lower-left-upper-right diagonal angles can be configured in the mapping table in a later order. However, the diagonal angles here may be different from the diagonal angles in the square block described above. For example, the angle indices corresponding to the diagonal angles in the square block may be 4, 12, 20, and 28, and the angle indices corresponding to the diagonal angles in the Nx2N block may be 2, 14, 18, and 30. At this time, among the geometric partition types having an angle in the upper left-lower right diagonal direction and an angle in the lower left-upper right diagonal direction, and having a distance index of 0 and 2, for geometric partition types having a symmetrical angle (for example, an angle with an angle index of 16 or greater), geometric partition types having a distance index of 2 can be preferentially configured.

[0277] Afterwards, geometric partition types with a distance index of 1 can be configured in the order of the angles configured, and geometric partition types with a distance index of 3 can be configured in the mapping table in the latter order.

[0278] If the maximum number of geometric partition types supported by the current block is less than the maximum number of geometric partition types supported by the encoding device and the decoding device, the mapping table may be configured by filling in geometric partition types that are not available in the mapping table in a later order, or the mapping table may be configured by limiting the maximum number of geometric partition types supported by the current block.

[0279]

[0280] According to Table 27, among the geometric partition types with vertical and horizontal angles, the geometric partition types with distance indices of 1 and 3 can be configured to be the first in the mapping table. In particular, they can be configured at the front of the mapping table to be used for mapping the top-priority geometric partition types in SGPM and GPM-IBC.

[0281] After configuring some of the geometric partition types having vertical and horizontal angles to be the most advanced in the mapping table, some of the geometric partition types having upper-left-lower-right diagonal angles and lower-left-upper-right diagonal angles can be configured in a lower priority in the mapping table. At this time, among the geometric partition types having upper-left-lower-right diagonal angles and lower-left-upper-right diagonal angles and having distance indices of 0 and 2, for geometric partition types having symmetrical angles (for example, angles having angle indices of 16 or greater), geometric partition types having distance indices of 2 can be configured preferentially.

[0282] Afterwards, geometric partition types with a distance index of 1 can be configured in the order of the angles configured, and geometric partition types with a distance index of 3 can be configured in the mapping table in the latter order.

[0283]

[0284] According to Table 28, among the geometric partition types having vertical and horizontal angles, the geometric partition types having horizontal angles can be configured to come first in the mapping table, reflecting the size and shape of the block to which the geometric partition mode is applied. The eight geometric partition types that come first in the mapping table can be configured with seven geometric partition types corresponding to horizontal angles (e.g., angle indices of 8 and 24) and angle indices of 0, 2, and 1, and one geometric partition type corresponding to vertical angles (e.g., angle index of 0) and distance index of 0. This is because horizontal partitioning may be more likely to be selected than vertical partitioning, depending on the block characteristic that the height is twice the width. Thereafter, the mapping table can be configured in a method identical / similar to the above-described embodiment.

[0285] If the block type of the current block corresponds to the Nx4N block type, a total of 70 geometric partition types can be available, as defined in Table 16. However, in SGPM, GPM-IBC, and normal modes, the mapping table can be configured so that a smaller mapping index is assigned to a geometric partition type with a higher occurrence frequency.

[0286] Table 29 shows the mapping relationship between mapping indices and geometric partition types based on a total of 70 geometric partition types.

[0287]

[0288] According to Table 29, among the geometric partition types with vertical and horizontal angles, the geometric partition types with distance indices of 0 and 2 can be configured to come first in the mapping table. In particular, they can be configured at the front of the mapping table so that they can be used to map the top-priority geometric partition types in SGPM and GPM-IBC. At this time, the geometric partition types with vertical angles and the geometric partition types with horizontal angles can be configured alternately.

[0289] After configuring some of the geometric partition types having vertical angles and horizontal angles to be the most advanced in the mapping table, some of the geometric partition types having upper-left-lower-right diagonal angles and lower-left-upper-right diagonal angles can be configured in a lower priority in the mapping table. However, the diagonal angles here may be different from the diagonal angles in the square blocks and Nx2N blocks described above. For example, the angle indices corresponding to the diagonal angles in the square blocks may be 4, 12, 20, and 28, and the angle indices corresponding to the diagonal angles in the Nx2N blocks may be 2, 14, 18, and 30. The angle indices corresponding to the diagonal angles in the Nx4N blocks may be 1, 15, 17, and 31. At this time, among the geometric partition types having an angle in the upper left-lower right diagonal direction and an angle in the lower left-upper right diagonal direction, and having a distance index of 0 and 2, for geometric partition types having a symmetrical angle (for example, an angle with an angle index of 16 or greater), geometric partition types having a distance index of 2 can be preferentially configured.

[0290] Afterwards, geometric partition types with a distance index of 1 can be configured in the order of the angles configured, and geometric partition types with a distance index of 3 can be configured in the mapping table in the latter order.

[0291] If the maximum number of geometric partition types supported by the current block is less than the maximum number of geometric partition types supported by the encoding device and the decoding device, the mapping table may be configured by filling in geometric partition types that are not available in the mapping table in a later order, or the mapping table may be configured by limiting the maximum number of geometric partition types supported by the current block.

[0292]

[0293] According to Table 30, among the geometric partition types with vertical and horizontal angles, the geometric partition types with distance indices of 1 and 3 can be configured to be the first in the mapping table. In particular, they can be configured at the very front of the mapping table to be used for mapping the top-priority geometric partition types in SGPM and GPM-IBC.

[0294] After configuring some of the geometric partition types having vertical and horizontal angles to be the most advanced in the mapping table, some of the geometric partition types having upper-left-lower-right diagonal angles and lower-left-upper-right diagonal angles can be configured in a lower priority in the mapping table. At this time, among the geometric partition types having upper-left-lower-right diagonal angles and lower-left-upper-right diagonal angles and having distance indices of 0 and 2, for geometric partition types having symmetrical angles (for example, angles having angle indices of 16 or greater), geometric partition types having distance indices of 2 can be configured preferentially.

[0295] Afterwards, geometric partition types with a distance index of 1 can be configured in the order of the angles configured, and geometric partition types with a distance index of 3 can be configured in the mapping table in the latter order.

[0296]

[0297] According to Table 31, among the geometric partition types having vertical and horizontal angles, the geometric partition types having horizontal angles can be configured to come first in the mapping table, reflecting the size and shape of the block to which the geometric partition mode is applied. The eight geometric partition types that come first in the mapping table can be configured with seven geometric partition types corresponding to horizontal angles (e.g., angle indices of 8 and 24) and angle indices of 0, 2, and 1, and one geometric partition type corresponding to vertical angles (e.g., angle index of 0) and distance index of 0. This is because horizontal partitioning may be more likely to be selected than vertical partitioning, depending on the block characteristic that the height is four times the width. Thereafter, the mapping table can be configured in a method identical / similar to the above-described embodiment.

[0298] If the block type of the current block corresponds to a small block type, a total of 64 geometric partition types can be available, as defined in Table 17. However, in SGPM, GPM-IBC, and normal modes, the mapping table can be configured so that a smaller mapping index is assigned to a geometric partition type with a higher occurrence frequency.

[0299] Table 32 shows the mapping relationship between mapping indices and geometric partition types based on a total of 64 geometric partition types.

[0300]

[0301] According to Table 32, among the geometric partition types with vertical and horizontal angles, the geometric partition types with distance indices of 1 and 3 can be configured to come first in the mapping table. In particular, they can be configured at the front of the mapping table so that they can be used to map the top-priority geometric partition types in SGPM and GPM-IBC. At this time, the geometric partition types with vertical angles and the geometric partition types with horizontal angles can be configured alternately.

[0302] After configuring some of the geometric partition types having vertical and horizontal angles to be the most advanced in the mapping table, some of the geometric partition types having upper-left-lower-right diagonal angles and lower-left-upper-right diagonal angles can be configured in a lower priority in the mapping table. At this time, among the geometric partition types having upper-left-lower-right diagonal angles and lower-left-upper-right diagonal angles and having distance indices of 0 and 2, for geometric partition types having symmetrical angles (for example, angles having angle indices of 16 or greater), geometric partition types having distance indices of 2 can be configured preferentially.

[0303] Afterwards, geometric partition types with a distance index of 1 can be configured in the order of the angles configured, and geometric partition types with a distance index of 3 can be configured in the mapping table in the latter order.

[0304] If the maximum number of geometric partition types supported by the current block is less than the maximum number of geometric partition types supported by the encoding device and the decoding device, the mapping table may be configured by filling in geometric partition types that are not available in the mapping table in a later order, or the mapping table may be configured by limiting the maximum number of geometric partition types supported by the current block.

[0305] First and second prediction blocks for the first and second partitions can be generated, respectively (S410).

[0306] The first and second prediction blocks may be generated based on the merge mode. Alternatively, the first and second prediction blocks may be generated based on the AMVP mode. Alternatively, either the first or second prediction blocks may be generated based on the merge mode, and the other may be generated based on the AMVP mode.

[0307] At least one of the first or second prediction blocks may be generated based on template matching (TM). The motion vector of the current block or a reference block may be determined based on a difference between the template region of the current block and the template region within a reference picture, and at least one of the first or second prediction blocks may be generated based on the determined motion vector or reference block.

[0308] To improve the performance of the above template matching, a template area for template matching can be defined based on the geometric partition type and partition index (or location of the partition) of the current block.

[0309] For example, when template matching is used in a geometric partitioning mode based on a total of 32 angle indices, the template area according to the geometric partitioning type and partition index can be defined as in Table 33 below.

[0310] uint8_t g_geoTmShape[2][GEO_NUM_ANGLES] = {{ GEO_TM_SHAPE_A, GEO_TM_SHAPE_A, GEO_TM_SHAPE_A, GEO_TM_SHAPE_A,GEO_TM_SHAPE_A, GEO_TM_SHAPE_AL, GEO_TM_SHAPE_AL, GEO_TM_SHAPE_AL,GEO_TM_SHAPE_AL, GEO_TM_SHAPE_AL, GEO_TM_SHAPE_AL, GEO_TM_SHAPE_AL,GEO_TM_SHAPE_AL, GEO_TM_SHAPE_A, GEO_TM_SHAPE_A, GEO_TM_SHAPE_A,GEO_TM_SHAPE_A, GEO_TM_SHAPE_A, GEO_TM_SHAPE_A, GEO_TM_SHAPE_A,GEO_TM_SHAPE_A, GEO_TM_SHAPE_AL, GEO_TM_SHAPE_AL, GEO_TM_SHAPE_AL,GEO_TM_SHAPE_AL, GEO_TM_SHAPE_AL, GEO_TM_SHAPE_AL, GEO_TM_SHAPE_AL,GEO_TM_SHAPE_AL, GEO_TM_SHAPE_A, GEO_TM_SHAPE_A, GEO_TM_SHAPE_A,},{ GEO_TM_SHAPE_AL, GEO_TM_SHAPE_AL, GEO_TM_SHAPE_AL, GEO_TM_SHAPE_AL,GEO_TM_SHAPE_L, GEO_TM_SHAPE_L, GEO_TM_SHAPE_L, GEO_TM_SHAPE_L,GEO_TM_SHAPE_L, GEO_TM_SHAPE_L, GEO_TM_SHAPE_L, GEO_TM_SHAPE_L,GEO_TM_SHAPE_AL, GEO_TM_SHAPE_AL, GEO_TM_SHAPE_AL, GEO_TM_SHAPE_AL,GEO_TM_SHAPE_AL, GEO_TM_SHAPE_AL, GEO_TM_SHAPE_AL, GEO_TM_SHAPE_AL,GEO_TM_SHAPE_L, GEO_TM_SHAPE_L, GEO_TM_SHAPE_L, GEO_TM_SHAPE_L,GEO_TM_SHAPE_L, GEO_TM_SHAPE_L,GEO_TM_SHAPE_L, GEO_TM_SHAPE_L,GEO_TM_SHAPE_AL, GEO_TM_SHAPE_AL, GEO_TM_SHAPE_AL, GEO_TM_SHAPE_AL,}};,

[0311] In Table 33, GEO_TM_SHAPE_A may indicate that only the Above template is used as the template area of ​​the current block, GEO_TM_SHAPE_L may indicate that only the Left template is used as the template area of ​​the current block, and GEO_TM_SHAPE_AL may indicate that both the Above and Left templates are used as the template areas of the current block.

[0312] At least one of the first or second prediction blocks may be generated based on intra prediction. In this case, an intra prediction mode may be derived based on geometric segmentation information. To this end, a mapping table may be used that defines the angle of the segmentation line based on the geometric segmentation information for the current block and the corresponding intra prediction mode. The mapping table may be defined as shown in Table 34 below.

[0313] int8_t g_geoAngle2IntraAng[GEO_NUM_ANGLES] = {50, 44, 40, 36, 34, 32, 28, 24, 18, 12, 8, 4, 66, 64, 60, 56, 50, 44, 40, 36, 34, 32, 28, 24, 18, 12, 8, 4, 66, 64, 60, 56};

[0314] Alternatively, a mapping table such as Table 35 below may be defined by adjusting the correlation between the angle of the segmentation line and the angle of the intra prediction mode.

[0315] int8_t g_geoAngle2IntraAng[GEO_NUM_ANGLES] = {50, 44, 41, 36, 34, 32, 27, 24, 18, 12, 9, 4, 66, 64, 59, 56, 50, 44, 41, 36, 34, 32, 27, 24, 18, 12, 9, 4, 66, 64, 59, 56};

[0316] When the split angle candidates are configured to have more refined angles around the horizontal and vertical angles, the array values ​​of the mapping table may be defined as in Table 36 below.

[0317] int8_t g_geoAngle2IntraAng[GEO_NUM_ANGLES] = {50, 47, 44, 40, 34, 28, 24, 21, 18, 15, 12, 8, 66, 60, 56, 53, 50, 47, 44, 40, 34, 28, 24, 21, 18, 15, 12, 8, 66, 60, 56, 53};

[0318] As mentioned above, some angle indices may not be used, in which case the value of the intra prediction mode mapped to the angle of that angle index may be set to 0 (e.g., planar mode).

[0319] A prediction block of the current block can be generated based on the first and second prediction blocks (S420).

[0320] A prediction block of the current block can be generated based on a weighted sum between the first and second prediction blocks.

[0321] Assume that a total of 32 angular indices are defined for geometric segmentation. In generating a geometric segmentation mask (GPM mask) for a total of 32 angular indices, the GPM mask is first generated using only angular indices included within 90 degrees (i.e., 9 angular indices corresponding to angular indices 0 to 8), and then a total of 112 GPM masks can be configured based on a combination of the 32 angular indices and 4 distance indices for each angular index through at least one of inversion or rotation in the x-axis and / or y-axis direction. The GPM mask can define weights for a weighted sum between the first and second prediction blocks.

[0322] In this case, an array (g_angle2mask) representing a correspondence between a total of 9 angle indices and a total of 32 angle indices, an array (g_dis) regarding the x-axis and / or y-axis distance for each angle index, and an array (g_angle2mirror) defining at least one of inversion or rotation in the x-axis and / or y-axis direction can be configured as shown in Table 37 below.

[0323] int8_t g_angle2mask[GEO_NUM_ANGLES] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1};int8_t g_dis[GEO_NUM_ANGLES] = { 8, 8, 8, 8, 4, 6, 4, 2, 0, -2, -4, -6, -4, -8, -8, -8, -8, -8, -8, -8, -4, -6, -4, -2, 0, 2, 4, 6, 4, 8, 8, 8};(or int8_t g_dis[GEO_NUM_ANGLES] = { 8, 8, 8, 8, 8, 6, 4, 2, 0, -2, -4, -6, -8, -8, -8, -8, -8, -8, -8, -8, -8, -6, -4, -2, 0, 2, 4, 6, 8, 8, 8, 8};)int8_t g_angle2mirror[GEO_NUM_ANGLES] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 2};

[0324] The array values ​​according to Table 37 can be applied when the angles of the dividing lines are defined at equal angles according to Method 1 described above, or when the angles of the dividing lines are defined at equal intervals according to Method 2. GEO_NUM_ANGLES can represent a predefined value. For example, when the angles of the dividing lines are defined with 32 angle indices, GEO_NUM_ANGLES can be defined as 32.

[0325] Alternatively, if the angles of the split lines are defined by a total of 32 angle indices, but are configured to have more detailed angles around the angles in the horizontal and vertical directions, the array values ​​can be defined as in Table 38 below.

[0326] int8_t g_angle2mask[GEO_NUM_ANGLES] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1};int8_t g_dis[GEO_NUM_ANGLES] = { 8, 8, 8, 8, 4, 4, 2, 1, 0, -1, -2, -4, -4, -8, -8, -8, -8, -8, -8, -8, -4, -4, -2, -1, 0, 1, 2, 4, 4, 8, 8, 8};int8_t g_angle2mirror[GEO_NUM_ANGLES] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 2};

[0327] Alternatively, as discussed above, if only 20 angle indices are used by removing some angles adjacent to the horizontal and vertical angles, the array values ​​can be defined as in Table 39 below. In this case, if only 20 angle indices are used, the number of angle indices included within 90 degrees for generating the GPM mask can be reduced from 9 to 6, and the values ​​that make up the array can change accordingly.

[0328] int8_t g_angle2mask[GEO_NUM_ANGLES] = { 0, -1, 1, 2, 3, 4, -1, -1, 5, -1, -1, 4, 3, 2, 1, -1, 0, -1, 1, 2, 3, 4, -1, -1, 5, -1, -1, 4, 3, 2, 1, -1};int8_t g_dis[GEO_NUM_ANGLES] = { 8, 8, 8, 8, 4, 4, 2, 1, 0, -1, -2, -4, -4, -8, -8, -8, -8, -8, -8, -8, -4, -4, -2, -1, 0, 1, 2, 4, 4, 8, 8, 8};int8_t g_angle2mirror[GEO_NUM_ANGLES] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 2};

[0329] The cosine() and sine() functions can be used in the weighted sum process (i.e., blending process) of the first and second prediction blocks for the first and second partitions. In this case, computational complexity can be reduced by using a lookup table such as Table 40 below.

[0330] idx02345681011121314disLut[ idx ]8884420-2-4-4-8-8idx161819202122242627282930disLut[ idx ]-8-8-8-4-4-2024488

[0331] For example, for a geometric segmentation mode based on a total of 20 angle indices, cosine() and sine() for the angles of the segmentation line can be calculated as in the following mathematical expression 1. According to mathematical expression 1, when the angle index (angleIdx) is 2, the values ​​of cosine() and sine() can be easily obtained as 8 and -2, respectively.

[0332] [Mathematical Formula 1]

[0333] displacementX = angleIdx

[0334] displacementY = ( angleIdx + 8 ) % 32

[0335] cosine(angleIdx) = disLut[displacementX]

[0336] sine(angleIdx) = disLut[displacementY]

[0337] Alternatively, for a geometric segmentation mode based on a total of 32 angle indices, the lookup table can be defined as in Table 41 below. This can be adaptively changed depending on the number of angles and / or angle indices of the allowed segmentation lines.

[0338] idx0123456789101112131415disLut[ idx ]888886420-2-4-6-8-8-8-8idx16171819202122232425262728293031disLut[ idx ]-8-8-8-8-8-6-4-202468888

[0339] If the current block is a non-square block of 2NxN, cosine() and sine() for the geometric partition of the current block can be calculated as in the following mathematical expression 2.

[0340] [Equation 2]

[0341] cosine(angleIdx) = disLutX[angleIdx]

[0342] sine(angleIdx) = disLutY[angleIdx]

[0343] In Equation 2, the lookup tables for cosine() and sine() can be defined as in Table 42 or Table 43 below.

[0344] Idx0123456789101112131415disLutX[ idx ]444444420-2-4-4-4-4-4-4Idx16171819202122232425262728293031disLutX[ idx ]-4-4-4-4-4-4-4-202444444

[0345] idx0123456789101112131415disLutY[ idx ]0-1-2-3-4-6-8-8-8-8-8-6-4-3-2-1Idx16171819202122232425262728293031disLutY[ idx ]012346888864321

[0346] If the current block is a non-square block of 4NxN, cosine() and sine() for the geometric partition of the current block can be calculated as in the following mathematical expression 3.

[0347] [Equation 3]

[0348] cosine(angleIdx) = disLutX[angleIdx]

[0349] sine(angleIdx) = disLutY[angleIdx]

[0350] In Equation 3, the lookup tables for cosine() and sine() can be defined as in Table 44 or Table 45 below.

[0351] Idx0123456789101112131415disLutX[ idx ]222222210-1-2-2-2-2-2-2Idx16171819202122232425262728293031disLutX[ idx ]-2-2-2-2-2-2-2-101222222

[0352] Idx0123456789101112131415disLutY[ idx ]0-1-2-3-4-6-8-8-8-8-8-6-4-3-2-1Idx16171819202122232425262728293031disLutY[ idx ]012346888864321

[0353] If the current block is a non-square block of Nx2N, cosine() and sine() for the geometric partition of the current block can be calculated as in the following mathematical expression 4.

[0354] [Equation 4]

[0355] cosine(angleIdx) = disLutX[angleIdx]

[0356] sine(angleIdx) = disLutY[angleIdx]

[0357] In Equation 4, the lookup tables for cosine() and sine() can be defined as in Table 46 or Table 47 below.

[0358] Idx0123456789101112131415disLutX[ idx ]888643210-1-2-3-4-6-8-8Idx16171819202122232425262728293031disLutX[ idx ]-8-8-8-6-4-3-2-101234688

[0359] Idx0123456789101112131415disLutY[ idx ]0-2-4-4-4-4-4-4-4-4-4-4-4-4-4-2Idx16171819202122232425262728293031disLutY[ idx ]0244444444444442

[0360] If the current block is a non-square block of Nx4N, cosine() and sine() for the geometric partition of the current block can be calculated as in the following mathematical expression 5.

[0361] [Equation 5]

[0362] cosine(angleIdx) = disLutX[angleIdx]

[0363] sine(angleIdx) = disLutY[angleIdx]

[0364] In Equation 5, the lookup tables for cosine() and sine() can be defined as in Table 48 or Table 49 below.

[0365] Idx0123456789101112131415disLutX[ idx ]888643210-1-2-3-4-6-8-8Idx16171819202122232425262728293031disLutX[ idx ]-8-8-8-6-4-3-2-101234688

[0366] Idx0123456789101112131415disLutY[ idx ]0-1-2-2-2-2-2-2-2-2-2-2-2-2-2-1Idx16171819202122232425262728293031disLutY[ idx ]0122222222222221

[0367] The current block can be restored based on the predicted block of the current block (S430).

[0368] Transform coefficients can be derived based on residual information signaled through the bitstream. A residual block can be generated by applying at least one of inverse quantization or inverse transformation to the derived transform coefficients. A reconstruction block of the current block can be generated based on the prediction block of the current block and the residual block.

[0369] FIG. 20 illustrates a schematic configuration of a decoding device (300) that performs a decoding method according to the present disclosure.

[0370] Referring to FIG. 20, the decoding device (300) may include a block division unit (2000), a prediction block generation unit (2010), and a restoration unit (2020). The block division unit (2000) and the prediction block generation unit (2010) may be provided in the inter prediction unit (332) of FIG. 3.

[0371] The block partitioning unit (2000) can perform a block partitioning process based on geometric partitioning according to S400. The prediction block generation unit (2010) can generate first and second prediction blocks for the first and second partitions according to S410, and can generate a prediction block of the current block based on a weighted sum between the first and second prediction blocks according to S420. The restoration unit (2020) can perform a restoration process of the current block according to S430.

[0372] FIG. 21 illustrates an encoding method performed by an encoding device (200) as an embodiment according to the present disclosure.

[0373] Based on the geometric partitioning information of the current block, the current block can be partitioned into first and second partitions (S2100). The block partitioning method based on geometric partitioning is as described with reference to FIGS. 4 to 19.

[0374] First and second prediction blocks for the first and second partitions can be generated, respectively (S2110). The method for generating the first and second prediction blocks is as described with reference to FIG. 4.

[0375] A prediction block of the current block can be generated based on the first and second prediction blocks (S2120). The method for generating the prediction block of the current block is as described with reference to FIG. 4.

[0376] Transform coefficients of the current block can be derived based on the residual block of the current block (S2130). The residual block of the current block can be generated based on the prediction block generated in S2120. The transform coefficients can be derived by performing at least one of transformation or quantization on the residual block.

[0377] A bitstream can be generated by encoding residual information about the transform coefficients of the current block (S2140).

[0378] Fig. 22 illustrates a schematic configuration of an encoding device (200) that performs an encoding method according to the present disclosure.

[0379] Referring to FIG. 22, the encoding device (200) may include a block division unit (2200), a prediction block generation unit (2210), a transform coefficient derivation unit (2220), and a residual information encoding unit (2230).

[0380] The block division unit (2200) and the prediction block generation unit (2210) may be provided in the inter prediction unit (221) of FIG. 2. The transform coefficient derivation unit (2220) may be provided in the residual processing unit (230) of FIG. 2. The residual information encoding unit (2230) may be provided in the entropy encoding unit (240).

[0381] The block division unit (2200) can perform a block division process based on geometric division according to S2100. The prediction block generation unit (2210) can perform a prediction block generation process according to S2110 and S2120. The transform coefficient derivation unit (2220) can perform a transform coefficient derivation process according to S2130. The residual information encoding unit (2230) can perform a residual information encoding process according to S2140.

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

[0383] The method according to the embodiments of the present document described above can be implemented in the form of software, and the encoding device and / or decoding device according to the present document can be included in a device that performs image processing, such as a TV, a computer, a smartphone, a set-top box, a display device, etc.

[0384] When the embodiments in this document are implemented as software, the above-described method can be implemented as a module (process, function, etc.) that performs the above-described function. The module can be stored in memory and executed by a processor. The memory can be internal or external to the processor and can be connected to the processor by various well-known means. The processor can include an application-specific integrated circuit (ASIC), another chipset, logic circuit, and / or data processing device. The memory can include a read-only memory (ROM), a random access memory (RAM), flash memory, a memory card, a storage medium, and / or other storage devices. That is, the embodiments described in this document can be implemented and performed on a processor, a microprocessor, a controller, or a chip. For example, the functional units illustrated in each drawing can be implemented and performed on a computer, a processor, a microprocessor, a controller, or a chip. In this case, information for implementation (e.g., information on instructions) or an algorithm can be stored on a digital storage medium.

[0385] In addition, the decoding device and encoding device to which the embodiment(s) of the present specification are applied may be included in a multimedia broadcasting transmitting and receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video conversation device, a real-time communication device such as a video communication, a mobile streaming device, a storage medium, a camcorder, a video-on-demand (VoD) service providing device, an OTT (Over the top video) device, an Internet streaming service providing device, a three-dimensional (3D) video device, a VR (virtual reality) device, an AR (argumente reality) device, a video phone video device, a transportation terminal (ex. a vehicle (including an autonomous vehicle) terminal, an airplane terminal, a ship terminal, etc.), and a medical video device, and may be used to process a video signal or a data signal. For example, the OTT (Over the top video) device may include a game console, a Blu-ray player, an Internet-connected TV, a home theater system, a smartphone, a tablet PC, a DVR (Digital Video Recorder), etc.

[0386] In addition, the processing method to which the embodiment(s) of the present specification are applied can be produced in the form of a computer-executable program and can be stored in a computer-readable recording medium. Multimedia data having a data structure according to the embodiment(s) of the present specification can also be stored in a computer-readable recording medium. The computer-readable recording medium includes all types of storage devices and distributed storage devices in which computer-readable data is stored. The computer-readable recording medium can include, for example, a Blu-ray disc (BD), a universal serial bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. In addition, the computer-readable recording medium includes a medium implemented in the form of a carrier wave (e.g., transmission via the Internet). In addition, a bitstream generated by an encoding method can be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network.

[0387] Additionally, the embodiments of the present disclosure may be implemented as a computer program product by program code, and the program code may be executed on a computer by the embodiments of the present disclosure. The program code may be stored on a computer-readable carrier.

[0388] FIG. 23 illustrates an example of a content streaming system to which embodiments of the present disclosure can be applied.

[0389] Referring to FIG. 23, a content streaming system to which the embodiment(s) of the present specification are applied may largely include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.

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

[0391] The above bitstream can be generated by an encoding method or a bitstream generation method to which the embodiment(s) of the present specification are applied, and the streaming server can temporarily store the bitstream during the process of transmitting or receiving the bitstream.

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

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

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

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

[0396] The claims set forth in this specification may be combined in various ways. For example, the technical features of the method claims of this specification may be combined and implemented as a device, and the technical features of the device claims of this specification may be combined and implemented as a method. Furthermore, the technical features of the method claims and the technical features of the device claims of this specification may be combined and implemented as a device, and the technical features of the method claims and the technical features of the device claims of this specification may be combined and implemented as a method.

Claims

1. A step of dividing the current block into first and second partitions based on geometric partition information of the current block; A step of generating first and second prediction blocks for the first and second partitions, respectively; A step of generating a prediction block of the current block based on the first and second prediction blocks; and A step of restoring the current block based on the above predicted block, One of a plurality of geometric partition types is specified based on the angle index and distance index corresponding to the above geometric partition information, A method wherein the above angle index indicates one of a plurality of split angle candidates available to the current block.

2. In paragraph 1, A method wherein the above multiple split angle candidates are divided into a first angle group having a vertical direction, a second angle group having a horizontal direction, and a third angle group having a diagonal direction.

3. In paragraph 2, A method wherein, among the plurality of split angle candidates, the number of split angle candidates belonging to the first angle group is greater than the number of split angle candidates belonging to the third angle group.

4. In paragraph 2, A method wherein, among the plurality of split angle candidates, the number of split angle candidates belonging to the second angle group is greater than the number of split angle candidates belonging to the third angle group.

5. In paragraph 2, A method wherein, among the plurality of split angle candidates, the number of split angle candidates belonging to the first angle group is less than or equal to the number of split angle candidates belonging to the second angle group.

6. In paragraph 1, A method wherein the plurality of split angle candidates include at least one of a first angle having a distance ratio of the horizontal axis to the vertical axis of -1:8, a second angle having a distance ratio of the horizontal axis to the vertical axis of -1:4, or a third angle having a distance ratio of the horizontal axis to the vertical axis of -3:

8.

7. In paragraph 6, A method wherein the plurality of split angle candidates do not include at least one of a fourth angle having a distance ratio of the horizontal axis to the vertical axis of -5:8, a fifth angle having a distance ratio of the horizontal axis to the vertical axis of -3:4, or a sixth angle having a distance ratio of the horizontal axis to the vertical axis of -7:

8.

8. In paragraph 1, A method wherein the plurality of split angle candidates include at least one of a first angle having a distance ratio of the horizontal axis to the vertical axis of -8:3, a second angle having a distance ratio of the horizontal axis to the vertical axis of -4:1, or a third angle having a distance ratio of the horizontal axis to the vertical axis of -8:

1.

9. In paragraph 8, A method wherein the plurality of split angle candidates do not include at least one of a fourth angle having a distance ratio of the horizontal axis to the vertical axis of -8:7, a fifth angle having a distance ratio of the horizontal axis to the vertical axis of -4:3, or a sixth angle having a distance ratio of the horizontal axis to the vertical axis of -8:

5.

10. In paragraph 1, A method wherein the plurality of geometric segmentation types are determined based on at least one of the size or shape of the current block.

11. A step of dividing the current block into first and second partitions based on geometric partition information of the current block; A step of generating first and second prediction blocks for the first and second partitions, respectively; A step of generating a prediction block of the current block based on the first and second prediction blocks; A step of generating a residual block of the current block based on a prediction block of the current block; A step of deriving transform coefficients of the current block based on the residual block; and A step of encoding residual information regarding the above transformation coefficients, One of a plurality of geometric partition types is specified based on the angle index and distance index corresponding to the above geometric partition information, A method wherein the above angle index indicates one of a plurality of split angle candidates available to the current block.

12. A computer-readable storage medium storing a bitstream generated by the method according to Article 11.

13. A step of obtaining a bitstream for image information; wherein the bitstream is generated based on the steps of: dividing the current block into first and second partitions based on geometric partitioning information of the current block; generating first and second prediction blocks for the first and second partitions, respectively; generating a prediction block of the current block based on the first and second prediction blocks; generating a residual block of the current block based on the prediction block of the current block; deriving transform coefficients of the current block based on the residual block; and encoding residual information about the transform coefficients. Including a step of transmitting data including the above bitstream, One of a plurality of geometric partition types is specified based on the angle index and distance index corresponding to the above geometric partition information, A method wherein the above angle index indicates one of a plurality of split angle candidates available to the current block.

Citation Information

Patent Citations

  • Organometallic compound, organic light emitting device including the same and electronic apparatus comprising organic light emitting device

    KR1020230145842A

  • Electronic apparatus capable of performing remote multi-object detection based on deep learning and the operating method thereof

    KR1020240101305A

  • Method and Apparatus for Non-Square Intra Mode Coding

    US20180220146A1

  • KR20220101638A

  • KR20230002945A