Image encoding / decoding method and device for utilizing simplified mpm list generation method and method for transmitting bitstream
By mapping intra prediction modes to predetermined modes and generating candidate lists based on neighboring block prediction modes, the method improves encoding/decoding efficiency and reduces costs for high-resolution image transmission and storage.
Patent Information
- Application Number
- JP2025098469
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2019-06-13
- Filing Date
- 2025-06-12
- Publication Date
- 2025-08-15
AI Technical Summary
The increasing demand for high-resolution, high-quality images leads to a significant increase in transmission and storage costs due to the higher amount of information, necessitating more efficient image compression techniques.
An image encoding/decoding method that reduces prediction complexity by mapping intra prediction modes of surrounding blocks to predetermined modes, such as planar, DC, and vertical modes, and generates a candidate intra prediction mode list based on neighboring block prediction modes.
This approach enhances encoding/decoding efficiency and reduces prediction complexity while enabling effective transmission and storage of high-resolution images.
Smart Images

Figure 2025120422000001_ABST
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to an image encoding / decoding method and apparatus, and more particularly to an image encoding / decoding method and apparatus for signaling intra-prediction modes, and a method for transmitting a bitstream generated by the image encoding method / apparatus of the present disclosure. [Background technology]
[0002] Recently, demand for high-resolution, high-quality images, such as HD (High Definition) images and UHD (Ultra High Definition) images, has been increasing in various fields. As image data becomes higher in resolution and quality, the amount of information or bits to be transmitted increases relatively compared to conventional image data. The increase in the amount of information or bits to be transmitted results in an increase in transmission costs and storage costs.
[0003] This requires highly efficient image compression techniques for effectively transmitting, storing, and reproducing high-resolution, high-quality image information. Summary of the Invention [Problem to be solved by the invention]
[0004] An object of the present disclosure is to provide an image encoding / decoding method and apparatus with improved encoding / decoding efficiency.
[0005] Another object of the present disclosure is to provide an image encoding / decoding method and apparatus that can reduce prediction complexity by mapping the intra prediction modes of surrounding blocks to a predetermined prediction mode.
[0006] Another object of the present disclosure is to provide a method for transmitting a bitstream generated by the image encoding method or apparatus according to the present disclosure.
[0007] Another object of the present disclosure is to provide a recording medium storing a bitstream generated by the image encoding method or apparatus according to the present disclosure.
[0008] Another object of the present disclosure is to provide a recording medium storing a bitstream that is received by an image decoding device according to the present disclosure, decoded, and used to restore an image.
[0009] The technical problems to be solved by the present disclosure are not limited to the above-mentioned technical problems, and other technical problems not described above will be clearly understood by a person having ordinary skill in the technical field to which the present disclosure pertains from the following description. [Means for solving the problem]
[0010] An image decoding method performed by an image decoding apparatus according to one aspect of the present disclosure includes the steps of: identifying a prediction mode of a current block; if the prediction mode of the current block is an intra prediction mode, identifying whether the intra prediction mode of the current block is a matrix-based intra prediction (MIP) mode; if the intra prediction mode of the current block is not an MIP mode, determining a candidate intra prediction mode for the current block based on prediction modes of neighboring blocks located around the current block; generating a candidate intra prediction mode list for the current block based on the candidate intra prediction modes; and determining the intra prediction mode of the current block based on the candidate intra prediction mode list. If the prediction mode of the neighboring blocks is an MIP mode, the candidate intra prediction mode may be determined to be a predetermined intra prediction mode. The predetermined intra prediction mode may be any one of a planar mode, a DC mode, a horizontal mode, and a vertical mode.
[0011] Whether the prediction mode of the surrounding block is the MIP mode is determined based on a MIP mode indicator for the surrounding block, and the MIP mode indicator may be obtained from a bitstream.
[0012] The candidate intra prediction mode list may be generated based on a first candidate intra prediction mode and a second candidate intra prediction mode, where the first candidate intra prediction mode is determined based on the prediction mode of a first neighboring block located around the current block, and the second candidate intra prediction mode is determined based on the prediction mode of a second neighboring block located around the current block.
[0013] If the first candidate intra prediction mode and the second candidate intra prediction mode are the same and the first candidate intra prediction mode is an intra prediction mode having a value greater than a prediction mode value indicating DC mode, the candidate intra prediction mode list may be determined to include the value of the first candidate intra prediction mode.
[0014] When the prediction mode of the first surrounding block and the prediction mode of the second surrounding block are both MIP modes, the candidate intra-prediction mode list may be determined to include a predetermined candidate intra-prediction mode.
[0015] The predetermined candidate intra-prediction modes may include at least one of a DC mode and a vertical mode.
[0016] If the prediction mode of the first surrounding block is MIP mode, the first candidate intra prediction mode and the second candidate intra prediction mode are different from each other, and the second candidate intra prediction mode is an intra prediction mode having a value greater than a prediction mode value representing DC mode, the candidate intra prediction mode list may be determined to include the second candidate intra prediction mode.
[0017] The step of determining the intra prediction mode of the current block based on the candidate intra prediction mode list may be performed by determining one of the candidate intra prediction modes included in the candidate intra prediction mode list as the intra prediction mode of the current block based on an intra prediction mode indicator obtained from the bitstream.
[0018] The image decoding method may further include determining a reference mode for determining an intra prediction mode of a chroma block corresponding to the current block, and determining the intra prediction mode of the chroma block based on the reference mode. In this case, if the current block is a luma block and the intra prediction mode of the current block is an MIP mode, the reference mode may be determined to be a planar mode.
[0019] The intra prediction mode of the chroma block may be determined as the reference mode.
[0020] If the intra prediction mode of the current block is not an MIP mode, the reference mode may be determined based on the intra prediction mode of the current block.
[0021] Furthermore, an image decoding device according to one aspect of the present disclosure is an image decoding device including a memory and at least one processor, wherein the at least one processor identifies a prediction mode of a current block, and if the prediction mode of the current block is an intra prediction mode, determines a candidate intra prediction mode for the current block based on the prediction modes of neighboring blocks located around the current block, generates a candidate intra prediction mode list for the current block based on the candidate intra prediction mode, and determines the intra prediction mode of the current block based on the candidate intra prediction mode list, and if the prediction mode of the neighboring block is an MIP (matrix based intra prediction) mode, the candidate intra prediction mode may be determined to be a predetermined intra prediction mode.
[0022] In addition, an image encoding method performed by an image encoding device according to an aspect of the present disclosure may include the steps of: identifying a prediction mode of a current block; if the prediction mode of the current block is an intra prediction mode, determining a candidate intra prediction mode based on prediction modes of neighboring blocks located around the current block; generating a candidate intra prediction mode list for the current block based on the candidate intra prediction mode; and encoding an intra prediction mode indicator indicating the intra prediction mode of the current block based on the candidate intra prediction mode list. If the prediction mode of the neighboring blocks is a matrix-based intra prediction (MIP) mode, the candidate intra prediction mode may be determined to be a predetermined intra prediction mode.
[0023] The predetermined intra prediction mode may be any one of a planar mode, a DC mode, a horizontal mode, and a vertical mode.
[0024] The candidate intra prediction mode list is generated based on a first candidate intra prediction mode and a second candidate intra prediction mode, where the first candidate intra prediction mode is determined based on the prediction mode of a first surrounding block located around the current block, and the second candidate intra prediction mode is determined based on the prediction mode of a second surrounding block located around the current block. However, if both the prediction modes of the first surrounding block and the second surrounding block are MIP modes, the candidate intra prediction mode list may be determined to include a predetermined candidate intra prediction mode.
[0025] Additionally, the predetermined candidate intra-prediction modes may include at least one of a DC mode and a vertical mode.
[0026] A transmission method according to another aspect of the present disclosure can transmit a bitstream generated by the image encoding device or image encoding method of the present disclosure.
[0027] A computer-readable recording medium according to another aspect of the present disclosure can store a bitstream generated by the image encoding method or image encoding device of the present disclosure.
[0028] The features described above in this brief summary of the present disclosure are merely exemplary embodiments of the detailed description of the present disclosure that follows and are not intended to limit the scope of the present disclosure. [Effects of the Invention]
[0029] According to the present disclosure, an image encoding / decoding method and apparatus with improved encoding / decoding efficiency can be provided.
[0030] Furthermore, according to the present disclosure, an image encoding / decoding method and apparatus can be provided that can reduce prediction complexity by mapping the intra prediction modes of surrounding blocks to a predetermined prediction mode.
[0031] The present disclosure also provides a method for transmitting a bitstream generated by the image encoding method or apparatus according to the present disclosure.
[0032] Furthermore, according to the present disclosure, a recording medium storing a bitstream generated by the image encoding method or apparatus according to the present disclosure can be provided.
[0033] Furthermore, according to the present disclosure, it is possible to provide a recording medium that stores a bitstream that is received by the image decoding device according to the present disclosure, decoded, and used to restore an image.
[0034] The effects obtained by the present disclosure are not limited to the effects described above, and other effects not described above will be clearly understood by those having ordinary skill in the art to which the present disclosure pertains from the following description. [Brief explanation of the drawings]
[0035] [Figure 1] 1 is a diagram illustrating a video coding system to which embodiments of the present disclosure can be applied; [Figure 2] 1 is a diagram schematically illustrating an image encoding device to which an embodiment of the present disclosure can be applied. [Figure 3] FIG. 1 is a diagram schematically illustrating an image decoding device to which an embodiment of the present disclosure can be applied. [Figure 4] FIG. 1 illustrates a slice and tile structure according to one embodiment. [Figure 5] FIG. 10 is a diagram illustrating a directional intra-prediction mode according to an embodiment. [Figure 6] FIG. 10 is a diagram illustrating a directional intra-prediction mode according to an embodiment. [Figure 7] FIG. 10 illustrates a mapping table for mapping MIP modes to general intra-prediction modes according to an embodiment. [Figure 8] FIG. 1 is a reference diagram illustrating an MIP mode according to an embodiment. [Figure 9] FIG. 1 is a reference diagram illustrating an MIP mode according to an embodiment. [Figure 10] FIG. 1 illustrates the syntax of a coding unit according to one embodiment. [Figure 11] FIG. 1 illustrates the syntax of a coding unit according to one embodiment. [Figure 12] FIG. 1 illustrates the syntax of a coding unit according to one embodiment. [Figure 13] FIG. 10 illustrates a mapping table for mapping general intra-prediction modes to MIP modes according to one embodiment. [Figure 14] FIG. 10 is a diagram illustrating an MPM list configured in a predetermined MIP intra-prediction mode according to one embodiment. [Figure 15] 10 is a flowchart illustrating a method for encoding an intra-prediction mode using an MPM list according to an embodiment. [Figure 16]10 is a flowchart illustrating a method for a decoding device to perform decoding using an MPM list according to an embodiment. [Figure 17] 1 is a flowchart illustrating a method for generating an MPM list using a mapping method according to one embodiment. [Figure 18] 10 is a flowchart illustrating a method for generating an MPM list using a mapping method according to another embodiment. [Figure 19] 1 is a flowchart illustrating a method for generating an MPM list using a simplified mapping method according to one embodiment. [Figure 20] 10 is a flowchart illustrating a method in which an encoding device generates an MPM list using a simplified mapping method according to an embodiment. [Figure 21] 10 is a flowchart illustrating a method for generating an MPM list using a simplified mapping method in a decoding device according to an embodiment. [Figure 22] FIG. 20 shows coding performance data using the simplified mapping method of FIG. 19. [Figure 23] 10 is a flowchart illustrating a method for generating an MPM list using a simplified mapping method according to another embodiment. [Figure 24] FIG. 24 shows coding performance data using the simplified mapping method of FIG. 23. [Figure 25] 10 is a flowchart illustrating a method for generating an MPM list using a mapping method according to another embodiment. [Figure 26] FIG. 10 shows coding performance data using a simplified mapping method according to another embodiment. [Figure 27] FIG. 1 illustrates a content streaming system to which an embodiment of the present disclosure can be applied. DETAILED DESCRIPTION OF THE INVENTION
[0036] The present disclosure will be described in detail below with reference to the accompanying drawings, so that those skilled in the art can easily implement the present disclosure. However, the present disclosure may be embodied in various different forms and is not limited to the embodiments described herein.
[0037] In describing the embodiments of the present disclosure, if it is determined that a detailed description of a known configuration or function may obscure the gist of the present disclosure, the detailed description thereof will be omitted. In addition, in the drawings, parts that are not related to the description of the present disclosure will be omitted, and similar parts will be designated by similar reference numerals.
[0038] In this disclosure, when a component is referred to as being "coupled," "coupled," or "connected" to another component, this includes not only a direct connection, but also an indirect connection where another component exists between them. Furthermore, when a component is referred to as "including" or "having" another component, this does not mean that the other component is excluded, but that the component can further include the other component, unless otherwise specified.
[0039] In this disclosure, terms such as "first" and "second" are used only to distinguish one component from another component, and do not limit the order or importance of the components unless otherwise specified. Therefore, within the scope of this disclosure, a first component in one embodiment may be referred to as a second component in another embodiment, and similarly, a second component in one embodiment may be referred to as a first component in another embodiment.
[0040] In this disclosure, components that are distinguished from one another are used to clearly describe the characteristics of each component and do not necessarily mean that the components are separate. In other words, multiple components may be integrated into a single hardware or software unit, or a single component may be distributed into multiple hardware or software units. Therefore, even if not otherwise specified, such integrated or distributed embodiments are also included within the scope of this disclosure.
[0041] In this disclosure, the components described in various embodiments do not necessarily mean essential components, and some may be optional components. Therefore, an embodiment consisting of a subset of the components described in one embodiment is also within the scope of this disclosure. Furthermore, an embodiment including other components in addition to the components described in various embodiments is also within the scope of this disclosure.
[0042] The present disclosure relates to image encoding and decoding, and terms used in this disclosure may have their ordinary meaning in the technical field to which the present disclosure belongs unless they are newly defined in this disclosure.
[0043] In this disclosure, a "picture" generally refers to a unit representing any one image in a specific time period, and a slice / tile is a coding unit constituting a part of a picture, and one picture may be composed of one or more slices / tiles. Furthermore, a slice / tile may include one or more coding tree units (CTUs).
[0044] In this disclosure, "pixel" or "pel" may refer to the smallest unit constituting one picture (or image). Also, "sample" may be used as a term corresponding to pixel. A sample may generally indicate a pixel or a pixel value, may indicate only a pixel / pixel value of a luma component, or may indicate only a pixel / pixel value of a chroma component.
[0045] In this disclosure, the term "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 that region. The term "unit" may be used interchangeably with terms such as "sample array," "block," or "area," depending on the situation. In general, an M×N block may include a set (or array) of samples or transform coefficients consisting of M columns and N rows.
[0046] In the present disclosure, a "current block" may refer to any one of a "current coding block," a "current coding unit," a "block to be coded," a "block to be decoded," or a "block to be processed." When prediction is performed, a "current block" may refer to a "current predicted block" or a "block to be predicted." When transformation (inverse transformation) / quantization (inverse quantization) is performed, a "current block" may refer to a "current transformed block" or a "block to be transformed." When filtering is performed, a "current block" may refer to a "block to be filtered."
[0047] Furthermore, in this disclosure, "current block" may mean "luma block of the current block" unless explicitly stated as a chroma block. "Chroma block of the current block" may be expressed explicitly including the explicit description of a chroma block, such as "chroma block" or "current chroma block."
[0048] In the present disclosure, " / " and "," can be interpreted as "and / or." For example, "A / B" and "A, B" can be interpreted as "A and / or B." Also, "A / B / C" and "A, B, C" can mean "at least one of A, B, and / or C."
[0049] In this disclosure, "or" can be interpreted as "and / or." For example, "A or B" can mean 1) only "A," 2) only "B," or 3) "A and B." Alternatively, in this disclosure, "or" can mean "additionally or alternatively."
[0050] Video Coding System Overview
[0051] FIG. 1 is a diagram illustrating a video coding system according to this disclosure.
[0052] A video coding system according to one embodiment may include an encoding device 10 and a decoding device 20. The encoding device 10 may transmit encoded video and / or image information or data to the decoding device 20 in a file or streaming format via a digital storage medium or a network.
[0053] An encoding device 10 according to an embodiment may include a video source generation unit 11, an encoding unit 12, and a transmission unit 13. A decoding device 20 according to an embodiment may include a reception unit 21, a decoding unit 22, and a rendering unit 23. The encoding unit 12 may be referred to as a video / image encoding unit, and the decoding unit 22 may be referred to as a video / image decoding unit. The transmission unit 13 may be included in the encoding unit 12. The reception unit 21 may be included in the decoding unit 22. The rendering unit 23 may include a display unit, which may be configured as a separate device or an external component.
[0054] The video source generation unit 11 can acquire video / images through a video / image capture, synthesis, or generation process. The video source generation unit 11 can include a video / image capture device and / or a video / image generation device. The video / image capture device can include, for example, one or more cameras, a video / image archive containing previously captured video / images, etc. The video / image generation device can include, for example, a computer, a tablet, a smartphone, etc., and can (electronically) generate video / images. For example, virtual video / images can be generated via a computer, etc., in which case the video / image capture process can be replaced with a process in which related data is generated.
[0055] The encoder 12 may encode the input video / image. The encoder 12 may perform a series of steps such as prediction, transformation, and quantization for compression and coding efficiency. The encoder 12 may output the encoded data (encoded video / image information) in a bitstream format.
[0056] The transmitter 13 may transmit the encoded video / image information or data output in a bitstream format to the receiver 21 of the decoding device 20 in a file or streaming format via a digital storage medium or a network. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray®, HDD, and SSD. The transmitter 13 may include elements for generating a media file in a predetermined file format and elements for transmitting via a broadcasting / communication network. The receiver 21 may extract / receive the bitstream from the storage medium or network and transmit it to the decoder 22.
[0057] The decoding unit 22 can decode the video / image by performing a series of steps such as inverse quantization, inverse transformation, and prediction corresponding to the operations of the encoding unit 12.
[0058] The rendering unit 23 can render the decoded video / images, and the rendered video / images can be displayed via the display unit.
[0059] Overview of the image encoding device
[0060] FIG. 2 is a diagram schematically illustrating an image encoding device to which an embodiment of the present disclosure can be applied.
[0061] 2, the image encoding device 100 may include an image division unit 110, a subtraction unit 115, a transform unit 120, a quantization unit 130, an inverse quantization unit 140, an inverse transform unit 150, an addition unit 155, a filtering unit 160, a memory 170, an inter prediction unit 180, an intra prediction unit 185, and an entropy encoding unit 190. The inter prediction unit 180 and the intra prediction unit 185 may be collectively referred to as a "prediction unit." The transform unit 120, the quantization unit 130, the inverse quantization unit 140, and the inverse transform unit 150 may be included in a residual processing unit. The residual processing unit may further include a subtraction unit 115.
[0062] Depending on the embodiment, all or at least some of the components constituting the image encoding device 100 may be realized by a single hardware component (e.g., an encoder or a processor). Also, the memory 170 may include a decoded picture buffer (DPB) and may be realized by a digital storage medium.
[0063] The image division unit 110 may divide an input image (or picture, frame) input to the image encoding device 100 into one or more processing units. As an example, the processing units may be called coding units (CUs). The coding units may be obtained by recursively dividing a coding tree unit (CTU) or a largest coding unit (LCU) using a QT / BT / TT (quad-tree / binary-tree / ternary-tree) structure. For example, one coding unit may be divided into multiple coding units at deeper depths based on a quad-tree structure, a binary-tree structure, and / or a ternary-tree structure. To divide the coding units, the quad-tree structure may be applied first, and then the binary-tree structure and / or the ternary-tree structure may be applied later. The coding procedure according to the present disclosure may be performed based on the final coding unit that is not further divided. The maximum coding unit may be directly used as the final coding unit, or a lower-depth coding unit obtained by dividing the maximum coding unit may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and / or reconstruction, which will be described later. As another example, a processing unit of the coding procedure may be a prediction unit (PU) or a transform unit (TU). The prediction unit and the transform unit may be divided or partitioned from the final coding unit, respectively. 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.
[0064] The prediction unit (inter prediction unit 180 or intra prediction unit 185) may perform prediction on a current block (current block) to 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 or CU. The prediction unit may generate various information related to prediction of the current block and transmit it to the entropy coding unit 190. The prediction information may be coded by the entropy coding unit 190 and output in a bitstream format.
[0065] The intra prediction unit 185 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 from the current block according to the intra prediction mode and / or intra prediction technique. The intra prediction modes 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 degree of precision 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 185 may also determine the prediction mode to be applied to the current block using the prediction modes applied to neighboring blocks.
[0066] The inter prediction unit 180 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 between the motion information of 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. 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 (colCU), etc. The reference picture including the temporal neighboring block may be called a collocated picture (colPic). For example, the inter predictor 180 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 180 may use motion information of neighboring blocks as motion information for the current block. In the case of skip mode, unlike in merge mode, a residual signal may not be transmitted.In the case of a motion vector prediction (MVP) mode, the motion vector of a neighboring block is used as a motion vector predictor, and the motion vector of the current block can be signaled by encoding a motion vector difference and an indicator for the motion vector predictor. The motion vector difference may mean the difference between the motion vector of the current block and the motion vector predictor.
[0067] The predictor may generate a prediction signal based on various prediction methods and / or prediction techniques, which will be described later. For example, the predictor may apply intra prediction or inter prediction to predict the current block, or may simultaneously apply intra prediction and inter prediction. A prediction method that simultaneously applies intra prediction and inter prediction to predict the current block may be referred to as combined inter and intra prediction (CIIP). The predictor may also perform intra block copy (IBC) to predict the current block. Intra block copy can be used for content image / video coding, such as screen content coding (SCC), for games. IBC is a method of predicting a current block using an already reconstructed reference block in a current picture that is located a predetermined distance away from the current block. When IBC is applied, the position of the reference block in the current picture may be coded as a vector (block vector) corresponding to the predetermined distance. IBC is essentially performed within the current picture, but may be similar to inter prediction in that a reference block is derived within the current picture. That is, the IBC may use at least one of the inter prediction techniques described in this disclosure.
[0068] The prediction signal generated by the prediction unit may be used to generate a restored signal or a residual signal. The subtraction unit 115 may subtract the prediction signal (predicted block, predicted sample array) output from the prediction unit from the input image signal (original block, original sample array) to generate a residual signal (residual signal, residual block, residual sample array). The generated residual signal may be transmitted to the conversion unit 120.
[0069] The transform unit 120 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, the GBT refers to a transform obtained from a graph representing inter-pixel relationship information. The CNT refers to a transform obtained based on a predicted signal generated using all previously reconstructed pixels. The transform process may be applied to pixel blocks having the same square size or to non-square blocks of variable size.
[0070] The quantization unit 130 may quantize the transform coefficients and transmit the quantized transform coefficients to the entropy coding unit 190. The entropy coding unit 190 may encode the quantized signal (information about the quantized transform coefficients) and output the encoded signal in a bitstream format. The information about the quantized transform coefficients may be referred to as residual information. The quantization unit 130 may rearrange the quantized transform coefficients in a block format into a one-dimensional vector format 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 format.
[0071] The entropy coding unit 190 may perform various coding methods, such as exponential Golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC). The entropy coding unit 190 may also code information required for video / image reconstruction (e.g., values of syntax elements) together with or separately from the quantized transform coefficients. The coded information (e.g., coded video / image information) may be transmitted or stored in a bitstream format in network abstraction layer (NAL) unit units. The video / image 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 / image information may also include general constraint information. The signaling information, transmitted information and / or syntax elements mentioned in this disclosure may be encoded through the above-described encoding procedure and included in the bitstream.
[0072] 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 transmitting unit (not shown) that transmits and / or a storing unit (not shown) that stores the signal output from the entropy encoding unit 190 may be provided as an internal / external element of the image encoding device 100, or the transmitting unit may be provided as a component of the entropy encoding unit 190.
[0073] The quantized transform coefficients output from the quantization unit 130 can be used to generate a residual signal. For example, the residual signal (residual block or residual sample) can be reconstructed by applying inverse quantization and inverse transform to the quantized transform coefficients via the inverse quantization unit 140 and the inverse transform unit 150.
[0074] 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 180 or the intra prediction unit 185. When there is no residual for the current block to be processed, such as when a skip mode is applied, the predicted block may be used as the reconstructed block. The adder 155 may be referred to as a reconstruction unit or a reconstructed block generation unit. The generated reconstructed signal may be used for intra prediction of the next current block to be processed in the current picture, and may also be used for inter prediction of the next picture after filtering, as will be described later.
[0075] 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 coding unit 190, as will be described later in connection with each filtering method. The filtering information may be coded by the entropy coding unit 190 and output in a bitstream format.
[0076] The modified reconstructed picture transmitted to the memory 170 can be used as a reference picture in the inter prediction unit 180. When inter prediction is applied through this, the image encoding device 100 can avoid a prediction mismatch between the image encoding device 100 and the image decoding device, and can also improve encoding efficiency.
[0077] The DPB in the memory 170 may store modified reconstructed pictures for use as reference pictures in the inter predictor 180. The memory 170 may store motion information of blocks from which motion information in the current picture is derived (or coded) and / or motion information of already reconstructed intra-picture blocks. The stored motion information may be transmitted to the inter predictor 180 to be used as motion information of spatially surrounding blocks or temporally surrounding blocks. The memory 170 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra predictor 185.
[0078] Overview of the image decoding device
[0079] FIG. 3 is a diagram schematically illustrating an image decoding device to which an embodiment of the present disclosure can be applied.
[0080] 3, the image decoding apparatus 200 may include an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 230, an adder 235, a filtering unit 240, a memory 250, an inter prediction unit 260, and an intra prediction unit 265. The inter prediction unit 260 and the intra prediction unit 265 may be collectively referred to as a "prediction unit." The inverse quantization unit 220 and the inverse transform unit 230 may be included in a residual processing unit.
[0081] Depending on the embodiment, all or at least some of the components constituting the image decoding device 200 may be realized by a single hardware component (e.g., a decoder or a processor). Also, the memory 170 may include a DPB and may be realized by a digital storage medium.
[0082] The image decoding device 200, which receives a bitstream including video / image information, can reconstruct an image by performing a process corresponding to the process performed by the image encoding device 100 of FIG. 2. For example, the image decoding device 200 can perform decoding using a processing unit applied in the image encoding device. Therefore, the decoding processing unit can be, for example, a coding unit. The coding unit can be a coding tree unit or can be obtained by dividing a maximum coding unit. The reconstructed image signal decoded and output by the image decoding device 200 can be reproduced by a reproduction device (not shown).
[0083] The image decoding apparatus 200 may receive a signal output from the image encoding apparatus of FIG. 2 in a bitstream format. The received signal may be decoded via an entropy decoding unit 210. For example, the entropy decoding unit 210 may parse the bitstream to derive information (e.g., video / image information) necessary for image reconstruction (or picture reconstruction). The video / image 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 / image information may also include general constraint information. The image decoding apparatus may further use the information on the parameter sets and / or the general constraint information to decode an image. The signaling information, received information, and / or syntax elements referred to in the present disclosure may be obtained from the bitstream by being decoded via the decoding procedure. 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 from the bitstream, determines a context model using information on the syntax element to be decoded and decoding information on neighboring blocks and the block to be decoded, or information on symbols / bins decoded in a previous step, 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. After determining the 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.Among the information decoded by the entropy decoding unit 210, information related to prediction is provided to the prediction units (inter prediction unit 260 and intra prediction unit 265), 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 inverse quantization unit 220. Also, among the information decoded by the entropy decoding unit 210, information related to filtering may be provided to the filtering unit 240. Meanwhile, a receiving unit (not shown) that receives a signal output from the image encoding device may be further provided as an internal / external element of the image decoding device 200, or the receiving unit may be provided as a component of the entropy decoding unit 210.
[0084] Meanwhile, the image decoding apparatus according to the present disclosure may be referred to as a video / image / picture decoding apparatus. The image decoding apparatus may include an information decoder (video / image / picture information decoder) and / or a sample decoder (video / image / picture sample decoder). The information decoder may include an entropy decoding unit 210, and the sample decoder may include at least one of an inverse quantization unit 220, an inverse transform unit 230, an adder 235, a filtering unit 240, a memory 250, an inter prediction unit 260, and an intra prediction unit 265.
[0085] The inverse quantization unit 220 may inverse quantize the quantized transform coefficients and output the transform coefficients. The inverse quantization unit 220 may rearrange the quantized transform coefficients in a two-dimensional block format. In this case, the rearrangement may be performed based on the order of coefficient scanning performed in the image encoding device. The inverse quantization unit 220 may perform inverse quantization on the quantized transform coefficients using a quantization parameter (e.g., quantization step size information) to obtain transform coefficients.
[0086] The inverse transform unit 230 can inversely transform the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0087] 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 information about the prediction output from the entropy decoding unit 210, and may determine a specific intra / inter prediction mode (prediction technique).
[0088] The prediction unit can generate a prediction signal based on various prediction methods (techniques) described below, as described in the description of the prediction unit of the image encoding device 100.
[0089] The intra predictor 265 may predict the current block by referring to samples in the current picture. The description of the intra predictor 185 may also be applied to the intra predictor 265.
[0090] The inter prediction unit 260 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 correlations between motion information of 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 an 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 260 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 (techniques), and the prediction information may include information indicating the inter prediction mode (technique) for the current block.
[0091] The adder 235 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the obtained residual signal to a prediction signal (predicted block, predicted sample array) output from a prediction unit (including the inter prediction unit 260 and / or the intra prediction unit 265). When there is no residual for the current block to be processed, such as when a skip mode is applied, the predicted block may be used as the reconstructed block. The description of the adder 155 may also be applied to the adder 235. The adder 235 may be referred to as a reconstruction unit or a reconstructed block generation unit. The generated reconstructed signal may be used for intra prediction of the next current block to be processed in the current picture, and may also be used for inter prediction of the next picture after undergoing filtering, as will be described later.
[0092] The filtering unit 240 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 240 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may store the modified reconstructed picture in the memory 250, specifically, in a DPB of the memory 250. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc.
[0093] The (modified) reconstructed picture stored in the DPB of the memory 250 can be used as a reference picture in the inter predictor 260. The memory 250 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 260 to be used as motion information of a spatially surrounding block or a temporally surrounding block. The memory 250 can store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra predictor 265.
[0094] In the present disclosure, the embodiments described for the filtering unit 160, inter prediction unit 180 and intra prediction unit 185 of the image encoding device 100 can also be applied in a similar or corresponding manner to the filtering unit 240, inter prediction unit 260 and intra prediction unit 265 of the image decoding device 200, respectively.
[0095] Partitioning Structure
[0096] The image encoding / decoding method according to the present disclosure may be performed based on a partitioning structure according to an embodiment. For example, procedures such as prediction, residual processing (e.g., inverse transform, inverse quantization), syntax element coding, and filtering may be performed based on the CTUs and CUs (and / or TUs and PUs) derived based on the partitioning structure. The block partitioning procedure is performed by the image partitioning unit 110 of the encoding device described above, and partition-related information may be encoded by the entropy encoding unit 190 and transmitted to the decoding device in the form of a bitstream. The entropy decoding unit 210 of the decoding device may derive a block partitioning structure for the current picture based on the partitioning-related information acquired from the bitstream, and perform a series of procedures for image decoding (e.g., prediction, residual processing, block / picture reconstruction, in-loop filtering, etc.) based on the block partitioning structure. The CU size and the TU size may be the same, or multiple TUs may exist within a CU region. Meanwhile, the CU size may generally refer to the luma component (sample) CB size. The TU size may generally refer to the luma component (sample) TB size. The chroma component (sample) CB or TB size may be derived based on the luma component (sample) CB / TB size according to the component ratio according to the chroma format (color format, e.g., 4:4:4, 4:2:2, 4:2:0, etc.) of the picture / image. The TU size may be derived based on maxTbSize, which indicates the maximum available TB size. For example, if the CU size is larger than maxTbSize, multiple TUs (TBs) of the maxTbSize may be derived from the CU, and transform / inverse transform may be performed in units of the TUs (TBs). Furthermore, for example, if intra prediction is applied, the intra prediction mode / type may be derived in units of the CU (or CB), and the derivation of neighboring reference samples and the generation of predicted samples may be performed in units of the TUs (TBs). In this case, one or multiple TUs (or TBs) may exist within one CU (or CB) region, and in this case, the multiple TUs (or TBs) may share the same intra prediction mode / type.
[0097] Furthermore, in image encoding and decoding according to the present disclosure, image processing units may have a hierarchical structure. For example, a picture may be divided into one or more tiles or tile groups. A tile group may include one or more tiles. A tile may include one or more CTUs. The CTUs may be divided into one or more CUs as described above. A tile may be a rectangular region including CTUs that are grouped in a specific row and column within a picture. A tile group may include an integer number of tiles according to tile raster scanning within a picture. A tile group header may signal information / parameters applicable to the tile group. If the encoding / decoding device has a multi-core processor, encoding / decoding procedures for the tiles or tile groups may be processed in parallel. Here, the tile group may have any one of tile group types, including an intra (I) tile group, a predictive (P) tile group, and a bi-predictive (B) tile group. For blocks in an I tile group, inter prediction is not used for prediction, and only intra prediction can be used. Of course, in this case, original sample values can also be coded and signaled without prediction. For blocks in a P tile group, intra prediction or inter prediction can be used, and if inter prediction is used, only uni prediction can be used. On the other hand, for blocks in a B tile group, intra prediction or inter prediction can be used, and if inter prediction is used, up to bi prediction can be used.
[0098] Furthermore, a picture can be divided into one or more slices. A slice can consist of an integer number of tiles or a collection of CTUs arranged in consecutive rows within a tile. Two slice modes are supported: raster scan slice mode and square slice mode. In raster scan slice mode, a slice can consist of consecutive tiles in raster scan order within a picture, as shown in Figure 4. In square slice mode, a slice can be constructed by collecting tiles in a picture in a rectangular shape. Tiles within a square slice can be scanned according to the tile raster scan order within the slice.
[0099] In the encoding device, the tile / tile group, slice, maximum and minimum coding unit sizes can be determined according to the characteristics of the image (e.g., resolution) or taking into account coding efficiency or parallel processing, and information regarding them or information that can lead to them can be included in the bitstream.
[0100] The decoder can obtain information indicating whether the slice, tile / tile group, and CTU within the tile of the current picture are divided into multiple coding units, etc. Efficiency can be improved by allowing such information to be obtained (transmitted) only under specific conditions.
[0101] The slice header or tile group header (tile group header syntax) can include information / parameters commonly applicable to the slices or tile groups. The APS (APS syntax) or PPS (PPS syntax) can include information / parameters commonly applicable to one or more pictures. The SPS (SPS syntax) can include information / parameters commonly applicable to one or more sequences. The VPS (VPS syntax) can include information / parameters commonly applicable to the entire video. In this specification, the higher level syntax can include at least one of the APS syntax, PPS syntax, SPS syntax, and VPS syntax.
[0102] Also, for example, information regarding the division and configuration of the tiles / tile groups can be configured in the encoding step via the higher level syntax and transmitted to the decoding device in the form of a bitstream.
[0103] Furthermore, in encoding and decoding images according to the present disclosure, the coding tree scheme may support luma and chroma component blocks having separate block tree structures. When the luma and chroma blocks in one CTU have the same block tree structure, it may be referred to as a single tree (SINGLE_TREE). When the luma and chroma blocks in one CTU have separate block tree structures, it may be referred to as a dual tree (DUAL_TREE). In this case, the block tree type for the luma component may be referred to as DUAL_TREE_LUMA, and the block tree type for the chroma component may be referred to as DUAL_TREE_CHROMA. For P and B slices / tile groups, the luma and chroma CTBs in one CTU may be restricted to have the same coding tree structure. However, for I slices / tile groups, the luma and chroma blocks may have separate block tree structures. If the individual block tree mode is applied, the luma CTB may be divided into CUs based on a specific coding tree structure, and the chroma CTB may be divided into chroma CUs based on another coding tree structure. For example, a CU in an I slice / tile group may be composed of a coding block of a luma component or a coding block of two chroma components, and a CU in a P or B slice / tile group may be composed of blocks of three color components. Hereinafter, in this disclosure, a slice may be referred to as a tile / tile group, and a tile / tile group may be referred to as a slice.
[0104] In-line forecast overview
[0105] An intra prediction method according to an embodiment will now be described. Intra prediction may refer to a prediction that generates prediction samples for a current block based on reference samples in a picture to which the current block belongs (hereinafter, referred to as the current picture). When intra prediction is applied to the current block, neighboring reference samples to be used for intra prediction of the current block may be derived. The neighboring reference samples of the current block may include samples adjacent to the left boundary and bottom-left of the current block having a size of nW×nH, a total of 2×nH samples, samples adjacent to the top boundary and top-right of the current block, a total of 2×nW samples, 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 upper neighboring samples and multiple rows of left neighboring samples. In addition, the neighboring reference samples of the current block may include a total of nH samples adjacent to the right boundary of the current block having a size of nW×nH, 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. Meanwhile, when ISP, which will be described later, is applied, the neighboring reference samples may be derived in units of sub-partitions.
[0106] Meanwhile, 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 the unavailable samples with available samples to construct neighboring reference samples to be used for prediction, or may construct neighboring reference samples to be used for prediction through interpolation of available samples.
[0107] When neighboring reference samples are derived, (i) a predicted sample may be derived based on an average or interpolation of neighboring reference samples of the current block, or (ii) the predicted sample may be derived based on a reference sample located in a specific (prediction) direction relative to the predicted sample among the neighboring reference samples of the current block. (i) This may be referred to as a non-directional mode or a non-angular mode, and (ii) this may be referred to as a directional mode or an angular mode. Furthermore, the predicted sample may be generated by interpolating the first and second neighboring samples located in the opposite direction to the prediction direction of the intra-prediction mode of the current block based on the predicted sample of the current block among the neighboring reference samples. This may be referred to as linear interpolation intra-prediction (LIP). Alternatively, a chroma predicted sample may be generated based on a luma sample using a linear model. This may be referred to as LM mode. Alternatively, a temporal prediction sample of the current block may be derived based on filtered neighboring reference samples, and a prediction sample of the current block may be derived by weighting the temporal prediction sample and at least one reference sample derived according to the intra prediction mode from among the conventional neighboring reference samples, i.e., unfiltered neighboring reference samples. This may be referred to as position dependent intra prediction (PDPC). Furthermore, a reference sample line with the highest prediction accuracy is selected from among multiple reference sample lines surrounding the current block, and a prediction sample is derived using a reference sample located in the prediction direction of the selected line. In this case, intra prediction coding may be performed by signaling the reference sample line used to a decoding device. This may be referred to as multi-reference line (MRL) intra prediction or MRL-based intra prediction.In addition, 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 derived and used for each sub-partition. That is, in this case, the intra prediction mode for the current block is uniformly applied to the sub-partitions, but neighboring reference samples may be derived and used for each sub-partition, thereby improving intra prediction performance as needed. This prediction method may be referred to as intra sub-partitions (ISP) or ISP-based intra prediction. Furthermore, when a prediction direction based on a prediction sample points between neighboring reference samples, i.e., when the prediction direction points to a fractional sample position, the value of the prediction sample may be derived through interpolation of multiple reference samples located around the prediction direction (around the fractional sample position). The above-described intra prediction method may be distinguished from an intra prediction mode and referred to as an intra prediction type. In addition, MIP (Matrix-weighted Intra prediction) can be applied, which performs intra prediction of the current block by generating a prediction signal for a sub-sampled pixel set of the current block using reconstructed neighboring pixels located to the left and above the current block, and then interpolating vertically and horizontally using the generated prediction signal and neighboring sample values to generate a prediction signal of the original size.
[0108] The intra prediction type may be referred to by various terms such as an intra prediction technique or an additional intra prediction mode. For example, the intra prediction type (or the additional intra prediction mode, etc.) may include at least one of the above-mentioned LIPO, PDPC, MRL, ISP, and MIP. Information about the intra prediction type may be coded by a coding device and included in a bitstream, thereby being signaled to a decoding device. The information about the intra prediction type may be implemented in various forms, such as flag information indicating whether each intra prediction type is applied or index information indicating one of various intra prediction types.
[0109] Meanwhile, post-processing filtering may be performed on the derived prediction samples as needed. Specifically, the intra prediction procedure may include an intra prediction mode / type determination step, a neighboring reference sample derivation step, and an intra prediction mode / type-based prediction sample derivation step. Also, post-processing filtering may be performed on the derived prediction samples as needed.
[0110] A video / image encoding method based on intra prediction will now be described. First, an encoding device performs intra prediction on a current block. The encoding device 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. Meanwhile, when a predicted sample filtering step (described below) is performed, the intra prediction unit 185 may further include a predicted sample filter unit. The encoding device may determine a mode / type to be applied to the current block from among a plurality of intra prediction modes / types. The encoding device may compare rate-distortion (RD) costs for the intra prediction modes / types to determine an optimal intra prediction mode / type for the current block.
[0111] Meanwhile, the encoding device may also perform a predicted sample filtering procedure, which may be called post-filtering. The predicted sample filtering procedure may filter some or all of the predicted samples. In some cases, the predicted sample filtering procedure may be omitted.
[0112] The encoding device may then generate residual samples for the current block based on the predicted samples, and may derive the residual samples by comparing original samples of the current block with the predicted samples based on phase.
[0113] The encoding device may then encode image information including information about the intra prediction (prediction information) and residual information about the residual samples. The prediction information may include the intra prediction mode information and the intra prediction type information. The encoding device may output the encoded image information in a bitstream format. The output bitstream may be transmitted to a decoding device via a storage medium or a network.
[0114] The residual information may include a residual coding syntax, which will be described later. The encoding device may transform / quantize the residual samples to derive quantized transform coefficients. The residual information may include information on the quantized transform coefficients.
[0115] Meanwhile, as described above, the encoding apparatus can generate a reconstructed picture (including reconstructed samples and reconstructed blocks). To this end, the encoding apparatus can further inverse quantize / inverse transform the quantized transform coefficients to derive (modified) residual samples. The reason for performing inverse quantization / inverse transform again after transforming / quantizing the residual samples 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 or the like can further be applied to the reconstructed picture.
[0116] A video / image decoding method based on intra prediction will now be described, in which a decoding device can perform operations corresponding to those performed by the encoding device.
[0117] First, the decoding apparatus may derive an intra prediction mode / type for a current block based on received prediction information (intra prediction mode / type information). The decoding apparatus may derive neighboring reference samples for the current block. The decoding apparatus may generate prediction samples within the current block based on the intra prediction mode / type and the neighboring reference samples. In this case, the decoding apparatus may perform a prediction sample filtering procedure. The prediction sample filtering may be referred to as post-filtering. Some or all of the prediction samples may be filtered by the prediction sample filtering procedure. In some cases, the prediction sample filtering procedure may be omitted.
[0118] The decoding apparatus may generate residual samples for the current block based on the received residual information. The decoding apparatus may generate reconstructed samples for the current block based on the predicted samples and the residual samples, and derive a reconstructed block including the reconstructed samples. A reconstructed picture for the current picture may be generated based on the reconstructed block. An in-loop filtering procedure may further be applied to the reconstructed picture.
[0119] The intra prediction mode information may include 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 the MPM is applied to the current block, the intra 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. For example, the MPM candidate list may be configured to include intra prediction modes of neighboring blocks or a preset base intra prediction mode. Furthermore, if the 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). The decoding apparatus may determine the intra prediction mode of the current block based on the intra prediction mode information.
[0120] Meanwhile, when the above-mentioned MIP mode is applied, an MPM list for the MIP mode may be configured to determine the MIP mode of the current block. The MPM list for the MIP mode may be configured in the same manner as configuring the above-mentioned MPM list for the intra mode. For example, when the MIP mode is applied, the MPM candidate list for the MIP mode may be configured to include MIP modes of neighboring blocks or preset basic MIP modes. Furthermore, when the 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 any one of the remaining MIP modes excluding the MIP mode candidate (MPM candidate). A decoding device may determine the MIP mode of the current block based on the intra prediction mode information.
[0121] Intra Prediction Mode
[0122] The intra prediction modes will be described in more detail below. Figure 5 is a diagram illustrating intra prediction directions according to an embodiment. To capture any edge direction presented in a natural video, the intra prediction modes can include two non-directional intra prediction modes and 65 directional intra prediction modes, as shown in Figure 5. The non-directional intra prediction modes can include a planar intra prediction mode and a DC intra prediction mode, and the directional intra prediction modes can include intra prediction modes 2 to 66.
[0123] Meanwhile, the intra prediction modes may further include a cross-component linear model (CCLM) mode for chroma samples in addition to the above-described intra prediction modes. The CCLM modes may be classified into L_CCLM, T_CCLM, and LT_CCLM depending on whether the left sample, the top sample, or both are considered to derive the LM parameters, and may be applied only to the chroma components. For example, the intra prediction modes may be indexed according to the intra prediction mode values as shown in the following table.
[0124] [Table 1]
[0125] FIG. 6 is a diagram illustrating intra-prediction directions according to another embodiment. Here, the dashed line direction indicates a wide-angle mode that is applied only to non-square blocks. As shown in FIG. 6, in order to capture any edge direction presented in a natural video, intra-prediction modes according to an embodiment may include 93 directional intra-prediction modes along with two non-directional intra-prediction modes. The non-directional intra-prediction modes may include a planar mode and a DC mode. The directional intra-prediction modes may include intra-prediction modes numbered 2 to 80 and -1 to -14, as indicated by the arrows in FIG. 6. The planar mode may be denoted as INTRA_PLANAR, and the DC mode may be denoted as INTRA_DC. The directional intra-prediction modes may be denoted as INTRA_ANGULAR-14 to INTRA_ANGULAR-1 and INTRA_ANGULAR2 to INTRA_ANGULAR80.
[0126] Meanwhile, the intra prediction type (or additional intra prediction mode, etc.) may include at least one of the above-mentioned LIP, PDPC, MRL, ISP, and MIP. The intra prediction type may be indicated based on intra prediction type information, which 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 the 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 the ISP is applied to the current block; ISP type information (e.g., intra_subpartitions_split_flag) indicating a subpartition type when the ISP is applied; flag information indicating whether PDPC is applied; flag information indicating whether LIP is applied; and MIP flag information indicating whether MIP is applied.
[0127] The intra-prediction mode information and / or the intra-prediction type information may be encoded / decoded using the coding method described in this disclosure. For example, the intra-prediction mode information and / or the intra-prediction type information may be encoded / decoded using entropy coding (e.g., CABAC, CAVLC) based on a truncated (rice) binary code.
[0128] Intra prediction for chroma blocks
[0129] When intra prediction is performed on a current block, prediction can be performed on the luma component block (luma block) and prediction can be performed on the chroma component block (chroma block) of the current block, and in this case, the intra prediction mode for the chroma block can be set separately from the intra prediction mode for the luma block.
[0130] For example, the intra-prediction mode for a chroma block may be indicated based on intra-chroma prediction mode information, which may be signaled in the form of an intra_chroma_pred_mode syntax element. For example, the intra-chroma prediction mode information may indicate one of a planar mode, a DC mode, a vertical mode, a horizontal mode, a derived mode (DM), and a CCLM mode. Here, the planar mode may indicate intra-prediction mode 0, the DC mode may indicate intra-prediction mode 1, the vertical mode may indicate intra-prediction mode 26, and the horizontal mode may indicate intra-prediction mode 10. DM may also be referred to as direct mode. CCLM may also be referred to as LM.
[0131] Meanwhile, DM and CCLM are dependent intra prediction modes that predict a chroma block using information of a luma block. DM may indicate a mode in which the same intra prediction mode as the intra prediction mode for the luma component is applied to the intra prediction mode for the chroma component. CCLM may indicate an intra prediction mode in which, in generating a prediction block for a chroma block, reconstructed samples of the luma block are subsampled, and then CCLM parameters α and β are applied to the subsampled samples to use the derived samples as prediction samples for the chroma block.
[0132] MPM list for intra prediction
[0133] When intra prediction is applied, the intra prediction mode applied to the current block may be determined using the intra prediction modes of surrounding blocks. For example, the decoding device may select one of the MPM candidates in the MPM list derived based on the intra prediction modes of surrounding blocks (e.g., left and / or upper surrounding blocks) of the current block and additional candidate modes, based on an MPM index (e.g., intra_luma_mpm_idx) received using the bitstream. The decoding device may also select one of the remaining intra prediction modes not included in the MPM candidates based on remaining mode information (e.g., intra_luma_mpm_remainder). For example, whether the intra prediction mode applied to the current block is among the MPM candidates or among the remaining modes may be indicated based on an mpm flag (e.g., intra_luma_mpm_flag) to determine the intra prediction mode of the current block. A value of 1 for the mpm flag may indicate that the intra prediction mode for the current block is in the MPM list (candidate), and a value of 0 for the mpm flag may indicate that the intra prediction mode for the current block is not in the MPM list (candidate).
[0134] The mpm flag may be signaled in the form of an intra_luma_mpm_flag syntax element, 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. In one embodiment, the remaining intra prediction mode information may point to one of the remaining intra prediction modes not included in the mpm list among all intra prediction modes, indexed in order of prediction mode number. 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 (e.g., intra_luma_mpm_flag), an mpm index (e.g., mpm_idx or intra_luma_mpm_idx), and remaining intra prediction mode information (e.g., rem_intra_luma_pred_mode or intra_luma_mpm_remainder). In this specification, the MPM list may be referred to by various terms such as an MPM candidate list, a candModeList, etc.
[0135] The MPM list may include candidate intra prediction modes (MPM candidates) that are likely to be applied to the current block. The MPM list may include intra prediction modes of neighboring blocks, or may further include predetermined intra prediction modes according to a predetermined method.
[0136] In one embodiment, to keep the complexity of generating an MPM list low, an MPM list including three MPMs can be generated. For example, even if 67 intra prediction modes are used, the MPM list can include three MPM candidates. If the MPM list does not include an intra prediction mode for the current block, a remaining mode can be used. In this case, the remaining mode includes 64 remaining candidates, and remaining intra prediction mode information indicating one of the 64 remaining candidates can be signaled. For example, the remaining intra prediction mode information can include a 6-bit syntax element (e.g., rem_intra_luma_pred_mode or intra_luma_mpm_remainder syntax element).
[0137] In one embodiment, neighboring intra modes, derived intra modes, and default intra modes can be considered to construct the MPM list. For example, the encoding device can use the prediction modes of neighboring blocks to encode the prediction mode of the current block.
[0138] For example, when a neighboring block is coded in an intra prediction mode, the coding device may check or guide the prediction mode of the neighboring block. For example, the coding device may determine the prediction mode of the current block based on the prediction mode of the left neighboring block and the prediction mode of the upper neighboring block, and may determine the prediction mode of the neighboring block as an MPM (Most Probable Mode). In this regard, determining the MPM may be expressed as listing MPM (Most Probable Mode) candidates or as forming an MPM list.
[0139] In one embodiment, the left peripheral block may refer to the uppermost block among the peripheral blocks adjacent to the left boundary of the current block. The upper peripheral block may refer to the leftmost block among the peripheral blocks adjacent to the upper boundary of the current block. The encoding apparatus may check whether the prediction mode of the left peripheral block is the same as the prediction mode of the upper peripheral block. The initial MPM list may be formed by performing a pruning process on the intra prediction modes of the two neighboring blocks. The pruning process may be a process for processing the MPM list so that only different prediction modes are included.
[0140] If the prediction mode of the left peripheral block and the prediction mode of the upper peripheral block are not the same, a first MPM may be set to the prediction mode of the left peripheral block, a second MPM may be set to the prediction mode of the upper peripheral block, and a third MPM may be set to one of intra-planar mode, intra-DC mode, or intra-vertical mode (50th intra-prediction mode). Specifically, if the intra-prediction modes of the two peripheral blocks are different from each other, the two intra-prediction modes may be set to the MPMs, and one of default intra-modes may be added to the MPM list after a pruning check by the MPM. Here, the default intra-mode may include intra-planar mode, intra-DC mode, and / or intra-vertical mode (50th intra-prediction mode).
[0141] For example, if the prediction mode of the left peripheral block and the prediction mode of the upper peripheral block are not the same, the MPM list can be configured according to the following cases.
[0142] Case 1: If both the intra prediction mode of the left peripheral block and the intra prediction mode of the upper peripheral block are not infra-planar mode, the MPM list can be configured to include the intra prediction mode of the left peripheral block, the intra prediction mode of the upper peripheral block, and the intra planar mode.
[0143] Case 2: If the conditions of Case 1 are not met, and both the intra prediction mode of the left peripheral block and the intra prediction mode of the upper peripheral block are not intra DC modes, the MPM list can be configured to include the intra prediction mode of the left peripheral block and the intra prediction mode and intra DC mode of the upper peripheral block.
[0144] Case 3: If the conditions of Case 2 are not met, the MPM list may be configured to include the intra prediction mode of the left surrounding block, the intra prediction mode of the upper surrounding block, and the intra vertical mode.
[0145] On the other hand, if the prediction mode of the left peripheral block and the prediction mode of the upper peripheral block are the same, the encoding device may check whether the prediction mode of the left peripheral block is less than 2. For example, the encoding device may check whether the prediction mode of the left peripheral block is an intra planar mode, an intra DC mode, or a prediction mode having a direction pointing to a block located below the current block as shown in FIG.
[0146] If the prediction mode of the left surrounding block is less than 2, the first MPM can be set to intra-planar mode, the second MPM can be set to intra-DC mode, and the third MPM can be set to intra-vertical mode (50th intra-prediction mode).
[0147] On the other hand, if the prediction mode of the left peripheral block is not less than 2, the first MPM can be set to the prediction mode of the left peripheral block, the second MPM can be set to (prediction mode of the left peripheral block - 1), and the third MPM can be set to (prediction mode of the left peripheral block + 1).
[0148] For example, if the prediction mode of the left peripheral block and the prediction mode of the upper peripheral block are the same, the MPM list can be configured as described below.
[0149] Case 1: If the value of the intra prediction mode of the left surrounding block is less than 2, the MPM list may be configured to include an intra planar mode, an intra DC mode, and an intra vertical mode.
[0150] Case 2: If the conditions of Case 1 are not met, the MPM list can be configured to include an intra prediction mode of the left peripheral block, an intra prediction mode corresponding to a value of 2+((A+61)%64)), and an intra prediction mode corresponding to a value of 2+((A-1)%64), where A is the value of the intra prediction mode of the left peripheral block.
[0151] Meanwhile, an additional pruning process can be performed to remove duplicate modes so that only unique modes are included. Also, a 6-bit fixed length code can be used for entropy coding of the 64 non-MPM modes excluding the three MPMs. That is, the indexes indicating the 64 non-MPM modes can be entropy coded into a 6-bit fixed length code (6-bit FLC).
[0152] The encoding apparatus can then determine whether the optimal intra prediction mode to be applied to the current block belongs to the previously configured MPM candidates.
[0153] If the intra prediction mode of the current block belongs to an MPM candidate, the encoding device may encode an MPM flag and an MPM index. Here, the MPM flag may indicate whether the intra prediction mode of the current block is derived from a neighboring intra prediction block (i.e., the intra prediction mode of the current block belongs to an MPM). In addition, the MPM index may indicate which MPM mode among the MPM candidates is applied as the intra prediction mode of the current block.
[0154] On the other hand, if the intra prediction mode of the current block does not belong to the MPM candidates, the encoding device may encode the intra prediction mode of the current block using the remaining mode.
[0155] Meanwhile, in one embodiment, the encoding device and the decoding device may also configure an MPM list including six MPMs. To generate the MPM list including six MPMs, a default MPM list may be considered. The default MPM list may be configured as follows, when the intra prediction mode value of the left peripheral block is A:
[0156] Default 6MPM List = {A, Planar(0) or DC(1), Vertical(50), HOR(18), VER-4(46), VER+4(54)}
[0157] Furthermore, the default 6MPM list may be updated to generate a 6MPM list by performing a pruning process on the intra modes of two neighboring blocks. For example, if the intra prediction modes of the two neighboring blocks are the same and the values of the intra prediction modes of the two neighboring blocks are greater than the value 1 of the intra DC mode, the 6MPM list may include the intra prediction mode of the left neighboring block, which is the default mode, the intra planar mode, and the intra DC mode, and may further include three derived modes derived by adding a predetermined offset value to the intra prediction mode of the neighboring block and performing modular arithmetic on the total number of intra prediction modes.
[0158] On the other hand, if the intra prediction modes of neighboring blocks are different from each other, the 6MPM list can be configured to include the intra prediction modes of the two neighboring blocks as the first two MPM modes, and the remaining four MPM modes can be derived from the default mode and the intra prediction modes of the neighboring blocks.
[0159] The above-described MPM list construction method can be used when MIP is not applied to the current block. For example, the above-described MPM list construction method can be used to derive the intra prediction mode used in LIP, PDPC, MRL, and ISP intra prediction, or general intra prediction (non-directional intra prediction and directional intra prediction). However, the left peripheral block or the upper peripheral block can be coded based on the above-described MIP. In this case, if the MIP mode number of the MIP-applied peripheral block (left peripheral block / upper peripheral block) is applied directly to the MPM list for the current block to which MIP is not applied, it may indicate an unintended intra prediction mode, resulting in incompatibility. Therefore, in such a case, the intra prediction mode of the MIP-applied peripheral block (left peripheral block / upper peripheral block) can be considered to be DC mode or planar mode. Alternatively, as another example, the intra prediction mode of the MIP-applied peripheral block (left peripheral block / upper peripheral block) can be mapped to a general intra prediction mode based on a mapping table and used to construct the MPM list. In such a case, the mapping can be performed based on the block size type of the current block. For example, a mapping table according to one embodiment such as that shown in FIG. 7 can be used for the mapping.
[0160] In the table of FIG. 7, MIP IntraPredMode[xNbX][yNbX] indicates the MIP mode of a neighboring block (left neighboring block / upper neighboring block), and block size type MipSizeId indicates the block size type of a neighboring block or a current block. The numbers below the block size type values 0, 1, and 2 indicate the general intra prediction mode to which the MIP mode is mapped for each block size type. For example, if the height and width of the current block are each 4, block size type 1 may be used; if both the height and width of the current block are 8 or less, block size type 2 may be used in other cases.
[0161] Here, the general intra prediction mode is an intra prediction mode other than an MIP mode, and may refer to a non-directional intra prediction mode or a directional intra prediction mode. For example, if the block size type of the current block is 0 and the MIP mode number of the neighboring block is 10, the mapped general intra prediction mode number may be 18. However, the above mapping relationship is merely an example and may be changed.
[0162] In addition, in one embodiment, the MPM list may not include intra planar mode. To this end, information indicating whether the intra prediction mode of the current block is intra planar mode may be separately signaled. If the prediction mode of the current block is not intra planar mode, an MPM list may be generated to signal the intra prediction mode. When encoding the current block, the encoding device may signal the intra prediction mode of the current block to the decoding device using the MPM list generated as follows, and the decoding device may determine the intra mode of the current block using the MPM list generated as follows.
[0163] The MPM list may be determined based on the intra prediction modes of neighboring blocks of the current block. For example, the MPM list may be determined based on the intra prediction modes of the upper and left neighboring blocks of the current block. For example, the encoding and decoding devices may determine the MPM list based on a first intra prediction candidate determined based on the intra prediction mode of the left neighboring block and a second intra prediction candidate determined based on the intra prediction mode of the upper neighboring block.
[0164] Here, the upper neighboring block may be the rightmost block among the blocks adjacent to the upper side of the current block. The left neighboring block may be the bottommost block among the blocks adjacent to the left side of the current block. For example, if the coordinates of the current block are (xCb, yCb), the width of the current block is cbWidth, and the height of the current block is cbHeight, the coordinates of the left neighboring block may be (xCb-1, yCb+cbHeight-1), and the coordinates of the upper neighboring block may be (xCb+cbWidth-1, yCb-1).
[0165] When the left peripheral block is unavailable, the prediction mode of the left peripheral block is not an intra prediction mode, or the prediction mode of the left peripheral block is an MIP mode, the encoding device and the decoding device may determine the value of the first intra prediction candidate to be a value indicating an intra planar mode (e.g., 0). When the left peripheral block does not meet these conditions, the encoding device and the decoding device may determine the value of the first intra prediction candidate to be a value indicating the intra prediction mode of the left peripheral block.
[0166] Furthermore, if the upper peripheral block is an unavailable block, if the prediction mode of the upper peripheral block is not an intra prediction mode, or if the prediction mode of the upper peripheral block is an MIP mode, the encoding device and the decoding device may determine the value of the second intra prediction candidate to be a value indicating an intra planar mode (e.g., 0). If the upper peripheral block does not meet these conditions, the encoding device and the decoding device may determine the value of the second intra prediction candidate to be a value indicating the intra prediction mode of the upper peripheral block.
[0167] In one embodiment, the MPM list can be configured to include five candidate modes. In one embodiment, the MPM list can be configured according to the following cases: In the following description, the first intra prediction candidate is denoted as candIntraPredModeA, the second intra prediction candidate is denoted as candIntraPredModeB, and the MPM list is denoted as candModeList[x], where x can be an integer between 0 and 4.
[0168] Case 1: If the value of the first intra prediction candidate and the value of the second intra prediction candidate are the same and the value of the first intra prediction candidate is greater than 1 (e.g., not intra planar mode or intra DC mode), the MPM list candModeList[x] can be configured as follows:
[0169] candModeList[0]=candIntraPredModeA
[0170] candModeList[1]=2+((candIntraPredModeA+61)%64)
[0171] candModeList[2]=2+((candIntraPredModeA-1)%64)
[0172] candModeList[3]=2+((candIntraPredModeA+60)%64)
[0173] candModeList[4]=2+(candIntraPredModeA%64)
[0174] Case 2: If the conditions of Case 1 are not met, the value of the first intra prediction candidate and the value of the second intra prediction candidate are not identical, and the value of the first intra prediction candidate or the value of the second intra prediction candidate is greater than 1 (for example, not in intra Planar mode or intra DC mode), the MPM list candModeList[x] can be configured as follows:
[0175] First, minAB and maxAB can be calculated as follows:
[0176] minAB=Min(candIntraPredModeA,candIntraPredModeB)
[0177] maxAB=Max(candIntraPredModeA, candIntraPredModeB)
[0178] When the values of the first intra prediction candidate and the second intra prediction candidate are both greater than 1, the MPM lists candModeList[0] and candModeList[1] can be configured as follows:
[0179] candModeList[0]=candIntraPredModeA
[0180] candModeList[1]=candIntraPredModeB
[0181] In this case, if the value of maxAB-minAB is 1, candModeList[2] to candModeList[4] can be configured as follows.
[0182] candModeList[2]=2+((minAB+61)%64)
[0183] candModeList[3]=2+((maxAB-1)%64)
[0184] candModeList[4]=2+((minAB+60)%64)
[0185] On the other hand, if the value of maxAB-minAB is 62 or greater, candModeList[2] to candModeList[4] can be configured as follows.
[0186] candModeList[2]=2+((minAB-1)%64)
[0187] candModeList[3]=2+((maxAB+61)%64)
[0188] candModeList[4]=2+(minAB%64)
[0189] On the other hand, if the value of maxAB-minAB is 2, candModeList[2] to candModeList[4] can be configured as follows.
[0190] candModeList[2]=2+((minAB-1)%64)
[0191] candModeList[3]=2+((minAB+61)%64)
[0192] candModeList[4]=2+((maxAB-1)%64)
[0193] On the other hand, if the values of maxAB-minAB do not satisfy the above condition, candModeList[2] to candModeList[4] can be configured as follows.
[0194] candModeList[2]=2+((minAB+61)%64)
[0195] candModeList[3]=2+((minAB-1)%64)
[0196] candModeList[4]=2+((maxAB+61)%64)
[0197] On the other hand, if the values of the first intra prediction candidate and the second intra prediction candidate are not both greater than 1, and only one of the first intra prediction candidate and the second intra prediction candidate has a value greater than 1, the MPM list candModeList[x] can be configured as follows:
[0198] candModeList[0]=maxAB
[0199] candModeList[1]=2+((maxAB+61)%64)
[0200] candModeList[2]=2+((maxAB-1)%64)
[0201] candModeList[3]=2+((maxAB+60)%64)
[0202] candModeList[4]=2+(maxAB%64)
[0203] Case 3: If the conditions in Case 2 are not met, the MPM list candModeList[x] can be configured as follows:
[0204] candModeList[0]=INTRA_DC
[0205] candModeList[1]=INTRA_ANGULAR50
[0206] candModeList[2]=INTRA_ANGULAR18
[0207] candModeList[3]=INTRA_ANGULAR46
[0208] candModeList[4]=INTRA_ANGULAR54
[0209] Overview of MIP
[0210] The matrix-based intra prediction (MIP) mode can also be called an affine linear weighted intra prediction (ALWIP) mode, a linear weighted intra prediction (LWIP) mode, or a matrix weighted intra prediction (MWIP) mode.
[0211] When the MIP mode is applied to the current block, predicted samples for the current block can be derived by: i) using surrounding reference samples that have undergone an averaging step, ii) performing a matrix-vector-multiplication step, and iii) further performing horizontal / vertical interpolation steps as necessary.
[0212] The averaging step can be performed by averaging the values of surrounding samples. As shown in Figure 8(a), if the width and width x of the current block are 4 in pixels, the averaging procedure can be performed by averaging each boundary to generate a total of four samples, two on the top and two on the left, or as shown in Figure 8(b), if the width and width x of the current block are not 4 in pixels, the averaging procedure can be performed by averaging each boundary to generate a total of eight samples, four on the top and four on the left.
[0213] The matrix vector multiplication step can be performed by multiplying the averaged samples by the matrix vector and then adding the offset vector, thereby generating a prediction signal for the subsampled pixel set of the original block. The size of the matrix and offset vector can be determined by the width and width of the current block.
[0214] The horizontal / vertical interpolation step generates a prediction signal of the size of the original block from the subsampled prediction signal. As shown in FIG. 9, a prediction signal of the size of the original block can be generated by performing vertical and horizontal interpolation using the subsampled prediction signal and surrounding pixel values. FIG. 9 shows an example of MIP prediction for an 8x8 block. For an 8x8 block, a total of eight averaged samples can be generated as shown in FIG. 8(b). The eight averaged samples are multiplied by a matrix vector and then an offset vector is added to generate 16 sample values at even coordinate positions as shown in FIG. 9(a). Then, as shown in FIG. 9(b), vertical interpolation can be performed using the average value of the upper samples of the current block. Then, as shown in FIG. 9(c), horizontal interpolation can be performed using the left samples of the current block.
[0215] The intra prediction mode used for the MIP mode may be configured to be different from the intra prediction mode used in the above-mentioned LIP, PDPC, MRL, ISP intra prediction, or normal intra prediction. The intra prediction mode for the MIP mode may be referred to as MIP intra prediction mode, MIP prediction mode, or MIP mode. For example, the matrix and offset used in the matrix vector multiplication may be set differently depending on the intra prediction mode for MIP. Here, the matrix may be referred to as a (MIP) weight matrix, and the offset may be referred to as a (MIP) offset vector or a (MIP) bias vector.
[0216] The intra prediction type information may include an MIP flag (e.g., intra_mip_flag) indicating whether an MIP mode is applied to the current block. If an MIP mode is applied to the current block (e.g., if the value of intra_mip_flag is 1), an MPM list for the MIP mode may be configured separately. The intra prediction type information may also include an MIP MPM flag (e.g., intra_mip_mpm_flag) indicating whether an MPM list is used for the MIP mode, an MPM index (e.g., intra_mip_mpm_idx) indicating the MIP mode used for the current block in the MPM list, and remaining intra prediction mode information (e.g., intra_mip_mpm_remainder) used to directly indicate the MIP mode if the MIP mode of the current block is not used in the MPM list.
[0217] When the MIP mode is performed, various MIP modes can be set according to the matrix and offset that constitute the MIP. The number of intra prediction modes for MIP can be set differently depending on the size of the current block. For example, i) if the height and width of the current block (e.g., CB or TB) are each 4, 35 intra prediction modes (i.e., intra prediction modes 0 to 34) are available, ii) if both the height and width of the current block are 8 or less, 19 intra prediction modes (i.e., intra prediction modes 0 to 18) are available, and iii) in other cases, 11 intra prediction modes (i.e., intra prediction modes 0 to 10) are available.
[0218] For example, if the height and width of the current block are each 4, the block size type is 0, if both the height and width of the current block are 8 or less, the block size type is 1, and otherwise, the block size type is 2, the number of intra prediction modes for MIP can be summarized as shown in the table below. However, this is merely an example, and the block size type and the number of available intra prediction modes can be changed.
[0219] [Table 2]
[0220] In one embodiment, information about the intra-prediction mode / type of the current block may be coded and signaled at a level such as a CU (CU syntax), or may be implicitly determined according to conditions. In this case, some modes / types may be explicitly signaled, and the remaining modes may be implicitly derived. For example, the CU syntax may indicate information about the (intra) prediction mode / type, as shown in Figures 10 to 12.
[0221] Here, pred_mode_flag may indicate the prediction mode of the current CU. For example, a value of 0 for pred_mode_flag may indicate that the current CU is coded in inter prediction mode. A value of 1 for pred_mode_flag may indicate that the current CU is coded in intra prediction mode.
[0222] pcm_flag[x0][y0] may indicate whether PCM (pulse coding modulation) mode is applied to the current block. When PCM mode is applied to the current block, prediction / transform / quantization, etc. are not applied, and original sample values in the current block may be coded and signaled. For example, pcm_flag[x0][y0] may indicate whether the pcm_sample syntax is present and the transform_tree() syntax is not present for the luma CU corresponding to the (x0, y0) position. For example, a value of 1 for pcm_flag[x0][y0] may indicate that the pcm_sample() syntax is present and the transform_tree() syntax is not present. A value of 0 for pcm_flag[x0][y0] may indicate that the pcm_sample() syntax is not present and the transform_tree() syntax is present.
[0223] The intra_mip_flag[x0][y0] may indicate whether the current block is predicted in MIP mode. For example, a first value (e.g., 0) of the intra_mip_flag[x0][y0] may indicate that the current block is not predicted in MIP mode. A second value (e.g., 1) of the intra_mip_flag[x0][y0] may indicate that the current block is predicted in MIP mode.
[0224] If intra_mip_flag[x0][y0] has a second value (e.g., 1), information regarding the MIP mode may be further obtained from the bitstream. For example, the syntax elements intra_mip_mpm_flag[x0][y0], intra_mip_mpm_idx[x0][y0], and intra_mip_mpm_remainder[x0][y0], which are information indicating the MIP mode of the current block, may be further obtained from the bitstream. If an MIP prediction mode is applied to the current block, an MPM list for MIP may be configured, and the intra_mip_mpm_flag may indicate whether the MIP mode for the current block is present in the MPM list for MIP (or among the MPM candidates). The intra_mip_mpm_idx may indicate an index of a candidate in the MPM list to be used as the MIP prediction mode of the current block when the MIP prediction mode for the current block exists in the MPM list for the MIP (i.e., when the value of intra_mip_mpm_flag is 1). The intra_mip_mpm_remainder may indicate the MIP prediction mode of the current block when the MIP prediction mode for the current block does not exist in the MPM list for the MIP (i.e., when the value of intra_mip_mpm_flag is 0), and may indicate one of all MIP prediction modes or one of the remaining modes excluding the candidate modes in the MPM list for the MIP from all MIP prediction modes as the MIP prediction mode of the current block.
[0225] On the other hand, if intra_mip_flag[x0][y0] has a first value (e.g., 0), information on MIP is not obtained from the bitstream, and intra prediction information other than MIP can be obtained from the bitstream. In one embodiment, intra_luma_mpm_flag[x0][y0], which indicates whether an MPM list for general intra prediction is generated, can be obtained from the bitstream.
[0226] When an intra prediction mode is applied to the current block, an MPM list for the current block may be configured, and intra_luma_mpm_flag may indicate whether the intra prediction mode for the current block is present in the MPM list (or present among the MPM candidates). For example, a first value (e.g., 0) of intra_luma_mpm_flag may indicate that the intra prediction mode for the current block is not present in the MPM list. A second value (e.g., 1) of intra_luma_mpm_flag may indicate that the intra prediction mode for the current block is present in the MPM list. When the intra_luma_mpm_flag value is 1, the intra_luma_not_planar_flag may be obtained from the bitstream.
[0227] The intra_luma_not_planar_flag may indicate whether the intra prediction mode of the current block is not planar. For example, a first value (e.g., 0) of the intra_luma_not_planar_flag may indicate that the intra prediction mode of the current block is planar. A second value (e.g., 1) of the intra_luma_not_planar_flag may indicate that the intra prediction mode of the current block is not planar.
[0228] The intra_luma_mpm_idx can be parsed and coded when the intra_luma_not_planar_flag is 'true' (i.e., a value of 1). In one embodiment, the planar mode can always be included as a candidate in the MPM list. However, the planar mode can be excluded from the MPM list by first signaling the intra_luma_not_planar_flag as described above. In this case, a unified MPM list can be configured from the various intra prediction types (general intra prediction, MRL, ISP, LIP, etc.) described above. In this case, the number of candidates in the MPM list can be reduced to five. The intra_luma_mpm_idx can indicate a candidate to be used as the intra prediction mode of the current block from among the candidates included in the MPM list from which the planar mode has been excluded.
[0229] On the other hand, if the value of intra_luma_mpm_flag is 0, the intra_luma_mpm_remainder may be parsed / coded. The intra_luma_mpm_remainder may indicate one of all intra prediction modes as the intra prediction mode of the current block, or may indicate one of the remaining modes excluding the candidate modes in the MPM list as the intra prediction mode of the current block.
[0230] Configuring the MPM list in MIP
[0231] When MIP is applied to the current block, an MPM list for the current block to which MIP is applied can be configured separately. This MPM list can be called by various names such as an MIP MPM list (or an MPM list for MIP, candMipModeList) to distinguish it from an MPM list when MIP is not applied to the current block. Hereinafter, this will be referred to as an MIP MPM list for distinction, but it can also be referred to as an MPM list.
[0232] The MIP MPM list may include n candidates, where n may be 3. The MIP MPM list may be constructed based on the left and upper peripheral blocks of the current block. Here, the left peripheral block may be the uppermost block among the peripheral blocks adjacent to the left boundary of the current block. The upper peripheral block may refer to the leftmost block among the peripheral blocks adjacent to the upper boundary of the current block. For example, if the coordinates of the current block are (xCb, yCb), the coordinates of the left peripheral block may be (xCb-1, yCb) and the coordinates of the upper peripheral block may be (xCb, yCb-1). Alternatively, the left peripheral block may be the lowermost block among the peripheral blocks adjacent to the left boundary of the current block. The upper peripheral block may refer to the rightmost block among the peripheral blocks adjacent to the upper boundary of the current block.
[0233] When MIP is applied to the left peripheral block, a first candidate intra prediction mode may be set to the same as the MIP intra prediction mode of the left peripheral block. Here, the first candidate intra prediction mode may be expressed as candMipModeA. Furthermore, for example, when MIP is applied to the upper peripheral block, a second candidate intra prediction mode may be set to the same as the MIP intra prediction mode of the upper peripheral block. Here, the second candidate intra prediction mode may be expressed as candMipModeB.
[0234] Meanwhile, a candidate intra prediction mode may be determined by comparing the size of the current block with the size of the neighboring blocks. For example, if MIP is applied to the left neighboring block and the block size type of the left neighboring block is the same as the block size type of the current block, a first candidate intra prediction mode (e.g., candMipModeA) may be set to be the same as the MIP intra prediction mode of the left neighboring block. Also, if MIP is applied to the upper neighboring block and the block size type of the upper neighboring block is the same as the block size type of the current block, a second candidate intra prediction mode (e.g., candMipModeB) may be set to be the same as the MIP intra prediction mode of the upper neighboring block.
[0235] Meanwhile, the left peripheral block or the upper peripheral block may be coded based on intra prediction other than MIP. For example, the left peripheral block or the upper peripheral block may be coded using an intra prediction mode other than MIP. In this case, it is not appropriate to use the general intra prediction mode number of a peripheral block to which MIP is not applied (e.g., the left peripheral block or the upper peripheral block) as a candidate intra mode for a current block to which MIP is applied. Therefore, in this case, for example, the peripheral block to which MIP is not applied may be processed as if a predetermined MIP intra prediction mode is applied. For example, if MIP is not applied to a peripheral block, the MIP intra prediction mode of the peripheral block may be determined to be a specific MIP intra prediction mode value (e.g., 0, 1, or 2), and an MIP MPM list may be generated.
[0236] Alternatively, as another example, the general intra prediction mode of a neighboring block to which MIP is not applied may be mapped to the MIP intra prediction mode based on a mapping table and used to construct the MIP MPM list. In this case, the mapping may be performed based on the block size type of the current block. For example, the mapping table may be a mapping table according to an embodiment shown in FIG. 13.
[0237] FIG. 13 shows an example of a mapping table for mapping the general intra prediction mode of a neighboring block to an MIP intra prediction mode. In FIG. 13 , IntraPredModeY[xNbX][yNbX] indicates the intra prediction mode of the neighboring block (left neighboring block / upper neighboring block). Here, the intra prediction mode of the neighboring block may be the intra prediction mode for the luma component (sample). Block size type MipSizeId indicates the block size type of the neighboring block or the current block. The numbers below the block size type values 0, 1, and 2 indicate the MIP intra prediction mode to which the general intra prediction mode is mapped for each block size type. Block size type 0 may indicate a block with a 4x4 pixel size. Block size type 1 may indicate a block with a 4x8, 8x4, or 8x8 pixel size. Block size type 2 may indicate a block with a size larger than 8x8 pixels.
[0238] In one embodiment, if the neighboring blocks (e.g., the left neighboring block / top neighboring block) are unavailable because they are located outside the current picture or the current tile / slice, or if MIP is applied, an MIP intra prediction mode that is unavailable to the current block depending on the block size type may be applied. In this case, predefined MIP intra prediction modes may be used as the first, second, and third candidate intra prediction modes. Figure 14 is a table illustrating an example of predetermined MIP intra prediction modes that can be used in such cases according to the size of the current block. For example, if all MIP intra prediction information of neighboring blocks is unavailable, a MIP MPM list may be generated based on the size of the current block according to the example of Figure 14.
[0239] In one embodiment, MIP intra prediction modes of peripheral blocks may be obtained. In this case, if the MIP intra prediction mode of the left peripheral block is different from the MIP intra prediction mode of the upper peripheral block, the MIP intra prediction mode of the left peripheral block may be set as a first candidate intra prediction mode. Then, the MIP intra prediction mode of the upper peripheral block may be set as a second candidate intra prediction mode. Thus, the first candidate in the MIP MPM list (e.g., candMipModeList[0]) may be set as the MIP intra prediction mode of the left peripheral block, and the second candidate in the MIP MPM list (e.g., candMipModeList[1]) may be set as the MIP intra prediction mode of the upper peripheral block.
[0240] The order of intra prediction candidates in the MIP list can be changed. For example, the MIP intra prediction mode of the upper peripheral block can be included as the first candidate in the MIP MPM list (e.g., candMipModeList[0]), and the MIP intra prediction mode of the left peripheral block can be included as the second candidate in the MIP MPM list (e.g., candMipModeList[1]).
[0241] The third candidate intra prediction mode can be a predetermined MIP intra prediction mode according to Fig. 14. For example, the third candidate intra prediction mode in Fig. 14 can be used as the second candidate in the MIP MPM list (e.g., candMipModeList[2]).
[0242] In another embodiment, the third candidate intra prediction mode may be determined to be a MIP intra prediction mode that does not overlap with the first and second candidate intra prediction modes. This may be determined according to the order of the MIP intra prediction modes shown in FIG. 14. For example, if the first candidate intra prediction mode of FIG. 14 is not used for the first and second candidates in the MIP MPM list, the first candidate intra prediction mode of FIG. 14 can be used as the third candidate of the MIP MPM list (e.g., candMipModeList[2]). Otherwise, for example, if the second candidate intra prediction mode of FIG. 15 is not used for the first and second candidates in the MIP MPM list, the second candidate intra prediction mode of FIG. 14 can be used as the third candidate of the MIP MPM list (e.g., candMipModeList[2]). Otherwise, the third candidate intra prediction mode of FIG. 14 can be used as the third candidate of the MIP MPM list (e.g., candMipModeList[2]).
[0243] Alternatively, if the MIP intra prediction mode of the left peripheral block and the MIP intra prediction mode of the upper peripheral block are the same, either the MIP intra prediction mode of the left peripheral block or the MIP intra prediction mode of the upper peripheral block can be included as the first candidate of the MIP MPM list (e.g., candMipModeList[0]), and the second candidate of the MIP MPM list (e.g., candMipModeList[1]) and the third candidate of the MIP MPM list (e.g., candMipModeList[2]) can use a predetermined MIP intra prediction mode as shown in Figure 15, as described above.
[0244] As described above, the MIP intra prediction mode of the current block may be derived based on the MIP MPM list. In this case, as described above, the MPM flag, MPM index, and remaining intra prediction mode information for the MIP may be referred to as intra_mip_mpm_flag, intra_mip_mpm_idx, and intra_mip_mpm_remainder, respectively.
[0245] Intra-prediction mode determination using MPM list
[0246] The intra prediction mode signaling procedure in the encoding device and the intra prediction mode decision procedure in the decoding device may be performed, for example, as follows.
[0247] 15 is a flowchart illustrating a method for encoding an intra prediction mode using an MPM list. The encoding apparatus may construct an MPM list for a current block as described above (S1510).
[0248] Next, the encoding device may determine an intra prediction mode for the current block (S1520). The encoding device may perform prediction based on various intra prediction modes and determine an optimal intra prediction mode based on rate-distortion optimization (RDO) based on the prediction. In one embodiment, the encoding device may determine the optimal intra prediction mode using only the MPM candidates configured in the MPM list, or may determine the optimal intra prediction mode using not only the MPM candidates configured in the MPM list but also the remaining intra prediction modes. For example, if the intra prediction type of the current block is not a normal intra prediction type but a specific type (e.g., LIP, MRL, or ISP), the encoding device may determine the optimal intra prediction mode by considering only the MPM candidates as intra prediction mode candidates for the current block. In such a case, the intra prediction mode for the current block may be determined only from the MPM candidates, and in such a case, the mpm flag may not be coded / signaled. In such a case, the decoding device can infer that the mpm flag is 1 without receiving any separate signaling of the mpm flag.
[0249] The encoding device may encode the intra prediction mode information and output the encoded information in a bitstream format (S1530). In one embodiment, the encoding device may signal whether the intra prediction mode of the current block is intra planar mode by encoding information (e.g., intra_luma_not_planar_flag) indicating whether the intra prediction mode of the current block is not intra planar mode. If the intra prediction mode of the current block is intra planar mode, the encoding device may set the value of intra_luma_not_planar_flag to a first value (e.g., 0). On the other hand, if the intra prediction mode of the current block is not intra planar mode, the encoding device may set the value of intra_luma_not_planar_flag to a second value (e.g., 1).
[0250] Meanwhile, if the intra prediction mode of the current block is not intra planar mode, the encoding device may determine and signal the intra prediction mode depending on whether block-based delta pulse code modulation (BDPCM) is applied to the current block and the application direction. In one embodiment, if BDPCM is applied to the current block, the encoding device may determine the intra prediction mode depending on the application direction of the BDPCM. For example, if the application direction of the BDPCM is either horizontal or vertical, the encoding device may determine the intra prediction mode as horizontal or vertical mode in the same direction. In this case, the encoding device may signal the intra prediction mode of the current block by encoding and signaling information (intra_bdpcm_flag) indicating whether BDPCM is applied to the current block and information (intra_bdpcm_dir_flag) indicating the application direction of the BDPCM. In this case, signaling of the mpm flag may be omitted.
[0251] Meanwhile, when the prediction mode of the current block is neither an intra planar mode nor BDPCM is applied, the encoding device may encode intra prediction mode information including the above-mentioned mpm flag (e.g., intra_luma_mpm_flag), mpm index (e.g., intra_luma_mpm_idx), and / or remaining intra prediction mode information (e.g., intra_luma_mpm_remainder) to signal the intra prediction mode. Generally, the mpm index and remaining intra prediction mode information are mutually alternative and may not be signaled simultaneously when indicating the intra prediction mode for one block. That is, the mpm flag value 1 and the mpm index may be signaled together, or the mpm flag value 0 and remaining intra prediction mode information may be signaled together. However, as described above, when a specific intra prediction type is applied to the current block, the mpm flag may not be signaled, and only the mpm index may be signaled. That is, in this case, the intra prediction mode information may include only the mpm index.
[0252] Meanwhile, in general, if the intra prediction mode of the current block is one of the MPM candidates in the MPM list, the encoding device may generate an mpm index (e.g., intra_luma_mpm_idx) pointing to one of the MPM candidates. If the intra prediction mode of the current block is not in the MPM list, the encoding device may generate remaining intra prediction mode information (e.g., intra_luma_mpm_remainder) pointing to the same mode as the intra prediction mode of the current block from the remaining intra prediction modes not included in the MPM list. For example, when the encoding device encodes the intra prediction mode (e.g., IntraPredModeY) of the current block to intra_luma_mpm_remainder, it first subtracts 1 from IntraPredModeY, sorts the intra prediction modes belonging to the MPM list in descending order of the magnitude of the intra prediction mode values, compares candModeList[0] to candModeList[4] with the value of IntraPredModeY, and if the value of IntraPredModeY-1 is smaller than the value of candModeList[], it can determine the value of IntraPredModeY determined by subtracting the value of IntraPredModeY by one by one as intra_luma_mpm_remainder.
[0253] On the other hand, if the intra prediction mode of the current block is the MIP mode, the encoding device may generate an MPM list for the MIP mode and encode the current block as described above. At this time, MPM encoding information for the MIP mode may be signaled. At this time, the MPM flag may be signaled as intra_mip_mpm_flag, the MPM index may be signaled as intra_mip_mpm_idx, and remaining intra prediction mode information may be signaled as intra_mip_mpm_remainder.
[0254] 16 is a flowchart illustrating a method for performing decoding using an MPM list by a decoding device according to an embodiment. The decoding device can determine an intra prediction mode according to intra prediction mode information determined and signaled by the encoding device.
[0255] 16, the decoding apparatus may obtain intra-prediction mode information from a bitstream (S1610). The intra-prediction mode information may include at least one of an mpm flag, an mpm index, and a remaining intra-prediction mode, as described above.
[0256] The decoding device may configure an MPM list (S1620). The MPM list may be configured in the same manner as the MPM list configured in the encoding device. That is, the MPM list may include intra-prediction modes of neighboring blocks, and may further include a specific intra-prediction mode according to a predetermined method.
[0257] In one embodiment, a decoding device may determine whether the intra prediction mode of a current block is intra planar mode based on information indicating that the intra prediction mode of the current block is not intra planar mode (e.g., intra_luma_not_planar_flag). The decoding device may determine that the intra prediction mode of the current block is intra planar mode if the value of intra_luma_not_planar_flag is a first value (e.g., 0). On the other hand, the decoding device may determine that the intra prediction mode of the current block is not intra planar mode if the value of intra_luma_not_planar_flag is a second value (e.g., 1).
[0258] Meanwhile, when the intra prediction mode of the current block is not intra planar mode, the decoding apparatus may determine the intra prediction mode depending on whether block-based delta pulse code modulation (BDPCM) is applied to the current block and the application direction. In one embodiment, when information (intra_bdpcm_flag) indicating whether BDPCM is applied to the current block obtained from the bitstream indicates that BDPCM is applied, the decoding apparatus may determine one of the horizontal and vertical BDPCM application directions based on information (intra_bdpcm_dir_flag) indicating the BDPCM application direction obtained from the bitstream. Then, the decoding apparatus may determine the intra prediction mode as horizontal or vertical mode in the same direction as the determined BDPCM application direction.
[0259] Meanwhile, when the prediction mode of the current block is neither intra planar mode nor BDPCM is applied, the decoding apparatus may generate an MPM list in the manner described above to determine an intra prediction mode. For example, the MPM list may be determined based on the intra prediction modes of neighboring blocks of the current block. The decoding apparatus may determine the MPM list based on the intra prediction modes of the upper and left neighboring blocks of the current block. For example, in one embodiment, the decoding apparatus may determine the MPM list based on a first intra prediction candidate determined based on the intra prediction mode of the left neighboring block and a second intra prediction candidate determined based on the intra prediction mode of the upper neighboring block.
[0260] The decoding device may determine whether to determine the intra prediction mode of the current block using the MPM list (S1630). For example, if the value of the mpm flag is 1, the decoding device may derive a candidate indicated by the mpm index from among MPM candidates in the MPM list as the intra prediction mode of the current block. For example, the decoding device may determine the intra prediction mode of the current block according to the value of intra_luma_mpm_idx, which is an mpm index. For example, the decoding device may determine candModeList[intra_luma_mpm_idx] as the intra prediction mode of the current block.
[0261] As another example, if the value of the mpm flag is 0, the decoding device may derive the intra prediction mode indicated by the remaining intra prediction mode information from among the remaining intra prediction modes not included in the MPM list as the intra prediction mode of the current block (S1640).
[0262] For example, the decoding device may determine the intra prediction mode (e.g., IntraPredModeY) of the current block based on remaining intra prediction mode information (e.g., intra_luma_mpm_remainder) indicating the intra prediction mode of the current block. For example, the decoding device may set the value of IntraPredModeY to intra_luma_mpm_remainder+1. Then, the decoding device sorts the intra prediction modes belonging to the MPM list in ascending order of the magnitude of the intra prediction mode values, compares candModeList[0] to candModeList[4] with the value of IntraPredModeY, and if the value of IntraPredModeY is smaller than the value of candModeList[], increments the value of IntraPredModeY by 1 to determine the value of IntraPredModeY indicating the intra prediction mode of the current block.
[0263] On the other hand, as another example, if the intra prediction type of the current block is a specific type (e.g., LIP, MRL, or ISP), the decoding device can derive the candidate pointed to by the mpm index in the MPM list as the intra prediction mode of the current block without checking the mpm flag.
[0264] On the other hand, if the intra prediction mode of the current block is the MIP mode, the decoding apparatus may generate an MPM list for the MIP mode and decode the current block as described above. At this time, MPM coding information for the MIP mode may be obtained through a bitstream. At this time, the MPM flag may be obtained using intra_mip_mpm_flag, the MPM index may be obtained using intra_mip_mpm_idx, and remaining intra prediction mode information may be obtained using intra_mip_mpm_remainder.
[0265] Mapping Issues Between MIP and General Intra Prediction Modes
[0266] As described above, to determine the intra prediction mode or MIP mode of the current block, an MPM list for a general intra prediction mode or an MPM list for MIP may be generated based on information about neighboring blocks. In this case, the neighboring blocks may include a left neighboring block and an upper neighboring block of the current block. Here, the general intra prediction mode refers to an intra prediction mode rather than an MIP mode. For example, the general intra prediction mode may refer to non-directional intra prediction modes such as intra planar mode, intra DC mode, and directional intra prediction mode.
[0267] If the MIP mode is applied to the current block but an intra prediction mode (general intra prediction mode) is applied to the surrounding blocks instead of the MIP mode, the intra prediction mode of the surrounding blocks needs to be mapped to the MIP mode in order to generate an MPM list for the current block using prediction information of the surrounding blocks. Also, if the general intra prediction mode is applied to the current block but an MIP mode is applied to the surrounding blocks, the MIP mode of the surrounding blocks needs to be mapped to the general intra prediction mode in order to generate an MPM list for the current block using prediction information of the surrounding blocks.
[0268] However, since the MIP mode can have various numbers of prediction modes depending on the luma block size as follows, there is a problem in that it is difficult to perform 1:1 mapping between the general intra prediction mode and the MIP mode.
[0269] [Table 3]
[0270] Since the number of general intra prediction modes and the number of MIP modes are different, in order to perform mapping by interpolating between them, MIP modes and general intra prediction modes may be mapped using mapping tables such as those shown in Figures 7 and 13. For example, when referring to neighboring blocks to generate an MPM list for a current block encoded in general intra mode, if the intra prediction mode of the neighboring blocks is MIP mode, an MPM list as shown in Figure 17 must be generated to map the MIP mode of the neighboring blocks to the intra prediction mode. More specifically, during encoding and decoding processes, the encoding and decoding devices may determine that the prediction mode of the current block is general intra prediction mode (S1710) and that the prediction mode of the neighboring blocks is MIP mode (S1720). If the prediction mode of the neighboring blocks is MIP mode, the encoding and decoding devices may determine whether the neighboring blocks are 4x4 luma blocks (S1730). When a neighboring block is a 4x4 luma block, the encoding and decoding apparatuses may determine a general intra prediction mode corresponding to the MIP mode of the neighboring block by mapping the 35 MIP modes to the 67 intra modes of Figure 7 (S1740). When a neighboring block is not a 4x4 luma block, the encoding and decoding apparatuses may determine whether the neighboring block is a 4x8, 8x4, or 8x8 luma block (S1750). When a neighboring block is a 4x8, 8x4, or 8x8 luma block, the encoding and decoding apparatuses may determine a general intra prediction mode corresponding to the MIP mode of the neighboring block by mapping the 19 MIP modes to the 67 intra modes of Figure 7 (S1760). Alternatively, if the surrounding block is not a 4x8, 8x4, or 8x8 luma block, the encoding and decoding devices may determine a general intra prediction mode corresponding to the MIP mode of the surrounding block according to the method of mapping the 11 MIP modes to 67 intra modes in Figure 7 (S1770).Finally, the encoding and decoding devices may generate an MPM list for the current block in the determined general intra prediction mode according to the method described above (S1780).
[0271] Similarly, when referring to neighboring blocks to generate an MPM list for a current block coded in MIP mode, if the intra prediction mode of the neighboring blocks is a general intra prediction mode, steps S1810 to S1880 must be performed as shown in FIG. 18 to map the intra prediction mode of the neighboring blocks to MIP mode.
[0272] However, when performing mapping in this manner, correlation between the MIP mode and the intra prediction mode occurs, which requires a size comparison between the current block and the surrounding blocks, and additional memory is required to store such a mapping table.
[0273] Mapping MIP intra prediction modes to general intra prediction modes
[0274] Hereinafter, a mapping method according to an embodiment will be described, which reduces the complexity of the mapping algorithm and saves memory for storing the mapping table by removing the correlation between the block size and the MIP mode and the intra prediction mode.
[0275] When mapping an MIP mode to a general intra prediction mode, the encoding and decoding apparatus according to an embodiment may determine the MIP mode as a predetermined intra prediction mode without using a block size and a mapping table.
[0276] For example, when converting MIP modes into intra prediction modes, the encoding and decoding apparatus according to an embodiment can map all MIP modes into intra planar (PLANAR) modes.
[0277] Alternatively, when converting MIP modes into intra prediction modes, the encoding and decoding apparatus according to an embodiment may map all MIP modes to intra DC modes.
[0278] Alternatively, when converting MIP modes into intra prediction modes, the encoding and decoding apparatus according to an embodiment may map all MIP modes to intra vertical modes.
[0279] Alternatively, when converting MIP modes into intra prediction modes, the encoding and decoding apparatus according to an embodiment can map all MIP modes into intra horizontal modes.
[0280] In one embodiment, when searching for the intra prediction mode of a surrounding block to generate an MPM list for determining the intra prediction mode of a current block, if MIP prediction is applied to the surrounding block, the intra prediction mode of the surrounding block can be induced to intra planar mode to generate the current block MPM list.
[0281] On the other hand, if the current block (or coding unit) includes a luma block and a chroma block, when configuring the intra prediction mode of the chroma block, if MIP prediction is applied to the luma block corresponding to the position of the chroma block, the intra prediction mode indicated by the DM mode of the chroma block (direct mode, using the luma block intra prediction mode corresponding to the chroma block) can be induced to intra planar mode.
[0282] By mapping MIP modes to intra prediction modes in this manner, when generating an MPM list when a current block is encoded or decoded in a general intra mode, the encoding or decoding device can simply determine all MIP modes as a predetermined general intra prediction mode and generate the MPM list based on the predetermined general intra prediction mode. Accordingly, the MPM list generation step previously described with reference to FIG. 17 can be simplified as shown in FIG. 19. Referring to FIG. 19, it can be seen that steps S1730 to S1780 of the conventional MPM list generation step described with reference to FIG. 17 are simplified to a step of determining a general intra prediction mode corresponding to the MIP mode (S1791) by mapping all MIP modes to a predetermined general intra prediction mode, and a step of generating an MPM list using the determined general intra prediction mode (S1792). Here, the predetermined general intra prediction mode may be any one of an intra planar mode, an intra DC mode, an intra vertical mode, and an intra horizontal mode.
[0283] Similarly, when determining the intra prediction mode for the aforementioned chroma block, if the luma block corresponding to the chroma block is in MIP mode, the intra prediction mode corresponding to the luma block can be determined to be a predetermined general intra prediction mode without performing the size mapping described above.
[0284] An image encoding method performed by an encoding device according to an embodiment will now be described with reference to Fig. 20. The encoding device according to an embodiment may include a memory and at least one processor, and the at least one processor may perform the following encoding method.
[0285] An encoding apparatus according to an embodiment may identify a prediction mode of a current block (S2010). If the prediction mode of the current block is an intra prediction mode, the encoding apparatus may determine a candidate intra prediction mode based on the prediction modes of neighboring blocks located around the current block (S2020). The candidate intra prediction modes may include a first candidate intra prediction mode and a second candidate intra prediction mode. The first candidate intra prediction mode may be determined based on the prediction mode of a first neighboring block located around the current block, and the second candidate intra prediction mode may be determined based on the prediction mode of a second neighboring block located around the current block. Here, the first candidate intra prediction mode may be the first intra prediction candidate described above, and the second candidate intra prediction mode may be the second intra prediction candidate described above. For example, the encoding apparatus may determine a first candidate intra prediction mode (e.g., candIntraPredModeA) based on the intra prediction mode of a left neighboring block and a second candidate intra prediction mode (e.g., candIntraPredModeB) based on the intra prediction mode of an upper neighboring block.
[0286] In this case, when the prediction mode of the surrounding block is the MIP mode, the encoding device may determine the candidate intra prediction mode of the surrounding block to be a predetermined intra prediction mode. Here, the predetermined intra prediction mode may be any one of intra planar mode, intra DC mode, intra horizontal mode, and intra vertical mode. For example, when the intra prediction mode of the left surrounding block is the MIP mode, the encoding device may determine the first candidate intra prediction mode (e.g., candIntraPredModeA) to be any one of intra planar mode, intra DC mode, intra horizontal mode, and intra vertical mode. Alternatively, when the intra prediction mode of the upper surrounding block is the MIP mode, the encoding device may determine the second candidate intra prediction mode (e.g., candIntraPredModeB) to be any one of intra planar mode, intra DC mode, intra horizontal mode, and intra vertical mode.
[0287] Next, the encoding device may generate a candidate intra-prediction mode list for the current block based on the candidate intra-prediction modes (S2030). The candidate intra-prediction mode list may be the MPM list described above. For example, the encoding device may generate the candidate intra-prediction mode list based on the first and second candidate intra-prediction modes, as described above. In this case, if the prediction modes of the first and second surrounding blocks are both MIP modes, the encoding device may determine that the candidate intra-prediction mode list includes a predetermined candidate intra-prediction mode. Here, the predetermined candidate intra-prediction mode may be at least one of DC mode and vertical mode.
[0288] Next, the encoding device may encode an intra-prediction mode indicator indicating the intra-prediction mode of the current block based on the candidate intra-prediction mode list (S2040). Here, the intra-prediction mode indicator may include the mpm flag signaled in the form of the intra_luma_mpm_flag syntax element, the mpm index signaled in the form of the mpm_idx or intra_luma_mpm_idx syntax element, and remaining intra-prediction mode information signaled in the form of the rem_intra_luma_pred_mode or intra_luma_mpm_remainder syntax element. The encoding device may also generate a bitstream by encoding the intra-prediction mode indicator and transmit the bitstream to a decoding device.
[0289] An image decoding method performed by a decoding device according to an embodiment will now be described with reference to Figure 21. The decoding device according to an embodiment may include a memory and at least one processor, and the at least one processor may perform the following decoding method.
[0290] First, a decoding apparatus according to an embodiment may identify a prediction mode of a current block (S2110). If the prediction mode of the current block is an intra prediction mode, the decoding apparatus may determine candidate intra prediction modes for the current block based on prediction modes of neighboring blocks located around the current block (S2120).
[0291] When the prediction mode of the neighboring block is the MIP mode, the decoding apparatus may determine the candidate intra prediction mode as a predetermined intra prediction mode, where the predetermined intra prediction mode may be any one of an intra planar mode, an intra DC mode, an intra horizontal mode, and an intra vertical mode.
[0292] The decoding device can determine whether the prediction mode of the surrounding block is the MIP mode based on the MIP mode indicator for the surrounding block. The MIP mode indicator is the above-mentioned MIP flag (e.g., intra_mip_flag), and the decoding device can obtain the MIP mode indicator from the bitstream.
[0293] The candidate intra prediction modes may include a first candidate intra prediction mode and a second candidate intra prediction mode. In this case, the first candidate intra prediction mode may be determined based on the prediction mode of a first neighboring block located in the vicinity of the current block. And the second candidate intra prediction mode may be determined based on the prediction mode of a second neighboring block located in the vicinity of the current block.
[0294] Here, the first candidate intra prediction mode may be the first intra prediction candidate described above, and the second candidate intra prediction mode may be the second intra prediction candidate described above. For example, the decoding apparatus may determine the first candidate intra prediction mode (e.g., candIntraPredModeA) based on the intra prediction mode of the left peripheral block, and determine the second candidate intra prediction mode (e.g., candIntraPredModeB) based on the intra prediction mode of the upper peripheral block.
[0295] For example, when the intra prediction mode of the left peripheral block is the MIP mode, the decoding apparatus may determine the first candidate intra prediction mode (e.g., candIntraPredModeA) to be any one of the intra planar mode, the intra DC mode, the intra horizontal mode, and the intra vertical mode. Alternatively, when the intra prediction mode of the upper peripheral block is the MIP mode, the decoding apparatus may determine the second candidate intra prediction mode (e.g., candIntraPredModeB) to be any one of the intra planar mode, the intra DC mode, the intra horizontal mode, and the intra vertical mode.
[0296] The decoding apparatus may then generate a candidate intra-prediction mode list for the current block based on the candidate intra-prediction modes (S2130). The candidate intra-prediction mode list may be the MPM list described above. For example, the decoding apparatus may generate the candidate intra-prediction mode list based on the first and second candidate intra-prediction modes, as described above. In this case, if the prediction modes of the first and second surrounding blocks are both MIP modes, the decoding apparatus may determine that the candidate intra-prediction mode list includes a predetermined candidate intra-prediction mode. Here, the predetermined candidate intra-prediction mode may be at least one of a DC mode and a vertical mode.
[0297] In addition, the decoding device can generate a candidate intra prediction mode list including the value of the first candidate intra prediction mode when the first candidate intra prediction mode and the second candidate intra prediction mode are the same and the first candidate intra prediction mode is an intra prediction mode having a value greater than the prediction mode value indicating DC mode.
[0298] In addition, the decoding device can generate a candidate intra prediction mode list including the second candidate intra prediction mode when the prediction mode of the first surrounding block is MIP mode, the first candidate intra prediction mode and the second candidate intra prediction mode are different from each other, and the second candidate intra prediction mode is an intra prediction mode having a value greater than the prediction mode value indicating DC mode.
[0299] The decoding apparatus may then determine the intra prediction mode of the current block based on the candidate intra prediction mode list (S2140). The decoding apparatus may determine one of the candidate intra prediction modes included in the candidate intra prediction mode list as the intra prediction mode of the current block based on the intra prediction mode indicator obtained from the bitstream. For example, the intra prediction mode indicator may be the above-mentioned mpm index and may be signaled in the form of an mpm_idx or intra_luma_mpm_idx syntax element via the bitstream.
[0300] Furthermore, an encoding device according to an embodiment may encode the intra prediction mode of a chroma block according to the above-described MIP mode mapping. The encoding device according to an embodiment may use a DM mode to signal the intra prediction mode of the chroma block. In this case, the encoding device may determine the intra prediction mode applied according to the DM mode as the intra prediction mode indicated by the reference mode. Here, the reference mode may be determined based on the prediction mode of a luma block corresponding to the chroma block and may be identified by a parameter lumaIntraPredMode or IntraPredModeY.
[0301] For example, the encoding device may determine the intra prediction mode of the luma block corresponding to the chroma block as the reference mode, thereby determining the intra prediction mode of the chroma block determined to be in the DM mode as the intra prediction mode of the luma block.
[0302] In this case, if the luma block is a luma block to which the MIP mode is applied, the encoding device may determine the reference mode as the planar mode instead of the MIP mode. Accordingly, the encoding device may determine the intra prediction mode of the chroma block determined to be in the DM mode as the intra planar mode.
[0303] Alternatively, if the MIP mode is not applied to the luma block, the encoding device may determine the reference mode based on the prediction mode of the luma block. For example, if the luma block is predicted in a predetermined mode, the encoding device may determine the reference mode as intra DC mode. Here, the predetermined mode may include IBC mode or another mode. Thus, the encoding device may determine the intra prediction mode of the chroma block determined to be in DM mode as intra DC mode.
[0304] The encoding device may then encode the intra prediction mode of the chroma block based on the reference mode. For example, when the intra planar mode is selected as the optimal prediction mode for encoding the chroma block and the prediction mode of the luma block corresponding to the chroma block is the MIP mode, the encoding device may encode information indicating that the intra prediction mode of the chroma block is the intra prediction mode identified according to the DM mode.
[0305] In addition, in accordance with the above encoding method, a decoding apparatus according to an embodiment may determine an intra-prediction mode of a chroma block according to the above-described MIP mode mapping. The decoding apparatus according to an embodiment may determine a reference mode for determining the intra-prediction mode of a chroma block based on a prediction mode of a luma block corresponding to the chroma block. Here, the reference mode may be identified by a parameter lumaIntraPredMode or IntraPredModeY.
[0306] In this case, if a luma block corresponding to a chroma block is a luma block to which the MIP mode is applied, the decoding device may determine the reference mode to be the planar mode. Accordingly, the decoding device may determine the intra prediction mode of the chroma block determined to be in the DM mode to be the intra planar mode.
[0307] Alternatively, if the MIP mode is not applied to the luma block, the decoding device may determine the reference mode based on the prediction mode of the luma block. For example, if the luma block is predicted in the IBC mode or another predetermined mode, the decoding device may determine the reference mode as the intra DC mode. As a result, the decoding device may determine the intra prediction mode of the chroma block determined to be in the DM mode as the intra DC mode.
[0308] Alternatively, if the MIP mode is not applied to the luma block and the luma block is not predicted in the IBC mode or another predetermined mode, the decoding device may determine the reference mode as the intra prediction mode of the luma block, thereby allowing the decoding device to determine the intra prediction mode of the chroma block determined to be in the DM mode as the intra prediction mode of the luma block.
[0309] The decoding apparatus may then determine the intra prediction mode of the chroma block based on the reference mode. For example, if the intra prediction mode of the chroma mode is determined to be the DM mode, the decoding apparatus may determine the intra prediction mode of the chroma block to be the intra prediction mode corresponding to the reference mode.
[0310] As a result, the encoding device and the decoding device do not need to compare the block sizes of the current block or the surrounding blocks even when the prediction mode of the surrounding blocks or the luma blocks referenced when the current block is encoded or decoded in the general intra mode is the MIP mode, thereby reducing the computation complexity. Furthermore, since there is no need to use a mapping table for mapping, memory space efficiency can be improved.
[0311] Figure 22 shows experimental data comparing the coding rate when an MPM list for a current block is generated by mapping all MIP modes to intra planar modes according to the mapping method of Figure 19 described above when converting the MIP modes of surrounding blocks to intra prediction modes, with the method using the mapping table described in Figure 17. As shown in Figure 22, no difference in coding rate is observed. In other words, by applying the above method, it is possible to minimize coding loss, reduce algorithm complexity, and reduce memory usage for the mapping table.
[0312] Mapping general intra prediction modes to MIP intra prediction modes
[0313] Hereinafter, a mapping method according to another embodiment will be described, which reduces the complexity of the mapping algorithm and saves memory for storing the mapping table by removing the correlation between the block size and the MIP mode and the intra prediction mode.
[0314] When mapping general intra prediction modes to MIP modes, the encoding and decoding apparatus according to an embodiment can determine all general intra prediction modes to be predetermined MIP modes without using a block size and a mapping table.
[0315] For example, when converting general intra prediction modes into MIP modes, the encoding and decoding apparatus according to an embodiment may map all general intra prediction modes to the 0th MIP mode.
[0316] Alternatively, when converting general intra prediction modes into MIP modes, the encoding and decoding apparatus according to an embodiment may map all general intra prediction modes to the first MIP mode.
[0317] Alternatively, when converting general intra prediction modes into MIP modes, the encoding and decoding apparatus according to an embodiment may map all general intra prediction modes to the third MIP mode.
[0318] Alternatively, when converting general intra prediction modes to MIP modes, the encoding and decoding devices according to one embodiment may map all general intra prediction modes to the MIP mode that has the highest probability of selection during the encoding or decoding process.
[0319] By mapping MIP modes to intra prediction modes in this manner, when generating an MPM list when a current block is encoded or decoded in MIP mode, the encoding or decoding device can simply determine all general intra prediction modes as a predetermined MIP mode and generate the MPM list based on the determined MIP mode. Accordingly, the MPM list generation step previously described with reference to FIG. 18 can be simplified as shown in FIG. 23. Referring to FIG. 23, it can be seen that steps S1830 to S1880 of the conventional MPM list generation step described with reference to FIG. 18 have been simplified to a step S1891 of determining an MIP mode corresponding to the general intra prediction mode by mapping all general intra prediction modes to a predetermined MIP mode, and a step S1892 of generating an MPM list using the determined MIP mode. Here, the predetermined MIP mode may be any one of MIP mode 0, MIP mode 1, MIP mode 3, and the MIP mode that stochastically exhibits the highest selection rate during the encoding or decoding process.
[0320] Figure 24 shows experimental data comparing the coding rate when an MPM list for the MIP mode of a current block is generated by mapping all general intra prediction modes to MIP mode 0 according to the above-described mapping method when converting the general intra prediction modes of neighboring blocks to MIP modes with the coding rate when the MPM list described with reference to Figure 18 is generated. As shown in Figure 24, there is no significant difference in the coding rate. In other words, by applying the above-described method, it is possible to minimize coding loss, reduce algorithm complexity, and reduce memory usage for the mapping table.
[0321] Alternatively, the encoding and decoding apparatus according to an embodiment may convert the general intra prediction mode to the MIP mode using a simplified mapping table as shown in Table 4 below.
[0322] [Table 4]
[0323] For example, the encoding and decoding apparatus according to an embodiment may map all general intra prediction modes to MIP mode 17, 0, or 1 according to the size (MipSizeId) of the current block.
[0324] As mentioned above, current block size 0 may refer to a 4x4 luma block, current block size 1 may refer to a 4x8, 8x4, or 8x8 luma block, and current block size 2 may refer to a luma block larger than 8x8.
[0325] Alternatively, the encoding and decoding apparatus according to an embodiment may convert the general intra prediction mode to the MIP mode using a simplified mapping table as shown in Table 5 below.
[0326] [Table 5]
[0327] For example, the encoding and decoding apparatus according to an embodiment may map all general intra prediction modes to MIP modes 5, 0, or 6 according to the size (MipSizeId) of the current block. Alternatively, the encoding and decoding apparatus according to an embodiment may convert general intra prediction modes to MIP modes using a simplified mapping table as shown in Table 6 below.
[0328] [Table 6]
[0329] For example, the encoding and decoding apparatus according to an embodiment may map all general intra prediction modes to the MIP mode that has the highest probability of selection for each block size according to the size (MipSizeId) of the current block. Although the encoding and decoding apparatus according to an embodiment may reduce the complexity of the algorithm by using the simplified mapping table as described above, the encoding and decoding apparatus may perform more sophisticated mapping than the above-described mapping method that collectively maps all general intra prediction modes to the MIP mode without comparing block sizes, because the mapping table is simplified as described above.
[0330] How to generate an MPM list in MIP mode
[0331] As described above, when the prediction mode of the current block is the MIP mode, it is necessary to check the MIP modes of the neighboring blocks in order to generate the MPM list of the current block. Figure 25 is a flowchart illustrating a method for determining candidate MIP modes for constructing the MPM list of the current block according to one embodiment.
[0332] 25, in one embodiment, even if the prediction mode of a neighboring block is MIP mode (S2510), the encoding and decoding devices may determine the MIP mode of the neighboring block as a candidate MIP mode for constructing an MPM list for the current block only if the number of MIP modes that the current block and the neighboring block can have is the same, i.e., if the size of the current block and the neighboring block are the same (S2520). For example, even if the prediction mode of the neighboring block is MIP mode (S2510), the encoding and decoding devices may determine the value of the candidate MIP mode for constructing an MPM list for the current block as −1 if the number of MIP modes that the current block and the neighboring block can have is not the same, i.e., if the size of the current block and the neighboring block are not the same (S2520). The value −1 of the candidate MIP mode may indicate that the MIP mode value from the neighboring block cannot be used.
[0333] In addition, if the prediction mode of the surrounding block is not MIP mode (S2510), the encoding device and decoding device can convert the general intra prediction mode to a candidate MIP mode according to Figure 18 (S2550), as previously described with reference to Figure 18.
[0334] As in the method of Figure 25, the encoding device and decoding device must always check the sizes of the current block and surrounding blocks in the process of referring to surrounding blocks to determine the candidate MIP mode of the current block, and if the prediction mode of the surrounding block is not MIP mode, mapping must be performed as described with reference to Figure 18, which increases the computational complexity.
[0335] To reduce computational complexity, when generating an MPM list for a current block to be encoded or decoded in MIP mode, an encoding device and a decoding device according to an embodiment may check whether neighboring blocks are in MIP mode and determine candidate MIP modes accordingly. For example, if the encoding or decoding mode of the neighboring blocks is MIP mode, the encoding device and the decoding device may set the candidate MIP mode to mode 0. Alternatively, if the encoding or decoding mode of the neighboring blocks is not MIP mode, the encoding device and the decoding device may set the MIP mode value to -1. This allows the encoding device and the decoding device to simply check whether MIP mode is applied to the neighboring blocks, thereby simplifying the algorithm for determining candidate MIP modes and omitting a mapping procedure for converting the neighboring blocks into MIP mode when they are in a general intra prediction mode.
[0336] Meanwhile, the encoding device and the decoding device may determine the candidate MIP mode based on the sizes of the current block and the surrounding blocks to improve prediction accuracy. For example, when the current block is in MIP mode and the encoding device and the decoding device refer to the surrounding blocks to generate the MPM list, if the prediction mode of the surrounding blocks is MIP mode, the encoding device and the decoding device may determine the candidate MIP mode as mipMpmCand[sizeId][0] by referring to Table 7 below. sizeId may represent the size of the surrounding blocks, where sizeId0 may represent a 4x4 luma block, sizeId1 may represent a 4x8, 8x4, or 8x8 luma block, and sizeId2 may represent a luma block larger than 8x8.
[0337] [Table 7]
[0338] For example, the encoding and decoding devices may set the candidate MIP mode to number 17 if the size of the surrounding blocks is 4x4, set the candidate MIP mode to number 0 if the size of the surrounding blocks is 4x8, 8x4, or 8x8, and set the candidate mode to number 1 for other blocks. In this way, the encoding and decoding devices may improve the accuracy of the MPM mode by adaptively selecting a basic candidate MIP mode according to the size of the surrounding blocks. Alternatively, to reduce computational complexity, the encoding and decoding devices according to one embodiment may select a candidate MIP mode without considering the coding modes of the surrounding blocks and generate an MPM list by directly using the selected candidate MIP mode.
[0339] For example, when generating an MPM list for an MIP mode, the encoding device and the decoding device may determine the MPM list for the MIP mode (e.g., candMipModeList[]) as follows, fixedly, without considering the coding mode of the neighboring blocks. For example, when generating three MIP MPM lists, x may have a value of 0 to 2, and the corresponding candMipModeList[x] may be configured as follows with reference to Table 7. Here, sizeId indicates the size of the neighboring blocks, but the encoding device and the decoding device may also determine sizeId according to the size of the current block to omit the process of referring to information about the neighboring blocks.
[0340] candMipModeList[0]=mipMpmCand[sizeId][0]
[0341] candMipModeList[1]=mipMpmCand[sizeId][1]
[0342] candMipModeList[2]=mipMpmCand[sizeId][2]
[0343] Figure 26 shows experimental data comparing the coding rate when an image is coded by determining a fixed MPM list for an MIP mode as described above according to the mapping method described above without considering the coding modes of surrounding blocks, with the coding rate when an image is coded by generating an MPM list based on candidate MIP modes determined by the method of Figure 25. As shown in Figure 26, there is no significant difference in coding rate. In other words, by applying the above method, it is possible to minimize coding loss, reduce algorithm complexity, and reduce memory usage for the mapping table.
[0344] In another embodiment, when generating an MPM list for an MIP mode, the encoding and decoding apparatuses may determine the MPM list for the MIP mode (e.g., candMipModeList[]) based on the mode selection probability as follows, without considering the coding modes of neighboring blocks. For example, when generating three MIP MPM lists, x may have a value from 0 to 2, and candMipModeList[x] may be configured as follows with reference to Table 8. sortedmipMpmCand[sizeId][x] may store candidate MIP modes for each block size based on the MIP mode selection probability. For example, sortedmipMpmCand[sizeId][0] may store the candidate MIP mode most frequently selected for the corresponding sizeId, and sortedmipMpmCand[sizeId][1] may store the candidate MIP mode second most frequently selected for the corresponding sizeId. In this case, sizeId indicates the size of neighboring blocks, but the encoding and decoding apparatuses may determine sizeId according to the size of the current block to omit the process of referring to information about neighboring blocks.
[0345] candMipModeList[0]=sortedmipMpmCand[sizeId][0]
[0346] candMipModeList[1]=sortedmipMpmCand[sizeId][1]
[0347] candMipModeList[2]=sortedmipMpmCand[sizeId][2]
[0348] [Table 8]
[0349] Application example
[0350] Although the exemplary method of the present disclosure is expressed as a series of operations for clarity of explanation, this is not intended to limit the order in which the steps are performed, and the steps may be performed simultaneously or in a different order if necessary. To achieve the method according to the present disclosure, the steps illustrated may include other steps, or some steps may be omitted and the remaining steps may be included, or some steps may be omitted and additional other steps may be included.
[0351] In the present disclosure, an image encoding device or an image decoding device that performs a predetermined operation (step) can perform the operation (step) to check the execution conditions and circumstances of the operation (step). For example, if it is described that a predetermined operation is performed when a predetermined condition is satisfied, the image encoding device or the image decoding device can perform the predetermined operation after performing an operation to check whether the predetermined condition is satisfied.
[0352] The various embodiments of the present disclosure are not intended to enumerate all possible combinations, but are intended to describe representative aspects of the present disclosure, and the matters described in the various embodiments may be applied independently or in combination of two or more.
[0353] Additionally, various embodiments of the present disclosure may be implemented using hardware, firmware, software, or a combination thereof, etc. In the case of a hardware implementation, the implementation may be using one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general processors, controllers, microcontrollers, microprocessors, etc.
[0354] In addition, an image decoding apparatus and an image encoding apparatus to which an embodiment of the present disclosure is applied may be included in a multimedia broadcast transmitting / receiving apparatus, a mobile communication terminal, a home cinema video apparatus, a digital cinema video apparatus, a surveillance camera, a video conversation apparatus, a real-time communication apparatus such as video communication, a mobile streaming apparatus, a storage medium, a camcorder, a video on demand (VoD) service providing apparatus, an over-the-top (OTT) video apparatus, an internet streaming service providing apparatus, a three-dimensional (3D) video apparatus, an image telephone video apparatus, a medical video apparatus, etc., and may be used to process a video signal or a data signal. For example, an over-the-top (OTT) video apparatus may include a game console, a Blu-ray player, an internet-connected TV, a home theater system, a smartphone, a tablet PC, a digital video recorder (DVR), etc.
[0355] FIG. 27 is a diagram illustrating a content streaming system to which an embodiment of the present disclosure can be applied.
[0356] As shown in FIG. 27, a content streaming system to which an embodiment of the present disclosure is applied can broadly include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.
[0357] 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 can be omitted.
[0358] The bitstream can be generated by an image encoding method and / or image encoding device to which an embodiment of the present disclosure is applied, and the streaming server can temporarily store the bitstream during the process of transmitting or receiving the bitstream.
[0359] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server can act as an intermediary that informs 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. In this case, the content streaming system can include a separate control server, which can control commands and responses between devices in the content streaming system.
[0360] The streaming server may receive content from a media storage and / or an encoding server. For example, when receiving content 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.
[0361] 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, smart glass, or a head mounted display (HMD)), a digital TV, a desktop computer, and a digital signage.
[0362] Each server in the content streaming system can be operated as a distributed server, in which case data received from each server can be processed in a distributed manner.
[0363] The scope of the present disclosure includes software or machine-executable commands (e.g., operating systems, applications, firmware, programs, etc.) that cause operations according to the methods of various embodiments to be performed on a device or computer, and non-transitory computer-readable medium on which such software or commands can be stored and executed on a device or computer. [Industrial Applicability]
[0364] Embodiments according to the present disclosure can be used to encode / decode images.
Claims
1. An image decoding method performed by an image decoding device, the image decoding method comprising: identifying a prediction mode for a current block; determining whether the intra prediction mode of the current block is a matrix-based intra prediction (MIP) mode based on the prediction mode of the current block being an intra prediction mode; determining a candidate intra prediction mode for the current block based on prediction modes of neighboring blocks located around the current block when the intra prediction mode of the current block is not an MIP mode; generating a candidate intra-prediction mode list for the current block based on the candidate intra-prediction modes; determining the intra-prediction mode of the current block based on the candidate intra-prediction mode list; generating a predicted sample of the current block based on the intra prediction mode of the current block; reconstructing the current block based on the predicted samples; determining that the candidate intra prediction mode is a predetermined intra prediction mode based on the prediction mode of the neighboring block being an MIP mode; determining that the candidate intra-prediction mode list includes a predetermined candidate intra-prediction mode based on the prediction mode of the first surrounding block and the prediction mode of the second surrounding block being both MIP modes; An image decoding method, wherein, based on the intra prediction mode of the current block being an MIP mode, the intra prediction mode of the current block is determined based on information indicating an MIP intra prediction mode.
2. The image decoding method according to claim 1 , wherein the predetermined intra prediction mode is a planar mode.
3. determining whether the prediction mode of the surrounding block is a MIP mode based on a MIP mode indicator for the surrounding block; The image decoding method of claim 1 , wherein the MIP mode indicator is obtained from a bitstream.
4. 2. The image decoding method of claim 1, wherein the candidate intra-prediction mode list is determined to include the value of the first candidate intra-prediction mode based on the prediction mode of the first surrounding block and the second candidate intra-prediction mode determined based on the prediction mode of the second surrounding block being the same, and the first candidate intra-prediction mode being an intra-prediction mode having a value greater than a prediction mode value indicating a DC mode.
5. The image decoding method according to claim 1 , wherein the predetermined candidate intra-prediction modes include at least one of a DC mode or a vertical mode.
6. 2. The image decoding method of claim 1, wherein the step of determining the intra prediction mode of the current block based on the candidate intra prediction mode list is performed by determining one of the candidate intra prediction modes included in the candidate intra prediction mode list as the intra prediction mode of the current block based on an intra prediction mode indicator obtained from a bitstream.
7. determining a reference mode for determining an intra-prediction mode of a chroma block corresponding to the current block; determining the intra-prediction mode for the chroma block based on the reference mode; the current block is a luma block, The image decoding method according to claim 1 , wherein the reference mode is determined to be a planar mode based on the intra prediction mode of the current block being an MIP mode.
8. The image decoding method of claim 7 , wherein the intra prediction mode of the chroma block is determined to be the reference mode.
9. The image decoding method of claim 8 , wherein the reference mode is determined based on the intra prediction mode of the current block, based on the intra prediction mode of the current block being not an MIP mode.
10. An image coding method performed by an image coding device, the image coding method comprising: identifying a prediction mode for a current block; determining a candidate intra prediction mode based on prediction modes of neighboring blocks located around the current block, based on the prediction mode of the current block being an intra prediction mode; generating a candidate intra-prediction mode list for the current block based on the candidate intra-prediction modes; encoding an intra-prediction mode indicator indicating an intra-prediction mode of the current block based on the candidate intra-prediction mode list; generating a predicted sample of the current block based on the intra prediction mode of the current block; reconstructing the current block based on the predicted samples; determining that the candidate intra prediction mode is a predetermined intra prediction mode based on the prediction mode of the neighboring block being a matrix-based intra prediction (MIP) mode; determining that the candidate intra-prediction mode list includes a predetermined candidate intra-prediction mode based on the prediction mode of the first surrounding block and the prediction mode of the second surrounding block being both MIP modes; An image encoding method, wherein information indicating an MIP intra prediction mode of the current block is encoded based on the intra prediction mode of the current block being an MIP mode.
11. 1. A method for transmitting a bitstream generated by an image coding method, the image coding method comprising: identifying a prediction mode for a current block; determining a candidate intra prediction mode based on prediction modes of neighboring blocks located around the current block, based on the prediction mode of the current block being an intra prediction mode; generating a candidate intra-prediction mode list for the current block based on the candidate intra-prediction modes; encoding an intra-prediction mode indicator indicating an intra-prediction mode of the current block based on the candidate intra-prediction mode list; generating a predicted sample of the current block based on the intra prediction mode of the current block; reconstructing the current block based on the predicted samples; determining that the candidate intra prediction mode is a predetermined intra prediction mode based on the prediction mode of the neighboring block being a matrix-based intra prediction (MIP) mode; determining that the candidate intra-prediction mode list includes a predetermined candidate intra-prediction mode based on the prediction mode of the first surrounding block and the prediction mode of the second surrounding block being both MIP modes; A method for transmitting a bitstream, wherein information indicating an MIP intra prediction mode of the current block is encoded based on the intra prediction mode of the current block being an MIP mode.
Citation Information
Patent Citations
Image encoding / decoding method, apparatus, and method for transmitting a bitstream using a simplified MPM list generation method
JP7698120B2
Simplified signaling method for affine linear weighted intra prediction mode
WO2020205705A1
Most probable mode list construction for matrix-based intra prediction
WO2020207502A1
Affine linear weighted intra prediction in video coding
WO2020227393A1