Image encoding device and method based on matrix intra-frame prediction

By adopting adaptive matrix intra prediction (MIP) technology in image encoding, the problem of high-resolution image/video data compression and transmission costs is solved, and more efficient image/video compression and transmission is achieved.

CN114600451BActive Publication Date: 2025-04-25LG ELECTRONICS INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202080073075.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-08-22
Filing Date
2020-08-24
Publication Date
2025-04-25
Estimated Expiration
2040-08-24

AI Technical Summary

Technical Problem

The prior art is difficult to effectively compress and transmit high-resolution, high-quality image/video data, especially in applications of ultra-high-definition image/video, virtual reality and holograms, resulting in increased transmission and storage costs.

Method used

The image encoding method based on matrix intra prediction is adopted to adaptively select whether to apply matrix intra prediction (MIP) and perform MIP processing without being limited to block type. The number of MIP modes is adaptively selected according to the block type to avoid performing MIP processing on blocks with low prediction efficiency.

Benefits of technology

Improves image/video compression efficiency, enhances visual quality, simplifies signaling processing, reduces hardware implementation complexity, and reduces the amount of data transmitted in MIP mode.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114600451B_ABST
    Figure CN114600451B_ABST
Patent Text Reader

Abstract

According to an embodiment of the present document, in a matrix-based intra prediction (MIP) process, the MIP process may be performed without conditional restrictions associated with the shape of a block, and efficiency in performing the MIP may be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present document relates to an image encoding device and method based on matrix intra prediction. Background Art

[0002] Recently, the demand for high-resolution, high-quality images / videos such as 4K or 8K or higher ultra-high-definition (UHD) images / videos has increased in various fields. As image / video data has high resolution and high quality, the amount of information or the amount of bits to be transmitted increases relative to existing image / video data, and therefore, transmitting image data using a medium such as an existing wired / wireless broadband line or an existing storage medium or storing image / video data using an existing storage medium increases transmission costs and storage costs.

[0003] In addition, interest in and demand for immersive media such as virtual reality (VR) and artificial reality (AR) content or holograms have recently increased, and broadcasting of images / videos having characteristics different from real images (e.g., game images) has increased.

[0004] Therefore, very efficient image / video compression technology is required to effectively compress, transmit, store and reproduce information of high-resolution, high-quality images / videos having various characteristics as described above.

[0005] Furthermore, a scheme to achieve prediction for blocks of various sizes in a matrix-based intra prediction (MIP) process for efficient intra prediction is discussed. Summary of the invention

[0006] Technical Solution

[0007] According to an embodiment of this document, a method and apparatus for enhancing image / video encoding efficiency are provided.

[0008] According to the embodiments of this document, an efficient intra-frame prediction method and apparatus are provided.

[0009] According to the embodiments of this document, an efficient MIP application method and apparatus are provided.

[0010] According to the embodiments of this document, whether to apply MIP may be adaptively selected according to the type of the current block.

[0011] According to an embodiment of this document, the MIP process may be performed without limiting a condition related to the type of the current block.

[0012] According to the embodiments of this document, the number of MIP modes may be adaptively selected according to the type of the current block.

[0013] According to an embodiment of this document, MIP processing may not be performed on a block having relatively low MIP prediction efficiency.

[0014] According to an embodiment of the present document, a smaller number of MIP modes may be used for blocks where the MIP prediction efficiency is relatively low.

[0015] According to an embodiment of this document, a video / image decoding method performed by a decoding device is provided.

[0016] According to an embodiment of this document, a decoding device for performing video / image decoding is provided.

[0017] According to an embodiment of this document, a video / image encoding method performed by an encoding device is provided.

[0018] According to an embodiment of this document, there is provided an encoding device for performing video / image encoding.

[0019] According to one embodiment of the present document, a computer-readable digital storage medium is provided, in which encoded video / image information generated according to the video / image encoding method disclosed in at least one embodiment of the present document is stored.

[0020] According to an embodiment of the present document, a computer-readable digital storage medium is provided, in which encoded information or encoded video / image information is stored for enabling a decoding device to execute a video / image decoding method disclosed in at least one embodiment of the present document.

[0021] Beneficial Effects

[0022] According to the embodiments of this document, the overall image / video compression efficiency can be enhanced.

[0023] According to the embodiments of this document, subjective / objective visual quality can be enhanced through efficient intra prediction.

[0024] According to the embodiments of this document, MIP processing for image / video encoding can be efficiently performed.

[0025] According to the embodiments of this document, MIP processing may not be performed on a block having relatively low MIP prediction efficiency, and thus MIP prediction efficiency may be enhanced.

[0026] According to the embodiments of this document, since a smaller number of MIP modes are used for blocks having relatively low MIP prediction efficiency, the amount of transmission data of the MIP modes can be reduced and the MIP prediction efficiency can be enhanced.

[0027] According to the embodiments of this document, since the MIP process is performed without limiting the conditions related to the type of the current block, signaling can be simplified and there is an advantage in hardware implementation. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 An example of a video / image coding system that is applicable to embodiments of this document is schematically shown.

[0029] Figure 2 It is a diagram schematically illustrating the configuration of a video / image encoding device that can be applied to an embodiment of this document.

[0030] Figure 3 It is a diagram schematically illustrating the configuration of a video / image decoding device that can be applied to an embodiment of this document.

[0031] Figure 4 An example of an intra-frame prediction-based image decoding method to which the embodiments of this document are applicable is schematically shown.

[0032] Figure 5 An example of an intra prediction mode to which the embodiments of this document are applicable is shown.

[0033] Figure 6 It is a diagram for explaining a process of generating MIP-based prediction samples according to an embodiment.

[0034] Figure 7 , Figure 8 and Fig. 9 is a flowchart illustrating MIP processing according to an embodiment of this document.

[0035] Fig.10 and Fig.11 An example of a video / image encoding method and related components according to an embodiment of the present document is schematically shown.

[0036] Fig.12 and Fig.13 An example of an image / video decoding method and related components according to an embodiment of this document is schematically shown.

[0037] Fig.14 An example of a content streaming system to which the embodiments disclosed in this document are applicable is shown. DETAILED DESCRIPTION

[0038] This document can be modified in various forms, and specific embodiments thereof are described and shown in the accompanying drawings. However, these embodiments are not intended to limit this document. The terms used in the following description are only used to describe specific embodiments and are not intended to limit this document. Singular expressions include plural expressions as long as they are clearly read differently. Terms such as "including" and "having" are intended to indicate the presence of features, quantities, steps, operations, elements, components, or combinations thereof used in the following description, so it should be understood that the possibility of the presence or addition of one or more different features, quantities, steps, operations, elements, components, or combinations thereof is not excluded.

[0039] In addition, each configuration in the drawings described in this document is shown independently for the convenience of describing different characteristic functions, and does not mean that each configuration is implemented as separate hardware or separate software. For example, two or more components among each component can be combined to form a component, or a component can be divided into multiple components. Embodiments in which each component is integrated and / or separated are also included in the scope of disclosure of this document.

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

[0041] This document proposes various embodiments of video / image coding, and unless otherwise specified, the above embodiments may also be performed in combination with each other.

[0042] In this document, video may refer to a series of images over time. A picture generally refers to a unit representing an image of a specific time range, and a slice / tile refers to a unit that constitutes a part of a picture in terms of coding. A slice / tile may include one or more coding tree units (CTUs). A picture may be composed of one or more slices / tiles. A picture may be composed of one or more tile groups. A tile group may include one or more tiles. A tile may represent a rectangular area of ​​a CTU row within a tile in a picture. A tile may be divided into a plurality of tiles, each tile may be composed of one or more CTU rows within a tile. Tiles that are not divided into a plurality of tiles may also be referred to as tiles. Tile scanning may represent a specific sequential ordering of CTUs of a partitioned picture, wherein CTUs may be ordered in a raster scan of CTUs within tiles, and tiles within tiles may be ordered continuously in a raster scan of tiles of tiles, and tiles in a picture may be ordered continuously in a raster scan of tiles of a picture. A tile is a rectangular area of ​​CTUs 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 a syntax element in the picture parameter set. A tile row is a rectangular area of ​​a CTU whose height is specified by a syntax element in the picture parameter set and whose width is equal to the width of the picture. A tile scan is a specific sequential ordering of the CTUs of a partitioned picture, where the CTUs are ordered continuously in a CTU raster scan of the tiles, and the tiles in the picture are ordered continuously in a raster scan of the tiles of the picture. A slice includes an integer number of tiles of a picture that can be exclusively contained in a single NAL unit. A slice may consist of a continuous sequence of multiple complete tiles or only complete tiles of one tile. In this document, tile groups and slices may be used instead of each other. For example, in this document, a tile group / tile group header may be referred to as a slice / slice header.

[0043] Furthermore, a picture may be divided into two or more sub-pictures. A sub-picture may be a rectangular area of ​​one or more slices within a picture.

[0044] A pixel or picture element 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.

[0045] A unit may represent a basic unit of image processing. A unit may include at least one of a specific area of ​​a picture and information related to the area. A unit may include a luminance block and two chrominance (e.g., cb, cr) blocks. In some cases, a unit may be used interchangeably with terms such as a block or an area. In general, an M×N block may include M columns and N rows of samples (or sample arrays) or a set (or array) of transform coefficients. Alternatively, a sample may refer to a pixel value in a spatial domain, and when such a pixel value is transformed to a frequency domain, it may refer to a transform coefficient in a frequency domain.

[0046] In this document, "A or B" may mean "only A", "only B", or "both A and B". In other words, "A or B" in this document may be interpreted as "A and / or B". For example, in this document, "A, B or C (A, B or C)" means "only A", "only B", "only C", or "any combination of A, B, and C".

[0047] A slash ( / ) or a comma (,) as 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".

[0048] 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 the same as "at least one of A and B".

[0049] In addition, in this document, "at least one of A, B, and C" means "only A", "only B", "only C", or "any combination of A, B, and C". In addition, "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".

[0050] In addition, brackets used in this document may mean "for example". Specifically, when "prediction (intra-frame prediction)" is indicated, "intra-frame prediction" may be proposed as an example of "prediction". In other words, "prediction" in this document is not limited to "intra-frame prediction", and "intra-frame prediction" may be proposed as an example of "prediction". In addition, even when "prediction (i.e., intra-frame prediction)" is indicated, "intra-frame prediction" may be proposed as an example of "prediction".

[0051] Technical features described individually in one figure in this document may be implemented individually or simultaneously.

[0052] Hereinafter, examples of the present embodiment are described in detail with reference to the accompanying drawings. In addition, like reference numerals are used to indicate like elements throughout the drawings, and the same description about the like elements is omitted.

[0053] Figure 1 An example of a video / image encoding system to which the embodiments of this document can be applied is shown.

[0054] 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 send the coded video / image information or data in the form of a file or stream to the receiving device via a digital storage medium or a network.

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

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

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

[0058] The transmitter may transmit the encoded image / 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 transmission through a broadcast / communication network. The receiver may receive / extract a bit stream and transmit the received bit stream to a decoding device.

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

[0060] The renderer may render the decoded video / image. The rendered video / image may be displayed through a display.

[0061] Figure 2 Schematically illustrates a configuration of a video / image encoding device to which an embodiment of the present document may be applied. Hereinafter, the so-called video encoding device may include an image encoding device. In addition, the image encoding method / device may include a video encoding method / device. Alternatively, the video encoding method / device may include an image encoding method / device.

[0062] Reference Figure 2 , the encoding device 200 includes an image segmenter 210, a predictor 220, a residual processor 230 and 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 also 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 segmenter 210, the predictor 220, the residual processor 230, the entropy encoder 240, the adder 250 and the filter 260 may be configured by at least one hardware component (e.g., an encoder chipset or processor). In addition, the memory 270 may include a decoded picture buffer (DPB), or may be configured by a digital storage medium. The hardware component may also include the memory 270 as an internal / external component.

[0063] The image divider 210 may divide the input image (or picture or frame) input to the encoding device 200 into one or more processors. For example, the processor may be referred to as a coding unit (CU). In this case, the coding unit may be recursively divided from a coding tree unit (CTU) or a maximum coding unit (LCU) according to a quadtree binary tree ternary tree (QTBTTT) structure. For example, one coding unit may be divided into a plurality of coding units with a deeper depth based on a quadtree structure, a binary tree structure, and / or a ternary structure. In this case, for example, a quadtree structure may be applied first, and a binary tree structure and / or a ternary 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 the final coding unit that is no longer divided. In this case, the maximum coding unit may be used as the final coding unit based on coding efficiency according to image characteristics, or if necessary, the coding unit may be recursively divided into coding units with a deeper depth and a coding unit with an optimal size may be used as the final coding unit. Here, the encoding process may include the processes of prediction, transformation, and reconstruction (described later). As another example, the processor may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may be split 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 the transform coefficient.

[0064] In some cases, a unit may be used interchangeably with terms such as a block or region. 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 one picture (or image) of a pixel or picture element.

[0065] 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 an 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, a unit that subtracts a prediction signal (prediction block, prediction sample array) from an input image signal (original block, original sample array) in the encoding device 200 may be referred to as a subtractor 231. The predictor may perform prediction on a block to be processed (hereinafter, referred to as a current block) and generate a prediction block including prediction samples of the current block. The predictor may determine whether intra prediction or inter prediction is applied based on the current block or CU. As described later in the description of each prediction mode, the predictor may generate various types of information related to prediction (e.g., prediction mode information) and send the generated information to the entropy encoder 240. Information about the prediction may be encoded in the entropy encoder 240 and output in the form of a bitstream.

[0066] The intra-frame predictor 222 may predict the current block with reference to samples in the current picture. Depending on the prediction mode, the referenced samples may be located near the current block or may be spaced apart. In intra-frame prediction, the prediction mode may include multiple non-directional modes and multiple directional modes. For example, the non-directional mode may include a DC mode and a plane mode. For example, depending on the level of detail of the prediction direction, the directional mode may include 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 settings. The intra-frame predictor 222 may use the prediction mode applied to the neighboring blocks to determine the prediction mode applied to the current block.

[0067] The inter-frame predictor 221 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. Here, 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 motion information between neighboring 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 neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. 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 skip mode and merge mode, the inter-frame predictor 221 may 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 may not be transmitted. In the case of the motion vector prediction (MVP) mode, the motion vector of the neighboring block may be used as a motion vector predictor, and the motion vector of the current block may be indicated by signaling the motion vector difference.

[0068] The predictor 220 may generate a prediction signal based on various prediction methods described below. For example, the predictor may 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 may be referred to as combined inter and intra prediction (CIIP). In addition, the predictor may predict a block based on an intra block copy (IBC) prediction mode or a palette mode. The IBC prediction mode or the palette mode may be used for content image / video encoding of games, etc., such as screen content coding (SCC). IBC basically performs prediction in the current picture, but may be performed similarly to inter prediction so that a reference block is derived in the current picture. That is, IBC may use at least one inter prediction technique described in the present disclosure. The palette mode may be considered as an example of intra coding or intra prediction. When the palette mode is applied, the sample values ​​within the picture may be signaled based on information about the palette table and the palette index.

[0069] 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, when the relationship information between pixels is represented by a graph, GBT means a transform obtained from a 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 to blocks of variable size other than squares.

[0070] 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. The 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 form based on the coefficient scanning order, and generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. Information about the transform coefficients may be generated. The entropy encoder 240 may perform various encoding methods such as 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 a syntax element, etc.) together or separately. The encoded information (e.g., encoded video / image information) may be transmitted or stored in units of NAL (Network Abstraction Layer) in the form of a bitstream. 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 general constraint information. In the present disclosure, information and / or syntax elements sent / signaled to a decoding device from an encoding device may be included in the video / image information. The video / image information may be encoded by the above-mentioned encoding process and included in a bitstream. The bitstream may be sent via a network or may be 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 and / 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.

[0071] The quantized transform coefficients output from the quantizer 233 can be used to generate a prediction signal. For example, a residual signal (residual block or residual sample) can be reconstructed by applying dequantization and inverse transformation 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 (for example, when the skip mode is applied), the prediction block can be used as a reconstructed block. The adder 250 may be referred to as a reconstructor or a reconstructed block generator. As described below, 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 by filtering.

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

[0073] 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). For example, various filtering methods may include deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc. The filter 260 can generate various types of 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 bitstream.

[0074] 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 300 may be avoided and encoding efficiency may be improved.

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

[0076] Figure 31 is a schematic diagram showing the configuration of a video / image decoding device to which the present disclosure can be applied. In addition, the image decoding method / device may include a video decoding method / device. Alternatively, the video decoding method / device may include an image decoding method / device.

[0077] Reference Figure 3 , the 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 inter-frame predictor 332 and an intra-frame predictor 331. 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 may be configured by a hardware component (e.g., a decoder chipset or a processor). In addition, the memory 360 may include a decoded picture buffer (DPB) or may be configured by a digital storage medium. The hardware component may also include a memory 360 as an internal / external component.

[0078] When a bit stream including video / image information is input, the decoding device 300 can reconstruct the bit stream corresponding to the bit stream in the video / image format. Figure 2 The image corresponding to the processing of the video / image information in the encoding device. For example, the decoding device 300 may derive the unit / block based on the block segmentation related information obtained from the bit stream. The decoding device 300 may use a processor applied in the encoding device to perform decoding. Therefore, for example, the decoding processor may be a coding unit, and the coding unit may be divided from a coding tree unit or a maximum coding unit according to a quadtree structure, a binary tree structure and / or a ternary tree structure. One or more transform units may be derived from the coding unit. The reconstructed image signal decoded and output by the decoding device 300 may be reproduced by a reproduction device.

[0079] The decoding device 300 may receive Figure 2The received signal may be decoded by the entropy decoder 310. For example, the entropy decoder 310 may 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 general constraint information. The decoding device may also decode the picture based on the information about the parameter set and / or the general constraint information. The information and / or syntax elements signaled / received described later in this disclosure may be decoded and obtained from the bitstream by a decoding process. For example, the entropy decoder 310 may decode the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output the syntax elements required for image reconstruction and the quantized values ​​of the transform coefficients of the residual. More specifically, the CABAC entropy decoding method may receive bins corresponding to each syntax element in the bitstream, determine a context model using information of a decoding target syntax element, decoding information of a decoding target block, or information of a symbol / bin decoded in a previous stage, and perform arithmetic decoding on the bin by predicting the probability of occurrence of the bin according to the determined context model, and generate symbols corresponding to the values ​​of each syntax element. In this case, the CABAC entropy decoding method may update the context model by using the information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model. Information related to prediction among the information decoded by the entropy decoder 310 may be provided to the predictor (inter-frame predictor 332 and intra-frame predictor 331), and the residual value (i.e., quantized transform coefficients and related parameter information) for which entropy decoding is performed in the entropy decoder 310 may be input to the residual processor 320. The residual processor 320 may derive a residual signal (residual block, residual sample, residual sample array). In addition, information about filtering among the information decoded by the entropy decoder 310 may 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 disclosure may be referred to as a video / image / picture decoding device, and the decoding device may be classified 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.

[0080] The dequantizer 321 may dequantize the quantized transform coefficient and output the transform coefficient. The dequantizer 321 may rearrange the quantized transform coefficient in a two-dimensional block form. In this case, the rearrangement may be performed based on a coefficient scanning order 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.

[0081] The inverse transformer 322 inversely transforms the transform coefficients to obtain a residual signal (residual block, residual sample array).

[0082] The predictor may perform prediction on the current block and generate a prediction block including prediction samples of 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 determine a specific intra / inter prediction mode.

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

[0084] The intra-frame predictor 331 may predict the current block with reference to samples in the current picture. Depending on the prediction mode, the referenced samples may be located near the current block or may be spaced apart. In intra-frame prediction, the prediction mode may include a plurality of non-directional modes and a plurality of directional modes. The intra-frame predictor 331 may determine the prediction mode applied to the current block using the prediction mode applied to the neighboring blocks.

[0085] 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 motion information between neighboring 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 neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. For example, the inter-frame predictor 332 may configure a motion information candidate list based on neighboring 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 an inter-frame prediction mode of the current block.

[0086] 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, for example, when the skip mode is applied, the prediction block can be used as the reconstructed block.

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

[0088] In addition, luma mapping with chroma scaling (LMCS) may be applied in the picture decoding process.

[0089] 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). For example, the various filtering methods may include deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.

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

[0091] In this document, the embodiments 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 or respectively applied to the filter 350, the inter-frame predictor 332, and the intra-frame predictor 331 of the decoding device 300. This may also be applied to the inter-frame predictor 332 and the intra-frame predictor 331.

[0092] As described above, in video encoding, prediction is performed to increase compression efficiency. Thus, a prediction block including prediction samples of a current block (block to be encoded) can be generated. Here, the prediction block includes prediction samples in a spatial domain (or pixel domain). The prediction block is derived identically from an encoding device and a decoding device, and the encoding device decodes information about the residual between the original block and the prediction block (residual information) rather than the original sample value of the original block itself. By notifying the device with a signal, image coding efficiency can be increased. The decoding device can derive a residual block including residual samples based on the residual information, and generate a reconstructed block including reconstructed samples by summing the residual block and the prediction block, and generate a reconstructed picture including the reconstructed block.

[0093] The residual information may be generated by a transform process and a quantization process. For example, the encoding device may derive a residual block between the original block and the prediction block, and perform a transform process on the residual samples (residual sample array) included in the residual block to derive a transform coefficient, and then, by performing a quantization process on the transform coefficient, derive the quantized transform coefficient to signal the residual related information (via a bitstream) to the decoding device. Here, the residual information may include position information, transform technology, transform kernel and quantization parameter, value information of the quantized transform coefficient, etc. The decoding device may perform a dequantization / inverse transform process based on the residual information and derive residual samples (or residual blocks). The decoding device may generate a reconstructed picture based on the prediction block and the residual block. The encoding device may also dequantize / inverse transform the quantized transform coefficients for reference to inter-frame prediction of a later picture to derive a residual block, and generate a reconstructed picture based thereon.

[0094] In this document, at least one of quantization / dequantization and / or transform / inverse transform may be omitted. When quantization / dequantization is omitted, the quantized transform coefficient may be referred to as a transform coefficient. When transform / inverse transform is omitted, the transform coefficient may be referred to as a coefficient or a residual coefficient, or may still be referred to as a transform coefficient for consistency of expression.

[0095] In this document, the quantized transform coefficient and the transform coefficient may be referred to as a transform coefficient and a scaled transform coefficient, respectively. In this case, the residual information may include information about the transform coefficient, and the information about the transform coefficient may be signaled by a residual coding syntax. The transform coefficient may be derived based on the residual information (or information about the transform coefficient), and the scaled transform coefficient may be derived by inverse transforming (scaling) the transform coefficient. The residual sample may be derived based on an inverse transform (transform) of the scaled transform coefficient. This may also be applied / expressed in other parts of this document.

[0096] The predictor of the encoding device / decoding device can derive prediction samples by performing inter-frame prediction in units of blocks. Inter-frame prediction can be a prediction derived in a manner that depends on data elements (e.g., sample values ​​or motion information) of a picture other than the current picture. When inter-frame prediction is applied to the current block, the prediction block (prediction sample array) of the current block can be derived based on the reference block (reference sample array) specified by the motion vector on the reference picture indicated by the reference picture index. Here, in order to reduce the amount of motion information sent in the inter-frame prediction mode, the motion information of the current block can be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between neighboring 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 type (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter-frame prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. A temporally neighboring block may be referred to as a collocated reference block, a collocated CU (colCU), etc., and a reference picture including a temporally neighboring block may be referred to as a collocated picture (colPic). For example, a motion information candidate list may be configured based on a neighboring block of a current block, and a flag or index information indicating which candidate is selected (used) to derive a motion vector and / or a reference picture index of the current block may be signaled. Inter-frame prediction may be performed based on various prediction modes. For example, in the case of a skip mode and a merge mode, the motion information of the current block may be the same as the motion information of the neighboring block. In the skip mode, unlike the merge mode, a residual signal may not be sent. In the case of a motion vector prediction (MVP) mode, the motion vector of the selected neighboring block may be used as a motion vector predictor, and the motion vector of the current block may be signaled. In this case, the motion vector of the current block may be derived using the sum of the motion vector predictor and the motion vector difference.

[0097] According to the inter prediction type (L0 prediction, L1 prediction, Bi prediction, etc.), the motion information may include L0 motion information and / or L1 motion information. The motion vector in the L0 direction may be referred to as the L0 motion vector or MVL0, and the motion vector in the L1 direction may be referred to as the L1 motion vector or MVL1. Prediction based on the L0 motion vector may be referred to as the L0 prediction, prediction based on the L1 motion vector may be referred to as the L1 prediction, and prediction based on both the L0 motion vector and the L1 motion vector may be referred to as the dual prediction. Here, the L0 motion vector may indicate a motion vector associated with the reference picture list L0 (L0), and the L1 motion vector may indicate a motion vector associated with the reference picture list L1 (L1). The reference picture list L0 may include a picture earlier than the current picture in output order as a reference picture, and the reference picture list L1 may include a picture later than the current picture in output order. The previous picture may be referred to as a forward (reference) picture, and the subsequent picture may be referred to as a backward (reference) picture. The reference picture list L0 may also include a picture later than the current picture in output order as a reference picture. In this case, the previous picture may be indexed first in the reference picture list L0, and the subsequent picture may be indexed later. The reference picture list L1 may also include a previous picture earlier than the current picture in the output order as a reference picture. In this case, the subsequent picture may be indexed first in the reference picture list 1, and the previous picture may be indexed later. The output order may correspond to a picture order count (POC) order.

[0098] In addition, in the case of performing intra prediction, the correlation between samples can be used, and the difference (ie, residual) between the original block and the predicted block can be obtained. The above-mentioned transformation and quantization can be applied to the residual, and thus, spatial redundancy can be removed. Hereinafter, an encoding method and a decoding method using intra prediction will be described in detail.

[0099] Intra prediction means generating prediction of a prediction sample of a current block based on a reference sample outside the current block in a picture including the current block (hereinafter, current picture). Here, the reference sample outside the current block may be referred to as a sample located around the current block. In the case where intra prediction is applied to the current block, neighboring reference samples to be used for intra prediction of the current block may be derived.

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

[0101] However, some neighboring reference samples of the current block may not have been encoded yet, or may not be available yet. 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. In addition, the decoding device can configure the neighboring reference samples to be used for prediction by interpolation of available samples.

[0102] In the case of deriving neighboring reference samples, (i) the prediction sample may be derived based on an average or interpolation of neighboring reference samples of the current block, or (ii) the prediction sample may be derived based on reference samples existing in a specific (prediction) direction relative to the prediction sample among neighboring reference samples of the current block. The case of (i) may be applied when the intra prediction mode is a non-directional mode or a non-angular mode, and the case of (ii) may be applied when the intra prediction mode is a directional mode or an angular mode.

[0103] In addition, the prediction sample may be generated by interpolating between a first neighboring sample located in a prediction direction of an intra prediction mode of the current block based on the prediction sample of the current block among the neighboring reference samples and a second neighboring sample located in an opposite direction of the prediction direction. The above situation may be referred to as linear interpolation intra prediction (LIP). In addition, a linear model may be used to generate a chroma prediction sample based on a luma sample. This situation may be referred to as an LM mode.

[0104] In addition, the prediction sample of the current block may be derived by deriving the temporary prediction sample of the current block based on the filtered neighboring reference sample and performing a weighted sum of the temporary prediction sample and at least one reference sample derived according to the intra prediction mode among the existing neighboring reference samples (i.e., the non-filtered neighboring reference sample). The above situation may be referred to as position-dependent intra prediction (PDPC).

[0105] In addition, intra-frame prediction encoding may be performed in such a method that a prediction sample is derived using a reference sample located in a prediction direction in a reference sample row with the highest prediction accuracy by selecting a corresponding row among neighboring multiple reference sample rows of the current block, and indicating (notifying with a signal) the reference sample row used at this time to a decoding device. The above situation may be referred to as multiple reference row (MRL) intra-frame prediction or MRL-based intra-frame prediction.

[0106] In addition, when intra prediction is performed based on the same intra prediction mode by dividing the current block into vertical or horizontal sub-partitions, neighboring reference samples can be derived and used in units of sub-partitions. That is, the intra prediction mode of the current block can be equally applied to the sub-partitions, and in this case, since the neighboring reference samples are derived and used in units of sub-partitions, the intra prediction performance can be enhanced in some cases. This prediction method may be referred to as intra sub-partitioning (ISP) or ISP-based intra prediction.

[0107] As distinguished from the intra-frame prediction mode, the above-mentioned intra-frame prediction method may be referred to as an intra-frame prediction type. The intra-frame prediction type may be referred to as various terms such as intra-frame prediction technology or additional intra-frame prediction mode. For example, as described above, the intra-frame prediction type (or additional intra-frame prediction mode) may include at least one of LIP, PDPC, MRL and ISP. General intra-frame prediction methods other than specific intra-frame prediction types such as LIP, PDPC, MRL or ISP may be referred to as normal intra-frame prediction types. In the case where the above-mentioned specific intra-frame prediction type is not applied, the normal intra-frame prediction type may generally be applied, and prediction may be performed based on the above-mentioned intra-frame prediction mode. In addition, post-filtering of the derived prediction samples may be performed as needed.

[0108] In addition, in addition to the above intra prediction types, matrix-based intra prediction (hereinafter, MIP) may be used as one method of intra prediction. MIP may be referred to as affine linear weighted intra prediction (ALWIP) or matrix weighted intra prediction (NWIP).

[0109] In the case where MIP is applied to the current block, i) neighboring reference samples for which averaging processing has been performed are used, ii) matrix-vector multiplication processing may be performed, and iii) as needed, prediction samples of the current block may be derived by further performing horizontal / vertical interpolation processing. The intra prediction mode used for MIP may be the above-mentioned LIP, PDPC, MRL, or ISP intra prediction, but may be configured differently from the intra prediction mode used in normal intra prediction.

[0110] The intra-frame prediction mode of MIP may be referred to as "affine linear weighted intra-frame prediction mode" or matrix-based intra-frame prediction mode. For example, depending on the intra-frame prediction mode of MIP, the matrix and offset used in the matrix-vector multiplication may be configured differently. Here, the matrix may be referred to as an (affine) weight matrix, and the offset may be referred to as an (affine) offset vector or an (affine) bias vector. In this document, the intra-frame prediction mode of MIP may be referred to as MIP intra-frame prediction mode, linear weighted intra-frame prediction mode, matrix weighted intra-frame prediction mode, or matrix-based intra-frame prediction mode. The detailed MIP method will be described later.

[0111] The following drawings have been prepared to illustrate detailed examples of this document. Since the names of the detailed devices described in the drawings, detailed terms or names (e.g., syntactic names) are presented for example, the technical features of this document are not limited to the detailed names used in the following drawings.

[0112] The encoding device may derive prediction information. Specifically, the prediction information may be derived by the intra predictor 222 and may be encoded by the entropy encoder 240.

[0113] The encoding device (intra-frame predictor 222) may perform intra-frame prediction on the current block. The encoding device may derive an intra-frame prediction mode / type of the current block, derive neighboring reference samples of the current block, and generate prediction samples in the current block based on the intra-frame prediction mode / type and the neighboring reference samples. Here, the processes of determining the intra-frame prediction mode / type, deriving neighboring reference samples, and generating prediction samples may be performed simultaneously, and any one process may be performed before the other processes.

[0114] The encoding device may perform a prediction sample filtering process. Prediction sample filtering may be referred to as post-filtering. Some or all prediction samples may be filtered by the prediction sample filtering process. Depending on the situation, the prediction sample filtering process may be omitted.

[0115] The encoding device generates residual samples of the current block based on the (filtered) prediction samples. The encoding device can derive residual samples by comparing the prediction samples of the current block with the original samples based on phase. The derivation of residual samples can be performed by the residual processor 230 of the encoding device.

[0116] The encoding device may encode image information including information about intra prediction (prediction information) and residual information about residual samples. The prediction information may include intra prediction mode information and intra prediction type information. The residual information may include residual coding syntax. The residual information may be derived by the residual processor 230 and may be encoded by the entropy encoder 240. The residual information is information about the residual samples. The residual information may include information about the quantized transform coefficients of the residual samples. As described above, the residual samples may be derived as transform coefficients by the transformer of the encoding device and may be derived as quantized transform coefficients by the quantizer. The information about the quantized transform coefficients may be encoded by the entropy encoder 240 through the residual encoding process.

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

[0118] As described above, the encoding device may generate a reconstructed picture (including reconstructed samples and reconstructed blocks). To this end, the encoding device may derive (modified) residual samples by performing dequantization / inverse transformation of the quantized transform coefficients again. The reason why the residual samples are dequantized / inverse transformed again after transformation / quantization is to derive the same residual samples as the residual samples derived by the decoding device as described above. The encoding device may generate a reconstructed block including reconstructed samples of the current block based on the predicted samples and the (modified) residual samples. Based on the reconstructed block, a reconstructed picture of the current picture may be generated. As described above, the in-loop filtering process may be further applied to the reconstructed picture.

[0119] Figure 4 An example of an intra-frame prediction-based image decoding method to which the embodiments of this document are applicable is schematically shown.

[0120] Reference Figure 4 , the decoding device may perform operations corresponding to the above operations performed by the encoding device. S400 to S420 may be performed by the intra-frame predictor 331 of the decoding device, and the prediction information in S400 and the residual information in S430 may be obtained from the bitstream 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 the transform coefficient by performing dequantization based on the quantized transform coefficient derived according to the residual information, and the inverse transformer 322 of the residual processor may derive the residual sample of the current block by inversely transforming the transform coefficient. S440 may be performed by the adder 340 or the reconstructor of the decoding device.

[0121] 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) (S400). The decoding device may derive the neighboring reference samples of the current block (S410). The decoding device generates the prediction samples in the current block based on the intra prediction mode / type and the neighboring reference samples (S420). 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 prediction samples may be filtered by the prediction sample filtering process. The prediction sample filtering process may be omitted in some cases.

[0122] The decoding device generates a residual sample of the current block based on the received residual information (S430). 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 (S440). A reconstructed picture of the current picture may be generated based on the reconstructed block. As described above, in-loop filtering processing and the like may be further applied to the reconstructed picture.

[0123] For example, the intra prediction mode information may include 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 mode is applied. 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 prediction mode candidates (MPM candidates). The intra prediction mode candidate (MPM candidate) 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 prediction mode information may also include remaining mode information (e.g., intra_luma_mpm_remainder) indicating one of the remaining intra prediction modes other than the intra prediction mode candidate (MPM candidate). The decoding device may determine the intra prediction mode of the current block based on the intra prediction mode information.

[0124] 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 reference sample row information (e.g., intra_luma_ref_idx) indicating whether MRL is applied to the current block and which reference sample row is used if MRL is applied, ISP flag information (e.g., intra_subpartitions_mode_flag) indicating whether ISP is applied to the current block, ISP type information (e.g., intra_subpartitions_split_flag) indicating the split 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.

[0125] The intra prediction mode information and / or the intra prediction type information may be encoded / decoded by the encoding method described in this document. For example, the intra prediction mode information and / or the intra prediction type information may be encoded / decoded by entropy encoding (e.g., CABAC, CAVLC) based on a truncated (rice) binary code.

[0126] In addition, in the case of applying intra prediction, the intra prediction mode applied to the current block may be determined using the intra prediction mode of the neighboring blocks. For example, the decoding device may select one of the mpm candidates from the most probable mode (mpm) list and the additional candidate mode derived from the intra prediction mode of the neighboring blocks (e.g., left and / or upper neighboring blocks) of the current block based on the received mpm index, or may select one of the remaining intra prediction modes not included in the mpm candidates (and the plane mode) based on the remaining intra prediction mode information. The mpm list may 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 may have 6 candidates, and if the mpm list does not include the plane mode as a candidate, the mpm list may 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 prediction mode of the current block is not a plane mode may be signaled. For example, the mpm flag may be first signaled, and when the value of the mpm flag is 1, the mpm index and the non-planar flag may be signaled. In addition, when the value of the non-planar flag is 1, the mpm index may be signaled. Here, the construction of the mpm list that does not include the planar mode as a candidate is to first identify whether the intra-frame prediction mode is a planar mode by first signaling the flag (non-planar flag), because the planar mode is always regarded as an mpm, and the non-planar mode is not an mpm.

[0127] For example, it may be indicated based on an mpm flag (e.g., intra_luma_mpm_flag) whether the intra prediction mode applied to the current block is in the mpm candidate (planar mode) or in the residual mode. An mpm flag value of 1 may indicate that the intra prediction mode of the current block is in the mpm candidate (and planar mode), and an mpm flag value of 0 may indicate that the intra prediction mode of the current block is not in the mpm candidate (and planar mode). A non-planar flag (e.g., intra_luma_not_planar_flag) value of 0 may indicate that the intra prediction mode of the current block is the planar mode, and a non-planar flag value of 1 may indicate that the intra prediction mode of the current block is not the planar mode. The mpm index may be signaled in the form of an mpm_idx or intra_luma_mpm_idx syntax element, and the remaining intra prediction mode information may 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 that are not included in the mpm candidates (and planar modes) among all 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). Below, the intra prediction mode information may include at least one of an mpm flag (e.g., intra_luma_mpm_flag), a non-planar flag (e.g., intra_luma_not_planar_flag), an mpm index (e.g., mpm_idx or intra_luma_mpm_idx), and 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 (candModelList), and a candidate intra prediction mode list.

[0128] Typically, when blocks of an image are split, the current block to be encoded and the neighboring blocks have similar image properties. Therefore, the current block and the neighboring blocks are likely to have the same or similar intra-frame prediction modes. Therefore, the encoder can use the intra-frame prediction mode of the neighboring 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 neighboring blocks when encoding the intra-frame prediction mode.

[0129] Figure 5 An example of an intra prediction mode to which the embodiments of this document are applicable is shown.

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

[0131] In addition, the intra prediction mode used in the above-mentioned MIP is not an existing directional mode, but can indicate a matrix and offset for intra prediction. That is, the matrix and offset of intra prediction can be derived by the intra mode of MIP. In this case, when the intra mode is derived for generating the above-mentioned typical intra prediction or MPM list, the intra prediction mode of the block predicted by MIP can be configured as a pre-configured mode, such as a plane mode or a DC mode. In addition, according to another example, the intra mode of MIP can be mapped to a plane mode, a DC mode, or a directional intra mode based on the block size.

[0132] Hereinafter, as one method of intra prediction, matrix-based intra prediction (hereinafter, MIP) will be described.

[0133] As described above, matrix-based intra prediction may be referred to as affine linear weighted intra prediction (ALWIP) or matrix weighted intra prediction (MWIP). To predict samples of a rectangular block having a width W and a height H, MIP uses one H row of reconstructed neighboring left boundary samples of the block and one W row of reconstructed neighboring upper boundary samples of the block as input values. If the reconstructed samples are not available, reference samples may be generated according to the interpolation method applied in typical intra prediction.

[0134] Figure 6 FIG. 2 is a diagram for explaining a process of generating a prediction sample based on MIP according to an embodiment. Figure 6 , the MIP processing will be described as follows.

[0135] 1. Average processing

[0136] Through the averaging process, four boundary samples can be extracted in the case of W=H=4, and eight boundary samples can be extracted in other cases.

[0137] 2. Matrix-vector multiplication processing

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

[0139] 3. (Linear) interpolation processing

[0140] The prediction samples in the remaining positions are generated from the prediction samples of the set of sub-sampled samples by linear interpolation which is a single-step linear interpolation in each direction.

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

[0142] The set S0 can be composed of 18 matrices A0 i , i∈{0,…,17} and 18 offset vectors b0 i , i∈{0,…,17}. For example, each matrix A0 i , i∈{0,…,17} may have 16 rows and 4 columns. In this example, each offset vector b0 i , i∈{0,…,17} may have a size of 16. The matrices and offset vectors of set S0 may be used for blocks of size 4×4.

[0143] The set S1 can be composed of 10 matrices A1 i , i∈{0,…,9} and 10 offset vectors b1 i , i∈{0,…,9}. For example, each matrix A1 i , i∈{0,…,9} may have 16 rows and 8 columns. In this example, each offset vector b1 i , i∈{0,…,9} may have a size of 16. The matrices and offset vectors of set S1 may be used for blocks of size 4×8, 8×4, and 8×8.

[0144] Finally, the set S2 can be composed of 6 matrices A2 i , i∈{0,…,5} and 6 offset vectors b2 i , i∈{0,…,5}. For example, each matrix A2 i , i∈{0,…,5} may have 64 rows and 8 columns. In this example, each offset vector b2 i , i∈{0, ..., 5} may have a size of 64. The matrices and offset vectors of set S2 or some of them may be used for all other sized block types to which set S0 and set S1 are not applied.

[0145] The total number of multiplications required to compute the matrix-vector product may always be equal to or less than 4 x W x H. For example, up to four multiplications per sample may be required in MIP mode.

[0146] Regarding the implementation of averaging neighboring samples, among the boundary samples, four samples can be extracted by averaging when W=H=4, and 8 samples can be extracted by averaging. left and bdry top It can be reduced to a smaller boundary by averaging neighboring boundary samples according to a predefined rule depending on the block size. and

[0147] Since the two reduction boundaries and Cascaded to reduce the boundary vector bdry red , so in the case of 4×4 type blocks bdry red The size of is 4 and in the case of all other blocks its size is 8.

[0148] In the case where "mode" is called MIP mode, the reduction boundary vector bdry red The range of MIP mode values ​​(mode) can be defined as follows.

[0149] [Formula 1]

[0150]

[0151] Regarding the implementation of matrix-vector multiplication, the matrix-vector multiplication can be performed with the average samples as input. red One of them generates a reduced prediction signal pred red The prediction samples are of width W red and height H red The signal of the downsampling block. For example, W red and H red It can be defined as follows.

[0152] [Formula 2]

[0153]

[0154] Reduce the prediction sample pred red It can be calculated by adding the offset after performing matrix-vector multiplication and can be derived by the following formula.

[0155] [Formula 3]

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

[0157] Here, when W and H are 4 (W = H = 4), A represents a matrix with W red × h red rows and four columns, or eight columns in all other cases, and b represents a vector of size W red × h red .

[0158] The matrix A and the offset vector b are optionally selected from the sets S0, S1, and S2. For example, the index idx = idx(W, H) can be defined as in the following equation.

[0159] [Equation 4]

[0160]

[0161] If idx is equal to or less than 1 (idx ≤ 1) or idx is 2, and the smaller value between W and H is greater than 4 (min(W, H) > 4), then A is set to b is set to If idx is 2, the smaller value between W and H is 4 (min(W, H) = 4), and W is 4, then A becomes the matrix with the rows removed corresponding to the odd x - coordinates in the downsampled block. Further, if H is 4, then A becomes the matrix of the columns corresponding to the odd y - coordinates in the downsampled block.

[0162] Since A consists of 4 columns and 16 rows in the case of W = H = 4, the number of multiplications required for the calculation of pred red is 4. In all other cases, since A consists of 8 columns and W red × h red rows, it can be confirmed that the calculation of pred red requires at most four multiplications per sample.

[0163] The interpolation process can be referred to as linear interpolation or bilinear interpolation process. As shown, the interpolation process can include two steps: 1) vertical interpolation and 2) horizontal interpolation.

[0164] In the case of W >= H, vertical linear interpolation can be applied first, and then horizontal linear interpolation can be applied. In the case of W < H, horizontal linear interpolation can be applied first, and then vertical linear interpolation can be applied. In the case of a 4×4 block, the interpolation process can be omitted.

[0165] In the case of a W×H block with max(W, H) ≥ 8, from the reduced prediction samples pred red × H red on W redDerive prediction samples. Perform linear interpolation in the vertical direction, horizontal direction, or both directions according to the block type. In the case of applying linear interpolation in both directions, when W < H, apply linear interpolation in the horizontal direction first, otherwise apply linear interpolation in the vertical direction first.

[0166] In the case of a W×H block where max(W,H)≥8 and W>=H, it can be considered that there is no general loss. In this case, perform one-dimensional linear interpolation as follows. If there is no general loss, it fully explains the linear interpolation in the vertical direction.

[0167] First, the reduced prediction samples are extended to the top by the boundary signal. The vertical upsampling coefficient U can be defined ver =H / H red and if configured then the extended reduced prediction samples can be configured as in the following formula.

[0168] For each coding unit (CU) in the intra mode, a flag indicating whether the MIP mode is applied to the current block corresponding to it. If the MIP mode is applied, the MPM flag can be signaled, and it can be indicated whether the prediction mode is one of the MPM modes. For example, three modes can be considered for the MPM. In the example, the MPM mode can be context-encoded by truncated binary. The non-MPM mode can be encoded as a fixed length code (FLC). By performing mode mapping between the normal intra prediction mode and the MIP intra prediction mode based on a predefined mapping table depending on the block size (i.e., idx(W,H)∈{0,1,2}), the deviation of these MPMs can be combined with the normal intra prediction mode. The following formula can represent the forward (from the normal mode to the MIP mode) and / or reverse (from the MIP mode to the normal mode) mode mapping table.

[0169] [Equation 5]

[0170] predmode ALWIP =map_angular_to_alwip idx [predmode Angular

[0171] [Equation 6]

[0172]

[0173] In the example, 35 modes can be used for the block (e.g., max(W,H)<=8&&W*H<32). In another example, 19 modes can be used for the block (e.g., max(W,H)=8). 11 modes can be used for the block (e.g., max(W,H)>8). Additionally, to reduce memory consumption, two modes can share the same matrix and / or offset vector as in the following formula.​

[0174] [Formula 7]

[0175]

[0176] Hereinafter, a method of maximizing performance while reducing the complexity of the MIP technique will be described. The embodiments to be described later may be performed independently or may be performed in combination.

[0177] According to an embodiment of the present document, whether to apply MIP can be adaptively selected (determined) according to the type of the current (luminance) block in the MIP processing. In the existing embodiment, if the difference between the width and height of the luminance block exceeds four times (for example, 32×4, 64×8, 64×4, 4×32, 8×64, 4×64, 128×4, 128×8, 128×16, 4×128, 8×128 and 16×128), MIP is not performed and / or a flag indicating whether MIP is applied is not sent. In the present embodiment, a method for enhancing encoding efficiency and decoding efficiency when MIP is applied is extended or removed.

[0178] In one of the examples of this embodiment, MIP may not be applied when the width of the current (luminance) block is 4 and its height is equal to or greater than 16, or MIP may not be applied when the height of the current (luminance) block is 4 and its width is equal to or greater than 16. Some coding unit syntaxes according to this example may be the same as the following table.

[0179] [Table 1]

[0180]

[0181] In the above example, MIP is not applied to 4×16 blocks and 16×4 blocks where MIP efficiency is low, and thus MIP efficiency can be improved.

[0182] In another example among the examples of this embodiment, MIP may not be applied when the width of the current (luminance) block is 4 and its height is equal to or greater than 32, and MIP may not be applied when the height of the current (luminance) block is 4 and its width is equal to or greater than 32. Some coding unit syntaxes according to this example may be as shown in the following table.

[0183] [Table 2]

[0184]

[0185] Through the above-described example, MIP may be applied to an 8×64 block and a 64×8 block to which MIP may be efficiently and easily applied, and thus MIP efficiency may be enhanced.

[0186] According to another example of this embodiment, the block type restriction of the MIP may be removed. For example, in this example, the MIP may always be applied to all blocks (subject to encoding). In the case of signaling (parsing) the MIP flag, the conditional determination of the width and / or height of the current (luminance) block may be removed. Therefore, the MIP parsing conditions may be simplified, and furthermore, the complexity in terms of software implementation and hardware implementation may be reduced. Some coding unit syntaxes according to this example may be as shown in the following table.

[0187] [Table 3]

[0188]

[0189] The test results of applying this example can be seen in the following table.

[0190] [Table 4]

[0191]

[0192] Referring to the above table, all intraframes (AI) and random access (RA) are presented in the above test. As shown in the above table, it is confirmed that there is no performance degradation in this embodiment. That is, in the case of the proposed method 3, since the signaling (parsing) burden can be simplified by releasing the MIP flag signaling (parsing) condition, there is an advantage in hardware implementation, and no encoding and decoding performance degradation occurs.

[0193] According to this embodiment, Figure 4 In S400 and / or S410, it may be determined whether to apply MIP to the current block, and in this case, it may be adaptively determined whether to apply MIP according to the type of the current (luminance) block as described above. In this case, in S420, the encoding device adaptively encodes intra_mip_flag.

[0194] In an embodiment of the present document, the number of MIP modes may be adaptively determined (selected) according to the type of the current (luminance) block in the MIP process. In an existing embodiment, 35 MIP modes are available for 4×4 luminance blocks (MipSizeId 0), 19 MIP modes are available for 4×4, 8×4 or 8×8 luminance blocks (MipSizeId 1), and 11 MIP modes are available for other luminance blocks (MipSizeId 2).

[0195] In this embodiment, a smaller number of MIP modes can be used for block types with low MIP efficiency. Through this embodiment, the amount of transmission data of information on MIP modes can be reduced.

[0196] Figure 7 , Figure 8 and Fig. 9is a flowchart illustrating MIP processing according to an embodiment of this document.

[0197] Reference Figure 7 , in the Figure 7 In a related embodiment, if the difference between the width and height of the current (luminance) block exceeds four times the width or height of the current (luminance) block (if the height of the current block is greater than four times the width of the current block, or if the width of the current block is greater than four times the height of the current block), a number of MIP modes less than 11 basic modes (MipSizeId 2) may be used, and information related to the MIP mode may be sent.

[0198] Reference Figure 8 , in the Figure 8 In a related embodiment, if the width of the current (luminance) block is 4 and its height is equal to or greater than 16, a number of MIP modes less than 11 basic modes (MipSizeId 2) may be used, and information related to the MIP mode may be sent. In addition, if the height of the current (luminance) block is 4 and its width is equal to or greater than 16, a number of MIP modes less than 11 basic modes (MipSizeId 2) may be used, and information related to the MIP mode may be sent.

[0199] Reference Fig. 9 , in the Fig. 9 In a related embodiment, if the width of the current (luminance) block is 4 and its height is equal to or greater than 32, a number of MIP modes less than 11 basic modes (MipSizeId 2) may be used, and information related to the MIP mode may be sent. In addition, if the height of the current (luminance) block is 4 and its width is equal to or greater than 32, a number of MIP modes less than 11 basic modes (MipSizeId 2) may be used, and information related to the MIP mode may be sent.

[0200] By following Figures 7 to 9 In an embodiment, by using a small number of MIP modes for blocks with lower MIP prediction efficiency (block types with a large difference between width and height), the amount of transmission data of the MIP mode can be reduced, and thus, the MIP prediction efficiency can be enhanced.

[0201] In addition, in reference Figures 7 to 9In the illustrated embodiment, only some of the 11 MIP modes may be used, in order to increase MIP efficiency through data reduction. In an example, only one of the 11 MIP modes may be used, and in this case, no MIP mode data may be sent. In another example, only two of the 11 MIP modes may be used, and in this case, one-bit MIP mode data may be sent. In another example, only four of the 11 MIP modes may be used, and in this case, 2-bit MIP mode data may be sent. One, two, or four of the 11 modes may be selected in the order of the MIP kernel in the existing embodiment, or may be selected according to the order of the MIP kernel as described above. Figures 7 to 9 In the described method, the selection is made in blocks in the order of the probability of the MIP selection mode.

[0202] Fig.10 and Fig.11 An example of a video / image encoding method and related components according to an embodiment of the present document is schematically shown.

[0203] Fig.10 The method disclosed in Figure 2 or Fig.11 Specifically, for example, Fig.10 S1000 to S1030 can be Fig.11 The predictor 220 of the encoding device performs, Fig.10 The S1040 can be Fig.11 The residual processor 230 of the encoding device performs, Fig.10 The S1050 can be Fig.11 The encoding is performed by the entropy encoder 240 of the encoding device. Fig.10 The method disclosed in may include the embodiments described above in this document.

[0204] Reference Fig.10 , the encoding device may determine whether matrix-based intra prediction (MIP) is applied to the current block (S1000). If the MIP is applied to the current block, the encoding device may generate intra-MIP flag information indicating that the MIP is applied to the current block. If the MIP is not applied to the current block, the encoding device may generate intra-MIP flag information (e.g., intra_mip_flag) indicating that the MIP is not applied to the current block. The encoding device may output image information including the intra-MIP flag information as a bitstream.

[0205] The encoding apparatus may derive a MIP mode of the MIP (S1010). The MIP mode may be derived based on the determination to apply the MIP. The MIP mode may be any one of a plurality of modes.

[0206] The encoding apparatus may derive a MIP matrix of the current block (S1020). The MIP matrix may be determined and derived according to the MIP mode. The MIP matrix may be derived based on the size of the current block.

[0207] The encoding apparatus may generate a MIP sample of the current block (S1030). The MIP sample may be generated based on neighboring reference samples of the current block and a MIP matrix.

[0208] The encoding device may generate a prediction sample of the current block. The prediction sample may be generated based on upsampling of the MIP sample.

[0209] The encoding device may generate prediction related information. Based on determining that the MIP is applied to the current block, the encoding device may generate prediction related information. For example, the prediction related information may include intra-frame MIP flag information (e.g., intra_mip_flag). In addition, the prediction related information may also include intra-frame MIP mode information (e.g., intra_mip_mode).

[0210] The encoding apparatus may generate a residual sample of the current block (S1040). The encoding apparatus may generate the residual sample based on a prediction sample derived from the MIP sample. The encoding apparatus may generate the residual sample based on a difference between an original sample and a prediction sample of the current block.

[0211] The encoding device may derive (quantize) transform coefficients. The encoding device may derive transform coefficients based on a transform process of the residual samples. For example, the transform process may include at least one of DCT, DST, GBT, or CNT. The encoding device may derive quantized transform coefficients. The encoding device may derive quantized transform coefficients based on a quantization process of the transform coefficients. The quantized transform coefficients may have a one-dimensional vector form based on a coefficient scanning order.

[0212] The encoding device may generate residual information. The encoding device may generate residual information representing the quantized transform coefficient. The residual information may be generated by various encoding methods such as Exponential Golomb, CAVLC, and CABAC.

[0213] The encoding device may encode the image / video information (S1050). The image / video information may include information about residual samples and / or MIP mode information related to the MIP mode. The information about the residual samples may include residual information. In addition, the image / video information may include prediction-related information. The prediction-related information may include information about MIP. In addition, the image / video information may include intra-frame MIP flag information related to whether the MIP is applied to the current block. The intra-frame MIP flag information may be related to whether the intra-frame prediction mode type of the current block is MIP. The MIP mode information may be referred to as intra-frame MIP mode information related to the MIP applied to the current block.

[0214] The encoded video / image information can be output in the form of a bit stream, which can be sent to a decoding device via a network or storage medium.

[0215] According to an embodiment of the present document, the image / video information may include various types of information. For example, the image / video information may include information disclosed in at least one of Tables 1 to 3 as described above.

[0216] In an embodiment, a MIP matrix (MIP weight matrix) of the MIP may be derived based on the width and / or height of the current block.

[0217] In an embodiment, the MIP samples of the current block may be generated based on the MIP matrix.

[0218] In an embodiment, the prediction samples of the current block may be generated based on the MIP samples.

[0219] In an embodiment, the image information may include MIP mode information. The MIP matrix may be further derived based on the MIP mode information.

[0220] In an embodiment, the syntax element cell string of the MIP mode information may be binarized by a truncation binarization method.

[0221] In an embodiment, the image information may include a sequence parameter set (SPS). The SPS may include MIP available flag information (eg, sps_mip_enabled_flag) regarding whether the MIP is available.

[0222] In an embodiment, the reduced boundary samples may be derived by downsampling reference samples (boundary samples) adjacent to the current block. The MIP samples may be generated based on the product between the reduced boundary samples and a matrix.

[0223] In an embodiment, the encoding device may perform upsampling of the MIP samples, may generate prediction samples based on the upsampled MIP samples, and may derive residual samples based on the prediction samples.

[0224] In an embodiment, the height of the current block may be greater than four times the width of the current block.

[0225] In an embodiment, the width of the current block may be greater than four times the height of the current block.

[0226] In an embodiment, the size of the current block is 32×4, 4×32, 64×8, 8×64, 64×4, 4×64, 128×4, 128×8, 128×16, 4×128, 8×128, or 16×128.

[0227] In an embodiment, the MIP matrix may be derived based on three matrix sets classified according to the size of the current block, and / or each of the three matrix sets may include a plurality of matrices.

[0228] Fig.12 and Fig.13 An example of a video / image decoding method and related components according to an embodiment of this document is schematically shown.

[0229] Fig.12 The method disclosed in Figure 3 or Fig.13 Specifically, for example, Fig.12 The S1200 can be Fig.13 The entropy decoder 310 of the decoding device performs, Fig.12 S1210 to S1230 may be performed by the predictor 330 of the decoding device, Fig.12 S1240 may be performed by the adder 340 of the decoding device. Fig.12 The method disclosed in may include the embodiments described above in this document.

[0230] Reference Fig.12 , the decoding device may obtain (receive) image / video information including prediction mode information through a bitstream (S1200). The prediction mode information may include information about MIP. For example, the decoding device may obtain intra-frame MIP flag information by parsing or decoding the bitstream. Here, the bitstream may be referred to as encoded (image) information. The image / video information may also include residual information for deriving residual samples and / or information about MIP.

[0231] According to an embodiment of the present document, the image / video information may include various types of information. For example, the image / video information may include information disclosed in at least one of Tables 1 to 3 as described above.

[0232] The decoding device may derive the transform coefficient. Specifically, the decoding device may derive the quantized transform coefficient based on the residual information. The quantized transform coefficient may have a one-dimensional vector form based on the coefficient scanning order. The decoding device may derive the transform coefficient based on the dequantization process of the quantized transform coefficient.

[0233] The decoding device may generate residual samples. The decoding device may derive the residual samples based on the transform coefficients. The decoding device may generate the residual samples based on an inverse transform process on the transform coefficients.

[0234] The decoding apparatus may derive an intra prediction mode of the current block. The decoding apparatus may derive the intra prediction mode based on prediction mode information among prediction related information included in the image information.

[0235] The decoding apparatus may derive a MIP mode of the current block based on the prediction mode information (S1210). The MIP mode may be derived based on determining that the MIP is applied to an intra MIP flag. The MIP mode may be any one of a plurality of modes.

[0236] The decoding apparatus may derive a MIP matrix of the current block (S1220). The MIP matrix may be determined and derived according to the MIP mode. The MIP matrix may be derived based on the size of the current block.

[0237] The decoding apparatus may generate a MIP sample of the current block (S1230). The MIP sample may be generated based on neighboring reference samples of the current block and a MIP matrix.

[0238] The decoding device may generate a prediction sample of the current block. The decoding device may generate the prediction sample based on an intra prediction mode. The decoding device may generate the prediction sample based on neighboring reference samples in a current picture including the current block.

[0239] The decoding device may generate a reconstructed sample of the current block (S1240). The reconstructed sample may be generated based on the prediction sample and the residual sample. The decoding device may directly use the prediction sample as the reconstructed sample according to the prediction mode, or may generate the reconstructed sample by adding the residual sample to the prediction sample.

[0240] In an embodiment, a MIP matrix (MIP weight matrix) for a MIP may be derived based on the width and / or height of the current block.

[0241] In an embodiment, the MIP samples of the current block may be generated based on the MIP matrix.

[0242] In an embodiment, the prediction samples of the current block may be generated based on the MIP samples.

[0243] In an embodiment, the image information may include MIP mode information. The MIP matrix may be further derived based on the MIP mode information.

[0244] In an embodiment, the syntax element cell string of the MIP mode information may be binarized by a truncation binarization method.

[0245] In an embodiment, the image information may include a sequence parameter set (SPS). The SPS may include MIP available flag information (eg, sps_mip_enabled_flag) regarding whether the MIP is available.

[0246] In an embodiment, a reduced boundary sample may be derived by downsampling a reference sample (boundary sample) adjacent to the current block. A MIP sample may be generated based on the product between the reduced boundary sample and a matrix. A prediction sample may be generated based on the MIP sample.

[0247] In an embodiment, the encoding device may perform upsampling of the MIP samples. The prediction samples may be generated based on the upsampled MIP samples. That is, the prediction samples may be generated based on the upsampled MIP samples. The reconstructed samples may be generated based on the prediction samples and / or the upsampled MIP samples.

[0248] In an embodiment, the height of the current block may be greater than four times the width of the current block.

[0249] In an embodiment, the width of the current block may be greater than four times the height of the current block.

[0250] In an embodiment, the size of the current block is 32×4, 4×32, 64×8, 8×64, 64×4, 4×64, 128×4, 128×8, 128×16, 4×128, 8×128, or 16×128.

[0251] In an embodiment, the MIP matrix may be derived based on three matrix sets classified according to the size of the current block, and / or each of the three matrix sets may include a plurality of matrices.

[0252] In the case where there are residual samples of the current block, the decoding device may receive information about the residual of the current block. The information about the residual may include a transform coefficient of the residual sample. The decoding device may derive the residual sample (or residual sample array) of the current block based on the residual information. Specifically, the decoding device may derive the quantized transform coefficient based on the residual information. The quantized transform coefficient may have a one-dimensional vector form based on a coefficient scanning order. The decoding device may derive the transform coefficient based on a dequantization process of the quantized transform coefficient. The decoding device may derive the residual sample based on the transform coefficient.

[0253] The decoding device may generate a reconstructed sample based on the (intra-frame) prediction sample and the residual sample, and may derive a reconstructed block or a reconstructed picture based on the reconstructed sample. Specifically, the decoding device may generate a reconstructed sample based on the sum of the (intra-frame) prediction sample and the residual sample. Thereafter, as described above, if necessary, the decoding device may apply an in-loop filtering process such as deblocking filtering and / or SAO processing to the reconstructed picture in order to improve the subjective / objective picture quality.

[0254] For example, the decoding device can obtain image information including all or some of the above information (or syntax elements) by decoding the bitstream or coding information. In addition, the bitstream or coding information can be stored in a computer-readable storage medium, or the above decoding method can be executed.

[0255] In the above-mentioned embodiment, the method is described based on a flow chart with a series of steps or boxes. The present disclosure is not limited to the order of the above-mentioned steps or boxes. Some steps or boxes may occur simultaneously or in an order different from other steps or boxes as described above. In addition, it will be understood by those skilled in the art that the steps shown in the above-mentioned flow chart are not exclusive, and may include additional steps, or one or more steps in the flow chart may be deleted without affecting the scope of the present disclosure.

[0256] The method according to the above-mentioned embodiment of the present document can be implemented in the form of software, and the encoding device and / or decoding device according to the present document can be included in a device for performing image processing of a TV, computer, smart phone, set-top box, display device, etc.

[0257] When the embodiments in this document are implemented in software, the above methods can be implemented as modules (processes, functions, etc.) that perform the above functions. The modules can be stored in a memory and executed by a processor. The memory can be located inside or outside the processor and can be connected to the processor by various well-known means. 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. That is, the embodiments described in this document can be implemented and executed on a processor, a microprocessor, a controller, or a chip. For example, the functional units shown in the various figures can be implemented and executed on a computer, a processor, a microprocessor, a controller, or a chip. In this case, information about the instructions or algorithms used to implement can be stored in a digital storage medium.

[0258] In addition, the decoding device and the encoding device to which the present disclosure is applied may be included in a multimedia broadcast sending / receiving device, a mobile communication terminal, a home theater video device, a digital theater video device, a surveillance camera, a video chat device, a real-time communication device (e.g., video communication), a mobile streaming device, a storage medium, a camera, a VoD service providing device, an over-the-top (OTT) video device, an Internet streaming service providing device, a three-dimensional (3D) video device, a teleconference video device, a transportation user device (i.e., a vehicle user device, an aircraft user device, a ship user device, etc.), and a medical video device, and may be used to process video signals and data signals. For example, an over-the-top (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, a digital video recorder (DVR), etc.

[0259] In addition, the processing method to which this document is applied can be generated in the form of a program to be executed by a computer, and can be stored in a computer-readable recording medium. Multimedia data with a data structure according to the present disclosure can also be stored in a computer-readable recording medium. Computer-readable recording media include all types of storage devices that store data readable by a computer system. For example, a computer-readable recording medium may include a 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, a computer-readable recording medium includes a medium implemented in the form of a carrier wave (i.e., transmission via the Internet). In addition, the bit stream generated by the encoding method can be stored in a computer-readable recording medium or can be sent via a wired / wireless communication network.

[0260] In addition, the embodiments of the present document may be implemented as a computer program product according to a program code, and the program code may be executed in a computer through the embodiments of the present document. The program code may be stored on a computer-readable carrier.

[0261] Fig.14 An example of a content streaming system to which the embodiments disclosed in this document can be applied is shown.

[0262] Reference Fig.14 , a content streaming system to which the implementation methods of this document are applied may mainly include an encoding server, a streaming server, a network server, a media storage device, a user device, and a multimedia input device.

[0263] The encoding server compresses the content input from the multimedia input device (e.g., a smart phone, a camera, a camcorder, etc.) into digital data to generate a bitstream and sends the bitstream to the streaming server. As another example, when the multimedia input device (e.g., a smart phone, a camera, a camcorder, etc.) directly generates the bitstream, the encoding server may be omitted.

[0264] A bitstream may be generated by an encoding method or a bitstream generating method to which an embodiment of the present disclosure is applied, and a streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.

[0265] The streaming server sends multimedia data to the user device based on the user's request through the network server, and the network server is used as a medium to inform the user of the service. When the user requests the desired service from the network server, the network server transmits 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.

[0266] The streaming server may receive content from a media storage device and / or an encoding server. For example, when receiving content 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.

[0267] Examples of user devices may include mobile phones, smart phones, laptop computers, digital broadcast terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation, tablet computers, tablet PCs, ultrabooks, wearable devices (e.g., smart watches, smart glasses, head-mounted displays), digital TVs, desktop computers, digital signage, etc. Each server in the content streaming system may operate as a distributed server, in which case data received from each server may be distributed.

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

[0269] The claims described herein may be combined in various ways. For example, the technical features of the method claims of this document may be combined and implemented as a device, and the technical features of the device claims of this document may be combined and implemented as a method. In addition, the technical features of the method claims of this document and the technical features of the device claims may be combined to be implemented as a device, and the technical features of the method claims of this document and the technical features of the device claims may be combined and implemented as a method.

Claims

1. An image decoding method performed by a decoding device, the image decoding method comprising the following steps: Obtaining picture information including prediction mode information from a bitstream; obtaining, based on the prediction mode information, MIP flag information indicating whether a matrix-based intra prediction MIP is applied to the current block; deriving a MIP mode for the current block based on the MIP flag information; deriving a MIP matrix for the current block based on the MIP mode; generating MIP samples for the current block based on the MIP matrix; as well as deriving reconstructed samples for the current block based on the MIP samples, wherein, for the current block having a size equal to 64x4, the MIP flag information for the current block is obtained from the bitstream, and Wherein, the MIP matrix is ​​further derived based on the width and height of the current block.

2. The image decoding method according to claim 1, wherein: The image information includes a sequence parameter set SPS, and The SPS includes MIP availability flag information related to whether the MIP is available.

3. The image decoding method according to claim 1, wherein: The steps of generating the MIP sample include: deriving reduced boundary samples by downsampling reference samples adjacent to the current block; and The MIP samples are generated based on a product between the reduced boundary samples and the MIP matrix.

4. The image decoding method according to claim 1, wherein: The steps of generating the reconstructed sample include: Upsampling the MIP samples; generating prediction samples for the current block based on the upsampled MIP samples; and The reconstructed samples are generated based on the predicted samples.

5. The image decoding method according to claim 1, wherein: The image information includes MIP mode information, wherein the MIP matrix is ​​further derived based on the MIP mode information, and The syntactic element cell string of the MIP mode information is binarized by a truncation binarization method.

6. The image decoding method according to claim 1, wherein: The MIP matrix is ​​derived based on three sets of matrices classified according to the size of the current block, and Each of the three matrix sets includes multiple matrices.

7. An image encoding method performed by an encoding device, the image encoding method comprising the following steps: Determining whether a matrix-based intra prediction MIP applies to the current block; generating, based on the determination, MIP flag information indicating whether the MIP applies to the current block; deriving a MIP mode for the MIP; deriving a MIP matrix for the current block based on the MIP mode; generating MIP samples for the current block based on the MIP matrix; generating residual samples for the current block based on the MIP samples; as well as encoding image information including information about the residual sample, MIP mode information related to the MIP mode, and the MIP flag information, wherein, for the current block having a size equal to 64×4, the MIP flag information for the current block is generated and included in the image information, and Wherein, the MIP matrix is ​​further derived based on the width and height of the current block.

8. The image encoding method according to claim 7, wherein: The image information includes a sequence parameter set SPS, and The SPS includes MIP availability flag information related to whether the MIP is available.

9. The image encoding method according to claim 7, wherein: The steps of generating the MIP sample include: deriving reduced boundary samples by downsampling reference samples adjacent to the current block; and The MIP samples are generated based on a product between the reduced boundary samples and the MIP matrix.

10. The image encoding method according to claim 7, wherein: The step of generating the residual sample comprises: Upsampling the MIP samples; generating prediction samples of the current block based on the upsampled MIP samples; and The residual samples are generated based on the prediction samples.

11. The image encoding method according to claim 7, wherein: The image information includes MIP mode information, wherein the MIP matrix is ​​further derived based on the MIP mode information, and The syntactic element cell string of the MIP mode information is binarized by a truncation binarization method.

12. The image encoding method according to claim 7, wherein: The MIP matrix is ​​derived based on three sets of matrices classified according to the size of the current block, and Each of the three matrix sets includes multiple matrices.

13. A method for transmitting image data, the method comprising the following steps: Obtaining a bitstream for the image, wherein the bitstream is generated based on the following steps: determining whether a matrix-based intra prediction MIP is applied to a current block, generating MIP flag information indicating whether the MIP is applied to the current block based on the determination; deriving a MIP mode for the MIP, deriving a MIP matrix for the current block based on the MIP mode, generating MIP samples for the current block based on the MIP matrix, generating residual samples for the current block based on the MIP samples, and encoding image information including information about the residual samples and MIP mode information related to the MIP mode; and sending said data comprising said bit stream, wherein, for the current block having a size equal to 64×4, the MIP flag information for the current block is generated and included in the image information, and Wherein, the MIP matrix is ​​further derived based on the width and height of the current block.