Image encoding / decoding method and apparatus and recording medium storing bitstream

CN117201809BActive Publication Date: 2026-10-23ELECTRONICS & TELECOMM RES INST
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311313785.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2017-01-02
Filing Date
2017-07-31
Publication Date
2026-10-23
Estimated Expiration
2037-07-31

AI Technical Summary

Technical Problem

因此,当通过使用诸如传统的有线宽带网络和无线宽带网络的介质发送图像数据时,或者当通过使用传统的存储介质存储图像数据时,发送和存储的成本增加

Benefits of technology

[0027]根据本发明,可提供一种提高压缩效率的图像编码/解码方法和设备以及一种存储通过本发明的图像编码方法/设备产生的比特流的记录介质。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117201809B_ABST
    Figure CN117201809B_ABST
Patent Text Reader

Abstract

The present invention relates to an image encoding / decoding method and apparatus and a recording medium storing a bitstream. An image decoding method for performing intra frame prediction for a current block according to the present invention can comprise the steps of: decoding first information, wherein the first information indicates whether a residual signal prediction for predicting a residual block of the current block is performed; when the first information indicates a first value, performing the residual signal prediction.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the invention patent application filed on July 31, 2017, with application number "201780061056.X" and titled "Image Encoding / Decoding Method and Apparatus and Recording Medium for Storing Bit Streams". Technical Field

[0002] This invention relates to a method and apparatus for encoding / decoding images. Specifically, this invention relates to a method and apparatus for encoding / decoding images using intra-frame prediction, and a recording medium for storing the bitstream generated by the image encoding method / apparatus of this invention. Background Technology

[0003] Recently, the demand for high-resolution and high-quality images, such as high-definition (HD) and ultra-high-definition (UHD) images, has grown across various application areas. However, the data volume of higher-resolution and higher-quality image data increases compared to traditional image data. Therefore, the costs of transmission and storage increase when transmitting image data using media such as traditional wired and wireless broadband networks, or when storing image data using traditional storage media. To address these challenges arising from the increasing resolution and quality of image data, efficient image encoding / decoding technologies are needed for higher-resolution and higher-quality images.

[0004] Image compression techniques encompass a variety of methods, including: inter-frame prediction techniques that predict pixel values ​​included in the current frame from previous or subsequent frames; intra-frame prediction techniques that predict pixel values ​​included in the current frame using pixel information from the current frame; energy transformation and quantization techniques for compressing residual signals; entropy coding techniques that assign short codes to high-frequency values ​​and long codes to low-frequency values; and so on. By using such image compression techniques, image data can be effectively compressed and transmitted or stored. Summary of the Invention

[0005] Technical issues

[0006] The purpose of this invention is to provide a method and apparatus for encoding and decoding images to improve compression efficiency, as well as a recording medium for storing bitstreams generated by the image encoding method / apparatus of this invention.

[0007] Another object of the present invention is to provide a method and apparatus for encoding and decoding images using intra-frame prediction to improve compression efficiency, as well as a recording medium for storing bitstreams generated by the image encoding method / apparatus of the present invention.

[0008] Another object of the present invention is to provide a method and apparatus for encoding and decoding images by performing intra-frame prediction using residual signal prediction, and a recording medium for storing bitstreams generated by the image encoding method / apparatus of the present invention.

[0009] Solution

[0010] An image decoding method for performing intra-frame prediction for a current block according to the present invention may include: decoding first information, wherein the first information indicates whether residual signal prediction for predicting residual blocks of the current block has been performed; if the first information indicates a first value, then performing the residual signal prediction.

[0011] In the image decoding method of the present invention, the residual signal prediction can be performed based on the previously decoded reconstruction block.

[0012] The image decoding method of the present invention may further include: decoding an intra-frame displacement vector (IDV), wherein the previously decoded reconstructed block may be specified by the decoded IDV.

[0013] The image decoding method of the present invention may further include: decoding an intra-prediction mode used for predicting the residual signal; and generating a prediction block of the reconstructed block based on the decoded intra-prediction mode.

[0014] The image decoding method of the present invention may further include: generating a residual block of the reconstruction block based on the reconstruction block and the prediction block of the reconstruction block, wherein the residual block of the reconstruction block may be a prediction block of the residual block of the current block.

[0015] The image decoding method of the present invention may further include: decoding the second-order residual block of the current block; and generating the residual block of the current block based on the prediction block of the residual block of the current block and the second-order residual block.

[0016] In the image decoding method of the present invention, if information about an IDV is not included in the bitstream, decoding of the IDV can be performed by selecting one of a plurality of IDVs included in a predetermined search range using a predetermined search method.

[0017] In the image decoding method of the present invention, the predetermined search method may be the same as the search method used in the image encoding method.

[0018] An image decoding apparatus according to the present invention, comprising an intra predictor for performing intra prediction for a current block, may include: an intra predictor configured to: decode first information, wherein the first information indicates whether residual signal prediction for predicting a residual block of the current block is performed; and if the first information indicates a first value, then perform the residual signal prediction.

[0019] An image coding method for performing intra-frame prediction for a current block according to the present invention may include: performing residual signal prediction for predicting residual blocks of the current block; and encoding first information indicating whether the residual signal prediction is performed.

[0020] In the image encoding method of the present invention, the residual signal prediction can be performed based on the previously decoded reconstruction block.

[0021] The image encoding method of the present invention may further include: encoding the intra-frame displacement vector (IDV) of a specified previously decoded reconstructed block.

[0022] The image coding method of the present invention may further include: determining an intra-prediction mode for predicting the residual signal; generating a prediction block of the reconstructed block based on the determined intra-prediction mode; and encoding the determined intra-prediction mode.

[0023] In the image encoding method of the present invention, the predetermined search method may include: comparing the cost function value of the residual block of the current block with the cost function value of the second-order residual block of the current block.

[0024] An image coding apparatus according to the present invention, including an intra predictor for performing intra prediction for a current block, may include: an intra predictor configured to: perform residual signal prediction for predicting a residual block of the current block, and encode first information indicating whether the residual signal prediction is performed.

[0025] According to the present invention, a recording medium for storing a bitstream generated by an image coding method for performing intra-frame prediction for a current block may store a bitstream generated by the image coding method, wherein the image coding method includes: performing residual signal prediction for predicting a residual block of the current block; and encoding first information indicating whether the residual signal prediction is performed.

[0026] Beneficial effects

[0027] According to the present invention, an image encoding / decoding method and apparatus with improved compression efficiency, as well as a recording medium for storing bitstreams generated by the image encoding method / apparatus of the present invention, can be provided.

[0028] Furthermore, according to the present invention, an image encoding / decoding method and apparatus using intra-frame prediction to improve compression efficiency, as well as a recording medium for storing a bitstream generated by the image encoding method / apparatus of the present invention, can be provided.

[0029] Furthermore, according to the present invention, an image encoding / decoding method and apparatus for performing intra-frame prediction using residual signal prediction can be provided, as well as a recording medium for storing the bitstream generated by the image encoding method / apparatus of the present invention. Attached Figure Description

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

[0031] Figure 2 This is a block diagram illustrating the configuration of a decoding device according to an embodiment of the present invention.

[0032] Figure 3 It is a schematic diagram illustrating the partitioning structure of an image when it is encoded and decoded.

[0033] Figure 4 This is a diagram showing the form of a prediction unit (PU) that can be included in a coding unit (CU).

[0034] Figure 5 This is a diagram showing the form of a transform unit (TU) that can be included in an encoding unit (CU).

[0035] Figure 6 This is a diagram illustrating an embodiment of the processing used to explain intra-frame prediction.

[0036] Figure 7 This is a diagram illustrating an embodiment of the processing used to explain inter-frame prediction.

[0037] Figure 8 It is a diagram used to interpret the transform set based on the intra-frame prediction mode.

[0038] Figure 9 This is a diagram used to explain the processing of transformations.

[0039] Figure 10 It is a diagram used to interpret the scanning of the transformation coefficients of quantization.

[0040] Figure 11 It is a diagram used to explain block partitioning.

[0041] Figure 12 This is a diagram illustrating a method for performing intra-frame prediction on the current block according to an embodiment of the present invention.

[0042] Figure 13 This is a diagram illustrating a method for deriving the intra-prediction mode of the current block from neighboring blocks.

[0043] Figure 14 This is an exemplary diagram depicting the current block, the parent block, and neighboring blocks.

[0044] Figure 15 This is an exemplary diagram showing a luminance block and a chrominance block with a color component composition ratio of 4:2:0.

[0045] Figure 16 This is a diagram illustrating an embodiment of deriving the intra-prediction mode of each sub-block in one or more sub-blocks into which the current block is divided.

[0046] Figure 17 This is a diagram depicting an embodiment of dividing the current block into sub-blocks.

[0047] Figure 18 This is a diagram depicting another embodiment of dividing the current block into sub-blocks.

[0048] Figure 19 This is a diagram depicting another embodiment of dividing the current block into sub-blocks.

[0049] Figure 20 This is a diagram depicting another embodiment of dividing the current block into sub-blocks.

[0050] Figure 21 This is a diagram illustrating an embodiment of deriving the intra-prediction mode of the current block using the seed point intra-prediction mode.

[0051] Figure 22 This is a diagram illustrating an embodiment of creating a list of SPIPMs that includes two SPIPMs.

[0052] Figure 23 This is an exemplary diagram illustrating an embodiment of creating a list of SPIPMs that includes three SPIPMs.

[0053] Figure 24 This is an exemplary diagram illustrating an embodiment of creating a list of SPIPMs that includes four SPIPMs.

[0054] Figure 25 This is an exemplary diagram showing the size of the sub-blocks when the current block size is 16×16.

[0055] Figure 26 This is a diagram depicting an embodiment of allocating intra-prediction modes using a defined IPDF.

[0056] Figure 27 This is an exemplary diagram showing the reconstructed blocks adjacent to the current block.

[0057] Figure 28 This is a diagram illustrating an embodiment of deriving intra-frame prediction modes using neighboring reconstruction blocks.

[0058] Figure 29 This is a diagram depicting an embodiment of intra-prediction mode derived from sub-blocks.

[0059] Figure 30 This is a diagram illustrating another embodiment of intra-prediction mode derived from sub-blocks.

[0060] Figure 31 This is an exemplary diagram illustrating a syntax structure that includes intra-frame prediction mode information.

[0061] Figure 32 This is an exemplary diagram depicting a line of neighboring reconstruction samples that can be used for intra-frame prediction of the current block.

[0062] Figure 33 This is a diagram depicting an embodiment of constructing reference samples for the sub-blocks included in the current block.

[0063] Figure 34 This is a diagram depicting a method for replacing unavailable reconstruction samples with available reconstruction samples.

[0064] Figure 35 This is a diagram showing an exemplary threshold for determining whether filtering should be applied, based on the block size.

[0065] Figure 36 This is an exemplary diagram showing whether filtering is performed based on block size and / or intra-frame prediction mode.

[0066] Figure 37 This is an exemplary diagram illustrating intra-frame prediction based on the shape of the current block.

[0067] Figure 38 This is a diagram depicting the filtering for intra-frame prediction in DC-mode.

[0068] Figure 39 It is a diagram depicting intra-frame prediction in planar mode.

[0069] Figure 40 It is a description from P ref Generate a 1D reference sample array p 1,ref An illustration of an embodiment.

[0070] Figure 41 This is a diagram illustrating an example of using reference samples at different angles based on the position of the samples in the prediction block.

[0071] Figure 42 This is a diagram illustrating an embodiment of performing prediction in the direction from the top right edge to the bottom left edge by applying cuv=0.1, cw0=1.0, cw1=1.2, cw2=1.4 and cw3=1.6 to a current block of size 4×4.

[0072] Figure 43 This is shown as an application. Figure 42 cuv and cw iAn illustration of an embodiment of the result, in which the position of the reference pixel used by the predicted pixel within the current block is determined.

[0073] Figure 44 This is a diagram illustrating an example of performing prediction in the direction from the top left edge to the bottom right edge (type-1) by applying cuv=0.1, cw0=1.0, cw1=1.2, cw2=1.4 and cw3=1.6 to a current block of size 4×4.

[0074] Figure 45 This is shown as an application. Figure 44 cuv and cw i An illustration of an embodiment of the result, in which the position of the reference pixel used by the predicted pixel within the current block is determined.

[0075] Figure 46 This is a diagram illustrating an embodiment of performing prediction in the direction from the bottom left edge to the top right edge by applying cuv=0.1, cw0=1.0, cw1=1.2, cw2=1.4 and cw3=1.6 to a current block of size 4×4.

[0076] Figure 47 This is shown as an application. Figure 46 cuv and cw i An illustration of an embodiment of the result, in which the position of the reference pixel used by the predicted pixel within the current block is determined.

[0077] Figure 48 This is a diagram illustrating an example of performing prediction in the direction from the top left edge to the bottom right edge (type-2) by applying cuv=0.1, cw0=1.0, cw1=1.2, cw2=1.4 and cw3=1.6 to a current block of size 4×4.

[0078] Figure 49 This is shown as an application. Figure 48 cuv and cw i An illustration of an embodiment of the result, in which the position of the reference pixel used by the predicted pixel within the current block is obtained.

[0079] Figure 50 This is a diagram illustrating an embodiment of performing prediction in the direction from the top edge to the bottom left edge by applying cuv=0.6, cw0=1.0, cw1=1.4, cw2=1.8 and cw3=2.2 to a current block of size 4×4.

[0080] Figure 51 This is shown as an application. Figure 50 cuv and cw i An illustration of an embodiment of the result, in which the position of the reference pixel used by the predicted pixel within the current block is determined.

[0081] Figure 52 This is a diagram illustrating an embodiment of performing prediction in the direction from the top edge to the bottom right edge by applying cuv=0.6, cw0=1.0, cw1=1.4, cw2=1.8 and cw3=2.2 to a current block of size 4×4.

[0082] Figure 53 This is shown as an application. Figure 52 cuv and cw i An illustration of an embodiment of the result, in which the position of the reference pixel used by the predicted pixel within the current block is determined.

[0083] Figure 54 This is a diagram illustrating an embodiment of performing prediction in the direction from the left edge to the top right edge by applying cuv=0.6, cw0=1.0, cw1=1.4, cw2=1.8 and cw3=2.2 to a current block of size 4×4.

[0084] Figure 55 This is shown as an application. Figure 54 cuv and cw i An illustration of an embodiment of the result, in which the position of the reference pixel used by the predicted pixel within the current block is determined.

[0085] Figure 56 This is a diagram illustrating an embodiment of performing prediction in the direction from the left edge to the bottom right edge by applying cuv=0.6, cw0=1.0, cw1=1.4, cw2=1.8 and cw3=2.2 to a current block of size 4×4.

[0086] Figure 57 This is shown as an application. Figure 56 cuv and cw i An illustration of an embodiment of the result, in which the position of the reference pixel used by the predicted pixel within the current block is determined.

[0087] Figure 58 This is an illustration used to explain another embodiment of using different directional modes in a sample unit within a target block.

[0088] Figure 59 This is a diagram depicting an embodiment of predicting residual signals.

[0089] Figure 60 It is a diagram depicting the prediction of the residual signal using a second-order residual signal block.

[0090] Figure 61 This is a diagram illustrating an embodiment of residual signal prediction.

[0091] Figure 62a and Figure 62b This is a diagram depicting an embodiment of performing residual signal prediction in an encoder.

[0092] Figure 63 This is a diagram depicting an embodiment of performing residual signal prediction in a decoder. Detailed Implementation

[0093] Various modifications can be made to this invention, and various embodiments of the invention exist, wherein examples of the embodiments will now be provided with reference to the accompanying drawings, and examples of the embodiments will be described in detail. However, the invention is not limited thereto, although exemplary embodiments may be interpreted as including all modifications, equivalents, or substitutions within the technical concept and scope of the invention. Similar reference numerals refer to functions that are the same or similar in respect of each other. In the drawings, the shapes and sizes of elements may be exaggerated for clarity. In the following detailed description of the invention, reference is made to the accompanying drawings, which illustrate specific embodiments in which the invention may be practiced. These embodiments are described in sufficient detail to enable those skilled in the art to practice this disclosure. It should be understood that the various embodiments of this disclosure, though different, are not necessarily mutually exclusive. For example, specific features, structures, and characteristics associated with one embodiment described herein may be implemented in other embodiments without departing from the spirit and scope of this disclosure. Furthermore, it should be understood that the positions or arrangements of the various elements within each disclosed embodiment may be modified without departing from the spirit and scope of this disclosure. Therefore, the following detailed description is not intended to be limiting, and the scope of this disclosure is defined by the appended claims (and, where appropriate, the full scope of the equivalents claimed in the claims).

[0094] The terms "first," "second," etc., used in this specification may be used to describe various components, but these components are not to be construed as limited to the terms. The terms are used only to distinguish one component from another. For example, without departing from the scope of the invention, a "first" component may be referred to as a "second" component, and a "second" component may similarly be referred to as a "first" component. The term "and / or" includes a combination of multiple items or any one of multiple items.

[0095] It will be understood that in this specification, when an element is simply referred to as "connected to" or "joined to" another element rather than "directly connected to" or "directly joined to" another element, it can be "directly connected to" or "directly joined to" another element, or connected to or joined to another element with other elements inserted in between. Conversely, it should be understood that when an element is referred to as "directly joined" or "directly connected to" another element, there are no intermediate elements.

[0096] Furthermore, the components shown in the embodiments of the present invention are illustrated independently to present distinct functionalities. Therefore, this does not imply that each component is composed as a separate hardware or software unit. In other words, for convenience, each component includes every one of the enumerated components. Thus, at least two components in each component can be combined to form a single component, or a single component can be divided into multiple components to perform each function. Embodiments where each component is combined and embodiments where a component is divided are also included within the scope of the invention without departing from its spirit.

[0097] The terminology used in this specification is for describing particular embodiments only and is not intended to limit the invention. Expressions used in the singular include plural expressions unless they have a distinct meaning in the context. In this specification, it will be understood that terms such as “comprising,” “having,” etc., are intended to indicate the presence of features, quantities, steps, actions, elements, components, or combinations thereof disclosed in the specification, and are not intended to exclude the possibility that one or more other features, quantities, steps, actions, elements, components, or combinations thereof may be present or added. In other words, when a particular element is referred to as “comprising,” elements other than the corresponding element are not excluded; rather, additional elements may be included in embodiments of the invention or within the scope of the invention.

[0098] Furthermore, some components may not be essential for performing the necessary functions of the invention, but rather optional components that merely enhance its performance. The invention can be implemented by including only the essential components necessary for carrying out the invention itself, excluding components used to enhance performance. Structures that include only the essential components and exclude optional components used solely for enhancing performance are also included within the scope of the invention.

[0099] In the following, embodiments of the present invention will be described in detail with reference to the accompanying drawings. In describing exemplary embodiments of the invention, well-known functions or structures will not be described in detail, as they would unnecessarily obscure the understanding of the invention. The same constituent elements in the drawings are denoted by the same reference numerals, and repeated descriptions of the same elements will be omitted.

[0100] Furthermore, in the following text, "image" can mean either a frame that constitutes a video or the video itself. For example, "encoding or decoding an image, or both" can mean "encoding or decoding a video, or both," and can also mean "encoding or decoding one of a plurality of images in a video, or both." Here, "frame" and "image" can have the same meaning.

[0101] Terminology Description

[0102] Encoder: can mean a device that performs encoding.

[0103] Decoder: can mean a device that performs decoding.

[0104] Explanation: This could mean determining the value of a syntax element by performing entropy decoding, or it could mean entropy decoding itself.

[0105] A block can be interpreted as a sample of an M×N matrix. Here, M and N are positive integers, and a block can be interpreted as a sample matrix in two-dimensional form.

[0106] Sample: A sample is the basic unit of a block and can indicate a value ranging from 0 to 2Bd–1 depending on the bit depth (Bd). In this invention, a sample can mean a pixel.

[0107] A unit can be defined as a unit used for encoding and decoding an image. During image encoding and decoding, a unit can be a region created by partitioning an image. Furthermore, a unit can also be defined as a sub-partition unit when an image is partitioned into multiple sub-partition units during encoding or decoding. During image encoding and decoding, predetermined processing can be performed for each unit. A unit can be partitioned into sub-units smaller than the unit itself. Depending on its function, a unit can be defined as a block, macroblock, coding tree unit, coding tree block, coding unit, coding block, prediction unit, prediction block, transform unit, transform block, etc. Furthermore, to distinguish a unit from a block, a unit can include a luma component block, a chroma component block of the luma component block, and syntax elements for each chroma component block. Units can have various sizes and shapes; specifically, the shape of a unit can be a two-dimensional geometric shape, such as a rectangle, square, trapezoid, triangle, pentagon, etc. Additionally, unit information can include at least one of the following: unit type (indicating coding unit, prediction unit, transform unit, etc.), unit size, unit depth, and the order in which the unit is encoded and decoded.

[0108] Reconstructing neighboring units: This can mean reconstructing units that have been previously encoded or decoded spatially / temporally, and that are adjacent to the encoding / decoding target units. Here, reconstructing neighboring units can mean reconstructing neighboring blocks.

[0109] Neighboring block: Can be defined as a block adjacent to the target block being encoded / decoded. A block adjacent to the target block can also be defined as a block with a boundary that contacts the target block. A neighboring block can also be defined as a block located at an adjacent vertex of the target block. A neighboring block can also be defined as a reconstructed neighboring block.

[0110] Cell depth: This can be interpreted as the degree to which a cell is partitioned. In a tree structure, the root node can be the highest node, and the leaf nodes can be the lowest nodes.

[0111] Symbols: can refer to syntax elements, encoding parameters, transform coefficient values, etc. of the encoding / decoding target unit.

[0112] Parameter set: This can refer to the header information in the structure of a bitstream. A parameter set can include at least one parameter set from a video parameter set, sequence parameter set, frame parameter set, or adaptive parameter set. Furthermore, a parameter set can also refer to strip header information and tile header information, etc.

[0113] Bitstream: can be defined as a string of bits that includes encoded image information.

[0114] Prediction Unit: This can be understood as the basic unit used when performing inter-frame or intra-frame prediction and compensation for the prediction. A prediction unit can be partitioned into multiple partitions. In this case, each of the multiple partitions can be a basic unit during prediction and compensation, and each partition obtained from the prediction unit partitioning can be a prediction unit. Furthermore, a prediction unit can be partitioned into multiple smaller prediction units. Prediction units can have various sizes and shapes, and specifically, the shape of a prediction unit can be a two-dimensional geometric figure, such as a rectangle, square, trapezoid, triangle, and pentagon.

[0115] Prediction cell partitioning: can be understood as the shape of the prediction cells partitioned out.

[0116] Reference frame list: This can mean a list including at least one reference frame, wherein the at least one reference frame is used for inter-frame prediction or motion compensation. The reference frame list can be of type List Combined (LC), List 0 (L0), List 1 (L1), List 2 (L2), List 3 (L3), etc. At least one reference frame list can be used for inter-frame prediction.

[0117] Inter-frame prediction indicator: can mean one of the following: the inter-frame prediction direction (unidirectional prediction, bidirectional prediction, etc.) of the encoded / decoded target block in the case of inter-frame prediction, the number of reference frames used to generate prediction blocks through the encoded / decoded target block, and the number of reference blocks used to perform inter-frame prediction or motion compensation through the encoded / decoded target block.

[0118] Reference screen index: This can refer to the index of a specific reference screen in the list of reference screens.

[0119] Reference frame: This can refer to a frame used by a specific unit for inter-frame prediction or motion compensation. A reference image can be called a reference frame.

[0120] Motion vector: A two-dimensional vector used for inter-frame prediction or motion compensation, and can be interpreted as the offset between the target frame and the reference frame being encoded / decoded. For example, (mvX, mvY) can indicate a motion vector, where mvX indicates the horizontal component and mvY indicates the vertical component.

[0121] Motion vector candidate: can mean a cell that becomes a prediction candidate when predicting motion vectors, or it can mean the motion vector of that cell.

[0122] Motion vector candidate list: This can mean a list configured by using motion vector candidates.

[0123] Motion vector candidate index: This can be interpreted as an indicator that points to a motion vector candidate in the motion vector candidate list. The motion vector candidate index can also be referred to as the index of motion vector predictors.

[0124] Motion information: can mean motion vectors, reference frame indexes and inter-frame prediction indicators, as well as information including at least one of the following: reference frame list information, reference frames, motion vector candidates, motion vector candidate indexes, etc.

[0125] Merge candidate list: This can mean a list configured by using merge candidates.

[0126] Merging candidates can include spatial merging candidates, temporal merging candidates, combined merging candidates, combined bidirectional prediction merging candidates, zero merging candidates, etc. Merging candidates can include motion information such as prediction type information, reference frame indexes for each list, motion vectors, etc.

[0127] Merge Index: This can refer to information about merge candidates in the merge candidate list. Furthermore, the merge index can indicate a deduced merge candidate among reconstructed blocks that are spatially / temporally adjacent to the current block. Additionally, the merge index can indicate at least one of multiple motion information entries for a merge candidate.

[0128] Transform unit: This can be understood as the basic unit used to perform transformations, inverse transformations, quantization, dequantization, and encoding / decoding of transform coefficients on a residual signal. A transform unit can be divided into multiple smaller transform units. Transform units can have various sizes and shapes. Specifically, the shape of a transform unit can be a two-dimensional geometric figure, such as a rectangle, square, trapezoid, triangle, pentagon, etc.

[0129] Scaling: This can be understood as multiplying a factor by the levels of the transform coefficients, resulting in the transformation coefficients being generated. Scaling can also be referred to as inverse quantization.

[0130] Quantization parameter: This can be interpreted as the value used to scale the transform coefficient levels during quantization and dequantization. Here, the quantization parameter can be a value mapped to the quantization step size.

[0131] Variable increment (Delta) quantization parameter: can be interpreted as the difference between the quantization parameter of the encoding / decoding target unit and the predicted quantization parameter.

[0132] Scan: This can refer to a method of sorting the coefficients within a block or matrix. For example, the operation of sorting a two-dimensional matrix into a one-dimensional matrix can be called a scan, and the operation of sorting a one-dimensional matrix into a two-dimensional matrix can be called a scan or inverse scan.

[0133] Transformation coefficients: These can be understood as the coefficient values ​​generated after a transformation is performed. In this invention, the quantized transformation coefficient levels (i.e., the transformation coefficients to which quantization has been applied) can be referred to as transformation coefficients.

[0134] Non-zero transform coefficients: can be interpreted as transform coefficients whose values ​​are not zero, or as levels of transform coefficients whose values ​​are not zero.

[0135] Quantization matrix: This refers to a matrix used in quantization and dequantization to improve the subject quality or object quality of an image. The quantization matrix can also be called a scaling list.

[0136] Quantization matrix coefficients: These can be understood as each element of the quantization matrix. Quantization matrix coefficients are also referred to as matrix coefficients.

[0137] Default matrix: can mean a predefined quantization matrix that is defined in the encoder and decoder.

[0138] Non-default matrix: This can mean a quantization matrix sent / received by the user without being predefined in the encoder and decoder.

[0139] A coding tree unit can consist of one luminance component (Y) coding tree unit and two associated chrominance component (Cb, Cr) coding tree units. Each coding tree unit can be partitioned using at least one partitioning method (such as a quadtree, binary tree, etc.) to form sub-units such as coding units, prediction units, transform units, etc. The term "coding tree unit" can be used to refer to pixel blocks (i.e., processing units in the decoding / encoding process of an image, such as partitions of the input image).

[0140] Coding tree block: can be used as a term to indicate one of the Y coding tree unit, Cb coding tree unit, and Cr coding tree unit.

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

[0142] Encoding device 100 can be a video encoding device or an image encoding device. Video may include one or more images. Encoding device 100 can encode one or more images of the video in chronological order.

[0143] Reference Figure 1 The encoding device 100 may include a motion prediction unit 111, a motion compensation unit 112, an intra-frame prediction unit 120, a switcher 115, a subtractor 125, a transform unit 130, a quantization unit 140, an entropy coding unit 150, an inverse quantization unit 160, an inverse transform unit 170, an adder 175, a filter unit 180, and a reference frame buffer 190.

[0144] Encoding device 100 can encode the input frame in intra-frame mode, inter-frame mode, or both. Furthermore, encoding device 100 can generate a bitstream by encoding the input frame and can output the generated bitstream. When intra-frame mode is used as the prediction mode, switcher 115 can switch to intra-frame mode. When inter-frame mode is used as the prediction mode, switcher 115 can switch to inter-frame mode. Here, intra-frame mode can be referred to as intra-frame prediction mode, and inter-frame mode can be referred to as inter-frame prediction mode. Encoding device 100 can generate prediction blocks of input blocks of the input frame. Furthermore, after generating prediction blocks, encoding device 100 can encode the residual between the input block and the prediction block. The input frame can be referred to as the current image as the target of the current encoding. The input block can be referred to as the current block or as the encoding target block as the target of the current encoding.

[0145] When the prediction mode is intra-frame mode, the intra-frame prediction unit 120 can use the pixel values ​​of the previous coded blocks adjacent to the current block as reference pixels. The intra-frame prediction unit 120 can perform spatial prediction by using reference pixels and can generate prediction samples of the input block by using spatial prediction. Here, intra-frame prediction can mean intra-frame prediction.

[0146] When the prediction mode is inter-frame mode, the motion prediction unit 111 can search for the region that best matches the input block from the reference frame during motion prediction processing, and can derive the motion vector by using the searched region. The reference frame can be stored in the reference frame buffer 190.

[0147] The motion compensation unit 112 can generate prediction blocks by performing motion compensation using motion vectors. Here, the motion vectors can be two-dimensional vectors used for inter-frame prediction. Furthermore, the motion vectors can indicate the offset between the current frame and a reference frame. Here, inter-frame prediction can mean inter-frame prediction.

[0148] When the value of the motion vector is not an integer, motion prediction unit 111 and motion compensation unit 112 can generate prediction blocks by applying interpolation filters to a portion of the reference frame. To perform inter-frame prediction or motion compensation based on the coding unit, the method used for motion prediction and compensation in the coding unit can be determined from among skip mode, merge mode, AMVP mode, and current frame reference mode. Inter-frame prediction or motion compensation can be performed according to each mode. Here, current frame reference mode can mean a prediction mode that uses a pre-reconstructed region of the current frame with the coding target block. To specify the pre-reconstructed region, motion vectors can be defined for the current frame reference mode. Whether the coding target block is encoded according to the current frame reference mode can be encoded using the reference frame index of the coding target block.

[0149] Subtractor 125 can generate a residual block by using the residual between the input block and the prediction block. The residual block may be referred to as the residual signal.

[0150] Transformation unit 130 can generate transformation coefficients by transforming the residual block and can output the transformation coefficients. Here, the transformation coefficients can be coefficient values ​​generated by transforming the residual block. In transform skip mode, transformation unit 130 can skip the transformation of the residual block.

[0151] A quantized transformation coefficient level can be generated by applying quantization to the transformation coefficients. In the following, in embodiments of the invention, the quantized transformation coefficient level may be referred to as the transformation coefficient.

[0152] The quantization unit 140 can generate quantized transformation coefficient levels by quantizing the transformation coefficients according to quantization parameters, and can output the quantized transformation coefficient levels. Here, the quantization unit 140 can quantize the transformation coefficients using a quantization matrix.

[0153] The entropy coding unit 150 can generate a bitstream by performing entropy coding on values ​​calculated by the quantization unit 140 or on coding parameter values ​​calculated in the coding process according to a probability distribution, and can output the generated bitstream. The entropy coding unit 150 can perform entropy coding on information used for decoding the image, and can also perform entropy coding on information about the image's pixels. For example, the information used for decoding the image may include syntax elements, etc.

[0154] When entropy coding is applied, the size of the bitstream encoding the target symbol is reduced by allocating a small number of bits to symbols with high occurrence probabilities and a large number of bits to symbols with low occurrence probabilities. Therefore, the compression performance of image coding can be improved through entropy coding. For entropy coding, the entropy coding unit 150 can use coding methods such as Exponential Golomb, Context Adaptive Variable Length Coding (CAVLC), and Context Adaptive Binary Arithmetic Coding (CABAC). For example, the entropy coding unit 150 can perform entropy coding by using a Variable Length Code (VLC) table. Furthermore, the entropy coding unit 150 can derive a binarization method for the target symbol and a probability model for the target symbol / bits, and can subsequently perform arithmetic coding by using the derived binarization method or the derived probability model.

[0155] To encode the transform coefficient levels, the entropy coding unit 150 can transform the coefficients from two-dimensional block form to one-dimensional vector form using a transform coefficient scanning method. For example, by scanning the coefficients of the block using an upper-right scan, the two-dimensional coefficients can be transformed into one-dimensional vector form. Depending on the size of the transform unit and the intra-frame prediction mode, a vertical scan for scanning the coefficients in the two-dimensional block form along the column direction and a horizontal scan for scanning the coefficients in the two-dimensional block form along the row direction can be used instead of an upper-right scan. That is, depending on the size of the transform unit and the intra-frame prediction mode, it can be determined which scanning method among the upper-right scan, vertical scan, and horizontal scan will be used.

[0156] Encoding parameters may include information such as syntax elements encoded by the encoder and sent to the decoder, and may include information that can be deduced during the encoding or decoding process. Encoding parameters may mean information necessary for encoding or decoding an image. For example, encoding parameters may include at least one value or combination of the following: block size, block depth, block partitioning information, cell size, cell depth, cell partitioning information, quadtree partitioning flag, binary tree partitioning flag, binary tree partitioning direction, intra-frame prediction mode, intra-frame prediction direction, reference sample filtering method, prediction block boundary filtering method, filter taps, filter coefficients, inter-frame prediction mode, motion information, motion vectors, reference frame index, inter-frame prediction direction, inter-frame prediction indicator, reference frame list, motion vector prediction factor, motion vector candidate list, information on whether motion merging mode is used, motion merging candidates, motion merging candidate list, information on whether skip mode is used, and interpolation filter class. The information includes: type, motion vector size, accuracy of motion vector representation, transform type, transform size, information on whether an additional (secondary) transform is used, information on the presence of residual signals, code block style, code block flag, quantization parameters, quantization matrix, filter information within the loop, information on whether filters are applied within the loop, filter coefficients within the loop, binarization / debinarization method, context model, context bits, bypass bits, transform coefficients, transform coefficient levels, transform coefficient level scanning method, image display / output order, stripe identification information, stripe type, stripe partition information, parallel block identification information, parallel block type, parallel block partition information, frame type, bit depth, and information on luminance or chrominance signals.

[0157] The residual signal can be interpreted as the difference between the original signal and the predicted signal. Alternatively, the residual signal can be a signal generated by transforming the difference between the original signal and the predicted signal. Alternatively, the residual signal can be a signal generated by transforming and quantizing the difference between the original signal and the predicted signal. A residual block can be the residual signal of a block unit.

[0158] When the encoding device 100 performs encoding using inter-frame prediction, the encoded current frame can be used as a reference frame for another image that will be processed subsequently. Therefore, the encoding device 100 can decode the encoded current frame and store the decoded image as a reference frame. To perform decoding, inverse quantization and inverse transform can be performed on the encoded current frame.

[0159] The quantized coefficients can be dequantized by the dequantization unit 160 and inverse transformed by the inverse transform unit 170. The dequantized and inverse transformed coefficients can be added to the prediction block by the adder 175, thereby generating the reconstructed block.

[0160] The reconstructed block can be processed by filter unit 180. Filter unit 180 can apply at least one of deblocking filter, sample adaptive offset (SAO), and adaptive loop filter (ALF) to the reconstructed block or reconstructed image. Filter unit 180 may be referred to as a loop filter.

[0161] Deblocking filters remove block distortion that occurs at the boundaries between blocks. To determine whether a deblocking filter is being applied, it can be determined based on the pixels included in several rows or columns within the block. When a deblocking filter is applied to a block, a strong or weak filter can be applied depending on the desired deblocking filter strength. Furthermore, horizontal and vertical filtering can be processed in parallel when applying a deblocking filter.

[0162] Sample-adaptive offset adds an optimal offset value to a pixel value to compensate for coding errors. Sample-adaptive offset corrects the offset between the deblocked image and the original image for each pixel. To perform offset correction on a specific image, one can use a method that considers the edge information of each pixel to apply the offset, or use the following method: divide the image's pixels into a predetermined number of regions, determine the regions to be offset corrected, and apply the offset correction to the determined regions.

[0163] An adaptive loop filter performs filtering based on values ​​obtained by comparing the reconstructed image with the original image. The pixels of the image can be partitioned into predetermined groups, a filter is determined for each group, and different filters can be performed for each group. Information regarding whether an adaptive loop filter is applied to the luminance signal can be sent for each coding unit (CU). The shape and filter coefficients of the adaptive loop filter applied to each block can vary. Furthermore, adaptive loop filters with the same form (fixed form) can be applied without considering the characteristics of the target block.

[0164] The reconstructed block after passing through the filter unit 180 can be stored in the reference frame buffer 190.

[0165] Figure 2 This is a block diagram illustrating the configuration of a decoding device according to an embodiment of the present invention.

[0166] Decoding device 200 can be a video decoding device or an image decoding device.

[0167] Reference Figure 2 The decoding device 200 may include an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 230, an intra-frame prediction unit 240, a motion compensation unit 250, an adder 255, a filter unit 260, and a reference frame buffer 270.

[0168] Decoding device 200 can receive bitstreams output from encoding device 100. Decoding device 200 can decode the bitstreams in intra-frame mode or inter-frame mode. In addition, decoding device 200 can generate and output reconstructed images by performing decoding.

[0169] When the prediction mode used in decoding is intra-frame mode, the switcher can be switched to intra-frame mode. When the prediction mode used in decoding is inter-frame mode, the switcher can be switched to inter-frame mode.

[0170] Decoding device 200 can obtain reconstructed residual blocks from the input bitstream and can generate prediction blocks. When the reconstructed residual blocks and prediction blocks are obtained, decoding device 200 can generate a reconstructed block as the decoding target block by adding the reconstructed residual blocks and the prediction blocks. The decoding target block can be referred to as the current block.

[0171] The entropy decoding unit 210 can generate symbols by performing entropy decoding on the bitstream according to a probability distribution. The generated symbols may include symbols with quantized transform coefficient levels. Here, the entropy decoding method may be similar to the entropy encoding method described above. For example, the entropy decoding method may be the inverse process of the entropy encoding method described above.

[0172] To decode the transform coefficient levels, the entropy decoding unit 210 can perform a transform coefficient scan, thereby transforming the coefficients from one-dimensional vector form to two-dimensional block form. For example, by scanning the coefficients of the block using an upper-right scan, the coefficients from one-dimensional vector form can be transformed into two-dimensional block form. Depending on the size of the transform unit and the intra-frame prediction mode, vertical and horizontal scans can be used instead of upper-right scans. That is, based on the size of the transform unit and the intra-frame prediction mode, it can be determined which scanning method among upper-right, vertical, and horizontal scans is used.

[0173] The quantized transform coefficient levels can be dequantized by dequantization unit 220 and inversely transformed by inverse transform unit 230. The quantized transform coefficient levels are dequantized and inversely transformed to generate a reconstruction residual block. Here, dequantization unit 220 can apply a quantization matrix to the quantized transform coefficient levels.

[0174] When the intra-frame mode is used, the intra-frame prediction unit 240 can generate a prediction block by performing spatial prediction, wherein the spatial prediction uses the pixel values ​​of the previous decoded block adjacent to the decoded target block.

[0175] When inter-frame mode is used, motion compensation unit 250 can generate prediction blocks by performing motion compensation, which uses both a reference frame stored in reference frame buffer 270 and motion vectors. When the value of the motion vector is not an integer, motion compensation unit 250 can generate prediction blocks by applying an interpolation filter to a portion of the reference frame. To perform motion compensation, based on the coding unit, the motion compensation method used by the prediction unit in the coding unit can be determined among skip mode, merge mode, AMVP mode, and current frame reference mode. Furthermore, motion compensation can be performed according to the mode. Here, current frame reference mode can mean a prediction mode that uses a previously reconstructed region within the current frame with the decoding target block. The previously reconstructed region may not be adjacent to the decoding target block. To indicate the previously reconstructed region, a fixed vector can be used for the current frame reference mode. In addition, a flag or index indicating whether the decoding target block is a block decoded according to the current frame reference mode can be sent by a signal and can be derived by using the reference frame index of the decoding target block. The current frame for the current frame reference mode can exist at a fixed position within the reference frame list for the decoding target block (e.g., the position with reference frame index 0 or the last position). Alternatively, the current frame can be variably located within the reference frame list; for this purpose, a reference frame index indicating the position of the current frame can be signaled. Here, signaling a flag or index indicates that the encoder entropy-encodes the corresponding flag or index and includes it in the bitstream, and indicates that the decoder entropy-decodes the corresponding flag or index from the bitstream.

[0176] The reconstructed residual block and the prediction block can be added together by adder 255. The resulting block, obtained by adding the reconstructed residual block and the prediction block, can be passed through filter unit 260. Filter unit 260 can apply at least one of deblocking filter, sample adaptive offset, and adaptive loop filter to the reconstructed block or reconstructed frame. Filter unit 260 can output the reconstructed frame. The reconstructed frame can be stored in reference frame buffer 270 and can be used for inter-frame prediction.

[0177] Figure 3 It is a schematic diagram illustrating the partitioning structure of an image when it is encoded and decoded. Figure 3 An embodiment of dividing a cell into multiple sub-cells is illustrated schematically.

[0178] To effectively partition an image, coding units (CUs) can be used in encoding and decoding. Here, a coding unit can mean a unit that is encoded, and a unit can be a combination of 1) a syntax element and 2) a block that includes image samples. For example, "partitioning of a unit" can mean "partitioning of the block associated with the unit". Block partitioning information can include information about the depth of the unit. Depth information can indicate the number of times the unit is partitioned or the degree to which the unit is partitioned, or both.

[0179] Reference Figure 3 Image 300 is sequentially partitioned for each maximum coding unit (LCU), and the partitioning structure is determined for each LCU. Here, LCU and coding tree unit (CTU) have the same meaning. A unit may have depth information based on a tree structure and may be hierarchically partitioned. Each sub-unit from a partition may have depth information. The depth information indicates the number of times the unit is partitioned or the degree to which the unit is partitioned, or both; therefore, the depth information may include information about the size of the sub-units.

[0180] The partitioning structure can be understood as the distribution of coding units (CUs) in the LCU 310. A CU can be a unit used for efficient encoding / decoding of an image. The distribution can be determined based on whether a CU will be partitioned multiple times (positive integers equal to or greater than 2, including 2, 4, 8, 16, etc.). The width and height of the partitioned CUs can be half the width and half the height of the original CU, respectively. Alternatively, depending on the number of partitions, the width and height of the partitioned CUs can be smaller than the width and height of the original CU, respectively. The partitioned CUs can be recursively partitioned into multiple further partitioned CUs, wherein, following the same partitioning method, the further partitioned CUs have a smaller width and height than the original partitioned CUs.

[0181] Here, the partitioning of a CU can be performed recursively until a predetermined depth is reached. Depth information can be information indicating the size of the CU and can be stored in each CU. For example, the depth of an LCU can be 0, and the depth of a minimum coding unit (SCU) can be a predetermined maximum depth. Here, an LCU can be a coding unit with the aforementioned maximum size, and an SCU can be a coding unit with the minimum size.

[0182] Whenever LCU 310 begins to be partitioned, and the width and height of the CU decrease through the partitioning operation, the depth of the CU increases by 1. In the case of a CU that cannot be partitioned, the CU can have a size of 2N×2N for each depth. In the case of a CU that can be partitioned, a CU of size 2N×2N can be partitioned into multiple CUs of size N×N. Each time the depth increases by 1, the size of N is halved.

[0183] For example, when a coding unit is partitioned into four sub-coding units, the width and height of one of the four sub-coding units can be half the width and half the height of the original coding unit, respectively. For example, when a 32×32 coding unit is partitioned into four sub-coding units, each of the four sub-coding units can have a size of 16×16. When a coding unit is partitioned into four sub-coding units, the coding unit can be partitioned in the form of a quadtree.

[0184] For example, when a coding unit is partitioned into two sub-coding units, the width or height of one of the two sub-coding units can be half the width or half the height of the original coding unit, respectively. For example, when a 32×32 coding unit is vertically partitioned into two sub-coding units, each of the two sub-coding units can have a size of 16×32. For example, when a 32×32 coding unit is horizontally partitioned into two sub-coding units, each of the two sub-coding units can have a size of 32×16. When a coding unit is partitioned into two sub-coding units, the coding unit can be partitioned in a binary tree format.

[0185] Reference Figure 3 The size of an LCU with a minimum depth of 0 can be 64×64 pixels, and the size of an SCU with a maximum depth of 3 can be 8×8 pixels. Here, a CU with 64×64 pixels (i.e., LCU) can be represented by depth 0, a CU with 32×32 pixels can be represented by depth 1, a CU with 16×16 pixels can be represented by depth 2, and a CU with 8×8 pixels (i.e., SCU) can be represented by depth 3.

[0186] Furthermore, partition information of a CU can indicate whether or not a CU will be partitioned. Partition information can be 1 bit. Partition information can be included in all CUs except the SCU. For example, when the partition information value is 0, the CU may not be partitioned; when the partition information value is 1, the CU may be partitioned.

[0187] Figure 4 This is a diagram showing the form of a prediction unit (PU) that can be included in a coding unit (CU).

[0188] The CUs that are no longer to be partitioned from the LCU can be partitioned into at least one prediction unit (PU). This process can also be referred to as partitioning.

[0189] A PU can be the basic unit used for prediction. A PU can be encoded and decoded according to any of the skip mode, inter-frame mode, and intra-frame mode. A PU can be partitioned in various forms according to the said mode.

[0190] Furthermore, the coding unit may not be partitioned into multiple prediction units, and the coding unit and the prediction unit may have the same size.

[0191] like Figure 4 As shown, in skip mode, the CU may not be partitioned. In skip mode, a 2N×2N pattern 410 with the same size as the unpartitioned CU is supported.

[0192] In inter-frame mode, the CU supports eight partition modes. For example, in inter-frame mode, it supports 2N×2N mode 410, 2N×N mode 415, N×2N mode 420, N×N mode 425, 2N×nU mode 430, 2N×nD mode 435, nL×2N mode 440, and nR×2N mode 445. In intra-frame mode, it supports 2N×2N mode 410 and N×N mode 425.

[0193] A coding unit can be partitioned into one or more prediction units. A prediction unit can be partitioned into one or more sub-prediction units.

[0194] For example, when a prediction unit is partitioned into four sub-prediction units, the width and height of one of the four sub-prediction units can be half the width and half the height of the original prediction unit. For example, when a 32×32 prediction unit is partitioned into four sub-prediction units, each of the four sub-prediction units can have a size of 16×16. When a prediction unit is partitioned into four sub-prediction units, the prediction unit can be partitioned in a quadtree format.

[0195] For example, when a prediction unit is partitioned into two sub-prediction units, the width or height of one of the two sub-prediction units can be half the width or half the height of the original prediction unit. For example, when a 32×32 prediction unit is vertically partitioned into two sub-prediction units, each of the two sub-prediction units can have a size of 16×32. For example, when a 32×32 prediction unit is horizontally partitioned into two sub-prediction units, each of the two sub-prediction units can have a size of 32×16. When a prediction unit is partitioned into two sub-prediction units, the prediction unit can be partitioned in a binary tree format.

[0196] Figure 5 This is a diagram showing the form of a transform unit (TU) that can be included in an encoding unit (CU).

[0197] A transform unit (TU) can be a basic unit within a CU used for transforming, quantizing, inverse transforming, and dequantizing. A TU can have a square or rectangular shape, etc. A TU can be independently determined according to the size or form of the CU, or both.

[0198] The CUs that are no longer partitioned from the LCU can be partitioned into at least one TU. Here, the partitioning structure of the TU can be a quadtree structure. For example, as... Figure 5 As shown, a CU 510 can be partitioned once or more according to a quadtree structure. The case where a CU is partitioned at least once can be referred to as recursive partitioning. By partitioning, a CU 510 can be formed from TUs of different sizes. Optionally, a CU can be partitioned into at least one TU based on the number of vertical lines or horizontal lines used to partition the CU, or both. A CU can be partitioned into TUs that are symmetrical to each other, or it can be partitioned into TUs that are asymmetrical to each other. To partition a CU into symmetrical TUs, information about the size / shape of the TUs can be transmitted by signals and can be derived from the information about the size / shape of the CUs.

[0199] Furthermore, coding units may not be partitioned into transform units, and coding units and transform units may have the same size.

[0200] A coding unit can be partitioned into at least one transform unit, and a transform unit can be partitioned into at least one sub-transform unit.

[0201] For example, when a transform unit is partitioned into four sub-transform units, the width and height of one of the four sub-transform units can be half the width and half the height of the original transform unit, respectively. For example, when a 32×32 transform unit is partitioned into four sub-transform units, each of the four sub-transform units can have a size of 16×16. When a transform unit is partitioned into four sub-transform units, the transform unit can be partitioned in a quadtree format.

[0202] For example, when a transform unit is partitioned into two sub-transform units, the width or height of one of the two sub-transform units can be half the width or half the height of the original transform unit, respectively. For example, when a 32×32 transform unit is vertically partitioned into two sub-transform units, each of the two sub-transform units can have a size of 16×32. For example, when a 32×32 transform unit is horizontally partitioned into two sub-transform units, each of the two sub-transform units can have a size of 32×16. When a transform unit is partitioned into two sub-transform units, the transform unit can be partitioned in a binary tree format.

[0203] When performing a transformation, the residual block can be transformed using at least one of a predetermined transformation method. For example, the predetermined transformation methods may include Discrete Cosine Transform (DCT), Discrete Sine Transform (DST), KLT, etc. Which transformation method is applied to the residual block can be determined by using at least one of the following: inter-frame prediction mode information of the prediction unit, intra-frame prediction mode information of the prediction unit, and the size / shape of the transformed block. Information indicating the transformation method can be transmitted using a signal.

[0204] Figure 6 This is a diagram illustrating an embodiment of the processing used to explain intra-frame prediction.

[0205] Intra-frame prediction modes can be non-directional or directional. Non-directional modes can be DC or planar modes. Directional modes can be prediction modes with a specific direction or angle, and the number of directional modes can be M, equal to or greater than 1. A directional mode can be indicated by at least one of a mode number, a mode value, and a mode angle.

[0206] The number of intra-frame prediction modes can be equal to or greater than 1, N, including non-directional and directional modes.

[0207] The number of intra-prediction modes can vary depending on the block size. For example, when the block size is 4×4 or 8×8, the number of intra-prediction modes can be 67; when the block size is 16×16, the number of intra-prediction modes can be 35; when the block size is 32×32, the number of intra-prediction modes can be 19; and when the block size is 64×64, the number of intra-prediction modes can be 7.

[0208] The number of intra-prediction modes can be fixed at N, regardless of the block size. For example, the number of intra-prediction modes can be fixed at at least one of 35 or 67, regardless of the block size.

[0209] The number of intra-frame prediction modes can vary depending on the type of color component. For example, the number of prediction modes can vary depending on whether the color component is a luminance signal or a chrominance signal.

[0210] Intra-frame coding and / or decoding can be performed using sample values ​​or coding parameters included in the reconstructed neighboring blocks.

[0211] In order to encode / decode the current block according to intra-frame prediction, it is possible to identify whether samples included in the reconstructed neighboring blocks can be used as reference samples for encoding / decoding the target block. When there are samples that cannot be used as reference samples for encoding / decoding the target block, the sample values ​​are copied and / or interpolated to the samples that cannot be used as reference samples by using at least one of the samples included in the reconstructed neighboring blocks, thereby making the samples that cannot be used as reference samples usable as reference samples for encoding / decoding the target block.

[0212] In intra-frame prediction, filters can be applied to at least one of reference samples or prediction samples based on at least one of the intra-frame prediction mode and the size of the encoding / decoding target block. Here, the encoding / decoding target block can mean the current block, and can mean at least one of the encoding block, prediction block, and transform block. The type of filter applied to the reference sample or prediction sample can vary depending on at least one of the intra-frame prediction mode or the size / shape of the current block. The type of filter can vary depending on at least one of the number of filter taps, filter coefficient values, or filter strength.

[0213] In the non-directional plane mode of intra-frame prediction mode, when generating a prediction block for an encoded / decoded target block, the sample value in the prediction block can be generated by using the weighted sum of the upper reference sample of the current sample, the left reference sample of the current sample, the upper right reference sample of the current block, and the lower left reference sample of the current block, based on the sample position.

[0214] In the non-directional DC mode of intra-frame prediction, when generating a prediction block for an encoded / decoded target block, the prediction block can be generated using the average of the upper reference sample and the left reference sample of the current block. Furthermore, filtering can be performed on one or more upper rows and one or more left columns of the encoded / decoded block adjacent to the reference sample using the reference sample values.

[0215] In the case of multiple orientation modes (angle modes) within intra-frame prediction modes, prediction blocks can be generated using upper-right reference samples and / or lower-left reference samples, and these multiple orientation modes can have different orientations. Real-valued interpolation can be performed to generate prediction sample values.

[0216] To perform intra-prediction, the intra-prediction mode of the current prediction block can be predicted from the intra-prediction modes of neighboring prediction blocks. When predicting the intra-prediction mode of the current prediction block using mode information predicted from neighboring intra-prediction modes, if the current prediction block and neighboring prediction blocks have the same intra-prediction mode, this information can be transmitted using predetermined flag information. If the intra-prediction mode of the current prediction block differs from that of neighboring prediction blocks, entropy coding can be performed to encode the intra-prediction mode information of the target block being encoded / decoded.

[0217] Figure 7 This is a diagram illustrating an embodiment of the processing used to explain inter-frame prediction.

[0218] Figure 7 The quadrilaterals shown can indicate images (or screens). Furthermore, Figure 7 The arrows indicate the prediction direction. That is, an image can be encoded or decoded, or encoded and decoded, depending on the prediction direction. Based on the encoding type, each image can be classified as an I-frame (intra-frame), P-frame (one-way prediction frame), B-frame (two-way prediction frame), etc. Each frame can be encoded and decoded according to its own encoding type.

[0219] When the target image is an I-frame, the frame itself can be intra-coded without inter-frame prediction. When the target image is a P-frame, the image can be encoded using inter-frame prediction or motion compensation performed only on the forward reference frame. When the target image is a B-frame, the image can be encoded using inter-frame prediction or motion compensation performed on both the forward and backward reference frames. Alternatively, the image can be encoded using inter-frame prediction or motion compensation performed on either the forward or backward reference frame. Here, when inter-frame prediction mode is used, the encoder can perform inter-frame prediction or motion compensation, and the decoder can perform motion compensation in response to the encoder. Images of P-frames and B-frames that are encoded or decoded using reference frames, or encoded and decoded, can be considered as images used for inter-frame prediction.

[0220] The inter-frame prediction according to the embodiments will be described in detail below.

[0221] Inter-frame prediction or motion compensation can be performed using both reference frames and motion information. Furthermore, inter-frame prediction can utilize the skip mode described above.

[0222] The reference frame can be at least one of the previous and subsequent frames of the current frame. Here, inter-frame prediction can predict blocks of the current frame based on the reference frame. Here, the reference frame can be the image used when predicting blocks. Here, the region within the reference frame can be indicated by using a reference frame index (refIdx) indicating the reference frame, motion vectors, etc.

[0223] Inter-frame prediction can select a reference frame and a reference block within that frame that is related to the current block. The predicted block for the current block can be generated using the selected reference block. The current block can be a block within the current frame that is the current encoding target or the current decoding target.

[0224] Motion information can be derived from inter-frame prediction processing by encoding device 100 and decoding device 200. Furthermore, the derived motion information can be used when performing inter-frame prediction. Here, encoding device 100 and decoding device 200 can improve encoding efficiency or decoding efficiency, or both, by using motion information of reconstructed neighboring blocks or co-occurring blocks (col blocks), or both. A col block can be a block within a previously reconstructed co-occurring frame (col frame) related to the spatial location of the encoded / decoded target block. Reconstructed neighboring blocks can be blocks within the current frame, as well as blocks previously reconstructed through encoding or decoding, or both. Furthermore, a reconstructed block can be a block adjacent to the encoded / decoded target block, or a block located at the outer corner of the encoded / decoded target block, or both. Here, a block located at the outer corner of the encoded / decoded target block can be a block vertically adjacent to a horizontally adjacent neighboring block of the encoded / decoded target block. Alternatively, a block located at the outer corner of the encoded / decoded target block can be a block horizontally adjacent to a vertically adjacent neighboring block of the encoded / decoded target block.

[0225] Encoding device 100 and decoding device 200 can each determine a block existing within the col frame at a location related to the encoding / decoding target block space, and can determine a predefined relative position based on the determined block. The predefined relative position can be an internal or external position of the block existing at a location related to the encoding / decoding target block space, or both. Furthermore, encoding device 100 and decoding device 200 can deduce the col block based on the determined predefined relative position. Here, the col frame can be one of at least one reference frame included in a reference frame list.

[0226] The method for deriving motion information can vary depending on the prediction mode of the encoded / decoded target block. For example, prediction modes applied to inter-frame prediction may include Advanced Motion Vector Prediction (AMVP), merging modes, etc. Here, the merging mode can be referred to as the motion merging mode.

[0227] For example, when AMVP is applied as a prediction mode, encoding device 100 and decoding device 200 can generate motion vector candidate lists by reconstructing motion vectors of neighboring blocks or motion vectors of col blocks, or both. The motion vectors of reconstructing neighboring blocks or motion vectors of col blocks, or both, can be used as motion vector candidates. Here, the motion vectors of col blocks can be referred to as temporal motion vector candidates, and the motion vectors of reconstructing neighboring blocks can be referred to as spatial motion vector candidates.

[0228] Encoding device 100 can generate a bitstream, which may include motion vector candidate indices. That is, encoding device 100 can generate a bitstream by entropy encoding the motion vector candidate indices. The motion vector candidate indices can indicate the optimal motion vector candidate selected from the motion vector candidates included in the motion vector candidate list. The motion vector candidate indices can be transmitted from encoding device 100 to decoding device 200 via the bitstream.

[0229] The decoding device 200 can entropy decode the motion vector candidate index from the bit stream, and can select the motion vector candidate of the target block from the motion vector candidates included in the motion vector candidate list by using the entropy-decoded motion vector candidate index.

[0230] Encoding device 100 can calculate the motion vector difference (MVD) between the motion vector of the target block and the motion vector candidates, and entropy encode the MVD. The bitstream may include the entropy-encoded MVD. The MVD can be sent from encoding device 100 to decoding device 200 via the bitstream. Here, decoding device 200 can entropy decode the MVD received from the bitstream. Decoding device 200 can deduce the motion vector of the target block by the sum of the decoded MVD and the motion vector candidates.

[0231] The bitstream may include a reference frame index indicating a reference frame, and the reference frame index may be entropy encoded and transmitted from the encoding device 100 to the decoding device 200 via the bitstream. The decoding device 200 may predict the motion vector of the target block to be decoded using motion information from neighboring blocks, and may derive the motion vector of the target block to be decoded using the predicted motion vector and the motion vector difference. The decoding device 200 may generate a predicted block of the target block to be decoded based on the derived motion vector and the reference frame index information.

[0232] As another method for deriving motion information, a merging pattern is used. A merging pattern can be understood as merging the motion of multiple blocks. It can also mean that the motion information of one block is applied to another. When a merging pattern is applied, the encoding device 100 and the decoding device 200 can generate a merging candidate list by reconstructing the motion information of neighboring blocks or the motion information of the col block, or both. The motion information may include at least one of the following: 1) a motion vector, 2) a reference frame index, and 3) an inter-frame prediction indicator. The prediction indicator may indicate unidirectional (L0 prediction, L1 prediction) or bidirectional prediction.

[0233] Here, the merging mode can be applied to each CU or each PU. When the merging mode is executed in each CU or each PU, the encoding device 100 can generate a bitstream by entropy decoding of predefined information and can send the bitstream to the decoding device 200. The bitstream may include the predefined information. The predefined information may include: 1) a merging flag indicating whether the merging mode is executed for each block partition; and 2) a merging index indicating which block among the neighboring blocks adjacent to the target block is merged. For example, the neighboring blocks adjacent to the target block may include the left neighboring block of the target block, the upper neighboring block of the target block, the time neighboring block of the target block, etc.

[0234] The merge candidate list indicates a list storing motion information. Furthermore, the merge candidate list can be generated before executing the merge mode. The motion information stored in the merge candidate list can be at least one of the following: motion information of neighboring blocks adjacent to the encoding / decoding target block, motion information of co-occurring blocks in the reference frame related to the encoding / decoding target block, newly generated motion information through pre-combining motion information existing in the merge motion candidate list, and zero merge candidates. Here, the motion information of neighboring blocks adjacent to the encoding / decoding target block can be referred to as spatial merge candidates. The motion information of co-occurring blocks in the reference frame related to the encoding / decoding target block can be referred to as temporal merge candidates.

[0235] A skip mode can be a mode that applies the mode information of neighboring blocks themselves to the encoded / decoded target block. The skip mode can be one of the modes used for inter-frame prediction. When a skip mode is used, the encoding device 100 can entropy-encode information about which block's motion information is used as the motion information for the encoded target block, and can send this information to the decoding device 200 via a bitstream. The encoding device 100 may not send other information (e.g., syntax element information) to the decoding device 200. The syntax element information may include at least one of motion vector difference information, a coded block flag, and a transform coefficient level.

[0236] The residual signal generated after intra-frame or inter-frame prediction can be transformed to the frequency domain through a transform process as part of the quantization process. Here, the initial transform can use DCT Type 2 (DCT-II) and various DCT and DST kernels. These transform kernels can perform separable transforms on the residual signal for 1D transforms along the horizontal and / or vertical directions, or they can perform 2D non-separable transforms on the residual signal.

[0237] For example, in the case of 1D transforms, the DCT and DST types used in the transform can be DCT-II, DCT-V, DCT-VIII, DST-I, and DST-VII as shown in the following tables. For example, as shown in Tables 1 and 2, the DCT or DST types used in the transform by synthesizing transform sets can be derived.

[0238] [Table 1]

[0239] 0 DST_VII, DCT-VIII 1 DST-VII, DST-I 2 DST-VII, DCT-V

[0240] [Table 2]

[0241] 0 DST_VII, DCT-VIII, DST-I 1 DST-VII, DST-I, DCT-VIII 2 DST-VII, DCT-V, DST-I

[0242] For example, such as Figure 8 As shown, different transform sets are defined for the horizontal and vertical directions according to the intra-prediction mode. Next, the encoder / decoder can perform transforms and / or inverse transforms using the intra-prediction mode of the current encoding / decoding target block and the transforms of the associated transform sets. In this case, entropy encoding / decoding is not performed on the transform sets, and the encoder / decoder can define the transform sets according to the same rules. In this case, entropy encoding / decoding indicating which transform among the transforms of the transform set is used can be performed. For example, when the block size is equal to or less than 64×64, three transform sets are synthesized according to the intra-prediction mode, as shown in Table 2, and three transforms are used for each horizontal and vertical transform to combine and perform a total of nine multi-transform methods. Next, the residual signal is encoded / decoded using the optimal transform method, thereby improving coding efficiency. Here, truncated univariate binarization can be used to perform entropy encoding / decoding on information about which transform method among the three transforms in a transform set is used. Here, entropy encoding / decoding can be performed on information indicating which transform among the transforms of the transform set is used to perform at least one of the vertical and horizontal transforms.

[0243] After completing the first transformation described above, as follows Figure 9As shown, the encoder can perform a secondary transformation on the transform coefficients to improve energy concentration. The secondary transformation can perform a separable transformation for 1D transformation along the horizontal and / or vertical directions, or a non-separable 2D transformation. The transformation information used can be transmitted or derived by the encoder / decoder based on current and neighboring encoded information. For example, a transform set for the secondary transformation can be defined, such as for 1D transformation. Entropy encoding / decoding is not performed on this transform set, and the encoder / decoder can define the transform set according to the same rules. In this case, information indicating which transform among the transforms in the transform set is used can be transmitted, and this information can be applied to at least one residual signal via intra-frame prediction or inter-frame prediction.

[0244] At least one of the number or type of transform candidates varies for each transform set. At least one of the number or type of transform candidates may be determined differently based on at least one of the following: the location, size, partitioning form of the block (CU, PU, ​​TU, etc.), and the orientation / non-orientation of the prediction mode (intra-frame / inter-frame mode) or intra-frame prediction mode.

[0245] The decoder can perform a second inverse transform based on whether the second inverse transform has been performed, and can perform a first inverse transform based on whether the first inverse transform has been performed from the result of the second inverse transform.

[0246] The aforementioned first and second transformations can be applied to at least one signal component in the luminance / chrominance components, or can be applied according to the size / shape of any coded block. Entropy encoding / decoding can be performed on indices indicating whether the first / second transformation is used and both the first / second transformation used in any coded block. Alternatively, these indices can be deduced by the encoder / decoder by default based on at least one current / nearby coded information.

[0247] The residual signal generated after intra-frame prediction or inter-frame prediction is quantized after the first and / or second transforms, and the quantized transform coefficients are entropy-coded. Here, as... Figure 10 As shown, the quantized transform coefficients can be scanned in the diagonal, vertical and horizontal directions based on at least one of the intra-frame prediction mode or the size / shape of the minimum block.

[0248] Furthermore, the quantized transform coefficients that have undergone entropy decoding can be arranged in blocks by inverse scanning, and at least one of dequantization or inverse transform can be performed on the relevant blocks. Here, as a method of inverse scanning, at least one of diagonal scanning, horizontal scanning, and vertical scanning can be performed.

[0249] For example, when the current coded block size is 8×8, the residual signal for the 8×8 block can be subjected to a first transform, a second transform, and quantization. Then, according to... Figure 10 At least one of the three scanning order methods shown performs scanning and entropy encoding on the quantized transform coefficients for each of the four 4×4 sub-blocks. Furthermore, an inverse scan can be performed on the quantized transform coefficients by performing entropy decoding. The quantized transform coefficients that have undergone inverse scanning become transform coefficients after dequantization, and at least one of a second inverse transform or a first inverse transform is performed, thereby generating the reconstructed residual signal.

[0250] In video encoding processing, a block can be like... Figure 11 The blocks are partitioned as shown, and indicators corresponding to the partition information can be transmitted using signals. Here, the partition information can be at least one of the following: a partition flag (split_flag), a quadtree / binary tree flag (QB_flag), a quadtree partition flag (quadtree_flag), a binary tree partition flag (binarytree_flag), and a binary tree partition type flag (Btype_flag). Here, split_flag indicates whether the block is partitioned, QB_flag indicates whether the block is partitioned in quadtree or binary tree form, quadtree_flag indicates whether the block is partitioned in quadtree form, binarytree_flag indicates whether the block is partitioned in binary tree form, and Btype_flag indicates whether the block is vertically or horizontally partitioned in the case of binary tree partitioning.

[0251] When the partition flag is 1, it indicates that the partition is executed; when the partition flag is 0, it indicates that the partition is not executed. In the case of the quadtree / binary tree flag, 0 indicates a quadtree partition, and 1 indicates a binary tree partition. Optionally, 0 can indicate a binary tree partition, and 1 can indicate a quadtree partition. In the case of the binary tree partition type flag, 0 can indicate a horizontal partition, and 1 can indicate a vertical partition. Optionally, 0 can indicate a vertical partition, and 1 can indicate a horizontal partition.

[0252] For example, it can be derived by sending at least one of the quadtree_flag, binarytree_flag, and Btype_flag as shown in Table 3 using a signal. Figure 11 Partition information.

[0253] [Table 3]

[0254]

[0255] For example, it can be derived by transmitting at least one of the split_flag, QB_flag, and Btype_flag as shown in Table 4 using a signal. Figure 11 Partition information.

[0256] [Table 4]

[0257]

[0258] The partitioning method can be performed either in quadtree or binary tree form only, depending on the size / shape of the block. In this case, `split_flag` can be interpreted as a flag indicating whether partitioning is performed in quadtree or binary tree form. The size / shape of the block can be derived from the block's depth information, which can be transmitted using signals.

[0259] When the block size is within a predetermined range, partitioning can be performed only in quadtree form. Here, the predetermined range can be defined as at least one of the largest block size or the smallest block size that can be partitioned in quadtree form. Information indicating the largest / minimum block size that allows quadtree-form partitioning can be transmitted via signaling through a bitstream, and this information can be transmitted via signaling in units of at least one of sequence, frame parameters, or stripes (segments). Alternatively, the largest / minimum block size can be a fixed size preset in the encoder / decoder. For example, when the block size ranges from 256x256 to 64x64, partitioning can be performed only in quadtree form. In this case, split_flag can be a flag indicating whether partitioning is performed in quadtree form.

[0260] When the block size is within a predetermined range, partitioning can be performed solely in a binary tree format. Here, the predetermined range can be defined as at least one of the largest block size or the smallest block size that can be partitioned solely in a binary tree format. Information indicating the largest / minimum block size that allows binary tree partitioning can be transmitted via a bitstream signal, and this information can be transmitted via signal in units of at least one of sequence, frame parameters, or stripes (segments). Alternatively, the largest / minimum block size can be a fixed size preset in the encoder / decoder. For example, when the block size ranges from 16x16 to 8x8, partitioning can be performed solely in a binary tree format. In this case, `split_flag` can be a flag indicating whether partitioning is performed in a binary tree format.

[0261] After partitioning a block according to a binary tree, when the partitioned block is further partitioned, partitioning can be performed only according to the binary tree.

[0262] When the width or length of a partitioned block cannot be further partitioned, at least one indicator may not be transmitted by signal.

[0263] In addition to binary tree partitioning based on quadtrees, quadtree-based partitioning can be performed after binary tree partitioning.

[0264] Figure 12 This is a diagram illustrating a method for performing intra-frame prediction on the current block according to an embodiment of the present invention.

[0265] like Figure 12 As shown, intra-frame prediction may include: deriving an intra-frame prediction mode (S1210), constructing reference samples (S1220), and / or performing intra-frame prediction (S1230).

[0266] In the step of deriving the intra-prediction mode (S1210), the intra-prediction mode of the neighboring block can be used, the intra-prediction mode of the current block can be decoded from the bitstream (e.g., entropy decoding), the intra-prediction mode of the color component of the current block can be derived using the intra-prediction mode utilizing the transform model, and / or the intra-prediction mode of the current block. Alternatively, in the step of deriving the intra-prediction mode (S1210), the intra-prediction mode of the current block can be derived using the intra-prediction mode of the neighboring block, a combination of one or more intra-prediction modes of the neighboring block, and / or the intra-prediction mode derived by the MPM.

[0267] In the step of constructing reference samples (S1220), reference samples can be constructed by performing reference sample selection and / or reference sample filtering.

[0268] In the step of performing intra-frame prediction (S1230), intra-frame prediction can be performed for the current block using non-directional prediction, directional prediction, position-based prediction, prediction between color components, and / or residual signal prediction. In the step of performing intra-frame prediction (S1230), filtering can be additionally performed on the predicted samples. If directional prediction is performed, different directional predictions can be performed based on one or more sample units. For example, the one or more sample units can be a single sample, a group of samples, a line, and / or a sub-block.

[0269] The steps for deriving the intra-prediction mode (S1210) will be described in more detail below.

[0270] As described above, to derive the intra prediction mode of the current block, at least one of the following methods can be used: a method for using intra prediction modes of one or more neighboring blocks, a method for decoding the intra prediction mode of the current block from the bitstream, a method for using encoding parameters of neighboring blocks, and a method for using intra prediction modes between color components. Neighboring blocks can be one or more blocks reconstructed before the encoding / decoding of the current block.

[0271] If a neighboring block is located outside the boundary of at least one predetermined unit (such as a frame, stripe, parallel block, or coding tree unit (CTU), or if PCM mode or inter-frame prediction has been applied to the neighboring block, then the neighboring block can be determined to be unavailable. The intra-frame prediction mode corresponding to the unavailable neighboring block can be replaced using DC mode, planar mode, or a predetermined intra-frame prediction mode.

[0272] The size of the current block can be W×H, where W and H are positive integers and can be equal or different. W and / or H can be at least one of, for example, 2, 4, 8, 16, 32, 64, 128, 256, and 512.

[0273] Figure 13 This is a diagram depicting a method for deriving the intra-prediction mode of the current block from neighboring blocks.

[0274] exist Figure 13 In this disclosure, the labels a to k on neighboring blocks can represent the intra-prediction mode or the intra-prediction mode number of the neighboring block. The positions of the neighboring blocks used to derive the intra-prediction mode of the current block can be predefined fixed positions. Alternatively, information about the positions of neighboring blocks can be derived through encoding / decoding. In this disclosure, encoding / decoding can include entropy encoding and entropy decoding.

[0275] When the intra-prediction mode of a neighboring block is used, a specific mode of the neighboring block can be derived as the intra-prediction mode of the current block. For example, the intra-prediction mode i of the neighboring block to which the left sample (-1,0) adjacent to the current block's sample (0,0) belongs can be derived as the intra-prediction mode of the current block. Alternatively, the intra-prediction mode f of the neighboring block to which the upper sample (0,-1) adjacent to the current block's sample (0,0) belongs can be derived as the intra-prediction mode of the current block. Alternatively, the intra-prediction mode b of the neighboring block to which the upper left sample (-1,-1) adjacent to the current block's sample (0,0) belongs can be derived as the intra-prediction mode of the current block. Alternatively, the intra-prediction mode g of the neighboring block to which the upper sample (W-1,-1) adjacent to the current block's sample (W-1,0) belongs can be derived as the intra-prediction mode of the current block. Alternatively, the intra-prediction mode k of the neighboring block to which the upper-right sample (W,-1) adjacent to the current block's sample (W-1,0) belongs can be derived as the intra-prediction mode of the current block. Alternatively, the intra-prediction mode j of the neighboring block to which the left-side sample (1,H-1) adjacent to the current block's sample (0,H-1) belongs can be derived as the intra-prediction mode of the current block. Alternatively, the intra-prediction mode l of the neighboring block to which the lower-left sample (-1,H) adjacent to the current block's sample (0,H-1) belongs can be derived as the intra-prediction mode of the current block. Alternatively, the intra-prediction mode of the neighboring block located at a predetermined position within the neighboring blocks can be derived as the intra-prediction mode of the current block. For example, the predetermined position can be encoded / decoded from the bitstream, or it can be derived based on encoding parameters. For example, the predetermined position can be a block with an intra-prediction mode e.

[0276] Alternatively, one or more neighboring blocks of the current block can be selected. This selection can be based on information explicitly transmitted via signaling through the bitstream. Alternatively, the selection can be based on a preset criterion between the encoder and decoder. The intra-prediction mode of the current block can be derived from the intra-prediction modes of the selected one or more neighboring blocks. For example, the intra-prediction mode of the current block can be derived using statistical values ​​of the intra-prediction modes of the selected neighboring blocks. These statistical values ​​may include, for example, minimum, maximum, average, weighted average, most frequent, and / or median values.

[0277] For example, the intra prediction mode of the current block can be derived from the intra prediction modes i and f of the neighboring blocks to which the sample to the left and the sample above the current block (0,0) belongs, with the smaller or larger mode number. For example, if the selected neighboring block's intra prediction modes are b, f, g, i, and j, the intra prediction mode of the current block can be derived from the mode with the smallest value among the mode numbers of the intra prediction modes. For example, if the selected neighboring block's intra prediction modes are i, b, and f, the intra prediction mode of the current block can be derived from the mode with the median value among the mode numbers of the intra prediction modes. For example, the most frequent derivation among the intra prediction modes of the neighboring blocks adjacent to the current block can be used as the intra prediction mode of the current block.

[0278] Alternatively, the intra prediction mode of the current block can be derived by combining the intra prediction modes of one or more neighboring blocks. An intra prediction mode can be represented as at least one of a mode number, a mode value, and a mode angle. For example, the average of one or more intra prediction modes of neighboring blocks can be derived as the intra prediction mode of the current block. The average of two intra prediction modes can be represented as at least one of the median between two mode numbers, the median of two mode values, and the median angle between two mode angles.

[0279] For example, the intra prediction mode of the current block can be derived as the average of the mode values ​​of the intra prediction modes i and f of the neighboring blocks to which the sample to the left and the sample to the top of the current block (0,0) belongs. For example, the intra prediction mode Pred_mode of the current block can be derived by at least one of the methods (1), (2) and (3) described in [Equation 1].

[0280] [Equation 1]

[0281] Pred_mode=(i+f)>>1 (1)

[0282] Pred_mode=(i+f+1)>>1 (2)

[0283] Pred_mode=(i+f) / 2 (3)

[0284] Alternatively, if the intra prediction mode i of a neighboring block is a non-directional mode, then the intra prediction mode of the current block can be derived as intra prediction mode i. Alternatively, if the intra prediction mode f of a neighboring block is a directional mode, then the intra prediction mode of the current block can be derived as intra prediction mode f.

[0285] Alternatively, the intra-prediction mode of the current block can be derived as the mode corresponding to the average of at least one of the mode values ​​of the intra-prediction modes b, f, g, i, and j of the neighboring blocks. For example, the intra-prediction mode Pred_mode of the current block can be derived by at least one of the methods (1), (2), (3), and (4) described in [Equation 2].

[0286] [Equation 2]

[0287] Pred_mode=(f+g+i+j+2)>>2 (1)

[0288] Pred_mode=(b+f+g+i+j) / 5 (2)

[0289] Pred_mode=(i+f+k+l+2)>>2 (3)

[0290] Pred_mode=(b+f+k+i+l) / 5 (4)

[0291] Alternatively, the mode corresponding to the average of the available intra-prediction modes of the nearby neighboring blocks can be derived as the intra-prediction mode of the current block. For example, if the left neighboring block of the current block is located outside the boundaries of a frame, parallel block, strip, and / or CTU, or if the left neighboring block of the current block corresponds to at least one of the PCM mode or inter-prediction mode and is therefore unavailable, then the mode corresponding to the statistical values ​​of the intra-prediction modes (e.g., f and g) of the upper neighboring blocks can be derived as the intra-prediction mode of the current block.

[0292] For example, a weighted average or weighted sum can be used as a statistical value of the intra-prediction mode of neighboring blocks. Here, weights can be assigned based on the directionality of the intra-prediction modes of neighboring blocks. For example, modes assigned relatively large weights can be predefined or signaled. For example, a mode assigned a relatively large weight can be at least one of a vertical mode, a horizontal mode, and a non-directional mode. These modes can be assigned the same weight or different weights. For example, the weighted sum of intra-prediction modes i and f can be derived as the intra-prediction mode Pred_mode of the current block via [Equation 3] below. In [Equation 3] below, mode f can be a mode assigned a relatively large weight (e.g., a vertical mode).

[0293] [Equation 3]

[0294] Pred_mode = (i + 3 * f + 2) >> 2

[0295] Alternatively, the weights to be used in the weighted sum can be determined based on the size of neighboring blocks. For example, if the size of the block above the current block is larger than the size of the block to the left of the current block, a larger weight can be assigned to the intra-prediction mode of the block above. Alternatively, a larger weight can be assigned to the intra-prediction mode of the block below.

[0296] Alternatively, if one or more intra-prediction modes of neighboring blocks are non-directional modes, then the non-directional mode can be derived as the intra-prediction mode of the current block. Alternatively, the intra-prediction mode of the current block can be derived using the intra-prediction modes of neighboring blocks other than non-directional modes. If all intra-prediction modes of neighboring blocks are non-directional modes, then the intra-prediction mode of the current block can be derived as at least one of DC mode or planar mode.

[0297] Alternatively, the most probable mode (MPM) of the intra prediction mode based on neighboring blocks can be used to deduce the intra prediction mode of the current block. If the MPM is used, one or more pieces of information about the intra prediction mode of the current block can be encoded / decoded.

[0298] If an MPM is used, an MPM list can be constructed. The MPM list may include intra-prediction modes derived from intra-prediction modes of neighboring blocks. The MPM list may include N candidate modes. N is a positive integer and may vary depending on the size and / or shape of the current block. Alternatively, information about N can be transmitted via a bitstream using signals.

[0299] For example, the intra-prediction mode of the current block derived using one or more intra-prediction modes of neighboring blocks can be a candidate mode included in the MPM list.

[0300] exist Figure 13 In the example shown, intra-prediction patterns of neighboring blocks at the same positions (-1,H-1), (W-1,-1), (W,-1), (-1,H), and (-1,-1) adjacent to the current block can be used. For example, the MPM list can be constructed in the order of j, g, plane, DC, l, k, and b. Alternatively, the MPM list can be constructed in the order of i, f, plane, DC, l, k, and b. Repeating patterns can be included once in the MPM list. If the MPM list is not filled due to the presence of repeating patterns, additional candidate patterns can be included in the list based on the patterns included in the list. For example, a pattern corresponding to +N or -N (N is a positive integer, e.g., 1) of a pattern included in the list can be added to the list. Alternatively, at least one of the horizontal, vertical, 45-degree, 135-degree, and 225-degree patterns that is not included in the list can be added to the list. Alternatively, the MPM list can be constructed using a combination and / or statistics of more than one intra-prediction pattern from neighboring blocks.

[0301] Multiple MPM lists can exist, and the methods used to construct each MPM list can differ from one another. For example, three MPM lists can be constructed (MPM list 1, MPM list 2, and MPM list 3). In this case, the intra-prediction modes included in each MPM list can be unique.

[0302] Indicators that indicate whether the same intra-prediction mode as the current block exists in the derived MPM list (e.g., prev_intra_luma_pred_flag) can be encoded in the bitstream or decoded from the bitstream.

[0303] If the indicator indicates that a mode identical to the intra-prediction mode of the current block exists in the MPM list, then the index information (e.g., mpm_idx) indicating which of the modes included in the MPM list this mode is can be encoded in the bitstream or decoded from the bitstream. The intra-prediction mode of the current block can be deduced based on the decoded index information.

[0304] If the indicator indicates that no intra-prediction mode identical to the current block's intra-prediction mode exists in the MPM list, information about the current block's intra-prediction mode can be encoded in or decoded from the bitstream. The intra-prediction mode of the current block can be deduced based on the decoded information about the current block's intra-prediction mode. Here, intra-prediction modes not included in the MPM list can be arranged in at least one ascending or descending order. Alternatively, one or more intra-prediction modes not included in the MPM list can be grouped into one or more groups. For example, modes corresponding to +N or -N (where N is a positive integer, e.g., 1, 2, or 3) of the intra-prediction modes included in the MPM list can be grouped into one group. Here, the group can include a predetermined number (e.g., 8 or 16) of intra-prediction modes, and the modes included in the group may not be included in the MPM list.

[0305] Alternatively, as described above, when multiple MPM lists exist, the indicator (e.g., `prev_intra_luma_pred_flag`) can indicate whether a mode identical to the intra-prediction mode of the current block exists in MPM list 1. If the indicator indicates that no mode identical to the intra-prediction mode of the current block exists in MPM list 1, it can be determined whether a mode identical to the intra-prediction mode of the current block exists in MPM list 2. If a mode identical to the intra-prediction mode of the current block exists in MPM list 2, the corresponding mode can be deduced as the intra-prediction mode of the current block. If no mode identical to the intra-prediction mode of the current block exists in MPM list 2, determination for MPM list 3 can be performed. Using the same method as above, determination for multiple MPM lists can be performed sequentially.

[0306] Alternatively, a separate message indicating one of multiple MPM lists can be sent. In this case, the intra-prediction mode of the current block can be inferred by using the MPM list indicated by the separate message and the indicator (e.g., prev_intra_luma_pred_flag).

[0307] Alternatively, predetermined candidates in the derived MPM list can be derived as intra-prediction modes for the current block. For example, the mode corresponding to list 0 (i.e., the first mode in the MPM list) can be derived as the intra-prediction mode for the current block. Alternatively, the index corresponding to a predetermined mode in the list can be encoded / decoded, and the corresponding mode can be derived as the intra-prediction mode for the current block.

[0308] Regarding the construction of the MPM list, an MPM list can be created for blocks of a predetermined size. If the predetermined size block is divided into multiple sub-blocks, then each of the multiple sub-blocks can use the MPM list.

[0309] For example, if the current block corresponds to a block of the predetermined size, an MPM list can be created for the current block. If the current block is divided into one or more sub-blocks, the MPM list can be used to derive the intra-prediction mode for each sub-block. For example, if the current block is 8×8 in size and is divided into four 4×4 sub-blocks, an MPM list can be created for the current block, and this MPM list can be used for each sub-block.

[0310] Regarding the construction of the MPM list, an MPM list can be created for each of the multiple sub-blocks into which a block of a predetermined size is divided.

[0311] For example, if the current block corresponds to a block of the predetermined size, an MPM list can be created for each sub-block of the current block using the intra-prediction mode of the current block's neighboring blocks. For example, if the current block is 8×8 in size and there are four 4×4 sub-blocks, an MPM list can be created for each of the four sub-blocks using the intra-prediction mode of the current block's neighboring blocks. Therefore, an MPM list can be created for all four sub-blocks simultaneously.

[0312] Alternatively, the intra prediction mode of the current block can be derived using at least one of the intra prediction modes of the current block derived from the MPM and the intra prediction modes of neighboring blocks.

[0313] For example, if the intra prediction mode of the current block derived from the MPM is Pred_mpm, the intra prediction mode of the current block can be derived by changing Pred_mpm to a specific mode using one or more intra prediction modes of neighboring blocks.

[0314] For example, Pred_mpm can be increased or decreased by N by comparing it with the intra-prediction modes of neighboring blocks. Here, N can be a predetermined integer, such as +1, +2, +3, 0, -1, -2, or -3. For example, if Pred_mpm is less than the intra-prediction modes of neighboring blocks and / or the statistical value of the intra-prediction modes of one or more neighboring blocks, Pred_mpm can be increased. Alternatively, if Pred_mpm is greater than the intra-prediction modes of neighboring blocks, Pred_mpm can be decreased. Alternatively, the intra-prediction mode of the current block can be derived based on Pred_mpm and / or the value compared with Pred_mpm.

[0315] exist Figure 13In the example shown, if Pred_mpm is less than the mode value f, then Pred_mpm+1 can be derived as the intra-prediction mode for the current block. Alternatively, if Pred_mpm is less than the mode value g, then Pred_mpm+1 can be derived as the intra-prediction mode for the current block. Alternatively, if Pred_mpm is less than the mode value f, then Pred_mpm+2 can be derived as the intra-prediction mode for the current block. Alternatively, if Pred_mpm is greater than the mode value f, then Pred_mpm-1 can be derived as the intra-prediction mode for the current block. Alternatively, if Pred_mpm is less than the mode value i, then Pred_mpm+1 can be derived as the intra-prediction mode for the current block. Alternatively, if Pred_mpm is less than the average of mode values ​​f and i, then Pred_mpm+1 can be derived as the intra-prediction mode for the current block. Alternatively, if Pred_mpm is less than the average of mode values ​​f and i, then half of the difference between Pred_mpm and the average can be added. For example, Pred_mpm+{((f+i+1)>>1-Pred_mpm+1)>>1} can be derived as the intra-prediction mode for the current block.

[0316] Alternatively, if one of the modes of Pred_mpm and the neighboring block is a non-directional mode and the other is a directional mode, then the non-directional mode can be derived as the intra-prediction mode of the current block, or the directional mode can be derived as the intra-prediction mode of the current block.

[0317] When deriving the intra-prediction mode of the current block using a list of most probable modes (MPMs), at least one of the following MPMs can be used, for example. Alternatively, the intra-prediction mode of the current block can be entropy encoded / decoded.

[0318] – A list of MPMs for the current block.

[0319] – At least one of the MPM lists for the parent block of the current block.

[0320] – At least one of the MPM lists of neighboring blocks for the current block.

[0321] Information required to create an MPM list using at least one of the following medium-entropy encoding / decoding methods: Video Parameter Set (VPS), Sequence Parameter Set (SPS), Picture Parameter Set (PPS), Adaptive Parameter Set (APS), Strip, Header, Parallel Block, CTU, CU, PU, ​​and TU. This information may include whether the MPM list of the current block is used, whether at least one of the MPM lists of the upper-level blocks of the current block is used, and whether at least one of the MPM lists of the neighboring blocks of the current block is used.

[0322] The upper-level block can be a block with a depth value smaller than that of the current block. Alternatively, the upper-level block can represent at least one block among blocks with smaller depth values, including the current block. Here, the depth value can represent a value that increases by 1 each time the block is partitioned. For example, the depth value of an unpartitioned CTU can be 0.

[0323] Furthermore, the upper-level block can be a combination of at least one of the following embodiments or multiple embodiments. If the first block is the upper-level block and the second block is the current block, then the first block may include the second block. Here, the first block may be a block with a shallower depth than the second block. Here, a shallower block may represent a block with a smaller depth value. Alternatively, the first block may represent a block with a larger size than the second block. Here, a larger block may represent a shallower block.

[0324] Information indicating at least one of the size or depth of the first block can be transmitted by the encoder via signals. This information can be transmitted via signals at at least one of the following levels: VPS, SPS, screen, strip, parallel block, and block.

[0325] At least one of the size or depth of the first block can be derived based on at least one of the size or depth of the second block. For example, at least one of the size or depth of the first block can be derived based on a value obtained by adding a predetermined constant to the size (or depth) of the second block (current block) or subtracting the predetermined constant from the size (or depth) of the second block (current block). Alternatively, at least one of the size or depth of the first block can have a fixed value preset in the encoder / decoder.

[0326] A neighboring block can be at least one of the blocks that are spatially and / or temporally adjacent to the current block. The neighboring block may have been encoded / decoded. Additionally, the neighboring block may have the same or different depth (or size) as the current block. A neighboring block can represent a block located at a predetermined position relative to the current block. Here, the predetermined position can be at least one of the following: upper-left position, upper position, upper-right position, left-side position, and lower-left position relative to the current block.

[0327] Alternatively, the predetermined position may be a position within a frame different from the frame to which the current block belongs. The block at the predetermined position may represent at least one of the current block's co-position block in a different frame and / or a block adjacent to the co-position block. Alternatively, the block at the predetermined position may be a block in a specific region of a different frame that corresponds to the current block and has the same prediction mode as the current block.

[0328] Furthermore, a neighboring block can mean a combination of at least one of the following embodiments or multiple embodiments. If the first block is a neighboring block and the second block is the current block, then the first block is an encoded / decoded block adjacent to the second block. The first block can be a block with the same depth as the second block. The first block can be a block with the same size as the second block.

[0329] The first and second blocks can belong to the same coding block (CTU, CU, etc.) or different coding blocks. The depth and / or size of the first block can be different from the depth and / or size of the second block.

[0330] The MPM list of an upper-layer block or neighboring block can represent a list of MPMs created based on an upper-layer block or neighboring block. The intra-prediction modes of encoded / decoded blocks adjacent to an upper-layer block or neighboring block can be added to the MPM list of the upper-layer block or neighboring block.

[0331] Figure 14 This is an exemplary diagram depicting the current block, the parent block, and neighboring blocks.

[0332] For example, in Figure 14 In this context, block U (marked with a thick solid line) can be the parent block of blocks F, G, H, I, and J. At least one of blocks F, G, H, I, and J can be the current block.

[0333] For example, in Figure 14 In this context, block V (marked with a thick dashed line) can be a parent block of blocks G, H, I, and J. At least one of blocks G, H, I, and J can be the current block.

[0334] For example, in Figure 14 In this context, block W (the block marked with a dotted pattern) can be a parent block of blocks G, H, and I. At least one of blocks G, H, and I can be the current block.

[0335] For example, in Figure 14 In this context, block X (the block marked with a diamond pattern) can be a parent block of both block H and block I. At least one of block H and block I can be the current block.

[0336] For example, in Figure 14 In this context, the neighboring blocks of the current block D can be at least one of block B, block C, and block K.

[0337] For example, in Figure 14 In this context, the neighboring blocks of the current block L can be at least one of blocks C, D, E, H, and K.

[0338] For example, in Figure 14 In this context, the neighboring blocks of the current block P can be at least one of the following: block E, block H, block I, block J, block L, block N, and block O.

[0339] For example, in Figure 14 In this context, the neighboring blocks of the current block S can be at least one of block I, block J, block P, block Q, and block R.

[0340] N MPM lists can be used to derive or entropy encode / decode the intra-prediction mode of the current block. Here, N can be 0 or a positive integer. That is, multiple MPM lists can be used to derive or entropy encode / decode the intra-prediction mode of the current block. Furthermore, multiple MPM lists can represent multiple MPM lists or multiple lists. The N MPM lists used for the current block can include at least one of the MPM lists of the current block, the MPM lists of the upper-level blocks, and the MPM lists of neighboring blocks.

[0341] In addition, at least one of the encoding parameters used for the current block can be used to generate the N MPM list.

[0342] Furthermore, at least one of the multiple sub-blocks of the predetermined block can be the current block. In this case, the upper-level block of the multiple sub-blocks can be the predetermined block. Here, the multiple sub-blocks can be included in the predetermined block. Furthermore, the multiple sub-blocks can be blocks partitioned from the predetermined block. Additionally, at least one of the multiple sub-blocks partitioned from the predetermined block that does not correspond to the current block can be a neighboring block of the current block. Here, a sub-block can be understood as a lower-level block that is semantically opposite to the upper-level block.

[0343] For example, if the current block is Figure 14 For block H in the current block, multiple MPM lists for the current block can be created using at least one of the following methods. These multiple MPM lists may include at least one of an MPM list created based on the current block and an MPM list created based on a higher-level block of the current block.

[0344] For example, in Figure 14 In this context, the MPM list created based on the upper-level block X can be used in the current block H.

[0345] For example, in Figure 14 In this context, the MPM list created based on the upper-level block W can be used in the current block H.

[0346] For example, in Figure 14 In this context, the MPM list created based on the upper-level block V can be used in the current block H.

[0347] For example, in Figure 14 In this context, the MPM list created based on the upper-level block U can be used in the current block H.

[0348] For example, in Figure 14In this context, at least one of the MPM lists created based on at least one of upper block X, upper block W, upper block V, and upper block U can be used to derive the intra-prediction mode of the current block H.

[0349] For example, if the current block is Figure 14 For block H in the current block, multiple MPM lists for the current block can be created using at least one of the following methods. These multiple MPM lists may include at least one of an MPM list created based on the current block and an MPM list created based on neighboring blocks of the current block.

[0350] For example, in Figure 14 In this context, the MPM list created based on neighboring block E can be used for the current block H.

[0351] For example, in Figure 14 In this context, the MPM list created based on neighboring block G can be used for the current block H.

[0352] For example, in Figure 14 In the process, at least one of the MPM lists created based on at least one of neighboring blocks E and G can be used for the current block H.

[0353] The intra-prediction mode of the current block can be derived using a list of MPMs, or the intra-prediction mode of the current block can be entropy encoded / decoded.

[0354] Using the MPM list of the upper-level block or the MPM list of the neighboring block for the current block can mean using the MPM list of the upper-level block or the MPM list of the neighboring block in the operation of deriving the intra-prediction mode of the current block or encoding / decoding the intra-prediction mode of the current block.

[0355] The list of multiple MPMs used for the current block may include lists of MPMs used for N upper-level blocks. Here, N is 0 or a positive integer.

[0356] When creating an MPM list for upper-level blocks, information such as the number of upper-level blocks, their depth and / or depth range and / or the difference between the depth of the current block and the depth of the upper-level blocks may be required. This information can be generated by medium entropy encoding / decoding in at least one of VPS, SPS, PPS, APS, stripe header, parallel block header, CTU, CU, PU, ​​and TU to create the MPM list for upper-level blocks.

[0357] For example, if the depth value of the current block is D, the MPM list of the upper-layer blocks can be created using at least one of the following methods. As described above, the created MPM list of the upper-layer blocks can be used in operations such as deriving the intra-prediction mode of the current block or encoding / decoding the intra-prediction mode of the current block. Here, D is 0 or a positive integer.

[0358] For example, the MPM list of the upper-level block with a depth value of D-1 can be used for the current block.

[0359] For example, the MPM list of the upper-level block with a depth value of D-2 can be used for the current block.

[0360] For example, the MPM list of the upper-level blocks with a depth value of DK can be used for the current block. Here, K is a positive integer equal to or less than D.

[0361] For example, a list of MPMs of upper-level blocks with depth values ​​ranging from D-1 to D-2 can be used for the current block.

[0362] For example, a list of MPMs of upper-level blocks with depth values ​​ranging from D-1 to D-3 can be used for the current block.

[0363] For example, a list of upper-level blocks' MPMs with depth values ​​ranging from D-1 to DK can be used for the current block. Here, K is a positive integer equal to or less than D.

[0364] For example, a list of MPMs of upper-level blocks with depth values ​​ranging from DK to Dl can be used for the current block. Here, K and l can be positive integers equal to or less than D. Additionally, K can be less than l.

[0365] For example, if a parent block is used, the MPM list of parent blocks with depth values ​​of D-1 or 0 can be used for the current block.

[0366] For example, if two upper-level blocks are used, the MPM list of at least two of the upper-level blocks with depth values ​​of 0, 1, D-1, or D-2 can be used for the current block.

[0367] For example, if K upper-level blocks are used, then a list of the MPMs of upper-level blocks, at least those with depth values ​​ranging from D1 to DK and those with depth values ​​ranging from 0 to K-1, can be used for the current block. K can be a positive integer less than or equal to D.

[0368] For example, if K upper-level blocks are used, then the MPM list of the K upper-level blocks for the current block can be used for the current block. K can be a positive integer less than or equal to D.

[0369] If the multiple MPM lists used for the current block include MPM lists of upper-level blocks, the number and / or depth values ​​of the upper-level blocks used can be derived using information about the size and / or depth of the current block.

[0370] For example, if the current block is a W×H block with a depth value of D, then the size of the current block can be represented as the number of pixels, W×H. If the number of pixels in the current block is equal to or greater than a predetermined threshold, then a list of one or more upper-level blocks with depth values ​​ranging from D-1 to DK can be used for the current block. Here, K can be a positive integer less than D.

[0371] Furthermore, for example, if the number of pixels in the current block is less than the predetermined threshold, a list of one or more upper-layer blocks with depth values ​​ranging from D-1 to DL can be used for the current block. Here, L can be a positive integer greater than K.

[0372] For example, if the depth value of the current block is D and D is less than or equal to a predetermined depth value T, then a list of one or more upper-level blocks with depth values ​​ranging from D-1 to DK can be used for the current block. K can be a positive integer less than D.

[0373] For example, if the depth value D of the current block is greater than T, then a list of MPMs of one or more upper-level blocks with depth values ​​ranging from D-1 to DL can be used for the current block. L can be a positive integer greater than K.

[0374] The list of multiple MPMs for the current block may include a list of MPMs for N neighboring blocks. The N neighboring blocks may include neighboring blocks at predetermined positions. N can be 0 or a positive integer.

[0375] Information such as the number N of included neighboring blocks, depth values, sizes, and / or locations may be required to create a list of neighboring block MPMs. The information needed to create the neighboring block MPM list can be entropy encoded / decoded in at least one of VPS, SPS, PPS, APS, strip header, parallel block header, CTU, CU, PU, ​​and TU. The number and / or location of neighboring blocks can be variably determined based on the size, shape, and / or location of the current block. A list of neighboring block MPMs can be created if the depth value of a neighboring block is a predetermined value or falls within a predetermined range. The predetermined range can be defined by at least one of a minimum or maximum value. Information regarding at least one of the minimum or maximum values ​​can be entropy encoded / decoded in the aforementioned predetermined units.

[0376] For example, in Figure 14 If the current block is block P and has a depth value D, then multiple MPM lists for the current block can be created using at least one of the following methods. Here, the multiple MPM lists may include at least one of an MPM list created based on the current block and an MPM list created based on the current block's neighboring blocks.

[0377] For example, an MPM list based on the left neighboring blocks L or N of the current block P can be used for the current block P.

[0378] For example, an MPM list based on the upper-left neighboring block E of the current block P can be used for the current block P.

[0379] For example, an MPM list based on the lower-left neighboring block O of the current block P can be used for the current block P.

[0380] For example, an MPM list based on the upper neighboring blocks H or I of the current block P can be used for the current block P.

[0381] For example, an MPM list based on the upper-right neighboring block J of the current block P can be used for the current block P.

[0382] For example, the MPM list of at least two of the following neighboring blocks of the current block P: the upper left neighboring block, the upper top neighboring block, the upper right neighboring block, the left neighboring block, and the lower left neighboring block can be used for the current block P.

[0383] For example, the MPM list of at least three of the following neighboring blocks of the current block P: the upper left neighboring block, the upper top neighboring block, the upper right neighboring block, the left neighboring block, and the lower left neighboring block can be used for the current block P.

[0384] For example, the MPM list of at least four neighboring blocks of the current block P, namely the upper left neighboring block, the upper neighboring block, the upper right neighboring block, the left neighboring block, and the lower left neighboring block, can be used for the current block P.

[0385] For example, the MPM list of at least five neighboring blocks among the upper left, upper top, upper right, left left, and lower left neighboring blocks of the current block P can be used for the current block P.

[0386] Intra-prediction modes derived based on at least one of the current block, the upper-level block, and neighboring blocks can be included in a list of MPMs used for the current block. That is, if a single MPM list is used for the current block instead of multiple MPM lists, the MPM list can consist of at least one of multiple intra-prediction modes derived based on at least one of the current block, the upper-level block, and neighboring blocks.

[0387] If the N MPM lists used for the current block include MPM lists used for at least one of the parent and neighboring blocks, then the order in which the N MPM lists are made can be determined. Here, N can be 0 or a positive integer.

[0388] The order in which the MPM list is created can be preset in the encoder and decoder. Alternatively, the order can be determined based on the encoding parameters of each corresponding block. Alternatively, the order can be determined based on the encoding parameters of the current block. Alternatively, information about the order of MPM list creation can be entropy encoded / decoded.

[0389] For example, in Figure 14 In this context, the current block can be block H, and the MPM list used for the current block can be called MPM_LIST_CUR.

[0390] The MPM lists created based on the upper-level blocks of the current block for blocks X, W, V, and U can be referred to as MPM_LIST_X, MPM_LIST_W, MPM_LIST_V, and MPM_LIST_U, respectively.

[0391] Additionally, the MPM lists for blocks L, E, and G, created based on the neighboring blocks of the current block, can be referred to as MPM_LIST_L, MPM_LIST_E, and MPM_LIST_G, respectively.

[0392] The order in which the N MPM lists for the current block are made can be determined by at least one of the methods described below. The number of upper-level blocks and / or neighboring blocks used in the methods described below is merely an example, and therefore different numbers of upper-level blocks and / or neighboring blocks may also be used.

[0393] For example, multiple MPM lists can be created for the current block H in the order of MPM_LIST_CUR->MPM_LIST_X->MPM_LIST_W->MPM_LIST_V->MPM_LIST_U.

[0394] For example, multiple MPM lists can be created for the current block H in the order of MPM_LIST_U->MPM_LIST_V->MPM_LIST_W->MPM_LIST_X->MPM_LIST_CUR.

[0395] For example, when MPM_LIST_CUR is used as the first MPM list, multiple MPM lists can be created for the current block H using MPM lists of at least K upper-level blocks sorted in ascending or descending order of depth values. Here, K can be 0 or a positive integer.

[0396] For example, multiple MPM lists can be created for the current block H in the order of MPM_LIST_CUR->MPM_LIST_L->MPM_LIST_G->MPM_LIST_E.

[0397] For example, multiple MPM lists can be created for the current block H in the order of MPM_LIST_L->MPM_LIST_G->MPM_LIST_E->MPM_LIST_CUR.

[0398] For example, when MPM_LIST_CUR is used as the first MPM list, multiple MPM lists can be created for the current block H by using MPM lists for at least one of the top-left neighbor block, left-side neighbor block, bottom-left neighbor block, top-side neighbor block, and top-right neighbor block in a predetermined order.

[0399] For example, multiple MPM lists can be created for the current block H in the order of MPM_LIST_CUR->MPM_LIST_X->MPM_LIST_L.

[0400] For example, multiple MPM lists can be created for the current block H in the order of MPM_LIST_CUR->MPM_LIST_L->MPM_LIST_X.

[0401] For example, multiple MPM lists can be created for the current block H in the following order: MPM_LIST_CUR -> MPM lists for the K upper-level blocks in a predetermined order -> MPM lists for the L neighboring blocks in a predetermined order. Here, each of K and L can be 0 or a positive integer.

[0402] For example, multiple MPM lists can be created for the current block H in the following order: MPM_LIST_CUR -> MPM lists for the L neighboring blocks in a predetermined order -> MPM lists for the K upper-level blocks in a predetermined order. Here, each of K and L can be 0 or a positive integer.

[0403] For example, multiple MPM lists can be created for the current block H in the following order: MPM_LIST_CUR -> MPM lists for at least K blocks in the parent or neighboring blocks in a predetermined order. Here, K can be a positive integer.

[0404] For example, multiple MPM lists can be created for the current block H using MPM_LIST_CUR and a list of MPMs for at least K blocks in a predetermined order from the parent or neighboring blocks. Here, K can be a positive integer.

[0405] Intra-prediction modes from the preceding MPM list may not be included in the subsequent MPM list.

[0406] Additionally, the variable-length code for the indicator used in the preceding MPM list may be shorter than the variable-length code for the indicator used in the subsequent MPM list.

[0407] The preceding MPM list may include fewer candidates than the subsequent MPM list.

[0408] Indicators can be assigned to the MPM list in the order they were created.

[0409] The N MPM lists for the current block may include MPM lists for at least one of the upper-level blocks and neighboring blocks, according to at least one of a plurality of orders in which the MPM lists were made. Here, the multiple MPM lists may be made to include the same intra-prediction modes without redundancy. Here, N can be 0 or a positive integer.

[0410] The N MPM lists used for the current block can be represented by MPM_LIST_1, MPM_LIST_2, ..., MPM_LIST_N. At least one of MPM_LIST_CUR, MPM_LIST_X, MPM_LIST_W, MPM_LIST_V, MPM_LIST_U, MPM_LIST_L, MPM_LIST_E, and MPM_LIST_G can correspond to at least one of MPM_LIST_1, MPM_LIST_2, ..., MPM_LIST_N.

[0411] The number of intra-prediction modes that can be included in each MPM list can be represented by C1, C2, ... CN. Each of N, C1, C2, ... CN can be 0 or a positive integer. Some or all of C1 to CN can be equal or different. Additionally, at least one of C1, C2, ... CN can be predetermined in the encoder and decoder. Furthermore, at least one of C1, C2, ... CN can be determined based on the encoding parameters of each corresponding block. Additionally, at least one of C1, C2, ... CN can be entropy encoded / decoded.

[0412] For example, MPM_LIST_1_MODE_1, MPM_LIST_1_MODE_2, ..., MPM_LIST_1_MODE_C1 can be used to represent the intra-prediction modes included in MPM_LIST_1.

[0413] To prevent redundant inclusion of the same intra-prediction mode in the MPM list, intra-prediction modes in later MPM lists can be used to check for redundancy in intra-prediction modes included in earlier MPM lists. If a redundant intra-prediction mode is found after redundancy checking, it can be removed from the MPM list. After the redundant mode is removed, the desired intra-prediction mode can be added to the MPM list.

[0414] Redundancy checks on the modes included in the MPM lists can be performed during the step of creating multiple MPM lists. Alternatively, redundancy checks can be performed after all multiple MPM lists have been created. Or, redundancy checks can be performed each time an intra-predictive mode is included in an MPM list.

[0415] For example, if the MPM_LIST_1 used for the current block includes C1 intra-prediction modes, then the intra-prediction modes in MPM_LIST_1 can be non-redundant MPM_LIST_1_MODE_1, MPM_LIST_1_MODE_2, ..., MPM_LIST_1_MODE_C1.

[0416] For example, if MPM_LIST_2 includes C2 non-redundant intra prediction modes, it can be checked whether each intra prediction mode in MPM_LIST_2 is the same as at least one of the intra prediction modes in MPM_LIST_1.

[0417] If the intra-prediction mode MPM_LIST_2_MODE_X included in MPM_LIST_2 is the same as the mode included in MPM_LIST_1, then redundant intra-prediction modes MPM_LIST_2_MODE_X can be removed from MPM_LIST_2. Here, MPM_LIST_2_MODE_X can be at least one of MPM_LIST_2_MODE_1, MPM_LIST_2_MODE_2, ..., MPM_LIST_2_MODE_C2.

[0418] For example, if at least one intra-prediction mode is removed from MPM_LIST_2, at least one intra-prediction mode from the predetermined intra-prediction modes may be included in MPM_LIST_2. The at least one intra-prediction mode included in MPM_LIST_2 from the predetermined intra-prediction modes may not be redundant with at least one of the intra-prediction modes included in MPM_LIST_1. Alternatively, the at least one intra-prediction mode included in MPM_LIST_2 from the predetermined intra-prediction modes may not be redundant with any of the intra-prediction modes included in MPM_LIST_1.

[0419] The predetermined intra-prediction mode added to replace the redundant prediction mode may include at least one of the following intra-prediction modes: INTRA_PLANAR, INTRA_DC, horizontal mode, vertical mode, 45-degree mode, 135-degree mode, 225-degree mode, MPM_LIST_2_MODE_X±delta, INTRA_DM, and INTRA_LM. INTRA_DM may represent an intra-prediction mode in which the intra-chroma prediction mode is determined to be the same as the intra-luminance prediction mode. Additionally, INTRA_LM may represent an intra-prediction mode in which at least one of the chroma prediction block / chroma residual block / chroma reconstruction block can be generated based on at least one of the luminance prediction block / luminance residual block / luminance reconstruction block. Furthermore, delta (increment) may be a positive integer.

[0420] When delta is continuously increased by 1 from 1 each time until the number of intra-prediction modes included in MPM_LIST_2 is C2, a predetermined intra-prediction mode (MPM_LIST_2_MODE_X ± increment) can be included in MPM_LIST_2. Alternatively, the predetermined intra-prediction modes can be arranged in a predetermined order, and at least one of the predetermined intra-prediction modes can be included in MPM_LIST_2 in said order until the number of intra-prediction modes included in MPM_LIST_2 is C2.

[0421] For example, if MPM_LIST_3 for the current block includes C3 non-redundant intra prediction modes, it can be checked whether each intra prediction mode included in MPM_LIST_3 is equal to at least one of the intra prediction modes included in MPM_LIST_1 and MPM_LIST_2.

[0422] If the intra-prediction mode MPM_LIST_3_MODE_X included in MPM_LIST_3 is the same as the mode included in MPM_LIST_1 or MPM_LIST_2, then MPM_LIST_3_MODE_X can be removed from MPM_LIST_3. Here, MPM_LIST_3_MODE_X can be at least one of MPM_LIST_3_MODE_1, MPM_LIST_3_MODE_2, ..., MPM_LIST_3_MODE_C3.

[0423] For example, if at least one intra-prediction mode is removed from MPM_LIST_3, at least one intra-prediction mode from the predetermined intra-prediction modes may be included in MPM_LIST_3. The at least one intra-prediction mode included in MPM_LIST_3 from the predetermined intra-prediction modes may not be redundant with at least one of the intra-prediction modes included in MPM_LIST_1 and MPM_LIST_2. Alternatively, the at least one intra-prediction mode included in MPM_LIST_3 from the predetermined intra-prediction modes may not be redundant with any of the intra-prediction modes included in MPM_LIST_1 and MPM_LIST_2.

[0424] For example, when delta increases by 1 each time from 1 until the number of intra-prediction modes included in MPM_LIST_3 is C3, a predetermined intra-prediction mode (MPM_LIST_3_MODE_X±delta) can be included in MPM_LIST_3. Alternatively, the predetermined intra-prediction modes can be arranged in a predetermined order, and at least one of the predetermined intra-prediction modes can be included in MPM_LIST_3 in said order until the number of intra-prediction modes included in MPM_LIST_3 is C3.

[0425] For example, if the MPM_LIST_K used for the current block includes CK non-redundant intra prediction modes, it can be checked whether each intra prediction mode included in MPM_LIST_K is the same as at least one of the intra prediction modes included in MPM_LIST_1, MPM_LIST_2, ..., MPM_LIST_(K-1). K can be a positive integer equal to or less than the maximum number N of MPM lists available for the current block.

[0426] If the intra-prediction mode MPM_LIST_K_MODE_X included in MPM_LIST_K is the same as the mode included in MPM_LIST_1, MPM_LIST_2, ..., MPM_LIST_(K-1), then redundant intra-prediction modes MPM_LIST_K_MODE_X can be removed from MPM_LIST_K. Here, MPM_LIST_K_MODE_X can be at least one of MPM_LIST_K_MODE_1, MPM_LIST_K_MODE_2, ..., MPM_LIST_K_MODE_CK.

[0427] For example, if at least one intra-prediction mode is removed from MPM_LIST_K, at least one of the predetermined intra-prediction modes can be included in MPM_LIST_K. The at least one intra-prediction mode included in MPM_LIST_K may not be redundant with at least one of the intra-prediction modes included in MPM_LIST_1, MPM_LIST_2, ..., and MPM_LIST_(K-1). Alternatively, the at least one intra-prediction mode included in MPM_LIST_K may not be redundant with any of the intra-prediction modes included in MPM_LIST_1, MPM_LIST_2, ..., and MPM_LIST_(K-1).

[0428] For example, in order to replace the intra prediction mode removed from MPM_LIST_K, if there is a specific intra prediction mode among the predetermined intra prediction modes that is not redundant with at least one or any of the intra prediction modes included in MPM_LIST_1, MPM_LIST_2, ..., and MPM_LIST_(K-1), the specific intra prediction mode can be added to MPM_LIST_K.

[0429] For example, when delta is continuously increased by 1 from 1 each time until the number of intra-prediction modes included in MPM_LIST_K is CK, a predetermined intra-prediction mode (MPM_LIST_K_MODE_X±delta) can be included in MPM_LIST_K. Alternatively, the predetermined intra-prediction modes can be arranged in a predetermined order, and at least one of the predetermined intra-prediction modes can be included in MPM_LIST_K in said order until the number of intra-prediction modes included in MPM_LIST_K is CK.

[0430] If N MPM lists are used to deduce the intra-prediction mode of the current block or the intra-prediction mode of the current block is entropy encoded / decoded, then for each of the N MPM lists, the indicator (MPM flag) indicating whether the intra-prediction mode of the current block is included in the intra-prediction modes of each of the N MPM lists can be entropy encoded / decoded.

[0431] For example, if N MPM lists are used, then at most N indicators can be encoded / decoded, where each indicator is used for one MPM list, such as MPM_FLAG_1, MPM_FLAG_2, ..., MPM_FLAG_N. Alternatively, at most (N-1) indicators can be encoded / decoded, in which case unencoded / decoded indicators for another MPM list can be derived based on some or all of the (N-1) indicators. For example, indicators may not be encoded / decoded for any of the N MPM lists (e.g., the last MPM list counted in a predetermined order). When the intra-prediction mode of the current block exists in the intra-prediction modes of a particular MPM list, the indicator may have a first value for that particular MPM list. When the intra-prediction mode of the current block does not exist, the indicator may have a second value. Here, the first value can be 1, and the second value can be 0. That is, the indicator can be flag information.

[0432] Additionally, if among the N indicators, the indicator for a specific MPM list has a first value, then the indicators for other MPM lists, other than the indicator for the specific MPM list, may have a second value.

[0433] Furthermore, if the indicator for the Kth MPM list among the N indicators has a first value, then the indicators for the (K+1)th MPM list to the Nth MPM list may not be entropy encoded / decoded. Here, K can be a positive integer equal to or greater than 1 and equal to or less than N.

[0434] When an intra-prediction mode identical to the intra-prediction mode of the current block exists among the intra-prediction modes included in a specific MPM list of N MPM lists, the index information (MPM index) indicating the position or number of the intra-prediction mode identical to the intra-prediction mode of the current block in the specific MPM list can be entropy-encoded. Alternatively, the intra-prediction mode identical to the intra-prediction mode of the current block among the intra-prediction modes included in the specific MPM list can be identified by entropy decoding of the index information. The index information can be entropy-encoded as a fixed-length code or a variable-length code. Furthermore, the index information can be used to deduce the intra-prediction mode of the current block.

[0435] If none of the intra-prediction modes included in the N MPM lists is the same as the intra-prediction mode of the current block, entropy coding can be performed on the remaining intra-prediction modes of the current block in the encoder. These remaining intra-prediction modes can be used to identify the intra-prediction mode of the current block that is not included in at least one of the MPM lists. Alternatively, these remaining intra-prediction modes can be used to identify the intra-prediction mode of the current block that is not included in any of the MPM lists.

[0436] If the total number of intra-prediction modes is Y, and the sum of the number of intra-prediction modes included in the N MPM lists for the current block is X, then the remaining intra-prediction modes indicating the same intra-prediction mode as the current block among the (YX) intra-prediction modes can be entropy-encoded. Here, all X intra-prediction modes included in the N MPM lists can be arranged based on at least one of the size, angle, order, and identifier of the intra-prediction modes. This arrangement can be performed in ascending or descending order. The arranged X intra-prediction modes can be compared with the intra-prediction modes of the current block. If the comparison indicates that the intra-prediction modes of the current block are greater than the arranged X intra-prediction modes, a predetermined value can be subtracted from the intra-prediction modes of the current block. The predetermined value can be 1.

[0437] Alternatively, for example, the intra-prediction mode of the current block can be compared with the mode that has the largest reference value (e.g., in terms of at least one of size, angle, order, and identifier) ​​among the X arranged intra-prediction modes. If the comparison indicates that the intra-prediction mode of the current block is greater than the mode with the largest reference value, the predetermined value can be subtracted from the intra-prediction mode of the current block.

[0438] Alternatively, for example, the subtracted intra-prediction mode of the current block can be compared with the mode that has the second largest reference value among the X intra-prediction modes arranged in order. If the comparison shows that the subtracted intra-prediction mode is greater than the mode with the second largest reference value, then the predetermined value can be further subtracted from the subtracted intra-prediction mode of the current block.

[0439] The comparison-based subtraction operation can be repeated until the mode with the smallest reference value is found among the X sorted intra-prediction modes. The final subtracted intra-prediction mode of the current block can be entropy-encoded as the remaining intra-prediction modes.

[0440] The remaining intra-prediction modes of the current block can be entropy-decoded and used to identify intra-prediction modes that are identical to the intra-prediction modes of the current block and are not included in the N MPM lists. If the total number of intra-prediction modes is Y and the sum of the number of intra-prediction modes included in the N MPM lists for the current block is X, then the remaining intra-prediction modes indicating the intra-prediction modes identical to the intra-prediction modes of the current block among (YX) intra-prediction modes can be entropy-decoded.

[0441] After the remaining intra-prediction modes are entropy-decoded, the X intra-prediction modes can be arranged based on at least one of their size, angle, order, and identifier. This arrangement can be performed in ascending or descending order. The values ​​of the entropy-decoded remaining intra-prediction modes can be compared with the values ​​of the X intra-prediction modes. If the comparison indicates that the entropy-decoded remaining intra-prediction mode is equal to or greater than the values ​​of the X intra-prediction modes, then the value of the entropy-decoded remaining intra-prediction mode can be increased by a predetermined value. The predetermined value can be 1.

[0442] Alternatively, for example, the mode with the smallest reference value (e.g., in terms of at least one of the size, angle, order, and identifier of the intra-prediction modes) among the X arranged intra-prediction modes can be compared with the remaining intra-prediction modes that have been entropied decoded. If the comparison indicates that the remaining intra-prediction modes that have been entropied decoded are equal to or greater than the value of the mode with the smallest reference value, then the predetermined value can be added to the value of the remaining intra-prediction modes that have been entropied decoded.

[0443] Additionally, the mode with the second smallest reference value among the X intra-prediction modes after arrangement can be compared with the sum of the remaining intra-prediction modes after entropy decoding. If the comparison indicates that the sum of the remaining intra-prediction modes after entropy decoding is equal to or greater than the value of the mode with the second smallest reference value, then the predetermined value can be further added to the sum of the remaining intra-prediction modes after entropy decoding.

[0444] The comparison-based addition operation can be repeated until the pattern with the largest reference value is found among the X intra-prediction patterns after permutation. The final summed remaining intra-prediction patterns can be entropy-decoded into the intra-prediction patterns of the current block.

[0445] The intra-prediction mode of the current block for which N MPM lists are used can be entropy encoded / decoded in the manner described in the following embodiments.

[0446] The following describes an example of a case where an MPM list is used for the current block.

[0447] If an intra-prediction mode identical to the intra-prediction mode of the current block exists among the intra-prediction modes included in MPM_LIST_1, the encoder can entropy-encode the indicator MPM_FLAG_1, which indicates whether an intra-prediction mode identical to the intra-prediction mode of the current block exists in MPM_LIST_1, into a first value. If MPM_FLAG_1 is the first value, the index information MPM_IDX_1 about MPM_LIST_1 can be further entropy-encoded.

[0448] If none of the intra-prediction modes included in MPM_LIST_1 are identical to the intra-prediction mode of the current block, the encoder can entropy-encode the indicator MPM_FLAG_1, which indicates whether an intra-prediction mode identical to the current block exists in MPM_LIST_1, into a second value. If MPM_FLAG_1 is the second value, the remaining intra-prediction mode REM_MODE can be further entropy-encoded.

[0449] The decoder can perform entropy decoding on the indicator MPM_FLAG_1, which indicates whether there is an intra-prediction mode in MPM_LIST_1 that is the same as the intra-prediction mode of the current block. If MPM_FLAG_1 is the first value, the decoder can deduce the intra-prediction mode of the current block by further entropy decoding on the index information MPM_IDX_1 about MPM_LIST_1.

[0450] If MPM_FLAG_1 is the second value, the decoder can deduce the intra-prediction mode of the current block by further entropy decoding of the remaining intra-prediction mode REM_MODE.

[0451] The following describes an example of a scenario where two MPM lists are used for the current block.

[0452] When an intra-prediction mode identical to the intra-prediction mode of the current block exists among the intra-prediction modes included in MPM_LIST_1 and MPM_LIST_2, the encoder may entropy encode the indicators MPM_FLAG_1 and MPM_FLAG_2 that indicate which list in MPM_LIST_1 and MPM_LIST_2 includes the intra-prediction mode identical to the intra-prediction mode of the current block. If the intra-prediction mode of the current block exists in MPM_LIST_1, then MPM_FLAG_1 can be a first value, and MPM_FLAG_2 can be a second value. In this case, the index information MPM_IDX_1 regarding MPM_LIST_1 can be further entropy encoded. Alternatively, if the intra-prediction mode of the current block exists in MPM_LIST_2, then MPM_FLAG_1 can be a second value, and MPM_FLAG_2 can be a first value. In this case, the index information MPM_IDX_2 regarding MPM_LIST_2 can be further entropy encoded.

[0453] If none of the intra-prediction modes included in MPM_LIST_1 and MPM_LIST_2 are the same as the intra-prediction mode of the current block, the encoder can entropy-encode the indicators MPM_FLAG_1 and MPM_FLAG_2, which indicate which lists in MPM_LIST_1 and MPM_LIST_2 include the same intra-prediction mode as the current block, into a second value. If MPM_FLAG_1 and MPM_FLAG_2 are the second value, the remaining intra-prediction mode REM_MODE can be further entropy-encoded.

[0454] The decoder can perform entropy decoding on the indicators MPM_FLAG_1 and MPM_FLAG_2, which indicate which of the lists in MPM_LIST_1 and MPM_LIST_2 contains the same intra-prediction mode as the current block's intra-prediction mode. If MPM_FLAG_1 is the first value and MPM_FLAG_2 is the second value, then the intra-prediction mode for the current block exists in MPM_LIST_1, and the decoder can deduce the intra-prediction mode for the current block by further entropy decoding on the index information MPM_IDX_1 about MPM_LIST_1. Alternatively, if MPM_FLAG_1 is the second value and MPM_FLAG_2 is the first value, then the intra-prediction mode for the current block exists in MPM_LIST_2, and the decoder can deduce the intra-prediction mode for the current block by further entropy decoding on the index information MPM_IDX_2 about MPM_LIST_2. Alternatively, if MPM_FLAG_1 and MPM_FLAG_2 are second values, the decoder can deduce the intra-prediction mode of the current block by performing entropy decoding on the remaining intra-prediction mode REM_MODE. Here, the case where both MPM_FLAG_1 and MPM_FLAG_2 are first values ​​will not occur.

[0455] In the following text, another embodiment will be described for the case where two MPM lists are used for the current block.

[0456] [Table 5]

[0457]

[0458] As in the example in [Table 5], the encoder can entropy-encode the intra prediction mode of the current block by sequentially checking whether there is an intra prediction mode that is the same as the intra prediction mode of the current block among the intra prediction modes included in each of the multiple orders in which multiple MPM lists are made.

[0459] For example, if an intra-prediction mode identical to the intra-prediction mode of the current block exists in MPM_LIST_1, then MPM_FLAG_1 can be entropy-encoded as the first value. Here, the index information MPM_IDX_1 regarding MPM_LIST_1 can be further entropy-encoded.

[0460] For example, if no intra-prediction mode identical to the current block's intra-prediction mode exists in MPM_LIST_1, MPM_FLAG_1 can be entropy-encoded as a second value. Here, if an intra-prediction mode identical to the current block exists in MPM_LIST_2 (when MPM_FLAG_1 is the second value), MPM_FLAG_2 can be entropy-encoded as a first value. Here, the index information MPM_IDX_2 regarding MPM_LIST_2 can be further entropy-encoded.

[0461] For example, if no intra-prediction mode in MPM_LIST_1 and MPM_LIST_2 is the same as the intra-prediction mode of the current block, MPM_FLAG_1 and MPM_FLAG_2 can be entropy-encoded into a second value. Here (if MPM_FLAG_1 and MPM_FLAG_2 are second values), the remaining intra-prediction mode REM_MODE can be further entropy-encoded.

[0462] As in the example in [Table 5], the decoder may sequentially entropy decode the indicators MPM_FLAG_1 and / or MPM_FLAG_2, which indicate which list in MPM_LIST_1 and MPM_LIST_2 includes the same intra-prediction mode as the current block, in at least one of the multiple orders in which multiple MPM lists are made.

[0463] For example, if MPM_FLAG_1 is entropy-decoded to the first value, then the intra-prediction mode of the current block exists in MPM_LIST_1, and the intra-prediction mode of the current block can be deduced by further entropy decoding of the index information MPM_IDX_1 about MPM_LIST_1.

[0464] For example, if MPM_FLAG_1 is entropy-decoded to a second value, then MPM_FLAG_2 can be entropy-decoded. If the decoded MPM_FLAG_2 is a first value, then the intra-prediction mode of the current block exists in MPM_LIST_2, and the intra-prediction mode of the current block can be derived by further entropy decoding of the index information MPM_IDX_2 about MPM_LIST_2.

[0465] For example, if MPM_FLAG_1 and MPM_FLAG_2 are entropy-decoded to the second value, the intra-prediction mode of the current block can be derived by further entropy decoding of the remaining intra-prediction mode REM_MODE. Here, the steps of determining whether MPM_FLAG_1 and MPM_FLAG_2 are the first or second value can be performed sequentially.

[0466] An example will now be described for the case where N MPM lists are used for the current block.

[0467] When an intra-prediction mode identical to the intra-prediction mode of the current block exists among the intra-prediction modes included in MPM_LIST_1, MPM_LIST_2, ..., and MPM_LIST_N, the encoder may entropy encode the indicators MPM_FLAG_1, MPM_FLAG_2, ..., and MPM_FLAG_N that indicate which of the lists in MPM_LIST_1, MPM_LIST_2, ..., and MPM_LIST_N includes the intra-prediction mode identical to the intra-prediction mode of the current block. If the intra-prediction mode of the current block exists in MPM_LIST_1, then MPM_FLAG_1 can be a first value, and MPM_FLAG_2, ..., and MPM_FLAG_N, other than MPM_FLAG_1, can be a second value. In this case, the index information MPM_IDX_1 regarding MPM_LIST_1 may be further entropy encoded.

[0468] Alternatively, if an intra-prediction mode for the current block exists in MPM_LIST_2, then MPM_FLAG_2 can be the first value, and MPM_FLAG_1, ..., MPM_FLAG_N, in addition to MPM_FLAG_2, can be the second value. In this case, the index information MPM_IDX_2 regarding MPM_LIST_2 can be further entropy encoded.

[0469] Alternatively, if an intra-prediction mode for the current block exists in MPM_LIST_N, then MPM_FLAG_N can be the first value, and MPM_FLAG_1, ..., and MPM_FLAG_(N-1) can be the second value, in addition to MPM_FLAG_N. In this case, the index information MPM_IDX_N regarding MPM_LIST_N can be further entropy encoded.

[0470] If none of the intra-prediction modes included in MPM_LIST_1, MPM_LIST_2, ..., MPM_LIST_N are the same as the intra-prediction mode of the current block, the encoder may entropy encode MPM_FLAG_1, MPM_FLAG_2, ..., MPM_FLAG_N, which indicates which of the lists in MPM_LIST_1, MPM_LIST_2, ..., MPM_LIST_N includes the same intra-prediction mode as the current block, into a second value. If MPM_FLAG_1, MPM_FLAG_2, ..., MPM_FLAG_N are the second value, then the remaining intra-prediction modes REM_MODE may be further entropy encoded.

[0471] The decoder can perform entropy decoding on the indicators MPM_FLAG_1, MPM_FLAG_2, ..., MPM_FLAG_N that indicate which of the lists MPM_LIST_1, MPM_LIST_2, ..., MPM_LIST_N contains the same intra-prediction mode as the current block's intra-prediction mode. If MPM_FLAG_1 is the first value and MPM_FLAG_2, ..., MPM_FLAG_N (other than MPM_FLAG_1) is the second value, then the current block's intra-prediction mode may exist in MPM_LIST_1. In this case, the current block's intra-prediction mode can be deduced by further entropy decoding of the index information MPM_IDX_1 regarding MPM_LIST_1.

[0472] Alternatively, if MPM_FLAG_2 is the first value and MPM_FLAG_1, ..., MPM_FLAG_N, in addition to MPM_FLAG_2, are the second values, then the intra-prediction mode of the current block may exist in MPM_LIST_2. In this case, the intra-prediction mode of the current block can be derived by further entropy decoding of the index information MPM_IDX_2 regarding MPM_LIST_2.

[0473] Alternatively, if MPM_FLAG_N is the first value and MPM_FLAG_1, ..., and MPM_FLAG_(N-1) are the second values ​​(excluding MPM_FLAG_N), then the intra-prediction mode for the current block may exist in MPM_LIST_N. In this case, the intra-prediction mode for the current block can be derived by further entropy decoding of the index information MPM_IDX_N regarding MPM_LIST_N.

[0474] Alternatively, if MPM_FLAG_1, MPM_FLAG_2, ..., and MPM_FLAG_N are second values, the intra-prediction mode of the current block can be derived by further entropy decoding of the remaining intra-prediction modes REM_MODE. Here, the case where all of MPM_FLAG_1, MPM_FLAG_2, ..., and MPM_FLAG_N are first values ​​will not occur.

[0475] Now, another embodiment will be described for the case where N MPM lists are used for the current block.

[0476] [Table 6]

[0477]

[0478] As in the example in [Table 6], the encoder can entropy-encode the intra prediction mode of the current block by sequentially checking whether there is an intra prediction mode that is the same as the intra prediction mode of the current block among the intra prediction modes included in each of the multiple orders in which multiple MPM lists are made.

[0479] For example, if an intra-prediction mode identical to the intra-prediction mode of the current block exists in MPM_LIST_1, then MPM_FLAG_1 can be entropy-encoded as the first value. Here, the index information MPM_IDX_1 regarding MPM_LIST_1 can be further entropy-encoded.

[0480] For example, if no intra-prediction mode identical to the current block's intra-prediction mode exists in MPM_LIST_1, MPM_FLAG_1 can be entropy-encoded as a second value. Here, if an intra-prediction mode identical to the current block exists in MPM_LIST_2 (when MPM_FLAG_1 is the second value), MPM_FLAG_2 can be entropy-encoded as a first value. Furthermore, the index information MPM_IDX_2 regarding MPM_LIST_2 can be further entropy-encoded.

[0481] For example, if no intra-prediction mode identical to the intra-prediction mode of the current block exists in MPM_LIST_1, MPM_LIST_2, ..., MPM_LIST_(N-1), MPM_FLAG_1, MPM_FLAG_2, ..., MPM_FLAG_(N-1) can be entropy-encoded into a second value. Here, if an intra-prediction mode identical to the intra-prediction mode of the current block exists in MPM_LIST_N (if MPM_FLAG_1, MPM_FLAG_2, ..., MPM_FLAG_(N-1) are second values), then the index information MPM_IDX_N regarding MPM_LIST_N can be further entropy-encoded.

[0482] For example, if no intra-prediction mode in MPM_LIST_1, MPM_LIST_2, ..., MPM_LIST_N is the same as the intra-prediction mode of the current block, MPM_FLAG_1, MPM_FLAG_2, ..., MPM_FLAG_N can be entropy-encoded into a second value. Here, the remaining intra-prediction modes REM_MODE can be further entropy-encoded.

[0483] As in the example in [Table 6], the decoder may sequentially perform entropy decoding on at least one of the indicators MPM_FLAG_1, MPM_FLAG_2, ..., MPM_FLAG_N that indicate which list in MPM_LIST_1, MPM_LIST_2, ..., MPM_LIST_N contains the same intra-prediction mode as the current block's intra-prediction mode, in at least one of the multiple orders in which multiple MPM lists are made.

[0484] For example, if MPM_FLAG_1 is entropy-decoded to the first value, then the intra-prediction mode of the current block exists in MPM_LIST_1, and the intra-prediction mode of the current block can be deduced by further entropy decoding of the index information MPM_IDX_1 about MPM_LIST_1.

[0485] For example, if MPM_FLAG_1 is entropy-decoded to a second value, then MPM_FLAG_2 can be entropy-decoded. If the decoded MPM_FLAG_2 is a first value, then the intra-prediction mode of the current block exists in MPM_LIST_2, and the intra-prediction mode of the current block can be derived by further entropy decoding of the index information MPM_IDX_2 about MPM_LIST_2.

[0486] For example, if MPM_FLAG_1, MPM_FLAG_2, ..., MPM_FLAG_(N-1) are entropy-decoded to the second value, then MPM_FLAG_N can be entropy-decoded. If the decoded MPM_FLAG_N is the first value, then the intra-prediction mode of the current block exists in MPM_LIST_N, and the intra-prediction mode of the current block can be derived by further entropy decoding of the index information MPM_IDX_N about MPM_LIST_N.

[0487] For example, if MPM_FLAG_1, MPM_FLAG_2, ..., MPM_FLAG_N are entropy-decoded to the second value, the intra-prediction mode of the current block can be derived by further entropy decoding of the remaining intra-prediction modes REM_MODE. Here, the steps of determining whether MPM_FLAG_1, MPM_FLAG_2, ..., MPM_FLAG_N is the first or the second value can be performed sequentially.

[0488] Flags specifying an MPM list (such as MPM_FLAG_N) or indices indicating one of multiple MPM lists can be encoded / decoded. Information indicating whether an MPM-based intra-prediction derivation method will be used for the current block (or current stripe, current frame, current sequence, etc.) can be encoded / decoded. If the information indicates that an MPM-based intra-prediction derivation method is used, the index can be encoded / decoded. At least one of the number or type of multiple MPM lists can be fixedly predefined in the encoder / decoder, or at least one of the number or type of multiple MPM lists can be variably determined based on parameters related to the size, depth, shape, position, etc. of the current block / neighboring block. For example, the number of MPM lists predefined in the encoder / decoder can be 1, 2, 3, or greater. The maximum number of intra-prediction modes included in each MPM list can be forced to be equal. The maximum number can be fixedly pre-set in the encoder / decoder, or the maximum number can be transmitted by signaling in predetermined units (e.g., sequence, frame, stripe, block, etc.). If the number of intra-prediction modes included in a specific MPM list is less than the maximum number, a predetermined mode can be added to the specific MPM list. The added mode can be a preset default mode or an intra-prediction mode included in another MPM list. It is worth noting that modes different from the intra-prediction modes included in the specific MPM list can be added. Redundancy checks between MPM lists can be omitted. One MPM list may share at least one identical intra-prediction mode with another MPM list.

[0489] Now, another embodiment will be described for the case where N MPM lists are used for the current block.

[0490] The encoder can generate multiple MPM lists ranging from MPM_LIST_1 to MPM_LIST_N in at least one of multiple orders for generating multiple MPM lists. The total number of candidate intra-frame prediction modes in the N MPM lists can be K. N and K can be positive integers.

[0491] For example, MPM_LIST_combined can consist of K or fewer candidate intra-prediction modes from N candidate intra-prediction modes in an MPM list.

[0492] For example, if an intra-prediction mode identical to the intra-prediction mode of the current block exists in MPM_LIST_combined, then the indicator MPM_FLAG_combined, which indicates whether an intra-prediction mode identical to the intra-prediction mode of the current block exists in MPM_LIST_combined, can be entropy-encoded into a first value. Here, the index information MPM_IDX_combined regarding MPM_LIST_combined can also be entropy-encoded.

[0493] If no intra-prediction mode matching the current block's intra-prediction mode exists in MPM_LIST_combined, MPM_FLAG_combined can be entropy-encoded to a second value. If MPM_FLAG_combined is a second value, then the remaining intra-prediction modes REM_MODE can be entropy-encoded separately.

[0494] The decoder can perform entropy decoding on the indicator MPM_FLAG_combined, which indicates whether there is an intra-prediction mode in MPM_LIST_combined that is the same as the intra-prediction mode of the current block. If MPM_FLAG_combined is the first value, the intra-prediction mode of the current block can be inferred by further entropy decoding of the index information MPM_IDX_combined. If MPM_FLAG_combined is the second value, the intra-prediction mode of the current block can be inferred by additional entropy decoding of the remaining intra-prediction modes REM_MODE.

[0495] According to the present invention, the intra-prediction mode of the current block can be derived by encoding / decoding. Here, the intra-prediction mode of the current block can be entropy encoded / decoded without using the intra-prediction modes of neighboring blocks.

[0496] According to the present invention, intra-prediction modes of different color components can be used to derive the intra-prediction mode of the current block. For example, if the current block is a chroma block, the intra-prediction modes of one or more corresponding luma blocks corresponding to the target chroma block can be used to derive the intra-prediction mode of the current block. The corresponding luma block can be determined based on at least one of the size, shape, or coding parameters of the chroma block. Alternatively, the corresponding luma block can be determined based on at least one of the size, shape, or coding parameters of the luma block.

[0497] Figure 15 This is an exemplary diagram showing a luminance block and a chrominance block with a color component composition ratio of 4:2:0.

[0498] exist Figure 15In the example shown, the corresponding luminance block corresponding to the chroma block can be at least one of block A, block B, block C, and block D.

[0499] For example, the intra-prediction mode of luma block A corresponding to the sample point position (0,0) of the chroma block can be derived as the intra-prediction mode of the chroma block.

[0500] For example, the inter-frame prediction mode of the luma block D corresponding to the sample point position (nS / 2, nS / 2) at the center of the chroma block can be derived as the intra-frame prediction mode of the chroma block.

[0501] For example, the intra-prediction mode of a chroma block can be derived using a combination of intra-prediction modes of one or more blocks within a luma block corresponding to the size of the chroma block. For instance, the mode corresponding to the average of the intra-prediction modes of luma block A corresponding to sample location (0,0) and luma block D corresponding to sample location (nS / 2,nS / 2) can be derived as the intra-prediction mode of the chroma block. Alternatively, the mode corresponding to the average of the intra-prediction modes of blocks A, B, C, and D within a luma block corresponding to the size of the chroma block can be derived as the intra-prediction mode of the chroma block. One or more statistical values, including maximum, minimum, most frequent, median, and weighted average, can be used instead of the average.

[0502] For example, the intra-prediction mode of a chroma block can be derived based on at least one of the size, shape, or depth of the luma block. For instance, the size of luma block A corresponding to the sample position (0,0) of the chroma block can be compared with the size of luma block D corresponding to the sample position (nS / 2,nS / 2) of the chroma block, and the intra-prediction mode of the luma block D with the relatively larger size can be derived as the intra-prediction mode of the chroma block. Alternatively, if the size of the luma block corresponding to a predetermined position of the chroma block is equal to or greater than the size of the chroma block, the intra-prediction mode of the chroma block can be derived using the intra-prediction mode of the luma block.

[0503] For example, the intra-prediction mode of a chroma block can be derived based on at least one of its size, shape, or depth. For instance, if the size of the chroma block falls within a predetermined range, the intra-prediction mode of the luma block corresponding to the sample position (0,0) of the chroma block can be derived as the intra-prediction mode of the chroma block. Alternatively, if the size of the chroma block falls within a predetermined range, the size of the luma block corresponding to the sample position (0,0) of the chroma block and the size of the luma block corresponding to the sample position (nS / 2,nS / 2) of the chroma block can be compared, and the intra-prediction mode of the luma block with the larger size can be derived as the intra-prediction mode of the chroma block. Alternatively, if the chroma block is shaped like a rectangle, the intra-prediction mode of the luma block corresponding to the center position of the chroma block can be derived as the intra-prediction mode of the chroma block.

[0504] For example, if the current block is divided into lower-level blocks or sub-blocks, at least one of the above-described methods for deriving the intra-prediction mode of the current block can be used to derive the intra-prediction mode of each sub-block.

[0505] The size of the current block and the size of the sub-block can be M×N. M and N can be the same positive integer or different positive integers. For example, the size of the current block or sub-block can be at least one of CTU, CU, SU (signaling unit), QTMax, QTMin, BTMax, BTMin, 4×4, 8×8, 16×16, 32×32, 64×64, 128×128, 256×256, 4×8, 8×16, 16×8, 32×64, 32×8, and 4×32. Here, QTMax and QTMin can represent the maximum and minimum sizes allowed to be partitioned into quadtrees, respectively, and BTMax and BTMin can represent the maximum and minimum sizes allowed to be partitioned into binary trees, respectively. In the following text, the size of the sub-block can represent the partitioning structure of the sub-block.

[0506] The size of a sub-block can vary depending on the size of the current block. For example, 1 / N of the vertical and horizontal dimensions of the current block can be the sub-block size. N can be a positive integer and can be at least one of 2, 4, 8, 16, 32, and 64. For example, if the current block size is 32×32 and N in 1 / N of the current block's horizontal and vertical dimensions is 4, then the sub-block size can be 8×8.

[0507] Alternatively, the sub-block size can be a predetermined fixed size, regardless of the size of the current block. For example, the sub-block size can be a minimum size, regardless of the size of the current block, and the sub-block size can be, for example, 4×4.

[0508] Alternatively, the size of the sub-blocks can be determined based on the partitioning structure of the current block's neighboring blocks. For example, if nearby neighboring blocks are partitioned, the size of the sub-blocks can be determined by partitioning the current block.

[0509] The sub-block size can be determined based on the intra-prediction modes of the current block's neighboring blocks. For example, the sub-block size can be determined by dividing the block into sub-blocks based on a boundary where the intra-prediction modes of neighboring blocks differ according to the boundary.

[0510] The sub-block size can be determined based on the coding parameters of neighboring blocks. For example, the sub-block size can be determined by dividing a block into sub-blocks based on whether the neighboring blocks are intra-coded blocks or inter-coded blocks.

[0511] At least one of the following can be fixed to a predetermined value: the current block size, the sub-block size, and the N that the current block is divided into N equal parts.

[0512] For example, if the predetermined fixed size for the current block is 16×16, the current block can be divided into sub-blocks if the size of the current block is 16×16, and the intra-prediction mode for each sub-block can be derived.

[0513] For example, if the predetermined fixed size for the current block is CTU and N is 4, the intra-prediction mode can be derived based on sub-blocks if the size of the current block is CTU, where each sub-block is generated by dividing the height and width of the CTU by 4.

[0514] One or more sub-blocks can be further divided into smaller blocks. For example, if the current block size is 32×32 and the sub-block size is 16×16, then each of the one or more sub-blocks can be divided into smaller blocks of sizes such as 8×8, 4×4, 16×8, 4×16, etc.

[0515] At least one of the following can be encoded / decoded: the current block size, the sub-block size, and the N that the current block is divided into N equal parts.

[0516] The sub-block partitioning structure used for the current block can be encoded / decoded. The size and / or shape of the sub-blocks into which the current block is divided can vary. Furthermore, intra-prediction modes can be derived for each sub-block.

[0517] Indicators (e.g., flags) that indicate the use of neighboring blocks' intra-prediction modes to derive the current block's intra-prediction mode can be encoded / decoded. For example, the indicator could be NDIP_flag (Nearest Neighbor Mode Non-Independent Intra-Prediction). The indicator can be encoded / decoded for the current block or at least one of each sub-block. The indicator can be encoded / decoded only if the current block size or sub-block size corresponds to a predetermined size or a predetermined size range. The predetermined size could be, for example, 64×64 or BTMax. As described above, the current block can be divided into multiple sub-blocks. The sub-block partitioning structure can be predefined or encoded / decoded.

[0518] If NDIP_flag is 1 for the current block, the intra prediction mode of the current block or the intra prediction mode of each sub-block of the current block can be derived using the intra prediction modes of neighboring blocks. In this case, at least one of the prev_intra_luma_pred_flag, mpm_idx, rem_intra_luma_pred_mode, intra_chroma_pred_mode, split_flag, QB_flag, quadtree_flag, binarytree_flag, and Btype_flag used for the current block and / or sub-blocks may not be encoded / decoded.

[0519] For example, if NDIP_flag is 1 for the current block, the intra-prediction mode of the current block can be decoded, and then the decoded intra-prediction mode and the intra-prediction modes of neighboring blocks can be used to derive the intra-prediction mode of each sub-block. In this case, at least one of the following flags used for sub-blocks—prev_intra_luma_pred_flag, mpm_idx, rem_intra_luma_pred_mode, intra_chroma_pred_mode, split_flag, QB_flag, quadtree_flag, binarytree_flag, and Btype_flag—can be omitted from encoding / decoding.

[0520] If NDIP_flag is 0 for the current block, then information related to at least one of the intra-prediction mode of the current block or sub-block or the partitioning information of the sub-block can be encoded / decoded.

[0521] Among the multiple sub-blocks of the current block, the intra-prediction mode of the first sub-block can be derived in a different manner than that of the other sub-blocks. The first sub-block can be one of the multiple sub-blocks in the current block. For example, the first sub-block can be the first sub-block in a zigzag scan order.

[0522] The intra-prediction mode of the first sub-block can refer to the initial mode. For example, if the intra-prediction mode of each sub-block is derived as the average of the intra-prediction modes of the blocks to the left and above each sub-block, the initial mode can be derived in different ways. The different methods for deriving the initial mode can be at least one of a variety of methods for deriving intra-prediction modes according to the present invention.

[0523] For example, the Nth (e.g., the first) mode listed in the MPM list can be derived as the initial mode. Alternatively, the most frequent intra-prediction mode among one or more neighboring blocks of the current block can be derived as the initial mode. Alternatively, the intra-prediction mode encoded / decoded for the current block can be derived as the initial mode. Alternatively, the intra-prediction mode encoded / decoded for the first sub-block can be derived as the initial mode.

[0524] Regarding the derivation of intra-prediction modes for sub-blocks in the current block, intra-prediction modes for one or more sub-blocks can be derived in any order. This arbitrary order can be a scan order, and the scan can correspond to at least one of raster scan, top-right scan, vertical scan, horizontal scan, diagonal scan, and zigzag scan. The number of sub-blocks whose intra-prediction modes are derived according to this scan order can be one or more. This arbitrary order can be adaptively determined based on the intra-prediction modes of neighboring blocks.

[0525] Figure 16 This is a diagram illustrating an embodiment of deriving the intra-prediction mode of each sub-block in one or more sub-blocks into which the current block is divided.

[0526] First, it can be determined whether the size of the current block corresponds to a predetermined size (S1610). The predetermined size can be determined based on the horizontal or vertical length of the current block. For example, in step S1610, the determination operation can be performed based on whether the horizontal or vertical length of the current block is a divisible length for dividing it into sub-blocks.

[0527] For example, if the current block is a square with the same horizontal and vertical lengths, the size of the current block can correspond to the predetermined size if the length obtained by dividing each of the horizontal and vertical lengths by N is equal to or greater than any arbitrary length. For example, if N is 4 and the arbitrary length is 4, the size of the current block can correspond to the predetermined size if it is one of 256×256, 128×128, 64×64, 32×32, and 16×16.

[0528] For example, if the current block is a rectangle with different horizontal and vertical lengths, the size of the current block can correspond to the predetermined size if the smaller of the length obtained by dividing the larger of the horizontal and vertical lengths by M is equal to or greater than any length, and the smaller of the length obtained by dividing the smaller of the horizontal and vertical lengths by N is also equal to or greater than any given length. For example, if M is 4, N is 2, and the given given length is 4, the size of the current block can correspond to the predetermined size if it is one of the following: 128×64, 64×128, 128×32, 32×128, 128×16, 16×128, 128×8, 8×128, 64×32, 32×64, 64×16, 16×64, 64×8, 8×64, 32×16, 16×32, 32×8, 8×32, 16×8, and 8×16.

[0529] For example, if the current block has not been further divided, the size of the current block can correspond to the predetermined size. For example, if the partitioning information, quadtree partitioning information, and / or binary tree partitioning information for the current block is 0 (indicating that the current block has not been divided), and the horizontal or vertical length of the current block is greater than the minimum length, then the size of the current block can correspond to the predetermined size. Here, the minimum length can be 4.

[0530] If the size of the current block does not correspond to the predetermined size (no in S1610), at least one of the current block's partitioning information, the current block's intra-prediction mode, or the sub-block's intra-prediction mode can be decoded (S1660). If the current block is not partitioned, the current block's intra-prediction mode can be decoded. If the current block is partitioned into sub-blocks, the intra-prediction mode of each sub-block can be decoded.

[0531] If the size of the current block corresponds to the predetermined size (yes in S1610), then the NDIP_flag can be decoded (S1620). In the next step, the value of the decoded NDIP_flag can be checked (S1630).

[0532] If NDIP_flag is 0 (no in S1630), then at least one of the partition information of the current block, the intra-prediction mode of the current block, and the intra-prediction mode of the sub-block can be decoded (S1660).

[0533] If NDIP_flag is 1 (yes in S1630), the current block can be divided into sub-blocks (S1640). Here, the division can be performed such that each sub-block has a predetermined size and / or shape. Alternatively, the division can be performed based on the decoded division information.

[0534] In the next step, the intra-prediction mode of the sub-blocks generated by dividing the current block can be derived (S1650). The intra-prediction mode of the block can be derived based on the intra-prediction modes of neighboring blocks. Alternatively, the intra-prediction mode of the current block can be decoded and used.

[0535] Intra-prediction can be performed using an intra-prediction mode derived for the current block or sub-block (S1670).

[0536] Figure 17 This is a diagram depicting an embodiment of dividing the current block into sub-blocks.

[0537] The order in which the intra-prediction modes of multiple sub-blocks in the current block are derived can be based on the raster scan order of the current block. Alternatively, the order can be based on the raster scan order of a predetermined block size. For example, the intra-prediction modes of the sub-blocks can be derived in the order C1, C2, C3, ..., C16. Alternatively, the intra-prediction modes of the sub-blocks can be derived in the order C1, C2, C5, C6, C3, C4, ..., C12, C15, C16. Alternatively, the intra-prediction modes of each sub-block can be derived in parallel. The intra-prediction modes of each sub-block can be derived using at least one of several methods for deriving the intra-prediction modes of the current block.

[0538] For example, if the current block is divided into sub-blocks and the intra-prediction mode for each sub-block is derived, the intra-prediction mode of the neighboring blocks can be used.

[0539] For example, the statistics of the intra-prediction modes of the blocks to the left and above the sample point at position (0,0) of each sub-block can be derived as the intra-prediction mode of said sub-block. For example, if the statistics are average values, they can be derived using [Equation 4] below. Figure 17 The intra-prediction mode for each sub-block is shown in the figure.

[0540] [Equation 4]

[0541] C1 = (j + d + 1) >> 1,

[0542] C2 = (C1 + e + 1) >> 1,

[0543] C3 = (C2 + g + 1) >> 1,

[0544] C4 = (C3 + g + 1) >> 1,

[0545] C5 = (j + C1 + 1) >> 1,

[0546] C6 = (C5 + C2 + 1) >> 1,

[0547] C7 = (C6 + C3 + 1) >> 1,

[0548] C8 = (C7 + C4 + 1) >> 1

[0549] C9 = (k + C5 + 1) >> 1,

[0550] C10 = (C9 + C6 + 1) >> 1,

[0551] C11 = (C10 + C7 + 1) >> 1,

[0552] C12 = (C11 + C8 + 1) >> 1,

[0553] C13 = (1 + C9 + 1) >> 1,

[0554] C14 = (C13 + C10 + 1) >> 1,

[0555] C15 = (C14 + C11 + 1) >> 1,

[0556] C16 = (C15 + C12 + 1) >> 1.

[0557] Alternatively, the sizes of the blocks to the left and above each sub-block can be compared, and the intra-prediction mode of the block with the larger size can be derived as the intra-prediction mode of each sub-block. If two blocks have the same size, the average of the intra-prediction modes of the blocks to the left and above can be derived as the intra-prediction mode of each sub-block.

[0558] Alternatively, the sizes of the intra-prediction modes of the blocks to the left and above the sample point at position (0,0) of each sub-block can be compared with each other, and the intra-prediction mode with the smaller value can be derived as the intra-prediction mode of said sub-block. If the values ​​of the two modes are equal, one of the two modes can be derived as the intra-prediction mode of said sub-block.

[0559] Alternatively, the intra-prediction mode of each sub-block can be derived using the intra-prediction modes of the current block's neighboring blocks. Here, the intra-prediction modes of one or more neighboring blocks to the left and / or above the sample location (0,0) of each sub-block can be used. For example, this can be derived using [Equation 5] below. Figure 17 The intra-prediction mode for each sub-block is shown in the figure.

[0560] [Equation 5]

[0561] C1 = (j + d + 1) >> 1,

[0562] C2 = e,

[0563] C3 = g,

[0564] C4 = g,

[0565] C5 = j,

[0566] C6 = (j + e + 1) >> 1,

[0567] C7 = g,

[0568] C8 = g,

[0569] C9 = k,

[0570] C10 = k,

[0571] C11 = (k + g + 1) >> 1,

[0572] C12 = g,

[0573] C13 = l,

[0574] C14 = l,

[0575] C15 = l,

[0576] C16 = (l + g + 1) >> 1.

[0577] Alternatively, if the intra prediction modes of all neighboring blocks of the current block are non-directional modes, the intra prediction mode of the sub-block can be deduced to be at least one of the non-directional modes (e.g., DC mode and planar mode).

[0578] Figure 18 This is a diagram depicting another embodiment of dividing the current block into sub-blocks.

[0579] like Figure 18 As shown, the size and / or shape of the sub-blocks in the current block can vary. The partitioning structure and / or size of the current block and / or sub-blocks can be determined by encoding / decoding. The intra-prediction mode of each sub-block can be derived using at least one of the aforementioned methods for deriving the intra-prediction mode of the current block or sub-block.

[0580] For example, the statistics of the intra-prediction modes of the blocks to the left and above the sample point at position (0,0) of each sub-block can be derived as the intra-prediction mode of said sub-block. For example, if the statistics are average values, they can be derived using [Equation 6] below. Figure 18 The intra-prediction mode of the sub-block is shown in the figure.

[0581] [Equation 6]

[0582] C1 = (j + d + 1) >> 1,

[0583] C2 = (C1 + e + 1) >> 1,

[0584] C3 = (C2 + g + 1) >> 1,

[0585] C4 = (k + C1 + 1) >> 1,

[0586] C5 = (C4 + C2 + 1) >> 1,

[0587] C6 = (1 + C4 + 1) >> 1,

[0588] C7 = (C6 + C5 + 1) >> 1,

[0589] C8 = (C5 + C3 + 1) >> 1

[0590] C9 = (C8 + C3 + 1) >> 1,

[0591] C10 = (C7 + C8 + 1) >> 1.

[0592] Alternatively, the statistics of the intra-prediction modes of one or more neighboring blocks adjacent to each sub-block can be derived as the intra-prediction mode of each sub-block. For example, if the statistics are average values, they can be derived by the following equation [7]. Figure 18 The intra-prediction mode for each sub-block is shown in the figure.

[0593] [Equation 7]

[0594] C1 = (b + j + d) / 3,

[0595] C2 = (C1 + d + e) ​​ / 3,

[0596] C3 = (C2 + e + g) / 3,

[0597] C4 = (k + j + C1) / 3,

[0598] C5 = (C4 + C2 + C1) / 3

[0599] C6 = (l + C4 + k) / 3,

[0600] C7 = (C6 + C5 + C4) / 3

[0601] C8 = (C5 + C3 + C2) / 3

[0602] C9 = (C8 + C3) / 2,

[0603] C10 = (C5 + C8 + C9 + C7) / 4.

[0604] Alternatively, if the intra prediction modes of all neighboring blocks of the current block are non-directional modes, the intra prediction mode of the sub-block can be deduced to be at least one of the non-directional modes (e.g., DC mode and planar mode).

[0605] When the current block is divided into sub-blocks and the intra-prediction mode for each sub-block is derived, the intra-prediction mode of the current block can be derived via the MPM. Then, the derived intra-prediction mode of the current block and the intra-prediction modes of neighboring blocks can be used to derive the intra-prediction mode of each sub-block. Here, at least one of the intra-prediction mode of the current block derived via the MPM and the intra-prediction modes of neighboring blocks can be used, and the intra-prediction mode of the sub-block can be derived using at least one of several methods for deriving the intra-prediction mode of the current block. If the intra-prediction mode of the current block derived via the MPM is Pred_mpm, the intra-prediction mode of the sub-block can be derived as follows.

[0606] For example, the average value of the intra-prediction modes of the blocks to the left and above the sample point at position (0,0) of each sub-block can be compared with Pred_mpm. If the average value is greater than Pred_mpm, Pred_mpm+1 can be derived as the intra-prediction mode of each sub-block; if the average value is less than Pred_mpm, Pred_mpm-1 can be derived as the intra-prediction mode of each sub-block. Alternatively, the average value of the intra-prediction modes of the blocks to the left and above the sample point at position (0,0) of each sub-block, along with Pred_mpm, can be derived as the intra-prediction mode of each sub-block. Alternatively, the intra-prediction mode of the sub-block can be derived by comparing the intra-prediction modes of the blocks to the left and above the sample point at position (0,0) of each sub-block with Pred_mpm and adjusting Pred_mpm. Here, at least one of the statistical values ​​described above can be used instead of the average value.

[0607] Figure 19 This is a diagram depicting another embodiment of dividing the current block into sub-blocks.

[0608] exist Figure 19 In the diagram, the number marked on each block indicates the intra-prediction mode number of the block. Additionally, Cx represents the x-th sub-block of the current block (x is 1, ..., 16). Furthermore, the arrow indicates the direction or angle of the intra-prediction mode of the block.

[0609] For example, the statistics of the intra-prediction modes of the blocks to the left and above the sample point at position (0,0) of each sub-block can be derived as the intra-prediction mode of said sub-block. The statistics can be, for example, an average value. Alternatively, if at least one of the intra-prediction modes of neighboring blocks is a non-directional mode, the intra-prediction mode of the sub-block can be derived as a directional mode among the intra-prediction modes of neighboring blocks. Non-directional modes can include, for example, a planar mode (mode number 0) and a DC mode (mode number 1). For example, it can be derived by the following equation [8]. Figure 19The intra-prediction mode for each sub-block is shown in the figure.

[0610] [Equation 8]

[0611] C1 = (30 + 50 + 1) >> 1 = 40

[0612] C2 = (40 + 50 + 1) >> 1 = 45

[0613] C3 = 45

[0614] C4 = (45 + 58 + 1) >> 1 = 52

[0615] C5 = (18 + 40 + 1) >> 1 = 29

[0616] C6=(29+45+1)>>1=37

[0617] C7=(37+45+1)>>1=41

[0618] C8 = (41 + 52 + 1) >> 1 = 47

[0619] C9 = (16 + 29 + 1) >> 1 = 23

[0620] C10 = (23 + 37 + 1) >> 1 = 30

[0621] C11=(30+41+1)>>1=36

[0622] C12=(36+47+1)>>1=42

[0623] C13 = 23

[0624] C14 = (23 + 30 + 1) >> 1 = 27

[0625] C15=(27+36+1)>>1=32

[0626] C16=(32+42+1)>>1=37

[0627] Figure 20 This is a diagram depicting another embodiment of dividing the current block into sub-blocks.

[0628] exist Figure 20 In the diagram, the number marked on each sub-block indicates the intra-prediction mode number of the block. Additionally, Cx represents the x-th sub-block of the current block (x is 1, ..., 14). Furthermore, the arrow indicates the direction or angle used for intra-prediction of the block.

[0629] In reference Figure 20In the described embodiments, at least one of the intra-prediction mode of the current block and the sub-block partitioning information can be derived by decoding. The intra-prediction mode of each sub-block in the current block can be derived using the derived intra-prediction mode of the current block and the average of the intra-prediction modes of the blocks to the left and above the sample point at position (0,0) of each sub-block. For example, if the derived intra-prediction mode of the current block is greater than the average, half of the average can be subtracted from the derived intra-prediction mode of the current block. If the derived intra-prediction mode of the current block is equal to or less than the average, half of the average can be added to the derived intra-prediction mode of the current block. Here, at least one of the statistical values ​​described above can be used instead of the average.

[0630] Alternatively, if at least one of the intra prediction modes of neighboring blocks is a non-directional mode, the intra prediction mode of the sub-block can be derived as a directional mode among the intra prediction modes of neighboring blocks. Non-directional modes may include, for example, a planar mode (mode number 0) and a DC mode (mode number 1). For example, if the derived intra prediction mode of the current block is 52, it can be derived using [Equation 9] below. Figure 20 The intra-prediction mode for each sub-block is shown in the figure.

[0631] [Equation 9]

[0632] C1:abs(52-((30+50+1)>>1)+1)>>1=6,C1=52-6=46

[0633] C2:abs(52-((46+50+1)>>1)+1)>>1=2,C2=52-2=50

[0634] C3: abs(52-((50+64+1)>>1)+1)>>1=3, C3=52+3=55

[0635] C4: abs(52-((18+46+1)>>1)+1)>>1=10, C4=52-10=42

[0636] C5:abs(52-((42+50+1)>>1)+1)>>1=3,C5=52-3=49

[0637] C6:abs(52-((42+49+1)>>1)+1)>>1=3,C6=52-3=49

[0638] C7:abs(52-((49+55+1)>>1)+1)>>1=0,C7=52-0=52

[0639] C8:abs(52-((52+55+1)>>1)+1)>>1=1,C8=52+1=53

[0640] C9: abs(52-((16+42+1)>>1)+1)>>1=12, C9=52-12=40

[0641] C10:abs(52-((16+40+1)>>1)+1)>>1=12,C10=52-12=40

[0642] C11:abs(52-40+1)>>1=6,C11=52-6=46

[0643] C12:abs(52-((40+49+1)>>1)+1)>>1=4,C12=52-4=48

[0644] C13:abs(52-((48+49+1)>>1)+1)>>1=2,C13=52-2=50

[0645] C14:abs(52-((50+52+1)>>1)+1)>>1=1,C14=52-1=51

[0646] When deriving intra-prediction modes, the current block can be divided into multiple sub-blocks smaller than the current block, and then the intra-prediction mode for each sub-block can be derived. Here, the intra-prediction mode can represent the intra-prediction direction. Intra-prediction modes can be included in a predefined set of intra-prediction modes in the encoder and decoder.

[0647] For example, an intra-prediction direction field (IPDF) for the current block can be generated using at least one of the intra-prediction modes of blocks encoded / decoded using intra-prediction from reconstructed blocks adjacent to the current block, and the intra-prediction mode of the current block. A predetermined transform model can be used during the generation of the IPDF. After the IPDF is generated, it can be used to determine the intra-prediction mode of each sub-block of the current block.

[0648] Additionally, similar to the examples above, if the current block is partitioned from a block that is larger or less deep than the current block, then the current block can be a sub-block of the larger or less deep block. In this case, the intra-prediction mode of the current block can be derived using at least one of the intra-prediction modes of blocks encoded / decoded via intra-prediction in the reconstructed blocks adjacent to the larger or less deep block. The intra-prediction mode of the current block can be derived by generating IPDF.

[0649] At least one of the following transformations can be used as the predetermined transformation model: rigid transformation, similarity transformation, affine transformation, homography transformation, 3D transformation, and other transformations. Homography transformation can be a perspective transformation.

[0650] Since the intra-prediction mode of each sub-block divided from the current block can be derived using at least one of the intra-prediction modes of the blocks that are encoded / decoded by intra-prediction in the reconstructed blocks adjacent to the current block, as well as the intra-prediction mode of the current block, the number of bits required for entropy encoding / decoding of the intra-prediction mode of each sub-block can be reduced.

[0651] The size of a sub-block can be less than or equal to the size of the current block. For example, if the size of the current block is M×N (where M and N are positive integers), then the size of the sub-block can be M / K×N / L. K and M can be positive integers, and L can be a positive factor of N. Additionally, M / K or N / L can be positive integers.

[0652] Additionally, there can be P sub-blocks in the current block. P can be 0 or a positive integer. For example, there can be 1, 2, 4, or 16 sub-blocks in the current block.

[0653] Furthermore, when the current block is divided into sub-blocks, entropy encoding / decoding of the information indicating whether the current block has been divided into sub-blocks is not required separately. The division of the current block into sub-blocks can be determined based on whether the intra-prediction mode indicating the current block has been derived from the information of the sub-blocks.

[0654] Furthermore, since the intra-prediction mode of the sub-block is derived using at least one of the intra-prediction modes of blocks encoded / decoded via intra-prediction in the reconstructed blocks adjacent to the current block, and the intra-prediction mode of the current block, entropy coding / decoding of the sub-block's intra-prediction mode is not required. However, entropy coding / decoding of the current block's intra-prediction mode is permitted. In particular, if the current block consists of a sub-block, entropy coding / decoding of the current block's intra-prediction mode is not required, and the intra-prediction mode of the current block can be derived using at least one of the intra-prediction modes of blocks encoded / decoded via intra-prediction in the reconstructed blocks adjacent to the current block.

[0655] A block generated using IPDF that is encoded / decoded using intra-frame prediction within the reconstructed blocks adjacent to the current block is called a seed block. The location of the seed block is called a seed point. The intra-frame prediction mode of the seed block, including the seed point, is called the Seed Point Intra-Frame Prediction Mode (SPIPM).

[0656] Figure 21 This is a diagram illustrating an embodiment of using SPIPM to derive the intra-prediction mode of the current block.

[0657] exist Figure 21 In the example shown, the current block size can be 16×16, and each sub-block size can be (16 / 4)×(16 / 4). Here, the seed block can be at least one of several neighboring blocks that have been encoded / decoded via intra-frame prediction. The seed block or seed point can be located at a fixed position relative to the current block. Alternatively, at least one of the blocks or positions above, to the left, to the upper left, to the lower right, and to the upper right can be identified as the seed block or seed point.

[0658] For example, the intra-prediction mode of at least one of the adjacent blocks c, d, e, f, and g above the current block can be used as SPIPM.

[0659] Alternatively, the intra-prediction mode of the upper right block h adjacent to the current block can be used as SPIPM.

[0660] Alternatively, the intra-prediction mode of at least one of the upper-left blocks a and b adjacent to the current block can be used as SPIPM.

[0661] Alternatively, the intra-prediction mode of at least one of the left blocks i, j, k, and l adjacent to the current block can be used as SPIPM.

[0662] Alternatively, the intra-prediction mode of the lower left block m adjacent to the current block can be used as SPIPM.

[0663] For example, the intra-prediction mode of the current block can also be used as SPIPM.

[0664] IPDF can be generated using SPIPM with one or more seed points.

[0665] For example, if the coordinates of multiple seed points used to determine the parameters of a predetermined transformation model are (x_sp, y_sp) (sp = 1, 2, 3, ...), and the SPIPM of the seed block including the seed points is mode_sp (sp = 1, 2, 3, ...), then the coordinates (x_sp', y_sp') ​​of the transformed seed points can be determined as (x_sp', y_sp') ​​= (x_sp + dx, y_sp + dy). Here, dx can represent the displacement in the x-axis direction, and dy can represent the displacement in the y-axis direction. Furthermore, dx = D_sub*cosΘ and dy = D_sub*sinΘ can be determined.

[0666] Here, Θ can be determined based on SPIPM. For example, if the intra-prediction mode is as follows: Figure 6 As shown in the directional pattern, each SPIPM can have a unique orientation, and the positive angle about the x-axis can be determined as Θ.

[0667] For example, for the vertical intra-frame prediction mode, Θ = 270°.

[0668] For example, for the horizontal intra-frame prediction mode, Θ = 0°.

[0669] For example, for the lower left diagonal intra-prediction mode, Θ = 225°.

[0670] For example, for the top-right diagonal intra-prediction mode, Θ = 45°.

[0671] For example, for the bottom right diagonal intra-prediction mode, Θ = 135°.

[0672] Here, for intra-prediction modes with non-directionality (such as DC mode or planar mode), Θ can be determined to a specific value. The specific value can be, for example, 0, 90, 180, or 270 degrees.

[0673] SPIPM can represent the directionality originating from the seed point, and D_sub can represent the magnitude of the vector with that directionality. The magnitude of D_sub can be determined based on the size and / or shape of the seed block to which the seed point belongs. Additionally, D_sub can have a fixed value P for each intra-frame prediction mode. Here, P can be 0 or an integer. For example, if the current block size is M×N (M and N are positive integers), and D_cur = S (S is a positive integer), then the D_sub (sub = 1, 2, 3, ...) of a K×L seed block (K and L are positive integers) can be determined as D_sub = S*(K×L) / (M×N). For example, if in Figure 21 If the current block size is 16×16, then D_cur = S and the seed block D_sub can be determined by at least one of the following methods.

[0674] For example, for seed block d or e, we can determine that D_sub = S*(4×8) / (16×16) = S / 8.

[0675] For example, for seed block g or j, we can determine that D_sub = S*(8×8) / (16×16) = S / 4.

[0676] For example, for seed block k or l, we can determine that D_sub = S*(8×4) / (16×16) = S / 8.

[0677] For example, for seed block m or h, we can determine that D_sub = S*(16×16) / (16×16) = S.

[0678] For example, for each seed block, D_sub can be determined as S.

[0679] Candidates for generating the IPDF of the current block can be configured by creating a list of SPIPMs. The list of SPIPMs can be generated using intra-prediction modes of at least one of the neighboring blocks of the current block. For example, an SPIPM can be a set of one or more SPIPMs for the upper left (SPIPM_TL), upper right (SPIPM_TR), lower left (SPIPM_BL), and lower right (SPIPM_BR) of the current block. For a W×H current block, SPIPM_TL can use at least one of the intra-prediction modes of the upper, upper left, and left neighboring blocks with respect to the current block's position (0,0) as a candidate. SPIPM_TR can use at least one of the intra-prediction modes of the upper and upper right neighboring blocks with respect to the current block's position (W-1,0) as a candidate. SPIPM_BL can use at least one of the intra-prediction modes of the left and lower left neighboring blocks with respect to the current block's position (0,H-1) as a candidate. SPIPM_BR can represent the intra-prediction modes of the neighboring blocks of the current block. Alternatively, SPIPM_BR can be used to represent the intra-prediction mode of the current block.

[0680] exist Figure 21 In the example shown, SPIPM_TL may have at least one of the intra prediction modes of neighboring blocks d, b, and j. Additionally, SPIPM_TR may have at least one of the intra prediction modes of neighboring blocks g and h. Furthermore, SPIPM_BL may have at least one of the intra prediction modes of neighboring blocks i and m. Additionally, SPIPM_BR may have at least one of the intra prediction modes of the current block.

[0681] Additionally, seed blocks or seed points can be searched in a predetermined order. For example, by searching seed blocks or seed points in the order of left, top, bottom left, top right, and top, an intra-prediction mode list can be constructed from the corresponding seed blocks or seed points.

[0682] To create the SPIPM list, for at least one of multiple candidates for each of SPIPM_TL, SPIPM_TR, SPIPM_BL, and SPIPM_BR, a process can be performed to remove intra-prediction modes with orientations different from the other modes based on the similarity between the intra-prediction modes. Here, the intra-prediction mode difference (IPMD) can be used as a criterion for measuring similarity. Non-directional modes (e.g., DC_MODE and PLANAR_MODE) can be removed when creating the SPIPM list.

[0683] For example, if in a comparison between each of the three candidate modes of SPIPM_TL_mode and the candidate modes of SPIPM_neighbor (neighbor = TR or BL or BR), IPMD = abs(SPIPM_TL_mode - SPIPM_neighbor) > Th1 (Th1 is a positive integer), then the corresponding mode can be removed from the candidate set used for SPIPM_TL.

[0684] For example, if in a comparison between each of the two candidate modes of SPIPM_TR_mode and the candidate mode of SPIPM_neighbor (neighbor = TL or BL or BR), IPMD = abs(SPIPM_TR_mode - SPIPM_neighbor) > Th2 (Th2 is a positive integer), then the corresponding mode can be removed from the candidate set used for SPIPM_TR.

[0685] For example, if in a comparison between each of the two candidate modes of SPIPM_BL_mode and the candidate mode of SPIPM_neighbor (neighbor = TL or TR or BR), IPMD = abs(SPIPM_BL_mode - SPIPM_neighbor) > Th3 (Th3 is a positive integer), then the corresponding mode can be removed from the candidate set used for SPIPM_BL.

[0686] For example, if in a comparison between each of the candidate modes in SPIPM_BR_mode and the candidate modes in SPIPM_neighbor (neighbor = TL, TR, or BL), IPMD = abs(SPIPM_BR_mode - SPIPM_neighbor) > Th4 (Th4 is a positive integer), then the corresponding mode can be removed from the candidate set used for SPIPM_BR.

[0687] For example, if at least one of the multiple candidates for each of SPIPM_TL, SPIPM_TR, SPIPM_BL, and SPIPM_BR is a non-directional intra-prediction mode (such as DC mode or planar mode), the corresponding mode can be removed from the candidate set.

[0688] After the candidate with the lowest similarity among the multiple candidates used to create the SPIPM list is removed, the number of SPIPMs required for IPDF generation can be determined based on the specific 2D transformation model used. For example, the 2D transformation model may include rigid transformations, similarity transformations, affine transformations, and homography transformations. Furthermore, the number of SPIPMs can be determined as a variable value of 1, 2, 3, 4, or N (where N is a positive integer) based on the 2D transformation model.

[0689] For example, if the transformation model used for IPDF generation is a rigid transformation, then at least two SPIPMs may be required.

[0690] As described in [Equation 10], a rigid transformation can have 3 (3-DoF) degrees of freedom. Here, (x,y) can be the pre-transform coordinates of the seed point, and (x',y') can be the post-transform coordinates of the seed point. Θ, tx, and ty are the model parameters to be determined, where Θ, tx, and ty can be the rotation angle, x-axis displacement, and y-axis displacement, respectively.

[0691] [Equation 10]

[0692]

[0693] The (x,y)-(x',y') pair can be obtained using Θ determined from a single SPIPM, and two equations relating to Θ, tx, and ty can be determined by substituting the (x,y)-(x',y') pair into [Equation 10]. Additionally, four equations relating to Θ, tx, and ty can be determined from two SPIPMs, and three of these four equations can be used to determine the rigid transformation model.

[0694] The two SPIPMs can be determined by selecting at least two of SPIPM_TL, SPIPM_TR, SPIPM_BL, and SPIPM_BR. The selected SPIPMs can be added to the SPIPM list.

[0695] Figure 22 This is a diagram illustrating an embodiment of creating a list of SPIPMs that includes two SPIPMs.

[0696] like Figure 22 As shown, the SPIPM list can be filled in ascending order of the sum of the IPMDs of the two SPIPM candidate modes.

[0697] For example, one of the candidate modes for SPIPM_TL and one of the candidate modes for SPIPM_TR can be used as two SPIPMs.

[0698] For example, one of the candidate modes for SPIPM_TL and one of the candidate modes for SPIPM_BL can be used as two SPIPMs.

[0699] For example, one of the candidate modes for SPIPM_TL and one of the candidate modes for SPIPM_BR can be used as two SPIPMs.

[0700] For example, one of the candidate modes for SPIPM_TR and one of the candidate modes for SPIPM_BL can be used as two SPIPMs.

[0701] For example, one of the candidate modes for SPIPM_TR and one of the candidate modes for SPIPM_BR can be used as two SPIPMs.

[0702] For example, one of the candidate modes for SPIPM_BL and one of the candidate modes for SPIPM_BR can be used as two SPIPMs.

[0703] If two SPIPMs are not filled, the list of SPIPMs can be filled using the available SPIPMs. For example, the list of SPIPMs can be filled using SPIPM ± delta. Here, delta can be any positive integer, such as 1, 2, 3, ...

[0704] Once the two SPIPMs (SPIPM1, SPIPM2) are determined, four equations relating to Θ, tx, and ty can be generated using [Equation 10]. Three of these four equations can be used to determine the parameters for the rigid transformation model. The determined model can then be used for IPDF generation.

[0705] For example, a rigid transformation can be determined using at least one of the two equations calculated by SPIM1 ​​and the two equations calculated by SPIM2.

[0706] For example, a rigid transformation can be determined using at least one of the two equations calculated by SPIM1 ​​and the two equations calculated by SPIM2.

[0707] For example, if similarity transformations are used as the transformation model for IPDF generation, at least two SPIPMs may be required.

[0708] The similarity transformation can have 4-DoF as described in [Equation 11]. Here, (x,y) can be the pre-transformed coordinates of the seed point, and (x',y') can be the post-transformed coordinates of the seed point. a, b, c, and d can be the model parameters to be determined.

[0709] [Equation 11]

[0710]

[0711] The (x,y)-(x',y') pair can be obtained using Θ determined from a SPIPM, and two equations related to a, b, c, and d can be determined by substituting the (x,y)-(x',y') pair into [Equation 11]. Additionally, four equations related to a, b, c, and d can be determined from the two SPIPMs, and these four equations can be used to obtain a similarity transformation model.

[0712] Two SPIPMs can be determined by selecting at least two of SPIPM_TL, SPIPM_TR, SPIPM_BL, and SPIPM_BR. The selected SPIPMs can be added to the SPIPM list. Here, as shown in Equation 22, the SPIPM list can be populated in ascending order of the sum of the IPMD values ​​of the two SPIPM candidate modes.

[0713] For example, one of the candidate modes for SPIPM_TL and one of the candidate modes for SPIPM_TR can be used as two SPIPMs.

[0714] For example, one of the candidate modes for SPIPM_TL and one of the candidate modes for SPIPM_BL can be used as two SPIPMs.

[0715] For example, one of the candidate modes for SPIPM_TL and one of the candidate modes for SPIPM_BR can be used as two SPIPMs.

[0716] For example, one of the candidate modes for SPIPM_TR and one of the candidate modes for SPIPM_BL can be used as two SPIPMs.

[0717] For example, one of the candidate modes for SPIPM_TR and one of the candidate modes for SPIPM_BR can be used as two SPIPMs.

[0718] For example, one of the candidate modes for SPIPM_BL and one of the candidate modes for SPIPM_BR can be used as two SPIPMs.

[0719] If two SPIPMs are not filled, the list of SPIPMs can be filled using the available SPIPMs. For example, the list of SPIPMs can be filled using SPIPM ± delta. Here, delta can be any positive integer, such as 1, 2, 3, ...

[0720] Once the two SPIPMs (SPIPM1, SPIPM2) are determined, four equations relating to Θ, tx, and ty can be generated using [Equation 11] to determine the parameters for the similarity transformation model. The determined model can then be used for IPDF generation.

[0721] For example, if an affine transformation is used as the transformation model for IPDF generation, at least three SPIPMs may be required.

[0722] Affine transformations can have 6-DoF as described in [Equation 12]. Here, (x,y) can be the pre-transformed coordinates of the seed point, and (x',y') can be the post-transformed coordinates of the seed point. a, b, c, d, e, and f can be the model parameters to be determined.

[0723] [Equation 12]

[0724]

[0725] The (x,y)-(x',y') pair can be obtained using Θ determined from a single SPIPM, and two equations relating to a, b, c, d, e, and f can be determined by substituting the (x,y)-(x',y') pair into [Equation 12]. Additionally, six equations relating to a, b, c, d, e, and f can be determined from three SPIPMs, and these six equations can be used to obtain the affine transformation model.

[0726] Three SPIPMs can be determined by selecting at least three of SPIPM_TL, SPIPM_TR, SPIPM_BL, and SPIPM_BR. The selected SPIPMs can then be added to the SPIPM list.

[0727] Figure 23 This is an exemplary diagram illustrating an embodiment of creating a list of SPIPMs that includes three SPIPMs.

[0728] like Figure 23 As shown, the SPIPM list can be populated with SPIPMs in ascending order of the sum of the IPMD values ​​of the three SPIPM candidate modes.

[0729] For example, one of the candidate modes for SPIPM_TL, one of the candidate modes for SPIPM_TR, and one of the candidate modes for SPIPM_BL can be used as three SPIPMs.

[0730] For example, one of the candidate modes for SPIPM_TL, one of the candidate modes for SPIPM_TR, and one of the candidate modes for SPIPM_BR can be used as three SPIPMs.

[0731] For example, one of the candidate modes for SPIPM_TL, one of the candidate modes for SPIPM_BL, and one of the candidate modes for SPIPM_BR can be used as three SPIPMs.

[0732] For example, one of the candidate modes for SPIPM_TR, one of the candidate modes for SPIPM_BL, and one of the candidate modes for SPIPM_BR can be used as three SPIPMs.

[0733] If the three SPIPMs are not filled, the list of SPIPMs can be filled using the available SPIPMs. For example, the list of SPIPMs can be filled using SPIPM ± delta. Here, delta can be any positive integer, such as 1, 2, 3, ...

[0734] Once the three SPIPMs (SPIPM1, SPIPM2, SPIPM3) are determined, six equations relating to a, b, c, d, e, and f can be generated using [Equation 12] to determine the parameters for the affine transformation model. The determined model can then be used for IPDF generation.

[0735] For example, if homography (or perspective transformation) is used as the transformation model for IPDF generation, at least four SPIPMs may be required.

[0736] The affine transformation can have an 8-DoF as described in [Equation 13]. Here, (x,y) can be the pre-transformed coordinates of the seed point, and (x',y') can be the post-transformed coordinates of the seed point. h1, h2, h3, h4, h5, h6, h7, and h8 can be the model parameters to be determined.

[0737] [Equation 13]

[0738]

[0739] The (x,y)-(x',y') pair can be obtained using Θ determined from a single SPIPM, and two equations related to h1, h2, h3, h4, h5, h6, h7, and h8 can be determined by substituting the (x,y)-(x',y') pair into [Equation 13]. Additionally, eight equations related to h1, h2, h3, h4, h5, h6, h7, and h8 can be determined from four SPIPMs, and these eight equations can be used to obtain the homography transformation model.

[0740] Four SPIPMs can be determined by selecting at least four of SPIPM_TL, SPIPM_TR, SPIPM_BL, and SPIPM_BR. The selected SPIPMs can then be added to the SPIPM list.

[0741] Figure 24 This is an exemplary diagram illustrating an embodiment of creating a list of SPIPMs that includes four SPIPMs.

[0742] like Figure 24As shown, the SPIPM list can be sequentially populated using SPIPM in ascending order of the sum of the IMPD values ​​of the four SPIPM candidate modes.

[0743] For example, two candidate patterns from the candidate patterns for SPIPM_TL and two candidate patterns from the candidate patterns for SPIPM_TR can be used as four SPIPMs.

[0744] For example, two candidate patterns from the candidate patterns for SPIPM_TL and two candidate patterns from the candidate patterns for SPIPM_BL can be used as four SPIPMs.

[0745] For example, two candidate patterns from the candidate patterns for SPIPM_TL and two candidate patterns from the candidate patterns for SPIPM_BR can be used as four SPIPMs.

[0746] For example, two candidate patterns from the candidate patterns for SPIPM_BL and two candidate patterns from the candidate patterns for SPIPM_BR can be used as four SPIPMs.

[0747] For example, two candidate patterns from the candidate patterns for SPIPM_BL and two candidate patterns from the candidate patterns for SPIPM_BR can be used as four SPIPMs.

[0748] For example, two candidate patterns from the candidate patterns for SPIPM_TL, one candidate pattern from the candidate patterns for SPIPM_TR, and one candidate pattern from the candidate patterns for SPIPM_BL can be used as four SPIPMs.

[0749] For example, two candidate patterns from the candidate patterns for SPIPM_TL, one candidate pattern from the candidate patterns for SPIPM_TR, and one candidate pattern from the candidate patterns for SPIPM_BR can be used as four SPIPMs.

[0750] For example, two candidate patterns from the candidate patterns for SPIPM_TL, one candidate pattern from the candidate patterns for SPIPM_BL, and one candidate pattern from the candidate patterns for SPIPM_BR can be used as four SPIPMs.

[0751] For example, two candidate patterns from the candidate patterns for SPIPM_TR, one candidate pattern from the candidate patterns for SPIPM_TL, and one candidate pattern from the candidate patterns for SPIPM_BL can be used as four SPIPMs.

[0752] For example, two candidate patterns from the candidate patterns for SPIPM_TR, one candidate pattern from the candidate patterns for SPIPM_TL, and one candidate pattern from the candidate patterns for SPIPM_BR can be used as four SPIPMs.

[0753] For example, two candidate patterns from the candidate patterns for SPIPM_TR, one candidate pattern from the candidate patterns for SPIPM_TL, and one candidate pattern from the candidate patterns for SPIPM_BL can be used as four SPIPMs.

[0754] For example, two candidate modes from the candidate modes for SPIPM_BL, one candidate mode from the candidate modes for SPIPM_TL, and one candidate mode from the candidate modes for SPIPM_TR can be used as four SPIPMs.

[0755] For example, two candidate modes from the candidate modes for SPIPM_BL, one candidate mode from the candidate modes for SPIPM_TL, and one candidate mode from the candidate modes for SPIPM_BR can be used as four SPIPMs.

[0756] For example, two candidate modes from the candidate modes for SPIPM_BL, one candidate mode from the candidate modes for SPIPM_TR, and one candidate mode from the candidate modes for SPIPM_BR can be used as four SPIPMs.

[0757] For example, two candidate patterns from the candidate patterns for SPIPM_BR, one candidate pattern from the candidate patterns for SPIPM_TL, and one candidate pattern from the candidate patterns for SPIPM_TR can be used as four SPIPMs.

[0758] For example, two candidate patterns from the candidate patterns for SPIPM_BR, one candidate pattern from the candidate patterns for SPIPM_TL, and one candidate pattern from the candidate patterns for SPIPM_BL can be used as four SPIPMs.

[0759] For example, two candidate patterns from the candidate patterns for SPIPM_BR, one candidate pattern from the candidate patterns for SPIPM_TR, and one candidate pattern from the candidate patterns for SPIPM_BL can be used as four SPIPMs.

[0760] For example, one candidate pattern for SPIPM_BR, one candidate pattern for SPIPM_TR, one candidate pattern for SPIPM_BL, and one candidate pattern for SPIPM_BR can be used as four SPIPMs.

[0761] If the four SPIPMs are not filled, the list of SPIPMs can be filled using the available SPIPMs. For example, the list of SPIPMs can be filled using SPIPM ± delta. Here, delta can be any positive integer, such as 1, 2, 3, ...

[0762] Once the four SPIPMs (SPIPM1, SPIPM2, SPIPM3, SPIPM4) are determined, eight equations relating to h1, h2, h3, h4, h5, h6, h7, and h8 can be generated using [Equation 13] to determine the parameters for the homography transformation model. The determined model can then be used for IPDF generation.

[0763] After generating the IPDF using a predetermined transform model, the generated IPDF can be used to assign intra-prediction modes to K×L sub-blocks within the current block of size W×H. Here, the size of each sub-block, K×L (K is a positive integer equal to or less than M, and L is a positive integer equal to or less than H), can be a fixed size equal to or less than the size of the current block. Alternatively, the sub-block size can be adaptively determined using the size of the current block and / or IPMD. Alternatively, the sub-block size can be equal to the size of the current block.

[0764] Figure 25 This is an exemplary diagram showing the size of the sub-blocks when the current block size is 16×16.

[0765] like Figure 25 As shown in (a), the size of the sub-block can be fixed at 8×8. Or, as... Figure 25 As shown in (b), the size of the sub-block can be fixed at 4×4. Or, as... Figure 25 As shown in (c), the size of the sub-block can be fixed at 2×2. Or, as... Figure 25 As shown in (d), the size of the sub-block can be fixed at 1×1. The fixed size of 1×1 can be the size of the sample cell.

[0766] For example, the size of a sub-block can be determined based on the size of the current block.

[0767] For example, the size of a sub-block can be determined based on at least one of the IPMDs in the current block's SPIPM_TL, SPIPM_TR, SPIPM_BL, and SPIPM_BR.

[0768] For example, the size of a sub-block can be determined based on at least one of the IPMDs in the current block's SPIPM_TL, SPIPM_TR, SPIPM_BL, and SPIPM_BR, as well as the size of the current block.

[0769] Information about the size of sub-blocks can be entropy encoded / decoded in the bitstream. This information can be entropy encoded / decoded in at least one of the following: VPS, SPS, PPS, APS, strip header, parallel block header, CTU, CU, PU, ​​TU, block, and sub-block.

[0770] Information about the size of sub-blocks can be adaptively derived based on the current block size and / or IPMD without sending that information.

[0771] Alternatively, the sub-block size can be determined based on at least one of the encoding parameters of the current block and the encoding parameters of the neighboring blocks of the current block.

[0772] Intra-prediction modes for sub-blocks can be assigned using a defined IPDF model. The intra-prediction mode at a specific location within each sub-block can be implemented as a vector by substituting the coordinates of that specific location into the defined IPDF model. The specific location can be determined as the position of a pixel within the sub-block or a location adjacent to the boundary of the sub-block. For example, at least one of the top-left, top-right, bottom-left, bottom-right, and center positions of the sub-block can be determined as the specific location. If the coordinates of the specific location within the sub-block are (x, y) and the transformed coordinates of the location calculated by IPDF are (x', y'), then the intra-prediction mode can be assigned using θ. SB =atan[(y'-y) / (x'-x)] to determine the direction θ of the vector. SB .

[0773] Figure 26 This is a diagram depicting an embodiment of allocating intra-prediction modes using a defined IPDF.

[0774] like Figure 26 As shown, θ SB Intra-frame prediction modes pointing to the most similar direction can be mapped to multiple directional modes. A lookup table (LUT) can be used to perform θ prediction. SB Operations to map to intra-frame prediction modes.

[0775] Additionally, when using IPDF to allocate intra-prediction modes for sub-blocks, IDF can be allocated as intra-prediction modes for sub-blocks based on the nearest neighbor method.

[0776] Furthermore, when using IPDF to assign intra-prediction modes to sub-blocks, the intra-prediction modes can be assigned to sub-blocks by quantizing the IPDF to an integer.

[0777] Furthermore, when using IPDF to assign intra-prediction modes to sub-blocks, the intra-prediction modes can be assigned to sub-blocks by rounding the IPDF to the nearest integer.

[0778] For sub-block intra-frame prediction based on a transform model, the information that will be additionally entropy-encoded / decoded in the bitstream may include at least one of the following.

[0779] Information indicating whether transform-based sub-block intra-prediction has been performed for the current block: TBIP_flag

[0780] The TBIP_flag can be information that indicates whether to derive the intra-prediction mode of each sub-block using at least one of the intra-prediction modes of blocks encoded / decoded by intra-prediction in the reconstructed blocks adjacent to the current block, as well as the intra-prediction mode of the current block.

[0781] The index of the SPIPM set used: SPIPM_idx

[0782] Now, another embodiment of deriving intra-prediction modes based on sub-blocks using a transform model will be described. For example, when there are blocks in neighboring reconstructed blocks that are encoded / decoded by sub-block-by-sub-block intra-prediction based on a transform model, the intra-prediction mode can be derived for each sub-block using the IPDF model of neighboring blocks, instead of directly generating the IPDF of the current block.

[0783] To determine whether any blocks among the neighboring reconstructed blocks of the current block are encoded / decoded via transform-model-based sub-block intra-frame prediction, a predefined scan order can be used. The scan order can be at least one of the following orders.

[0784] Figure 27 This is an exemplary diagram showing the reconstructed blocks adjacent to the current block.

[0785] For example, in Figure 27 In this context, the scan can be performed in the order A->B->C->D->E. Alternatively, it can be performed in the order A->B->D->C->E. Alternatively, it can be performed in the order B->A->D->C->E. Alternatively, it can be performed in the order E->A->B->C->D. Alternatively, it can be performed in any other order.

[0786] Alternatively, a portion of blocks A, B, C, D, and C can be excluded during scanning. Alternatively, blocks other than A, B, C, D, and C can be scanned. The neighboring reconstructed blocks to be scanned can be determined based on at least one of the size, shape, and encoding parameters of at least one of the neighboring reconstructed blocks and the current block as described herein.

[0787] Figure 28 This is a diagram illustrating an embodiment of deriving intra-frame prediction modes using neighboring reconstruction blocks.

[0788] exist Figure 28 In the example shown, where block A, which is a neighboring block of the current block, is encoded / decoded using a transform model via intra-frame prediction of sub-block units, at least one of SPIPM_A_TL, SPIPM_A_TR, SPIPM_A_BL, and SPIPM_A_BR can be used to generate the IPDF of block A.

[0789] At least one of SPIPM_Cur_TL, SPIPM_Cur_TR, SPIPM_Cur_BL, and SPIPM_Cur_BR for the current block can be derived using the IPDF of block A, and at least one of the derived SPIPM_Cur_TL, SPIPM_Cur_TR, SPIPM_Cur_BL, and SPIPM_Cur_BR can be used to generate the IPDF of the current block, thereby performing sub-block intra-prediction.

[0790] If at least one of the neighboring reconstructed blocks of the current block is a block encoded / decoded using IPDF, the IPDF of the current block can be derived using the IPDF of the corresponding neighboring reconstructed block. Furthermore, the information in the TBIP_flag can be entropy encoded / decoded.

[0791] Another embodiment of deriving intra-prediction patterns based on sub-blocks using an isospace model will be described.

[0792] Figure 29 This is a diagram depicting an embodiment of intra-prediction mode derived from sub-blocks.

[0793] When an isospace model is used, at least two SPIPMs may be required. For example, as... Figure 29 As shown in (a), one of the candidate modes for SPIPM_TL, one of the candidate modes for SPIPM_TR, one of the candidate modes for SPIPM_BL, and one of the candidate modes for SPIPM_BR can be selected, for a total of four candidate modes. Figure 24 As shown, the four selected SPIPM candidate modes can be populated in the SPIPM list in ascending order of the sum of the IPMD values.

[0794] The intra prediction mode of the outermost sub-block of the current block can be determined first using SPIPM_TL, SPIPM_TR, SPIPM_BL, and / or SPIPM_BR. Iso-spatial determination of the intra prediction mode may mean using at least two intra prediction modes to divide the values ​​of the intra prediction modes at equal intervals and assigning the divided intra prediction mode values ​​to the sub-block.

[0795] For example, in Figure 29 In the example shown in (a), if SPIPM_TL is 24 and SPIPM_TR is 21, the intra-prediction modes of sub-blocks A, B, C, and D can be spatially determined using the values ​​of SPIPM_TL and SPIPM_TR. For example, as Figure 29 As shown in (b), we can determine that A = 24, B = 23, C = 22 and D = 21.

[0796] For example, in Figure 29 In the example shown in (a), if SPIPM_TL is 25 and SPIPM_BL is 38, the intra-prediction modes of sub-blocks A, E, I, and M can be spatially determined using the values ​​of SPIPM_TL and SPIPM_BL. For example, as Figure 29 As shown in (b), it can be determined that A = 24, E = 29, I = 34 and M = 38.

[0797] For example, in Figure 29 In the example shown in (a), if SPIPM_BL is 38 and SPIPM_BR is 35, the intra-prediction modes of sub-blocks M, N, O, and P can be spatially determined using the values ​​of SPIPM_BL and SPIPM_BR. For example, as Figure 29 As shown in (b), M = 38, N = 37, O = 36 and P = 35 can be determined.

[0798] For example, in Figure 29 In the example shown in (a), if SPIPM_TR is 21 and SPIPM_BR is 35, the intra-prediction modes of sub-blocks D, H, I, and P can be spatially determined using the values ​​of SPIPM_TR and SPIPM_BR. For example, as Figure 29 As shown in (b), D = 21, H = 26, I = 31 and P = 35 can be determined.

[0799] After the intra-prediction modes of the outermost sub-blocks of the current block are all determined, the intra-prediction mode of the second outermost sub-block can be determined. Figure 29 In the example shown, the second outermost sub-block can be sub-blocks F, G, J, and K. Here, SPIPM_TL can be reset to the top-left sub-block within the second outermost sub-block. Figure 29 The pattern at the top left position of sub-block F in (a) Figure 29 The value of the pattern of sub-block A in (a). Alternatively, SPIPM_TR can be reset to the upper right sub-block within the second outermost sub-block ( Figure 29 The pattern at the top right position of sub-block G in (a) Figure 29The value of the pattern of sub-block D in (a). Alternatively, SPIPM_BL can be reset to the lower left sub-block within the second outermost sub-block ( Figure 29 The pattern at the bottom left position of sub-block J in (a) Figure 29 The value of the pattern of sub-block M in (a). Alternatively, SPIPM_BR can be reset to the lower right sub-block within the second outermost sub-block ( Figure 29 The pattern at the bottom right position of sub-block K in (a) Figure 29 The value of the pattern of sub-block P in (a). This operation can be repeated recursively until the patterns of all sub-blocks in the current block are determined.

[0800] For example, in Figure 29 In the example shown in (b), if SPIPM_TL is 24 and SPIPM_TR is 21, the intra-prediction modes of sub-blocks F and G can be spatially determined using the values ​​of SPIPM_TL and SPIPM_TR. For example, as Figure 29 As shown in (c), F = 24 and G = 21 can be determined.

[0801] For example, in Figure 29 In the example shown in (b), if SPIPM_BL is 38 and SPIPM_BR is 35, the intra-prediction modes of sub-blocks J and K can be spatially determined using the values ​​of SPIPM_TL and SPIPM_TR. For example, as Figure 29 As shown in (c), J = 38 and K = 35 can be determined.

[0802] The information that will be encoded / decoded by additional entropy for sub-block intra-prediction based on the isospace model can be at least one of the following.

[0803] Information indicating whether per-block intra-prediction based on the isospace model has been performed for the current block: ES_flag

[0804] The index of the SPIPM set used: SPIPM_idx

[0805] Now, another embodiment of deriving intra-prediction modes based on sub-blocks using a bilinear filter model will be described.

[0806] Figure 30 This is a diagram illustrating another embodiment of intra-prediction mode derived from sub-blocks.

[0807] To determine the intra-prediction mode based on sub-blocks using a bilinear filter model, at least two SPIPMs may be required. For example, as... Figure 30As shown in (a), a total of four candidate modes can be selected by choosing one of the candidate modes for SPIPM_TL, one of the candidate modes for SPIPM_TR, one of the candidate modes for SPIPM_BL, and one of the candidate modes for SPIPM_BR. Figure 24 As shown, the four selected SPIPM candidate modes can be sequentially filled into the SPIPM list in ascending order of the sum of the IPMD values.

[0808] The top left child block in the current block can be selected. Figure 30 The mode of sub-block A in (a) is determined to be SPIPM_TL. Additionally, the upper right sub-block () in the current block can be... Figure 30 The pattern of sub-block D in (a) is determined to be SPIPM_TR. Additionally, the lower left sub-block () in the current block can be... Figure 30 The mode of sub-block M in (a) is determined to be SPIPM_BL. Additionally, the lower right sub-block (in the current block) can be... Figure 30 The mode of sub-block P in (a) is determined to be SPIPM_BR. For example... Figure 30 As shown in (b), the intra-prediction modes of the upper-left, upper-right, lower-left, and lower-right sub-blocks in the current block can be determined as SPIPM_TL, SPIPM_TR, SPIPM_BL, and SPIPM_BR, respectively. However, the intra-prediction modes of the upper-left, upper-right, lower-left, and lower-right sub-blocks in the current block are not limited to SPIPM_TL, SPIPM_TR, SPIPM_BL, and SPIPM_BR, and at least one of the intra-prediction modes of the upper-left, upper-right, lower-left, and lower-right sub-blocks in the current block can be determined as at least one of SPIPM_TL, SPIPM_TR, SPIPM_BL, and SPIPM_BR.

[0809] A bilinear filter scheme can be used to determine the intra-prediction mode of other sub-blocks. For example, Equation 14 below can be used. In Equation 14, function() can be at least one of floor(), ceil(), or round(). Figure 30 In the example shown, function() can be round(). Additionally, in [Equation 14], #of SubBlk inwdt can represent the number of sub-blocks in the horizontal direction within the current block. Similarly, #of SubBlk in hgt can represent the number of sub-blocks in the vertical direction within the current block.

[0810] [Equation 14]

[0811]

[0812] For example, such as Figure 30 As shown in (c), the intra-prediction mode of the remaining sub-blocks can be determined using [Equation 14].

[0813] For sub-block intra-prediction based on a bilinear filter model, the information to be encoded / decoded by additional entropy can be at least one of the following.

[0814] Information indicating whether sub-block intra-prediction based on a bilinear filter model was performed for the current block: BF_flag

[0815] The index of the SPIPM set used: SPIPM_idx

[0816] Intra-prediction modes can be derived based on sub-blocks using at least one of the intra-prediction modes of blocks encoded / decoded via intra-prediction in reconstructed blocks adjacent to the current block, as well as the intra-prediction mode of the current block. The derived intra-prediction modes can then be used to perform intra-prediction based on sub-blocks. Here, samples included in sub-blocks previously encoded / decoded based on sub-blocks can be used as reference samples for subsequent sub-block-by-sub-block intra-prediction.

[0817] The encoder can generate transform coefficients by performing at least one of an initial transform, a secondary transform, and quantization on the residual block resulting from sub-block intra-prediction. The generated transform coefficients can be entropy-encoded. The initial transform, secondary transform, and quantization can be performed on the current block, or on a sub-block basis. For example, at least one of the initial transform, secondary transform, and quantization can be performed on the entire current block, or at least one of the initial transform, secondary transform, and quantization can be performed on each sub-block. Alternatively, none of the initial transform, secondary transform, and quantization can be performed on the current block or a sub-block.

[0818] The transform coefficients can be entropy-decoded in the decoder. A reconstructed residual block can be generated by performing at least one of dequantization, first inverse transform, and second inverse transform on the entropy-decoded transform coefficients. The first transform, second transform, and quantization can be performed on the current block, and can also be performed on sub-blocks. For example, at least one of the first transform, second transform, and quantization can be performed on the entire current block, and at least one of the first transform, second transform, and quantization can be performed on each sub-block. Alternatively, none of the first transform, second transform, and quantization can be performed on the current block or a sub-block.

[0819] Intra-frame prediction information can be entropy encoded / decoded from the bitstream entropy. Figure 31 This is an exemplary diagram illustrating the syntax structure that includes intra-frame prediction mode information. For example... Figure 31As shown, intra-frame prediction information may include at least one of the following pieces of information. Here, intra-frame prediction information may be transmitted via signaling in at least one of VPS, SPS, PPS, APS, strip header, and parallel block header.

[0820] Flags indicating whether an MPM matches: for example, prev_intra_luma_pred_flag

[0821] Indicates the index of a position in the MPM list: for example, mpm_idx

[0822] Intra-frame luminance prediction mode information: for example, rem_intra_luma_pred_mode

[0823] Intra-frame chroma prediction mode information: for example, intra_chroma_pred_mode

[0824] Curvature parameters of curved intra-frame prediction modes: for example, cuv

[0825] Weight parameters used for curved intra-frame prediction modes: e.g., cw1, cw2, ..., cwNs-1

[0826] LUT for curved intra-frame prediction

[0827] Flags that indicate how to derive the intra prediction modes of the current block and sub-blocks using the intra prediction modes of neighboring blocks: for example, NDIP_flag

[0828] Flags indicating whether residual signal prediction will be performed: for example, SRP_flag

[0829] Indicators (MPM flags): For example, MPM_FLAG_1, MPM_FLAG_2, ..., MPM_FLAG_N, wherein the indicators are used to indicate whether, when the intra-prediction mode of the current block is derived or entropy-encoded / decoded using N MPM lists, the intra-prediction mode identical to the intra-prediction mode of the current block is included in the intra-prediction modes of the MPM list for each of the N MPM lists.

[0830] Index information: For example, MPM_IDX_1, MPM_IDX_2, ..., MPM_IDX_N, wherein the index information is used to indicate the position or order of the intra prediction mode in the MPM list when the intra prediction mode that is the same as the intra prediction mode of the current block is included in the intra prediction mode of a specific MPM list of N MPM lists.

[0831] Information indicating whether transform-model-based sub-block intra-prediction was performed for the current block, and indices indicating the SPIPM set used: for example, TBIP_flag and SPIPM_idx.

[0832] Information indicating whether to use the same spatial model to derive the intra-prediction mode based on sub-blocks for the current block, and the indices of the SPIPM set used: ES_flag and SPIPM_idx.

[0833] Information indicating whether a bilinear filter model is used for the current block, derived from sub-block intra-prediction mode, and indices of the SPIPM set used: BF_flag and SPIPM_idx.

[0834] When the MPM (Most Probable Mode) flag is 1, the intra-prediction mode of the luminance component can be derived from the candidate modes of intra-modes that include neighboring units that have been encoded / decoded by using the MPM index mpm_idx.

[0835] When the MPM (Most Probable Mode) flag is 0, the intra-prediction mode of the luma component can be encoded / decoded using the intra-prediction mode information rem_intra_luma_pred_mode about the luma component.

[0836] The intra-prediction mode of the chroma component can be encoded / decoded using the intra-prediction mode information intra_chroma_pred_mode about the chroma component and / or the corresponding intra-prediction mode of the chroma component block.

[0837] In curved intra-prediction mode, the predicted sample values ​​can be derived using reference samples at different angles based on the position (x, y) of the samples within the prediction block. Samples within the prediction block can be grouped into multiple groups, with the first group using an intra-prediction mode with an angle different from that of the second group. Each group can include one or more samples. Each group can be triangular, rectangular, or other geometric shapes.

[0838] The curvature parameter cuv of the curved intra-prediction mode can represent the curvature applied to the curved intra-prediction mode. Curved intra-prediction can be performed on the current block using at least one cuv. The curvature parameter can be derived from at least one curvature parameter among the curvature parameters of neighboring blocks.

[0839] One or more weight parameters cw of the curved intra-prediction mode can be applied to the current block. When multiple weight parameters cw are applied to the current block, different weight parameters can be applied to predetermined units of the current block, such as pixels, rows, columns, or sub-blocks. Weight parameters can be derived from at least one weight parameter among those of neighboring blocks.

[0840] The neighboring blocks used to derive curvature parameters and / or weight parameters can be encoded / decoded blocks that are adjacent to the current block on the top, left, and / or right sides.

[0841] Various forms of curved intra-frame prediction can be performed by using at least one of cuv and cw.

[0842] When N cuvs and M cws are used, intra-frame prediction of the current block can be performed by generating at least (N×M)×4 prediction blocks.

[0843] For example, when a single cuv and a single cw are used, intra-frame prediction of the current block can be performed by generating at least four prediction blocks.

[0844] For example, when two CUVs and a single CW are used, intra-frame prediction of the current block can be performed by generating at least eight prediction blocks.

[0845] For example, when a single cuv and two cws are used, intra-frame prediction of the current block can be performed by generating at least eight prediction blocks.

[0846] For example, when two cuvs and two cws are used, intra-frame prediction of the current block can be performed by generating at least sixteen prediction blocks.

[0847] Information about at least two cuv and / or cw values ​​can be encoded / decoded using default values ​​and delta values. Here, the default value can represent a single cuv value and / or a single cw value, and the delta value can represent a constant value.

[0848] For example, when using two cuvettes in the current block, the two curvature parameters can be default_cuv and default_cuv+delta_cuv.

[0849] For example, when using N cuvettes in the current block, the N curvature parameters can be default_cuv, default_cuv+delta_cuv, default_cuv+2*delta_cuv, ..., and default_cuv+(N-1)*delta_cuv. (Here, N is a positive integer greater than 2).

[0850] For example, when using 2N+1 cuvettes in the current block, the 2N+1 curvature parameters can be default_cuv, default_cuv+delta_cuv, default_cuv-delta_cuv, default_cuv+2*delta_cuv, default_cuv-2*delta_cuv, ..., default_cuv+N*delta_cuv, and default_cuv-N*delta_cuv. (Here, N is a positive integer greater than 1).

[0851] For example, when using two cws in the current block, the two weight parameters can be default_cw and default_cw+delta_cw. (Here, default_cw+delta_cw is the sum of the element units of the vectors).

[0852] For example, when using M cw values ​​in the current block, the M weight parameters can be default_cw, default_cw+delta_cw, default_cw+2*delta_cw, ..., and default_cw+(M-1)*delta_cw. (Here, default_cw+delta_cw is the sum of the element units of the vector, and M is a positive integer greater than 2).

[0853] For example, when using 2M+1 cw values ​​in the current block, the 2M+1 curvature parameters can be default_cw, default_cw+delta_cw, default_cw-delta_cw, default_cw+2*delta_cw, default_cw-2*delta_cw, ..., default_cw+M*delta_cw, and default_cw-M*delta_cw. (Here, M is a positive integer greater than 1).

[0854] The information described above regarding cuv and / or cw can be encoded as a bitstream, or can be decoded from a bitstream. Optionally, the encoder or decoder can share and store information about the quantity or value of cuv and / or cw in, for example, a lookup table format.

[0855] When SRP_flag equals 1, residual signal prediction can be performed using the intra-prediction mode determined for the current block or sub-block.

[0856] Intra-frame prediction information can be entropy-encoded / decoded from the bitstream based on at least one of the coding parameters. For example, NDIP_flag can be encoded / decoded based on block partitioning information.

[0857] For example, if at least one of split_flag, quadtree_flag, and binarytree_flag is "0" and therefore the block is not further divided, then NDIP_flag can be encoded / decoded.

[0858] For example, if binarytree_flag is 1, then NDIP_flag may not be encoded / decoded.

[0859] Based on at least one of the block size and shape, at least one of the multiple intra-frame prediction information described above can be transmitted without signal transmission.

[0860] For example, if the size of the current block is a predetermined size, at least one intra-prediction message about the current block can be transmitted without signaling, and at least one intra-prediction message about the size of the previously encoded / decoded upper-layer block can be used.

[0861] For example, if the current block is shaped into a rectangle, at least one piece of intra-prediction information about the current block can be transmitted without signaling, and at least one piece of intra-prediction information corresponding to the size of the previously encoded / decoded upper-layer block can be used.

[0862] If SRP_flag is 1, the residual signal can be predicted using the intra-prediction mode determined for the current block or sub-block.

[0863] When at least one of multiple intra-frame prediction information is entropy encoded / decoded, at least one of the following binarization methods can be used.

[0864] — Truncated Ricean binarization method

[0865] —K-order exponent Columbus binarization method

[0866] — Finite K-order Exponential Columbus Binarization Method

[0867] —Fixed-length binarization method

[0868] — Univariate binarization method

[0869] —Truncation of Univariate Binarization Method

[0870] The reference sample construction step S1220 will now be described in detail.

[0871] In intra-frame prediction of the current block or a sub-block with a smaller size and / or shape than the current block, reference samples can be constructed for the prediction based on a derived intra-frame prediction pattern. The following description is given in the context of the current block, where the current block can be considered a sub-block. Reference samples can be constructed using one or more reconstructed samples or combinations of samples adjacent to the current block. Additionally, filtering can be applied when constructing the reference samples. Here, reference samples can be constructed using each reconstructed sample on multiple reconstructed sample lines as is. Alternatively, reference samples can be constructed after filtering between samples on the same reconstructed sample line. Alternatively, reference samples can be constructed after filtering between samples on different reconstructed sample lines. The constructed reference sample can be represented by ref[m,n], and the reconstructed neighboring sample or the sample obtained by filtering the reconstructed neighboring sample can be represented by rec[m,n]. Here, m or n can be predetermined integer values. If the size of the current block is W (horizontal) × H (vertical), and the position of the top left sample point of the current block is (0,0), then the relative position of the top left reference sample point that is closest to that sample point position can be set to (-1,-1).

[0872] Figure 32 This is an exemplary diagram depicting a line of neighboring reconstruction samples that can be used for intra-frame prediction of the current block.

[0873] like Figure 32 As shown, reference samples can be constructed using one or more reconstructed sample lines adjacent to the current block.

[0874] For example, you can choose Figure 32 One of a plurality of reconstructed sample lines is shown, and the selected reconstructed sample line can be used to construct reference samples. A predetermined reconstructed sample line from the plurality of reconstructed sample lines can be fixedly selected as the selected reconstructed sample line. Alternatively, a specific reconstructed sample line from the plurality of reconstructed sample lines can be adaptively selected as the selected reconstructed sample line. In this case, an indicator for the selected reconstructed sample line can be transmitted using a signal.

[0875] For example, they can be used in combination. Figure 32 One or more of the multiple reconstructed sample lines shown are used to construct reference samples. For example, reference samples can be constructed as a weighted sum (or weighted average) of one or more reconstructed samples. The weights used for the weighted average can be assigned based on the distance from the current block. Here, a larger weight can be assigned to shorter distances from the current block. For example, the following [Equation 15] can be used.

[0876] [Equation 15]

[0877] ref[-1,-1]=(rec[-2,-1]+2*rec[-1,-1]+rec[-1,-2]+2)>>2

[0878] ref[x,-1]=(rec[x,-2]+3*rec[x,-1]+2)>>2,(x=0~W+H-1)

[0879] ref[-1,y]=(rec[-2,y]+3*rec[-1,y]+2)>>2,(y=0~W+H-1)

[0880] Alternatively, reference samples can be constructed using at least one of the average, maximum, minimum, median, and most frequent values ​​of multiple reconstructed samples, based on the distance from the current block or at least one of the intra-frame prediction modes.

[0881] Alternatively, a reference sample can be constructed based on the changes (modifications) in the values ​​of multiple consecutive reconstructed samples. For example, a reference sample can be constructed based on at least one of the following: whether the difference between the values ​​of two consecutive reconstructed samples is equal to or greater than a threshold, whether the values ​​of the two consecutive reconstructed samples change continuously or discontinuously, etc. For example, if the difference between rec[-1,-1] and rec[-2,-1] is equal to or greater than a threshold, then ref[-1,-1] can be determined as rec[-1,-1], or by applying a weighted average obtained using predetermined weights assigned to rec[-1,-1]. For example, if the values ​​of multiple consecutive reconstructed samples are changed by n each time they get closer to the current block, then the reference sample ref[-1,-1] can be determined as rec[-1,-1]-n.

[0882] The number and position of reconstructed sample lines, as well as the construction method for constructing reference samples, can be determined differently depending on whether the upper or left boundary of the current block corresponds to the boundary of at least one of the image, strip, parallel block, and coding tree block (CTB).

[0883] For example, when using reconstructed sample lines 1 and 2 to construct reference samples, reconstructed sample line 1 can be used on the upper edge when the upper boundary of the current block corresponds to the CTB boundary, and reconstructed sample lines 1 and 2 can be used on the left edge.

[0884] For example, when using reconstructed sample lines 1 to 4 to construct reference samples, reconstructed sample lines 1 and 2 can be used on the upper edge when the upper boundary of the current block corresponds to the CTB boundary, and reconstructed sample lines 1 to 4 can be used on the left edge.

[0885] For example, when using reconstructed sample line 2 to construct reference samples, when the upper boundary of the current block corresponds to the CTB boundary, reconstructed sample line 1 can be used for the upper edge, and reconstructed sample line 2 can be used for the left edge.

[0886] The above processing can be used to construct one or more reference sample lines.

[0887] The method for constructing reference samples for the edges above the current block can be different from the method for constructing reference samples for the edges to the left of the current block.

[0888] Information indicating that reference samples have been constructed using at least one of the methods described above can be encoded / decoded. For example, information indicating whether multiple reconstructed sample lines have been used can be encoded / decoded.

[0889] If the current block is divided into multiple sub-blocks, and each sub-block has an independent intra-prediction mode, reference samples can be constructed for each sub-block.

[0890] Figure 33 This is a diagram depicting an embodiment of constructing reference samples for the sub-blocks included in the current block.

[0891] like Figure 33 As shown, if the current block size is 16×16 and the 16 4×4 sub-blocks have independent intra-prediction modes, reference samples for each sub-block can be constructed according to at least one of the following methods based on the scanning scheme used to predict the sub-blocks.

[0892] For example, reference samples can be constructed for each sub-block using N reconstruction reference sample lines adjacent to the current block. Figure 33 In the example shown, N is 1.

[0893] For example, when predicting multiple sub-blocks in the raster scan order of 1->2->3->….15->16, reference samples for the Kth sub-block can be constructed using samples from at least one of the already encoded / decoded left sub-block, top sub-block, upper right sub-block, and lower left sub-block.

[0894] For example, when predicting multiple sub-blocks in a zigzag scanning order of 1->2->5->6->3->4->7->…12->15->16, reference samples for the Kth sub-block can be constructed using samples from at least one of the already encoded / decoded left sub-block, top sub-block, upper right sub-block, and lower left sub-block.

[0895] For example, when predicting multiple sub-blocks in the zig-zag scan order of 1->2->5->9->6->3->4->…12->15->16, reference samples for the Kth sub-block can be constructed using samples from at least one of the already encoded / decoded left sub-block, top sub-block, top right sub-block, and bottom left sub-block.

[0896] For example, when predicting multiple sub-blocks in a vertical scanning order of 1->5->9->13->2->6->…8->12->16, reference samples for the Kth sub-block can be constructed using samples from at least one of the already encoded / decoded left sub-block, top sub-block, upper right sub-block, and lower left sub-block.

[0897] When predicting multiple sub-blocks in a scanning order other than the above scanning order, reference samples for the Kth sub-block can be constructed using samples from at least one of the already encoded / decoded left sub-block, top sub-block, top right sub-block, and bottom left sub-block.

[0898] When selecting a reference sample, a decision and / or padding can be made regarding the availability of the block containing the reference sample. For example, if the block containing the reference sample is available, the reference sample can be used. Conversely, if the block containing the reference sample is unavailable, padding can be used to replace the unavailable reference sample with one or more available neighboring reference samples.

[0899] If a reference sample exists outside at least one of the following: screen boundary, parallel block boundary, stripe boundary, CTB boundary, and predetermined boundary, then the reference sample is deemed unusable.

[0900] If the current block is encoded using CIP (Constrained Intra-Prediction), and a block including a reference sample is encoded / decoded in inter-prediction mode, then the reference sample can be determined to be unavailable.

[0901] Figure 34 This is a diagram depicting a method for replacing unavailable reconstruction samples with available reconstruction samples.

[0902] If it is determined that a neighboring reconstructed sample point is unavailable, an available neighboring reconstructed sample point can be used to replace the unavailable sample point. For example, such as... Figure 34 As shown, in the presence of both available and unavailable samples, one or more available samples can be used to replace an unavailable sample.

[0903] The sample values ​​of unavailable samples can be replaced with those of available samples in a predetermined order. An available sample adjacent to an unavailable sample can be used to replace it. If no adjacent available sample exists, the first available sample or the most recent available sample can be used. The replacement order of unavailable samples can be from the bottom left to the top right. Alternatively, the replacement order of unavailable samples can be from the top right to the bottom left. Alternatively, the replacement order of unavailable samples can be from the top left to the top right and / or the bottom left. Alternatively, the replacement order of unavailable samples can be from the top right and / or the bottom left to the top left.

[0904] like Figure 34 As shown, unusable samples can be replaced in order from the bottom left sample position 0 to the top right sample. In this case, the value of the first four unusable samples can be replaced with the value of the first or closest usable sample 'a'. The value of the last usable sample 'b' can be used to replace the values ​​of the next 13 unusable samples.

[0905] Alternatively, an unavailable sample can be replaced with a combination of available samples. For example, the unavailable sample can be replaced with the average of the available samples adjacent to its two ends. Figure 34 In this scenario, the value of available sample point a can be used to replace the first four unavailable samples, and the average of available samples b and c can be used to replace the next 13 unavailable samples. Alternatively, any value between the values ​​of available sample point b and c can be used to fill the 13 unavailable samples. In this case, different values ​​can be used to replace the unavailable samples. For example, since the unavailable sample point is closer to available sample point a, a value close to that of available sample point a can be used to replace the value of the unavailable sample point. Similarly, since the unavailable sample point is closer to available sample point b, a value close to that of available sample point b can be used to replace the value of the unavailable sample point. That is, the value of the unavailable sample point can be determined based on the distance from the unavailable sample point to available samples a and / or b.

[0906] To replace unavailable samples, one or more of the methods described above can be selectively applied. The method for replacing unavailable samples can be transmitted as a signal by information included in the bitstream, or a method predetermined by the encoder and decoder can be used. Alternatively, the method for replacing unavailable samples can be derived using a predetermined scheme. For example, the method for replacing unavailable samples can be selected based on the difference between the values ​​of available samples a and b and / or the number of unavailable samples. For example, the method for replacing unavailable samples can be selected based on a comparison between the difference between the values ​​of two available samples and a threshold and / or a comparison between the number of unavailable samples and a threshold. For example, if the difference between the values ​​of two available samples is greater than a threshold and / or if the number of unavailable samples is greater than a threshold, then a different value can be used to replace the value of the unavailable sample.

[0907] For one or more reference samples constructed, it can be determined whether to apply filtering based on at least one of the intra-prediction mode, size, and shape of the current block. If filtering is applied, a different filter type can be used based on at least one of the intra-prediction mode, size, and shape of the current block.

[0908] For example, for each of the multiple reference sample lines, it can be determined differently whether to apply filtering and / or the type of filter. For example, filtering can be applied to the first neighboring line, but filtering can be left unapplied to the second neighboring line.

[0909] For example, both filtered and unfiltered values ​​can be used for a reference sample.

[0910] For example, if the intrapredMode of the target decoded block is a directional prediction mode, the smaller of the difference between the directional prediction mode and the vertical directional mode (given 33 directional modes, where the mode with index 26) and the difference between the directional prediction mode and the horizontal directional mode (given 33 directional modes, where the mode with index 10) [minDistVerHor=Min(Abs(intraPredMode-26),abs(intraPredMode-10))] can be calculated.

[0911] Figure 35 This is a diagram showing an exemplary threshold for determining whether filtering should be applied, based on the block size.

[0912] For example, the threshold can be 10 for a 4×4 block, 7 for an 8×8 block, 1 for a 16×16 block, 0 for a 32×32 block, and 10 for a 64×64 block.

[0913] If minDistVerHor is greater than the threshold assigned to the corresponding block size (minDistVerHor>intraHorVerDistThresh), filtering can be performed; if minDistVerHor is equal to or less than the threshold, filtering can be omitted.

[0914] Figure 36 This is an exemplary diagram illustrating whether filtering is performed based on block size and / or inter-frame prediction mode. Figure 36 In this context, X can represent no filtering and O can represent filtering.

[0915] For example, such as Figure 36 As shown, whether to apply filtering to a block size with 8 <= N can be determined based on the block size and / or orientation prediction mode. S Target encoding / decoding blocks <= 32.

[0916] In another embodiment of the filtering application, bilinear interpolation filtering can be performed on target encoded / decoded blocks of large size. For example, it can be performed on block sizes N. S For the target encoded / decoded block, calculate the second-order derivative values ​​in the vertical and horizontal directions. If the second-order derivative value is less than a predetermined threshold (e.g., |p...), ref (-1,-1)-2×p ref (N S / 2,-1)+pref (N S ,-1)|<2 Bd-Ca and / or |p ref (-1,-1)-2×p ref (-1,N S / 2)+p ref (-1,N S )|<2 Bd-C (B d It is as if 1 <= C <= B d Given the bit depth of positive integers, then for y = 0, ..., N S -1 can be used to derive the reference pixel p ref (-1,y)=(N s -1-y) / N S ×p ref (-1,-1)+(y+1) / N S ×p ref (-1,N S -1), or for x = 0, ..., N S -1, from which p can be derived ref (x, -1) = (N) s -1-x) / N S ×p ref (-1,-1)+(x+1) / N S ×p ref (N S -1,-1).

[0917] For example, at least one different filter among 3-tap, 5-tap, 7-tap, and N-tap filters (where N is a positive integer) can be selected and applied based on at least one of the intra-prediction mode, size, and shape of the current block.

[0918] The steps for performing intra-frame prediction (S1230) will be described in detail below.

[0919] Intra-prediction can be performed on the current block or a sub-block based on the derived intra-prediction mode and reference samples. In the following description, the current block may mean a sub-block.

[0920] For example, non-directional intra-prediction can be performed. The non-directional intra-prediction mode can be at least one of DC mode and planar mode.

[0921] Intra-frame prediction in DC mode can be performed using the average of one or more constructed reference samples. Filtering can be applied to one or more prediction samples on the boundaries of the current block. Intra-frame prediction in DC mode can be performed adaptively based on at least one of the size and shape of the current block.

[0922] Figure 37 This is an exemplary diagram illustrating intra-frame prediction based on the shape of the current block.

[0923] For example, such as Figure 37 As shown in (a), if the current block is shaped like a square, the average of the reference samples above and to the left of the current block can be used to predict the current block.

[0924] For example, such as Figure 37 As shown in (b), if the current block is shaped as a rectangle, the average of the reference samples adjacent to the longer of the width and length of the current block can be used to predict the current block.

[0925] For example, if the size of the current block falls within a predetermined range, a predetermined sample point is selected from either the upper reference sample point or the left reference sample point of the current block, and the average value of the selected sample points can be used to perform the prediction.

[0926] For example, the average of one or more of the constructed reference samples can be used to perform DC mode intra-frame prediction. For example, the following [Equation 16] can be used.

[0927] [Equation 16]

[0928]

[0929] Filtering can be applied to one or more predicted samples located on the boundaries of the current block. For example, filtering can be performed on N columns and / or rows to the left and / or above the current block. N can be a positive integer greater than 1.

[0930] Figure 38 This is a diagram depicting the filtering for intra-frame prediction in DC-mode.

[0931] For example, if N=1, filtering can be performed on a top row and / or a left column of the target block, such as... Figure 38 As shown in the figure. Filtering can be performed using the following [Equation 17].

[0932] [Equation 17]

[0933]

[0934]

[0935]

[0936] Planar mode intra-prediction can be performed by calculating a weighted sum, taking into account the distance from one or more constructed reference samples based on the position of the target intra-prediction sample in the current block.

[0937] For example, based on the location (x, y) of the target prediction sample point, the prediction block can be calculated as a weighted sum of N reference samples. N can be a positive integer, such as 4.

[0938] Figure 39 It is a diagram depicting intra-frame prediction in planar mode.

[0939] For example, such as Figure 39 As shown, if each of the width and length of the target encoding / decoding block is 4 (N) S =4), then the predicted pixel value at each pixel position (x,y) can be derived as a weighted sum of the upper reference pixel c, the left reference pixel b, the upper right pixel d of the target encoding / decoding block, and the lower left pixel a of the target encoding / decoding block. For example, the weighted sum can be derived using [Equation 18].

[0940] [Equation 18]

[0941]

[0942] For example, intra-frame directional prediction can be performed. The directional prediction mode can be at least one of a horizontal mode, a vertical mode, and a mode with a predetermined angle.

[0943] Horizontal / vertical mode intra-frame prediction can be performed using one or more reference samples on the horizontal / vertical lines at the location of the predicted sample points within the target frame.

[0944] Intra-frame prediction in a predetermined angle mode can be performed using one or more reference samples on a line at a predetermined angle relative to the position of the predicted sample point within the target frame. Here, N reference samples can be used. N can be a positive integer, such as 2, 3, 4, 5, or 6. Furthermore, for example, prediction can be performed by applying an N-tap filter (such as a 2-tap, 3-tap, 4-tap, 5-tap, or 6-tap filter).

[0945] For example, intra-frame prediction can be performed based on location information. The location information can be encoded / decoded, and the reconstructed sample block at that location can be derived as an intra-frame prediction block for the current block. Alternatively, a block similar to the current block detected by the decoder can be derived as an intra-frame prediction block for the current block.

[0946] For example, intra-frame color component prediction can be performed. For instance, intra-frame prediction can be performed using the reconstructed luma component of the current block against the chroma component. Alternatively, intra-frame prediction can be performed using a reconstructed chroma component Cb of the current block against another chroma component Cr.

[0947] Intra-prediction can be performed by combining one or more of the various intra-prediction methods described above. For example, an intra-prediction block can be constructed for the current block by a weighted sum of blocks predicted using a predetermined non-directional intra-prediction mode and blocks predicted using a predetermined directional intra-prediction mode. Here, different weights can be applied based on at least one of the intra-prediction mode, block size, shape, and / or sample location of the current block.

[0948] Alternatively, with respect to the combined use of one or more intra-prediction modes, a prediction block can be constructed using a weighted sum of values ​​predicted by using the intra-prediction mode of the current block and values ​​predicted by using predetermined modes included in the MPM list.

[0949] Alternatively, intra-frame prediction can be performed using one or more sets of reference samples. For example, intra-frame prediction can be performed for the current block using a weighted sum of the following blocks: blocks intra-predicted using reference samples obtained by not applying filtering to the constructed reference samples, and blocks intra-predicted using reference samples obtained by applying filtering to the constructed reference samples.

[0950] During intra-frame prediction, filtering operations can be performed using neighboring reconstructed samples. Here, filtering operations may or may not be performed depending on at least one of the intra-frame prediction mode, block size, shape, and / or sample location of the current block. Filtering operations can be included in the intra-frame prediction process and thus performed as a step. When performing filtering, at least one of the following can be adaptively determined based on at least one of the intra-frame prediction mode, block size, and shape of the current block: filter taps, coefficients, the number of lines to be applied, and the number of samples to be applied.

[0951] When performing intra-prediction by dividing the current block into sub-blocks and deriving the intra-prediction mode of each sub-block using the intra-prediction modes of neighboring blocks, filtering can be applied to each sub-block of the current block. For example, a low-pass filter can be applied to the entire current block. Alternatively, a filter can be applied to samples located on the boundaries of each sub-block. Alternatively, a filter can be applied to the prediction block or reconstruction block of each sub-block, and one or more samples from the sub-block to which the filter is applied can be used in the intra-prediction of subsequent sub-blocks.

[0952] When dividing the current block into sub-blocks and performing intra-prediction for each sub-block, each sub-block can refer to at least one of an encoding / decoding block, a prediction block, and a transform block. For example, if the current block size is 64×64 and the sub-block size is 16×16, then an intra-prediction mode as the prediction block for each sub-block can be derived, and / or intra-prediction can be performed for the prediction blocks. If each of one or more sub-blocks is further divided into 8×8 or 4×4 blocks, then each of the 8×8 or 4×4 blocks can be a transform block, and intra-prediction can be performed for the blocks obtained through further division using the intra-prediction mode of the 16×16 blocks.

[0953] In directional intra-frame prediction, at least one of N directional modes can be used to encode / decode the current block. Here, N can be a positive integer, such as 33 or 65. In this case, each directional intra-frame prediction mode can have a predetermined angle value.

[0954] In directional intra-frame prediction, the current block can be encoded / decoded using directional patterns in units of M samples. M can be a positive integer. In this case, a directional pattern in units of samples can mean a pattern that uses one or more directional intra-frame prediction patterns to predict one or more target sample units in the current block.

[0955] In intra-frame directional prediction, reference samples can be reconstructed based on the directional prediction pattern. For example, if the directional prediction pattern is one in which all left and top reference samples are used, a single-directional array can be constructed using either the left or top reference samples.

[0956] Figure 40 It is a description from P ref Generate a 1D reference sample array p 1,ref An illustration of an embodiment.

[0957] For example, such as Figure 40 As shown, a 1D array of top reference samples can be constructed using one or more left reference samples. The top reference samples can be constructed using different samples from the left samples depending on the orientation pattern. The top reference samples can be constructed by moving the left reference samples, or by using a weighted sum of one or more left reference samples.

[0958] In intra-frame prediction of orientation, real-valued interpolation prediction can be performed. For example, as described below, the offset (iIdx) and / or weight (iFact) for interpolating the predicted samples can be determined based on the position of the samples in the current block, according to the angle parameter (intraPredAngle) corresponding to each orientation prediction mode.

[0959] For example, assuming interpolation is performed in units of 1 / 32 pel, the offset and weights for the directional pattern with a vertical direction can be determined by the following [Equation 19].

[0960] [Equation 19]

[0961] iIdx=((y+1)*intraPredAngle)>>5

[0962] iFact=((y+1)*intraPredAngle)&31

[0963] Different predicted sample point values ​​can be determined based on the value of iFact in [Equation 19]. For example, if iFact is not 0, then the reference sample point P... 1,ref The predicted position is not based on integer positions (integers), but on real-valued positions. Therefore, the predicted sample value at the target sample position (x, y) can be generated using multiple reference samples adjacent to the real-valued position (e.g., two adjacent reference samples on the left and right sides) via [Equation 20] below. Here, the multiple adjacent reference samples can be 4 or 6 adjacent reference samples on the left and right sides.

[0964] [Equation 20]

[0965] predSamples[x][y]=((32-iFact)*p 1,ref [x+iIdx+1]+iFact*p 1,ref [x+iIdx+2]+16)>>5

[0966] For example, if iFact is 0, the predicted sample values ​​can be generated using [Equation 21] below. Alternatively, reference sample P can be used. 1,ref The 3-tap [1 / 4:2 / 4:1 / 4] filter is applied to the left and right reference samples.

[0967] [Equation 21]

[0968] predSamples[x][y]=p 1,ref [x+iIdx+1]

[0969] In the case of at least one of the horizontal and / or vertical modes in the direction prediction mode, filtering may not be performed for the reference sample. Additionally, the reference sample may not require interpolation prediction. Furthermore, since prediction can only be performed using the upper or left reference sample, the process of constructing a 1D array for that reference sample may not be necessary.

[0970] Figure 41This is a diagram illustrating an example of using reference samples at different angles based on the position of the samples in the prediction block.

[0971] like Figure 41 As shown, in intra-frame directional prediction, the directional mode can be changed and applied to different cells. That is, prediction can be performed using one or more directional modes based on at least one of sample cells, sample group cells, and line cells in the target block.

[0972] For example, a prediction can be performed based on a directional pattern used for the current block. Alternatively, a prediction can be performed for each target sample line used for prediction in the current block. That is, a different directional pattern can be used for each of at least one of the horizontal or vertical lines in the current block. Alternatively, a prediction can be performed for each predetermined group of target sample points used for prediction in the current block. That is, a different directional pattern can be used for each group of N sample points in the current block. For example, a prediction can be performed for each target sample point used for prediction in the current block. That is, a different directional pattern can be used for each target sample point used for prediction in the current block.

[0973] When performing a direction prediction on a block-by-block basis, coding efficiency decreases if the target block includes curves with multiple image features. To improve coding efficiency, prediction can be performed using one or more direction patterns on a block-by-block basis, using at least one of the following: samples, groups of samples, and lines.

[0974] Figure 41 (a) illustrates an exemplary case where different orientation patterns are used for each sample point in the target block. Figure 41 In the example shown in (a), a prediction can be generated for each sample point using reference samples located at the angle of each directional pattern.

[0975] Figure 41 (b) illustrates an exemplary case where different directional patterns are used for each horizontal line in the target block. Figure 41 In the example shown in (b), reference samples located at the angle of each directional pattern can be used to generate predictions for each horizontal line.

[0976] Figure 41 (c) illustrates an exemplary case where different directional patterns are used for each vertical line in the target block. Figure 41 In the example shown in (c), reference samples located at the angle of each directional pattern can be used to generate predictions for each vertical line.

[0977] Figure 41(d) illustrates an exemplary case where different directional patterns are applied to each sample group in the diagonal direction of the target block. Figure 41 In the example shown in (d), reference samples located at the angle of each directional pattern can be used to generate predictions for each diagonal sample group in the diagonal direction.

[0978] Figure 41 (e) illustrates an exemplary case where different directional patterns are used for each L-shaped line in the target block. Figure 41 In the example shown in (e), reference samples located at the angle of each directional pattern can be used to generate predictions for each right angle.

[0979] Apart from Figure 41 Beyond the examples provided, various methods can be used to group one or more sample points. For instance, different orientation patterns can be applied to each block generated by dividing the height and / or width by any number.

[0980] As an example of using different directional modes on a per-sample-point basis in the target block, this can be achieved by using the curvature parameter cuv and the weight parameter cwi (i = 0, 1, ..., N). S -1, N S The block size determines the location of the reference pixel used to generate the predicted value at any location (x, y) within the prediction block.

[0981] For example, in the case of intra-frame prediction “from the top right edge to the bottom left edge”, as shown in Equation 22 below, the position of the reference pixel used to generate the prediction value at any position (x,y) within the prediction block can be determined according to the row unit.

[0982] [Equation 22]

[0983] The y-th row is p(pos,-1), where pos = x + 1 / 2*(x + y) + cw y *cuv*(x+1),

[0984] Where y = 0, 1, ..., N s -1

[0985] When using Equation 22 above for intra-frame prediction, the curvature can be adjusted by changing the cuv value. cuv can be a real number equal to or greater than zero. For example, a larger cuv value results in a larger curvature, and the reference pixel's position can be shifted to the right. Alternatively, a smaller cuv value results in a smaller curvature, and the reference pixel's position can be shifted to the left (up to the x-position).

[0986] When the target block is N×M, cw iIt can be a parameter comprising N weights, where the parameter refers to the block height or the number of rows. Each weight can be a real number equal to or greater than zero. This can be achieved by adjusting cw. i This adjusts the position of the reference pixel used by the predicted pixel included in the corresponding row. For example, cw i As the value increases, the position of the reference pixel used by the predicted pixel in the i-th row can be shifted to the right. Optionally, cw i The smaller the value becomes, the more the position of the reference pixel can be moved to the left (up to the x position).

[0987] Therefore, the curvature parameter cuv and / or the weighting line parameter cw can be adjusted. i Combining these techniques allows for the execution of various forms of intra-frame prediction.

[0988] Figure 42 This is a diagram illustrating an embodiment of performing prediction in the direction from the top right edge to the bottom left edge by applying cuv=0.1, cw0=1.0, cw1=1.2, cw2=1.4 and cw3=1.6 to a current block of size 4×4.

[0989] Figure 43 This is shown as an application. Figure 42 cuv and cw i An illustration of an embodiment of the result, in which the position of the reference pixel used by the predicted pixel within the current block is obtained.

[0990] To generate predicted pixel values, the described interpolation prediction in units of 1 / N pel can be performed. N can be a positive integer.

[0991] For example, when the position of the reference pixel for predicting the target pixel is a positive integer, the predicted target pixel predSamples[x][y] can be derived from the reference pixel p(pos,-1). pos can refer to the position of the reference pixel.

[0992] For example, when the position of the reference pixel for the predicted target pixel is a real inter-frame unit, predSamples[x][y] can be derived as the number of interpolated predictions obtained by performing interpolation predictions in units of 1 / N pel on p(floor(pos),-1) and p(ceil(pos),-1). floor(pos) can be an integer value equal to or less than pos, and can refer to the maximum value. ceil(pos) can be an integer equal to or greater than pos, and can refer to the minimum value.

[0993] As mentioned above, for ease of calculation, p can be calculated before generating the predicted sample values. ref Convert to p 1,ref .

[0994] When the position pos of the reference pixel exceeds the maximum range of available reference pixels (in Figure 42 In the case where the value exceeds P(7,-1)), the calculated positions of all reference pixels can be used after being converted into their respective normalized values ​​by matching with the maximum range of available reference pixels.

[0995] For example, in the case of intra-frame prediction from the top left edge to the bottom right edge (type-1), as shown in Equation 23 below, the position of the reference pixel used to generate the prediction value at any position (x,y) within the prediction block can be determined according to the row unit.

[0996] [Equation 23]

[0997] The y-th row is p(pos, -1), where pos = x - 1 / 2 * (N) s -1-x+y)-cw y *cuv*(N s -x),

[0998] Where y = 0, 1, ..., N s -1

[0999] When using Equation 23 above for intra-frame prediction, the curvature can be adjusted by changing the cuv value. cuv can be a real number equal to or greater than zero. For example, a larger cuv value results in a larger curvature, and the reference pixel's position can be shifted to the left. Alternatively, a smaller cuv value results in a smaller curvature, and the reference pixel's position can be shifted to the right (up to the x-position).

[1000] When the target block is N×M, cw i It can be a parameter comprising N weights, where the parameter refers to the block height or the number of rows. Each weight can be a real number equal to or greater than zero. This can be achieved by adjusting cw. i This adjusts the position of the reference pixel used by the predicted pixel included in the corresponding row. For example, cw i As the value increases, the position of the reference pixel used by the predicted pixel in the i-th row can be shifted to the left. Optionally, cw i The smaller the value becomes, the more the position of the reference pixel can be moved to the right (up to the x position).

[1001] Therefore, the curvature parameter cuv and / or the weighting line parameter cw can be adjusted. i Combining these techniques allows for the execution of various forms of curved intra-frame prediction.

[1002] Figure 44This is a diagram illustrating an example of performing prediction in the direction from the top left edge to the bottom right edge (type-1) by applying cuv=0.1, cw0=1.0, cw1=1.2, cw2=1.4 and cw3=1.6 to a current block of size 4×4.

[1003] Figure 45 This is shown as an application. Figure 44 cuv and cw i An illustration of an embodiment of the result, in which the position of the reference pixel used by the predicted pixel within the current block is obtained.

[1004] To generate predicted pixel values, the described interpolation prediction in units of 1 / N pel can be performed. N can be a positive integer.

[1005] For example, when the position of the reference pixel for the predicted target pixel is a positive integer unit, the predicted target pixel predSamples[x][y] can be derived as the reference pixel p(pos,-1).

[1006] For example, when the position of the reference pixel for the predicted target pixel is in real units, predSamples[x][y] can be derived as an interpolated pr...

Claims

1. An image decoding method, comprising: Determine whether the prediction mode for the current block is intra-frame prediction; When the prediction mode for the current block is intra-frame prediction, determine the reference sample line for the current block; Derive the intra-prediction mode for the current block; Derive the reference sample points of the current block based on the reference sample point line of the current block; A prediction block is generated by performing intra-frame prediction on the current block based on the intra-frame prediction mode and the reference samples. as well as The reconstructed block is obtained based on the predicted block. The steps for deriving the intra-prediction mode of the current block include: Determine whether to derive the intra-prediction mode of the current block from the most probable mode (MPM). Specifically, when determining the intra-prediction mode of the current block from the MPMs, a single flag is decoded from the bitstream to determine whether the intra-prediction mode of the current block is derived from a first MPM list or a second MPM list. Specifically, based on the single flag, it is determined whether the intra-prediction mode of the current block is derived from a first MPM list or a second MPM list. In response to the single flag indicating that the intra-prediction mode of the current block is derived from the second MPM list, the MPM index is further decoded from the bitstream to determine the intra-prediction mode of the current block, wherein the MPM index specifies one of the MPMs included in the second MPM list. In response to determining that the intra prediction mode of the current block is not derived from the MPM, the intra prediction mode of the current block is derived based on information specifying one of the remaining intra prediction modes other than the MPM.

2. The method as described in claim 1, wherein, When the current block is one of the sub-blocks generated by partitioning a coded block, the MPM is derived based on the position of the coded block rather than the position of the current block.

3. The method as described in claim 1, in, In response to the intra-prediction mode of the current block being directional mode, the prediction samples are modified using a second reference sample. The predicted sample points are obtained based on a first reference sample point, wherein the first reference sample point is located in the direction of the intra-frame prediction mode from the predicted sample point. The second reference sample point is located in a direction different from the direction of the intra-prediction mode originating from the predicted sample point.

4. The method of claim 1, wherein, The reference sample line is selected from multiple reference sample line candidates based on information decoded from the bitstream. In response to the current block being one of the sub-blocks generated by partitioning the coded block, intra-frame prediction for the current block is invoked by utilizing only the first reference sample line candidate among the plurality of reference sample line candidates.

5. The method of claim 4, wherein, The number of candidate reference sample lines that can be used for the current block is determined based on whether the upper boundary of the current block corresponds to the boundary of the coding tree block.

6. The method of claim 1, wherein, When the current block is rectangular and the intra-prediction mode is DC mode, the intra-prediction of the current block is performed using the average value of the reference samples adjacent to the longer of the width and height of the current block.

7. An image encoding method, comprising: Determine the reference sample line for the current block; Determine the intra-prediction mode for the current block; The reference sample points of the current block are determined based on the reference sample point line of the current block; A prediction block is generated by performing intra-frame prediction on the current block based on the intra-frame prediction mode and the reference samples. The residual block of the current block is obtained by subtracting the predicted block from the original block; as well as The prediction mode information indicating whether the prediction mode of the current block is intra-frame prediction is encoded. The method further includes: Determine whether the intra-prediction mode of the current block is the same as one of the most probable modes (MPM). Specifically, when it is determined that the intra-prediction mode of the current block is the same as one of the MPMs, a flag used to select one of the first MPM list and the second MPM list is encoded into the bitstream. In response to the flag being encoded as indicating a second MPM list, the MPM index specifying one of the MPMs included in the second MPM list is also encoded into the bitstream. In response to determining that the intra prediction mode of the current block is not the same as any of the MPMs, information specifying one of the remaining intra prediction modes other than the MPMs that is the same as the intra prediction mode of the current block is encoded into the bitstream.

8. A method for transmitting a bit stream, comprising: A bitstream is generated by encoding the video using an image encoding method; as well as Send bit stream, in, Image encoding methods include: Determine the reference sample line for the current block; Determine the intra-prediction mode for the current block; Derive the reference sample points of the current block based on the reference sample point line of the current block; A prediction block is generated by performing intra-frame prediction on the current block based on the intra-frame prediction mode and the reference samples. The residual block of the current block is obtained by subtracting the predicted block from the original block; and The prediction mode information indicating whether the prediction mode of the current block is intra-frame prediction is encoded. The method further includes: Determine whether the intra-prediction mode of the current block is the same as one of the most probable modes (MPM). Specifically, when it is determined that the intra-prediction mode of the current block is the same as one of the MPMs, a flag used to select one of the first MPM list and the second MPM list is encoded into the bitstream. In response to the flag being encoded as indicating a second MPM list, the MPM index specifying one of the MPMs included in the second MPM list is also encoded into the bitstream. In response to determining that the intra prediction mode of the current block is not the same as any of the MPMs, information specifying one of the remaining intra prediction modes other than the MPMs that is the same as the intra prediction mode of the current block is encoded into the bitstream.

Citation Information

Patent Citations

  • Image encoding / decoding method and device, and recording medium storing bitstream

    CN109792515A