Matrix-based intra prediction device and method
The matrix-based intra prediction method addresses the need for efficient image/video compression by improving coding efficiency and prediction performance, reducing complexity in high-resolution and immersive media applications.
Patent Information
- Application Number
- JP2025103548
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2019-06-03
- Filing Date
- 2025-06-19
- Publication Date
- 2025-08-28
AI Technical Summary
The increasing demand for high-resolution and high-quality images/videos, as well as immersive media, has led to a need for highly efficient image/video compression technologies to reduce transmission and storage costs while maintaining quality.
A matrix-based intra prediction method and apparatus are introduced, where flag information indicates the applicability of matrix-based intra prediction (MIP) to a current block, and MIP mode information is used to generate intra prediction samples, downsampling and upsampling are employed to derive and enhance prediction samples.
This approach improves overall image/video compression efficiency by reducing implementation complexity and enhancing prediction performance through efficient intra prediction.
Smart Images

Figure 2025126207000001_ABST
Abstract
Description
[Technical Field]
[0001] This document relates to video coding techniques, and more particularly to matrix-based intra prediction apparatus and methods. [Background technology]
[0002] In recent years, the demand for high-resolution, high-quality images / videos, such as 4K or 8K or higher UHD (Ultra High Definition) images / videos, has been increasing in various fields. As the resolution and quality of image / video data increases, the amount of information or bits transmitted increases relatively compared to existing image / video data. Therefore, when transmitting image data using existing media such as wired or wireless broadband lines or storing image / video data using existing storage media, the transmission and storage costs increase.
[0003] In addition, interest and demand for immersive media such as VR (Virtual Reality), AR (Artificial Reality) content and holograms has been increasing in recent years, and the broadcast of images / videos with different image characteristics from real images, such as game images, is increasing.
[0004] Accordingly, there is a demand for highly efficient image / video compression technology to effectively compress, transmit, store, and play back high-resolution, high-quality image / video information having the above-mentioned various characteristics. Summary of the Invention [Problem to be solved by the invention]
[0005] The technical problem of this document is to provide a method and apparatus for improving video coding efficiency.
[0006] Another technical problem of this document is to provide an efficient intra prediction method and apparatus.
[0007] Another technical problem of this document is to provide a video coding method and apparatus for matrix-based intra prediction.
[0008] Another technical problem of the present document is to provide a video coding method and apparatus for coding mode information for matrix-based intra prediction. [Means for solving the problem]
[0009] According to an embodiment of the present document, there is provided a video decoding method performed by a decoding device, the method including: receiving second flag information indicating whether matrix-based intra prediction (MIP) is used for a current block based on first flag information indicating whether the MIP is applicable to the current block; receiving matrix-based intra prediction (MIP) mode information based on the second flag information; generating intra prediction samples for the current block based on the MIP mode information; and generating reconstructed samples for the current block based on the intra prediction samples.
[0010] The first flag information may be signaled via syntax information of a sequence parameter set (SPS), and the second flag information may be signaled via syntax information of a coding unit.
[0011] The MIP mode information may be index information indicating the MIP mode to be applied to the current block.
[0012] The step of generating the intra-prediction samples may include the steps of: downsampling reference samples adjacent to the current block to derive reduced boundary samples; deriving reduced prediction samples based on multiplication of the reduced boundary samples and an MIP matrix; and upsampling the reduced prediction samples to generate the intra-prediction samples for the current block.
[0013] Here, the scaled boundary samples may be downsampled by averaging the reference samples, and the intra-prediction samples may be upsampled by linear interpolation of the scaled prediction samples.
[0014] The MIP matrix can be derived based on the size of the current block and the index information.
[0015] The MIP matrix may be selected from one of three matrix sets classified according to the size of the current block, and each of the three matrix sets may include a plurality of MIP matrices.
[0016] According to an embodiment of the present document, there is provided a video encoding method performed by an encoding apparatus, the method including the steps of: deriving whether matrix-based intra prediction (MIP) is applicable to a current block; if the MIP is applied to the current block, deriving intra-predicted samples of the current block based on the MIP; deriving residual samples for the current block based on the intra-predicted samples; and encoding information on the residual samples and information on the MIP, wherein the information on the MIP may include first flag information indicating whether matrix-based intra prediction (MIP) is applicable to the current block, second flag information indicating whether the MIP is applied to the current block, and matrix-based intra prediction (MIP) mode information.
[0017] According to another embodiment of the present invention, a digital storage medium can be provided that stores video data including encoded video information and a bitstream generated by a video encoding method performed by an encoding device.
[0018] According to another embodiment of the present document, a digital storage medium may be provided that stores encoded video information and video data including a bitstream that causes a decoding device to perform the video decoding method. [Effects of the Invention]
[0019] The present document may have various advantages. For example, according to an embodiment of the present document, it is possible to improve overall image / video compression efficiency. Alternatively, according to an embodiment of the present document, it is possible to improve overall coding efficiency by reducing implementation complexity and improving prediction performance through efficient intra prediction. Alternatively, according to an embodiment of the present document, it is possible to improve coding efficiency by efficiently coding index information indicating matrix-based intra prediction.
[0020] The effects obtained through a specific example of this document are not limited to the effects listed above. For example, there may be various technical effects that a person having ordinary skill in the related art can understand or derive from this document. Therefore, the specific effects of this document are not limited to those explicitly stated in this document, but may include various effects that can be understood or derive from the technical features of this document. [Brief explanation of the drawings]
[0021] [Figure 1] 1 illustrates schematically an example of a video / image coding system to which embodiments of the present document can be applied. [Figure 2] 1 is a diagram illustrating the configuration of a video / image encoding device that can be applied to embodiments of the present document; [Figure 3] 1 is a diagram illustrating the configuration of a video / image decoding device that can be applied to an embodiment of the present document. [Figure 4] 1 illustrates an example of a content streaming system to which the embodiments disclosed herein may be applied. [Figure 5] Illustrates an example of CABAC (context-adaptive binary arithmetic coding) for encoding syntax elements. [Figure 6] 1 illustrates an example of a general intra-prediction based video encoding method to which embodiments of the present document can be applied. [Figure 7] 1 illustrates an example of a general intra-prediction based video decoding method to which embodiments of the present document can be applied. [Figure 8] 1 illustrates an example of an intra-prediction mode to which embodiments of this document can be applied. [Figure 9] 1 illustrates an example of an intra prediction method based on MPM mode in an encoding device to which an embodiment of this document can be applied. [Figure 10] 1 illustrates an example of an intra prediction method based on MPM mode in a decoding device to which an embodiment of this document can be applied. [Figure 11] FIG. 10 is a diagram illustrating a procedure for generating predicted samples based on MIP according to an example. [Figure 12] FIG. 1 illustrates the MIP procedure for a 4×4 block. [Figure 13] FIG. 1 illustrates the MIP procedure for an 8×8 block. [Figure 14] FIG. 1 illustrates the MIP procedure for an 8×4 block. [Figure 15] FIG. 1 illustrates the MIP procedure for a 16×16 block. [Figure 16] FIG. 10 is a diagram illustrating a boundary averaging procedure in the MIP procedure. [Figure 17] FIG. 1 is a diagram illustrating linear interpolation in the MIP procedure. [Figure 18] FIG. 1 is a diagram illustrating an MIP technique according to an example of this document. [Figure 19] 1 is a flowchart illustrating a decoding method that can be performed by a decoding device according to an embodiment of the present document. [Figure 20] 1 is a flowchart illustrating an encoding method that can be performed by an encoding device according to an embodiment of the present document. DETAILED DESCRIPTION OF THE INVENTION
[0022] Although this document may be modified in various ways and may have various embodiments, specific embodiments will be illustrated in the drawings and described in detail. However, this is not intended to limit this document to the specific embodiment. Common terms used in this document are used merely to describe specific embodiments and are not intended to limit the technical ideas of this document. Singular expressions include plural expressions unless the context clearly indicates otherwise. In this document, terms such as "comprise" or "have" are intended to specify the presence of features, numbers, steps, operations, components, parts, or combinations thereof described in the document, and should be understood not to preclude the possibility of the presence or addition of one or more different features, numbers, steps, operations, components, parts, or combinations thereof.
[0023] Meanwhile, each component in the drawings described in this document is shown independently for the convenience of explaining the different characteristic functions, and does not mean that each component is realized by separate hardware or software. For example, two or more components may be combined to form a single component, or a single component may be divided into multiple components. Embodiments in which each component is integrated and / or separated are also included within the scope of this document as long as they do not deviate from the essence of this document.
[0024] In this document, "A or B" may mean "only A," "only B," or "both A and B." In other words, in this document, "A or B" may be interpreted as "A and / or B." For example, in this document, "A, B or C" may mean "only A," "only B," "only C," or "any combination of A, B and C."
[0025] A slash ( / ) or a comma (comma) used in this document can mean "and / or." For example, "A / B" can mean "A and / or B." This means that "A / B" can mean "only A," "only B," or "both A and B." For example, "A, B, C" can mean "A, B, or C."
[0026] In this document, "at least one of A and B" can mean "only A," "only B," or "both A and B." Also, in this document, the expressions "at least one of A or B" and "at least one of A and / or B" can be interpreted in the same way as "at least one of A and B."
[0027] Also, in this document, "at least one of A, B and C" can mean "only A," "only B," "only C," or "any combination of A, B and C." Furthermore, "at least one of A, B or C" or "at least one of A, B and / or C" can mean "at least one of A, B and C."
[0028] Furthermore, parentheses used in this document may mean "for example." Specifically, when "prediction (intra prediction)" is displayed, "intra prediction" may be suggested as an example of "prediction." In other words, "prediction" in this document is not limited to "intra prediction," and "intra prediction" may be suggested as an example of "prediction." Furthermore, when "prediction (i.e., intra prediction)" is displayed, "intra prediction" may be suggested as an example of "prediction."
[0029] Technical features individually described in one drawing in this document may be embodied individually or simultaneously.
[0030] This document relates to video / image coding. For example, the methods / embodiments 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 second generation audio video coding standard (AVS2), or next-generation video / image coding standards (e.g., H.267 or H.268).
[0031] This document presents various embodiments relating to video / image coding, which may be implemented in combination with one another unless otherwise specified.
[0032] In this document, video may refer to a collection of a series of images over time. A picture generally refers to a unit that shows one image at a specific time period, and a slice / tile is a unit that constitutes part of a picture in coding. A slice / tile may include one or more coding tree units (CTUs). A picture may be composed of one or more slices / tiles. A picture may be composed of one or more tile groups. A tile group may include one or more tiles. A brick may represent a rectangular region of CTU rows within a tile in a picture. A tile may be partitioned into multiple bricks, each consisting of one or more CTU rows within the tile. A tile that is not partitioned into multiple bricks may also be referred to as a brick.A brick scan may indicate a specific sequential ordering of CTUs partitioning a picture, where the CTUs may be aligned in a CTU raster scan within a brick, bricks within a tile may be aligned consecutively in a raster scan of the bricks in the tile, and tiles within a picture may be aligned consecutively in a raster scan of the tiles in the picture. A tile is a rectangular region of CTUs within a particular tile column and a particular tile row in a picture. The tile column is a rectangular region of CTUs having a height equal to the height of the picture and a width specified by syntax elements in the picture parameter set.The tile row is a rectangular region of CTUs having a height specified by syntax elements in the picture parameter set and a width equal to the height of the picture. A tile scan may indicate a specific sequential ordering of CTUs partitioning a picture, where the CTUs may be consecutively aligned with a CTU raster scan in a tile, and tiles in a picture may be consecutively aligned with a raster scan of the tiles of the picture. A slice includes an integer number of bricks of a picture that may be exclusively contained in a single NAL unit. A slice may consist of either a number of complete tiles or only a consecutive sequence of complete bricks of one tile.In this document, the terms tile group and slice are sometimes used interchangeably. For example, in this document, a tile group / tile group header may be called a slice / slice header.
[0033] A pixel or a pel may refer to the smallest unit constituting one picture (or video). A "sample" may also be used as a term corresponding to a pixel. A sample may generally refer to a pixel or a pixel value, or may refer to only a pixel / pixel value of a luma component, or may refer to only a pixel / pixel value of a chroma component. Alternatively, a sample may refer to a pixel value in the spatial domain, or may refer to a transform coefficient in the frequency domain when such a pixel value is transformed into the frequency domain.
[0034] A unit may refer to a basic unit of image processing. A unit may include at least one of a specific region of a picture and information related to the region. One unit may include one luma block and two chroma (e.g., cb, cr) blocks. The term unit may be used interchangeably with terms such as block or area, depending on the situation. In a general case, an M×N block may include a set (or array) of samples or transform coefficients consisting of M columns and N rows.
[0035] Hereinafter, preferred embodiments of the present invention will be described in more detail with reference to the accompanying drawings. Hereinafter, the same reference numerals will be used to refer to the same components in the drawings, and duplicated descriptions of the same components may be omitted.
[0036] FIG. 1 illustrates schematically an example of a video / image coding system to which embodiments of this document can be applied.
[0037] 1, a video / image coding system may include a first device (source device) and a second device (receiving device). The source device may transmit encoded video / image information or data to the receiving device via a digital storage medium or a network in the form of a file or streaming.
[0038] The source device may include a video source, an encoding device, and a transmitting unit. The receiving device may include a receiving unit, a decoding device, and a renderer. The encoding device may be referred to as a video / video encoding device, and the decoding device may be referred to as a video / video decoding device. The transmitter may be included in the encoding device. The receiver may be included in the decoding device. The renderer may include a display unit, which may be a separate device or an external component.
[0039] A video source can acquire video / images through a video / image capture, synthesis, or generation process. A video source can include a video / image capture device and / or a video / image generation device. A video / image capture device can include, for example, one or more cameras, a video / image archive containing previously captured video / images, etc. A video / image generation device can include, for example, a computer, a tablet, a smartphone, etc., and can (electronically) generate video / images. For example, a virtual video / image can be generated via a computer, etc., in which case the video / image capture process can be replaced by a process in which related data is generated.
[0040] An encoding device can encode input video / images. The encoding device can perform a series of steps such as prediction, transformation, and quantization for compression and coding efficiency. The encoded data (encoded video / image information) can be output in the form of a bitstream.
[0041] The transmitter may transmit the encoded video / image information or data output in the form of a bitstream to a receiver of a receiving device via a digital storage medium or a network in the form of a file or streaming. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitter may include elements for generating a media file in a predetermined file format and elements for transmission via a broadcasting / communication network. The receiver may receive / extract the bitstream and transmit it to a decoding device.
[0042] The decoding device can decode the video / image by performing a series of steps such as inverse quantization, inverse transform, and prediction, which correspond to the operations of the encoding device.
[0043] The renderer can render the decoded video / image, and the rendered video / image can be displayed via a display unit.
[0044] 2 is a diagram for schematically illustrating the configuration of a video / image encoding device that can be applied to an embodiment of this document. Hereinafter, the term "video encoding device" may include a video encoding device.
[0045] Referring to FIG. 2, the encoding apparatus 200 may include an image partitioner 210, a predictor 220, a residual processor 230, an entropy encoder 240, an adder 250, a filter 260, and a memory 270. The predictor 220 may include an inter predictor 221 and an intra predictor 222. The residual processor 230 may include a transformer 232, a quantizer 233, a dequantizer 234, and an inverse transformer 235. The residual processor 230 may further include a subtractor 231. The adder 250 may be referred to as a reconstructor or a reconstructed block generator. The image dividing unit 210, the predicting unit 220, the residual processing unit 230, the entropy encoding unit 240, the adding unit 250, and the filtering unit 260 may be configured by one or more hardware components (e.g., an encoder chipset or a processor) depending on the embodiment. Also, the memory 270 may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware components may further include the memory 270 as an internal / external component.
[0046] The image division unit 210 may divide an input image (or picture or frame) input to the encoding device 200 into one or more processing units. For example, the processing units may be called coding units (CUs). In this case, the coding units may be recursively divided from a coding tree unit (CTU) or a largest coding unit (LCU) according to a quad-tree, binary-tree, ternary-tree (QTBTTT) structure. For example, one coding unit may be divided into multiple coding units of deeper depths based on a quad-tree structure, a binary tree structure, and / or a ternary structure. In this case, for example, the quad-tree structure may be applied first, and then the binary tree structure and / or the ternary structure may be applied. Alternatively, the binary tree structure may be applied first. The coding procedure described herein may be performed based on the final coding unit that is not further divided. In this case, the largest coding unit may be immediately used as the final coding unit based on coding efficiency according to image characteristics, or the coding unit may be recursively divided into coding units of lower depths as needed, and the coding unit of the optimal size may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and restoration, which will be described later. As another example, the processing unit may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may each be divided or partitioned from the final coding unit.The prediction unit may be a unit of sample prediction, and the transform unit may be a unit for deriving transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.
[0047] The term "unit" can be used interchangeably with terms such as "block" or "area" depending on the situation. In a general case, an MxN block can refer to a set of samples or transform coefficients consisting of M columns and N rows. A sample can generally refer to a pixel or pixel value, or can refer to only a pixel / pixel value of a luma component, or only a pixel / pixel value of a chroma component. A sample can be used as a term corresponding to one pixel or pel of a picture (or image).
[0048] The encoding apparatus 200 may subtract a prediction signal (predicted block, prediction sample array) output from the inter prediction unit 221 or the intra prediction unit 222 from an input video signal (original block, original sample array) to generate a residual signal (residual block, residual sample array), and the generated residual signal is transmitted to the conversion unit 232. In this case, as shown, a unit in the encoding apparatus 200 that subtracts a prediction signal (predicted block, prediction sample array) from an input video signal (original block, original sample array) may be referred to as a subtraction unit 231. The prediction unit may perform prediction on a current block (hereinafter, referred to as a current block) and generate a predicted block including prediction samples for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied on a current block or CU basis. The prediction unit may generate various information related to prediction, such as prediction mode information, and transmit the information to the entropy encoding unit 240, as will be described later in the description of each prediction mode. The prediction information can be encoded by the entropy encoding unit 240 and output in the form of a bitstream.
[0049] The intra prediction unit 222 may predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located far away, depending on the prediction mode. Prediction modes in intra prediction may include a plurality of non-directional modes and a plurality of directional modes. The non-directional modes may include, for example, DC mode and planar mode. The directional modes may include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the granularity of the prediction direction. However, this is merely an example, and more or less directional prediction modes may be used depending on the settings. The intra prediction unit 222 may also determine the prediction mode to be applied to the current block using the prediction modes applied to neighboring blocks.
[0050] The inter prediction unit 221 may derive a predicted block for a current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. To reduce the amount of motion information transmitted in inter 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 further include information on the inter prediction direction (such as L0 prediction, L1 prediction, or Bi prediction). In the case of inter 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 called a collocated reference block, a collocated CU (col CU), or the like, and the reference picture including the temporal neighboring block may be called a collocated picture (colPic). For example, the inter predictor 221 may construct a motion information candidate list based on neighboring blocks and generate information indicating which candidate is used to derive a motion vector and / or a reference picture index for the current block. Inter prediction may be performed based on various prediction modes. For example, in the case of skip mode and merge mode, the inter predictor 221 may use motion information of neighboring blocks as motion information for the current block. In the case of skip mode, unlike merge mode, a residual signal may not be transmitted.In the case of motion vector prediction (MVP) mode, the motion vector of the current block can be indicated by using the motion vector of a neighboring block as a motion vector predictor and signaling the motion vector difference.
[0051] The predictor 220 may generate a prediction signal based on various prediction methods, which will be described later. For example, the predictor may apply not only intra prediction or inter prediction for predicting a block, but also simultaneous intra prediction and inter prediction. This may be referred to as combined inter and intra prediction (CIIP). The predictor may also use intra block copy (IBC) prediction mode or palette mode for predicting a block. The IBC prediction mode or palette mode may be used for coding content images / videos, such as games, such as screen content coding (SCC). IBC basically performs prediction within a current picture, but may be performed similarly to inter prediction in deriving a reference block within the current picture. That is, IBC may use at least one of the inter prediction techniques described herein. Palette mode may be considered an example of intra coding or intra prediction. When palette mode is applied, sample values within a picture may be signaled based on information about a palette table and a palette index.
[0052] The prediction signal generated by the prediction unit (including the inter prediction unit 221 and / or the intra prediction unit 222) may be used to generate a reconstructed signal or a residual signal. The transform unit 232 may generate transform coefficients 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-Loeve transform (KLT), a graph-based transform (GBT), or a conditionally non-linear transform (CNT). Here, GBT refers to a transform obtained from a graph representing relationship information between pixels. CNT refers to a transform obtained based on a prediction signal generated using all previously reconstructed pixels. The transform process may be applied to pixel blocks having the same square size or to non-square blocks of variable sizes.
[0053] The quantization unit 233 quantizes the transform coefficients and transmits the quantized signal to the entropy encoding unit 240. The entropy encoding unit 240 encodes the quantized signal (information about the quantized transform coefficients) and outputs the encoded signal as a bitstream. The information about the quantized transform coefficients may be referred to as residual information. The quantization unit 233 may rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on a coefficient scan order, and may generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. The entropy encoding unit 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 encoding unit 240 may encode information required for video / image reconstruction (e.g., values of syntax elements, etc.) together with or separately from the quantized transform coefficients. The encoded information (e.g., encoded video / video information) may be transmitted or stored in the form of a bitstream in network abstraction layer (NAL) units. The video / video information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). The video / video information may also include general constraint information. In this document, information and / or syntax elements transmitted / signaled from an encoding device to a decoding device may be included in the video / video information. The video / video information may be encoded through the encoding procedure described above and included in the bitstream.The bitstream may be transmitted via a network or stored in a digital storage medium. Here, the network may include a broadcasting network and / or a communication network, and the digital storage medium may include various storage media such as a USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) for transmitting the signal output from the entropy encoding unit 240 and / or a storage unit (not shown) for storing the signal may be configured as an internal / external element of the encoding apparatus 200, or the transmitter may be included in the entropy encoding unit 240.
[0054] The quantized transform coefficients output from the quantization unit 233 may be used to generate a prediction signal. For example, a residual signal (residual block or residual sample) may be reconstructed by applying inverse quantization and inverse transform to the quantized transform coefficients via the inverse quantization unit 234 and the inverse transform unit 235. The adder 250 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed residual signal to the prediction signal output from the inter prediction unit 221 or the intra prediction unit 222. When there is no residual for the current block, such as when skip mode is applied, the predicted block may be used as the reconstructed block. The adder 250 may be referred to as a reconstruction unit 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, or may be used for inter prediction of the next picture after filtering, as described below.
[0055] Meanwhile, luma mapping with chroma scaling (LMCS) can be applied during picture encoding and / or reconstruction.
[0056] The filtering unit 260 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 260 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture and store the modified reconstructed picture in the memory 270, specifically, in the DPB of the memory 270. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc. The filtering unit 260 may generate various information related to filtering and transmit it to the entropy encoding unit 240, as will be described later in the description of each filtering method. The filtering information may be encoded by the entropy encoding unit 240 and output in the form of a bitstream.
[0057] The modified reconstructed picture transmitted to the memory 270 can be used as a reference picture in the inter prediction unit 221. When inter prediction is applied through this, the encoding apparatus can avoid a mismatch in prediction between the encoding apparatus 200 and the decoding apparatus, and can also improve coding efficiency.
[0058] The DPB of the memory 270 may store the modified reconstructed picture to be used as a reference picture in the inter predictor 221. The memory 270 may store motion information of a block from which motion information in the current picture is derived (or encoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter predictor 221 to be used as motion information of a spatially neighboring block or a temporally neighboring block. The memory 270 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra predictor 222.
[0059] FIG. 3 is a diagram illustrating the configuration of a video / image decoding device that can be applied to the embodiments of this document.
[0060] Referring to FIG. 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 predictor 331 and an intra predictor 332. The residual processor 320 may include a dequantizer 321 and an inverse transformer 321. Depending on the embodiment, the entropy decoding unit 310, the residual processor 320, the predictor 330, the adder 340, and the filter 350 may be configured as a single hardware component (e.g., a decoder chipset or processor). In addition, the memory 360 may include a decoded picture buffer (DPB) and may be configured as a digital storage medium. The hardware components may further include a memory 360 as an internal / external component.
[0061] When a bitstream including video / image information is input, the decoding apparatus 300 can reconstruct an image corresponding to the process by which the video / image information was processed by the encoding apparatus of FIG. 2. For example, the decoding apparatus 300 can derive units / blocks based on information about block division obtained from the bitstream. The decoding apparatus 300 can perform decoding using a processing unit applied by the encoding apparatus. Therefore, the processing unit for decoding may be, for example, a coding unit, and the coding unit may be divided from a coding tree unit or a maximal coding unit into a quad tree structure, a binary tree structure, and / or a ternary tree structure. One or more transform units may be derived from the coding unit. The reconstructed image signal decoded and output by the decoding apparatus 300 can be played back via a playback device.
[0062] The decoding apparatus 300 may receive a signal output from the encoding apparatus of FIG. 2 in the form of a bitstream, and the received signal may be decoded via the entropy decoding unit 310. For example, the entropy decoding unit 310 may parse the bitstream to derive information (e.g., video / video information) necessary for video restoration (or picture restoration). The video / video information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). The video / video information may also include general constraint information. The decoding apparatus may further decode pictures based on the information on the parameter sets and / or the general constraint information. Signaling / received information and / or syntax elements, which will be described later in this document, may be decoded via the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit 310 may decode information in a bitstream based on a coding method such as Exponential-Golomb coding, CAVLC, or CABAC, and output values of syntax elements required for image restoration and quantized values of transform coefficients related to residuals. More specifically, the CABAC entropy decoding method receives bins corresponding to each syntax element in the bitstream, determines a context model using information on the syntax element to be decoded, decoding information on neighboring and current blocks, or information on symbols / bins decoded in previous steps, predicts the occurrence probability of the bins based on the determined context model, and performs arithmetic decoding of the bins to generate symbols corresponding to the values of each syntax element.In this case, after determining a context model, the CABAC entropy decoding method may update the context model using information on the decoded symbol / bin for the context model of the next symbol / bin. Prediction-related information from the information decoded by the entropy decoding unit 310 may be provided to a prediction unit (inter prediction unit 332 and intra prediction unit 331), and residual values entropy-decoded by the entropy decoding unit 310, i.e., quantized transform coefficients and related parameter information, may be input to the residual processing unit 320. The residual processing unit 320 may derive a residual signal (residual block, residual sample, residual sample array). Furthermore, filtering-related information from the information decoded by the entropy decoding unit 310 may be provided to the filtering unit 350. Meanwhile, a receiving unit (not shown) that receives a signal output from the encoding apparatus may be further configured as an internal / external element of the decoding apparatus 300, or the receiving unit may be a component of the entropy decoding unit 310. Meanwhile, the decoding device according to this document may be referred to as a video / image / picture decoding device, and the decoding device may be divided into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include the entropy decoding unit 310, and the sample decoder may include at least one of the inverse quantization unit 321, the inverse transform unit 322, the addition unit 340, the filtering unit 350, the memory 360, the inter prediction unit 332, and the intra prediction unit 331.
[0063] The inverse quantization unit 321 may inverse quantize the quantized transform coefficients and output transform coefficients. The inverse quantization unit 321 may rearrange the quantized transform coefficients in a two-dimensional block format. In this case, the rearrangement may be performed based on the coefficient scanning order performed in the encoding apparatus. The inverse quantization unit 321 may perform inverse quantization on the quantized transform coefficients using a quantization parameter (e.g., quantization step size information) to obtain transform coefficients.
[0064] The inverse transform unit 322 performs an inverse transform on the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0065] The prediction unit may perform prediction on a current block and generate a predicted block including prediction samples for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied to the current block based on the prediction information output from the entropy decoding unit 310, and may determine a specific intra / inter prediction mode.
[0066] The predictor 320 may generate a prediction signal based on various prediction methods, which will be described later. For example, the predictor may apply intra prediction or inter prediction for predicting a block, or may simultaneously apply intra prediction and inter prediction. This may be referred to as combined inter and intra prediction (CIIP). The predictor may also use intra block copy (IBC) prediction mode or palette mode for predicting a block. The IBC prediction mode or palette mode may be used for content video / movie coding, such as games, such as screen content coding (SCC). IBC basically performs prediction within a current picture, but may be performed similarly to inter prediction in deriving a reference block within the current picture. That is, IBC may use at least one of the inter prediction techniques described in this document. The palette mode may be considered an example of intra coding or intra prediction. When the palette mode is applied, information regarding a palette table and a palette index may be included in the video / picture information and signaled.
[0067] The intra prediction unit 331 may predict a current block by referring to samples in a current picture. The referenced samples may be located in the neighborhood of the current block or may be located far away from the current block depending on the prediction mode. Prediction modes in intra prediction may include a plurality of non-directional modes and a plurality of directional modes. The intra prediction unit 331 may also determine a prediction mode to be applied to the current block using prediction modes applied to neighboring blocks.
[0068] The inter prediction unit 332 may derive a predicted block for the current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. To reduce the amount of motion information transmitted in inter 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 further include information on the inter prediction direction (e.g., L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring blocks may include spatial neighboring blocks in the current picture and temporal neighboring blocks in the reference picture. For example, the inter prediction unit 332 may construct a motion information candidate list based on the neighboring blocks and derive a motion vector and / or a reference picture index for the current block based on received candidate selection information. Inter prediction may be performed based on various prediction modes, and the prediction information may include information indicating the inter prediction mode for the current block.
[0069] The adder 340 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the obtained residual signal to a prediction signal (predicted block, predicted sample array) output from a prediction unit (including the inter prediction unit 332 and / or the intra prediction unit 331). When there is no residual for the current block, such as when a skip mode is applied, the predicted block may be used as the reconstructed block.
[0070] The adder 340 may be referred to as a reconstruction unit or a reconstruction block generator. The generated reconstruction signal may be used for intra prediction of a next block to be processed in the current picture, may be output after filtering as described below, or may be used for inter prediction of a next picture.
[0071] Meanwhile, LMCS (luma mapping with chroma scaling) can be applied during picture decoding.
[0072] The filtering unit 350 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 350 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may transmit the modified reconstructed picture to the memory 360, specifically, to the DPB of the memory 360. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc.
[0073] The (modified) reconstructed picture stored in the DPB of the memory 360 can be used as a reference picture in the inter predictor 332. The memory 360 can store motion information of a block from which motion information in the current picture is derived (or decoded) and / or motion information of a block in an already reconstructed picture. The stored motion information can be transmitted to the inter predictor 332 to be used as motion information of a spatially neighboring block or a temporally neighboring block. The memory 360 can store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra predictor 331.
[0074] In this document, the embodiments described for the filtering unit 260, inter prediction unit 221, and intra prediction unit 222 of the encoding device 200 can also be applied identically or correspondingly to the filtering unit 250, inter prediction unit 332, and intra prediction unit 331 of the decoding device 300, respectively.
[0075] As described above, prediction is performed to improve compression efficiency when performing video coding. Through this, a predicted block including predicted samples for a current block, which is a block to be coded, can be generated. Here, the predicted block includes predicted samples in the spatial domain (or pixel domain). The predicted block is derived in the same way by an encoding device and a decoding device. The encoding device can improve video coding efficiency by signaling to the decoding device information regarding the residual between the original block and the predicted block (residual information) rather than the original sample values of the original block. The decoding device can derive a residual block including residual samples based on the residual information, combine the residual block with the predicted block to generate a reconstructed block including reconstructed samples, and generate a reconstructed picture including the reconstructed block.
[0076] The residual information may be generated through a transform and quantization procedure. For example, an encoding device may derive a residual block between an original block and a predicted block, perform a transform procedure on residual samples (residual sample array) included in the residual block to derive transform coefficients, perform a quantization procedure on the transform coefficients to derive quantized transform coefficients, and signal the related residual information (via a bitstream) to a decoding device. Here, the residual information may include information such as value information, position information, transform technique, transform kernel, and quantization parameter of the quantized transform coefficients. The decoding device may perform an inverse quantization / inverse transform procedure based on the residual information to derive residual samples (or residual blocks). The decoding device may generate a reconstructed picture based on the predicted block and the residual block. The encoding device may also derive a residual block by inverse quantizing / inverse transforming quantized transform coefficients for reference for inter-prediction of a subsequent picture, and generate a reconstructed picture based on the residual block.
[0077] FIG. 4 illustrates an example of a content streaming system to which the embodiments disclosed herein may be applied.
[0078] Referring to FIG. 4, the content streaming system applied to the embodiments of this document can broadly include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.
[0079] The encoding server compresses content input from a multimedia input device such as a smartphone, camera, camcorder, etc. into digital data to generate a bitstream and transmits the bitstream to the streaming server. As another example, if a multimedia input device such as a smartphone, camera, camcorder, etc. directly generates a bitstream, the encoding server may be omitted.
[0080] The bitstream may be generated by an encoding method or a bitstream generation method applied to an embodiment of this document, and the streaming server may temporarily store the bitstream during the process of transmitting or receiving the bitstream.
[0081] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server acts as a medium for informing the user of available services. When a user requests a desired service from the web server, the web server transmits the request to the streaming server, which then transmits the multimedia data to the user. The content streaming system may include a separate control server, which controls commands and responses between devices in the content streaming system.
[0082] The streaming server may receive content from a media storage and / or an encoding server. For example, if content is received from the encoding server, the content may be received in real time. In this case, the streaming server may store the bitstream for a certain period of time to provide a smooth streaming service.
[0083] Examples of the user device include a mobile phone, a smartphone, a laptop computer, a digital broadcasting terminal, a PDA (personal digital assistant), a PMP (portable multimedia player), a navigation system, a slate PC, a tablet PC, an ultrabook, a wearable device (e.g., a smartwatch, a smart glass, a head mounted display (HMD)), a digital TV, a desktop computer, and a digital signage.
[0084] Each server in the content streaming system can be operated as a distributed server, in which case data received by each server can be processed in a distributed manner.
[0085] FIG. 5 illustrates an example of CABAC (context-adaptive binary arithmetic coding) for encoding syntax elements. For example, in the CABAC encoding process, if an input signal is not a binary value but a syntax element, an encoding device can binarize the input signal and convert it into a binary value. Also, if the input signal is already a binary value (i.e., the value of the input signal is a binary value), binarization can be bypassed. Here, each binary digit 0 or 1 constituting a binary value can be referred to as a bin. For example, if the binary string after binarization is 110, 1, 1, and 0 are each referred to as a bin. The bin for a syntax element can indicate the value of the syntax element. Such binarization can be based on various binarization methods, such as a truncated rice binarization process or a fixed-length binarization process, and the binarization method for a target syntax element can be predefined. The binarization procedure can be performed by a binarization unit within an entropy encoding unit.
[0086] Thereafter, the binarized bins of the syntax elements may be input to a regular encoding engine or a bypass encoding engine. The regular encoding engine of the encoding device may assign a context model reflecting a probability value to the corresponding bin and encode the corresponding bin based on the assigned context model. After performing encoding for each bin, the regular encoding engine of the encoding device may update the context model for the corresponding bin. As described above, the bins to be encoded may be referred to as context-coded bins.
[0087] Meanwhile, when the binarized bins of the syntax elements are input to the bypass encoding engine, they can be coded as follows. For example, the bypass encoding engine of the encoding device omits the steps of estimating the probability of the input bins and updating the probability model applied to the bins after encoding. When bypass encoding is applied, the encoding device can encode the input bins by applying a uniform probability distribution instead of assigning a context model, thereby improving the encoding speed. As described above, the bins to be encoded can be referred to as bypass bins.
[0088] Entropy decoding can refer to a process of performing the same process as the entropy encoding in reverse order.
[0089] A decoding device (entropy decoding unit) can decode encoded image / video information. The image / video information can include information on partitioning, information on prediction (e.g., inter / intra prediction classification information, intra prediction mode information, inter prediction mode information, etc.), residual information, information on in-loop filtering, etc., or various syntax elements related thereto. The entropy coding can be performed in units of syntax elements.
[0090] The decoding device may perform binarization on a target syntax element. Here, the binarization may be based on various binarization methods, such as a truncated rice binarization process or a fixed-length binarization process, and the binarization method for the target syntax element may be predefined. The decoding device may derive available bin strings (candidate bin strings) for available values of the target syntax element through the binarization procedure. The binarization procedure may be performed by a binarization unit in an entropy decoding unit.
[0091] The decoding device sequentially decodes and parses each bin for the target syntax element from input bits in the bitstream, and compares the derived bin string with available bin strings for the corresponding syntax element. If the derived bin string is the same as one of the available bin strings, a value corresponding to the bin string is derived as the value of the corresponding syntax element. If not, the next bit in the bitstream is further parsed, and the above procedure is repeated. Through this process, it is possible to signal specific information (specific syntax element) using a variable length of bits in the bitstream without using start or end bits for that information. This allows relatively fewer bits to be allocated to low values, thereby improving overall coding efficiency.
[0092] A decoding device can decode each bin in the bin string from the bitstream based on a context model or by bypassing it based on an entropy coding technique such as CABAC or CAVLC.
[0093] When a syntax element is decoded based on a context model, a decoding device may receive a bin corresponding to the syntax element through a bitstream, determine a context model using the syntax element and decoding information of a block to be decoded or a neighboring block, or information on a symbol / bin decoded in a previous step, and predict the occurrence probability of the received bin based on the determined context model, perform arithmetic decoding of the bin, and derive the value of the syntax element. Thereafter, the context model of a bin to be decoded next may be updated using the determined context model.
[0094] A context model may be assigned and updated for each context-coded (regularly coded) bin, and the context model may be indicated based on ctxIdx or ctxInc. ctxIdx may be derived based on ctxInc. Specifically, for example, a context index (ctxIdx) indicating a context model for each of the normally coded bins may be derived as the sum of a context index increment (ctxInc) and a context index offset (ctxIdxOffset). Here, the ctxInc may be derived differently for each bin. The ctxIdxOffset may be represented by the lowest value of the ctxIdx. The ctxIdxOffset is a value generally used for distinguishing between context models for other syntax elements, and a context model for one syntax element may be distinguished / derived based on ctxInc.
[0095] The entropy encoding procedure can determine whether to perform encoding via a regular coding engine or a bypass coding engine, and switch between coding paths. Entropy decoding performs the same process as entropy encoding in reverse order.
[0096] Meanwhile, for example, when a syntax element is bypass-decoded, a decoding device may receive bins corresponding to the syntax element through a bitstream and decode the input bins by applying a uniform probability distribution. In this case, the decoding device may omit the steps of deriving a context model for the syntax element and updating the context model applied to the bins after decoding.
[0097] As described above, residual samples may be derived as quantized transform coefficients through a transform and quantization process. Quantized transform coefficients may also be referred to as transform coefficients. In this case, transform coefficients within a block may be signaled in the form of residual information. The residual information may include a residual coding syntax. That is, an encoding device may construct a residual coding syntax using the residual information, encode the syntax, and output it in the form of a bitstream. A decoding device may decode the residual coding syntax from the bitstream to derive residual (quantized) transform coefficients. The residual coding syntax may include syntax elements indicating whether a transform has been applied to the corresponding block, the position of the last significant transform coefficient within the block, whether significant transform coefficients exist within a sub-block, the magnitude / sign of the significant transform coefficients, etc., as will be described later.
[0098] On the other hand, when intra prediction is performed, correlation between samples can be used to obtain the difference between the original block and the predicted block, i.e., a residual. The above-mentioned transform and quantization can be applied to the residual, thereby removing spatial redundancy. An encoding method and a decoding method using intra prediction will be described in detail below.
[0099] Intra prediction refers to a prediction that generates a prediction sample for a current block based on reference samples outside the current block in a picture including the current block (hereinafter referred to as the current picture). Here, the reference samples outside the current block refer to samples located in the vicinity of the current block. When intra prediction is applied to the current block, neighboring reference samples to be used for intra prediction of the current block can be derived.
[0100] For example, if the size (width x height) of the current block is nW x nH, the neighboring reference samples of the current block may include a total of 2 x nH samples adjacent to the left boundary and bottom-left of the current block, a total of 2 x nW samples adjacent to the top boundary and top-right of the current block, and one sample adjacent to the top-left of the current block. Alternatively, the neighboring reference samples of the current block may include multiple columns of top neighboring samples and multiple rows of left neighboring samples. Furthermore, the neighboring reference samples of the current block may include a total of nH samples adjacent to the right boundary of the current block, a total of nW samples adjacent to the bottom boundary of the current block, and one sample adjacent to the bottom-right of the current block.
[0101] However, some of the neighboring reference samples of the current block may not yet be decoded or may not be available. In this case, the decoding apparatus may substitute unavailable samples with available samples to construct neighboring reference samples to be used for prediction. Alternatively, the decoding apparatus may construct neighboring reference samples to be used for prediction through interpolation of available samples.
[0102] When neighboring reference samples are derived, (i) a predicted sample may be derived based on an average or interpolation of the neighboring reference samples of the current block, or (ii) a predicted sample may be derived based on a reference sample that exists in a specific (prediction) direction with respect to the predicted sample among the neighboring reference samples of the current block. In the case of (i), this may be applied when the intra prediction mode is a non-directional mode or a non-angular mode, and in the case of (ii), this may be applied when the intra prediction mode is a directional mode or an angular mode.
[0103] In addition, a prediction sample may be generated by interpolating a first neighboring sample located in the prediction direction of the intra prediction mode of the current block and a second neighboring sample located in the opposite direction to the prediction direction based on the prediction sample of the current block among the neighboring reference samples. This case may be called linear interpolation intra prediction (LIP). Chroma prediction samples may also be generated based on luma samples using a linear model. This case may be called LM mode.
[0104] Alternatively, a tentative predicted sample of the current block may be derived based on the filtered neighboring reference samples, and the predicted sample of the current block may be derived by weighted summing the tentative predicted sample and at least one reference sample derived according to an intra prediction mode among existing neighboring reference samples, i.e., unfiltered neighboring reference samples. This case may be referred to as Position Dependent Intra Prediction (PDPC).
[0105] In addition, intra-prediction encoding may be performed by selecting a reference sample line with the highest prediction accuracy from among multiple reference sample lines surrounding the current block, deriving a prediction sample using a reference sample located in a prediction direction on the corresponding line, and signaling the used reference sample line to a decoding device. This case may be called multi-reference line (MRL) intra prediction or MRL-based intra prediction.
[0106] Alternatively, the current block may be divided into vertical or horizontal sub-partitions, and intra prediction may be performed based on the same intra prediction mode, with neighboring reference samples being derived and used for each sub-partition. That is, in this case, the intra prediction mode for the current block is applied to the sub-partitions in the same way, and neighboring reference samples are derived and used for each sub-partition, thereby improving the performance of intra prediction as needed. This prediction method may be called intra sub-partitions (ISP) or ISP-based intra prediction.
[0107] The above-described intra prediction methods may be distinguished from intra prediction modes and referred to as intra prediction types. The intra prediction types may be referred to by various terms, such as intra prediction techniques or additional intra prediction modes. For example, the intra prediction types (or additional intra prediction modes, etc.) may include at least one of the above-described LIP, PDPC, MRL, and ISP. A general intra prediction method other than the specific intra prediction types, such as LIP, PDPC, MRL, and ISP, may be referred to as a normal intra prediction type. The normal intra prediction type may be generally applied when the above-described specific intra prediction types are not applied, and prediction may be performed based on the above-described intra prediction modes. Meanwhile, post-processing filtering may be performed on the derived prediction samples, if necessary.
[0108] Meanwhile, in addition to the above-mentioned intra prediction types, matrix-based intra prediction (hereinafter referred to as MIP) can be used as another method of intra prediction. MIP may also be referred to as affine linear weighted intra prediction (ALWIP) or matrix weighted intra prediction (MWIP).
[0109] When MIP is applied to a current block, a prediction sample for the current block may be derived by: i) using neighboring reference samples that have been subjected to an averaging procedure, ii) performing a matrix-vector multiplication procedure, and iii) further performing horizontal / vertical interpolation procedures as necessary. The intra prediction mode used for MIP may be configured differently from the intra prediction mode used in the above-described LIP, PDPC, MRL, and ISP intra prediction, or normal intra prediction.
[0110] The intra prediction mode for MIP may be referred to as an "affine linear weighted intra prediction mode" or a matrix-based intra prediction mode. For example, the matrix and offset used in matrix-vector multiplication may be set differently depending on the intra prediction mode for MIP. 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 prediction mode for MIP may be referred to as an MIP intra prediction mode, a linear weighted intra prediction mode, a matrix weighted intra prediction mode, or a matrix-based intra prediction mode. Specific MIP methods will be described later.
[0111] The following drawings are created to illustrate a specific example of the present document. The names of specific devices and specific terms and names (e.g., syntax names, etc.) shown in the drawings are provided for illustrative purposes only, and the technical features of the present document are not limited to the specific names used in the following drawings.
[0112] FIG. 6 illustrates an example of a general intra-prediction based video encoding method to which embodiments of this document can be applied.
[0113] Referring to FIG. 6, S600 may be performed by the intra prediction unit 222 of the encoding apparatus, and S610 may be performed by the residual processing unit 230 of the encoding apparatus. Specifically, S610 may be performed by the subtraction unit 231 of the encoding apparatus. In S620, prediction information may be derived by the intra prediction unit 222 and encoded by the entropy encoding unit 240. In S620, residual information may be derived by the residual processing unit 230 and encoded by the entropy encoding unit 240. The residual information is information about residual samples. The residual information may include information about quantized transform coefficients for the residual samples. As described above, the residual samples may be derived as transform coefficients through the transform unit 232 of the encoding apparatus, and the transform coefficients may be derived as quantized transform coefficients through the quantization unit 233. Information about the quantized transform coefficients may be encoded by the entropy encoding unit 240 through a residual coding procedure.
[0114] The encoding apparatus performs intra prediction on a current block (S600). The encoding apparatus may derive an intra prediction mode / type for the current block, derive neighboring reference samples for the current block, and generate predicted samples within the current block based on the intra prediction mode / type and the neighboring reference samples. Here, the procedures of determining the intra prediction mode / type, deriving the neighboring reference samples, and generating predicted samples may be performed simultaneously, or one procedure may be performed before the other.
[0115] Meanwhile, although not shown, if a filtering procedure of the prediction samples is performed, the intra prediction unit 222 may further include a prediction sample filter unit (not shown). The encoding apparatus may determine a mode / type to be applied to the current block from among a plurality of intra prediction modes / types. The encoding apparatus may compare RD costs for the intra prediction modes / types to determine the optimal intra prediction mode / type for the current block.
[0116] As described above, the encoding apparatus may also perform a filtering procedure on the prediction samples. The filtering of the prediction samples may be called post-filtering. The filtering procedure on the prediction samples may filter some or all of the prediction samples. In some cases, the filtering procedure on the prediction samples may be omitted.
[0117] The encoding apparatus generates residual samples for the current block based on the (filtered) predicted samples (S610). The encoding apparatus can derive residual samples by comparing the predicted samples with a phase base based on the original samples of the current block.
[0118] The encoding apparatus may encode video information including information related to intra prediction (prediction information) and residual information related to residual samples (S620). The prediction information may include intra prediction mode information and intra prediction type information. The residual information may include a syntax for residual coding. The encoding apparatus may transform / quantize the residual samples to derive quantized transform coefficients. The residual information may include information on the quantized transform coefficients.
[0119] The encoding device can output the encoded video information in the form of a bitstream, which can be transmitted to a decoding device via a storage medium or a network.
[0120] As described above, the encoding apparatus can generate a reconstructed picture (including reconstructed samples and reconstructed blocks). To this end, the encoding apparatus can derive (modified) residual samples by again inverse quantizing / inverse transforming the quantized transform coefficients. The reason for again performing inverse quantization / inverse transform on the residual samples after transforming / quantizing them is to derive residual samples identical to those derived by the decoding apparatus, as described above. The encoding apparatus can generate a reconstructed block including reconstructed samples for the current block based on the predicted samples and the (modified) residual samples. A reconstructed picture for the current picture can be generated based on the reconstructed block. As described above, an in-loop filtering procedure, etc., can be further applied to the reconstructed picture.
[0121] FIG. 7 illustrates an example of a general intra-prediction based video decoding method to which embodiments of this document can be applied.
[0122] Referring to FIG. 7, the decoding apparatus may perform operations corresponding to those performed by the encoding apparatus described above. Steps S700 to S720 may be performed by the intra prediction unit 331 of the decoding apparatus, and the prediction information of S700 and the residual information of S730 may be obtained from a bitstream by the entropy decoding unit 310 of the decoding apparatus. The residual processing unit 320 of the decoding apparatus may derive residual samples for a current block based on the residual information. Specifically, the inverse quantization unit 321 of the residual processing unit 320 may derive transform coefficients by performing inverse quantization on quantized transform coefficients derived based on the residual information, and the inverse transform unit 322 of the residual processing unit may perform inverse transform on the transform coefficients to derive residual samples for the current block. Step S740 may be performed by the adder 340 or a reconstruction unit of the decoding apparatus.
[0123] The decoding apparatus may derive an intra-prediction mode / type for a current block based on received prediction information (intra-prediction mode / type information) (S700). The decoding apparatus may derive neighboring reference samples for the current block (S710). The decoding apparatus generates prediction samples within the current block based on the intra-prediction mode / type and the neighboring reference samples (S720). In this case, the decoding apparatus may perform a filtering procedure on the prediction samples. The filtering of the prediction samples may be referred to as post-filtering. The filtering procedure on the prediction samples may filter some or all of the prediction samples. Depending on the circumstances, the filtering procedure on the prediction samples may be omitted.
[0124] The decoding apparatus generates residual samples for the current block based on the received residual information (S730). The decoding apparatus generates reconstructed samples for the current block based on the predicted samples and the residual samples, and can derive a reconstructed block including the reconstructed samples (S740). A reconstructed picture for the current picture can be generated based on the reconstructed block. As described above, an in-loop filtering procedure can be further applied to the reconstructed picture.
[0125] Meanwhile, although not shown, if the above-described prediction sample filtering procedure is performed, the intra prediction unit 331 may further include a prediction sample filter unit (not shown).
[0126] Meanwhile, intra prediction modes can include non-directional (or non-angular) intra prediction modes and directional (or angular) intra prediction modes. For example, the HEVC standard uses intra prediction modes including two non-directional prediction modes and 33 directional prediction modes. The non-directional prediction modes can include a planar intra prediction mode numbered 0 and a DC intra prediction mode numbered 1, and the directional prediction modes can include intra prediction modes numbered 2 to 34. The planar intra prediction mode can be referred to as a planar mode, and the DC intra prediction mode can be referred to as a DC mode.
[0127] Alternatively, to capture any edge direction present in natural video, the directional intra prediction modes may be expanded from the existing 33 to 65, as shown in FIG. 10 (described below). In this case, the intra prediction modes may include two non-directional intra prediction modes and 65 directional intra prediction modes. The non-directional intra prediction modes may include planar intra prediction mode (0) and DC intra prediction mode (1), and the directional intra prediction modes may include intra prediction modes (2) to (66). The expanded directional intra prediction modes may be applied to blocks of all sizes and to both luma and chroma components. However, this is merely an example, and the embodiments of this document may also be applied to cases where the number of intra prediction modes is different. Depending on the circumstances, intra prediction mode (67) may also be used, and intra prediction mode (67) may indicate a linear model (LM) mode.
[0128] FIG. 8 shows an example of an intra prediction mode to which the embodiments of this document can be applied.
[0129] Referring to FIG. 8, intra prediction modes can be divided into those with horizontal directionality and those with vertical directionality, centered on intra prediction mode No. 34, which has a prediction direction of the upper left diagonal. In FIG. 10, H and V represent horizontal and vertical directionality, respectively, and the numbers -32 to 32 indicate displacements in 1 / 32 units on the sample grid position. Intra prediction modes No. 2 to No. 33 have horizontal directionality, while intra prediction modes No. 34 to No. 66 have vertical directionality. Intra prediction modes No. 18 and No. 50 represent horizontal and vertical intra prediction modes, respectively. Intra prediction mode No. 2 may be referred to as the lower left diagonal intra prediction mode, intra prediction mode No. 34 as the upper left diagonal intra prediction mode, and intra prediction mode No. 66 as the upper right diagonal intra prediction mode.
[0130] The intra prediction mode information may include, for example, flag information (e.g., intra_luma_mpm_flag) indicating whether a most probable mode (MPM) or a remaining mode is applied to the current block. If an MPM is applied to the current block, the prediction mode information may further include index information (e.g., intra_luma_mpm_idx) indicating one of the intra prediction mode candidates (MPM candidates). The intra prediction mode candidates (MPM candidates) may be configured as an MPM candidate list or an MPM list. If an MPM is not applied to the current block, the intra prediction mode information may further include remaining mode information (e.g., intra_luma_mpm_remainder) indicating one of the remaining intra prediction modes excluding the intra prediction mode candidates (MPM candidates). A decoding apparatus may determine the intra prediction mode of the current block based on the intra prediction mode information.
[0131] Furthermore, the intra prediction type information may be implemented in various forms. For example, the intra prediction type information may include intra prediction type index information indicating one of the intra prediction types. For another example, the intra prediction type information may include at least one of reference sample line information (e.g., intra_luma_ref_idx) indicating whether an MRL is applied to the current block and, if so, which reference sample line is used, ISP flag information (e.g., intra_subpartitions_mode_flag) indicating whether an ISP is applied to the current block, ISP type information (e.g., intra_subpartitions_split_flag) indicating a subpartition division type if an ISP is applied, flag information indicating whether PDCP is applied, or flag information indicating whether LIP is applied. Furthermore, the intra prediction type information may include an MIP flag indicating whether MIP is applied to the current block.
[0132] The intra prediction mode information and / or intra prediction type information may be encoded / decoded using the coding method described herein. For example, the intra prediction mode information and / or intra prediction type information may be encoded / decoded using entropy coding (e.g., CABAC, CAVLC) based on a truncated (rice) binary code.
[0133] On the other hand, when intra prediction is applied, the intra prediction mode to be applied to the current block may be determined using the intra prediction mode of a neighboring block. For example, the decoding device may select one of the MPM candidates in an MPM (most probable mode) list derived based on the intra prediction modes of neighboring blocks (e.g., left and / or upper neighboring blocks) of the current block and additional candidate modes based on the received MPM index, or may select one of the remaining intra prediction modes not included in the MPM candidates (and planar mode) based on remaining intra prediction mode information. The MPM list may be configured to include or exclude planar mode as a candidate. For example, if the MPM list includes planar mode as a candidate, the MPM list may have six candidates, and if the MPM list does not include planar mode as a candidate, the MPM list may have five candidates. If the mpm list does not include planar mode as a candidate, a not planar flag (e.g., intra_luma_not_planar_flag) indicating whether the intra prediction mode of the current block is not planar mode may be signaled. For example, the mpm flag may be signaled first, and the mpm index and not planar flag may be signaled if the value of the mpm flag is 1. Also, the mpm index may be signaled if the value of the not planar flag is 1. Here, the reason why the mpm list is configured not to include planar mode as a candidate is that, rather than the planar mode not being mpm, the planar mode is always considered as mpm, so the flag (not planar flag) is signaled first to first check whether it is planar mode.
[0134] For example, whether the intra prediction mode applied to the current block is among the mpm candidates (and planar mode) or among the remaining mode can be indicated based on the mpm flag (e.g., intra_luma_mpm_flag). A value of 1 for the mpm flag may indicate that the intra prediction mode for the current block is among the mpm candidates (and planar mode), and a value of 0 for the mpm flag may indicate that the intra prediction mode for the current block is not among the mpm candidates (and planar mode). A value of 0 for the not planar flag (e.g., intra_luma_not_planar_flag) may indicate that the intra prediction mode for the current block is planar mode, and a value of 1 for the not planar flag may indicate that the intra prediction mode for the current block is not 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 not included in the mpm candidates (and planar modes) among all intra prediction modes in order of prediction mode number and point to one of them. The intra prediction mode may be an intra prediction mode for a luma component (sample). Hereinafter, the intra prediction mode information may include at least one of an mpm flag (ex. intra_luma_mpm_flag), a not planar flag (ex. intra_luma_not_planar_flag), an mpm index (ex. 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 by various terms such as mpm candidate list, candidate mode list (candModeList), candidate intra-prediction mode list, etc.
[0135] Generally, when an image is divided into blocks, a current block to be coded and neighboring blocks have similar image characteristics. Therefore, there is a high probability that the current block and neighboring blocks have the same or similar intra prediction modes. Therefore, an encoder can use the intra prediction mode of neighboring blocks to encode the intra prediction mode of the current block. For example, an encoder / decoder can construct an MPM (Most Probable Modes) list for the current block. The MPM list can also be referred to as an MPM candidate list. Here, MPM may refer to a mode used to improve coding efficiency by considering the similarity between the current block and neighboring blocks when coding an intra prediction mode.
[0136] FIG. 9 illustrates an example of an intra prediction method based on MPM mode in an encoding device to which the embodiments of this document can be applied.
[0137] 9, the encoding apparatus constructs an MPM list for a current block (S900). The MPM list may include candidate intra-prediction modes (MPM candidates) that are likely to be applied to the current block. The MPM list may also include intra-prediction modes of neighboring blocks, and may further include specific intra-prediction modes according to a predetermined method. Specific methods for constructing an MPM list will be described later.
[0138] The encoding apparatus determines an intra prediction mode for a current block (S910). The encoding apparatus may perform prediction based on various intra prediction modes and determine an optimal intra prediction mode based on rate-distortion optimization (RDO) based on the prediction. In this case, the encoding apparatus may determine the optimal intra prediction mode using only the MPM candidates and planar modes configured in the MPM list, or may determine the optimal intra prediction mode using not only the MPM candidates and planar modes configured in the MPM list but also the remaining intra prediction modes.
[0139] Specifically, for example, if the intra prediction type of the current block is not a normal intra prediction type but a specific type (e.g., LIP, MRL, or ISP), the encoding device may consider only MPM candidates and planar modes as candidates for the intra prediction mode for the current block and determine the optimal intra prediction mode. That is, in this case, the intra prediction mode for the current block may be determined only from the MPM candidates and planar mode, and in this case, the mpm flag may not be encoded / signaled. In this case, the decoding device may infer that the mpm flag is 1 without receiving any separate signaling of the mpm flag.
[0140] Generally, if the intra prediction mode of the current block is not a planar mode but is one of the MPM candidates in the MPM list, the encoding device generates an mpm index (mpm idx) that points to one of the MPM candidates. If the intra prediction mode of the current block is not in the MPM list, the encoding device generates remaining intra prediction mode information that points to the same mode as the intra prediction mode of the current block from the remaining intra prediction modes not included in the MPM list (and planar modes).
[0141] The encoding apparatus may encode the intra-prediction mode information and output it in the form of a bitstream (S920). The intra-prediction mode information may include the above-mentioned mpm flag, not planar flag, mpm index, and / or remaining intra-prediction mode information. Generally, the mpm index and remaining intra-prediction mode information are alternatives and are not simultaneously signaled to indicate the intra-prediction mode for a block. That is, the mpm flag value 1 and the not planar flag or mpm index are signaled together, or the mpm flag value 0 and the remaining intra-prediction mode information are signaled together. However, as described above, if a specific intra-prediction type is applied to the current block, the mpm flag may not be signaled, and only the not planar flag and / or mpm index may be signaled. That is, in this case, the intra-prediction mode information may include only the not planar flag and / or mpm index.
[0142] 10 illustrates an example of an intra prediction method based on an MPM mode in a decoding device to which an embodiment of this document can be applied. The decoding device of FIG. 10 can determine an intra prediction mode according to the intra prediction mode information determined and signaled by the encoding device of FIG.
[0143] 10, a decoding apparatus acquires intra-prediction mode information from a bitstream (S1000). The intra-prediction mode information may include at least one of an mpm flag, a not-planar flag, an mpm index, and a remaining intra-prediction mode, as described above.
[0144] The decoding apparatus constructs an MPM list (S1010). The MPM list is constructed in the same manner as the MPM list constructed in the encoding apparatus. That is, the MPM list may include intra-prediction modes of neighboring blocks, and may further include specific intra-prediction modes according to a predetermined method. A specific method for constructing an MPM list will be described later.
[0145] Although S1010 is illustrated as being performed after S1000, this is merely an example, and S1010 may be performed before S1000 or may be performed simultaneously.
[0146] The decoding apparatus determines the intra prediction mode of the current block based on the MPM list and the intra prediction mode information (S1020).
[0147] For example, if the value of the mpm flag is 1, the decoding device may derive a planar mode as the intra prediction mode of the current block, or may derive a candidate indicated by the mpm index from among MPM candidates in the MPM list (based on the not planar flag) as the intra prediction mode of the current block. Here, the MPM candidate may refer only to candidates included in the MPM list, or may include not only candidates included in the MPM list but also planar modes that can be applied when the value of the mpm flag is 1.
[0148] As another example, if the value of the mpm flag is 0, the decoding device can derive the intra prediction mode indicated by the remaining intra prediction mode information from among the remaining intra prediction modes not included in the MPM list and planar mode as the intra prediction mode of the current block.
[0149] As another example, if the intra prediction type of the current block is a specific type (e.g., LIP, MRL, or ISP), the decoding device may derive the planar mode or the candidate pointed to by the mpm index in the MPM list as the intra prediction mode of the current block without checking the mpm flag.
[0150] In constructing the MPM list, in one embodiment, the encoding device / decoding device may derive a left mode, which is a candidate intra prediction mode for a left peripheral block of the current block, and a top mode, which is a candidate intra prediction mode for an upper peripheral block of the current block. Here, the left peripheral block may refer to the lowermost peripheral block among the left peripheral blocks adjacent to the left side of the current block, and the top peripheral block may refer to the rightmost peripheral block among the upper peripheral blocks adjacent to the upper side of the current block. For example, if the size of the current block is W×H and the x component of the top-left sample position of the current block is xN and the y component is yN, the left peripheral block may be a block including a sample at a coordinate (xN-1, yN+H-1), and the top peripheral block may be a block including a sample at a coordinate (xN+W-1, yN-1).
[0151] For example, if the left peripheral block is available and intra prediction is applied to the left peripheral block, the encoding device / decoding device may derive the intra prediction mode of the left peripheral block as a left candidate intra prediction mode (i.e., left mode). If the upper peripheral block is available and intra prediction is applied to the upper peripheral block and the upper peripheral block is included in the current CTU, the decoding device may derive the intra prediction mode of the upper peripheral block as an upper candidate intra prediction mode (i.e., top mode). Alternatively, if the left peripheral block is not available or intra prediction is not applied to the left peripheral block, the encoding device / decoding device may derive the planar mode as a left mode. If the upper peripheral block is not available, or intra prediction is not applied to the upper peripheral block, or the upper peripheral block is not included in the current CTU, the decoding device may derive the planar mode as a top mode.
[0152] The encoding / decoding apparatus may derive candidate intra-prediction modes for a current block based on a left mode derived from a left-side neighboring block and an upper mode derived from an upper-side neighboring block, and may construct an MPM list. In this case, the MPM list may include the left mode and the upper mode, and may further include a specific intra-prediction mode according to a predetermined method.
[0153] In addition, when constructing the MPM list, a general intra prediction method (normal intra prediction type) may be applied, or a specific intra prediction type (e.g., MRL, ISP) may be applied. This document proposes a method for constructing an MPM list when not only a general intra prediction method (normal intra prediction type) but also a specific intra prediction type (e.g., MRL, ISP) is applied, which will be described later.
[0154] Meanwhile, the intra prediction mode used for the MIP may indicate a matrix and offset used for intra prediction, rather than an existing directional mode. That is, a matrix and offset for intra prediction may be derived through the intra mode for MIP. In this case, when deriving the intra mode for generating the normal intra prediction or MPM list, the intra prediction mode of the block predicted with MIP may be set to a pre-set mode, for example, planar mode or DC mode. Alternatively, as another example, the intra mode for MIP may be mapped to planar mode, DC mode, or directional intra mode based on the block size.
[0155] Below, we will look at MIP (Matrix-based intra prediction), which is one method of intra prediction.
[0156] As described above, matrix-based intra prediction (hereinafter, MIP) may be referred to as affine linear weighted intra prediction (ALWIP) or matrix weighted intra prediction (MWIP). To predict samples of a rectangular block having a width (W) and a height (H), MIP uses one H line of reconstructed left boundary samples of the block's surroundings and one W line of reconstructed top boundary samples of the block as input values. If reconstructed samples are not available, reference samples can be generated using the interpolation method applied in conventional intra prediction.
[0157] FIG. 11 is a diagram illustrating a procedure for generating predicted samples based on MIP according to an example. The MIP procedure will be described below with reference to FIG.
[0158] 1. Averaging process
[0159] Of the boundary samples, 4 samples are extracted by the averaging procedure if W=H=4, and 8 samples in all other cases.
[0160] 2. Matrix vector multiplication process
[0161] The averaged samples are input and subjected to matrix-vector multiplication, followed by an offset, to derive the reduced prediction samples for the subsampled sample set within the original block.
[0162] 3. (Linear) Interpolation process
[0163] Prediction samples at the remaining positions are generated from the prediction samples of the subsampled sample set by linear interpolation, which is a single step linear interpolation in each direction.
[0164] The matrices and offset vectors required to generate the prediction blocks or samples can be selected from three sets of matrices S0, S1, S2.
[0165] Set S0 is made up of 16 matrices A0 i , i∈{0,…,15}, each matrix has 16 rows, 4 columns, and 16 offset vectors b0 i , i∈{0,...,15}. The matrices and offset vectors of set S0 can be used in blocks of size 4x4. According to another example, set S0 can include 18 matrices.
[0166] Set S1 is made up of eight matrices A1 i, i∈{0,…,7}, each matrix has 16 rows, 8 columns and 8 offset vectors b1 i , i∈{0,...,7}. According to another example, set S1 may include six matrices. The matrices and offset vectors of set S1 may be used for blocks of size 4x8, 8x4, and 8x8. Alternatively, the matrices and offset vectors of set S1 may be used for blocks of size 4xH or Wx4.
[0167] Finally, set S2 consists of six matrices A2 i , i∈{0,…,5}, each matrix has 64 rows, 8 columns and 6 offset vectors b2 i , i∈{0,...,5}. The matrices and offset vectors of set S2, or parts thereof, can be used for all other block sizes to which sets S0 and S1 do not apply. For example, the matrices and offset vectors of set S2 can be used for operations on blocks whose height and width are 8 or greater.
[0168] The total number of multiplications required for matrix vector multiplication is always less than or equal to 4 x W x H, i.e., a maximum of 4 multiplications per sample is required for MIP mode.
[0169] Below, the general MIP procedure is outlined. The remaining blocks not described below can be processed in any of the four cases described.
[0170] 12 to 15 are diagrams showing MIP procedures depending on the block size, where FIG. 12 is a diagram showing the MIP procedure for a 4x4 block, FIG. 13 is a diagram showing the MIP procedure for an 8x8 block, FIG. 14 is a diagram showing the MIP procedure for an 8x4 block, and FIG. 15 is a diagram showing the MIP procedure for a 16x16 block.
[0171] As shown in Figure 12, given a 4x4 block, MIP averages two samples along each axis of the boundary. The resulting four input samples become inputs to a matrix-vector multiplication, with the matrix coming from set S0. After the offset is added, 16 final predicted samples are generated. For a 4x4 block, no linear interpolation is required to generate the predicted samples. Therefore, we can perform (4x16) / (4x4) = 4 multiplications per sample.
[0172] Given an 8x8 block, MIP averages four samples along each axis of the boundary, as shown in Figure 13. The resulting eight input samples are input to a matrix-vector multiplication, with the matrix coming from set S1. The matrix-vector multiplication produces 16 samples in odd positions.
[0173] For an 8x8 block, (8x16) / (8x8) = 2 multiplications are performed per sample to generate the predicted samples. After adding the offset, the samples are interpolated vertically using the scaled-down upper boundary samples and horizontally using the original left boundary samples. In this case, a total of two multiplications per sample are required for MIP, since no multiplications are required in the interpolation procedure.
[0174] Given an 8x4 block, as shown in Figure 14, MIP averages four samples along the horizontal axis of the boundary, and uses the four samples on the left boundary along the vertical axis. Consequently, eight input samples are input to the matrix-vector multiplication, and the matrix is taken from set S1. The matrix-vector multiplication produces 16 samples at odd horizontal positions and their corresponding vertical positions.
[0175] For an 8x4 block, (8x16) / (8x4) = 4 multiplications are performed per sample to generate the predicted samples. After adding the offset, horizontal interpolation is performed using the original left boundary sample. In this case, a total of 4 multiplications per sample are required for MIP, since no multiplications are required in the interpolation procedure.
[0176] As shown in Figure 15, given a 16x16 block, MIP averages four samples along each axis, resulting in eight input samples as inputs to the matrix-vector multiplication, with the matrix coming from set S2. The matrix-vector multiplication generates 64 samples at odd positions. For a 16x16 block, (8x64) / (16x16) = 2 multiplications are performed per sample to generate the predicted samples. After applying the offset, the samples are interpolated vertically using the eight scaled upper boundary samples and horizontally using the original left boundary samples. In this case, two multiplications per sample are required for MIP because no multiplications are required in the interpolation procedure.
[0177] For larger blocks, the MIP procedure is essentially identical to the one detailed, and it can be easily verified that the number of multiplications per sample is less than four.
[0178] For W x 8 blocks with a width greater than 8 (W > 8), only horizontal interpolation is required, since samples are generated at odd horizontal and vertical positions. In this case, (8 x 64) / (W x 8) = 64 / W multiplications are performed per sample to calculate the prediction of the downscaled samples. For W = 16, no additional multiplications are required for linear interpolation, and for W > 16, the number of additional multiplications per sample required for linear interpolation is less than 2; that is, the total number of multiplications per sample is less than or equal to 4.
[0179] For W × 4 blocks with width greater than 4 (W > 4), the matrix generated by omitting all rows corresponding to odd entries along the horizontal axis of the downsampled block is called A. k Therefore, the output size is 32, and only horizontal interpolation is performed. For the prediction calculation of the downscaled samples, (8 x 32) / (W x 4) = 64 / W multiplications are performed per sample. If W = 16, no additional multiplications are required, and if W > 16, the number of additional multiplications per sample required for linear interpolation is less than 2. That is, the total number of multiplications per sample is less than or equal to 4.
[0180] If a matrix is prepended, it can be processed accordingly.
[0181] 16 is a diagram for explaining the boundary averaging procedure of the MIP procedure. The averaging procedure will be specifically explained with reference to FIG.
[0182] According to the averaging procedure, averaging is applied to each boundary, i.e., the left boundary or the top boundary, where the boundary indicates the surrounding reference samples adjacent to the boundary of the current block as shown in FIG. 16. For example, the left boundary (bdry left ) indicates the left neighboring reference sample adjacent to the left boundary of the current block, and the upper boundary (bdry top ) indicates the upper neighboring reference sample.
[0183] If the current block is a 4x4 block, the size of each boundary can be reduced to 2 samples through an averaging procedure. If the current block is not a 4x4 block, the size of each boundary can be reduced to 4 samples through an averaging procedure.
[0184] The first step in the averaging procedure is to calculate the input boundary (bdry left and bdry top ) to a smaller boundary. JPEG2025126207000002.jpg1151 JPEG2025126207000003.jpg964 consists of 2 samples for the 4x4 block case, and 4 samples for all remaining different cases.
[0185] In the case of 4x4 blocks, for 0≦i<2 JPEG2025126207000004.jpg1020 can be expressed as the following formula: JPEG2025126207000005.jpg828 can also be defined similarly.
[0186]
number
[0187] On the other hand, for 0≦i<4, the block width is W=4×2 k Given this, JPEG2025126207000007.jpg838 can be expressed by the following formula: JPEG2025126207000008.jpg940 can also be defined similarly.
[0188]
number
[0189] Two reduced boundaries JPEG2025126207000010.jpg1281 is the reduced boundary vector bdry red Since it is connected to bdry red has size 4 for blocks of 4x4 shape and size 8 for all other blocks.
[0190] If "mode" refers to the MIP mode, the reduced boundary vector bdry redThe range of the MIP mode value (mode) can be defined based on the block size and the intra_mip_transposed_flag value as shown in the following formula.
[0191]
number
[0192] In the above equation, intra_mip_transposed_flag may be referred to as MIP transpose, and such flag information may indicate whether the downscaled prediction samples are transposed. The semantics of such a syntax element may be expressed as "intra_mip_transposed_flag[x0][y0] specifies whether the input vector for matrix-based intra prediction mode for luma samples is transposed or not."
[0193] Finally, for the interpolation of subsampled prediction samples, a second version of the averaged boundary is needed for large blocks: if the smaller of the width and height is greater than 8, JPEG2025126207000012.jpg11101, If the width is equal to or greater than the height (W≧H), then W=8*2 l For 0≦i<8, JPEG2025126207000013.jpg12115 can be defined as follows: In addition, if the smaller value of the width or height is greater than 8, JPEG2025126207000014.jpg10115, height is greater than width (H>W) JPEG2025126207000015.jpg990 can also be defined similarly.
[0194]
number
[0195] Next, we will look at the procedure for generating downsized prediction samples by matrix-vector multiplication.
[0196] The reduced input vector bdry red One of the prediction samples is reduced Generate JPEG2025126207000017.jpg1048. The predicted samples are of width W red and height H red where W red and H red is defined as follows:
[0197]
number
[0198] Reduced prediction sample JPEG2025126207000019.jpg1269 can be calculated by adding an offset after matrix vector multiplication, and can be derived through the following formula:
[0199]
number
[0200] where A is W red ×h red is a matrix with 4 rows and 8 columns when W and H are 4 (W=H=4) and in all other cases, and b is a matrix with 4 rows and 8 columns when W and H are 4 (W=H=4) and in all other cases, red ×h red is a vector of magnitude.
[0201] The matrix A and vector b are selected from the sets S0, S1, and S2 as follows, and the index idx=idx(W,H) can be defined as in Equation 7 or Equation 8.
[0202]
number
[0203]
number
[0204] If idx is 1 or less (idx≦1), or if idx is 2 and the smaller of W and H is greater than 4, JPEG2025126207000023.jpg1196, A is JPEG2025126207000024.jpg1089 JPEG2025126207000025.jpg1184, b is JPEG2025126207000026.jpg1155 is set. idx is 2, and the smaller value of W and H is 4. JPEG2025126207000027.jpg1098, if W is 4, A corresponds to odd x coordinates within the downsampled block JPEG2025126207000028.jpg1097 becomes a matrix with each row removed. Alternatively, if H is 4, A corresponds to odd y coordinates within the downsampled block. The result is a matrix with each column of JPEG2025126207000029.jpg10133 removed.
[0205] Finally, the downscaled prediction samples can be replaced by their transpose in Equation 9.
[0206]
number
[0207] For the calculation of JPEG2025126207000031.jpg1196, when W = H = 4, since A is composed of 4 columns and 16 rows, it is 4. In all other cases, since A is composed of 8 columns and W red ×h red rows, so For the calculation of JPEG2025126207000032.jpg10109, it can be confirmed that a maximum of 4 multiplications per sample are required.
[0208] Figure 17 is a diagram for explaining linear interpolation in the MIP procedure. Referring to Figure 17, the linear interpolation procedure is specifically described as follows.
[0209] The interpolation procedure may be referred to as a linear interpolation or a bilinear interpolation procedure. As shown, the interpolation procedure can include two steps: 1) vertical interpolation, and 2) horizontal interpolation.
[0210] If W ≥ H, vertical linear interpolation can be applied first, followed by horizontal linear interpolation. If W < H, horizontal linear interpolation can be applied first, followed by vertical linear interpolation. In the case of a 4×4 block, the interpolation procedure may be omitted.
[0211] For a W×H block of JPEG2025126207000033.jpg11119, the predicted samples are W red ×H red reduced predicted samples above derived from JPEG2025126207000034.jpg11113. Depending on the form of the block, linear interpolation is performed vertically, horizontally, or in both directions. When linear interpolation is applied in both directions, if W < H, it is applied first in the horizontal direction; otherwise, it is applied first in the vertical direction.
[0212] For a W×H block where JPEG2025126207000035.jpg1265 and W≧H, it can be assumed without loss of generality that one-dimensional linear interpolation is then performed as follows: Without loss of generality, linear interpolation in the vertical direction is fully described.
[0213] First, the downscaled prediction samples are expanded upward by the boundary signal. Define JPEG2025126207000036.jpg1079, If you set JPEG2025126207000037.jpg1186, you can set the predicted sample for the extended reduction as follows:
[0214]
number
[0215] Then, vertical linear interpolation prediction samples can be generated from these expanded downscaling prediction samples using the following formula:
[0216]
number
[0217] where x is 0≦x <W red , y, 0≦y <H red , k is 0≦k ver It could be.
[0218] Below we look at ways to reduce complexity and maximize performance for MIP techniques. The embodiments described below may be implemented independently or in combination.
[0219] Meanwhile, when MIP is applied to the current block, an MPM list for the current block to which MIP is applied can be configured separately. The MPM list can be called by various names such as an MIP MPM list (or an LWIP MPM list, candLwipModeList) to distinguish it from an MPM list when ALWIP is not applied to the current block. Hereinafter, for the sake of distinction, it will be referred to as an MIP MPM list, but this may also be called an MPM list.
[0220] The MIP MPM list may include n candidates, where n may be 3. The MIP MPM list may be configured based on left and upper neighboring blocks of the current block. Here, the left neighboring block may indicate the uppermost block among neighboring blocks adjacent to the left boundary of the current block. Also, the upper neighboring block may indicate the leftmost block among neighboring blocks adjacent to the upper boundary of the current block.
[0221] For example, if MIP is applied to the left peripheral block, a first candidate intra prediction mode (or candLwipModeA) may be set to the same as the MIP mode of the left peripheral block. Also, for example, if MIP is applied to the upper peripheral block, a second candidate intra prediction mode (or candLwipModeB) may be set to the same as the prediction mode of the MIP mode of the upper peripheral block.
[0222] Meanwhile, the left peripheral block or the upper peripheral block may be coded based on intra prediction other than MIP. That is, when coding the left peripheral block or the upper peripheral block, an intra prediction type other than MIP may be applied. In this case, it is not appropriate to use the general intra prediction mode number of the peripheral block (left peripheral block / upper peripheral block) to which MIP is not applied as the candidate intra mode for the current block to which MIP is applied. Therefore, in this case, as an example, the MIP mode of the peripheral block (left peripheral block / upper peripheral block) to which MIP is not applied may be considered to be a prediction mode of an MIP mode with a specific value (e.g., 0, 1, or 2). Alternatively, as another example, the general intra prediction mode of the peripheral block (left peripheral block / upper peripheral block) to which MIP is not applied may be mapped to an MIP mode based on a predetermined mapping table and used to construct an MIP MPM list. In this case, the mapping may be performed based on the block size type of the current block.
[0223] In addition, if the neighboring blocks (e.g., left neighboring blocks / top neighboring blocks) are unavailable (e.g., located outside the current picture, located outside the current tile / tile group, etc.), or even if MIP is applied, an MIP mode unavailable for the current block may be used depending on the block size type. In this case, a specific predefined MIP mode may be used as the first candidate intra prediction mode or the second candidate intra prediction mode for the first and / or second candidate. In addition, a specific predefined MIP prediction mode may be used as the third candidate intra prediction mode.
[0224] Meanwhile, the existing MIP mode is divided into non-MPM mode and MPM mode, similar to the existing method of deriving intra prediction mode, and an MPM flag is sent, and the MIP mode of the current block is coded based on the MPM mode or non-MPM mode.
[0225] For example, a structure may be proposed in which, for blocks to which the MIP technique is applied, the MIP mode is directly coded without distinguishing between MPM mode and non-MPM mode. This video coding structure may simplify a complex syntax structure. In addition, since the actual occurrence frequency of MIP modes is relatively uniformly distributed for each mode and is significantly different from the occurrence frequency indicated by existing intra modes, the proposed coding structure may maximize the efficiency of encoding and decoding MIP mode information.
[0226] The image information transmitted and received for MIP according to this embodiment is as follows: The syntax described below may be included in the video / image information transmitted from the encoding device to the decoding device, may be configured / encoded by the encoding device, and may be signaled to the decoding device in the form of a bitstream, and the decoding device may parse / decode the included information (syntax elements) according to the conditions / orders disclosed in the syntax.
[0227] [Table 1]
[0228] As shown in Table 1, the syntax elements intra_mip_flag and intra_mip_mode_idx for the MIP mode of the current block can be signaled by being included in the syntax information for the coding unit.
[0229] Meanwhile, sps_mip_enabled_flag, which is flag information indicating whether matrix-based intra prediction (MIP) is applicable to the current block, can be further received, and thereby intra_mip_flag can be signaled.
[0230] The flag information sps_mip_enabled_flag can be signaled via syntax information of a sequence parameter set (SPS).
[0231] When intra_mip_flag is 1, it indicates that the intra prediction type for the luma sample is matrix-based intra prediction, and when it is 0, it indicates that the intra prediction type for the luma sample is not matrix-based intra prediction.
[0232] When intra_mip_mode_idx is signaled when intra_mip_flag is 1, it indicates a matrix-based intra prediction mode for luma samples. Such a matrix-based intra prediction mode may indicate a matrix and offset or matrix for MIP, as described above.
[0233] Also, according to one example, flag information indicating whether an input vector for matrix-based intra prediction is transposed, for example, intra_mip_transposed_flag, may be further signaled via the syntax of the coding unit. If intra_mip_transposed_flag is 1, the input vector for matrix-based intra prediction is transposed, and such flag information may reduce the number of matrices for matrix-based intra prediction.
[0234] Meanwhile, intra_mip_mode_idx can be encoded and decoded using a truncated binarization scheme as shown in the table below.
[0235] [Table 2]
[0236] As shown in Table 2, intra_mip_flag is binarized to a fixed length code, while intra_mip_mode_idx is binarized using a truncated binarization method, and the maximum length of the binarization (cMax) can be set according to the size of the coding block. If the width and height of the coding block are 4 (cbWidth==4 && cbHeight==4), the maximum length of the binarization is set to 34. Otherwise, it can be set to 18 or 10 depending on whether the width and height of the coding block are 8 or less ((cbWidth≦8 && cbHeight≦8)?).
[0237] Meanwhile, intra_mip_mode_idx can be coded in a bypass manner, rather than based on a context model, which can improve coding speed and efficiency.
[0238] As another example, when intra_mip_mode_idx is binarized using the truncated binarization method, the maximum length of binarization is as shown in the following table.
[0239] [Table 3]
[0240] As shown in Table 3, the maximum binarization length for intra_mip_mode_idx is set to 15 if the width and height of the coding block are 4 ((cbWidth==4 && cbHeight==4)), otherwise it is set to 7 if the width or height of the coding block is 4 ((cbWith==4||cbHeight==4)) or the width and height of the coding block is 8 (cbWith==8 && cbHeight==8), and it can be set to 5 if the width or height of the coding block is 4 ((cbWith==4||cbHeight==4)) or the width and height of the coding block is not 8 (cbWith==8 && cbHeight==8).
[0241] As another example, intra_mip_mode_idx can be coded using a fixed length code. In this case, the number of available MIP modes is limited to an exponent of 2 for each block size to improve coding efficiency (e.g., A=2). K1 -1, B=2 K2 -1, 2 K3 -1, where K1, K2, and K3 are positive constants).
[0242] This is shown in the table below.
[0243] [Table 4]
[0244] In Table 4, if K1=5, K2=4, and K3=3, intra_mip_mode can be binarized as follows:
[0245] [Table 5]
[0246] Alternatively, for example, if K1 is set to 4 and the width and height of the coding block are 4, the maximum binarization length for intra_mip_mode of the block may be set to 15. Also, if K2 is set to 3 and the width or height of the coding block is 4, or the width and height of the coding block are 8, the maximum binarization length may be set to 7.
[0247] Meanwhile, according to one example, a method can be proposed in which MIP is used only for specific blocks to which the MIP technique can be efficiently applied. By applying the method according to this embodiment, the number of matrix vectors required for MIP can be reduced, and the memory required to store the matrix vectors can be significantly reduced (50%). Even with this effect, the coding efficiency remains almost constant (less than 0.1%).
[0248] According to this embodiment, the syntax including the specific conditions under which the MIP technique is applied is as follows:
[0249] [Table 6]
[0250] As shown in Table 6, MIP has a condition (cbWidth>K1||cbHeight>K2) that it is applied only to large blocks, and the size of the block can be determined by preset values (K1 and K2). The reason why MIP is applied only to large blocks is that the coding efficiency of MIP is demonstrated for relatively large blocks.
[0251] The table below shows an example where K1 and K2 are predefined as 8 in Table 6.
[0252] [Table 7]
[0253] The semantics for intra_mip_flag and intra_mip_mode_idx in Tables 6 and 7 are the same as in Table 1.
[0254] On the other hand, if intra_mip_mode_idx has 11 possible modes, it can be coded in a truncated binary coded (cMax=10) manner as follows:
[0255] [Table 8]
[0256] Alternatively, if the available MIP modes are limited to eight, intra_mip_mode_idx[x0][y0] can be encoded with a fixed length code as follows:
[0257] [Table 9]
[0258] In both Tables 8 and 9, intra_mip_mode_idx can be coded in a bypass manner.
[0259] Meanwhile, in one example, the weight matrix (A) used for large blocks is used so that the MIP technique can be efficiently applied in terms of memory saving. k ) and the offset vector (b k A MIP technique that can be applied to small blocks can be proposed. By applying the method according to this embodiment, the number of matrix vectors required for MIP can be reduced, and the memory required to store the matrix vectors can be significantly reduced (50%). With this effect, the coding efficiency remains almost constant (less than 0.05%).
[0260] FIG. 18 is a diagram for explaining the MIP technique according to an example of this document.
[0261] As shown, FIG. 18(a) shows the operation of the matrix and offset vector for index i of the large block, and FIG. 18(b) shows the operation of the sampled matrix and offset vector applied to the small block.
[0262] As shown in Figure 18, the weight matrix used for the large block is subsampled to obtain a subsampled weight matrix (Sub(A k )) and the offset vector obtained by subsampling the offset vector used for the large block (Sub(b k )) can be regarded as a weight matrix and an offset vector for each small block, and the existing MIP procedure can be applied.
[0263] Here, sub-sampling can be applied to either the horizontal or vertical direction, or both directions. In particular, the sub-sampling factor (e.g., 1 out of 2 or 1 out of 4) and the vertical or horizontal sampling direction can be set based on the width and height of the corresponding block.
[0264] In addition, the number of intra prediction modes for MIP to which this embodiment is applied may be set differently depending on the size of the current block. For example, i) if the height and width of the current block (coding block or transform block) are each 4, 35 intra prediction modes (i.e., intra prediction modes 0 to 34) may be available, ii) if the height and width of the current block are both 8 or less, 19 intra prediction modes (i.e., intra prediction modes 0 to 18) may be available, and iii) in other cases, 11 intra prediction modes (i.e., intra prediction modes 0 to 10) may be available.
[0265] For example, if the height and width of the current block are each 4, it is called block size type 0; if the height and width of the current block are both 8 or less, it is called block size type 1; and if not, it is called block size type 2. The number of intra prediction modes for MIP can be organized as shown in the following table.
[0266] [Table 10]
[0267] To apply the weighting matrix and offset vector used for a large block (e.g., block size type=2) to a small block (e.g., block size=0 or block size=1), the number of available intra prediction modes for each block size can be applied in the same way, as shown in the following table.
[0268] [Table 11]
[0269] Alternatively, as shown in Table 12 below, MIP can be applied only to block sizes type 1 and 2, and block size type 1 can use the weight matrix and offset vector defined in block size type 2 by subsampling, which can effectively save memory (50%).
[0270] [Table 12]
[0271] The following drawings are created to explain a specific example of the present specification. The names of specific devices and names of specific signals / messages / fields shown in the drawings are provided for illustrative purposes only, and the technical features of the present specification are not limited to the specific names used in the following drawings.
[0272] FIG. 19 is a flow chart that schematically illustrates a decoding method that can be performed by a decoding device according to an embodiment of the present document.
[0273] The method disclosed in Figure 19 may be performed by the decoding apparatus 300 disclosed in Figure 3. Specifically, steps S1900 to S1940 of Figure 19 may be performed by the entropy decoding unit 310 and / or the prediction unit 330 (specifically, the intra prediction unit 331) disclosed in Figure 3, and step S1950 of Figure 19 may be performed by the addition unit 340 disclosed in Figure 3. In addition, the method disclosed in Figure 19 may include the embodiments described above in this document. Therefore, in Figure 19, detailed descriptions of content that overlaps with the embodiments described above will be omitted or simplified.
[0274] Referring to FIG. 19, the decoding device may receive second flag information indicating whether matrix-based intra prediction (MIP) is to be used for the current block based on first flag information indicating whether MIP is applicable to the current block from the bitstream (S1900).
[0275] The first flag information can be signaled as sps_mip_enabled_flag through syntax information of a sequence parameter set (SPS).
[0276] If the first flag information is 1, second flag information indicating whether matrix-based intra prediction (MIP) is used for the current block can be obtained from the bitstream.
[0277] Such flag second flag information can be signaled by being included in syntax information of a coding unit using syntax such as intra_mip_flag.
[0278] The decoding apparatus may receive matrix-based intra-prediction (MIP) mode information based on the received second flag information (S1910).
[0279] MIP mode information can be expressed as intra_mip_mode_idx and can be signaled when intra_mip_flag is 1. intra_mip_mode_idx can be index information indicating the MIP mode applied to the current block, and such index information can be used to derive a matrix when generating a prediction sample.
[0280] Also, according to one example, flag information indicating whether or not an input vector for matrix-based intra prediction is transposed, for example, intra_mip_transposed_flag, may be further signaled via the syntax of the coding unit.
[0281] The decoding apparatus may generate intra-predicted samples for the current block based on the MIP information. To generate the intra-predicted samples, the decoding apparatus may derive at least one surrounding reference sample from the surrounding reference samples of the current block and generate predicted samples based on the surrounding reference sample.
[0282] When MIP is applied, the decoding apparatus can downsample reference samples adjacent to the current block to derive reduced boundary samples (S1920).
[0283] The reduced boundary samples can be derived by downsampling through averaging of the reference samples.
[0284] If the width and height of the current block are 4, four reduced boundary samples are derived, and in other cases, eight samples can be derived.
[0285] The averaging procedure for downsampling can be applied to each boundary, left boundary or top boundary, of the current block, which can be applied to surrounding reference samples adjacent to the boundary of the current block.
[0286] As an example, if the current block is a 4x4 block, the size of each boundary can be reduced to two samples through an averaging procedure, and if the current block is not a 4x4 block, the size of each boundary can be reduced to four samples through an averaging procedure.
[0287] Thereafter, the decoding apparatus can derive a scaled prediction sample by multiplying the MIP matrix derived based on the size and index information of the current block by the scaled boundary sample (S1930).
[0288] The MIP matrix can be derived based on the size of the current block and the received index information.
[0289] The MIP matrix can be selected from one of three matrix sets classified according to the size of the current block, and each of the three matrix sets can include multiple MIP matrices.
[0290] That is, three matrix sets for MIP can be set, and each matrix set can be composed of a plurality of matrices and offset vectors. These matrix sets can be applied according to the size of the current block.
[0291] For example, a matrix set including 18 or 16 matrices each consisting of 16 rows and 4 columns and 18 or 16 offset vectors can be applied to a 4x4 block. The index information can be information indicating one of multiple matrices included in one matrix set.
[0292] For 4×8, 8×4, and 8×8 blocks, or 4×H or W×4 blocks, a matrix set including 10 or 8 matrices composed of 16 rows and 8 columns, and 10 or 8 offset vectors can be applied.
[0293] Alternatively, for blocks other than the aforementioned blocks or blocks with a height and width of 8 or more, a matrix set including 6 matrices composed of 64 rows and 8 columns, and 6 offset vectors can be applied.
[0294] After the operation of multiplying the MIP matrix by the downsampled boundary samples, a downsampled predicted sample, that is, a predicted sample to which the MIP matrix is applied, is derived based on the operation of adding an offset.
[0295] The decoding device can upsample the downsampled predicted sample to generate an intra prediction sample for the current block (S1940).
[0296] The intra prediction sample can be upsampled by linear interpolation of the downsampled predicted sample.
[0297] The interpolation procedure can be referred to as a linear interpolation or bilinear interpolation procedure and can include two steps: 1) vertical interpolation, and 2) horizontal interpolation.
[0298] If W>=H, vertical linear interpolation can be applied first, followed by horizontal linear interpolation. If W<H, horizontal linear interpolation can be applied first, followed by vertical linear interpolation. In the case of a 4×4 block, the interpolation procedure can be omitted.
[0299] [[ID=3,1]]The decoding device can generate a restored sample for the current block based on the predicted sample (S1950).
[0300] In one embodiment, the decoding apparatus may directly use the predicted samples as reconstructed samples depending on the prediction mode, or may generate reconstructed samples by adding residual samples to the predicted samples.
[0301] If a residual sample for the current block exists, the decoding apparatus may receive information about the residual for the current block. The information about the residual may include transform coefficients related to the residual sample. The decoding apparatus may derive a residual sample (or a residual sample array) for the current block based on the residual information. The decoding apparatus may generate reconstructed samples based on the predicted samples and the residual samples, and derive a reconstructed block or picture based on the reconstructed samples. As described above, the decoding apparatus may then apply an in-loop filtering procedure, such as deblocking filtering and / or an SAO procedure, to the reconstructed picture to improve subjective / objective image quality as needed.
[0302] FIG. 20 is a flow chart that schematically illustrates an encoding method that can be performed by an encoding device according to an embodiment of the present document.
[0303] The method disclosed in FIG. 20 may be performed by the encoding apparatus 200 disclosed in FIG. 2. Specifically, steps S2000 to S2030 of FIG. 20 may be performed by the prediction unit 220 (specifically, the intra prediction unit 222) disclosed in FIG. 2, step S2040 of FIG. 20 may be performed by the subtraction unit 231 disclosed in FIG. 2, and step S2050 of FIG. 20 may be performed by the entropy encoding unit 240 disclosed in FIG. 2. In addition, the method disclosed in FIG. 20 may include the embodiments described above in this document. Therefore, in FIG. 20, detailed descriptions of content that overlaps with the above-described embodiments will be omitted or simplified.
[0304] Referring to FIG. 20, the encoding apparatus may determine whether matrix-based intra prediction (MIP) is applied to a current block (S2000).
[0305] The encoding device can apply various prediction techniques to find the optimal prediction mode for the current block, and can determine the optimal intra-prediction mode based on rate-distortion optimization (RDO).
[0306] If it is determined that MIP is to be applied to the current block, the encoding apparatus may derive reduced boundary samples by downsampling reference samples adjacent to the current block (S2010).
[0307] The reduced boundary samples can be derived by downsampling through averaging of reference samples.
[0308] If the width and height of the current block are 4, four reduced boundary samples are derived, and in other cases, eight samples can be derived.
[0309] The averaging procedure for downsampling can be applied to each boundary, left boundary or top boundary, of the current block, which can be applied to surrounding reference samples adjacent to the boundary of the current block.
[0310] For example, if the current block is a 4x4 block, the size of each boundary can be reduced to two samples through an averaging procedure, and if the current block is not a 4x4 block, the size of each boundary can be reduced to four samples through an averaging procedure.
[0311] Once the scaled boundary samples are derived, the encoding device can derive scaled prediction samples based on a multiplication operation of the scaled boundary samples by an MIP matrix selected based on the size of the current block (S2020).
[0312] The MIP matrix can be selected from one of three matrix sets classified according to the size of the current block, and each of the three matrix sets can include multiple MIP matrices.
[0313] That is, three matrix sets for MIP can be set, and each matrix set can be composed of a plurality of matrices and an offset vector. These matrix sets can be applied according to the size of the current block.
[0314] For example, a matrix set including 18 or 16 matrices each consisting of 16 rows and 4 columns and 18 or 16 offset vectors can be applied to a 4x4 block. The index information can be information indicating one of multiple matrices included in one matrix set.
[0315] For 4x8, 8x4 and 8x8 blocks, or 4xH or Wx4 blocks, a matrix set containing 10 or 8 matrices with 16 rows and 8 columns, and 10 or 8 offset vectors can be applied.
[0316] Alternatively, for blocks other than those mentioned above or blocks with height and width greater than or equal to 8, a matrix set including six matrices each consisting of 64 rows and 8 columns, and six offset vectors can be applied.
[0317] After the multiplication operation of the MIP matrix and the reduced boundary samples, a reduced predicted sample can be derived based on an operation of adding an offset, that is, a predicted sample to which the MIP matrix is applied.
[0318] Thereafter, the encoding device can upsample the reduced predicted sample to generate an intra prediction sample for the current block (S2030).
[0319] The intra prediction sample can be upsampled by linear interpolation of the reduced predicted sample.
[0320] The interpolation procedure can be referred to as a linear interpolation or a bilinear interpolation procedure and can include two steps: 1) vertical interpolation, and 2) horizontal interpolation.
[0321] If W >= H, vertical linear interpolation can be applied first, followed by horizontal linear interpolation. If W < H, horizontal linear interpolation can be applied first, followed by vertical linear interpolation. In the case of a 4×4 block, the interpolation procedure can be omitted.
[0322] Also, the encoding device can derive a residual sample for the current block based on the predicted sample of the current block and the original sample of the current block (S2040).
[0323] Then, the encoding device can generate residual information for the current block based on the residual sample, and encode video information including the residual information, first flag information indicating whether matrix-based intra prediction (MIP) is applicable to the current block, second flag information indicating whether MIP is used for the current block, and MIP mode information (S2050).
[0324] Here, the residual information may include information such as value information of the quantized transform coefficients derived by transforming and quantizing the residual samples, position information, transform technique, transform kernel, quantization parameter, etc.
[0325] First flag information indicating whether matrix-based intra prediction (MIP) is applicable to the current block can be encoded as sps_mip_enabled_flag through syntax information of a sequence parameter set (SPS).
[0326] The second flag information indicating whether MIP is applied can be encoded by being included in the syntax information of the coding unit using a syntax such as intra_mip_flag.
[0327] Furthermore, MIP mode information may be represented by intra_mip_mode_idx and may be encoded when intra_mip_flag is 1. intra_mip_mode_idx may be index information indicating the MIP mode applied to the current block, and such index information may be used to derive a matrix when generating a prediction sample. The index information may indicate one of the multiple MIP matrices included in one matrix set.
[0328] Also, according to one example, flag information indicating whether an input vector for matrix-based intra prediction is transposed, for example, intra_mip_transposed_flag, can be further signaled via the syntax of the coding unit.
[0329] That is, the encoding apparatus may encode image information including the MIP mode information and / or residual information of the current block and output the encoded image information as a bitstream.
[0330] The bitstream can be transmitted to the decoding device via a network or a (digital) storage medium, where the network can include a broadcasting network and / or a communication network, and the digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc.
[0331] The process of generating a prediction sample for the current block described above can be performed by the intra prediction unit 222 of the encoding device 200 disclosed in FIG. 2, the process of deriving a residual sample can be performed by the subtraction unit 231 of the encoding device 200 disclosed in FIG. 2, and the process of generating and encoding residual information can be performed by the residual processing unit 230 and the entropy encoding unit 240 of the encoding device 200 disclosed in FIG. 2.
[0332] In the above-described embodiments, the method is described based on a flowchart as a series of steps or blocks, but the embodiments of this document are not limited to the order of the steps, and some steps may occur in a different order or simultaneously with other steps than those described above. Also, those skilled in the art will understand that the steps shown in the flowcharts are not exclusive, and different steps may be included, or one or more steps of the flowcharts may be deleted without affecting the scope of this document.
[0333] The method described herein may be implemented in the form of software, and the encoding device and / or decoding device described herein may be included in a device that performs video processing, such as a TV, a computer, a smartphone, a set-top box, or a display device.
[0334] When an embodiment in this document is implemented in software, the methods described above may be implemented with modules (processes, functions, etc.) that perform the functions described above. The modules may be stored in memory and executed by a processor. The memory may be internal or external to the processor and may be coupled to the processor in various well-known ways. The processor may include an application-specific integrated circuit (ASIC), other chipsets, logic circuits, and / or data processing devices. The memory may include read-only memory (ROM), random access memory (RAM), flash memory, a memory card, a storage medium, and / or other storage devices. That is, the embodiments described herein may be implemented and executed on a processor, microprocessor, controller, or chip. For example, the functional units shown in each drawing may be implemented and executed on a computer, processor, microprocessor, controller, or chip. In this case, information (e.g., information on instructions) or algorithms for implementation may be stored on a digital storage medium.
[0335] In addition, the decoding device and encoding device to which this document is applied may be included in a multimedia broadcast transmitting / receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video interaction device, a real-time communication device such as video communication, a mobile streaming device, a storage medium, a camcorder, a customized video (VoD) service providing device, an over-the-top (OTT) video (over-the-top) device, an internet streaming service providing device, a three-dimensional (3D) video device, a virtual reality (VR) device, an augmented reality (AR) device, an image telephone video device, a vehicle terminal (e.g., a vehicle terminal (including an autonomous vehicle), an airplane terminal, a ship terminal, etc.), a medical video device, etc., and may be used to process video signals or data signals. For example, over-the-top (OTT) video (over-the-top) devices may include a game console, a Blu-ray player, an internet access TV, a home theater system, a smartphone, a tablet PC, a digital video recorder (DVR), etc.
[0336] In addition, the processing method to which this document is applied may be produced in the form of a computer-executable program and stored in a computer-readable recording medium. Multimedia data having the data structure according to this document may also be stored in a computer-readable recording medium. The computer-readable recording medium includes all types of storage devices and distributed storage devices in which computer-readable data is stored. The computer-readable recording medium may include, for example, a Blu-ray Disc (BD), a Universal Serial Bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. The computer-readable recording medium may also include media embodied in the form of a carrier wave (e.g., transmission via the Internet). The bitstream generated by the encoding method may be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network.
[0337] Furthermore, the embodiments of the present document may be embodied in a computer program product having program code, which may be executed by a computer according to the embodiments of the present document. The program code may be stored on a computer-readable carrier.
[0338] The claims herein may be combined in various ways. For example, technical features of method claims herein may be combined to be embodied as an apparatus, and technical features of apparatus claims herein may be combined to be embodied as a method. Furthermore, technical features of method claims herein and technical features of apparatus claims herein may be combined to be embodied as an apparatus, and technical features of method claims herein and technical features of apparatus claims herein may be combined to be embodied as a method. (Claims in the present description can be combined in a variety of ways. For instance, technical features in method claims of the present description can be combined to be implemented or performed in an apparatus, and technical features in apparatus claims can be combined to be implemented or performed in a method. Further, technical features in method claim(s) and apparatus claim(s) can be combined to be implemented or performed in an apparatus. Further, technical features in method claim(s) and apparatus claim(s) can be combined to be implemented or performed in a method.)
Claims
1. A video decoding method performed by a decoding device, comprising: receiving a bitstream; receiving residual information from the bitstream; receiving second flag information related to whether an intra prediction type for a current block is matrix-based intra prediction (MIP) based on first flag information related to whether MIP is applicable, the first flag information being equal to 1 indicating that MIP is applicable; receiving MIP mode information based on the second flag information, the second flag information being equal to 1 indicating that the intra prediction type for the current block is the MIP; generating intra-predicted samples for the current block based on the MIP mode information; deriving transform coefficients based on the residual information; generating residual samples based on the transform coefficients; generating reconstructed samples for the current block based on the intra-predicted samples and the residual samples; The MIP mode information is MIP mode index information indicating an MIP mode to be applied to the current block, the MIP mode index information is used to derive a MIP matrix for the current block; the intra-predicted samples are generated using the MIP matrix derived from the MIP mode index information; The syntax element bin string for the MIP mode information is binarized by a truncated binarization (TB) method, A method wherein the maximum length of the syntax element bin string is determined by the size of the current block.
2. A video encoding method performed by an encoding device, comprising: deriving whether matrix-based intra prediction (MIP) is applied to the current block; deriving intra-predicted samples for the current block based on the MIP being applied to the current block; deriving residual samples for the current block based on the intra-predicted samples; deriving transformation coefficients based on a transformation process for the residual samples; generating residual information based on the transform coefficients; encoding video information including the residual information and information related to the MIP; generating a bitstream containing the encoded video information; The information regarding the MIP includes first flag information relating to whether the MIP is applicable, second flag information relating to whether an intra prediction type for the current block is the MIP, and MIP mode information; the second flag information is signaled based on the first flag information; the first flag information is equal to 1, indicating that the MIP is applicable; the MIP mode information is signaled based on the second flag information; the second flag information is equal to 1, which indicates that the intra prediction type for the current block is the MIP; The MIP mode information is MIP mode index information indicating an MIP mode to be applied to the current block, the MIP mode index information is used to derive a MIP matrix for the current block; the intra-predicted samples are derived using the MIP matrix indicated by the MIP mode index information; The syntax element bin string for the MIP mode information is binarized by a truncated binarization (TB) method, A method wherein the maximum length of the syntax element bin string is determined by the size of the current block.
3. A method for transmitting data for video, comprising: obtaining a bitstream for the video, the bitstream comprising: deriving whether matrix-based intra prediction (MIP) is applied to the current block; deriving intra-predicted samples for the current block based on the MIP being applied to the current block; deriving residual samples for the current block based on the intra-predicted samples; deriving transformation coefficients based on a transformation process for the residual samples; generating residual information based on the transform coefficients; encoding video information including the residual information and information related to the MIP; generating a bitstream including the encoded video information; transmitting the data including the bitstream; The information regarding the MIP includes first flag information relating to whether the MIP is applicable, second flag information relating to whether an intra prediction type for the current block is the MIP, and MIP mode information; the second flag information is signaled based on the first flag information; the first flag information is equal to 1, indicating that the MIP is applicable; the MIP mode information is signaled based on the second flag information; the second flag information is equal to 1, which indicates that the intra prediction type for the current block is the MIP; The MIP mode information is MIP mode index information indicating an MIP mode to be applied to the current block, the MIP mode index information is used to derive a MIP matrix for the current block; the intra-predicted samples are derived using the MIP matrix indicated by the MIP mode index information; The syntax element bin string for the MIP mode information is binarized by a truncated binarization (TB) method, A method wherein the maximum length of the syntax element bin string is determined by the size of the current block.
Citation Information
Patent Citations
Apparatus and method for matrix-based intra prediction
JP7509978B2
Simplified signaling method for affine linear weighted intra prediction mode
US20200322620A1
Simplified signaling method for affine linear weighted intra prediction mode
WO2020205705A1