Image encoding / decoding apparatus and apparatus for transmitting image data

By introducing the curve intra-frame prediction mode and reference pixel position information, the problem of low intra-frame prediction efficiency in high-resolution image encoding/decoding is solved, achieving more efficient image data processing and reducing transmission and storage costs.

CN117221582BActive Publication Date: 2026-07-10LX 半导体科技有限公司

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
LX 半导体科技有限公司
Filing Date
2017-06-15
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing technologies suffer from low efficiency in intra-frame prediction during the encoding/decoding of high-resolution and high-quality images, especially in the prediction of straight lines, which leads to increased data volume and higher transmission and storage costs.

Method used

The curve intra-frame prediction mode is adopted. By specifying the position information of the reference pixel and the curvature parameter or weight parameter, intra-frame prediction is performed in combination with pixel groups, horizontal line units, vertical line units, diagonal units and sub-block units, supporting prediction in both straight and curved directions.

Benefits of technology

It improves the efficiency of image encoding/decoding, especially intra-frame prediction, reduces data volume, and lowers transmission and storage costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117221582B_ABST
    Figure CN117221582B_ABST
Patent Text Reader

Abstract

The present application relates to an image encoding / decoding apparatus and an apparatus for transmitting image data. A decoding apparatus for image decoding according to the present application includes a memory; and at least one processor connected to the memory, the at least one processor configured to obtain a coding block by partitioning an image, determine whether a size of the coding block belongs to a predetermined range, determine a partition type of the coding block based on whether the size of the coding block belongs to the predetermined range, derive a current coding block partitioned from the coding block based on the partition type of the coding block, and reconstruct the current coding block.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the original invention patent application No. 201780039313.X (International Application No.: PCT / KR2017 / 006241, Application Date: June 15, 2017, Invention Title: Intra-frame Prediction Method and Apparatus). 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 intra-frame prediction (more specifically, curve intra-frame prediction). 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 increased across various application areas. However, higher resolution and quality image data result in a larger data volume compared to traditional image data. Therefore, transmission and storage costs 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 issues arising from the increasing resolution and quality of image data, an efficient image encoding / decoding technology is 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; transform and quantization techniques for compressing the energy of residual signals; entropy coding techniques that assign short codes to values ​​with high frequency of occurrence and long codes to values ​​with low frequency of occurrence; and so on. Image data can be efficiently compressed using such image compression techniques and can then be transmitted or stored.

[0005] In traditional intra-frame prediction, when performing directional intra-frame prediction, only linear direction prediction is used, which limits the ability to enhance coding efficiency. Summary of the Invention

[0006] Technical issues

[0007] The present invention aims to provide an encoding / decoding method and apparatus for improving the efficiency of encoding / decoding images.

[0008] The present invention aims to provide an encoding / decoding method and apparatus for improving the efficiency of intra-frame prediction.

[0009] The present invention aims to provide a method and apparatus for performing linear direction prediction and / or curvilinear direction prediction when performing intra-frame prediction.

[0010] Technical solution

[0011] An image decoding method according to the present invention may include: decoding information about intra-frame prediction; and generating a prediction block by performing intra-frame prediction on the current block based on the information about intra-frame prediction.

[0012] According to the image decoding method of the present invention, the information about intra-frame prediction may include information about the intra-frame prediction mode, and the intra-frame prediction mode may include a curve intra-frame prediction mode.

[0013] According to the image decoding method of the present invention, the intra-frame prediction mode of the current block can be a curved intra-frame prediction mode, and the information about intra-frame prediction can include direction information.

[0014] According to the image decoding method of the present invention, the information regarding intra-frame prediction may include information specifying the position of a reference pixel.

[0015] According to the image decoding method of the present invention, the current block may include at least one pixel group (wherein the at least one pixel group includes at least one pixel), and information specifying the position of a reference pixel may be allocated in units of pixel groups.

[0016] According to the image decoding method of the present invention, a pixel group can be configured as a unit of at least one of pixel unit, horizontal line unit, vertical line unit, diagonal unit, right angle unit and sub-block unit, wherein the pixel unit, horizontal line unit, vertical line unit, diagonal unit, right angle unit and sub-block unit are all included in the current block.

[0017] According to the image decoding method of the present invention, the information specifying the position of the reference pixel may include information about at least one curvature parameter or at least one weight parameter.

[0018] According to the image decoding method of the present invention, information specifying the position of a reference pixel can be decoded based on at least one neighboring block of the current block.

[0019] According to the image decoding method of the present invention, the at least one curvature parameter or the at least one weight parameter can be decoded by using default values ​​and incremental values.

[0020] According to the image decoding method of the present invention, the information regarding intra-frame prediction may include information regarding the application of curve intra-frame prediction. The information regarding the application of curve intra-frame prediction may be decoded according to predetermined units, and the predetermined units may be at least one of video, sequence, frame, strip, parallel block, coding tree unit, coding unit, prediction unit, and transform unit.

[0021] An image decoding apparatus according to the present invention may include: a decoder for decoding information about intra-frame prediction; and an intra-frame predictor for generating a prediction block by performing intra-frame prediction on the current block based on the information about intra-frame prediction.

[0022] According to the image decoding apparatus of the present invention, information about intra-frame prediction may include information about intra-frame prediction modes, and the intra-frame prediction modes may include curve intra-frame prediction modes.

[0023] An image coding method according to the present invention may include: generating a prediction block by performing intra-frame prediction on the current block; and encoding information about the intra-frame prediction.

[0024] According to the image coding method of the present invention, information about intra-frame prediction may include information about the intra-frame prediction mode, and the intra-frame prediction mode may include a curve intra-frame prediction mode.

[0025] According to the image coding method of the present invention, the intra-frame prediction mode of the current block can be a curved intra-frame prediction mode, and the information about intra-frame prediction can include direction information.

[0026] According to the image encoding method of the present invention, the information regarding intra-frame prediction may include information specifying the position of a reference pixel.

[0027] According to the image encoding method of the present invention, the current block may include at least one pixel group (wherein the at least one pixel group includes at least one pixel), and information specifying the position of a reference pixel may be allocated in units of pixel groups.

[0028] According to the image encoding method of the present invention, a pixel group can be configured as a unit of at least one of pixel unit, horizontal line unit, vertical line unit, diagonal unit, right angle unit and sub-block unit, wherein the pixel unit, horizontal line unit, vertical line unit, diagonal unit, right angle unit and sub-block unit are all included in the current block.

[0029] According to the image encoding method of the present invention, the information specifying the position of the reference pixel may include information about at least one curvature parameter or at least one weight parameter.

[0030] According to the image encoding method of the present invention, information specifying the position of a reference pixel can be encoded based on at least one neighboring block of the current block.

[0031] According to the image encoding method of the present invention, the at least one curvature parameter or the at least one weight parameter can be encoded by using default values ​​and incremental values.

[0032] An image encoding apparatus according to the present invention may include: an intra-predictor for generating a prediction block by performing intra-prediction on a current block; and an encoder for encoding information about the intra-prediction.

[0033] According to the image coding apparatus of the present invention, information about intra-frame prediction may include information about intra-frame prediction modes, which may include curve-based intra-frame prediction modes.

[0034] A recording medium according to the present invention can store a bitstream generated by the image encoding method according to the present invention.

[0035] Technical effect

[0036] This invention can improve the efficiency of image encoding / decoding.

[0037] This invention can improve the encoding / decoding efficiency of intra-frame prediction of images.

[0038] This invention enables intra-frame prediction to be performed using linear direction prediction and / or curved direction prediction. Attached Figure Description

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

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

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

[0042] Figure 4 This is a diagram illustrating the form that a prediction unit (PU) may be included in a coding unit (CU).

[0043] Figure 5 This is a diagram illustrating the form of a transform unit (TU) that may be included in a coding unit (CU).

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

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

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

[0047] Figure 9 This is a diagram used to explain the process of transformation.

[0048] Figure 10 It is a diagram used to explain the scanning of the transformation coefficients in quantization.

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

[0050] Figure 12 This is a diagram illustrating the operation of a coding device that performs an intra-frame prediction method according to the present invention.

[0051] Figure 13 This is a diagram illustrating the operation of a decoding device that performs an intra-frame prediction method according to the present invention.

[0052] Figure 14 This illustrates a reference pixel array p that can be used to configure intra-frame prediction. ref A diagram showing the pixels.

[0053] Figure 15 This is a diagram illustrating an embodiment in which "unavailable reference pixel candidate" is replaced with "available reference pixel candidate" pixel values.

[0054] Figure 16 This example illustrates the allocation of block size N. s The threshold ntraHorVerDistThresh is shown in the diagram.

[0055] Figure 17 This is a diagram showing whether filtering is performed on the reference pixel based on the prediction mode according to the current block size and orientation.

[0056] Figure 18 This is a diagram illustrating intra-frame prediction when the intra-prediction mode is the non-directional plane mode INTRA_PLANAR.

[0057] Figure 19 This is a diagram illustrating intra-frame prediction when the intra-frame prediction mode is the non-directional DC mode INTRA_DC.

[0058] Figure 20 This is a diagram illustrating an embodiment of the angle between each linear direction mode and the vertical direction in the intra-prediction mode predModeIntra, which includes 33 linear direction modes.

[0059] Figure 21 It shows that from p ref Generate a one-dimensional reference pixel array p 1,ref An example illustration.

[0060] Figure 22 This shows the generation of p for a 4×4 block when the straight line direction mode is horizontal. 1,ref An illustration of an embodiment.

[0061] Figure 23 This shows the generation of p for a 4×4 block when the straight line direction mode is vertical. 1,ref An illustration of an embodiment.

[0062] Figure 24 This is a diagram illustrating an embodiment of filtering the boundary rows / columns of a prediction block when the prediction mode is vertical.

[0063] Figure 25 This is a diagram illustrating an embodiment that uses reference pixels with different angles based on the position of pixels within a prediction block.

[0064] Figure 26 This is an illustration of an embodiment showing reference pixels for multiple lines, wherein the reference pixels are used for intra-frame prediction of the current block.

[0065] Figure 27 This is a diagram illustrating an embodiment of performing curve prediction in a direction from the upper right to the lower left by applying cuv=0.1, cw0=1.0, cw1=1.2, cw2=1.4 and cw3=1.6 to a current block with a size of 4×4.

[0066] Figure 28 It is shown as Figure 27 Applications of CUV and CW i An illustration of an embodiment where the predicted pixel within the current block is used to determine the position of the reference pixel.

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

[0068] Figure 30 It is shown as Figure 29 Applications of CUV and CW i An illustration of an embodiment where the predicted pixel within the current block is used to determine the position of the reference pixel.

[0069] Figure 31 This is a diagram illustrating an embodiment of performing curve prediction in a direction from the lower left to the upper right by applying cuv=0.1, cw0=1.0, cw1=1.2, cw2=1.4 and cw3=1.6 to a current block with a size of 4×4.

[0070] Figure 32 It is shown as Figure 31 Applications of CUV and CW iAn illustration of an embodiment where the predicted pixel within the current block is used to determine the position of the reference pixel.

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

[0072] Figure 34 It is shown as Figure 33 Applications of CUV and CW i An illustration of an embodiment where the predicted pixel within the current block is used to determine the position of the reference pixel.

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

[0074] Figure 36 It is shown as Figure 35 Applications of CUV and CW i An illustration of an embodiment where the predicted pixel within the current block is used to determine the position of the reference pixel.

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

[0076] Figure 38 It is shown as Figure 37 Applications of CUV and CW i An illustration of an embodiment where the predicted pixel within the current block is used to determine the position of the reference pixel.

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

[0078] Figure 40 It is shown as Figure 39 Applications of CUV and CW i An illustration of an embodiment where the predicted pixel within the current block is used to determine the position of the reference pixel.

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

[0080] Figure 42 It is shown as Figure 41 Applications of CUV and CW i An illustration of an embodiment where the predicted pixel within the current block is used to determine the position of the reference pixel.

[0081] Figure 43 This is a diagram illustrating another embodiment of intra-frame prediction of curves.

[0082] Figure 44 This is a diagram illustrating an embodiment of a syntax structure for a bitstream including information about intra-frame prediction according to the present disclosure.

[0083] Figure 45 This is an example showing the relationship with the current block B. c Two adjacent blocks B that have been encoded / decoded a and B b The illustration.

[0084] Figure 46 This is a diagram showing the encoding / decoding of the intra-prediction mode for the current block of chroma components. Detailed Implementation

[0085] Invention Model

[0086] 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 only by the appended claims (and, where appropriate, the full scope of the equivalents claimed in the claims).

[0087] 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 limiting 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.

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

[0089] 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 constructed 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 may be combined to form a single component, or a single component may 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.

[0090] 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 within the embodiments of the invention or within the scope of the invention.

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

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

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

[0094] Terminology Description

[0095] Encoder: can be interpreted as a device that performs encoding.

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

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

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

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

[0100] 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 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's size. 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.

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

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

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

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

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

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

[0107] Prediction Unit: This can be understood as the basic unit used when performing inter-frame or intra-frame prediction and compensation for 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 derived from a prediction unit 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.

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

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

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

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

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

[0113] 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 for encoding / decoding. For example, (mvX, mvY) can indicate a motion vector, where mvX indicates the horizontal component and mvY indicates the vertical component.

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

[0115] Motion vector candidate list: This can be interpreted as a list configured using motion vector candidates.

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

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

[0118] Merge candidate list: This can mean a list of merge candidates configured using merge candidate settings.

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

[0120] 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 motion information among multiple motion information entries for a merge candidate.

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

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

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

[0124] Delta quantization parameter: can be interpreted as the difference between the quantization parameter of the encoding / decoding target unit and the predicted quantization parameter.

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

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

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

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

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

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

[0131] Non-default matrix: This can mean a quantization matrix sent by the user with a signal when it is not predefined in the encoder and decoder.

[0132] 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 coding tree unit can be used as a term to indicate a pixel block (where a pixel block is a processing unit in the decoding / encoding process of an image, such as a partition of the input image).

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

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

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

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

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

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

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

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

[0141] When the value of the motion vector is not an integer, the motion prediction unit 111 and the motion compensation unit 112 can generate a prediction block by applying an interpolation filter 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, the current frame reference mode can be understood as a prediction mode using a pre-constructed region of the current frame with the coding target block. To specify the pre-constructed region, a motion vector 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 determined by using the reference frame index of the coding target block.

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

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

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

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

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

[0147] 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 / code (VLC) table. Furthermore, the entropy coding unit 150 can derive a binaryization method for the target symbol and a probability model for the target symbol / bits, and can subsequently perform arithmetic coding by using the derived binaryization method or the derived probability model.

[0148] 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 vectors. 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, based 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.

[0149] Encoding parameters may include information such as syntax elements encoded by the encoder and signaled to the decoder, and may include information that can be derived 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.

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

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

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

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

[0154] 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 intensity. Furthermore, horizontal and vertical filtering can be processed in parallel when a deblocking filter is applied.

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

[0156] 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 transmitted via a signal 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.

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

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

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

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

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

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

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

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

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

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

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

[0168] 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 obtained 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 decoded 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 can indicate that the encoder entropy-encodes the corresponding flag or index and includes it in the bitstream, and can also indicate that the decoder entropy-decodes the corresponding flag or index from the bitstream.

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

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

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

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

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

[0174] Here, the partitioning of the 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 the LCU can be 0, and the depth of the minimum coding unit (SCU) can be a predetermined maximum depth. Here, the LCU can be a coding unit with the aforementioned maximum size, and the SCU can be a coding unit with the minimum size.

[0175] Whenever LCU 310 begins to be partitioned, and the width and height of the CU are reduced 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 with a size of 2N×2N can be partitioned into multiple CUs of size N×N. The size of N is halved whenever the depth increases by 1.

[0176] 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 a quadtree format.

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

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

[0179] Furthermore, partition information of a CU can indicate whether 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.

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

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

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

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

[0184] 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 can be supported.

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

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

[0187] 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-sized 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.

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

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

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

[0191] 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 a signal and can be derived from the size / shape information of the CUs.

[0192] Furthermore, the coding unit may not be divided into transform units, and the coding unit and transform unit may have the same size.

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

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

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

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

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

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

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

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

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

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

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

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

[0205] 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 coded / decoded target block. Here, the coded / decoded target block can mean the current block, and can mean at least one of a coded block, a prediction block, and a 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, the filter coefficient values, or the filter strength.

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

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

[0208] 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-unit interpolation can be performed to generate prediction sample values.

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

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

[0211] 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 both, 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.

[0212] 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 only in the forward direction. When the target image is a B-frame, the image can be encoded using inter-frame prediction or motion compensation using reference frames in both the forward and backward directions. Alternatively, the image can be encoded using reference frames in either the forward or backward direction. 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.

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

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

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

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

[0217] 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 motion information of col-blocks, or both. A col-block can be a block within a previously reconstructed col-frame that relates to the spatial location of the encoded / decoded target block. Reconstructed neighboring blocks can be blocks within the current frame, or 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.

[0218] 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 respectively derive 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 list of reference frames.

[0219] The method for obtaining 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 mode, etc. Here, merging mode can be referred to as motion merging mode.

[0220] For example, when AMVP is applied as a prediction mode, the encoding device 100 and the 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 reconstructed 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 reconstructed neighboring blocks can be referred to as spatial motion vector candidates.

[0221] 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 a bitstream signal.

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

[0223] 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 transmitted 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 from the sum of the decoded MVD and the motion vector candidates.

[0224] 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 a signal through 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.

[0225] As another method for deriving motion information, a merging pattern is used. A merging pattern can mean 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) motion vectors, 2) reference frame indexes, and 3) inter-frame prediction indicators. The prediction indicators may indicate unidirectional (L0 prediction, L1 prediction) or bidirectional prediction.

[0226] 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 via a signal. 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.

[0227] 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 of motion information existing in the 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.

[0228] The skip mode can be a mode that applies the mode information of neighboring blocks themselves to the encoding / decoding target block. The skip mode can be one of the modes used for inter-frame prediction. When the 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 encoding target block, and can transmit this information as a signal to the decoding device 200 via a bitstream. The encoding device 100 may not transmit other information (e.g., syntax element information) as a signal 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.

[0229] 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 by performing 1D transforms along the horizontal and / or vertical directions, or they can perform 2D non-separable transforms on the residual signal.

[0230] For example, in the case of 1D transformations, the DCT and DST types used in the transformation 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 transformation by composing the transformation set can be derived.

[0231] [Table 1]

[0232] Transform set Transformation 0 DST_VII, DCT-VIII 1 DST-VII, DST-I 2 DST-VII, DCT-V

[0233] [Table 2]

[0234] Transform set Transformation 0 DST_VII, DCT-VIII, DST-I 1 DST-VII, DST-I, DCT-VIII 2 DST-VII, DCT-V, DST-I

[0235] 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 composed 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 unary binaryization can be used to entropy encode / decode information about which transform method among the three transforms in a transform set is used. Here, to perform at least one of the vertical and horizontal transforms, entropy encoding / decoding can be performed on information indicating which transform among the transforms of the transform set is used.

[0236] 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 1D transformation along the horizontal and / or vertical directions, or a non-separable 2D transformation. The transformation information used can be transmitted via a signal 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 a 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 via a signal, and this information can be applied to at least one residual signal via intra-frame prediction or inter-frame prediction.

[0237] 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 position, 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.

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

[0239] 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 derived by default by the encoder / decoder based on at least one current / nearby coded information.

[0240] The residual signal obtained after intra-frame prediction or inter-frame prediction is quantized after the first and / or second transforms, and the quantized transform coefficients are entropy encoded. 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.

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

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

[0243] 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 sent 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 a 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.

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

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

[0246] [Table 3]

[0247]

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

[0249] [Table 4]

[0250]

[0251] 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 sent using signals.

[0252] 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 a bitstream signal, and this information can be transmitted via a signal in units of at least one of sequence, frame parameter, or stripe (segmentation). 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.

[0253] When the block size is within a predetermined range, partitioning can be performed only 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 only 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 a signal in units of at least one of sequence, frame parameter, or strip (segment). 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 only in a binary tree format. In this case, split_flag can be a flag indicating whether partitioning is performed in a binary tree format.

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

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

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

[0257] Figure 12 This is a diagram illustrating the operation of a coding device that performs an intra-frame prediction method according to the present invention.

[0258] exist Figure 12 In step S1201, reference pixels for intra-frame prediction can be configured. Subsequently, in step S1202, intra-frame prediction can be performed, and in step S1203, information about the intra-frame prediction can be encoded.

[0259] Figure 13 This is a diagram illustrating the operation of a decoding device that performs an intra-frame prediction method according to the present invention.

[0260] exist Figure 13 In step S1301, information about intra-frame prediction can be decoded. Subsequently, in step S1302, reference pixels for intra-frame prediction can be configured, and in step S1303, intra-frame prediction can be performed.

[0261] First, refer to Figures 14 to 17 The steps for configuring reference pixels for intra-frame prediction are described in detail (steps S1201 and S1302).

[0262] Figure 14 This illustrates a reference pixel array p that can be used to configure intra-frame prediction. ref A diagram showing the pixels.

[0263] like Figure 14 As shown, the current block B, which can be used as the target block for encoding / decoding, can be configured by using pixels within neighboring blocks that have already been encoded / decoded. c The reference pixels for intra-frame prediction. For example, the referenced neighboring block can be a block located above and / or to the left of the current block, but is not limited to this. The referenced neighboring block can be a block included in the same frame, wherein the current block is included in the same frame. When the size of the current block is N×M, the number of reference pixels can be a positive integer including (2×N+2×M+1).

[0264] To configure a reference pixel, an availability check of pixels in neighboring blocks can be performed. This check can be performed in a predetermined direction. For example, for an availability check, a scan can be performed from the bottom-left pixel to the top-right pixel. Alternatively, a scan can be performed in the opposite direction. Alternatively, scans can be performed separately for the left-nearest pixel and the top-nearest pixel in different directions.

[0265] For example, when a reference pixel candidate for the current block is outside the frame, the corresponding reference pixel candidate can be marked as "unavailable".

[0266] For example, when a reference pixel candidate for the current block belongs to another stripe, the corresponding reference pixel candidate can be marked as "unavailable".

[0267] For example, when the reference pixel candidate of the current block belongs to a neighboring block that has been encoded / decoded by inter-frame prediction or constrained intra-frame prediction, the corresponding reference pixel candidate can be marked as "unavailable".

[0268] Reference pixel candidates marked as "unavailable" (hereinafter referred to as "unavailable reference pixel candidates" or "unavailable reference pixels") can be replaced with available reference pixels.

[0269] Figure 15 This is a diagram illustrating an embodiment in which "unavailable reference pixel candidate" is replaced with "available reference pixel candidate" pixel values.

[0270] exist Figure 15 In the diagram, grayscale pixels indicate available reference pixels, and blank pixels indicate unavailable reference pixels. Figure 15 In the middle, availability checks can be performed in the direction from the bottom left pixel to the top right pixel.

[0271] Figure 15 (a) shows when an unavailable reference pixel exists in the reference pixel array p ref An illustration of an embodiment where an unavailable reference pixel is replaced when the reference pixel is in the middle (in other words, in the middle of the available reference pixels A and B).

[0272] exist Figure 15 In (a), the unusable reference pixel (P) can be replaced by the value of the reference pixel A adjacent to the first unusable reference pixel in the available reference pixels of the reference pixel array. pad =P prev =A). P pad P represents the pixel value used for filling. prev This indicates the previously available neighboring reference pixel.

[0273] Optionally, in Figure 15In (a), an unavailable reference pixel can be replaced by a pixel value derived using at least two available reference pixels. For example, available reference pixels located at either end of an unavailable reference pixel can be used. For example, in Figure 15 In (a), the value of an unavailable reference pixel can be replaced by using the pixel values ​​of available reference pixels A and B. For example, the unavailable reference pixel can be replaced by using the average or weighted sum of the pixel values ​​of available reference pixels A and B. In this specification, a weighted sum can be used as an example of a weighted average.

[0274] Alternatively, the value of an unavailable reference pixel can be replaced with any value between the pixel values ​​of available reference pixels A and B. Here, values ​​that are different from each other can be used to replace the unavailable reference pixel. For example, the closer an unavailable reference pixel is to reference pixel A, the more likely it is to be replaced with a pixel value closer to that of pixel A. Similarly, the closer an unavailable reference pixel is to reference pixel B, the more likely it is to be replaced with a pixel value closer to that of pixel B. In other words, the pixel value of an unavailable reference pixel can be determined based on the distance from the unavailable reference pixel to available reference pixels A and / or B.

[0275] At least one of the methods described above can be selectively applied to replace unavailable reference pixels. The method of replacing unavailable reference pixels can be transmitted by signaling information included in the bitstream, or a method predetermined by the encoder and decoder can be used. Optionally, the method of replacing unavailable reference pixels can be derived by a predetermined method. For example, the method of replacing unavailable reference pixels can be selected based on the difference between the pixel values ​​of available reference pixels A and B and / or the number of unavailable reference pixels. For example, the method of replacing unavailable reference pixels can be selected based on comparing the difference between the pixel values ​​of two available reference pixels with a threshold and / or comparing the number of unavailable reference pixels with a threshold. For example, when the difference between the pixel values ​​of two available reference pixels is greater than a threshold and / or the number of unavailable reference pixels is greater than a threshold, the unavailable reference pixels can be replaced with values ​​that are different from each other.

[0276] The selection of a method for replacing unusable reference pixels can be performed according to predetermined units. For example, the selection of a method for replacing unusable reference pixels can be performed on a unit based on at least one of video, sequence, frame, strip, parallel block, coding tree unit, coding unit, prediction unit, and transform unit. Here, the selection of a method for replacing unusable reference pixels can be based on information transmitted by signal according to the aforementioned predetermined units, or can be derived according to the aforementioned predetermined units. Alternatively, a method predetermined by the encoder and decoder can be applied.

[0277] Figure 15(b) shows the situation when the available reference pixels do not exist in the reference pixel array p. ref An illustration of an embodiment where an unavailable reference pixel is replaced in front of an unavailable reference pixel.

[0278] exist Figure 15 In (b), an unusable reference pixel can be replaced by filling in the pixel value of a usable reference pixel A adjacent to the last unusable reference pixel. For example, in Figure 15 In (b), the pixel value of pixel A, which serves as the first available reference pixel within the scan sequence, can be used to replace the first unavailable reference pixel in the reference pixel array. After determining the pixel value of the first unavailable reference pixel in the reference pixel array, a reference can be applied. Figure 15 The method described in (a) is as follows. Therefore, the pixel value of the first available reference pixel A can be used to replace the unavailable reference pixels (P) located from the first unavailable reference pixel within the scan sequence to the pixel immediately preceding the first available reference pixel A. pad =P prev =A). Furthermore, the pixel value of the available reference pixel B can be used to replace the unavailable reference pixel (P) located following the available reference pixel B. pad =P prev =B).

[0279] As in Figure 15 Cases not shown, for example, when unavailable reference pixels exist in the reference pixel array p ref In this case, any value can be used to replace all unavailable reference pixels. Here, as an arbitrary value, the middle value of the range of pixel values ​​that the reference pixel can have can be used (e.g., in a pixel with 8 bits as bit depth B). d (2 Bd-1 =128, B d In the case of an image with 0 and 2 (e.g., 8). Alternatively, the image can be set to 0 and 2. Bd Positive integer values ​​between these ranges can be used as arbitrary values.

[0280] Filtering can be performed on the reference pixel before performing intra-frame prediction using the reference pixel.

[0281] A reference pixel array p was generated from neighboring blocks that had already been encoded / decoded. ref Then, based on the current block size N sFiltering for a reference pixel can be performed using the intra-prediction mode and / or intra-prediction mode. For example, when the intra-prediction mode of the current block is directional prediction mode, filtering can be performed based on the difference between the vertical directional mode and / or the horizontal directional mode. For example, when the intra-prediction mode intraPredMode of the current block is directional prediction mode, the smaller of the difference between the vertical directional mode (assuming 33 directional modes, index = 26) and the horizontal directional mode (assuming 33 directional modes, index = 10) can be calculated: minDistVerHor = Min(Abs(intraPredMode-26), abs(intraPredMode-10)). Filtering can be performed when the smaller value minDistVerHor is greater than the threshold intraHorVerDistThresh assigned to the corresponding block size (i.e., minDistVerHor > intraHorVerDistThresh). Filtering can be omitted when the smaller value minDistVerHor is less than or equal to the threshold.

[0282] Figure 16 This example illustrates the allocation of block size N. s The threshold ntraHorVerDistThresh is shown in the diagram.

[0283] For example, for a 4×4 block, 10 can be assigned as the threshold; for an 8×8 block, 7 can be assigned as the threshold; for a 16×16 block, 1 can be assigned as the threshold; for a 32×32 block, 0 can be assigned as the threshold; and for a 64×64 block, 10 can be assigned as the threshold. Figure 16 The threshold is an example; any threshold that is the same as or different from each other can be set as the threshold, depending on the block size. The threshold based on the block size can be a value predetermined by the encoder and decoder. Alternatively, the threshold can be a value derived based on information transmitted via signals through the bitstream and / or based on internal parameters used during encoding / decoding.

[0284] Figure 17 This is a diagram showing whether filtering is performed on the reference pixel based on the prediction mode according to the current block size and orientation.

[0285] like Figure 17 As shown, for the current block with a size of 8×8, 16×16, or 32×32, whether to perform filtering on the reference pixel can be determined based on the direction prediction mode. The X mark indicates that filtering is not performed, and the O mark indicates that filtering is performed.

[0286] According to reference Figure 14 and Figure 15 The described scan sequence can be configured according to p refThe filtering is performed sequentially from the bottom left pixel to the top right pixel. Alternatively, the filtering can be performed in any order for p. ref Filtering can be performed using N reference pixels. Here, filtering for the first reference pixel (bottom left pixel) and the last reference pixel (top right pixel) can be skipped. The size of the filter tap can be a positive integer greater than 2 and including 3. When the filter tap size is 3, the filter coefficients can be, for example, 1 / 4, 1 / 2, and 1 / 4. Filtering can be performed using N reference pixels. The N reference pixels can include filtered reference pixels or reference pixels before filtering. For example, the pixel value of the target pixel can be used to replace the weighted sum (or weighted average) of the N reference pixels. Here, the size of the filter tap can be determined based on the number N, and the filter coefficients can be the weights used for the weighted sum. The weights can be determined based on the positions of the target pixel and the reference pixels used for filtering. For example, the closer the target pixel is to the reference pixel used for filtering, the larger the weight can be applied.

[0287] As another embodiment of applied filtering, bilinear interpolation filtering can be performed on the current block whose block size is equal to or greater than a predetermined size. For example, for a block whose block size is equal to or greater than a predetermined size N... S The current block can calculate the quadratic difference in the vertical and / or horizontal directions. For example, the quadratic difference in the vertical direction can be calculated as |p ref (-1, -1)-2×p ref (-1, N) s / 2)+p ref (-1, N) s The calculated quadratic difference can be compared with various predetermined thresholds. This can be based on bit depth B. d Determine each predetermined threshold. For example, a predetermined threshold could be 2. Bd-C Here, C can be either 1 or B. d Any integer between [values]. Filtering can be performed based on the comparison between the calculated quadratic difference and various predetermined thresholds.

[0288] For example, filtering can be performed when Equation 1 is satisfied.

[0289] Equation 1

[0290] |p ref (-1, -1)-2×p ref (N s -1, -1)+p ref (2×N s -1, -1)|<2 Bd-C and / or

[0291] |p ref (-1, -1)-2×p ref(-1, N) s -1)+p ref (-1, 2×N) s -1)|<2 Bd-C

[0292] (B d It is the bit depth, 1 <= C <= B d (positive integers)

[0293] When Equation 1 above is satisfied, the pixel value of the filtered target pixel can be calculated by performing bilinear interpolation using two reference pixels. The two pixels used for bilinear interpolation can be, for example, reference pixels located at opposite ends of the reference pixel array in the vertical or horizontal direction. The interpolation coefficients used for bilinear interpolation can be determined, for example, based on the positions of the two reference pixels and the filtered target pixel. Filtering using bilinear interpolation can be performed, for example, by using the following Equation 2.

[0294] Equation 2

[0295] p ref (-1, y) = (N) s -1-y) / N s ×p ref (-1, -1) + (y+1) / N s ×p ref (-1, N) s -1),

[0296] Where y = 0, ..., N s -1, and / or

[0297] p ref (x, -1) = (N) s -1-x) / N s ×p ref (-1, -1) + (x+1) / N s ×p ref (N s -1, -1),

[0298] Where x = 0, ..., N s -1

[0299] As described above, when a reference pixel for intra-frame prediction is configured in steps S1201 and S1302, intra-frame prediction can be performed using the reference pixel in steps S1202 and S1303.

[0300] In order to perform intra prediction for the current block, an intra prediction mode must be determined. The encoding device can perform intra prediction by selecting a single intra prediction mode from a plurality of intra prediction modes. The decoding device can perform intra prediction by decoding the intra prediction mode of the current block from information sent by the encoder using signals. The decoding of the intra prediction mode can be derived by decoding the information about intra prediction, and the above process will be described below using the description of step S1301.

[0301] The following will refer to Figures 18 to 43 The steps S1202 and S1303 for performing intra-frame prediction using reference pixels are described in detail.

[0302] Figure 18 This is a diagram illustrating intra-frame prediction when the intra-prediction mode is the non-directional plane mode INTRA_PLANAR.

[0303] When the intra-prediction mode is the non-directional planar mode INTRA_PLANAR, the prediction block can be calculated by a weighted sum or weighted average of N reference pixels. The N reference pixels are determined based on the position (x, y) of the predicted target pixel within the prediction block. N can be a positive integer greater than 1, for example, 4.

[0304] like Figure 18 As shown, when N=4 and the block size N s When the value is 4, the predicted value of the pixel located at (x, y) within the prediction block can be determined by the weighted sum of the upper reference pixel c, the left reference pixel b, the upper right corner pixel d of the current block, and the lower left corner pixel d of the current block. The following equation 3 can be used when calculating the weighted sum.

[0305] Equation 3

[0306]

[0307] Figure 19 This is a diagram illustrating intra-frame prediction when the intra-frame prediction mode is the non-directional DC mode INTRA_DC.

[0308] When the intra-prediction mode is non-directional DC mode INTRA_DC, the average pixel values ​​of the reference pixels adjacent to the current block can be used to fill all pixel values ​​within the prediction block. Equation 4 below can be used to calculate the average value.

[0309] Equation 4

[0310]

[0311] In DC mode, filtering can be performed on the N rows / columns to the left and / or top of the current block, where N can be an integer equal to or greater than 1. For example, when N = 1, such as Figure 19 As shown, filtering can be performed on the first row above and / or the first column to the left of the current block. Filtering can be performed, for example, by using the following Equation 5.

[0312] Equation 5

[0313]

[0314]

[0315]

[0316] In DC mode, it can be achieved by using V dc The first prediction block is obtained by calculating the value, and the final prediction block is obtained by applying a filter to N rows and / or columns of the first prediction block. Optionally, after calculating V... dc After the value is calculated, the position of the target pixel within the predicted block can be determined by adjusting the V value. dc The value is assigned to the filtered value or by V dc The final predicted block is obtained by directly assigning the pixel value to the corresponding pixel.

[0317] When the intra-frame prediction mode is directional, the current block can be encoded / decoded based on N linear direction patterns. N can be a positive integer including 33, 65, etc. For example, in Figure 17 In this context, N is 33 (from mode 2 to mode 34), and each mode has a different direction.

[0318] Figure 20 This is a diagram illustrating an embodiment of the angle between each linear direction mode and the vertical direction in the intra-prediction mode predModeIntra, which includes 33 linear direction modes.

[0319] In addition to the straight-line direction mode, the current block can be encoded / decoded based on M curve modes (M is a positive integer). The number of M curve modes can be determined by using parameters. For example, curvature parameter cuv and / or weight parameter cw can be used as parameters.

[0320] like Figure 20As exemplified, mode 35 can represent a curve pattern from the upper right to the lower left, mode 36 can represent a curve pattern from the upper left to the lower right (type-1), mode 37 can represent a curve pattern from the lower left to the upper right, mode 38 can represent a curve pattern from the upper left to the lower right (type-2), mode 39 can represent a curve pattern from the top to the lower left, mode 40 can represent a curve pattern from the top to the upper left, mode 41 can represent a curve pattern from the left to the upper right, and mode 42 can represent a curve pattern from the left to the lower right.

[0321] for Figure 20 The various curve patterns can perform various curve predictions based on curvature parameters and / or weight parameters.

[0322] The curvature and / or weight parameters used as parameters for performing curve prediction are merely examples, and various parameters can be used to generate curve prediction blocks. For example, for block sizes that differ from each other, a lookup table specifying the angle used to search for the location of a reference pixel (for curve prediction at each location of the pixel) can be used equally in the encoder / decoder.

[0323] For intra-frame line direction prediction, the left and / or top reference pixels used for prediction can be determined based on the direction of the prediction mode. Furthermore, for computational convenience, before performing prediction, such as... Figure 21 As shown, it can be seen from p ref Generate a one-dimensional (1-D) reference pixel array p 1,ref The angle P of the prediction pattern can be determined based on the direction. ang Differently determine the mapping as p 1,ref Multiple reference pixels.

[0324] Figure 22 This shows the generation of p for a 4×4 block when the straight line direction mode is horizontal. 1,ref An illustration of an embodiment.

[0325] For example, such as Figure 17 As shown, when the number of intra-frame prediction modes is 33, modes 2 through 18 are straight-line direction modes that perform prediction in the horizontal direction. Here, p is generated for a 4×4 block. 1,ref Can Figure 22 As shown in the image.

[0326] Figure 23 This shows the generation of p for a 4×4 block when the straight line direction mode is vertical. 1,ref An illustration of an embodiment.

[0327] For example, such as Figure 17As shown, when the number of intra-frame prediction modes is 33, modes 19 to 34 are straight-line direction modes that perform prediction in the vertical direction. Here, p is generated for a 4×4 block. 1,ref Can Figure 23 As shown in the image.

[0328] Reference Figure 22 and Figure 23 The described embodiment is an embodiment with 33 linear direction patterns. Accordingly, when the number of linear direction patterns changes, P-based implementations can be performed in different forms while maintaining the same method. ang Generate p 1,ref .

[0329] When using p 1,ref When generating a prediction block, interpolation prediction in real units can be performed. For example, based on the angle parameter intraPredAngle corresponding to each line direction prediction mode, the offset value iIdx and / or weight iFact for interpolating prediction samples according to the position of pixels in the current block can be determined as follows.

[0330] For example, when performing interpolation in 1 / 32 pixel (1 / 32 pel) units, the method for determining the interpolation unit can be used by the following Equation 6. Figure 17 The linear direction patterns from pattern 19 to pattern 34 are used, and the predicted offset and weights are performed according to the vertical direction.

[0331] Equation 6

[0332] iIdx=((y+1)*intraPredAngle)>>5

[0333] iFact=((y+1)*intraPredAngle)&31

[0334] The predicted sample value can be determined based on the different values ​​of iFact in Equation 6 above. For example, when the iFact value is not 0, p 1,ref The predicted position is converted to real units instead of integer units (full pixel position). Therefore, predicted sample values ​​can be generated by using multiple reference pixels adjacent to the real position. Here, the multiple reference pixels can be located at at least one of the top, bottom, left, right, and diagonal sides of the real position. The number of reference pixels can be 2, 3, or more. For example, a predicted sample value at position (x, y) can be generated using the following Equation 7.

[0335] Equation 7

[0336] predSamples[x][y]=((32-iFact)*p 1,ref[x+iIdx+1]+iFact*p 1,ref [x+iIdx+2]+16)>>5

[0337] For example, when the iFact value is 0, the predicted sample values ​​can be generated by using the following Equation 8.

[0338] Equation 8

[0339] predSamples[x][y]=p 1,ref [x+iIdx+1]

[0340] When the prediction pattern follows the horizontal direction ( Figure 17 When moving from Mode 2 to Mode 18, equations 6 to 8 can be applied where the positions of x and y are altered. The described interpolation prediction in 1 / 32 pixel (1 / 32 pel) units can be an example, and interpolation prediction in 1 / N pixel (1 / N pel) units (N is a positive integer) can also be applied.

[0341] In the case of horizontal and / or vertical orientation modes within the orientation prediction mode, reference pixel filtering may not be performed. Furthermore, interpolation prediction may not be necessary by using reference target pixels and reference pixels with the same x and y positions as the predicted samples. Additionally, when prediction is available using only the top or left reference pixels, a 1-D reference pixel array p is generated. 1,ref This processing may not be necessary.

[0342] In the case of horizontal and / or vertical direction modes in the direction prediction mode, additional filtering can be performed on the boundary rows / columns of the prediction block after the prediction block of the current block is generated.

[0343] Figure 24 This is a diagram illustrating an embodiment of filtering the boundary rows / columns of a prediction block when the prediction mode is vertical.

[0344] like Figure 24 As shown, filtering can be performed on the first column on the left side of the prediction block. For example, the following Equation 9 can be used for filtering.

[0345] Equation 9

[0346]

[0347] Furthermore, for directional prediction patterns based on both horizontal and vertical directions, another filtering method can be applied to the N rows and / or columns on the left and / or top of the prediction block. Here, N can be an integer smaller than the block size of the prediction block.

[0348] For example, when generating a prediction block using multiple reference pixel lines equal to or greater than a certain number, filtering can be performed by using the amount of change between reference pixels existing in the same line or between reference pixels existing in different lines.

[0349] In the case of linear prediction, coding efficiency can be reduced when a curve with multiple image features is included in the current block. To improve coding efficiency, intra-frame prediction for the current block can be performed using a curve-based mode.

[0350] Furthermore, when encoding / decoding a current block including a curve is performed using a straight-line-only mode, the amount of data to be transmitted (in other words, signaling overhead) can be increased because the target block can be divided into smaller blocks to reduce encoding errors. However, when encoding / decoding a current block with the same characteristics is performed using curve prediction, prediction blocks with the same level of prediction error can be generated even if the block is not divided into sub-blocks, thus improving encoding efficiency.

[0351] In the case of linear direction prediction, the predicted position (x, y) of all pixels within the prediction block can be generated using the reference pixel values ​​of the reference pixels arranged separately from the intraPredAngle corresponding to the prediction mode predModeIntra.

[0352] For example, in Figure 20 In the example, when predModeIntra is 2, the predicted value at any position (x, y) within the prediction block can be calculated by using reference pixels arranged at a 32-degree separation to the lower left based on the right-angle direction.

[0353] In the case of curve prediction, unlike linear prediction, prediction can be performed based on the position (x, y) of the target pixel within the prediction block by using reference pixels (or predModeIntra pixels with different angles to each other).

[0354] Figure 25 This is a diagram illustrating an embodiment that uses reference pixels with different angles based on the position of pixels within a prediction block.

[0355] For example, such as Figure 25 As shown in (a), predictions can be generated in pixel units within the prediction block by using reference pixels arranged at different angles to each other.

[0356] Optionally, such as Figure 25 As shown in (b), predictions can be generated within the prediction block in horizontal units by using reference pixels arranged at different angles to each other.

[0357] Optionally, such as Figure 25As shown in (c), predictions can be generated in vertical units within the prediction block by using reference pixels arranged at different angles to each other.

[0358] Optionally, such as Figure 25 As shown in (d), predictions can be generated in diagonal units within the prediction block by using reference pixels arranged at different angles to each other.

[0359] Optionally, such as Figure 25 As shown in (e), predictions can be generated within the prediction block in units of right angles (L-shaped lines) by using reference pixels arranged at different angles to each other.

[0360] By reference Figure 25 One of several methods described is selected to perform intra-frame prediction. This selection of a method can be performed in predetermined units. For example, the selection can be performed on a unit of at least one of video, sequence, frame, stripe, parallel block, coding tree unit, coding unit, prediction unit, and transform unit. Here, the selection can be based on information transmitted by signal in predetermined units or can be derived in predetermined units. Alternatively, a method predetermined by the encoder and decoder can be applied.

[0361] When generating intra-frame prediction blocks for curves by grouping them by lines, the N (N is a positive integer) angles that can be used for each line can be stored as LUTs and used as LUTs.

[0362] When converting two-dimensional block form coefficients to one-dimensional block form coefficients by generating and transforming residual blocks between the curve prediction block and the current block, different scanning methods can be applied depending on the type of curve prediction selected. For example, upper-right scan, vertical scan, horizontal scan, zigzag scan, etc., can be applied.

[0363] When generating a prediction block by performing directional or non-directional intra-frame prediction, a reference pixel can be used from at least one of multiple lines (N lines, where N is a positive integer) that are adjacent to the current block on the left and / or top.

[0364] Figure 26 This is an illustration of an embodiment showing reference pixels for multiple lines, wherein the reference pixels are used for intra-frame prediction of the current block.

[0365] like Figure 26 As shown, when predicting a 4×4 block using four reference lines, a reference pixel can be generated from one of the four reference lines.

[0366] Optionally, reference pixels can be generated from four different reference lines.

[0367] Alternatively, a reference pixel can be generated by applying a weighted sum to one of a plurality of reference lines selected from four reference lines (e.g., equal to or greater than 2 and equal to or less than 4).

[0368] By reference Figure 26 One of the described methods is selected to perform intra-frame prediction. This selection of a single method can be performed on a predetermined basis. For example, the method selection can be performed on a unit of at least one of video, sequence, frame, stripe, parallel block, coding tree unit, coding unit, prediction unit, and transform unit. Here, the selection can be based on information transmitted by signal according to the predetermined basis or can be derived according to the predetermined basis. Alternatively, a method predetermined by the encoder and decoder can be applied.

[0369] Oriented or non-oriented intra-frame prediction can be applied to square blocks and / or non-square blocks.

[0370] As an example of intra-frame prediction of curves, see reference Figure 20 As mentioned above, this can be achieved by using the curvature parameter cuv and the weight parameter cw. i (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.

[0371] For example, in the case of intra-frame prediction of a curve "from the upper right to the lower left", 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, as in Equation 10 below.

[0372] Equation 10

[0373] The y-th row is p(pos, -1), where pos = x + 1 / 2 × (x + y) + cw y ×cuv×(x+1), where y=0,1,…,Ns-1

[0374] When using intra-frame prediction of the curve using Equation 10 above, the curvature can be adjusted by adjusting the cuv value. cuv can be a real number equal to or greater than 0. 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 position x).

[0375] When the target block is N×M, cw i It can be a parameter comprising N weights representing the block height or the number of rows. Each weight can be a real number equal to or greater than 0. This can be achieved by adjusting cw. iThis adjusts the position of the reference pixels used by the predicted pixels included in the corresponding rows. 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. Alternatively, cw i The smaller the value becomes, the more the position of the reference pixel can be moved to the left (up to position x).

[0376] Therefore, the curvature parameter cuv and / or the weight row parameter cw can be used to... i Combining these methods allows for the execution of various forms of intra-frame curve prediction.

[0377] Figure 27 This is a diagram illustrating an embodiment of performing curve prediction in a direction from the upper right to the lower left by applying cuv=0.1, cw0=1.0, cw1=1.2, cw2=1.4 and cw3=1.6 to a current block with a size of 4×4.

[0378] Figure 28 It is shown as Figure 27 Applications of CUV and CW i An illustration of an embodiment where the predicted pixel within the current block is used to determine the position of the reference pixel.

[0379] To generate predicted pixel values, the described interpolation prediction in units of 1 / N pixels (1 / N pel) can be performed. N can be a positive integer.

[0380] For example, when the position of the reference pixel for predicting the target pixel is a positive integer, the predicted target pixel predPixels[x][y] can be derived from the reference pixel p(pos, -1). pos can represent the position of the reference pixel.

[0381] For example, when the position of the reference pixel for predicting the target pixel is in real units, predPixels[x][y] can be derived as the number of interpolated predictions obtained by performing interpolation predictions on p(floor(pos), -1) and p(ceil(pos), -1) in units of 1 / N pixels (1 / N pel). floor(pos) can be an integer value equal to or less than pos, representing the maximum value. ceil(pos) can be an integer value equal to or greater than pos, representing the minimum value.

[0382] As mentioned above, for ease of calculation, p can be calculated before generating the predicted sample values. ref Convert to p 1,ref .

[0383] When the position pos of the reference pixel exceeds the maximum range of available reference pixels (in Figure 27In the case where p(7, -1)), the calculated positions of all reference pixels can be used after being converted into individual normalized values ​​by matching them with the maximum range of available reference pixels.

[0384] For example, in the case of intra-frame prediction of a curve from the top left to the bottom right (type-1), 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, as in Equation 11 below.

[0385] Equation 11

[0386] The y-th row is p(pos, -1), where pos = x - 1 / 2 × (Ns - 1 - x + y) - cw y ×cuv×(Ns-x), where y = 0, 1, ..., Ns-1

[0387] When using intra-frame prediction of the curve using Equation 11 above, the curvature can be adjusted by adjusting the cuv value. cuv can be a real number equal to or greater than 0. 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 position x).

[0388] When the target block is N×M, cw i This can be a parameter with N weights representing the block height or the number of rows. Each weight can be a real number equal to or greater than 0. This can be adjusted by changing cw. i This adjusts the position of the reference pixels used by the predicted pixels included in the corresponding rows. 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. Alternatively, cw i The smaller the value becomes, the more the reference pixel can be moved to the right (up to position x).

[0389] Therefore, the curvature parameter cuv and / or the weight row parameter cw can be used to... i Combining these methods allows for the execution of various forms of intra-frame curve prediction.

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

[0391] Figure 30 It is shown as Figure 29 Applications of CUV and CW iAn illustration of an embodiment where the predicted pixel within the current block is used to determine the position of the reference pixel.

[0392] To generate predicted pixel values, the described interpolation prediction in units of 1 / N pixels (1 / N pel) can be performed. N can be a positive integer.

[0393] For example, when the position of the reference pixel for the predicted target pixel is a positive integer unit, the predicted target pixel predPixels[x][y] can be derived as the reference pixel p(pos, -1).

[0394] For example, when the position of the reference pixel for predicting the target pixel is in real units, predPixels[x][y] can be derived as an interpolated prediction obtained by performing interpolation prediction in units of 1 / N pixels (1 / N pel) on p(floor(pos), -1) and p(ceil(pos), -1).

[0395] As mentioned above, for ease of calculation, p can be calculated before generating the predicted sample values. ref Convert to p 1,ref .

[0396] When the position pos of the reference pixel exceeds the maximum range of available reference pixels (in Figure 29 In the case where p(-7, -1) is exceeded, the calculated positions of all reference pixels can be used after being converted into individual normalized values ​​by matching them with the maximum range of available reference pixels.

[0397] For example, in the case of intra-frame prediction of a curve "from the lower left to the upper right", 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 column unit, as in Equation 12 below.

[0398] Equation 12

[0399] The x-th column is p(-1, pos), where pos = y + 1 / 2 × (x + y) + cw x ×cuv×(y+1), where x=0,1,…,Ns-1

[0400] When using intra-frame prediction of the curve using Equation 12 above, the curvature can be adjusted by adjusting the cuv value. cuv can be a real number equal to or greater than 0. For example, a larger cuv value results in a larger curvature, and the reference pixel's position can be moved downwards. Alternatively, a smaller cuv value results in a smaller curvature, and the reference pixel's position can be moved upwards (up to position y).

[0401] When the target block is N×M, cw iThis can be a parameter containing M weights, representing the width of the block or the number of columns. Each weight can be a real number equal to or greater than 0. This can be adjusted by changing cw. i This adjusts the position of the reference pixels used by the predicted pixels included in the corresponding columns. For example, cw i As the value increases, the position of the reference pixel used by the predicted pixel in the i-th column can be shifted downwards. Alternatively, cw i The smaller the value becomes, the higher the position of the reference pixel can be moved (up to position y).

[0402] Therefore, the curvature parameter cuv and / or the weight column parameter cw can be used to... i Combining these methods allows for the execution of various forms of intra-frame curve prediction.

[0403] Figure 31 This is a diagram illustrating an embodiment of performing curve prediction in a direction from the lower left to the upper right by applying cuv=0.1, cw0=1.0, cw1=1.2, cw2=1.4 and cw3=1.6 to a current block with a size of 4×4.

[0404] Figure 32 It is shown as Figure 31 Applications of CUV and CW i An illustration of an embodiment where the predicted pixel within the current block is used to determine the position of the reference pixel.

[0405] To generate predicted pixel values, the described interpolation prediction in units of 1 / N pixels (1 / N pel) can be performed. N can be a positive integer.

[0406] For example, when the position of the reference pixel for the predicted target pixel is an integer unit, the predicted target pixel predPixels[x][y] can be derived as the reference pixel p(-1, pos).

[0407] For example, when the position of the reference pixel for predicting the target pixel is in real units, predPixels[x][y] can be derived as an interpolated prediction obtained by performing interpolation prediction in units of 1 / N pixels (1 / N pel) on p(-1, floor(pos)) and p(-1, ceil(pos)).

[0408] As mentioned above, for ease of calculation, p can be calculated before generating the predicted sample values. ref Convert to p 1,ref .

[0409] When the position pos of the reference pixel exceeds the maximum range of available reference pixels (in Figure 31In the case where p(-1, 7) is exceeded, the calculated positions of all reference pixels can be used after being converted into individual normalized values ​​by matching them with the maximum range of available reference pixels.

[0410] For example, in the case of intra-frame prediction of a curve from the top left to the bottom right (type-2), 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 column unit, as in Equation 13 below.

[0411] Equation 13

[0412] The x-th column is p(-1, pos), where pos = y - 1 / 2 × (Ns - 1 - y + x) - cw x ×cuv×(Ns-y), where x=0,1,…,Ns-1

[0413] When using intra-frame prediction of the curve using Equation 13 above, the curvature can be adjusted by adjusting the cuv value. cuv can be a real number equal to or greater than 0. For example, a larger cuv value results in a larger curvature, and the reference pixel's position can be moved upwards. Alternatively, a smaller cuv value results in a smaller curvature, and the reference pixel's position can be moved downwards (up to position y).

[0414] When the target block is N×M, cw i This can be a parameter containing M weights, representing the width of the block or the number of columns. Each weight can be a real number equal to or greater than 0. This can be adjusted by changing cw. i This adjusts the position of the reference pixels used by the predicted pixels included in the corresponding columns. For example, cw i As the value increases, the position of the reference pixel used by the predicted pixel in the i-th column can be moved upwards. Alternatively, cw i The smaller the value becomes, the lower the position of the reference pixel can be moved (up to position y).

[0415] Therefore, the curvature parameter cuv and / or the weight column parameter cw can be used. i To perform various forms of intra-frame prediction of curves.

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

[0417] Figure 34 It is shown as Figure 33 Applications of CUV and CW iAn illustration of an embodiment where the predicted pixel within the current block is used to determine the position of the reference pixel.

[0418] To generate predicted pixel values, the described interpolation prediction in units of 1 / N pixels (1 / N pel) can be performed. N can be a positive integer.

[0419] For example, when the position of the reference pixel for the predicted target pixel is an integer unit, the predicted target pixel predPixels[x][y] can be derived as the reference pixel p(-1, pos).

[0420] For example, when the position of the reference pixel for predicting the target pixel is in real units, predPixels[x][y] can be derived as an interpolated prediction obtained by performing interpolation prediction in units of 1 / N pixels (1 / N pel) on p(-1, floor(pos)) and p(-1, ceil(pos)).

[0421] As mentioned above, for ease of calculation, p can be calculated before generating the predicted sample values. ref Convert to p 1,ref .

[0422] When the position pos of the reference pixel exceeds the maximum range of available reference pixels (in Figure 33 In the case where the position exceeds p(-1, -7), the calculated position of all reference pixels can be used after being converted into individual normalized values ​​by matching with the maximum range of available reference pixels.

[0423] For example, in the case of intra-frame prediction of a curve "from top to bottom left", 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, as in Equation 14 below.

[0424] Equation 14

[0425] The y-th row is p(pos, -1), where pos = x + cw y ×cuv×y, where y = 0, 1, ..., Ns-1. In intra-frame prediction using the curve from Equation 14 above, the curvature can be adjusted by changing cuv. cuv can be a real number equal to or greater than 0. For example, a larger cuv value results in a larger curvature, and the reference pixel's position can be moved to the right. Alternatively, a smaller cuv value results in a smaller curvature, and the reference pixel's position can be moved to the left (up to position x).

[0426] When the target block is N×M, cw iThis can be a parameter with N weights representing the block height or the number of rows. Each weight can be a real number equal to or greater than 0. This can be adjusted by changing cw. i This adjusts the position of the reference pixels used by the predicted pixels included in the corresponding rows. 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. Alternatively, cw i The smaller the value becomes, the more the position of the reference pixel can be moved to the left (up to position x).

[0427] Therefore, the curvature parameter cuv and / or the weight row parameter cw can be used to... i Combining these methods allows for the execution of various forms of intra-frame curve prediction.

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

[0429] Figure 36 It is shown as Figure 35 Applications of CUV and CW i An illustration of an embodiment where the predicted pixel within the current block is used to determine the position of the reference pixel.

[0430] To generate predicted pixel values, the described interpolation prediction in units of 1 / N pixels (1 / N pel) can be performed. N can be a positive integer.

[0431] For example, when the position of the reference pixel for the predicted target pixel is an integer unit, the predicted target pixel predPixels[x][y] can be derived as the reference pixel p(pos, -1).

[0432] For example, when the position of the reference pixel for predicting the target pixel is in real units, predPixels[x][y] can be derived as an interpolated prediction obtained by performing interpolation prediction in units of 1 / N pixels (1 / N pel) on p(floor(pos), -1) and p(ceil(pos), -1).

[0433] As mentioned above, for ease of calculation, p can be calculated before generating the predicted sample values. ref Convert to p 1,ref .

[0434] When the position pos of the reference pixel exceeds the maximum range of available reference pixels (in Figure 35In the case where p(7, -1)), the calculated positions of all reference pixels can be used after being converted into individual normalized values ​​by matching them with the maximum range of available reference pixels.

[0435] For example, in the case of intra-frame prediction of a curve "from top to bottom right", 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, as in Equation 15 below.

[0436] Equation 15

[0437] The y-th row is p(pos, -1), where pos = x - cw y ×cuv×y, where y = 0, 1, ..., Ns-1. When using intra-frame prediction of the curve using Equation 15 above, the curvature can be adjusted by adjusting cuv. cuv can be a real number equal to or greater than 0. For example, a larger cuv value results in a larger curvature, and the reference pixel position can be moved to the left. Alternatively, a smaller cuv value results in a smaller curvature, and the reference pixel position can be moved to the right (up to position x).

[0438] When the target block is N×M, cw i This can be a parameter with N weights representing the block height or the number of rows. Each weight can be a real number equal to or greater than 0. This can be adjusted by changing cw. i This adjusts the position of the reference pixels used by the predicted pixels included in the corresponding rows. 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. Alternatively, cw i The smaller the value becomes, the more the reference pixel can be moved to the right (up to position x).

[0439] Therefore, the curvature parameter cuv and / or the weight row parameter cw can be used to... i Combining these methods allows for the execution of various forms of intra-frame curve prediction.

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

[0441] Figure 38 It is shown as Figure 37 Applications of CUV and CW i An illustration of an embodiment where the predicted pixel within the current block is used to determine the position of the reference pixel.

[0442] To generate predicted pixel values, the described interpolation prediction in units of 1 / N pixels (1 / N pel) can be performed. N can be a positive integer.

[0443] For example, when the position of the reference pixel for the predicted target pixel is an integer unit, the predicted target pixel predPixels[x][y] can be derived as the reference pixel p(pos, -1).

[0444] For example, when the position of the reference pixel for predicting the target pixel is in real units, predPixels[x][y] can be derived as an interpolated prediction obtained by performing interpolation prediction in units of 1 / N pixels (1 / N pel) on p(floor(pos), -1) and p(ceil(pos), -1).

[0445] As mentioned above, for ease of calculation, p can be calculated before generating the predicted sample values. ref Convert to p 1,ref .

[0446] When the position pos of the reference pixel exceeds the maximum range of available reference pixels (in Figure 37 In the case where p(-7, -1) is exceeded, the calculated positions of all reference pixels can be used after being converted into individual normalized values ​​by matching them with the maximum range of available reference pixels.

[0447] For example, in the case of curve intra-frame prediction "from left to top right", 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 column unit, as in Equation 16 below.

[0448] Equation 16

[0449] The x-th column is linked to p(pos, -1), where pos = y + cw. x ×cuv×x, where x = 0, 1, ..., Ns-1. In intra-frame prediction using Equation 16 above, the curvature can be adjusted by adjusting cuv. cuv can be a real number equal to or greater than 0. For example, a larger cuv value results in a larger curvature, and the reference pixel's position can be moved downwards. Alternatively, a smaller cuv value results in a smaller curvature, and the reference pixel's position can be moved upwards (up to position y).

[0450] When the target block is N×M, cw i This can be a parameter containing M weights, representing the width of the block or the number of columns. Each weight can be a real number equal to or greater than 0. This can be adjusted by changing cw. i This adjusts the position of the reference pixels used by the predicted pixels included in the corresponding columns. For example, cwi As the value increases, the position of the reference pixel used by the predicted pixel in the i-th column can be shifted downwards. Alternatively, cw i The smaller the value becomes, the higher the position of the reference pixel can be moved (up to position y).

[0451] Therefore, the curvature parameter cuv and / or the weight column parameter cw can be used to... i Combining these methods allows for the execution of various forms of intra-frame curve prediction.

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

[0453] Figure 40 It is shown as Figure 39 Applications of CUV and CW i An illustration of an embodiment where the predicted pixel within the current block is used to determine the position of the reference pixel.

[0454] To generate predicted pixel values, the described interpolation prediction in units of 1 / N pixels (1 / N pel) can be performed. N can be a positive integer.

[0455] For example, when the position of the reference pixel for the predicted target pixel is an integer unit, the predicted target pixel predPixels[x][y] can be derived as the reference pixel p(-1, pos).

[0456] For example, when the position of the reference pixel for predicting the target pixel is in real units, predPixels[x][y] can be derived as an interpolated prediction obtained by performing interpolation prediction in units of 1 / N pixels (1 / N pel) on p(-1, floor(pos)) and p(-1, ceil(pos)).

[0457] As mentioned above, for ease of calculation, p can be calculated before generating the predicted sample values. ref Convert to p 1,ref .

[0458] When the position pos of the reference pixel exceeds the maximum range of available reference pixels (in Figure 39 In the case where p(-1, 7) is exceeded, the calculated positions of all reference pixels can be used after being converted into individual normalized values ​​by matching them with the maximum range of available reference pixels.

[0459] For example, in the case of intra-frame prediction of a curve "from left to right bottom", 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 column cell, as in Equation 17 below.

[0460] Equation 17

[0461] The x-th column is linked to p(-1, pos), where pos = y – cw. x ×cuv×x, where x = 0, 1, ..., Ns-1. In intra-frame prediction using the curve from Equation 17 above, the curvature can be adjusted by adjusting cuv. cuv can be a real number equal to or greater than 0. For example, a larger cuv value results in a larger curvature, and the reference pixel's position can be moved upwards. Alternatively, a smaller cuv value results in a smaller curvature, and the reference pixel's position can be moved downwards (up to position y).

[0462] When the target block is N×M, cw i This can be a parameter containing M weights, representing the width of the block or the number of columns. Each weight can be a real number equal to or greater than 0. This can be adjusted by changing cw. i This adjusts the position of the reference pixels used by the predicted pixels included in the corresponding columns. For example, cw i As the value increases, the position of the reference pixel used by the predicted pixel in the i-th column can be moved upwards. Alternatively, cw i The smaller the value becomes, the lower the position of the reference pixel can be moved (up to position y).

[0463] Therefore, the curvature parameter cuv and / or the weight column parameter cw can be used to... i Combining these methods allows for the execution of various forms of intra-frame curve prediction.

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

[0465] Figure 42 It is shown as Figure 41 Applications of CUV and CW i An illustration of an embodiment where the predicted pixel within the current block is used to determine the position of the reference pixel.

[0466] To generate predicted pixel values, the described interpolation prediction in units of 1 / N pixels (1 / N pel) can be performed. N can be a positive integer.

[0467] For example, when the position of the reference pixel for the predicted target pixel is an integer unit, the predicted target pixel predPixels[x][y] can be derived as the reference pixel p(-1, pos).

[0468] For example, when the position of the reference pixel for predicting the target pixel is in real units, predPixels[x][y] can be derived as an interpolated prediction obtained by performing interpolation prediction in units of 1 / N pixels (1 / N pel) on p(-1, floor(pos)) and p(-1, ceil(pos)).

[0469] As mentioned above, for ease of calculation, p can be calculated before generating the predicted sample values. ref Convert to p 1,ref .

[0470] When the position pos of the reference pixel exceeds the maximum range of available reference pixels (in Figure 41 In the case where the value exceeds p(-1, -7), the calculated positions of all reference pixels can be used after being converted into individual normalized values ​​by matching them with the maximum range of the reference pixels.

[0471] In reference Figures 27 to 42 In the described embodiment, a single curvature parameter cuv is applied to the current block, and a single weight parameter cw is applied to the row or column of the current block. However, this is not the case. In other words, at least one curvature parameter cuv can be applied. i and / or at least one weight parameter cw i Applies to the current block. For example, see reference. Figure 25 As mentioned above, different curvature parameters can be cuv i and different weight parameters cw i Applied to pixel units, horizontal line units, vertical line units, diagonal units, right-angle line units, sub-block units, and / or any pixel group units in the current block.

[0472] Figure 43 This is a diagram illustrating another embodiment of intra-frame prediction of curves.

[0473] like Figure 43 As shown, when the linear intra-frame prediction mode is selected, curve intra-frame prediction can be performed separately based on the linear intra-frame prediction mode.

[0474] For example, when the selected intra-prediction mode is non-directional mode (PLANAR_MODE or DC_MODE), curve prediction may not be performed.

[0475] exist Figure 43In (a), when the selected linear intra-frame prediction mode is included in range A, curve prediction can be performed in at least one of the directions from the lower left to the upper right and from the left to the upper right.

[0476] Optionally, in Figure 43 In (a), when the selected linear intra-frame prediction mode is included in range B, curve prediction can be performed in at least one of the directions from top left to bottom right (type-2) and from left to bottom right.

[0477] Optionally, in Figure 43 In (a), when the selected linear intra-frame prediction mode is included in range C, curve prediction can be performed on at least one of the directions from top left to bottom right (type-1) and from top to bottom right.

[0478] Optionally, in Figure 43 In (a), when the selected linear intra-frame prediction mode is included in range D, curve prediction can be performed on at least one of the directions from the upper right to the lower left and from the top to the lower left.

[0479] Optionally, in Figure 43 In (b), when the selected linear intra-frame prediction mode is included in range A, curve prediction can be performed in at least one of the directions from left to right and from left to right.

[0480] Optionally, in Figure 43 In (b), when the selected linear intra-frame prediction mode is included in range B, curve prediction can be performed on at least one of the directions from top to bottom left and from top to bottom right.

[0481] The following will refer to Figures 44 to 46 The steps for encoding or decoding information about intra-frame prediction are described in detail (S1203 and S1301).

[0482] In step S1203, the encoding apparatus according to this disclosure can encode information about intra-frame prediction into a bitstream. The encoding may include entropy coding.

[0483] Figure 44 This is a diagram illustrating an embodiment of a syntax structure for a bitstream including information about intra-frame prediction according to the present disclosure.

[0484] like Figure 44 As shown, the information regarding intra-frame prediction may include at least one of the following pieces of information.

[0485] -MPM (Most Probable Mode) flag: prev_intra_luma_pred_flag

[0486] -MPM index: mpm_idx

[0487] - Intra-pred mode information for the luma component: rem_intra_luma_pred_mode

[0488] - Intra-chroma_pred_mode information regarding the chroma component's intra-prediction mode.

[0489] - Curvature parameters of the curve intra-frame prediction mode: cuv1, cuv2, ...

[0490] - Weight parameters for the curve intra-frame prediction mode: cw1, cw2, ...

[0491] - Lookup table (LUT) used for intra-frame prediction of curves

[0492] The encoding device can encode information about intra-frame prediction into a bitstream based on at least one of the above encoding parameters.

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

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

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

[0496] The curvature parameter cuv of the curve intra-prediction mode can represent the curvature applied to the curve intra-prediction mode. Curve intra-prediction can be performed on the current block using at least one cuv. This curvature parameter can be derived from at least one curvature parameter of neighboring blocks.

[0497] One or more weight parameters cw of the curve intra-frame 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. These weight parameters can be derived from at least one weight parameter from neighboring blocks.

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

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

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

[0501] For example, when using a single cuv and a single cw, intra-frame prediction of the current block can be performed by generating at least four prediction blocks.

[0502] For example, when using two CUVs and a single CW, intra-frame prediction for the current block can be performed by generating at least eight prediction blocks.

[0503] For example, when using a single cuv and two cws, intra-frame prediction of the current block can be performed by generating at least eight prediction blocks.

[0504] For example, when using two CUVs and two CWs, intra-frame prediction of the current block can be performed by generating at least sixteen prediction blocks.

[0505] Information about at least two cuv and / or cw values ​​can be encoded / decoded using default values ​​and incremental values. Here, the default value can represent a single cuv value and / or a single cw value, and the incremental value can be a constant value.

[0506] For example, when using two cuvettes in the current block, the two curvature parameters can be default_cuv and default_cuv+delta_cuv.

[0507] For example, when N cuvs are used in the current block, the N curvature parameters can be default_cuv, default_cuv+delta_cuv, default_cuv+2×delta_cuv, ..., default_cuv+(N-1)×delta_cuv (where N is a positive integer greater than 2).

[0508] 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, default_cuv-N×delta_cuv (where N is a positive integer greater than 1).

[0509] For example, when using two cws in the current block, the two weight parameters can be default_cw and default_cw+delta_cw (where default_cw+delta_cw is the sum of the elements of the vector).

[0510] For example, when M cws are used in the current block, the M weight parameters can be default_cw, default_cw+delta_cw, default_cw+2×delta_cw, ..., default_cw+(M-1)×delta_cw (where default_cw+delta_cw is the sum of the elements of the vector, and M is a positive integer greater than 2).

[0511] For example, when using 2M+1 cws in the current block, the 2M+1 weight 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, default_cw-M×delta_cw (where M is a positive integer greater than 1).

[0512] The information about cuv and / or cw described above can be encoded into a bitstream or decoded from a bitstream. Alternatively, the encoder or decoder can share and store information about the quantity or value of cuv and / or cw, for example, in a lookup table format.

[0513] When encoding / decoding at least one piece of information about intra-frame prediction, at least one of the binary methods can be used.

[0514] - Use the truncated Rice binary method

[0515] -Use the K-order exponent Columbus binaryization method

[0516] - Using a constrained K-order exponent Columbus binaryization method

[0517] - Use a fixed-length binary method

[0518] - Uni-binary method

[0519] - Use a truncated unary binary conversion method

[0520] The decoding device according to this disclosure can receive the encoded bitstream encoded in step S1203, and decode information about intra-frame prediction from the received encoded bitstream in step S1301. The decoding may include entropy decoding.

[0521] Hereinafter, detailed descriptions of the parts of step S1301 that are repeated with step S1203 are omitted. The decoding device receives the encoded bitstream from the encoding device and decodes the received encoded bitstream. Therefore, in addition to the descriptions of the syntactic structure, syntactic elements, and semantics of the bitstream in the description of step S1203, descriptions of features not unique to the encoder can be applied to step S1301.

[0522] Information regarding intra-frame prediction may include references Figure 44 At least one piece of information from the description.

[0523] The decoding device can decode information about intra-frame prediction from the bitstream based on at least one of the encoding parameters.

[0524] The curve-based intra-prediction mode derives pixel prediction values ​​within reference pixels by using reference pixels with different angles, based on the pixel position (x, y) within the prediction block. Pixels within the prediction block can be grouped into multiple groups (pixel groups). Furthermore, the first group of these groups can use a directional intra-prediction mode with an angle different from that of the second group. Each group may include at least one pixel. Each group may have a triangular shape, a square shape, or other geometric shapes.

[0525] When performing intra-prediction on the current block, the signaling overhead for sending the index of the selected prediction mode can be reduced due to the existence of multiple directional / non-directional modes. Therefore, the intra-prediction mode of the current block can be encoded / decoded using the intra-prediction modes of neighboring units that have already been encoded / decoded.

[0526] The intra-prediction mode used for selecting the current block for the luma component can be encoded / decoded as follows.

[0527] For example, N intra-frame prediction modes can be sent in the form of an indexed list of MPMs (Most Probable Modes) with M entries. Here, N and M can be positive integers.

[0528] For example, N intra-frame prediction modes can be encoded / decoded using fixed-length binary encoding.

[0529] When encoding / decoding intra-prediction modes using an MPM list, M entries of intra-prediction modes selected by neighboring blocks that have already been encoded / decoded can be included in the MPM list.

[0530] Figure 45 This is an example showing the relationship with the current block B. c Two adjacent blocks B that have been encoded / decoded a and B b The illustration.

[0531] like Figure 45 As shown, it can be based on the top left pixel (x) of the target block. c y c The pixel directly to the left of (x) a y a ) and the top pixel (x) b y b Position definition B a and B b .

[0532] When encoding / decoding intra-prediction modes using an MPM, M prediction mode candidates to be included in the MPM list can be determined based on the intra-prediction modes selected by neighboring blocks. The number of M prediction mode candidates to be included in the MPM list can be fixed by the encoder / decoder, or it can be determined differently by the encoder / decoder. For example, information about the multiple prediction mode candidates constituting the MPM list can be transmitted via signaling. This information can be transmitted via signaling at least one level: sequence, frame, strip, and block. The multiple prediction mode candidates constituting the MPM list can be determined differently by considering the size / shape of the prediction block and whether it is a symmetrical / asymmetrical partition.

[0533] exist Figure 45 In the middle, it can be achieved through B a and / or B b Perform an availability check to determine the candidate intra-prediction mode CandIntraPredModeX (X is A or B). When B a and / or B b CandIntraPredModeX can be set to DC mode when it is unavailable or encoded / decoded based on intra-frame prediction (inter-frame coding), or when pcm_flag is 1. When encoding / decoding B based on intra-frame prediction (inter-frame coding)... a and / or B b When performing encoding / decoding, CandIntraPredModeX can be set to B.a and / or B b Intra-frame prediction mode.

[0534] Furthermore, the MPM candidate list candModeList[x] can be populated using the initialized CandIntraPredModeX. As prediction mode candidates constituting the MPM list, at least one of the following can be used: the intra-prediction mode of a neighboring block, a mode derived by adding / subtracting a predetermined constant value from the intra-prediction mode of a neighboring block, and a default mode. The predetermined constant value can represent an integer of 1, 2, or greater than 2. The default mode can represent a planar mode, DC mode, horizontal / vertical mode, etc.

[0535] For example, when CandIntraPredModeA and CandIntraPredModeB are the same, and both are in INTRA_DC mode or INTRA_PLANAR mode, the MPM candidate list can be determined as follows.

[0536] {INTRA_PLANAR, INTRA_DC, Vertical, Horizontal, 2 (diagonal from bottom left to top right), Diagonal}

[0537] For example, when CandIntraPredModeA and CandIntraPredModeB are the same, and neither CandIntraPredModeA nor CandIntraPredModeB is INTRA_DC mode or INTRA_PLANAR mode, the MPM candidate list can be determined as follows.

[0538] {CandIntraPredModeA, INTRA_PLANAR, CandIntraPredModeA+1, CandIntraPredModeA-1, CandIntraPredModeA+2, INTRA_DC}

[0539] For example, when CandIntraPredModeA and CandIntraPredModeB are different, the MPM candidate list can be determined by considering additional cases as follows.

[0540] - When neither CandIntraPredModeA nor CandIntraPredModeB is in INTRA_PLANAR mode, and one of them is in INTRA_DC mode, the MPM candidate list can be determined as follows.

[0541] {CandIntraPredModeA, CandIntraPredModeB, INTRA_PLANAR, max(CandIntraPredModeA, CandIntraPredModeB)-1, max(CandIntraPredModeA, CandIntraPredModeB)+1, max(CandIntraPredModeA, CandIntraPredModeB)+2}

[0542] When neither CandIntraPredModeA nor CandIntraPredModeB is INTRA_PLANAR mode or INTRA_DC mode, the MPM candidate list can be determined as follows.

[0543] {CandIntraPredModeA, CandIntraPredModeB, INTRA_PLANAR, max(CandIntraPredModeA, CandIntraPredModeB)-1, max(CandIntraPredModeA, CandIntraPredModeB)+1, max(CandIntraPredModeA, CandIntraPredModeB)+2}

[0544] - When at least one of CandIntraPredModeA and CandIntraPredModeB is in INTRA_PLANAR mode, and CandIntraPredModeA+CandIntraPredModeB<2, the MPM candidate list can be determined as follows.

[0545] {CandIntraPredModeA, CandIntraPredModeB, Vertical or INTRA_DC, Horizontal, 2, Diagonal}

[0546] Otherwise, the MPM candidate list can be determined as follows.

[0547] {CandIntraPredModeA, CandIntraPredModeB, vertical or INTRA_DC, max(CandIntraPredModeA, CandIntraPredModeB)-1, max(CandIntraPredModeA, CandIntraPredModeB)+1, max(CandIntraPredModeA, CandIntraPredModeB)+2}

[0548] When the intra-prediction mode IntraPredModeY of the current block is included in the MPM candidate list candModeList[x] (i.e., prev_intra_luma_pred_flag == 1), the intra-prediction mode can be encoded / decoded to an index of the MPM candidate list.

[0549] When the intra-prediction mode IntraPredModeY of the current block is not included in the MPM candidate list (candModeList[x]) (i.e., prev_intra_luma_pred_flag == 0), the intra-prediction mode can be encoded / decoded using K-bit binary rem_intra_luma_pred_mode. Here, K can be a positive integer.

[0550] For example, to decode an intra-prediction mode from an encoded rem_intra_luma_pred_mode, the prediction mode candidates included in candModeList[x] can be sorted in ascending order. When L prediction mode candidates that are equal to or less than rem_intra_luma_pred_mode by comparing them with rem_intra_luma_pred_mode exist in the sorted candModeList[x], the intra-prediction mode selected by the encoded / decoded target block can be derived as IntraPredModeY = rem_intra_luma_pred_mode + L.

[0551] Figure 46 This is a diagram showing the encoding / decoding of the intra-prediction mode for the current block of chroma components.

[0552] The intra-prediction mode of the current block of chroma components can be encoded / decoded using the intra-prediction mode information intra_chroma_pred_mode about the chroma components and / or the intra-prediction mode selected by the corresponding luma component block.

[0553] For example, by using, Figure 46 The intra_chroma_pred_mode shown encodes / decodes the intra-pred mode IntraPredModeC for the current block of the chroma component. IntraPredModeC can be determined based on the index of intra_chroma_pred_mode and the intra-pred mode IntraPredModeY selected by the corresponding luma component block.

[0554] The encoding / decoding of the intra prediction mode of the current block of the chrominance component can be determined independently of the intra prediction mode selected by the corresponding luma component block.

[0555] For example, the intra-predmode (IntraPredModeC) of the current block of the chroma component can be determined by the index of intra_chroma_pred_mode.

[0556] Intra-frame coding / decoding can be performed on each of the luma and chroma signals. For example, in intra-frame coding / decoding, at least one of the following methods can be applied differently to the luma and chroma signals: deriving the intra-frame prediction mode, dividing the block, constructing reference samples, and performing intra-frame prediction.

[0557] Intra-frame coding / decoding can be performed equally on both luma and chroma signals. For example, when intra-frame coding / decoding is applied to the luma signal, at least one of deriving the intra-frame prediction mode, dividing the block, constructing reference samples, and performing intra-frame prediction can be applied equally to the chroma signal.

[0558] The methods described herein can be performed in both the encoder and decoder in the same manner. For example, in intra-frame encoding / decoding processing, at least one of the following methods—deriving the intra-frame prediction mode, partitioning the block, constructing reference samples, and performing intra-frame prediction—can be applied equally in both the encoder and decoder. Furthermore, the order in which the methods are applied can differ between the encoder and decoder. For instance, in the process of performing intra-frame encoding / decoding for the current block, the encoder can encode the intra-frame prediction mode determined by performing at least one intra-frame prediction after constructing the reference samples.

[0559] Embodiments of the present invention can be applied according to the size of at least one of the coding block, prediction block, block, and unit. Here, the size can be defined as a minimum size and / or a maximum size for applying the embodiment, and can be defined as a fixed size to which the embodiment is applied. Furthermore, a first embodiment can be applied according to a first size, and a second embodiment can be applied according to a second size. That is, the embodiment can be applied multiple times according to the size. In addition, embodiments of the present invention can be applied only when the size is equal to or greater than the minimum size and equal to or less than the maximum size. That is, the embodiment can be applied only when the block size is within a predetermined range.

[0560] For example, the embodiment can be applied only when the size of the encoded / decoded target block is equal to or greater than 8×8. For example, the embodiment can be applied only when the size of the encoded / decoded target block is equal to or greater than 16×16. For example, the embodiment can be applied only when the size of the encoded / decoded target block is equal to or greater than 32×32. For example, the embodiment can be applied only when the size of the encoded / decoded target block is equal to or greater than 64×64. For example, the embodiment can be applied only when the size of the encoded / decoded target block is equal to or greater than 128×128. For example, the embodiment can be applied only when the size of the encoded / decoded target block is 4×4. For example, the embodiment can be applied only when the size of the encoded / decoded target block is equal to or less than 8×8. For example, the embodiment can be applied only when the size of the encoded / decoded target block is equal to or greater than 16×16. For example, the embodiment can be applied only when the size of the encoded / decoded target block is equal to or greater than 8×8 and equal to or less than 16×16. For example, the embodiment can only be applied if the size of the encoded / decoded target block is equal to or greater than 16×16 and equal to or less than 64×64.

[0561] Embodiments of the present invention can be applied according to time layers. Identifiers for identifying the time layers to which embodiments can be applied can be signaled, and embodiments can be applied to the time layers indicated by the identifiers. Here, the identifiers can be defined as indicating the minimum and / or maximum layers to which embodiments can be applied, and can be defined as indicating a specific layer to which embodiments can be applied.

[0562] For example, the embodiment can only be applied when the time layer of the current frame is the lowest layer. For example, the embodiment can only be applied when the time layer identifier of the current frame is 0. For example, the embodiment can only be applied when the time layer identifier of the current frame is equal to or greater than 1. For example, the embodiment can only be applied when the time layer of the current frame is the highest layer.

[0563] As described in the embodiments of the present invention, the reference screen set used in the process of reference screen list construction and reference screen list modification may use at least one of reference screen lists L0, L1, L2 and L3.

[0564] According to an embodiment of the present invention, when the deblocking filter calculates the boundary strength, at least one to at most N motion vectors of the encoded / decoded target block can be used. Here, N indicates a positive integer equal to or greater than 1, such as 2, 3, 4, etc.

[0565] In motion vector prediction, embodiments of the present invention can be applied when the motion vector has at least one of the following units: 16-pixel (16-pel) unit, 8-pixel (8-pel) unit, 4-pixel (4-pel) unit, integer-pixel (integer-pel) unit, 1 / 2-pixel (1 / 2-pel) unit, 1 / 4-pixel (1 / 4-pel) unit, 1 / 8-pixel (1 / 8-pel) unit, 1 / 16-pixel (1 / 16-pel) unit, 1 / 32-pixel (1 / 32-pel) unit, and 1 / 64-pixel (1 / 64-pel) unit. Furthermore, when performing motion vector prediction, the motion vector can be optionally used for each pixel unit.

[0566] The strip type for applying embodiments of the present invention can be defined, and embodiments of the present invention can be applied according to the strip type.

[0567] For example, when the stripe type is T (three-way prediction)-strip, the prediction block can be generated using at least three motion vectors, and can be used as the final prediction block for the encoding / decoding target block by calculating the weighted sum of at least three prediction blocks. Similarly, when the stripe type is Q (four-way prediction)-strip, the prediction block can be generated using at least four motion vectors, and can be used as the final prediction block for the encoding / decoding target block by calculating the weighted sum of at least four prediction blocks.

[0568] The embodiments of the present invention can be applied to inter-frame prediction and motion compensation methods that use motion vector prediction, as well as inter-frame prediction and motion compensation methods that use skip mode, merge mode, etc.

[0569] The shape of the block applied in the embodiments of the present invention can be square or non-square.

[0570] In the above embodiments, the method is described based on a flowchart having a series of steps or units. However, the present invention is not limited to the order of the steps; rather, some steps may be performed simultaneously with other steps, or may be performed with other steps in a different order. Furthermore, those skilled in the art should understand that the steps in the flowchart are not mutually exclusive, and other steps may be added to the flowchart, or some steps may be deleted from the flowchart, without affecting the scope of the present invention.

[0571] The embodiments include various aspects of the examples. All possible combinations of these aspects may not be described, but those skilled in the art will recognize the different combinations. Therefore, the invention may include all substitutions, modifications, and alterations within the scope of the claims.

[0572] Embodiments of the present invention can be implemented in the form of program instructions, which can be executed by various computer components and recorded on a computer-readable recording medium. The computer-readable recording medium may include individual program instructions, data files, data structures, etc., or combinations thereof. The program instructions recorded in the computer-readable recording medium may be specially designed and constructed for the present invention, or are well known to those skilled in the art of computer software. Examples of computer-readable recording media include: magnetic recording media (such as hard disks, floppy disks, and magnetic tapes); optical data storage media (such as CD-ROMs or DVD-ROMs); magneto-optical media (such as floppy disks); and hardware devices (such as read-only memory (ROM), random access memory (RAM), flash memory, etc.) specially constructed for storing and implementing program instructions. Examples of program instructions include not only machine language code formatted by a compiler, but also high-level language code that can be implemented by a computer using an interpreter. The hardware device may be configured to operate by one or more software modules to perform the processing according to the present invention, or vice versa.

[0573] Although the invention has been described with reference to specific terminology (such as detailed elements) and limited embodiments and drawings, these are provided only to aid in a more general understanding of the invention, and the invention is not limited to the embodiments described above. Those skilled in the art will understand that various modifications and changes can be made from the above description.

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

[0575] Industrial availability

[0576] This invention can be used to encode / decode images.

Claims

1. A decoding device for image decoding, the decoding device comprising: Memory; as well as At least one processor, connected to the memory, is configured to: Encoded blocks are obtained by partitioning the image; Determine whether the size of the coded block falls within a predetermined range; The segmentation type of the coded block is determined based on whether the size of the coded block falls within the predetermined range; Derive the current coding block segmented from the coding block based on the segmentation type of the coding block; as well as Reconstruct the current encoded block. In order to determine the segmentation type of the encoded block based on whether the size of the encoded block falls within the predetermined range, the at least one processor is configured to perform: Decode the segmentation flag that indicates whether the encoded block has been segmented; Based on the fact that the segmentation flag is equal to 1, the first flag indicating whether the encoded block is a quadtree segment is decoded; and Based on the value of the first flag indicating that the coded block is not segmented by a quadtree, the second flag indicating whether the segmentation direction of the coded block is vertical or horizontal is decoded. Information about the minimum block size related to the quadtree partition is transmitted via a signal.

2. An encoding device for image encoding, the encoding device comprising: Memory; as well as At least one processor, connected to the memory, is configured to: Encoded blocks are obtained by partitioning the image; Determine whether the size of the coded block falls within a predetermined range; The segmentation type of the coded block is determined based on whether the size of the coded block falls within the predetermined range; Derive the current coding block segmented from the coding block based on the segmentation type of the coding block; as well as The image information, including information about the segmentation type, is encoded. In order to encode the image information, the at least one processor is configured to perform: Encode the segmentation flag that indicates whether the coded block has been segmented; Based on the fact that the segmentation flag is equal to 1, the first flag indicating whether the coded block is a quadtree segment is encoded; and Based on the value of the first flag indicating that the coded block is not a quadtree segment, the second flag indicating whether the segmentation direction of the coded block is vertical or horizontal is encoded. Information regarding the minimum block size related to the quadtree partitioning is encoded.

3. A device for transmitting image data, the device comprising: Memory; as well as At least one processor, connected to the memory, is configured to: Obtaining a bitstream of encoded image information, wherein the encoded image information is generated based on the following operations: obtaining coded blocks by partitioning an image; determining whether the size of the coded block falls within a predetermined range; determining the segmentation type of the coded block based on whether the size of the coded block falls within the predetermined range; deriving a current coded block segmented from the coded block based on the segmentation type; and encoding image information including information about the segmentation type; and Transmit image data including the bitstream. The step of encoding the image information includes the following steps: Encode the segmentation flag that indicates whether the coded block has been segmented; Based on the fact that the segmentation flag is equal to 1, the first flag indicating whether the coded block is a quadtree segment is encoded; and Based on the value of the first flag indicating that the coded block is not a quadtree segment, the second flag indicating whether the segmentation direction of the coded block is vertical or horizontal is encoded. Information regarding the minimum block size related to the quadtree partitioning is encoded.