Matrix-based intra prediction apparatus and method
The matrix-based intra prediction method addresses the need for efficient video coding by utilizing MIP for improved compression efficiency and prediction performance in high-resolution and immersive media.
Patent Information
- Application Number
- JP2025067998
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-06-03
- Filing Date
- 2025-04-17
- Publication Date
- 2026-01-21
- Estimated Expiration
- 2040-06-03
AI Technical Summary
The increasing demand for high-resolution and immersive media has led to a need for highly efficient image/video compression technologies to effectively compress, transmit, and store high-quality image/video information, while existing methods face challenges in improving video coding efficiency and intra prediction.
A matrix-based intra prediction method is employed, where flag information indicates the use of matrix-based intra-prediction (MIP) for current blocks, with MIP mode information binarized using a truncated binarization scheme, and intra-predicted samples are generated through downsampling and upsampling processes, utilizing MIP matrices selected based on block size.
This approach enhances overall image/video compression efficiency by reducing implementation complexity and improving prediction performance through efficient intra prediction.
Smart Images

Figure 0007804123000053 
Figure 0007804123000054 
Figure 0007804123000055
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 flag information indicating whether matrix-based intra-prediction (MIP) is used for a current block; receiving matrix-based intra-prediction (MIP) mode information based on the flag information; generating intra-predicted samples for the current block based on the MIP mode information; and generating reconstructed samples for the current block based on the intra-predicted samples, wherein a bin string of a syntax element for the MIP mode information may be binarized using a truncated binarization scheme.
[0010] The maximum length of the bin string of the syntax element for the MIP mode information can be set to different values depending on the size of the current block.
[0011] The maximum length is set to one of three values according to the size of the current block, and when the width and height of the current block are four, the maximum length may be the largest.
[0012] The MIP mode information can be decoded in a bypass manner.
[0013] The MIP mode information may be index information indicating the MIP mode to be applied to the current block.
[0014] 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.
[0015] 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.
[0016] The MIP matrix can be derived based on the size of the current block and the index information.
[0017] 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.
[0018] 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: determining whether matrix-based intra-prediction (MIP) is applied 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 includes the matrix-based intra-prediction (MIP) mode information, and a bin string of a syntax element for the MIP mode information may be binarized using a truncated binarization scheme.
[0019] According to another embodiment of the present document, a digital storage medium can be provided that stores encoded video information generated by a video encoding method performed by an encoding device and video data including a bitstream.
[0020] 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]
[0021] 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.
[0022] 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]
[0023] [Figure 1] 1 is a diagram illustrating the configuration of a video / image encoding device that can be applied to embodiments of the present document;
[0024] [Figure 2] 1 is a diagram illustrating the configuration of a video / image decoding device that can be applied to an embodiment of the present document.
[0025] [Figure 3] Illustrates an example of CABAC (context-adaptive binary arithmetic coding) for encoding syntax elements.
[0026] [Figure 4] 1 illustrates an example of a general intra-prediction based video encoding method to which embodiments of the present document can be applied.
[0027] [Figure 5] 1 illustrates a schematic diagram of an intra-prediction unit in an encoding device.
[0028] [Figure 6] 1 illustrates an example of a general intra-prediction based video decoding method to which embodiments of the present document can be applied.
[0029] [Figure 7] 1 illustrates a schematic diagram of an intra-prediction unit in a decoding device.
[0030] [Figure 8] 1 illustrates an example of an intra-prediction mode to which embodiments of this document can be applied.
[0031] [Figure 9] FIG. 10 is a diagram illustrating a procedure for generating predicted samples based on MIP according to an example.
[0032] [Figure 10] FIG. 1 illustrates the MIP procedure for a 4×4 block.
[0033] [Figure 11] FIG. 1 illustrates the MIP procedure for an 8×8 block.
[0034] [Figure 12] FIG. 1 illustrates the MIP procedure for an 8x4 block.
[0035] [Figure 13] FIG. 1 illustrates the MIP procedure for a 16×16 block.
[0036] [Figure 14] FIG. 10 is a diagram illustrating a boundary averaging procedure in the MIP procedure.
[0037] [Figure 15] FIG. 1 is a diagram illustrating linear interpolation in the MIP procedure.
[0038] [Figure 16] FIG. 1 is a diagram illustrating an MIP technique according to an example of this document.
[0039] [Figure 17]1 is a flowchart illustrating a decoding method that can be performed by a decoding device according to an embodiment of the present document.
[0040] [Figure 18] 1 is a flowchart illustrating an encoding method that can be performed by an encoding device according to an embodiment of the present document.
[0041] [Figure 19] 1 illustrates schematically an example of a video / image coding system to which embodiments of the present document can be applied.
[0042] [Figure 20] 1 illustrates an example of a content streaming system to which the embodiments disclosed herein may be applied. DETAILED DESCRIPTION OF THE INVENTION
[0043] 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.
[0044] 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.
[0045] 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."
[0046] 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."
[0047] 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."
[0048] 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."
[0049] 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."
[0050] Technical features individually described in one drawing in this document may be embodied individually or simultaneously.
[0051] 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).
[0052] This document presents various embodiments relating to video / image coding, which may be implemented in combination with one another unless otherwise specified.
[0053] 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.
[0054] 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.
[0055] 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.
[0056] 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.
[0057] 1 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.
[0058] Referring to FIG. 1, the encoding apparatus 100 may include an image partitioner 110, a predictor 120, a residual processor 130, an entropy encoder 140, an adder 150, a filter 160, and a memory 170. The predictor 120 may include an inter predictor 121 and an intra predictor 122. The residual processor 130 may include a transformer 132, a quantizer 133, a dequantizer 134, and an inverse transformer 135. The residual processor 130 may further include a subtractor 131. The adder 150 may be referred to as a reconstructor or a reconstructed block generator. The image dividing unit 110, the predicting unit 120, the residual processing unit 130, the entropy encoding unit 140, the adding unit 150, and the filtering unit 160 may be configured by one or more hardware components (e.g., an encoder chipset or a processor) depending on the embodiment. Also, the memory 170 may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware components may further include the memory 170 as an internal / external component.
[0059] The image division unit 110 may divide an input image (or picture or frame) input to the encoding device 100 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.
[0060] 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).
[0061] The encoding apparatus 100 may subtract a prediction signal (predicted block, prediction sample array) output from the inter prediction unit 121 or the intra prediction unit 122 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 132. In this case, as shown, a unit in the encoding apparatus 100 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 the subtraction unit 131. 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 140, as will be described later in the description of each prediction mode. The prediction information can be encoded by the entropy encoding unit 140 and output in the form of a bitstream.
[0062] The intra prediction unit 122 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 122 may also determine the prediction mode to be applied to the current block using the prediction modes applied to neighboring blocks.
[0063] The inter prediction unit 121 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 (L0 prediction, L1 prediction, Bi prediction, etc.). 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), etc., and the reference picture including the temporal neighboring block may be called a collocated picture (colPic). For example, the inter predictor 121 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 121 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.
[0064] The predictor 120 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 in this document. 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.
[0065] The prediction signal generated by the prediction unit (including the inter prediction unit 121 and / or the intra prediction unit 122) may be used to generate a reconstructed signal or a residual signal. The transform unit 132 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. In addition, the transform process may be applied to pixel blocks having the same square size or to non-square blocks of variable sizes.
[0066] The quantization unit 133 quantizes the transform coefficients and transmits the quantized signal to the entropy encoding unit 140. The entropy encoding unit 140 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 133 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 140 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 140 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 140 and / or a storage unit (not shown) for storing the signal may be configured as an internal / external element of the encoding apparatus 100, or the transmitter may be included in the entropy encoding unit 140.
[0067] The quantized transform coefficients output from the quantization unit 133 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 134 and the inverse transform unit 135. The adder 155 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 121 or the intra prediction unit 122. When there is no residual for the current block, such as when skip mode is applied, the predicted block can 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.
[0068] Meanwhile, luma mapping with chroma scaling (LMCS) can be applied during picture encoding and / or reconstruction.
[0069] The filtering unit 160 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 160 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture and store the modified reconstructed picture in the memory 170, specifically, in the DPB of the memory 170. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc. The filtering unit 160 may generate various information related to filtering and transmit it to the entropy encoding unit 140, as will be described later in connection with each filtering method. The filtering information may be encoded by the entropy encoding unit 140 and output in the form of a bitstream.
[0070] The modified reconstructed picture transmitted to the memory 170 can be used as a reference picture in the inter prediction unit 121. When inter prediction is applied through this, the encoding apparatus can avoid a mismatch in prediction between the encoding apparatus 100 and the decoding apparatus, and can also improve coding efficiency.
[0071] The DPB of the memory 170 may store the modified reconstructed picture to be used as a reference picture in the inter predictor 121. The memory 170 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 121 to be used as motion information of a spatially neighboring block or a temporally neighboring block. The memory 170 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra predictor 122.
[0072] FIG. 2 is a diagram illustrating the configuration of a video / image decoding device that can be applied to the embodiments of this document.
[0073] Referring to FIG. 2, the decoding device 200 may be configured to include an entropy decoder 210, a residual processor 220, a predictor 230, an adder 240, a filter 250, and a memory 260. The predictor 230 may include an inter predictor 231 and an intra predictor 232. The residual processor 220 may include a dequantizer 221 and an inverse transformer 222. Depending on the embodiment, the entropy decoding unit 210, the residual processor 220, the predictor 230, the adder 240, and the filter 250 may be configured as a single hardware component (e.g., a decoder chipset or processor). In addition, the memory 260 may include a decoded picture buffer (DPB) and may be configured as a digital storage medium. The hardware components may further include a memory 260 as an internal / external component.
[0074] When a bitstream including video / image information is input, the decoding apparatus 200 can reconstruct an image corresponding to the process by which the video / image information was processed by the encoding apparatus of FIG. 1. For example, the decoding apparatus 200 can derive units / blocks based on information about block division obtained from the bitstream. The decoding apparatus 200 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 200 can be played back via a playback device.
[0075] The decoding apparatus 200 may receive a signal output from the encoding apparatus of FIG. 1 in the form of a bitstream, and the received signal may be decoded via the entropy decoding unit 210. For example, the entropy decoding unit 210 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 210 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 210 may be provided to a prediction unit (inter prediction unit 232 and intra prediction unit 231), and residual values entropy-decoded by the entropy decoding unit 210, i.e., quantized transform coefficients and related parameter information, may be input to the residual processing unit 220. The residual processing unit 220 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 210 may be provided to the filtering unit 250. Meanwhile, a receiving unit (not shown) for receiving a signal output from the encoding apparatus may be further configured as an internal / external element of the decoding apparatus 200, or the receiving unit may be a component of the entropy decoding unit 210. Meanwhile, the decoding device according to this document may be called 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 210, and the sample decoder may include at least one of the inverse quantization unit 221, the inverse transform unit 222, the addition unit 240, the filtering unit 250, the memory 260, the inter prediction unit 232, and the intra prediction unit 231.
[0076] The inverse quantization unit 221 may inverse quantize the quantized transform coefficients and output the transform coefficients. The inverse quantization unit 221 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 221 may perform inverse quantization on the quantized transform coefficients using a quantization parameter (e.g., quantization step size information) to obtain transform coefficients.
[0077] The inverse transform unit 222 performs inverse transform on the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0078] 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 210, and may determine a specific intra / inter prediction mode.
[0079] The predictor 220 may generate a prediction signal based on various prediction methods, which will be described later. For example, the predictor may not only apply intra prediction or inter prediction for predicting a block, but also 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.
[0080] The intra prediction unit 231 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 231 may also determine a prediction mode to be applied to the current block using prediction modes applied to neighboring blocks.
[0081] The inter prediction unit 232 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 present in the current picture and temporal neighboring blocks present in the reference picture. For example, the inter prediction unit 232 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.
[0082] The adder 240 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the acquired residual signal to a prediction signal (predicted block, predicted sample array) output from a prediction unit (including the inter prediction unit 232 and / or the intra prediction unit 231). 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.
[0083] The adder 240 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, and may be output after filtering, as described below, or may be used for inter prediction of a next picture.
[0084] Meanwhile, LMCS (luma mapping with chroma scaling) can be applied during picture decoding.
[0085] The filtering unit 250 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 250 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 260, specifically, to the DPB of the memory 260. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc.
[0086] The (modified) reconstructed picture stored in the DPB of the memory 260 can be used as a reference picture in the inter predictor 232. The memory 260 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 232 to be used as motion information of a spatially neighboring block or a temporally neighboring block. The memory 260 can store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra predictor 231.
[0087] In this document, the embodiments described for the filtering unit 160, inter prediction unit 121, and intra prediction unit 122 of the encoding device 100 can also be applied identically or correspondingly to the filtering unit 250, inter prediction unit 232, and intra prediction unit 231 of the decoding device 200, respectively.
[0088] 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.
[0089] 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.
[0090] Meanwhile, as described above, the encoding device can perform various encoding methods such as exponential Golomb, CAVLC (context-adaptive variable length coding), CABAC (context-adaptive binary arithmetic coding), etc. Also, the decoding device can 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.
[0091] For example, the coding method described above can be performed as follows:
[0092] FIG. 3 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.
[0093] 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.
[0094] 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.
[0095] Entropy decoding can refer to a process of performing the same process as the entropy encoding in reverse order.
[0096] 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.
[0097] 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.
[0098] 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.
[0099] 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.
[0100] 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.
[0101] 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.
[0102] 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.
[0103] 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.
[0104] 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.
[0105] 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.
[0106] 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.
[0107] 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.
[0108] 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.
[0109] 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.
[0110] 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.
[0111] 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).
[0112] 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.
[0113] 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.
[0114] 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.
[0115] 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).
[0116] 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.
[0117] 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.
[0118] 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.
[0119] Figure 4 illustrates an example of a video encoding method based on intra prediction to which embodiments of the present document can be applied, and Figure 5 illustrates an intra prediction unit in an encoding device. The intra prediction unit in the encoding device of Figure 5 may be applied in the same or corresponding manner to the intra prediction unit 122 of the encoding device 100 of Figure 1 described above.
[0120] 4 and 5, S400 may be performed by the intra prediction unit 122 of the encoding apparatus, and S410 may be performed by the residual processing unit 130 of the encoding apparatus. Specifically, S410 may be performed by the subtraction unit 131 of the encoding apparatus. In S420, prediction information may be derived by the intra prediction unit 122 and encoded by the entropy encoding unit 140. In S420, residual information may be derived by the residual processing unit 130 and encoded by the entropy encoding unit 140. 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 132 of the encoding apparatus, and the transform coefficients may be derived as quantized transform coefficients through the quantization unit 133. Information about the quantized transform coefficients may be encoded by the entropy encoding unit 140 through a residual coding procedure.
[0121] The encoding apparatus performs intra prediction on a current block (S400). 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 steps of determining the intra prediction mode / type, deriving the neighboring reference samples, and generating predicted samples may be performed simultaneously, or one step may be performed before the other.
[0122] For example, the intra prediction unit 122 of the encoding apparatus may include an intra prediction mode / type determination unit 122-1, a reference sample derivation unit 122-2, and a prediction sample derivation unit 122-3, where the intra prediction mode / type determination unit 122-1 determines the intra prediction mode / type for a current block, the reference sample derivation unit 122-2 derives neighboring reference samples for the current block, and the prediction sample derivation unit 122-3 derives a prediction sample for the current block. Meanwhile, although not shown, if a prediction sample filtering procedure is performed, the intra prediction unit 122 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 multiple intra prediction modes / types. The encoding apparatus may compare RD costs for the intra prediction modes / types to determine an optimal intra prediction mode / type for the current block.
[0123] 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.
[0124] The encoding apparatus generates residual samples for the current block based on the (filtered) predicted samples (S410). 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.
[0125] The encoding apparatus may encode video information including information related to intra prediction (prediction information) and residual information related to residual samples (S420). 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.
[0126] 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.
[0127] 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.
[0128] 6 illustrates an example of a video decoding method based on intra prediction to which an embodiment of this document can be applied, and FIG. 7 illustrates an intra prediction unit in a decoding device. The intra prediction unit in the decoding device of FIG. 7 may be applied in the same manner or in a corresponding manner to the intra prediction unit 231 of the decoding device 200 of FIG. 2 described above.
[0129] 6 and 7, the decoding apparatus may perform operations corresponding to those performed by the encoding apparatus described above. Steps S600 to S620 may be performed by the intra prediction unit 231 of the decoding apparatus, and the prediction information of S600 and the residual information of S630 may be obtained from a bitstream by the entropy decoding unit 210 of the decoding apparatus. The residual processing unit 220 of the decoding apparatus may derive residual samples for the current block based on the residual information. Specifically, the inverse quantization unit 221 of the residual processing unit 220 may derive transform coefficients by performing inverse quantization on the quantized transform coefficients derived based on the residual information, and the inverse transform unit 222 of the residual processing unit may perform inverse transform on the transform coefficients to derive residual samples for the current block. Step S640 may be performed by the adder 240 or a reconstruction unit of the decoding apparatus.
[0130] The decoding apparatus may derive an intra-prediction mode / type for a current block based on received prediction information (intra-prediction mode / type information) (S600). The decoding apparatus may derive neighboring reference samples for the current block (S610). The decoding apparatus generates prediction samples within the current block based on the intra-prediction mode / type and the neighboring reference samples (S620). 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.
[0131] The decoding apparatus generates residual samples for the current block based on the received residual information (S630). 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 (S640). 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.
[0132] Here, the intra prediction unit 231 of the decoding device may include an intra prediction mode / type determination unit 231-1, a reference sample derivation unit 231-2, and a prediction sample derivation unit 231-3, where the intra prediction mode / type determination unit 231-1 determines the intra prediction mode / type for the current block based on intra prediction mode / type information acquired from the entropy decoding unit 210, the reference sample derivation unit 231-2 derives neighboring reference samples for the current block, and the prediction sample derivation unit 231-3 derives prediction samples for the current block. Meanwhile, although not shown, if the above-mentioned prediction sample filtering procedure is performed, the intra prediction unit 231 may further include a prediction sample filter unit (not shown).
[0133] 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.
[0134] 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.
[0135] 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.
[0136] 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.
[0137] 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.
[0138] 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.
[0139] FIG. 8 shows an example of an intra prediction mode to which the embodiments of this document can be applied.
[0140] Referring to FIG. 8, intra prediction modes can be divided into those with horizontal directionality and those with vertical directionality, centered around intra prediction mode No. 34, which has a prediction direction of the upper left diagonal. In FIG. 8, H and V represent horizontal and vertical directionality, respectively, and the numbers -32 to 32 represent 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.
[0141] 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.
[0142] Below, we will look at MIP (Matrix-based intra prediction), which is one method of intra prediction.
[0143] 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.
[0144] FIG. 9 is a diagram illustrating a procedure for generating MIP-based predicted samples according to an example. The MIP procedure will be described below with reference to FIG.
[0145] 1. Averaging process
[0146] Of the boundary samples, 4 samples are extracted by the averaging procedure if W=H=4, and 8 samples in all other cases.
[0147] 2. Matrix vector multiplication process
[0148] The averaged samples are input and subjected to matrix-vector multiplication, followed by an offset, to derive a reduced prediction sample for the subsampled sample set within the original block.
[0149] 3. (Linear) Interpolation process
[0150] 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.
[0151] The matrices and offset vectors required to generate the prediction blocks or samples can be selected from three sets of matrices S0, S1, S2.
[0152] 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.
[0153] 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.
[0154] 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.
[0155] 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.
[0156] Below, the general MIP procedure is outlined. The remaining blocks not described below can be processed in any of the four cases described.
[0157] 10 to 13 are diagrams showing MIP procedures depending on the block size, where FIG. 10 is a diagram showing the MIP procedure for a 4x4 block, FIG. 11 is a diagram showing the MIP procedure for an 8x8 block, FIG. 12 is a diagram showing the MIP procedure for an 8x4 block, and FIG. 13 is a diagram showing the MIP procedure for a 16x16 block.
[0158] As shown in Figure 10, 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.
[0159] Given an 8x8 block, MIP averages four samples along each axis of the boundary, as shown in Figure 11. The resulting eight input samples are inputs to a matrix-vector multiplication, where the matrix comes from set S1. The matrix-vector multiplication produces 16 samples in odd positions.
[0160] 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.
[0161] Given an 8x4 block, as shown in Figure 12, MIP averages four samples along the horizontal axis of the boundary, and uses the four samples from 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.
[0162] 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.
[0163] As shown in Figure 13, 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.
[0164] 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.
[0165] 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.
[0166] 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. kTherefore, 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.
[0167] If a matrix is prepended, it can be processed accordingly.
[0168] 14 is a diagram for explaining the boundary averaging procedure of the MIP procedure. The averaging procedure will be specifically explained with reference to FIG.
[0169] 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.
[0170] 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.
[0171] The first step in the averaging procedure is to calculate the input boundary (bdry left and bdry top ) to a smaller boundary. JPEG0007804123000001.jpg10127. JPEG0007804123000002.jpg11125 consists of 2 samples in the 4x4 block case, and 4 samples in all remaining different cases.
[0172] In the case of 4x4 blocks, for 0≦i<2 JPEG0007804123000003.jpg13150 can be expressed as the following formula: JPEG0007804123000004.jpg13143 can also be defined similarly.
[0173]
number
[0174] On the other hand, for 0≦i<4, the block width is W=4×2 k Given this, JPEG0007804123000006.jpg14156 can be expressed by the following formula: JPEG0007804123000007.jpg17151 can also be defined similarly.
[0175]
number
[0176] Two reduced boundaries JPEG0007804123000009.jpg12121 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.
[0177] If "mode" refers to the MIP mode, the reduced boundary vector bdry red The 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.
[0178]
number
[0179] 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."
[0180] 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, JPEG0007804123000011.jpg14148 If the width is equal to or greater than the height (W≧H), then W=8*2 l For 0≦i<8, JPEG0007804123000012.jpg14154 can be defined as follows: In addition, if the smaller value of the width or height is greater than 8, JPEG0007804123000013.jpg12142, height is greater than width (H>W) JPEG0007804123000014.jpg14145 can also be defined similarly.
[0181]
number
[0182] Next, we will look at the procedure for generating downsized prediction samples by matrix-vector multiplication.
[0183] The reduced input vector bdry red One of the prediction samples is reduced Generate JPEG0007804123000016.jpg12156. The predicted samples are of width W red and height H red where W red and H red is defined as follows:
[0184]
number
[0185] Reduced prediction sample JPEG0007804123000018.jpg15163 can be calculated by adding an offset after matrix vector multiplication, and can be derived through the following formula:
[0186]
number
[0187] 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.
[0188] 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.
[0189]
number
[0190]
number
[0191] If idx is 1 or less (idx≦1), or if idx is 2 and the smaller of W and H is greater than 4, JPEG0007804123000022.jpg14144, A is JPEG0007804123000023.jpg13137, b is JPEG0007804123000024.jpg12132 is set. idx is 2, and the smaller value of W and H is 4. JPEG0007804123000025.jpg11140, if W is 4, A corresponds to odd x coordinates within the downsampled block JPEG0007804123000026.jpg12139 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 JPEG0007804123000027.jpg12141 removed.
[0192] Finally, the downscaled prediction samples can be replaced by their transpose in Equation 9.
[0193]
number
[0194] The number of multiplications required to compute JPEG0007804123000029.jpg11137 is 4 when W=H=4, because A consists of 4 columns and 16 rows. In all other cases, A consists of 8 columns and W red ×h red It consists of lines, It can be seen that to calculate JPEG0007804123000030.jpg10127, a maximum of four multiplications per sample are required.
[0195] FIG. 15 is a diagram for explaining linear interpolation in the MIP procedure. Referring to FIG. 15, the linear interpolation procedure is specifically described as follows.
[0196] 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.
[0197] 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.
[0198] For a W×H block that is JPEG0007804123000031.jpg11133, the predicted samples are W red ×H red downsampled predicted samples above derived from JPEG0007804123000032.jpg13149. Depending on the block form, 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.
[0199] For a W×H block that is JPEG0007804123000033.jpg13143 and where W >= H, it can be considered that there is no loss of generality. Then, 1D linear interpolation is performed as follows. If there is no loss of generality, the linear interpolation for the vertical direction is fully explained.
[0200] First, the downsampled predicted samples are extended upward by the boundary signal. The coefficient of vertical upsampling is defined as JPEG0007804123000034.jpg13134, If you set JPEG0007804123000035.jpg14130, you can set the predicted sample for the extended reduction as follows:
[0201]
number
[0202] Then, vertical linear interpolation prediction samples can be generated from these expanded downscaled prediction samples by the following formula:
[0203]
number
[0204] where x is 0≦x <W red , y, 0≦y <H red , k is 0≦k ver It could be.
[0205] 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.
[0206] 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.
[0207] 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.
[0208] 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.
[0209] 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.
[0210] 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.
[0211] 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.
[0212] 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.
[0213] 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.
[0214] [Table 1]
[0215] 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.
[0216] 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.
[0217] 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.
[0218] 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.
[0219] Meanwhile, intra_mip_mode_idx can be encoded and decoded using a truncated binarization scheme as shown in the table below.
[0220] [Table 2]
[0221] 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)?).
[0222] 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.
[0223] 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.
[0224] [Table 3]
[0225] 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).
[0226] 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).
[0227] This is shown in the table below.
[0228] [Table 4]
[0229] In Table 4, if K1=5, K2=4, and K3=3, intra_mip_mode can be binarized as follows:
[0230] [Table 5]
[0231] 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.
[0232] 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%).
[0233] According to this embodiment, the syntax including the specific conditions under which the MIP technique is applied is as follows:
[0234] [Table 6]
[0235] 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.
[0236] The table below shows an example where K1 and K2 are predefined as 8 in Table 6.
[0237] [Table 7]
[0238] The semantics for intra_mip_flag and intra_mip_mode_idx in Tables 6 and 7 are the same as in Table 1.
[0239] 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:
[0240] [Table 8]
[0241] 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:
[0242] [Table 9]
[0243] In both Tables 8 and 9, intra_mip_mode_idx can be coded in a bypass manner.
[0244] 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%).
[0245] FIG. 16 is a diagram for explaining the MIP technique according to an example of this document.
[0246] As shown, FIG. 16(a) shows the operation of the matrix and offset vector for index i of the large block, and FIG. 16(b) shows the operation of the sampled matrix and offset vector applied to the small block.
[0247] As shown in Figure 16, 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.
[0248] 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.
[0249] 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.
[0250] 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.
[0251] [Table 10]
[0252] 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.
[0253] [Table 11]
[0254] 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%).
[0255] [Table 12]
[0256] 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.
[0257] The following table shows experimental results when, as in the above-described embodiment, the derivation of MPM is omitted when applying MIP to the current block, and signals related to MPM are also not signaled.
[0258] The experiments were conducted under the normal test conditions defined in JVET-N1010 and based on the reference software VTM 5.0.
[0259] [Table 13]
[0260] [Table 14]
[0261] [Table 15]
[0262] FIG. 17 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.
[0263] The method disclosed in Figure 17 may be performed by the decoding apparatus 200 disclosed in Figure 2. Specifically, steps S1700 to S1750 of Figure 17 may be performed by the entropy decoding unit 210 and / or the prediction unit 230 (specifically, the intra prediction unit 231) disclosed in Figure 2, and step S1760 of Figure 17 may be performed by the addition unit 240 disclosed in Figure 2. In addition, the method disclosed in Figure 17 may include the embodiments described above in this document. Therefore, in Figure 17, detailed descriptions of content that overlaps with the embodiments described above will be omitted or simplified.
[0264] Referring to FIG. 17, the decoding device can receive, i.e., obtain from the bitstream, flag information indicating whether matrix-based intra prediction (MIP) is used for the current block (S1700).
[0265] Such flag information can be signaled by being included in the syntax information of the coding unit using syntax such as intra_mip_flag.
[0266] The decoding apparatus may receive matrix-based intra-prediction (MIP) mode information based on the received flag information (S1710).
[0267] 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.
[0268] 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.
[0269] 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.
[0270] The decoding apparatus may binarize the bin string of the syntax element for the MIP mode information using a truncated binarization method and decode it using a bypass method (S1720).
[0271] As described above, the maximum length of the bin string of the syntax element for MIP mode information can be set to different values depending on the size of the current block. This maximum length can be set to three values depending on the size of the current block, as shown in Table 2 or Table 3, and the maximum length can be the largest when the width and height of the current block are 4.
[0272] For example, in Table 2, if the width and height of the coding block are 4, the maximum length of binarization is set to 34, and in Table 3, it can be set to 15.
[0273] Also, such MIP mode information can be decoded in a bypass manner rather than in a context modeling manner.
[0274] Meanwhile, intra_mip_flag can be binarized with a fixed length code.
[0275] When MIP is applied, the decoding apparatus can downsample reference samples adjacent to the current block to derive reduced boundary samples (S1730).
[0276] The reduced boundary samples can be derived by downsampling through averaging of the reference samples.
[0277] 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.
[0278] 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.
[0279] 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.
[0280] Thereafter, the decoding apparatus can derive scaled prediction samples by multiplying the MIP matrix derived based on the size and index information of the current block by the scaled boundary samples (S1740).
[0281] The MIP matrix can be derived based on the size of the current block and the received index information.
[0282] 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.
[0283] 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.
[0284] 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.
[0285] 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.
[0286] 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.
[0287] After the operation of multiplying the MIP matrix by the reduced boundary samples, a reduced predicted sample, that is, a predicted sample to which the MIP matrix is applied, is derived based on the operation of adding an offset.
[0288] The decoding device can upsample the reduced predicted sample to generate an intra prediction sample for the current block (S1750).
[0289] The intra prediction sample can be upsampled by linear interpolation of the reduced predicted sample.
[0290] 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.
[0291] 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.
[0292] The decoding device can generate a restored sample for the current block based on the predicted sample (S1760).
[0293] 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.
[0294] 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.
[0295] FIG. 18 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.
[0296] The method disclosed in FIG. 18 may be performed by the encoding apparatus 100 disclosed in FIG. 1. Specifically, steps S1800 to S1830 of FIG. 18 may be performed by the prediction unit 120 (specifically, the intra prediction unit 122) disclosed in FIG. 1, step S1840 of FIG. 18 may be performed by the subtraction unit 131 disclosed in FIG. 1, and steps S1850 and S1860 of FIG. 18 may be performed by the entropy encoding unit 140 disclosed in FIG. 1. In addition, the method disclosed in FIG. 18 may include the embodiments described above in this document. Therefore, in FIG. 18, detailed descriptions of content that overlaps with the above-described embodiments will be omitted or simplified.
[0297] Referring to FIG. 18, the encoding apparatus may determine whether matrix-based intra prediction (MIP) is applied to a current block (S1800).
[0298] 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).
[0299] 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 (S1810).
[0300] The reduced boundary samples can be derived by downsampling through averaging of reference samples.
[0301] 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.
[0302] 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.
[0303] 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.
[0304] 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 with an MIP matrix selected based on the size of the current block (S1820).
[0305] 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.
[0306] 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.
[0307] 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.
[0308] 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.
[0309] 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.
[0310] After the multiplication operation of the MIP matrix and the reduced boundary samples, a reduced predicted sample can be derived based on the operation of adding an offset, that is, a predicted sample to which the MIP matrix is applied.
[0311] Thereafter, the encoding device can upsample the reduced predicted sample to generate an intra prediction sample for the current block (S1830).
[0312] The intra prediction sample can be upsampled by linear interpolation of the reduced predicted sample.
[0313] 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.
[0314] 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.
[0315] 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 (S1840).
[0316] Then, the encoding device can evolve the bin string of the syntax element for the MIP mode information in a truncated binary evolution manner and encode it in a bypass mode (S1850).
[0317] As described above, the maximum length of the bin string of the syntax element for the MIP mode information can be set to different values according to the size of the current block. Such a maximum length can be set to three values according to the size of the current block as in Table 2 or Table 3, and when the width and height of the current block are 4, the maximum length may be the largest.
[0318] For example, in Table 2, if the width and height of the coding block are 4, the maximum length of binarization is set to 34, and in Table 3, it can be set to 15.
[0319] In addition, such MIP mode information can be encoded in a bypass manner rather than in a context modeling manner.
[0320] Meanwhile, intra_mip_flag can be binarized with a fixed length code.
[0321] The encoding device generates residual information for the current block based on the residual sample, and can output image information including the generated residual information, flag information indicating whether MIP is applied, and MIP mode information in the form of a bitstream (S1860).
[0322] 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.
[0323] Flag information indicating whether MIP is applied can be encoded by being included in syntax information of a coding unit using syntax such as intra_mip_flag.
[0324] Furthermore, MIP mode information may be expressed as 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 any one of the multiple MIP matrices included in one matrix set.
[0325] Also, according to an 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.
[0326] 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.
[0327] 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.
[0328] The process of generating a prediction sample for the current block described above can be performed by the intra prediction unit 122 of the encoding device 100 disclosed in FIG. 1, the process of deriving a residual sample can be performed by the subtraction unit 131 of the encoding device 100 disclosed in FIG. 1, and the process of generating and encoding residual information can be performed by the residual processing unit 130 and the entropy encoding unit 140 of the encoding device 100 disclosed in FIG. 1.
[0329] 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.
[0330] 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.
[0331] 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.
[0332] 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.
[0333] 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.
[0334] 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.
[0335] FIG. 19 illustrates schematically an example of a video / image coding system that can be applied to embodiments of this document.
[0336] 19, 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.
[0337] 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 also include a display unit, which may be a separate device or an external component.
[0338] 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.
[0339] 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.
[0340] 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.
[0341] 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.
[0342] The renderer can render the decoded video / image, and the rendered video / image can be displayed via a display unit.
[0343] FIG. 20 illustrates an example of a content streaming system to which the embodiments disclosed herein can be applied.
[0344] Referring to FIG. 20, a 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.
[0345] 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.
[0346] 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.
[0347] 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.
[0348] 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.
[0349] 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.
[0350] 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.
[0351] 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: obtaining residual information from the bitstream; obtaining flag information from the bitstream relating to whether matrix-based intra prediction (MIP) is used for the current block; obtaining MIP mode information based on a value of the flag information being equal to 1, the value of the flag information being equal to 1 being associated with indicating that the MIP is used for the current block; deriving a MIP matrix based on the MIP mode information and the size of the current block; generating intra-predicted samples for the current block based on the MIP matrix; 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 index information related to the MIP matrix applied to the current block; The bin string of the syntax element for the MIP mode information is binarized by a truncated binary (TB) binarization method, The maximum length of the bin string of the syntax element is: i) whether the width and height of the current block are 4; ii) whether the width and height of the current block are equal to or less than 8; iii) set to three different values based on whether the width and height of the current block are greater than 8; The method, wherein the maximum length has the largest value based on the width and height of the current block being 4.
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 a MIP matrix based on the MIP applied to the current block; generating intra-predicted samples for the current block based on the MIP matrix; generating flag information relating to whether the MIP is applied to the current block; deriving residual samples for the current block based on the intra-predicted samples; deriving transform coefficients based on the residual samples; generating residual information based on the transform coefficients; encoding video information including the flag information and the residual information; If the value of the flag information is equal to 1, the video information includes MIP mode information; The value of the flag information equal to 1 indicates that the MIP is applied to the current block; the MIP mode information is index information related to the MIP matrix applied to the current block; The bin string of the syntax element for the MIP mode information is binarized by a truncated binary (TB) binarization method, The maximum length of the bin string of the syntax element is: i) whether the width and height of the current block are 4; ii) whether the width and height of the current block are equal to or less than 8; iii) set to three different values based on whether the width and height of the current block are greater than 8; The maximum length has the largest value based on the width and height of the current block being 4, A method in which a MIP matrix is derived based on the MIP mode information and the size of the current block.
3. In a method for transmitting video data, obtaining a bitstream relating to the video, the bitstream comprising: deriving whether matrix-based intra prediction (MIP) is applied to the current block; deriving a MIP matrix based on the MIP applied to the current block; generating intra-predicted samples for the current block based on the MIP matrix; generating flag information relating to whether the MIP is applied to the current block; deriving residual samples for the current block based on the intra-predicted samples; deriving transform coefficients based on the residual samples; generating residual information based on the transform coefficients; encoding video information including the flag information and the residual information; transmitting the data including the bitstream; If the value of the flag information is equal to 1, the video information includes MIP mode information; The value of the flag information equal to 1 indicates that the MIP is applied to the current block; the MIP mode information is index information related to the MIP matrix applied to the current block; The bin string of the syntax element for the MIP mode information is binarized by a truncated binary (TB) binarization method, The maximum length of the bin string of the syntax element is: i) whether the width and height of the current block are 4; ii) whether the width and height of the current block are equal to or less than 8; iii) set to three different values based on whether the width and height of the current block are greater than 8; The maximum length has the largest value based on the width and height of the current block being 4, A method in which a MIP matrix is derived based on the MIP mode information and the size of the current block.