Image decoding method, image encoding method, and data transmission method

By adopting a matrix-based intra prediction method in image encoding technology, the compression and transmission problems of high resolution and high-quality image/video data are solved, and higher encoding efficiency and lower cost are achieved.

CN119450074APending Publication Date: 2025-02-14NOKIA TECHNOLOGIES OY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411378745.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2019-06-03
Filing Date
2020-06-03
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The prior art is difficult to effectively compress and transmit high-resolution and high-quality image/video data, especially when meeting application needs such as ultra-high-definition images, virtual reality and holograms.

Method used

The intra prediction method based on the matrix is ​​adopted, and the image decoding method performed by the decoding device is used to generate intra prediction samples using matrix-vector multiplication and interpolation operations, and encode and store them.

Benefits of technology

Improves image/video encoding efficiency, reduces transmission and storage costs, and enhances encoding performance for high resolution and high-quality images/video.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119450074A_ABST
    Figure CN119450074A_ABST
Patent Text Reader

Abstract

The invention relates to an image decoding method, an image encoding method, and a data transmission method. An image decoding method according to this document may comprise the steps of: receiving second flag information indicating whether a matrix-based intra prediction (MIP) can be applied to a current block, on the basis of first flag information indicating whether the MIP can be applied to the current block; receiving matrix-based intra prediction MIP mode information based on the second flag information; generating an intra prediction sample of the current block based on the MIP mode information; and generating a reconstructed sample of the current block based on the intra prediction sample.
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 with application number 202080044821.9 (International application number: PCT / KR2020 / 007221, application date: June 3, 2020, invention name: Matrix-based intra-frame prediction device and method). Technical Field

[0002] The present disclosure relates to an image encoding technology, and more particularly, to an image encoding technology for a matrix-based intra prediction device and a matrix-based intra prediction. Background Art

[0003] Nowadays, the demand for high-resolution and high-quality images / videos such as 4K, 8K or higher ultra-high-definition (UHD) images / videos has been growing in various fields. As image / video data becomes higher resolution and higher quality, the amount of information or bit volume sent increases compared to traditional image data. Therefore, when using a medium such as a traditional wired / wireless broadband line to send image data or using an existing storage medium to store image / video data, its transmission cost and storage cost increase.

[0004] In addition, nowadays, interest and demand for immersive media such as virtual reality (VR) and artificial reality (AR) content or holograms are increasing, and broadcasting of images / videos having image characteristics different from real images such as game images is increasing.

[0005] Therefore, there is a need for an efficient image / video compression technology that effectively compresses and transmits or stores and reproduces information of high-resolution and high-quality images / videos having various characteristics as described above. Summary of the invention

[0006] Technical issues

[0007] A technical aspect of the present disclosure is to provide a method and an apparatus for increasing image encoding efficiency.

[0008] Another technical aspect of the present disclosure is to provide an efficient intra-frame prediction method and an efficient intra-frame prediction device.

[0009] Still another technical aspect of the present disclosure is to provide an image encoding method and an image encoding device for matrix-based intra-frame prediction.

[0010] Still another technical aspect of the present disclosure is to provide an image encoding method and an image encoding apparatus for encoding mode information about matrix-based intra prediction.

[0011] Technical Solution

[0012] According to an embodiment of the present disclosure, an image decoding method performed by a decoding device is provided. The method may include: based on first flag information indicating whether matrix-based intra prediction (MIP) can be used for a current block, receiving second flag information indicating whether MIP is used for the current block; based on the second flag information, receiving matrix-based intra prediction (MIP) mode information; based on the MIP mode information and the size of the current block, generating intra prediction samples of the current block; and generating reconstructed samples of the current block based on the intra prediction samples.

[0013] The first flag information is signaled through sequence parameter set (SPS) syntax information, and the second flag information is signaled through coding unit syntax information.

[0014] The MIP mode information may be index information indicating a MIP mode applied to the current block.

[0015] The generation of intra-frame prediction samples may include: deriving reduced boundary samples by downsampling reference samples adjacent to the current block; deriving reduced prediction samples based on multiplication of the reduced boundary samples with the MIP matrix; and generating intra-frame prediction samples of the current block by upsampling the reduced prediction samples.

[0016] The downscaled boundary samples may be downsampled by averaging the reference samples, and the intra-prediction samples may be upsampled by linear interpolation of the downscaled prediction samples.

[0017] The MIP matrix may be derived based on the size and index information of the current block.

[0018] The MIP matrix may be selected from any one of three matrix sets classified according to the size of the current block, and each of the three matrix sets may include a plurality of MIP matrices.

[0019] According to another embodiment of the present disclosure, an image encoding method performed by an encoding device is provided. The method may include: deriving whether to apply a matrix-based intra-frame prediction MIP to a current block; when the MIP is applied to the current block, deriving intra-frame prediction samples of the current block based on the MIP; deriving residual samples of the current block based on the intra-frame prediction samples; and encoding information about the residual samples and information about the MIP, wherein the information about the MIP may include first flag information indicating whether the matrix-based intra-frame prediction MIP can be used for the current block and second flag information indicating whether the MIP is applied to the current block and matrix-based intra-frame prediction (MIP) mode information.

[0020] According to still another embodiment of the present disclosure, a digital storage medium storing image data including encoded image information and a bit stream generated according to an image encoding method performed by an encoding device may be provided.

[0021] According to yet another embodiment of the present disclosure, a digital storage medium storing image data including encoded image information and a bit stream so that a decoding device performs an image decoding method may be provided.

[0022] Technical Effects

[0023] The present disclosure may have various effects. For example, according to an embodiment of the present disclosure, the overall image / video compression efficiency may be increased. In addition, according to an embodiment of the present disclosure, the implementation complexity may be reduced and the prediction performance may be enhanced by efficient intra-frame prediction, thereby improving the overall coding efficiency. In addition, according to an embodiment of the present disclosure, when matrix-based intra-frame prediction is performed, index information indicating matrix-based intra-frame prediction may be efficiently encoded, thereby improving the coding efficiency.

[0024] The effects that can be obtained through the detailed examples in the specification are not limited to the above-mentioned effects. For example, there may be various technical effects that can be understood or derived from the specification by a person skilled in the relevant art. Therefore, the detailed effects of the specification are not limited to those explicitly described in the specification, and may include various effects that can be understood or derived from the technical features of the specification. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 An example of a video / image encoding system to which an embodiment of the present disclosure can be applied is schematically illustrated.

[0026] Figure 2 The configuration of a video / image encoding device to which an embodiment of the present disclosure can be applied is schematically illustrated.

[0027] Figure 3 The configuration of a video / image decoding device to which an embodiment of the present disclosure can be applied is schematically illustrated.

[0028] Figure 4 An example of a content streaming system to which an embodiment of the present disclosure can be applied is illustrated.

[0029] Figure 5 Context-Adaptive Binary Arithmetic Coding (CABAC) for encoding syntax elements is illustrated.

[0030] Figure 6 An example of an intra-prediction-based image encoding method to which the embodiments of the present disclosure can be applied is schematically illustrated.

[0031] Figure 7An example of an image decoding method based on intra-frame prediction to which the embodiments of the present disclosure can be applied is schematically illustrated.

[0032] Figure 8 An example of an intra prediction mode to which an embodiment of the present disclosure can be applied is illustrated.

[0033] Fig. 9 An example of an MPM-based intra prediction method in an encoding device to which an embodiment of the present disclosure can be applied is illustrated.

[0034] Fig.10 An example of an MPM-based intra prediction method in a decoding device to which an embodiment of the present disclosure can be applied is illustrated.

[0035] Fig.11 A MIP-based prediction sample generation process according to an example is illustrated.

[0036] Fig.12 The MIP process of a 4×4 block is illustrated.

[0037] Fig.13 The MIP process for an 8×8 block is illustrated.

[0038] Fig.14 The MIP process of an 8×4 block is illustrated.

[0039] Fig.15 The MIP process for a 16×16 block is illustrated.

[0040] Fig.16 The boundary averaging process in the MIP process is illustrated.

[0041] Fig.17 Illustrate linear interpolation in the MIP process.

[0042] Fig.18 The MIP technology according to the embodiment of the present disclosure is illustrated.

[0043] Fig.19 is a flowchart schematically illustrating a decoding method that can be performed by a decoding device according to an embodiment of the present disclosure.

[0044] Fig. 20 is a flowchart schematically illustrating an encoding method that can be performed by an encoding device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0045] This document can be modified in various ways and can have various embodiments, and specific embodiments will be illustrated and described in detail in the drawings. However, this is not intended to limit this document to specific embodiments. The commonly used terms in this specification are used to describe specific embodiments, but are not used to limit the technical spirit of this document. Unless otherwise clearly stated in the context, the expression in the singular form includes plural expressions. Terms such as "including" or "having" in this specification should be understood to indicate the existence of the characteristics, quantities, steps, operations, elements, parts or combinations thereof described in the specification, without excluding the existence of one or more other characteristics, quantities, steps, operations, elements, parts or combinations thereof or the possibility of adding one or more other characteristics, quantities, steps, operations, elements, parts or combinations thereof.

[0046] The elements in the drawings described in this document are independently illustrated for the convenience of describing the different characteristic functions. This does not mean that each element is implemented as separate hardware or separate software. For example, at least two of the elements can be combined to form a single element, or a single element can be divided into multiple elements. Embodiments in which elements are combined and / or separated are also included in the scope of the rights of this document, unless it deviates from the essence of this document.

[0047] In this document, the term "A or B" may mean "only A", "only B", or "both A and B". In other words, in this document, the term "A or B" may be interpreted as indicating "A and / or B". For example, in this document, the term "A, B, or C" may mean "only A", "only B", "only C", or "any combination of A, B, and C".

[0048] A slash “ / ” or a comma used in this document may mean “and / or”. For example, “A / B” may mean “A and / or B”. Thus, “A / B” may mean “only A”, “only B”, or “both A and B”. For example, “A, B, C” may mean “A, B, or C”.

[0049] In this document, "at least one of A and B" may mean "only A", "only B", or "both A and B". In addition, in this document, the expression "at least one of A or B" or "at least one of A and / or B" may be interpreted as "at least one of A and B".

[0050] Furthermore, in this document, “at least one of A, B, and C” may mean “only A,” “only B,” “only C,” or “any combination of A, B, and C.” Furthermore, “at least one of A, B, or C” or “at least one of A, B and / or C” may mean “at least one of A, B, and C.”

[0051] In addition, brackets used in this document may mean "for example". Specifically, in the case of expressing "prediction (intra-frame prediction)", this may indicate that "intra-frame prediction" is proposed as an example of "prediction". In other words, "prediction" in this document is not limited to "intra-frame prediction", and this may indicate that "intra-frame prediction" is proposed as an example of "prediction". In addition, even in the case of expressing "prediction (ie, intra-frame prediction)", this may indicate that "intra-frame prediction" is proposed as an example of "prediction".

[0052] In this document, technical features individually described in one drawing may be implemented individually, or may be implemented simultaneously.

[0053] This document relates to video / image coding. For example, the methods / implementations disclosed in this document can be applied to methods disclosed in the Versatile Video Coding (VVC), the Essential Video Coding (EVC) standard, the AOMedia Video 1 (AV1) standard, the second generation Audio Video Coding standard (AVS2), or the next generation video / image coding standard (e.g., H.267 or H.268, etc.).

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

[0055] In this document, video may refer to a series of images over time. A picture generally refers to a unit representing an image in a specific time region, while a slice / tile is a unit that constitutes a part of a coded picture. A slice / tile may include one or more coding tree units (CTUs). A picture may consist of one or more slices / tiles. A picture may consist of one or more tile groups. A tile group may include one or more tiles. A brick may represent a rectangular area of ​​a CTU row within a tile in a picture. A tile may be divided into multiple blocks, each brick consisting of one or more CTU rows within a tile. Tiles that are not divided into multiple bricks may also be referred to as bricks. Brick scanning is a specific ordering of CTUs of the divided tiles in a brick, which are continuously ordered in a CTU raster scan in a picture, and the tiles in a picture are continuously ordered in a raster scan of the tiles of the picture. A tile is a rectangular area of ​​a CTU within a specific tile column and a specific tile row in a picture. A tile column is a rectangular area of ​​a CTU whose height is equal to the height of the picture and whose width is specified by the syntax elements in the picture parameter set. A tile row is a rectangular area of ​​a CTU whose height is specified by the syntax elements in the picture parameter set and whose width is equal to the width of the picture. Tile scan is a specific sequential ordering of the CTUs of a partitioned picture in tiles, which are ordered continuously in a raster scan of the CTUs in the picture, and the tiles in the picture are ordered continuously in a raster scan of the tiles of the picture. A slice consists of an integer number of bricks of a picture that can be exclusively included in a single NAL unit. A slice can consist of multiple complete tiles or of a continuous sequence of complete bricks of only one tile. Tile groups and slices can be used interchangeably in this document. For example, in this document, a tile group / tile group header may be referred to as a slice / slice header.

[0056] A pixel or a picture element (pel) may refer to the smallest unit constituting a picture (or image). In addition, a "sample" may be used as a term corresponding to a pixel. A sample may generally represent a pixel or a pixel value, and may represent only a pixel / pixel value of a luminance component or only a pixel / pixel value of a chrominance component.

[0057] A unit may represent a basic unit of image processing. A unit may include at least one of a specific region and information related to the region. A unit may include a luminance block and two chrominance (e.g., cb, cr) blocks. Depending on the situation, terms such as unit, block, region, etc. may be used interchangeably. In general, an M×N block may include a set (or array) of samples (or sample arrays) or transform coefficients consisting of M columns and N rows.

[0058] Hereinafter, preferred embodiments of the present document are described in more detail with reference to the accompanying drawings. Hereinafter, in the accompanying drawings, the same reference numerals are used for the same elements, and redundant descriptions of the same elements may be omitted.

[0059] Figure 1 An example of a video / image encoding system to which an embodiment of the present disclosure can be applied is schematically illustrated.

[0060] Reference Figure 1 The video / image coding system may include a first device (source device) and a second device (receiving device). The source device may transmit the coded video / image information or data to the receiving device in the form of a file or stream via a digital storage medium or a network.

[0061] The source device may include a video source, an encoding device, and a transmitter. The receiving device may include a receiver, a decoding device, and a renderer. The encoding device may be referred to as a video / image encoding device, and the decoding device may be referred to as a video / image decoding device. The transmitter may be included in the encoding device. The receiver may be included in the decoding device. The renderer may include a display, and the display may be configured as a separate device or an external component.

[0062] The video source can obtain the video / image by capturing, synthesizing or generating the process of the video / image. The video source may include a video / image capturing device and / or a video / image generating device. The video / image capturing device may include, for example, one or more cameras, a video / image archive including previously captured videos / images, etc. The video / image generating device may include, for example, a computer, a tablet computer, and a smart phone, and may (electronically) generate the video / image. For example, a virtual video / image may be generated by a computer, etc. In this case, the video / image capturing process may be replaced by the process of generating the relevant data.

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

[0064] The transmitter may transmit the encoded video / image information or data output in the form of a bit stream to a receiver of a receiving device in the form of a file or stream through a digital storage medium or a network. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitter may include an element for generating a media file in a predetermined file format, and may include an element for transmitting through a broadcast / communication network. The receiver may receive / extract a bit stream and transmit the received / extracted bit stream to a decoding device.

[0065] The decoding device may decode a video / image by performing a series of processes such as dequantization, inverse transformation, prediction, etc. corresponding to the operation of the encoding device.

[0066] The renderer can render the decoded video / image, and the rendered video / image can be displayed through a display.

[0067] Figure 2 is a diagram schematically illustrating a configuration of a video / image encoding device to which the present disclosure can be applied. Hereinafter, the so-called video encoding device may include an image encoding device.

[0068] Reference Figure 2 , the encoding device 200 may include an image divider 210, a predictor 220, a residual processor 230, an entropy encoder 240, an adder 250, a filter 260, and a memory 270. The predictor 220 may include an inter-frame predictor 221 and an intra-frame predictor 222. The residual processor 230 may include a transformer 232, a quantizer 233, a dequantizer 234, and an inverse transformer 235. The residual processor 230 may further include a subtractor 231. The adder 250 may be referred to as a reconstructor or a reconstructed block generator. According to an embodiment, the image divider 210, the predictor 220, the residual processor 230, the entropy encoder 240, the adder 250, and the filter 260 described above may be composed of one or more hardware components (e.g., an encoder chipset or processor). In addition, the memory 270 may include a decoded picture buffer (DPB) and may be composed of a digital storage medium. The hardware component may further include a memory 270 as an internal / external component.

[0069] The image divider 210 may divide the input image (or picture or frame) input to the encoding device 200 into one or more processing units. As an example, the processing unit may be referred to as a coding unit (CU). In this case, starting from a coding tree unit (CTU) or a maximum coding unit (LCU), the coding unit may be recursively divided according to a quadtree binary tree ternary tree (QTBTTT) structure. For example, based on a quadtree structure, a binary tree structure, and / or a ternary tree structure, a coding unit may be divided into a plurality of coding units with a deeper depth. In this case, for example, a quadtree structure may be applied first, and a binary tree structure and / or a ternary tree structure may be applied later. Alternatively, a binary tree structure may be applied first. The encoding process according to the present disclosure may be performed based on a final coding unit that is not further divided. In this case, based on the coding efficiency according to the image characteristics, the maximum coding unit may be directly used as the final coding unit. Alternatively, the coding unit may be recursively divided into coding units of a deeper depth as needed, whereby a coding unit of the best size may be used as the final coding unit. Here, the encoding process may include processes such as prediction, transformation, and reconstruction, which will be described later. As another example, the processing unit may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may be separated or divided from the above-mentioned final coding unit. The prediction unit may be a unit for sample prediction, and the transform unit may be a unit for deriving a transform coefficient and / or a unit for deriving a residual signal from a transform coefficient.

[0070] Unit and terms such as block, region, etc. may be used to replace each other depending on the situation. In general, an M×N block may represent a set of samples or transform coefficients consisting of M columns and N rows. A sample may generally represent a pixel or a pixel value, and may represent only a pixel / pixel value of a luminance component, or only a pixel / pixel value of a chrominance component. A sample may be used as a term corresponding to a pixel or a pel of a picture (or image).

[0071] In the encoding device 200, a prediction signal (prediction block, prediction sample array) output from the inter predictor 221 or the intra predictor 222 is subtracted from the input image signal (original block, original sample array) to generate a residual signal (residual block, residual sample array), and the generated residual signal is sent to the transformer 232. In this case, as shown in the figure, the unit for subtracting the prediction signal (prediction block, prediction sample array) from the input image signal (original block, original sample array) in the encoding device 200 can be called a subtractor 231. The predictor can perform prediction on the block to be processed (hereinafter referred to as the current block) and generate a prediction block including the prediction samples of the current block. The predictor can determine whether to apply intra prediction or inter prediction based on the current block or CU. As described later in the description of each prediction mode, the predictor can generate various information related to prediction such as prediction mode information, and send the generated information to the entropy encoder 240. Information about the prediction can be encoded in the entropy encoder 240 and output in the form of a bitstream.

[0072] The intra-frame predictor 222 can predict the current block by referring to the samples in the current picture. Depending on the prediction mode, the reference sample can be located near the current block or separated from the current block. In intra-frame prediction, the prediction mode may include a variety of non-directional modes and a variety of directional modes. The non-directional mode may include, for example, a DC mode and a plane mode. Depending on the level of detail of the prediction direction, the directional mode may include, for example, 33 directional prediction modes or 65 directional prediction modes. However, this is only an example, and more or fewer directional prediction modes may be used depending on the setting. The intra-frame predictor 222 may determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks.

[0073] The inter-frame predictor 221 may derive a prediction block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. At this time, in order to reduce the amount of motion information sent in the inter-frame prediction mode, the motion information may be predicted based on a block, a sub-block, or a sample based on the correlation of the motion information between the neighboring block and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter-frame prediction, the neighboring blocks may include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same as or different from each other. The temporal neighboring block may be referred to as a collocated reference block, a collocated CU (colCU), etc., and the reference picture including the temporal neighboring block may be referred to as a collocated picture (colPic). For example, the inter-frame predictor 221 may configure a motion information candidate list based on the neighboring blocks, and generate information indicating which candidate is used to derive the motion vector and / or reference picture index of the current block. Inter-frame prediction may be performed based on various prediction modes. For example, in the case of the skip mode and the merge mode, the inter-frame predictor 221 can use the motion information of the neighboring block as the motion information of the current block. In the skip mode, unlike the merge mode, the residual signal cannot be sent. In the case of the motion information prediction (motion vector prediction, MVP) mode, the motion vector of the neighboring block can be used as a motion vector predictor, and the motion vector of the current block can be indicated by signaling the motion vector difference.

[0074] The predictor 220 can generate a prediction signal based on various prediction methods described below. For example, the predictor can not only apply intra prediction or inter prediction to predict a block, but also apply both intra prediction and inter prediction at the same time. This can be called combined inter and intra prediction (CIIP). In addition, the predictor can predict the block based on the intra block copy (IBC) prediction mode or the palette mode. The IBC prediction mode or the palette mode can be used for content image / video encoding of games, such as picture content coding (SCC). IBC basically performs prediction in the current picture, but can be performed similarly to inter prediction because the reference block is derived in the current picture. That is, IBC can use at least one inter prediction technique described in this document. The palette mode can be regarded as an example of intra coding or intra prediction. When the palette mode is applied, the sample value within the picture can be signaled based on information about the palette table and the palette index.

[0075] The prediction signal generated by the predictor (including the inter-frame predictor 221 and / or the intra-frame predictor 222) can be used to generate a reconstruction signal or to generate a residual signal. The transformer 232 can generate a transform coefficient by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a Karhunen-Loève transform (KLT), a graph-based transform (GBT), or a conditional nonlinear transform (CNT). Here, GBT means a transform obtained from a curve graph when the relationship information between pixels is represented by a curve graph. CNT refers to a transform generated based on a prediction signal generated using all previously reconstructed pixels. In addition, the transform process can be applied to square pixel blocks of the same size, or can be applied to blocks of variable size rather than square blocks.

[0076] The quantizer 233 may quantize the transform coefficients and send them to the entropy encoder 240, and the entropy encoder 240 may encode the quantized signal (information about the quantized transform coefficients) and output a bitstream. Information about the quantized transform coefficients may be referred to as residual information. The quantizer 233 may rearrange the block-type quantized transform coefficients into a one-dimensional vector based on the coefficient scanning order, and generate information about the quantized transform coefficients based on the quantized transform coefficients in the form of a one-dimensional vector. Information about the quantized transform coefficients may be generated. The entropy encoder 240 may perform various encoding methods such as, for example, exponential Golomb, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), etc. The entropy encoder 240 may encode information required for video / image reconstruction other than the quantized transform coefficients (e.g., the value of the syntax element, etc.) together or separately. The encoded information (e.g., the encoded video / image information) may be transmitted or stored in units of a network abstraction layer (NAL) in the form of a bitstream. The video / image information may also include information about various parameter sets such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may also include conventional constraint information. In this document, information and / or syntax elements sent from an encoding device to / signaled to a decoding device may be included in the video / picture information. The video / image information may be encoded by the above-mentioned encoding process and included in a bitstream. The bitstream may be sent over a network or stored in a digital storage medium. The network may include a broadcast network and / or a communication network, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) that sends a signal output from the entropy encoder 240 or a storage unit (not shown) that stores the signal may be included as an internal / external element of the encoding device 200, and alternatively, the transmitter may be included in the entropy encoder 240.

[0077] The quantized transform coefficients output from the quantizer 233 can be used to generate a prediction signal. For example, the residual signal (residual block or residual sample) can be reconstructed by applying dequantization and inverse transform to the quantized transform coefficients via the dequantizer 234 and the inverse transformer 235. The adder 250 adds the reconstructed residual signal to the prediction signal output from the inter-frame predictor 221 or the intra-frame predictor 222 to generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array). If there is no residual in the block to be processed, such as the case where the skip mode is applied, the prediction block can be used as a reconstructed block. The adder 250 can be referred to as a reconstructor or a reconstructed block generator. The generated reconstructed signal can be used for intra-frame prediction of the next block to be processed in the current picture, and can be used for inter-frame prediction of the next picture through the filtering described below.

[0078] Furthermore, luma mapping with chroma scaling (LMCS) may be applied during picture encoding and / or reconstruction.

[0079] The filter 260 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 260 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture and store the modified reconstructed picture in the memory 270 (specifically, the DPB of the memory 270). Various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc. The filter 260 can generate various information related to filtering, and send the generated information to the entropy encoder 240, as described later in the description of each filtering method. The information related to filtering can be encoded by the entropy encoder 240 and output in the form of a bit stream.

[0080] The modified reconstructed picture transmitted to the memory 270 may be used as a reference picture in the inter predictor 221. When inter prediction is applied by the encoding apparatus, prediction mismatch between the encoding apparatus 200 and the decoding apparatus may be avoided, and encoding efficiency may be improved.

[0081] The DPB of the memory 270 may store the modified reconstructed picture for use as a reference picture in the inter-frame predictor 221. The memory 270 may store the motion information of the block of the derived (or encoded) motion information in the current picture and / or the motion information of the reconstructed block in the picture. The stored motion information may be sent to the inter-frame predictor 221 and used as the motion information of the spatial neighboring block or the motion information of the temporal neighboring block. The memory 270 may store the reconstructed samples of the reconstructed block in the current picture, and may transmit the reconstructed samples to the intra-frame predictor 222.

[0082] Figure 3 is a schematic diagram illustrating a configuration of a video / image decoding device to which embodiments of this document can be applied.

[0083] Reference Figure 3 , the video decoding device 300 may include an entropy decoder 310, a residual processor 320, a predictor 330, an adder 340, a filter 350, and a memory 360. The predictor 330 may include an intra-frame predictor 331 and an inter-frame predictor 332. The residual processor 320 may include a dequantizer 321 and an inverse transformer 322. According to an embodiment, the entropy decoder 310, the residual processor 320, the predictor 330, the adder 340, and the filter 350 described above may be composed of one or more hardware components (e.g., a decoder chipset or a processor). In addition, the memory 360 may include a decoded picture buffer (DPB) and may be composed of a digital storage medium. The hardware component may also include a memory 360 as an internal / external component.

[0084] When a bit stream including video / image information is input, the decoding device 300 can Figure 2 The image is reconstructed correspondingly to the processing of the video / image information in the encoding device. For example, the decoding device 300 can derive the unit / block based on the information related to the block segmentation obtained from the bit stream. The decoding device 300 can perform decoding by using the processing unit applied in the encoding device. Therefore, the decoding processing unit can be, for example, a coding unit, which can be divided into a quadtree structure, a binary tree structure and / or a ternary tree structure using a coding tree unit or a maximum coding unit. One or more transformation units can be derived from the coding unit. And, the reconstructed image signal decoded and output by the decoding device 300 can be reproduced by a reproducer.

[0085] The decoding device 300 may receive the bit stream from Figure 2The signal output by the encoding device of the video encoding device 310 can be decoded by the entropy decoder 310. For example, the entropy decoder 310 can parse the bitstream to derive information (e.g., video / image information) required for image reconstruction (or picture reconstruction). The video / image information may also include information about various parameter sets such as an adaptive parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may also include conventional constraint information. The decoding device may also decode the picture based on the information about the parameter set and / or the conventional constraint information. The signaled / received information and / or syntax elements described later in this document may be decoded and obtained from the bitstream through a decoding process. For example, the entropy decoder 310 decodes the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and outputs syntax elements required for image reconstruction and quantized values ​​of transform coefficients of the residual. More specifically, the CABAC entropy decoding method can receive the bin corresponding to each syntax element in the bitstream, use the information of the symbol / bin decoded in the previous stage, the decoding target syntax element information or the decoding target block to determine the context model, and perform arithmetic decoding on the bin by predicting the probability of occurrence of the bin according to the determined context model, and generate a symbol corresponding to the value of each syntax element. In this case, the CABAC entropy decoding method can update the context model by using the information of the decoded symbol / bin of the context model for the next symbol / bin after determining the context model. The information related to the prediction among the information decoded by the entropy decoder 310 can be provided to the predictor (inter-frame predictor 332 and intra-frame predictor 331), and the residual value to which entropy decoding is performed in the entropy decoder 310, that is, the quantized transform coefficient and the related parameter information can be input to the residual processor 320. The residual processor 320 can derive a residual signal (residual block, residual sample, residual sample array). In addition, the information about filtering among the information decoded by the entropy decoder 310 can be provided to the filter 350. In addition, a receiver (not shown) for receiving a signal output from the encoding device may also be configured as an internal / external element of the decoding device 300, or the receiver may be a component of the entropy decoder 310. In addition, the decoding device according to the present document may be referred to as a video / image / picture decoding device, and the decoding device may be divided into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include the entropy decoder 310, and the sample decoder may include at least one of the dequantizer 321, the inverse transformer 322, the adder 340, the filter 350, the memory 360, the inter-frame predictor 332, and the intra-frame predictor 331.

[0086] The dequantizer 321 may output the transform coefficient by dequantizing the quantized transform coefficient. The dequantizer 321 may rearrange the quantized transform coefficient into a two-dimensional block form. In this case, the rearrangement may be performed based on the order of coefficient scanning that has been performed in the encoding device. The dequantizer 321 may perform dequantization on the quantized transform coefficient using a quantization parameter (e.g., quantization step size information) and obtain the transform coefficient.

[0087] The inverse transformer 322 obtains a residual signal (residual block, residual sample array) by performing inverse transformation on the transformation coefficients.

[0088] The predictor may perform prediction on the current block and generate a prediction block including prediction samples for the current block. The predictor may determine whether to apply intra prediction or inter prediction to the current block based on information on prediction output from the entropy decoder 310, and may specifically determine an intra / inter prediction mode.

[0089] The predictor 330 can generate a prediction signal based on various prediction methods described below. For example, the predictor can not only apply intra prediction or inter prediction to predict a block, but also apply intra prediction and inter prediction at the same time. This can be called combined inter and intra prediction (CIIP). In addition, the predictor can predict the block based on the intra block copy (IBC) prediction mode or the palette mode. The IBC prediction mode or the palette mode can be used for content image / video encoding of games, such as picture content coding (SCC). IBC basically performs prediction in the current picture, but can be performed similarly to inter prediction because the reference block is derived in the current picture. That is, IBC can use at least one inter prediction technique described in this document. The palette mode can be regarded as an example of intra coding or intra prediction. When the palette mode is applied, the sample value within the picture can be signaled based on information about the palette table and the palette index.

[0090] The intra-frame predictor 331 can predict the current block by referring to samples in the current picture. Depending on the prediction mode, the referenced samples can be located in the neighbors of the current block, or can be located separately. In intra-frame prediction, the prediction mode can include multiple non-directional modes and multiple directional modes. The intra-frame predictor 331 can determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks.

[0091] The inter-frame predictor 332 may derive a prediction block of the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information sent in the inter-frame prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of the motion information between the adjacent blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter-frame prediction, the adjacent blocks may include spatial adjacent blocks present in the current picture and temporal adjacent blocks present in the reference picture. For example, the inter-frame predictor 332 may construct a motion information candidate list based on adjacent blocks, and derive a motion vector and / or a reference picture index of the current block based on the received candidate selection information. Inter-frame prediction may be performed based on various prediction modes, and information about the prediction may include information indicating a mode of inter-frame prediction for the current block.

[0092] The adder 340 can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the obtained residual signal to the prediction signal (prediction block, prediction sample array) output from the predictor (including the inter-frame predictor 332 and / or the intra-frame predictor 331). If there is no residual in the block to be processed, such as when the skip mode is applied, the prediction block can be used as the reconstructed block.

[0093] The adder 340 may be referred to as a reconstructor or a reconstructed block generator. The generated reconstructed signal may be used for intra prediction of the next block to be processed in the current picture, may be output through filtering as described below, or may be used for inter prediction of the next picture.

[0094] Furthermore, luma mapping with chroma scaling (LMCS) may be applied during the picture decoding process.

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

[0096] The (modified) reconstructed picture stored in the DPB of the memory 360 can be used as a reference picture in the inter-frame predictor 332. The memory 360 can store the motion information of the block of the derived (or decoded) motion information in the current picture and / or the motion information of the reconstructed block in the picture. The stored motion information can be sent to the inter-frame predictor 332, thereby being used as the motion information of the spatial neighboring block or the motion information of the temporal neighboring block. The memory 360 can store the reconstructed samples of the reconstructed block in the current picture and transmit the reconstructed samples to the intra-frame predictor 331.

[0097] In this document, the implementations described in the filter 260, the inter-frame predictor 221, and the intra-frame predictor 222 of the encoding device 200 may be the same as the filter 350, the inter-frame predictor 332, and the intra-frame predictor 331 of the decoding device 300, or may be applied respectively to correspond to the filter 350, the inter-frame predictor 332, and the intra-frame predictor 331 of the decoding device 300.

[0098] As described above, when performing video encoding, prediction is performed to enhance compression efficiency. A prediction block including prediction samples of a current block (ie, a target coding block) can be generated by prediction. In this case, the prediction block includes prediction samples in a spatial domain (or pixel domain). The prediction block is derived equally in the encoding device and the decoding device. The encoding device can enhance image coding efficiency by signaling information (residual information) about the residual between the original block and the prediction block to the decoding device, rather than the original sample value of the original block itself. The decoding device can derive a residual block including residual samples based on the residual information, can generate a reconstructed picture including reconstructed samples by adding the residual block to the prediction block, and can generate a reconstructed picture including the reconstructed block.

[0099] Residual information can be generated by a transformation and quantization process. For example, the encoding device can derive a residual block between the original block and the prediction block, can derive a transform coefficient by performing a transformation process on the residual samples (residual sample array) included in the residual block, can derive a quantized transform coefficient by performing a quantization process on the transform coefficient, and can signal the relevant residual information to the decoding device (through a bitstream). In this case, the residual information may include information such as value information, position information, a transformation scheme, a transform kernel, and a quantization parameter of a quantized transform coefficient. The decoding device can perform a dequantization / inverse transformation process based on the residual information, and can derive a residual sample (or residual block). The decoding device can generate a reconstructed picture based on the prediction block and the residual block. In addition, the encoding device can derive a residual block by dequantizing / inverse transforming the quantized transform coefficients used for reference of inter-frame prediction of subsequent pictures, and can generate a reconstructed picture.

[0100] Figure 4An example of a content streaming system to which the embodiments disclosed in this document can be applied is illustrated.

[0101] Reference Figure 4 The content streaming system to which the embodiments of this document are applied may basically include an encoding server, a streaming server, a web server, a media storage device, a user device, and a multimedia input device.

[0102] The encoding server compresses the content input from the multimedia input device such as a smart phone, a camera, a camcorder, etc. into digital data to generate a bit stream, and transmits the bit stream to the streaming server. As another example, when the multimedia input device such as a smart phone, a camera, a camcorder, etc. directly generates a bit stream, the encoding server can be omitted.

[0103] A bitstream may be generated by applying an encoding method or a bitstream generation method of an embodiment of this document, and a streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.

[0104] The streaming server sends multimedia data to the user device through the web server based on the user's request, and the web server is used as a medium for notifying the user of the service. When the user requests the desired service from the web server, the web server passes it to the streaming server, and the streaming server sends the multimedia data to the user. In this case, the content streaming system may include a separate control server. In this case, the control server is used to control the command / response between the devices in the content streaming system.

[0105] The streaming server may receive content from a media storage device and / or an encoding server. For example, when content is received from an encoding server, the content may be received in real time. In this case, in order to provide a smooth streaming service, the streaming server may store the bitstream for a predetermined time.

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

[0107] Each server in the content streaming system may be operated as a distributed server, in which case data received from each server may be distributed.

[0108] Figure 5Context-Adaptive Binary Arithmetic Coding (CABAC) for encoding syntax elements is illustrated. For example, in the encoding process of CABAC, when the input signal is a syntax element rather than a binary value of 0, the encoding device can transform the input signal into a binary value by binarization. When the input signal is already a binary value (that is, the value of the input signal is a binary value), the input signal is bypassed without binarization. Here, each binary number 0 or 1 that forms a binary value can be referred to as a bin. For example, when the binary string after binarization is 110, each of 1, 1, and 0 is referred to as a bin. The bin of a syntax element can indicate the value of the syntax element. Binarization can be performed based on various binarization methods such as truncated Rice binarization process and fixed-length binarization process, and the binarization method for the target syntax element can be predefined. This binarization process can be performed by a binarizer in an entropy encoder.

[0109] The binarized bins of the syntax elements may be input to a conventional coding engine or a bypass coding engine. The conventional coding engine of the coding device may assign a context model reflecting the probability value to the bin, and may encode the bin based on the assigned context model. The conventional coding engine of the coding device may encode each bin, and then may update the context model of the bin. These encoded bins may be referred to as context-encoded bins.

[0110] When the binarized bin of the syntax element is input to the bypass coding engine, the bin can be encoded as follows. For example, the bypass coding engine of the coding device omits the process of estimating the probability of the input bin and the process of updating the probability model applied to the bin after coding. When bypass coding is applied, the coding device can encode the input bits by applying a uniform probability distribution instead of assigning a context model, thereby increasing the coding speed. These encoded bins can be called bypass bins.

[0111] Entropy decoding may be performed in reverse order through the same process as the above entropy encoding.

[0112] The decoding device (entropy decoder) can decode the encoded image / video information. The image / video information may include partition-related information, prediction-related information (e.g., inter / intra prediction classification information, intra prediction mode information, and inter prediction mode information), residual information, in-loop filtering-related information, etc., or may include various syntax elements related thereto. The aforementioned entropy encoding may be performed in units of syntax elements.

[0113] The decoding device may perform binarization on the target syntax element. Here, the binarization may be based on various binarization methods, such as a truncated Rice binarization process and a fixed length binarization process, and the binarization method for the target syntax element may be predefined. The decoding device may derive an available bin string (bin string candidate) of an available value of the target syntax element through the binarization process. The binarization process may be performed by a binarizer in an entropy decoder.

[0114] The decoding device sequentially decodes and parses the bins of the target syntax element from the input bits in the bitstream, and compares the derived bin string with the available bin string of the syntax element. When the derived bin string is the same as one of the available bin strings, the value corresponding to the bin string is derived as the value of the syntax element. Otherwise, the decoding device also parses the next bit in the code stream and performs the above process again. Through this process, specific information (specific syntax elements) in the bitstream can be signaled using variable length bits instead of the start bit or end bit of the specific information. Therefore, a smaller number of bits can be allocated to lower values, and the overall coding efficiency can be improved.

[0115] The decoding device may perform context-based or bypass-based decoding on each bin in the string of bins from the bitstream based on an entropy coding technique such as CABAC or CAVLC.

[0116] When decoding a syntax element based on a context model, the decoding device may receive a bin corresponding to the syntax element through a bitstream, may use the syntax element and decoding information about a block to be decoded or a neighboring block or information about a symbol / bin decoded in a previous step to determine the context model, and may derive the value of the syntax element by predicting the probability of occurrence of the received bin according to the determined context model and performing arithmetic decoding on the bin. Subsequently, the context model of the bin to be decoded subsequently may be updated to the determined context model.

[0117] The context model can be assigned and updated to each bin to be context coded (conventional coding), and the context mode can be indicated based on ctxIdx or ctxInc. The ctxIdx can be derived based on ctxInc. Specifically, for example, the context index (ctxIdx) indicating the context model of each conventionally coded bin can be derived as the sum of the context index increment (ctxInc) and the context index offset (ctxIdxOffset). Here, a different ctxInc can be derived for each bin. ctxIdxOffset can be expressed as the lowest value of ctxIdx. ctxIdxOffset is a value generally used to distinguish the context models of other syntax elements, and the context model of a syntax element can be classified / derived based on ctxInc.

[0118] In entropy coding, it can be determined whether to encode by a regular encoding engine or by a bypass encoding engine, and the encoding path can be switched. Entropy decoding can be performed in reverse order through the same process as encoding.

[0119] For example, when a syntax element undergoes bypass decoding, the decoding device may receive a bin corresponding to the syntax element through a bitstream, and may decode the input bin by applying a uniform probability distribution. In this case, the decoding device may omit the process of deriving a context model of the syntax element and the process of updating the context model applied to the bin after decoding.

[0120] As described above, the residual samples can be derived as quantized transform coefficients through the transformation and quantization process. Quantized transform coefficients may also be referred to as transform coefficients. In this case, the transform coefficients within the block may be signaled in the form of residual information. The residual information may include residual coding syntax. That is, the encoding device may construct residual coding syntax with residual information, may encode the residual coding syntax, may output the residual coding syntax in the form of a bitstream, and the decoding device may decode the residual coding syntax from the bitstream and may derive residual (quantized) transform coefficients. As described below, the residual coding syntax may include an indication of whether a transform is applied to a block, the position of the last valid transform coefficient in the block, whether there are valid transform coefficients in a sub-block, the size / code of the valid transform coefficient, etc.

[0121] In addition, if intra prediction is performed, the correlation between samples can be used, and the difference (ie, residual) between the original block and the predicted block can be obtained. The aforementioned transformation and quantization can be applied to the residual. Therefore, spatial redundancy can be reduced. In the following, an encoding method and a decoding method using intra prediction are specifically described.

[0122] Intra prediction refers to prediction for generating prediction samples of a current block based on reference samples outside a current block within a picture (hereinafter referred to as a current picture) including the current block. In this case, the reference samples outside the current block may refer to samples adjacent to the current block. If intra prediction is applied to the current block, neighboring reference samples to be used for intra prediction of the current block may be derived.

[0123] For example, when the size (width×height) of the current block is nW×nH, the adjacent reference samples of the current block may include a sample adjacent to the left boundary and a total of 2×nH samples adjacent to the lower left of the current block, a sample adjacent to the upper boundary of the current block and a total of 2×nW samples adjacent to the upper right of the current block, and a sample adjacent to the upper left of the current block. Alternatively, the adjacent reference samples of the current block may also include multiple columns of upper adjacent samples and multiple rows of left adjacent samples. In addition, the adjacent reference samples of the current block may also include a total of nH samples adjacent to the right boundary of the current block having a size of nW×nH, a total of nW samples adjacent to the lower boundary of the current block, and one sample adjacent to the lower right of the current block.

[0124] In this case, some of the neighboring reference samples of the current block have not been decoded or may not be available. In this case, the decoding device can configure the neighboring reference samples to be used for prediction by replacing the unavailable samples with available samples. Alternatively, the neighboring reference samples to be used for prediction can be constructed by interpolation of available samples.

[0125] If the neighboring reference samples are derived, (i) the prediction sample may be derived based on an average or interpolation of the neighboring reference samples of the current block, and (ii) the prediction sample may be derived based on a reference sample existing in a specific (prediction) direction for the prediction sample among the neighboring reference samples of the current block. (i) may be applied when the intra prediction mode is a non-directional mode or a non-angular mode. (ii) may be applied when the intra prediction mode is a directional mode or an angular mode.

[0126] In addition, the prediction sample can also be generated by interpolating between the first adjacent sample located in the prediction direction of the intra prediction mode of the current block among the adjacent reference samples and the second adjacent sample located in the opposite direction of the prediction direction of the prediction sample based on the current block. The foregoing situation can be referred to as linear interpolation intra prediction (LIP). In addition, the chrominance prediction sample can also be generated based on the luma sample using a linear model. This situation can be referred to as LM mode.

[0127] In addition, the temporary prediction sample of the current block can be derived based on the filtered adjacent reference samples, and the prediction sample of the current block can also be derived by weighted summing at least one reference sample derived according to the intra prediction mode among the conventional adjacent reference samples (i.e., the unfiltered adjacent reference samples) and the temporary prediction sample. The foregoing situation can be referred to as position-dependent intra prediction (PDPC).

[0128] In addition, the prediction sample can be derived using the reference sample located in the prediction direction in the corresponding line by selecting the reference sample line with the highest prediction accuracy among the adjacent multiple reference sample lines of the current block, and the intra-frame prediction encoding can be performed by a method for indicating (signaling) the reference sample line used at this time to the decoding device. The foregoing situation can be called multi-reference line (MRL) intra-frame prediction or MRL-based intra-frame prediction.

[0129] In addition, intra prediction can be performed based on the same intra prediction mode by separating the current block into vertical or horizontal sub-partitions, and adjacent reference samples can be derived and used in units of sub-partitions. That is, in this case, the intra prediction mode of the current block is equally applied to the sub-partitions, and adjacent reference samples can be derived and used in units of sub-partitions, thereby enhancing the intra prediction performance in some cases. This prediction method may be referred to as intra sub-partition (ISP) intra prediction or ISP-based intra prediction.

[0130] The aforementioned intra prediction method may be referred to as an intra prediction type separately from the intra prediction mode. The intra prediction type may be referred to as various terms, such as an intra prediction technique or an additional intra prediction mode. For example, the intra prediction type (or additional intra prediction mode, etc.) may include at least one of the aforementioned LIP, PDPC, MRL, and ISP. General intra prediction methods other than specific intra prediction types such as LIP, PDPC, MRL, and ISP may be referred to as normal intra prediction types. If a specific intra prediction type is not applied, a normal intra prediction type may generally be applied, and prediction may be performed based on the aforementioned intra prediction mode. In addition, if necessary, post-processing filtering of the derived prediction samples may also be performed.

[0131] In addition to the above intra prediction types, matrix-based intra prediction (hereinafter referred to as MIP) may be used as a method for intra prediction. MIP may be referred to as affine linear weighted intra prediction (ALWIP) or matrix weighted intra prediction (MWIP).

[0132] When MIP is applied to the current block, the prediction samples for the current block can be derived by: i) using adjacent reference samples that have undergone an averaging process; ii) performing a matrix-vector multiplication process; and (iii) further performing a horizontal / vertical interpolation process if necessary. The intra-frame prediction mode for MIP can be configured differently from the intra-frame prediction mode used in the aforementioned LIP, PDPC, MRL or ISP intra-frame prediction or for normal intra-frame prediction.

[0133] The intra prediction mode of MIP may be referred to as an affine linear weighted intra prediction mode or a matrix-based intra prediction mode. For example, the matrix and offset used in the matrix-vector multiplication may be configured differently depending on the intra prediction mode of MIP. Here, the matrix may be referred to as an (affine) weighting matrix, and the offset may be referred to as an (affine) offset vector or an (affine) bias vector. In the present disclosure, the intra prediction mode of MIP may be referred to as a MIP intra prediction mode, a linear weighted intra prediction mode, a matrix weighted intra prediction mode, or a matrix-based intra prediction mode. A specific MIP method will be described later.

[0134] The following drawings have been prepared to explain specific examples of this document. Since the names of specific devices or specific words or names (e.g., grammatical names, etc.) described in the drawings are presented exemplarily, the technical features of this document are not limited to the specific names used in the following drawings.

[0135] Figure 6 An example of an intra-prediction-based image encoding method to which the embodiments of the present disclosure may be applied is schematically illustrated.

[0136] Reference Figure 6 , S600 may be performed by the intra predictor 222 of the encoding device, and S610 may be performed by the residual processor 230 of the encoding device. Specifically, S610 may be performed by the subtractor 231 of the encoding device. In S620, prediction information may be derived by the intra predictor 222 and encoded by the entropy encoder 240. In S620, residual information may be derived by the residual processor 230 and encoded by the entropy encoder 240. The residual information indicates information about the residual sample. The residual information may include information about the quantized transform coefficient of the residual sample. As described above, the residual sample may be derived from the transform coefficient by the transformer 232 of the encoding device, and the transform coefficient may be derived from the quantized transform coefficient by the quantizer 233. The information about the quantized transform coefficient may be encoded by the entropy encoder 240 through the residual encoding process.

[0137] The encoding device performs intra prediction on the current block (S600). The encoding device may derive an intra prediction mode / type of the current block, derive adjacent reference samples of the current block, and generate prediction samples in the current block based on the intra prediction mode / type and the adjacent reference samples. Here, the processes of determining the intra prediction mode / type, deriving adjacent reference samples, and generating prediction samples may also be performed simultaneously, and any one process may also be performed earlier than the other processes.

[0138] In addition, although not shown, if a prediction sample filtering process is performed, the intra predictor 222 may also include a prediction sample filter (not shown). The encoding device may determine a mode / type applied to the current block among a plurality of intra prediction modes / types. The encoding device may compare the RD costs of the intra prediction modes / types and determine the optimal intra prediction mode / type for the current block.

[0139] As described above, the encoding device may also perform a prediction sample filtering process. Prediction sample filtering may be referred to as post-filtering. Some or all of the prediction samples may be filtered by the prediction sample filtering process. In some cases, the prediction sample filtering process may be omitted.

[0140] The encoding apparatus generates residual samples of the current block based on the (filtered) prediction samples (S610). The encoding apparatus may compare the prediction samples based on a phase in the original samples of the current block and derive the residual samples.

[0141] The encoding device may encode image information including information about intra prediction (prediction information) and residual information about residual samples (S620). The prediction information may include intra prediction mode information and intra prediction type information. The residual information may include residual coding syntax. The encoding device may derive quantized transform coefficients by transforming / quantizing residual samples. The residual information may include information about quantized transform coefficients.

[0142] The encoding device can output the encoded image information in the form of a bit stream. The output bit stream can be delivered to the decoding device via a storage medium or a network.

[0143] As described above, the encoding device can generate a reconstructed picture (including reconstructed samples and reconstructed blocks). To this end, the encoding device can derive (modified) residual samples by dequantizing / inverse transforming the quantized transform coefficients again. As described above, the reason for transforming / quantizing the residual samples and then dequantizing / inverse transforming them again is to derive the same residual samples as the residual samples derived by the decoding device, as described above. The encoding device can generate a reconstructed block including the reconstructed samples of the current block based on the predicted samples and the (modified) residual samples. A reconstructed picture of the current picture can be generated based on the reconstructed block. As described above, an in-loop filtering process, etc. can also be applied to the reconstructed picture.

[0144] Figure 7 An example of an image decoding method based on intra-frame prediction to which the embodiments of the present disclosure can be applied is schematically illustrated.

[0145] Reference Figure 7 , the decoding device may perform operations corresponding to the aforementioned operations performed by the encoding device. S700 to S720 may be performed by the intra-frame predictor 331 of the decoding device, and the prediction information in S700 and the residual information in S730 may be obtained from the bit stream by the entropy decoder 310 of the decoding device. The residual processor 320 of the decoding device may derive residual samples of the current block based on the residual information. Specifically, the dequantizer 321 of the residual processor 320 may derive transform coefficients by performing dequantization on the basis of quantized transform coefficients derived based on the residual information, and the inverse transformer 322 of the residual processor may derive residual samples of the current block by inversely transforming the transform coefficients. S740 may be performed by the adder 340 or the reconstructor of the decoding device.

[0146] The decoding device may derive the intra prediction mode / type of the current block based on the received prediction information (intra prediction mode / type information) (S700). The decoding device may derive the adjacent reference samples of the current block (S710). The decoding device generates the prediction samples in the current block based on the intra prediction mode / type and the adjacent reference samples (S720). In this case, the decoding device may perform a prediction sample filtering process. Prediction sample filtering may be referred to as post filtering. Some or all of the prediction samples may be filtered by the prediction sample filtering process. In some cases, the prediction sample filtering process may be omitted.

[0147] The decoding device generates a residual sample of the current block based on the received residual information (S730). The decoding device may generate a reconstructed sample of the current block based on the predicted sample and the residual sample, and derive a reconstructed block including the reconstructed sample (S740). A reconstructed picture of the current picture may be generated based on the reconstructed block. As described above, an in-loop filtering process or the like may also be applied to the reconstructed picture.

[0148] Furthermore, although not shown, if the aforementioned prediction sample filtering process is performed, the intra predictor 331 may also further include a prediction sample filter (not shown).

[0149] In addition, the intra prediction mode may include a non-directional (or non-angle) intra prediction mode and a directional (or angle) intra prediction mode. For example, in the HEVC standard, intra prediction modes including 2 non-directional prediction modes and 33 directional prediction modes are used. The non-directional prediction mode may include a plane intra prediction mode (ie, No. 0) and a DC intra prediction mode (ie, No. 1). The directional prediction mode may include intra prediction modes No. 2 to No. 34. The plane mode intra prediction mode may be referred to as a plane mode, and the DC intra prediction mode may be referred to as a DC mode.

[0150] Alternatively, to capture a given edge direction proposed in natural videos, the directional intra prediction modes can be extended from the existing 33 modes to Fig.10 65 modes in . In this case, the intra prediction mode may include 2 non-directional intra prediction modes and 65 directional intra prediction modes. The non-directional intra prediction mode may include a plane intra prediction mode (i.e., No. 0) and a DC intra prediction mode (i.e., No. 1). The directional intra prediction mode may include intra prediction modes No. 2 to No. 66. The extended directional intra prediction mode can be applied to blocks of all sizes and can be applied to both luminance components and chrominance components. However, this is an example, and the embodiments of this document may be applied to situations where the number of intra prediction modes is different. 67 intra prediction modes may also be used depending on the situation. Intra prediction mode No. 67 may indicate a linear model (LM) mode.

[0151] Figure 8 An example of an intra prediction mode to which embodiments of this document can be applied is illustrated.

[0152] Reference Figure 8 , the mode can be divided into an intra prediction mode having a horizontal directionality and an intra prediction mode having a vertical directionality based on the intra prediction mode No. 34 having the upper left diagonal prediction direction. Figure 8 , H and V mean horizontal directivity and vertical directivity, respectively. Each of the numbers -32 to 32 indicates a displacement of 1 / 32 unit on a sample grid position. Intra-prediction modes No. 2 to 33 have horizontal directivity, and intra-prediction modes No. 34 to 66 have vertical directivity. Intra-prediction mode No. 18 and intra-prediction mode No. 50 indicate a horizontal intra-prediction mode and a vertical intra-prediction mode, respectively. Intra-prediction mode No. 2 may be referred to as a lower left diagonal intra-prediction mode, intra-prediction mode No. 34 may be referred to as an upper left diagonal intra-prediction mode, and intra-prediction mode No. 66 may be referred to as an upper right diagonal intra-prediction mode.

[0153] The intra-frame prediction mode information may include, for example, flag information (e.g., intra_luma_mpm_flag) indicating whether the most probable mode (MPM) is applied to the current block or whether the remaining modes are applied thereto. At this time, if the MPM is applied to the current block, the prediction mode information may also include index information (e.g., intra_luma_mpm_idx) indicating one of the intra-frame prediction mode candidates (MPM candidates). The intra-frame prediction mode candidates (MPM candidates) may be composed of an MPM candidate list or an MPM list. In addition, if the MPM is not applied to the current block, the intra-frame prediction mode information may also include remaining mode information (e.g., intra_luma_mpm_remainder) indicating one of the remaining intra-frame prediction modes other than the intra-frame prediction mode candidates (MPM candidates). The decoding device may determine the intra-frame prediction mode of the current block based on the intra-frame prediction mode information.

[0154] In addition, the intra prediction type information may be implemented in various forms. As an example, the intra prediction type information may include intra prediction type index information indicating one of the intra prediction types. As another example, the intra prediction type information may include at least one of the following: reference sample line information (e.g., intra_luma_ref_idx), which indicates whether MRL is applied to the current block and which reference sample line is used if MRL is applied; ISP flag information (e.g., intra_subpartitions_mode_flag), which indicates whether ISP is applied to the current block; ISP type information (e.g., intra_subpartitions_split_flag), which indicates the segmentation type of the sub-partition if ISP is applied; flag information indicating whether PDCP is applied; or flag information indicating whether LIP is applied. In addition, the intra prediction type information may include a MIP flag indicating whether MIP is applied to the current block.

[0155] The above-mentioned intra-frame prediction mode information and / or intra-frame prediction type information can be encoded / decoded by the encoding method described in this document. For example, the above-mentioned intra-frame prediction mode information and / or intra-frame prediction type information can be encoded / decoded by entropy encoding based on truncated (Rice) binary code (e.g., CABAC, CAVLC).

[0156] In addition, in the case of applying intra-frame prediction, the intra-frame prediction mode of the adjacent block can be used to determine the intra-frame prediction mode applied to the current block. For example, the decoding device can select an mpm candidate from the mpm candidates in the most likely mode (mpm) list derived based on the intra-frame prediction mode of the adjacent blocks (e.g., the left adjacent block and / or the upper adjacent block) of the current block and the additional candidate mode based on the received mpm index, or can select one of the remaining intra-frame prediction modes not included in the mpm candidates (and the plane mode) based on the remaining intra-frame prediction mode information. The mpm list can be constructed to include or exclude the plane mode as a candidate. For example, if the mpm list includes the plane mode as a candidate, the mpm list can have 6 candidates, and if the mpm list does not include the plane mode as a candidate, the mpm list can have 5 candidates. If the mpm list does not include the plane mode as a candidate, a non-planar flag (e.g., intra_luma_not_planar_flag) indicating whether the intra-frame prediction mode of the current block is a plane mode can be signaled. For example, the mpm flag may be signaled first, and the mpm index and the non-planar flag may be signaled when the value of the mpm flag is equal to 1. In addition, the mpm index may be signaled when the value of the non-planar flag is equal to 1. Here, constructing the mpm list to not include the planar mode as a candidate is to first identify whether the intra prediction mode is a planar mode by first signaling a flag (non-planar flag), because the planar mode is always regarded as an mpm, and the non-planar mode is not an mpm.

[0157] For example, it can be indicated based on the mpm flag (e.g., intra_luma_mpm_flag) whether the intra prediction mode applied to the current block is in the mpm candidates (and planar mode) or in the remaining modes. An mpm flag value of 1 can indicate that the intra prediction mode of the current block is in the mpm candidates (and planar mode), and an mpm flag value of 0 can indicate that the intra prediction mode of the current block is not in the mpm candidates (and planar mode). A non-planar flag (e.g., intra_luma_not_planar_flag) value of 0 can indicate that the intra prediction mode of the current block is a planar mode, and a non-planar flag value of 1 can indicate that the intra prediction mode of the current block is not a planar mode. The mpm index can be signaled in the form of an mpm_idx or intra_luma_mpm_idx syntax element, and the remaining intra prediction mode information can be signaled in the form of a rem_intra_luma_pred_mode or intra_luma_mpm_remainder syntax element. For example, the remaining intra prediction mode information may index the remaining intra prediction modes not included in the mpm candidates (and plane modes) among the entire intra prediction modes in the order of their prediction mode numbers, and may indicate one of them. The intra prediction mode may be an intra prediction mode of a luminance component (sample). In the following, the intra prediction mode information may include at least one of an mpm flag (e.g., intra_luma_mpm_flag), a non-plane flag (e.g., intra_luma_not_plane_flag), an mpm index (e.g., mpm_idx or intra_luma_mpm_idx), and the remaining intra prediction mode information (rem_intra_luma_pred_mode or intra_luma_mpm_remainder). In this document, the mpm list may be referred to as various terms, such as an mpm candidate list, a candidate mode list (candModeList), and a candidate intra prediction mode list.

[0158] Typically, when blocks of an image are segmented, the current block to be encoded and the adjacent blocks have similar image properties. Therefore, the current block and the adjacent blocks are more likely to have the same or similar intra-frame prediction modes. Therefore, the encoder can use the intra-frame prediction mode of the adjacent block to encode the intra-frame prediction mode of the current block. For example, the encoder / decoder can form a most probable mode (MPM) list of the current block. The MPM list can also be referred to as an MPM candidate list. Here, MPM can mean a mode for improving coding efficiency by considering the similarity between the current block and the adjacent blocks when encoding the intra-frame prediction mode.

[0159] Fig. 9An example of an MPM-based intra prediction method in an encoding device to which an exemplary embodiment of the present disclosure can be applied is illustrated.

[0160] Reference Fig. 9 , the encoding device constructs an MPM list for the current block (S900). The MPM list may include candidate intra prediction modes (MPM candidates) that are more likely to be applied to the current block. The MPM list may also include intra prediction modes of neighboring blocks, and also include specific intra prediction modes according to a predetermined method. A specific method for constructing the MPM list will be described later.

[0161] The encoding device determines the intra prediction mode of the current block (S910). The encoding device may perform prediction based on various intra prediction modes, and determine the optimal intra prediction mode based on rate-distortion optimization (RDO) based on the above prediction. In this case, the encoding device may also determine the optimal intra prediction mode using only the MPM candidates and the plane mode configured in the MPM list, or may also determine the optimal intra prediction mode using the remaining intra prediction modes and the MPM candidates and the plane mode configured in the MPM list.

[0162] Specifically, for example, if the intra prediction type of the current block is a specific type (e.g., LIP, MRL, or ISP) different from the normal intra prediction type, the encoding device may determine the optimal intra prediction mode by considering only the MPM candidate and the plane mode as the intra prediction mode candidates of the current block. That is, in this case, the intra prediction mode of the current block may be determined only among the MPM candidates and the plane mode, and in this case, the mpm flag may not be encoded / signaled. In this case, the decoding device may estimate that the mpm flag is 1 even without separate signaling of the mpm flag.

[0163] In general, if the intra prediction mode of the current block is not the planar mode and is one of the MPM candidates in the MPM list, the encoding device generates an mpm index (mpm idx) indicating one of the MPM candidates. If the intra prediction mode of the current block does not even exist in the MPM list, the encoding device generates the remaining intra prediction mode information indicating a mode among the remaining intra prediction modes not included in the MPM list (and the planar mode) as the intra prediction mode of the current block.

[0164] The encoding device can encode the intra-frame prediction mode information to output the intra-frame prediction mode information in the form of a bit stream (S920). The intra-frame prediction mode information may include the aforementioned mpm flag, non-plane flag, mpm index and / or the remaining intra-frame prediction mode information. In general, the mpm index and the remaining intra-frame prediction mode information have an alternative relationship and are not signaled at the same time when indicating the intra-frame prediction mode of a block. That is, the value 1 of the mpm flag and the non-plane flag or the mpm index are signaled together, or the value 0 of the mpm flag and the remaining intra-frame prediction mode information are signaled together. However, as described above, if a specific intra-frame prediction type is applied to the current block, the mpm flag is not signaled and only the non-plane flag and / or the mpm index can also be signaled. That is, in this case, the intra-frame prediction mode information can also include only the non-plane flag and / or the mpm index.

[0165] Fig.10 An example of an MPM-based intra prediction method in a decoding device to which an exemplary embodiment of the present disclosure can be applied is illustrated. Fig.10 The decoding device shown can determine the corresponding Fig. 9 The encoding apparatus shown determines and signals an intra prediction mode of the intra prediction mode information.

[0166] Reference Fig.10 , the decoding device obtains intra prediction mode information from the bitstream (S1000). As described above, the intra prediction mode information may include at least one of an mpm flag, a non-planar flag, an mpm index, and remaining intra prediction modes.

[0167] The decoding device constructs an MPM list (S1010). The MPM list is composed of the same MPM list constructed in the encoding device. That is, the MPM list may also include intra-frame prediction modes of adjacent blocks, and also include specific intra-frame prediction modes according to a predetermined method. A specific method for constructing the MPM list will be described later.

[0168] Although it is shown that S1010 is executed later than S1000 , this is exemplary, and S1010 may be executed earlier than S1000 , and S1000 and S1010 may be executed at the same time.

[0169] The decoding apparatus determines an intra prediction mode of a current block based on the MPM list and the intra prediction mode information (S1020).

[0170] As an example, if the value of the mpm flag is 1, the decoding device may derive the plane mode as the intra prediction mode of the current block, or derive the candidate indicated by the mpm index among the MPM candidates in the MPM list (based on the non-plane flag) as the intra prediction mode of the current block. Here, the MPM candidate may also indicate only the candidates included in the MPM list, or also include the plane mode applicable to the candidates whose value of the mpm flag is 1 and included in the MPM list.

[0171] As another example, if the value of the mpm flag is 0, the decoding device can derive the intra prediction mode indicated by the remaining intra prediction mode information among the remaining intra prediction modes as the intra prediction mode of the current block, and the remaining intra prediction modes are not included in the MPM list and the plane mode.

[0172] As another example, if the intra prediction type of the current block is a specific type (e.g., LIP, MRL, or ISP), the decoding device can derive the candidate or planar mode indicated by the mpm index in the MPM list as the intra prediction mode of the current block even without confirmation of the mpm flag.

[0173] When constructing the MPM list, in an embodiment, the encoding device / decoding device may derive a left mode as a candidate intra-frame prediction mode of a left neighboring block of the current block, and may derive an upper mode as a candidate intra-frame prediction mode of an upper neighboring block of the current block. Here, the left neighboring block may represent the lowest neighboring block among the left neighboring blocks located adjacent to the left of the current block, and the upper neighboring block may represent the rightmost neighboring block among the upper neighboring blocks located adjacent to the upper part of the current block. For example, if the size of the current block is W×H and the x component and y component of the upper left sample position of the current block are xN and yN, respectively, the left neighboring block may be a block including samples in coordinates (xN-1, yN+H-1), and the upper neighboring block may be a block including samples in coordinates (xN+W-1, yN-1).

[0174] For example, when the left neighboring block is available and intra prediction is applied to the left neighboring block, the encoding device / decoding device may derive the intra prediction mode of the left neighboring block as the left candidate intra prediction mode (ie, left mode). When the upper neighboring block is available, intra prediction is applied to the upper neighboring block and the upper neighboring block is included in the current CTU, the decoding device may derive the intra prediction mode of the upper neighboring block as the upper candidate intra prediction mode (ie, upper mode). Alternatively, when the left neighboring block is not available or intra prediction is not applied to the left neighboring block, the encoding device / decoding device may derive the plane mode as the left mode. When the upper neighboring block is not available or intra prediction is not applied to the upper neighboring block or the upper neighboring block is not included in the current CTU, the decoding device may derive the plane mode as the upper mode.

[0175] The encoding device / decoding device can construct an MPM list by deriving a candidate intra-frame prediction mode of the current block based on the left mode derived from the left adjacent block and the upper mode derived from the upper adjacent block. In this case, the MPM list may include the left mode and the upper mode, and may also include a specific intra-frame prediction mode according to a predetermined method.

[0176] In addition, when constructing the MPM list, a normal intra prediction mode (normal intra prediction type) may be applied, or a specific intra prediction type (e.g., MRL or ISP) may be applied. This document proposes a method for constructing an MPM list when not only a normal intra prediction method (normal intra prediction type) but also a specific intra prediction type (e.g., MRL or ISP) is applied, and this will be described later.

[0177] In addition, the intra prediction mode for MIP may indicate the matrix and offset for intra prediction instead of the existing directional mode. That is, the matrix and offset for intra prediction may be derived by the intra mode of MIP. In this case, when deriving the intra mode for general intra prediction or for generating the MPM list described above, the intra prediction mode of the block predicted by the MIP may be set to a preset mode, for example, a plane mode or a DC mode. According to another example, the intra mode of MIP may be mapped to a plane mode, a DC mode, or a directional intra mode based on the block size.

[0178] Hereinafter, matrix-based intra prediction (MIP) is described as an intra prediction method.

[0179] As described above, matrix-based intra prediction (hereinafter, MIP) may be referred to as affine linear weighted intra prediction (ALWIP) or matrix weighted intra prediction (MWIP). In order to predict samples of a rectangular block having a width (W) and a height (H), MIP uses one H line among the reconstructed samples adjacent to the left boundary of the block and one W line among the reconstructed samples adjacent to the upper boundary of the block as input values. When no reconstructed samples are available, reference samples may be generated by an interpolation method applied to general intra prediction.

[0180] Fig.11 The prediction sample generation process based on MIP according to the example is illustrated. Fig.11 Describe the MIP process.

[0181] 1. Averaging process

[0182] Among the boundary samples, four samples for the case of W=H=4 and eight samples for any other cases are extracted through an averaging process.

[0183] 2. Matrix-vector multiplication process

[0184] A matrix-vector multiplication is performed using the average sample as input, followed by the addition of an offset. Through this operation, a reduced prediction sample for the downsampled set of samples in the original block can be derived.

[0185] 3. (Linear) interpolation process

[0186] The prediction samples at the remaining positions are generated from the prediction samples of the downsampled sample set by linear interpolation, and the linear interpolation is a single-step linear interpolation in each direction.

[0187] The matrices and offset vectors required to generate a prediction block or prediction sample may be selected from three sets of matrices S0, S1 and S2.

[0188] Set S0 can include 16 matrices A0 i , i∈{0,…,15}, and 16 offset vectors b0 i , i∈{0, ..., 15}, and each matrix may include 16 rows and 4 columns. The matrices and offset vectors of set S0 may be used for a 4×4 block. In another example, set S0 may include 18 matrices.

[0189] Set S1 can include eight matrices A1 i , i∈{0,…,7}, and eight offset vectors b1 i , i∈{0, ..., 7}, and each matrix may include 16 rows and 8 columns. In another example, set S1 may include six matrices. The matrices and offset vectors of set S1 may be used for 4×8, 8×4, and 8×8 blocks. Alternatively, the matrices and offset vectors of set S1 may be used for 4×H or W×4 blocks.

[0190] Finally, set S2 can include six matrices A2 i , i∈{0,…,5}, and six offset vectors b2 i , i∈{0,…,5}, and each matrix may include 64 rows and 8 columns. The matrices and offset vectors of set S2 or some of them may be used for any block of a different size that sets S0 and S1 do not apply to. For example, the matrices and offset vectors of set S2 may be used for operations on blocks with a height and width of 8 or more.

[0191] The total number of multiplications required for the computation of a matrix-vector multiplication is always less than or equal to 4 × W × H. That is, in MIP mode, at most four multiplications are required per sample.

[0192] In the following, the overall MIP process is briefly described. The remaining blocks not described below can be processed in any of the four cases described.

[0193] Figures 12 to 15The MIP process according to the block size is illustrated, where Fig.12 The MIP process for a 4×4 block is illustrated, Fig.13 The MIP process for an 8×8 block is illustrated, Fig.14 The MIP process for an 8×4 block is illustrated, and Fig.15 The MIP process for a 16x16 block is illustrated.

[0194] like Fig.12 As shown, given a 4×4 block, MIP averages two samples according to each axis of the boundary. As a result, the four input samples are the input to the matrix-vector multiplication, and the matrix is ​​taken from set S0. The offset is added, thereby generating 16 final prediction samples. For a 4×4 block, no linear interpolation is required to generate the prediction samples. Therefore, a total of (4×16) / (4×4)=4 multiplications can be performed for each sample.

[0195] like Fig.13 As shown, given an 8×8 block, MIP averages four samples according to each axis of the boundary. As a result, the eight input samples are the input to the matrix-vector multiplication, and the matrix is ​​taken from set S1. 16 samples are generated at odd positions by matrix-vector multiplication.

[0196] For 8×8 blocks, a total of (8×16) / (8×8)=2 multiplications are performed per sample to generate the prediction sample. After adding the offset, the samples are interpolated vertically using the reduced upper boundary samples, and the samples are interpolated horizontally using the original left boundary samples. In this case, since no multiplication operation is required during the interpolation process, a total of two multiplications per sample are required for the MIP.

[0197] like Fig.14 As shown, given an 8×4 block, MIP averages four samples according to the horizontal axis of the boundary and uses four sample values ​​on the left boundary according to the vertical axis. As a result, the eight input samples are the inputs of the matrix-vector multiplication, and the matrix is ​​taken from set S1. Through the matrix-vector multiplication, 16 samples are generated at odd horizontal positions and corresponding vertical positions.

[0198] For 8×4 blocks, a total of (8×16) / (8×4)=4 multiplications are performed per sample to generate the predicted sample. After adding the offset, the samples are horizontally interpolated using the original left boundary samples. In this case, since no multiplication operations are required during the interpolation process, a total of four multiplications per sample are required for MIP.

[0199] like Fig.15As shown, given a 16×16 block, MIP averages four samples according to each axis. As a result, eight input samples are input to the matrix-vector multiplication, and the matrix is ​​taken from set S2. Through matrix-vector multiplication, 64 samples are generated at odd positions. For a 16×16 block, a total of (8×64) / (16×16)=2 multiplications are performed for each sample to generate a predicted sample. After adding the offset, the samples are vertically interpolated using the eight reduced upper boundary samples, and the samples are horizontally interpolated using the original left boundary samples. In this case, since no multiplication operation is required during the interpolation process, a total of two multiplication operations per sample are required for MIP.

[0200] For larger blocks, the MIP process is essentially the same as described above, and it can be easily recognized that the number of multiplications per sample is less than 4.

[0201] For W×8 blocks with a width greater than 8 (W>8), only horizontal interpolation is required because samples are generated at odd horizontal positions and every vertical position. In this case, (8×64) / (W×8)=64 / W multiplications are performed per sample for the prediction operation of the reduced sample. In the case of W=16, no additional multiplications are required for linear interpolation, and in the case of W>16, the number of additional multiplications per sample required for linear interpolation is less than 2. That is, the total number of multiplications per sample is less than or equal to 4.

[0202] For W×4 blocks with width greater than 4 (W>4), the matrix resulting from omitting all rows corresponding to odd entries along the horizontal axis of the downsampled block is defined as A k . Therefore, the size of the output is 32, and only horizontal interpolation is performed. For the downsampled prediction operation, (8×32) / (W×4)=64 / W multiplications are performed per sample. In the case of W=16, no additional multiplications are required, and in the case of W>16, the number of additional multiplications per sample required for linear interpolation is less than 2. That is, the total number of multiplications per sample is less than or equal to 4.

[0203] When the matrix is ​​transposed, processing can be performed accordingly.

[0204] Fig.16 This illustrates the boundary averaging process in the MIP process. Fig.16 Describe the averaging process in detail.

[0205] According to the averaging process, the average is applied to each boundary (left boundary or top boundary). The boundary indicates the neighboring reference samples adjacent to the boundary of the current block, such as Fig.16 For example, the left border (bdry left ) indicates the left neighboring reference sample adjacent to the left boundary of the current block, and the upper boundary (bdrytop ) indicates an upper adjacent reference sample adjacent to the upper portion.

[0206] When the current block is a 4×4 block, the size of each boundary can be reduced to two samples through an averaging process. When the current block is not a 4×4 block, the size of each boundary can be reduced to four samples through an averaging process.

[0207] The first step in the averaging process is to convert the input boundary (bdry left and bdry top ) to a smaller boundary ( and ). and Two samples are included for 4x4 blocks, and four samples are included for any other case.

[0208] For a 4×4 block, where 0≤i<2, can be expressed by the following formula and can be defined similarly

[0209] [Formula 1]

[0210]

[0211] When the block width is W = 4 × 2 k When 0≤i<4, can be expressed by the following formula and can be defined similarly

[0212] [Formula 2]

[0213]

[0214] Since the two reduction boundaries and is concatenated into a reduced boundary vector bdry red , so bdry red It has a size of 4 in a 4×4 block and has a size of 8 in any other block.

[0215] When "mode" indicates MIP mode, the reduction boundary vector bdry may be defined based on the block size and intra_mip_transposed_flag value according to the following formula: red and the range of MIP modes.

[0216] [Formula 3]

[0217]

[0218] In the above formula, intra_mip_transposed_flag may be referred to as MIP transposition, and this flag information may indicate whether the down-converted prediction sample is transposed. The semantics of this syntax element may be expressed as "intra_mip_transposed_flag[x0][y0] specifies whether the input vector of the matrix-based intra prediction mode for luma samples is transposed.

[0219] Finally, for interpolation of downsampled prediction samples, a second version of the average boundary is needed for large blocks. That is, if the smaller value of width and height is greater than 8 (min(W, H)>8) and the width is equal to or greater than the height (W≥H), then W=8*2 l ,and It can be defined by the following formula, where 0≤i<8. If the smaller value of the width and height is greater than 8 (min(W, H)>8) and the height is greater than the width (H>W), it can be defined similarly

[0220] [Formula 4]

[0221]

[0222] Next, a process for generating reduced prediction samples by matrix-vector multiplication is described.

[0223] Reduce the input vector bdry red One of the generated reduced prediction samples pred red The prediction samples are for a sample with width W red and height H red Here, W red and H red is defined as follows.

[0224] [Formula 5]

[0225]

[0226] Reduce the prediction sample pred red It can be obtained by performing a matrix-vector multiplication and then adding the offset, and can be derived as follows.

[0227] [Formula 6]

[0228] pred red =A.bdry red +b

[0229] Here, A includes W red ×H redA matrix of 4 rows and 4 columns (where W and H are 4 (W=H=4)) or 8 columns (in any other case), and b is W red ×H red vector.

[0230] The matrix A and the vector b may be selected from S0, S1, and S2 as follows, and the index idx=idx(W,H) may be defined by Equation 7 or Equation 8.

[0231] [Formula 7]

[0232]

[0233] [Formula 8]

[0234]

[0235] When idx is 1 or less (idx ≤ 1) or when idx is 2 and the smaller value of W and H is greater than 4 (min(W, H) > 4), A is set to And b is set to When idx is 2, the smaller of W and H is 4 (min(W, H) = 4), and W is 4, A is obtained by removing A matrix corresponding to each row of the odd x-coordinates in the downsampled block. Alternatively, when H is 4, A is generated by removing A matrix is ​​generated for each column corresponding to the odd y-coordinates in the downsampled block.

[0236] Finally, in Equation 9, the downscaled prediction sample can be replaced by its transpose.

[0237] [Formula 9]

[0238] W=H=4 and intra_mip_transposed_flag=1

[0239] max(W, H) = 8 and intra_mip_transposed_flag = 1

[0240] max(W, H)>8 and intra_mip_transposed_flag=1

[0241] When W = H = 4, since A includes four columns and 16 rows, the calculation of pred red The number of multiplications required is 4. In any other case, since A consists of eight columns and W red ×H red rows, so at most four multiplications per sample are required to compute pred red .

[0242] Fig.17 Illustrates linear interpolation in the MIP process. Refer to Fig.17 The linear interpolation process is described as follows.

[0243] The interpolation process can be referred to as a linear interpolation process or a bilinear interpolation process. The interpolation process can include two steps, which are 1) vertical interpolation and 2) horizontal interpolation, as shown.

[0244] If W >= H, vertical linear interpolation can be applied first, followed by horizontal linear interpolation. If W < H, horizontal linear interpolation can be applied first, followed by vertical linear interpolation. In a 4×4 block, the interpolation process can be omitted.

[0245] In a W×H block (where max(W,H)≥8), the predicted samples are derived from the reduced predicted samples pred red ×H red . Depending on the block type, linear interpolation can be performed vertically, horizontally, or in both directions. When applying linear interpolation in both directions, if W < H, linear interpolation is applied first in the horizontal direction, otherwise first in the vertical direction. red For a W×H block ((where max(W,H)≥8) and W >= H), no general loss is considered to exist. In this case, one-dimensional linear interpolation is performed as follows. When there is no general loss, the linear interpolation in the vertical direction is fully explained.

[0246] First, the reduced predicted samples are extended upward by the boundary signals. When the vertical upsampling coefficient U

[0247] is defined as ver = H / H red and set , the extended reduced predicted samples can be set by the following formula.

[0248] [Equation 10]

[0249]

[0250] Subsequently, the vertical linear interpolation predicted samples can be generated from the extended reduced predicted samples by the following formula.

[0251] [Equation 11]

[0252]

[0253] Here, x can be 0≤x<W red , y can be 0≤y<H red , and k can be 0≤k<U ver .

[0254] In the following, a method for maximizing the performance of the MIP technique while reducing its complexity is described. The embodiments to be described below may be performed independently or in combination.

[0255] In addition, when MIP is applied to the current block, the MPM list of the current block to which the MIP is applied can be configured separately. The MPM list may be referred to as various names such as MIP MPM list (or LWIP MPM list, candLwipModeList) to distinguish it from the MPM list when ALWIP is not applied to the current block. In the following, it is expressed as a MIP MPM list for the purpose of regulation, but it may also be referred to as an MPM list.

[0256] The MIP MPM list may include n candidates, for example, n may be 3. The MIP MPM list may be configured based on the left neighboring block and the upper neighboring block of the current block. Here, the left neighboring block may indicate a block at the uppermost position among the neighboring blocks adjacent to the left boundary of the current block. In addition, the upper neighboring block may indicate a block at the leftmost position among the neighboring blocks adjacent to the upper boundary of the current block.

[0257] For example, when MIP is applied to the left neighboring block, the first candidate intra prediction mode (or candLwipModeA) can be set to be the same as the MIP mode of the left neighboring block. In addition, for example, when MIP is applied to the upper neighboring block, the second candidate intra prediction mode (or candLwipModeB) can be set to be the same as the MIP mode prediction mode of the upper neighboring block.

[0258] In addition, the left adjacent block or the upper adjacent block can be encoded based on intra prediction instead of MIP. That is, when the left adjacent block or the upper adjacent block is encoded, an intra prediction type other than MIP can be applied. In this case, it is not suitable to use the general intra prediction mode number of the adjacent block (left adjacent block / upper adjacent block) to which MIP is not applied as a candidate intra mode of the current block to which MIP is applied. Therefore, in this case, as an example, the MIP mode of the adjacent block (left adjacent block / upper adjacent block) to which MIP is not applied can be regarded as a MIP mode prediction mode of a specific value (e.g., 0, 1 or 2, etc.). Alternatively, as another example, the general intra prediction mode of the adjacent block (left adjacent block / upper adjacent block) to which MIP is not applied can be mapped to the MIP mode based on a predetermined mapping table and used to configure the MIP MPM list. In this case, mapping can be performed based on the block size type of the current block.

[0259] In addition, even if the neighboring block (e.g., the left neighboring block / the upper neighboring block) is not available (e.g., located outside the current picture, located outside the current tile / tile group, etc.), or even if MIP is applied, the MIP mode that is not available for the current block can be used according to the block size type. In this case, a specific MIP mode predefined for the first candidate and / or the second candidate can be used as the first candidate intra-frame prediction mode or the second candidate intra-frame prediction mode. In addition, a specific MIP prediction mode predefined for the third candidate can be used as the third candidate intra-frame prediction mode.

[0260] In the existing MIP mode, similar to the existing intra prediction mode derivation method, the MPM flag is transmitted separately with respect to non-MPM and MPM, and the MIP mode for the current block is encoded based on MPM or non-MPM.

[0261] According to an embodiment, for a block to which the MIP technology is applied, a structure for directly encoding the MIP mode without separating the MPM and the non-MPM can be proposed. This image coding structure makes it possible to simplify a complex syntax structure. In addition, since the frequencies of the various modes actually occurring in the MIP mode are relatively evenly distributed, and thus significantly different from the frequencies in the existing intra-frame mode, the proposed coding structure makes it possible to maximize efficiency when encoding and decoding the MIP mode information.

[0262] The image information sent and received for MIP according to the implementation is as follows. The following syntax may be included in the video / image information sent from the aforementioned encoding device to the decoding device, and may be configured / encoded in the encoding device to signal the decoding device in the form of a bitstream, and the decoding device may parse / decode the included information (syntax elements) according to the conditions / order disclosed in the syntax.

[0263] [Table 1]

[0264]

[0265] As shown in Table 1, syntax intra_mip_flag and intra_mip_mode_idx for concurrently signaling a MIP mode of a current block may be included in syntax information about a coding unit, and syntax intra_mip_flag and intra_mip_mode_idx for a current block may be included.

[0266] Furthermore, sps_mip_enabled_flag, which is flag information indicating whether matrix-based intra prediction (MIP) is applicable to the current block, may also be received, and intra_mip_flag may be signaled based on the flag information.

[0267] The flag information sps_mip_enabled_flag may be signaled through sequence parameter set (SPS) syntax information.

[0268] A value of intra_mip_flag equal to 1 indicates that the intra prediction type for luma samples is matrix-based intra prediction, and a value equal to 0 indicates that the intra prediction type for luma samples is not matrix-based intra prediction.

[0269] intra_mip_mode_idx equal to 1 indicates a matrix-based intra prediction mode for luma samples. As described above, the matrix-based intra prediction mode may indicate a matrix or a matrix and an offset for a MIP.

[0270] In addition, according to an example, flag information (e.g., intra_mip_transposed_flag) indicating whether the input vector of the matrix-based intra prediction is transposed may also be signaled through the syntax of the coding unit. Intra_mip_transposed_flag equal to 1 indicates that the input vector is transposed, and the number of matrices used for matrix-based intra prediction may be reduced through this flag information.

[0271] intra_mip_mode_idx can be encoded and decoded by a truncated binarization method as shown in the following table.

[0272] [Table 2]

[0273]

[0274] As shown in Table 2, intra_mip_flag is binarized with a fixed length code, and intra_mip_mode_idx is binarized using a truncated binarization method, and the maximum binarization length (cMax) can be set according to the size of the coding block. If the width and height of the coding block are 4 (cbWidth==4&&cbHeight==4), the maximum binarization length can be set to 34, otherwise, the maximum binarization length can be set to 18 or 10 according to whether the width and height of the coding block are 8 or less ((cbWidth<=8&&cbHeight<=8)?).

[0275] intra_mip_mode_idx can be encoded by a bypass method rather than a context model-based method. By encoding in the bypass method, encoding speed and efficiency can be increased.

[0276] According to another example, when intra_mip_mode_idx is binarized by a truncated binarization method, the maximum binarization length may be as shown in the following table.

[0277] [Table 3]

[0278]

[0279] As shown in Table 3, if the width and height of the coding block are 4 ((cbWidth==4&&cbHeight==4)), the maximum binarization length of intra_mip_mode_idx can be set to 15; otherwise, if the width or height of the coding block is 4 ((cbWidth==4||cbHeight==4)), or if the width and height of the coding block are 8 (cbWidth==8&&cbHeight==8), the maximum binarization length can be set to 7, and if the width or height of the coding block is 4 ((cbWidth==4||cbHeight==4)) or if the width and height of the coding block are not 8 (cbWidth==8&&cbHeight==8), the maximum binarization length can be set to 5.

[0280] According to another example, intra_mip_mode_idx may be encoded with a fixed length code. In this case, to increase coding efficiency, for each block size, the number of available MIP modes may be limited to a power of 2 (e.g., A=2 K1 -1, B = 2 K2 -1, and C = 2 K3 -1, where K1, K2 and K3 are positive integers).

[0281] The above description is shown in the following table.

[0282] [Table 4]

[0283]

[0284] In Table 4, when K1=5, K2=4, and K3=3, intra_mip_mode may be binarized as follows.

[0285] [Table 5]

[0286]

[0287] Alternatively, according to an example, when K1 is set to 4 and thus the width and height of the coding block are 4, the maximum binarization length of the intra_mip_mode of the block may be set to 15. In addition, when K2 is set to 3 and thus the width or height of the coding block is 4 or the width and height of the coding block are 8, the maximum binarization length may be set to 7.

[0288] The embodiment may propose a method of using MIP only for specific blocks to which the MIP technique can be efficiently applied. When the method according to the embodiment is applied, the number of matrix vectors required for MIP can be reduced and the memory required to store the matrix vectors can be significantly reduced (50%). With these effects, the coding efficiency remains almost the same (less than 0.1%).

[0289] The following table illustrates a syntax including a specific condition for applying the MIP technique according to an embodiment.

[0290] [Table 6]

[0291]

[0292] As shown in Table 6, a condition of applying MIP only to large blocks (cbWidth>K1||cbHeight>K2) can be added, and the size of the block can be determined based on preset values ​​(K1 and K2). The reason why MIP is applied only to large blocks is that the coding efficiency of MIP occurs in relatively large blocks.

[0293] The following table illustrates an example in which K1 and K2 in Table 6 are predefined as 8.

[0294] [Table 7]

[0295]

[0296] The semantics of intra_mip_flag and intra_mip_mode_idx in Table 6 and Table 7 are the same as those shown in Table 1.

[0297] When intra_mip_mode_idx has 11 possible modes, intra_mip_mode_idx may be encoded by truncated binarization (cMax=10) as follows.

[0298] [Table 8]

[0299]

[0300] Alternatively, when the available MIP modes are limited to eight modes, intra_mip_mode_idx[x0][y0] may be encoded with a fixed length code as follows.

[0301] [Table 9]

[0302]

[0303] In Table 8 and Table 9, intra_mip_mode_idx may be encoded by the bypass method.

[0304] Embodiments may propose to use a weight matrix (A) for a large block k ) and the offset vector (B k ) is applied to the MIP technique of small blocks so that the MIP technique is applied efficiently in terms of memory saving. When the method according to the embodiment is applied, the number of matrix vectors required for MIP can be reduced, and the memory required to store the matrix vectors can be significantly reduced (50%). With these effects, the coding efficiency remains almost the same (less than 0.1%).

[0305] Fig.18 The MIP technology according to the embodiment of the present disclosure is illustrated.

[0306] As shown in the figure, Fig.18 (a) shows the operation of the matrix and offset vector for a chunk index i, and Fig.18 (b) shows the matrix operations and offset vector operations applied to the sampling of a small block.

[0307] Reference Fig.18 , can be obtained by considering the downsampled weighting matrix (Sub(A) obtained by downsampling the weighting matrix for the large block k )) and the offset vector obtained by downsampling the offset vector for the large block (Sub(b k )) are used as the weighting matrix and offset vector for small blocks respectively to apply the existing MIP process.

[0308] Here, downsampling may be applied only in one of the horizontal and vertical directions, or may be applied in both directions. Specifically, the downsampling factor (e.g., 1 out of 2 or 1 out of 4) and the vertical sampling direction or the horizontal sampling direction may be set based on the width and height of the corresponding block.

[0309] In addition, the number of intra prediction modes to which the MIP of this embodiment is applied may be set differently based on the size of the current block. For example, i) when both the height and width of the current block (coding block or transform block) are 4, 35 intra prediction modes (i.e., intra prediction modes 0 to 34) may be available, ii) when both the height and width of the current block are 8 or less, 19 intra prediction modes (i.e., intra prediction modes 0 to 18) may be available, and iii) in other cases, 11 intra prediction modes (i.e., intra prediction modes 0 to 10) may be available.

[0310] For example, when the case where both the height and width of the current block are 4 is defined as block size type 0, the case where both the height and width of the current block are 8 or less is defined as block size type 1, and other cases are defined as block size type 2, the number of intra-frame prediction modes of MIP can be as shown in the following table.

[0311] [Table 10]

[0312]

[0313] To apply the weighting matrix and offset vector for large blocks (e.g., block size type = 2) to small blocks (e.g., block size = 0 or block size = 1), the number of intra prediction modes available for each block size can be equally applied as shown in the following table.

[0314] [Table 11]

[0315]

[0316] Alternatively, as shown in Table 12 below, MIP may be applied only to block size types 1 and 2, and the weight matrix and offset vector for block size type 2 may be downsampled for block size type 1. Therefore, memory can be efficiently saved (50%).

[0317] [Table 12]

[0318]

[0319] The following figures are provided to describe specific examples of the present disclosure. Since the specific names of the devices shown in the figures or the names of specific signals / messages / fields are provided for illustration, the technical features of the present disclosure are not limited to the specific names used in the following figures.

[0320] Fig.19 is a flowchart schematically illustrating a decoding method that can be performed by a decoding device according to an embodiment of the present disclosure.

[0321] Fig.19 The method shown can be Figure 3 The decoding device 300 shown in FIG. Fig.19 The S1900 to S1940 can be Figure 3 The entropy decoder 310 and / or the predictor 330 (specifically, the intra-frame predictor 331) shown are performed, and Fig.19 The S1950 can be Figure 3 The adder 340 shown is used to perform the above operation. Fig.19 The method shown may be included in the foregoing embodiments of the present disclosure. Fig.19In the present invention, a detailed description of details overlapping with the previous embodiments will be omitted or will be briefly described.

[0322] Reference Fig.19 , the decoding apparatus may receive second flag information indicating whether matrix-based intra prediction (MIP) is used for the current block from a bitstream based on first flag information indicating whether MIP is used for the current block ( S1900 ).

[0323] The first flag information may be signaled through sequence parameter set (SPS) syntax information as sps_mip_enabled_flag.

[0324] If the first flag information is 1, second flag information indicating whether matrix-based intra prediction (MIP) is used for the current block may be obtained from a bitstream.

[0325] The second flag information is syntax such as intra_mip_flag, and may be included and signaled in the coding unit syntax information.

[0326] The decoding apparatus may receive matrix-based intra prediction (MIP) mode information based on the received second flag information ( S1910 ).

[0327] The MIP mode information may be represented as intra_mip_mode_idx and may be signaled when intra_mip_flag is equal to 1. intra_mip_mode_idx may be index information indicating the MIP mode applied to the current block, and this index information may be used to derive a matrix when generating prediction samples.

[0328] According to an example, flag information indicating whether an input vector of matrix-based intra prediction is transposed may also be signaled through a coding unit syntax, for example, intra_mip_transposed_flag.

[0329] The decoding device may generate an intra prediction sample of the current block based on the MIP information. The decoding device may derive at least one neighboring reference sample from the neighboring reference samples of the current block to generate an intra prediction sample, and may generate a prediction sample based on the neighboring reference samples.

[0330] When the MIP is applied, the decoding apparatus may derive reduced boundary samples by downsampling reference samples adjacent to the current block ( S1920 ).

[0331] The reduced boundary samples can be derived by downsampling the reference samples using averaging.

[0332] When the width and height of the current block are 4, four reduced boundary samples may be derived, and in other cases, eight reduced boundary samples may be derived.

[0333] The averaging process for downsampling may be applied to each boundary (eg, left boundary or top boundary) of the current block, and may be applied to neighboring reference samples adjacent to the boundary of the current block.

[0334] According to an example, when the current block is a 4×4 block, the size of each boundary may be reduced to two samples through an averaging process, and when the current block is not a 4×4 block, the size of each boundary may be reduced to four samples through an averaging process.

[0335] Subsequently, the decoding apparatus may derive a reduced prediction sample based on a multiplication operation of the MIP matrix derived on the basis of the size and index information of the current block and the reduced boundary sample (S1930).

[0336] The MIP matrix may be derived based on the size of the current block and the received index information.

[0337] The MIP matrix may be selected from any one of three matrix sets classified according to the size of the current block, and each of the three matrix sets may include a plurality of MIP matrices.

[0338] That is, three matrix sets of MIP can be set, and each matrix set can include multiple matrices and multiple offset vectors. These matrix sets can be applied separately according to the size of the current block.

[0339] For example, a matrix set including 18 or 16 matrices including 16 rows and four columns and 18 or 16 offset vectors may be applied to a 4×4 block. The index information may be information indicating any one of a plurality of matrices included in one matrix set.

[0340] A matrix set including 10 or 8 matrices containing 16 rows and 8 columns and 10 or 8 offset vectors may be applied to 4×8, 8×4 and 8×8 blocks or 4×H or W×4 blocks.

[0341] In addition, a matrix set including six matrices including 64 rows and eight columns and six offset vectors can be applied to blocks other than the aforementioned blocks or blocks having a height and width of 8 or more.

[0342] The reduced prediction samples (ie, the prediction samples to which the MIP matrix has been applied) are derived based on an operation of adding an offset after a multiplication operation of the MIP matrix and the reduced boundary samples.

[0343] The decoding apparatus may generate intra prediction samples of the current block by upsampling the reduced prediction samples ( S1940 ).

[0344] The intra prediction samples can be upsampled by linearly interpolating the reduced prediction samples.

[0345] The interpolation process can be referred to as a linear interpolation or bilinear interpolation process and can include two steps, which are 1) vertical interpolation and 2) horizontal interpolation.

[0346] If W >= H, vertical linear interpolation can be applied first, followed by horizontal linear interpolation. If W < H, horizontal linear interpolation can be applied first, followed by vertical linear interpolation. In a 4×4 block, the interpolation process can be omitted.

[0347] The decoding device can generate a reconstructed sample of the current block based on the prediction samples (S1950).

[0348] In an embodiment, the decoding device can directly use the prediction samples as reconstructed samples according to the prediction mode, or can generate the reconstructed samples by adding the residual samples to the prediction samples.

[0349] If there are residual samples of the current block, the decoding device can receive information about the residual of the current block. The information about the residual can include the transform coefficients of the residual samples. The decoding device can derive the residual samples (or an array of residual samples) of the current block based on the residual information. The decoding device can generate the reconstructed samples based on the prediction samples and the residual samples, and can derive a reconstructed block or a reconstructed picture based on the reconstructed samples. Thereafter, as needed, in order to enhance the subjective / objective picture quality, the decoding device can apply a deblocking filter and / or an in-loop filtering process (such as the SAO process) to the reconstructed picture, as described above.

[0350] Fig. 20 is a flowchart schematically illustrating an encoding method that can be performed by an encoding device according to an embodiment of the present disclosure.

[0351] Fig. 20 The method shown can be performed by Figure 2 the encoding device 200 shown. Specifically, Fig. 20 S2000 to S2030 of Figure 2 can be performed by the predictor 220 (specifically, the intra predictor 222) shown, Fig. 20 S2040 of Figure 2 can be performed by the subtractor 231 shown, and Fig. 20 S2050 of Figure 2 can be performed by the entropy encoder 240 shown. In addition, Fig. 20 the method shown can be included in the foregoing embodiments of the present disclosure. Therefore, in Fig. 20 the details overlapping with the foregoing embodiments will be omitted or briefly described.

[0352] Reference Fig. 20 , the encoding device can derive whether to apply matrix-based intra prediction (MIP) to the current block (S2000).

[0353] The encoding device may apply various prediction techniques to find an optimal prediction mode for the current block, and may determine an optimal intra prediction mode based on rate-distortion optimization (RDO).

[0354] When it is determined that the MIP is applied to the current block, the encoding apparatus may derive reduced boundary samples by downsampling reference samples adjacent to the current block ( S2010 ).

[0355] The reduced boundary samples can be derived by downsampling the reference samples using averaging.

[0356] When the width and height of the current block are 4, four reduced boundary samples may be derived, and in other cases, eight reduced boundary samples may be derived.

[0357] The averaging process for downsampling may be applied to each boundary (eg, left boundary or top boundary) of the current block, and may be applied to neighboring reference samples adjacent to the boundary of the current block.

[0358] According to an example, when the current block is a 4×4 block, the size of each boundary may be reduced to two samples through an averaging process, and when the current block is not a 4×4 block, the size of each boundary may be reduced to four samples through an averaging process.

[0359] When deriving the reduced boundary sample, the encoding apparatus may derive the reduced prediction sample based on a multiplication operation of the MIP matrix selected based on the size of the current block and the reduced boundary sample ( S2020 ).

[0360] The MIP matrix may be selected from any one of three matrix sets classified according to the size of the current block, and each of the three matrix sets may include a plurality of MIP matrices.

[0361] That is, three matrix sets of MIP can be set, and each matrix set can include multiple matrices and multiple offset vectors. These matrix sets can be applied separately according to the size of the current block.

[0362] For example, a matrix set including 18 or 16 matrices including 16 rows and four columns and 18 or 16 offset vectors may be applied to a 4×4 block. The index information may be information indicating any one of a plurality of matrices included in one matrix set.

[0363] A set of matrices including a matrix of 10 or eight matrices each having 16 rows and 8 columns and 10 or eight offset vectors can be applied to 4×8, 8×4, and 8×8 blocks or 4×H or W×4 blocks.

[0364] In addition, a set of matrices including a matrix of six matrices each having 64 rows and eight columns and six offset vectors can be applied to blocks other than the aforementioned blocks or blocks having a height and width of 8 or greater.

[0365] Derive the reduced prediction samples (i.e., the prediction samples to which the MIP matrix has been applied) based on the operation of adding an offset after the multiplication operation of the MIP matrix and the reduced boundary samples.

[0366] The encoding device can generate the intra prediction samples of the current block by upsampling the reduced prediction samples (S2030).

[0367] The intra prediction samples can be upsampled by linear interpolation of the reduced prediction samples.

[0368] The interpolation process can be referred to as a linear interpolation or bilinear interpolation process and can include two steps, which are 1) vertical interpolation and 2) horizontal interpolation.

[0369] If W >= H, vertical linear interpolation can be applied first, followed by horizontal linear interpolation. If W < H, horizontal linear interpolation can be applied first, followed by vertical linear interpolation. In a 4×4 block, the interpolation process can be omitted.

[0370] The encoding device can derive the residual samples of the current block based on the prediction samples of the current block and the original samples of the current block (S2040).

[0371] In addition, the encoding device can generate residual information about the current block based on the residual samples, and encode the image information including the residual information, first flag information indicating whether matrix-based intra prediction (MIP) can be used for the current block, second flag information indicating whether MIP is used for the current block, and MIP mode information (S2050).

[0372] Here, the residual information can include quantization parameters, value information, position information, transformation scheme, and transformation kernel related to the quantization transform coefficients derived by transforming and quantizing the residual samples.

[0373] The first flag information indicating whether matrix-based intra prediction (MIP) can be used for the current block can be encoded as sps_mip_enabled_flag through the sequence parameter set (SPS) syntax information.

[0374] The second flag information indicating whether MIP is applied is a syntax such as intra_mip_flag, and may be included and encoded in the coding unit syntax information.

[0375] The MIP mode information may be represented as intra_mip_mode_idx and may be encoded when intra_mip_flag is equal to 1. intra_mip_mode_idx may be index information indicating the MIP mode applied to the current block, and this index information may be used to derive a matrix when generating a prediction sample. The index information may indicate any one of a plurality of matrices included in one matrix set.

[0376] According to an example, flag information indicating whether an input vector of matrix-based intra prediction is transposed may also be signaled through a coding unit syntax, for example, intra_mip_transposed_flag.

[0377] That is, the encoding apparatus may encode image information including MIP mode information and / or residual information about the current block, and may output the image information as a bitstream.

[0378] The bitstream can be sent to the decoding device via a network or a (digital) storage medium. The network can include a broadcast network and / or a communication network, and the digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD and SSD.

[0379] The aforementioned process of generating the prediction sample of the current block can be represented by Figure 2 The intra-frame predictor 222 of the encoding device 200 shown in FIG. 2 is used to perform the process of deriving the residual sample. Figure 2 The subtractor 231 of the encoding device 200 shown in FIG. 2 is executed, and the process of generating and encoding the residual information can be performed by Figure 2 The residual processor 230 and the entropy encoder 240 of the encoding device 200 are shown to perform.

[0380] In the above-mentioned embodiments, the method is explained based on the flowchart with the aid of a series of steps or boxes, but the present disclosure is not limited to the order of the steps, and a certain step may be performed in an order or step different from the above order or step, or a certain step may be performed concurrently with other steps. In addition, it can be understood by those of ordinary skill in the art that the steps shown in the flowchart are not exclusive, and another step may be incorporated or one or more steps in the flowchart may be deleted without affecting the scope of the present disclosure.

[0381] The above method according to the present disclosure may be implemented in a software form, and the encoding device and / or decoding device according to the present disclosure may be included in a device for image processing such as a television, a computer, a smart phone, a set-top box, a display device, and the like.

[0382] When the embodiments in the present disclosure are implemented by software, the above methods can be implemented as modules (steps, functions, etc.) for performing the above functions. These modules can be stored in a memory and can be executed by a processor. The memory can be inside or outside the processor and can be connected to the processor in various well-known ways. The processor may include an application-specific integrated circuit (ASIC), other chipsets, logic circuits and / or data processing devices. The memory may include a read-only memory (ROM), a random access memory (RAM), a flash memory, a memory card, a storage medium and / or other storage devices. In other words, the embodiments described in the present disclosure can be implemented and executed on a processor, a microprocessor, a controller or a chip. For example, the functional units shown in each of the accompanying drawings can be implemented and executed on a computer, a processor, a microprocessor, a controller or a chip. In this case, information (e.g., information about instructions) or algorithms for implementation can be stored in a digital storage medium.

[0383] In addition, the decoding device and the encoding device to which this document is applied may be included in a multimedia broadcast transmission and reception device, a mobile communication terminal, a home movie video device, a digital movie video device, a camera for monitoring, a video conversation device, a real-time communication device such as video communication, a mobile streaming device, a storage medium, a camera, a video on demand (VOD) service provider, an over-the-top transmission (OTT) video device, an Internet streaming service provider, a three-dimensional (3D) video device, a virtual reality (VR) device, an augmented reality (AR) device, a video phone device, a transportation device terminal (e.g., a vehicle (including an autonomous vehicle) terminal, an aircraft terminal, and a ship terminal) and a medical video device, and may be used to process a video signal or a data signal. For example, an over-the-top transmission (OTT) video device may include a game console, a Blu-ray player, an Internet access TV, a home theater system, a smart phone, a tablet PC, and a digital video recorder (DVR).

[0384] In addition, the processing method applied by this document can be generated in the form of a program executed by a computer and can be stored in a computer-readable recording medium. Multimedia data having a data structure according to this document can also be stored in a computer-readable recording medium. Computer-readable recording media include all types of storage devices in which computer-readable data is stored. Computer-readable recording media may include, for example, a Blu-ray disc (BD), a universal serial bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. In addition, computer-readable recording media include media implemented in the form of carrier waves (e.g., transmission via the Internet). In addition, the bit stream generated using the encoding method can be stored in a computer-readable recording medium or can be sent via wired and wireless communication networks.

[0385] In addition, the embodiments of this document may be implemented as a computer program product using program code. The program code may be executed by a computer according to the embodiments of this document. The program code may be stored on a computer-readable carrier.

[0386] The claims in this specification can be combined in various ways. For example, the technical features in the method claims of this specification can be combined to be implemented or performed in a device, and the technical features in the device claims can be combined to be implemented or performed in a method. In addition, the technical features in the method claims and the device claims can be combined to be implemented or performed in a device. In addition, the technical features in the method claims and the device claims can be combined to be implemented or performed in a method.

Claims

1. An image decoding method performed by a decoding device, the image decoding method comprising the following steps: Receive a bit stream; receiving residual information from the bitstream; Based on first flag information related to whether a matrix-based intra prediction MIP can be used, receiving second flag information related to whether the intra prediction type for the current block is the MIP, wherein a value of the first flag information equal to 1 indicates that the MIP can be used; Receiving MIP mode information based on the second flag information, wherein the second flag information is equal to 1 to indicate that the intra prediction type for the current block is the MIP; generating intra prediction samples for the current block based on the MIP mode information; deriving transform coefficients based on the residual information; generating residual samples based on the transform coefficients; and generating a reconstructed sample for the current block based on the intra prediction sample and the residual sample, The MIP mode information is MIP mode index information indicating a MIP mode applied to the current block, wherein the MIP mode index information is used to derive a MIP matrix for the current block, wherein the intra prediction samples are generated using the MIP matrix derived from the MIP mode index information, The syntax element bin string for the MIP mode information is binarized by a truncated binarization TB method, and The maximum length of the syntax element bin string is determined by the size of the current block.

2. An image encoding method performed by an encoding device, the image encoding method comprising the following steps: Derivation whether to apply the matrix-based intra prediction MIP to the current block; deriving intra prediction samples for the current block based on applying the MIP to the current block; deriving residual samples for the current block based on the intra prediction samples; deriving transform coefficients based on a transform process for the residual samples; generating residual information based on the transform coefficients; encoding the image information including the residual information and the information about the MIP; as well as generating a bit stream comprising the encoded image information, The information about the MIP includes first flag information related to whether the MIP can be used, second flag information related to whether the intra prediction type for the current block is the MIP, and MIP mode information, wherein the second flag information is signaled based on the first flag information, wherein the first flag information being equal to 1 indicates that the MIP can be used, wherein the MIP mode information is signaled based on the second flag information, wherein the second flag information being equal to 1 indicates that the intra prediction type for the current block is the MIP, The MIP mode information is MIP mode index information indicating a MIP mode applied to the current block, wherein the MIP mode index information is used to derive a MIP matrix for the current block, wherein the intra prediction samples are derived using the MIP matrix indicated by the MIP mode index information, The syntax element bin string for the MIP mode information is binarized by a truncated binarization TB method, and The maximum length of the syntax element bin string is determined by the size of the current block.

3. A method for sending image data, the sending method comprising the following steps: Obtaining a bitstream for the image, wherein the bitstream is generated based on the following operations: deriving whether to apply a matrix-based intra prediction MIP to a current block, deriving intra prediction samples for the current block based on the application of the MIP to the current block, deriving residual samples for the current block based on the intra prediction samples, deriving transform coefficients based on a transform process for the residual samples, generating residual information based on the transform coefficients, encoding image information including the residual information and information about the MIP, and generating a bitstream including the encoded image information; and sending said data comprising said bit stream, The information about the MIP includes first flag information related to whether the MIP can be used, second flag information related to whether the intra prediction type for the current block is the MIP, and MIP mode information, wherein the second flag information is signaled based on the first flag information, and wherein the first flag information being equal to 1 indicates that the MIP can be used, wherein the MIP mode information is signaled based on the second flag information, and wherein the second flag information being equal to 1 indicates that the intra prediction type for the current block is the MIP, The MIP mode information is MIP mode index information indicating a MIP mode applied to the current block, wherein the MIP mode index information is used to derive a MIP matrix for the current block, wherein the intra prediction samples are derived using the MIP matrix indicated by the MIP mode index information, The syntax element bin string for the MIP mode information is binarized by a truncated binarization TB method, and The maximum length of the syntax element bin string is determined by the size of the current block.