Video encoding / decoding method and apparatus, and recording medium storing bitstreams
By introducing directional planar modes and PDPC for intra prediction, the method enhances video compression efficiency and coding performance for high-resolution images, addressing the limitations of existing techniques.
Patent Information
- Application Number
- JP2025520696
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-10-10
- Filing Date
- 2023-10-10
- Publication Date
- 2025-10-09
AI Technical Summary
Existing video compression techniques struggle to efficiently handle high-resolution and high-quality images, particularly in extending planar modes for improved intra prediction performance and coding efficiency.
The method and apparatus introduce directional planar modes for intra prediction, adaptively signaling mode information, guiding reference samples, and applying PDPC (Prediction-Driven Partitioning and Coding) to transform kernels for residual signals, enhancing transform performance and energy compaction.
This approach improves intra prediction performance and coding efficiency by extending planar modes to directional planar modes, reducing discontinuity in prediction blocks and enhancing residual signal coding efficiency.
Smart Images

Figure 2025533942000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to a video encoding / decoding method and apparatus, and a recording medium storing a bitstream. [Background technology]
[0002] 2. Description of the Related Art In recent years, the demand for high-resolution, high-quality images such as high-definition (HD) images and ultra-high-definition (UHD) images has increased in various application fields, and as a result, highly efficient image compression techniques have been discussed.
[0003] There are various video compression techniques, such as inter-prediction techniques that predict pixel values contained in a current picture from pictures before or after the current picture, intra-prediction techniques that predict pixel values contained in a current picture using pixel information within the current picture, and entropy coding techniques that assign short codes to values that occur frequently and long codes to values that occur less frequently. Using these video compression techniques, video data can be effectively compressed and transmitted or stored. Summary of the Invention [Problem to be solved by the invention]
[0004] The present disclosure seeks to provide a directional planar mode-based intra prediction method and apparatus.
[0005] The present disclosure seeks to provide a method and apparatus for signaling intra-prediction mode information for directional planar modes.
[0006] The present disclosure seeks to provide a method and apparatus for guiding a reference sample for directional planar modes.
[0007] The present disclosure seeks to provide a method and apparatus for applying PDPC to prediction blocks in directional planar mode.
[0008] The present disclosure seeks to provide a method and apparatus for determining a transformation kernel for a residual signal in a directional planar mode. [Means for solving the problem]
[0009] The video decoding method and apparatus according to the present disclosure may derive an intra prediction mode of a current block from among predefined intra prediction modes, generate a prediction block of the current block based on the intra prediction mode, perform at least one of inverse quantization and inverse transform on transform coefficients of the current block to obtain a residual block of the current block, and reconstruct the current block based on the prediction block and residual block of the current block.
[0010] In the video decoding method and apparatus according to the present disclosure, the predefined intra prediction modes include a non-directional planar mode, a directional planar mode, a horizontal mode, and a vertical mode, and the directional planar mode may include at least one of a horizontal planar mode or a vertical planar mode.
[0011] In the video decoding method and apparatus according to the present disclosure, when the intra prediction mode of the current block belongs to the directional planar mode, the transform kernel for the inverse transform may be determined based on the transform kernel for a predefined mode.
[0012] In the video decoding method and apparatus according to the present disclosure, when the intra prediction mode of the current block is the horizontal planar mode, the transform kernel for the inverse transform may be determined based on the transform kernel for the vertical mode, and when the intra prediction mode of the current block is the vertical planar mode, the transform kernel for the inverse transform may be determined based on the transform kernel for the horizontal mode.
[0013] In the video decoding method and apparatus according to the present disclosure, when the intra prediction mode of the current block is the horizontal planar mode, a transform kernel for the inverse transform may be determined based on a transform kernel for the horizontal mode, and when the intra prediction mode of the current block is the vertical planar mode, a transform kernel for the inverse transform may be determined based on a transform kernel for the vertical mode.
[0014] In the video decoding method and apparatus according to the present disclosure, when the intra prediction mode of the current block belongs to the directional planar mode, the transform kernel for the inverse transform may be determined based on the transform kernel for the non-directional planar mode.
[0015] In the video decoding method and apparatus according to the present disclosure, the intra prediction mode of the current block may be derived based on intra prediction mode information, and the intra prediction mode information may include at least one of a planar flag indicating whether the intra prediction mode of the current block is the non-directional planar mode or belongs to the directional planar mode, or a planar direction flag indicating whether the intra prediction mode of the current block is the horizontal planar mode.
[0016] In the video decoding method and apparatus according to the present disclosure, an MPM flag indicating whether the intra prediction mode of the current block is derived from an MPM list may be signaled based on the planar flag indicating that the intra prediction mode of the current block does not belong to the directional planar mode.
[0017] In the video decoding method and apparatus according to the present disclosure, at least one of the planar flag or the planar direction flag may be adaptively signaled based on an availability flag indicating whether decoder-side intra mode derivation (DIMD) is available.
[0018] In the video decoding method and apparatus according to the present disclosure, at least one of the planar flag or the planar direction flag may be adaptively signaled based on an availability flag indicating whether template based intra mode derivation (TIMD) is available.
[0019] In the video decoding method and apparatus according to the present disclosure, when the intra prediction mode of the current block belongs to the directional planar mode, the reference sample for the current block may be derived based on the reference sample for the horizontal mode or the vertical mode.
[0020] In the image decoding method and apparatus according to the present disclosure, when the intra prediction mode of the current block belongs to the directional planar mode, the reference sample for the current block may be derived based on the reference sample for the non-directional planar mode.
[0021] The video encoding method and apparatus according to the present disclosure may generate a prediction block of a current block based on one of predefined intra prediction modes, derive a residual block of the current block based on the prediction block of the current block, perform at least one of transforming and quantizing the residual block to derive transform coefficients of the current block, and encode the transform coefficients of the current block. Here, the predefined intra prediction modes may include a non-directional planar mode, a directional planar mode, a horizontal mode, and a vertical mode, and the directional planar mode may include at least one of a horizontal planar mode or a vertical planar mode.
[0022] A computer-readable digital storage medium is provided having encoded video / image information stored thereon that enables a video decoding method to be performed by a decoding device according to the present disclosure.
[0023] A computer-readable digital storage medium is provided having stored thereon video / image information generated by the video encoding method according to the present disclosure.
[0024] A method and apparatus for transmitting video / image information generated by a video encoding method according to the present disclosure is provided. [Effects of the Invention]
[0025] According to the present disclosure, by extending the existing planar mode to a directional planar mode, it is possible to improve the planar-based intra prediction performance with a high selection probability.
[0026] According to the present disclosure, it is possible to improve the coding efficiency of intra prediction mode information for indicating non-directional / directional planar modes.
[0027] According to the present disclosure, the performance of intra prediction can be improved by deriving reference samples taking into account the prediction characteristics of directional planar modes.
[0028] According to the present disclosure, by applying PDPC, discontinuity between a prediction block in directional planar mode and a surrounding area is removed, thereby improving the coding efficiency of a residual signal.
[0029] According to the present disclosure, by determining the number or kernel based on the correlation of residuals between intra prediction modes, the performance of the transform can be improved and better energy compaction can be expected. [Brief explanation of the drawings]
[0030] [Figure 1] 1 illustrates a video / image coding system according to the present disclosure. [Figure 2] 1 is a schematic block diagram of an encoding device to which an embodiment of the present disclosure can be applied, in which video / image signals are encoded. [Figure 3] 1 is a schematic block diagram of a decoding device to which an embodiment of the present disclosure can be applied, in which video / image signals are decoded. [Figure 4] 3 is a diagram illustrating a video decoding method performed by a decoding device 300 according to an embodiment of the present disclosure. [Figure 5] 1 is a diagram showing a schematic configuration of a decoding device 300 that performs a video decoding method according to the present disclosure. [Figure 6] 2 is a diagram illustrating a video encoding method performed by an encoding device 200 according to an embodiment of the present disclosure. [Figure 7] 1 is a diagram showing a schematic configuration of an encoding device 200 that performs a video encoding method according to the present disclosure. [Figure 8] FIG. 1 illustrates an example of a content streaming system to which embodiments of the present disclosure can be applied. DETAILED DESCRIPTION OF THE INVENTION
[0031] While the present disclosure may be modified in various ways and may have various embodiments, specific embodiments are illustrated in the drawings and described in detail. However, this is not intended to limit the present disclosure to the specific embodiments, and it should be understood that the present disclosure includes all modifications, equivalents, and alternatives within the spirit and technical scope of the present disclosure. In the description of each figure, similar reference numerals are used to refer to similar components.
[0032] Terms such as "first," "second," etc. may be used to describe various components, but these components should not be limited by such terms. These terms are used merely to distinguish one component from another. For example, a first component could be termed a second component, and similarly, a second component could be termed a first component, without departing from the scope of this disclosure. The term "and / or" includes a combination of multiple associated listed items or any item of multiple associated listed items.
[0033] When a component is referred to as being "coupled" or "connected" to another component, it should be understood that the component may be directly coupled or connected to the other component, and that there may be additional components in between. On the other hand, when a component is referred to as being "directly coupled" or "directly connected" to another component, it should be understood that there are no additional components in between.
[0034] The terms used in this application are merely for the purpose of describing particular embodiments and are not intended to limit the present disclosure. The singular terms also include the plural terms unless the context clearly dictates otherwise. In this application, terms such as "comprise" or "have" are intended to specify the presence of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification, and should be understood as not precluding the possibility of the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.
[0035] The present disclosure relates to video / image coding. For example, the methods / embodiments disclosed herein may be applied to methods disclosed in the versatile video coding (VVC) standard. The methods / embodiments disclosed herein may also be applied to methods disclosed in the essential video coding (EVC) standard, the AOMedia Video 1 (AV1) standard, the second generation audio video coding standard (AVS2), or next-generation video / image coding standards (e.g., H.267 or H.268).
[0036] This specification presents various embodiments relating to video / image coding, and unless otherwise stated, the above embodiments may be performed in combination with each other.
[0037] In this specification, video may refer to a collection of a series of images over time. A picture generally refers to a unit representing an image at a specific time period, and a slice / tile is a unit constituting part of a picture in coding. A slice / tile may include one or more coding tree units (CTUs). One picture may be composed of one or more slices / tiles. A tile is a rectangular area composed of multiple CTUs in a specific tile column and a specific tile row of a picture. A tile column is a rectangular area of CTUs having the same height as the picture and a width specified by the syntax requirements of the picture parameter set. A tile row is a rectangular area of CTUs having the same height as the picture and a width specified by the picture parameter set. CTUs within a tile may be arranged consecutively by CTU raster scanning, while tiles within a picture may be arranged consecutively by tile raster scanning. A slice may contain an integer number of complete tiles or an integer number of consecutive complete CTU rows within the tiles of a picture that may be contained exclusively in a single NAL unit, while a picture may be partitioned into two or more sub-pictures, which may be rectangular regions of one or more slices in a picture.
[0038] A picture element, pixel, or pel can refer to the smallest unit that makes up a picture (or an image). A "sample" can also be used as a term corresponding to a pixel. A sample can generally indicate a pixel or a pixel value, and may indicate only a pixel / pixel value of a luminance (luma) component, or may indicate only a pixel / pixel value of a chrominance (chroma) component.
[0039] A unit may refer to a basic unit of image processing. A unit may include at least one of a specific region of a picture and information related to that region. One unit may include one luma block and two chroma (e.g., cb, cr) blocks. The term unit may sometimes be used interchangeably with terms such as block or area. In general, an MxN block may include a set (or array) of samples or transform coefficients consisting of M columns and N rows.
[0040] As used herein, "A or B" can mean "A only," "B only," or "both A and B." In other words, as used herein, "A or B" can be interpreted as "A and / or B." For example, as used herein, "A, B, or C" can mean "A only," "B only," "C only," or "any combination of A, B, and C."
[0041] As used herein, a slash ( / ) or a comma can mean "and / or." For example, "A / B" can mean "A and / or B." Thus, "A / B" can mean "A only," "B only," or "both A and B." For example, "A, B, C" can mean "A, B, or C."
[0042] As used herein, "at least one of A and B" can mean "A only," "B only," or "both A and B." Furthermore, as used herein, the expressions "at least one of A or B" or "at least one of A and / or B" may be interpreted as being the same as "at least one of A and B."
[0043] Furthermore, in this specification, "at least one of A, B, and C" can mean "A only," "B only," "C only," or "any combination of A, B, and C." Furthermore, "at least one of A, B, or C" or "at least one of A, B, and / or C" can mean "at least one of A, B, and C."
[0044] Furthermore, parentheses used in this specification may mean "for example." Specifically, when "prediction (intra prediction)" is displayed, "intra prediction" may be suggested as an example of "prediction." In other words, "prediction" in this specification is not limited to "intra prediction," and "intra prediction" may be suggested as an example of "prediction." Furthermore, when "prediction (i.e., intra prediction)" is displayed, "intra prediction" may be suggested as an example of "prediction."
[0045] In this specification, technical features individually described in the same drawing may be embodied individually or simultaneously.
[0046] FIG. 1 is a diagram illustrating a video / image coding system according to this disclosure.
[0047] Referring to FIG. 1, a video / image coding system may include a first device (a source device) and a second device (a receiving device).
[0048] A source device can transmit encoded video / image information or data to a receiving device via a digital storage medium or a network in the form of a file or streaming. The source device may include a video source, an encoding device, and a transmitting unit. The receiving device may include a receiving unit, a decoding device, and a renderer. The encoding device may be called a video / image encoding device, and the decoding device may be called a video / image decoding device. The transmitter may be included in the encoding device. The receiver may be included in the decoding device. The renderer may include a display unit, which may be a separate device or an external component.
[0049] A video source can acquire video / images through a video / image capture, synthesis, or generation process. A video source can include a video / image capture device and / or a video / image generation device. A video / image capture device can include one or more cameras, a video / image archive containing previously captured video / images, etc. A video / image generation device can include a computer, tablet, smartphone, etc., and can (electronically) generate video / images. For example, a virtual video / image can be generated through a computer, etc., in which case the video / image capture process can be replaced by a process in which the associated data is generated.
[0050] An encoding device may encode input video / images. The encoding device may perform a series of steps such as prediction, transformation, and quantization for compression and coding efficiency. The encoded data (encoded video / image information) may be output in the form of a bitstream.
[0051] The transmitting unit can transmit the encoded video / image information or data output in the form of a bitstream to a receiving unit of a receiving device via a digital storage medium or a network in the form of a file or streaming. The digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitting unit can include elements for generating a media file according to a predetermined file format and elements for transmission via a broadcasting / communication network. The receiving unit can receive / extract the bitstream and transmit it to a decoding device.
[0052] The decoding device can decode the video / image by performing a series of steps such as inverse quantization, inverse transform, and prediction, which correspond to the operations of the encoding device.
[0053] The renderer can render the decoded video / image, and the rendered video / image can be displayed on a display unit.
[0054] FIG. 2 is a schematic block diagram of an encoding device to which the embodiments of the present disclosure can be applied, in which video / image signals are encoded.
[0055] Referring to FIG. 2, the encoding apparatus 200 may include an image partitioner 210, a predictor 220, a residual processor 230, an entropy encoder 240, an adder 250, a filter 260, and a memory 270. The predictor 220 may include an inter-prediction unit 221 and an intra-prediction unit 222. The residual processor 230 may include a transformer 232, a quantizer 233, a dequantizer 234, and an inverse transformer 235. The residual processor 230 may further include a subtractor 231. The adder 250 may be referred to as a reconstructor or a reconstructed block generator. The above-described image divider 210, predictor 220, residual processor 230, entropy encoder 240, adder 250, and filterer 260 may be configured by one or more hardware components (e.g., an encoding device chipset or processor) depending on the embodiment. In addition, the memory 270 may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware components may further include the memory 270 as an internal / external component.
[0056] The image division unit 210 may divide an input image (or picture, frame) input to the encoding device 200 into one or more processing units. For example, the processing units may be called coding units (CUs). In this case, the coding units may be recursively divided into coding tree units (CTUs) or largest coding units (LCUs) according to a QTBTTT (Quad-tree, Binary-tree, Ternary-tree) structure.
[0057] For example, one coding unit may be divided into multiple coding units having deeper depths based on a quadtree structure, a binary tree structure, and / or a tertiary structure. In this case, for example, the quadtree structure may be applied first, and then the binary tree structure and / or the tertiary structure may be applied later. Alternatively, the binary tree structure may be applied before the quadtree structure. The coding procedure according to the present specification may be performed based on a final coding unit that is not further divided. In this case, based on coding efficiency according to video characteristics, the largest coding unit may be immediately used as the final coding unit, or, if necessary, the coding unit may be recursively divided into coding units of lower depths, and the coding unit with the optimal size may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and restoration, which will be described later.
[0058] As another example, the processing unit may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may be divided or partitioned from the final coding unit. The prediction unit may be a unit of sample prediction, and the transform unit may be a unit for deriving transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.
[0059] The term "unit" may be used interchangeably with terms such as "block" or "area." In general, an MxN block may represent a set of samples or transform coefficients consisting of M columns and N rows. A sample may generally represent a pixel or a pixel value, and may represent only a pixel / pixel value of a luma component or only a pixel / pixel value of a chroma component. A sample may be used in terms corresponding to one picture (or image), pixel, or pel.
[0060] The encoding apparatus 200 may subtract a prediction signal (prediction block, prediction sample array) output from the inter prediction unit 221 or the intra prediction unit 222 from an input video signal (original block, original sample array) to generate a residual signal (residual block, residual sample array), and the generated residual signal is transmitted to the conversion unit 232. In this case, a unit in the encoding apparatus 200 that subtracts the prediction signal (prediction block, prediction sample array) from the input video signal (original block, original sample array) may be referred to as a subtraction unit 231.
[0061] The prediction unit 220 may perform prediction on a current block (hereinafter referred to as a current block) and generate a predicted block including prediction samples for the current block. The prediction unit 220 may determine whether intra prediction or inter prediction is applied to the current block or CU. The prediction unit 220 may generate various information related to prediction, such as prediction mode information, as will be described later in the description of each prediction mode, and transmit the information related to prediction to the entropy encoding unit 240. The entropy encoding unit 240 may encode the information related to prediction and output it in the form of a bitstream.
[0062] The intra prediction unit 222 may predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or at a certain distance from the current block depending on the prediction mode. In intra prediction, prediction modes may include one or more non-directional modes and multiple directional modes. The non-directional modes may include at least one of DC mode and planar mode. The directional modes may include 33 directional modes or 65 directional modes depending on the granularity of the prediction direction. However, this is merely an example, and more or less directional modes may be used depending on the settings. The intra prediction unit 222 may also determine the prediction mode to be applied to the current block using the prediction modes applied to neighboring blocks.
[0063] The inter prediction unit 221 may derive a prediction block for a current block based on a reference block (reference sample array) identified by a motion vector in a reference picture. To reduce the amount of motion information transmitted in inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction information (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 blocks may be the same or different. The temporal neighboring blocks may be called collocated reference blocks, collocated control units (colCUs), etc., and the reference picture including the temporal neighboring blocks may be called collocated pictures (colPic). For example, the inter prediction unit 221 may configure a motion information candidate list based on neighboring blocks and generate information indicating which candidates are 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 a skip mode or a merge mode, the inter prediction unit 221 may use motion information of neighboring blocks as motion information for the current block. In the case of the skip mode, unlike in the merge mode, a residual signal may not be transmitted.In the case of motion vector prediction (MVP) mode, the motion vector of the current block can be indicated by using the motion vector of a neighboring block as a motion vector predictor and signaling the motion vector difference.
[0064] The prediction unit 220 may generate a prediction signal based on various prediction methods, which will be described later. For example, the prediction unit may apply intra prediction or inter prediction for predicting a block, or may simultaneously apply intra prediction and inter prediction. This may be referred to as a combined inter and intra prediction (CIIP) mode. The prediction unit may also use an intra block copy (IBC) prediction mode or a palette mode for predicting a block. The IBC prediction mode or palette mode may be used for coding content images / videos, such as games, such as screen content coding (SCC). IBC basically performs prediction within a current picture, but may be similar to inter prediction in that it derives a reference block within the current picture. That is, IBC may use at least one of the inter prediction techniques described herein. The palette mode may be considered an example of intra coding or intra prediction. When the palette mode is applied, a sample value within the picture may be signaled based on information about a palette table and a palette index. The predicted signal generated by the prediction unit 220 may be used to generate a reconstructed signal or a residual signal.
[0065] The transform unit 232 may generate transform coefficients by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a Discrete Cosine Transform (DCT), a Discrete Sine Transform (DST), a Karhunen-Loeve Transform (KLT), a Graph-Based Transform (GBT), and a Conditionally Non-Linear Transform (CNT). Here, GBT refers to a transform obtained from a graph representing inter-pixel relationship information. CNT refers to a transform obtained based on a predicted signal generated using all previously reconstructed pixels. The transform process may be applied to square pixel blocks of the same size, or to non-square blocks of variable sizes.
[0066] The quantization unit 233 quantizes the transform coefficients and transmits the quantized signal to the entropy encoding unit 240. The entropy encoding unit 240 encodes the quantized signal (information about the quantized transform coefficients) and outputs it as a bitstream. The information about the quantized transform coefficients may be referred to as residual information. The quantization unit 233 rearranges the quantized transform coefficients in a block form into a one-dimensional vector form based on a coefficient scan order, and generates information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form.
[0067] The entropy encoding unit 240 can perform various encoding methods such as exponential Golomb, context-adaptive variable length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), etc. The entropy encoding unit 240 can encode information necessary for video / image reconstruction (e.g., values of syntax elements) together with or separately from the quantized transform coefficients.
[0068] Encoded information (e.g., encoded video / video information) may be transmitted or stored in the form of a bitstream in network abstraction layer (NAL) units. The video / video information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). The video / video information may also include general constraint information. In this specification, information and / or syntax elements transmitted / signaled from an encoding device to a decoding device may be included in the video / video information. The video / video information may be encoded using the encoding procedure described above and included in the bitstream. The bitstream may be transmitted over a network or stored in a digital storage medium. Here, the network may include a broadcast 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. The signal output from the entropy encoding unit 240 may be transmitted to a transmitting unit (not shown) and / or stored to a storing unit (not shown) configured as an internal / external element of the encoding device 200, or the transmitting unit may be included in the entropy encoding unit 240.
[0069] The quantized transform coefficients output from the quantization unit 233 may be used to generate a prediction signal. For example, the inverse quantization unit 234 and the inverse transform unit 235 may apply inverse quantization and inverse transform to the quantized transform coefficients to reconstruct a residual signal (residual block or residual sample). The adder 250 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed residual signal to a prediction signal output from the inter prediction unit 221 or the intra prediction unit 222. When there is no residual for the current block, such as when a skip mode is applied, the predicted block may be used as the reconstructed block. The adder 250 may be referred to as a reconstruction unit or a reconstructed block generator. The generated reconstructed signal may be used for intra prediction of the next block to be processed in the current picture, or may be used for inter prediction of the next picture after filtering, as described below. Meanwhile, luma mapping with chroma scaling (LMCS) may be applied during picture encoding and / or reconstruction.
[0070] The filtering unit 260 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 260 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture and store the modified reconstructed picture in the memory 270, specifically, in the DPB of the memory 270. The various filtering methods may include deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc. The filtering unit 260 may generate various information related to filtering and transmit it to the entropy encoding unit 240. The information related to filtering may be encoded by the entropy encoding unit 240 and output in the form of a bitstream.
[0071] The modified reconstructed picture transmitted to the memory 270 may be used as a reference picture in the inter prediction unit 221. This allows the encoding apparatus to avoid prediction mismatch between the encoding apparatus 200 and the decoding apparatus when inter prediction is applied, and also improves coding efficiency.
[0072] The DPB of the memory 270 may store the modified reconstructed picture to be used as a reference picture in the inter predictor 221. The memory 270 may store motion information of a block from which motion information in the current picture is derived (or encoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter predictor 221 to be used as motion information of a spatially neighboring block or a temporally neighboring block. The memory 270 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra predictor 222.
[0073] FIG. 3 is a schematic block diagram of a decoding device to which the embodiments of the present disclosure can be applied, in which video / image signals are decoded.
[0074] 3, the decoding device 300 may include an entropy decoding unit (entropy decoder 310), a residual processor (residual processor 320), a predictor (predictor 330), an adder (adder 340), a filter (filter 350), and a memory (memory 360). The predictor 330 may include an inter predictor 331 and an intra predictor 332. The residual processor 320 may include a dequantizer (dequantizer 321) and an inverse transformer (inverse transformer 322).
[0075] The entropy decoding unit 310, residual processing unit 320, prediction unit 330, addition unit 340, and filtering unit 350 may be configured as a single hardware component (e.g., a decoding device chipset or processor) depending on the embodiment. Also, the memory 360 may include a decoded picture buffer (DPB) and may be configured as a digital storage medium. The hardware component may further include the memory 360 as an internal / external component.
[0076] When a bitstream including video / image information is input, the decoding apparatus 300 can reconstruct an image corresponding to the process by which the video / image information was processed by the encoding apparatus of FIG. 2. For example, the decoding apparatus 300 can derive units / blocks based on block division-related information obtained from the bitstream. The decoding apparatus 300 can perform decoding using a processing unit applied by the encoding apparatus. Accordingly, the processing unit for decoding may be a coding unit, which may be divided from a coding tree unit or a maximum coding unit according to a quad tree structure, a binary tree structure, and / or a tertiary tree structure. One or more transform units may be derived from the coding unit. The reconstructed image signal decoded and output by the decoding apparatus 300 may be played back by a playback device.
[0077] The decoding apparatus 300 may receive a signal output from the encoding apparatus of FIG. 2 in the form of a bitstream, and the received signal may be decoded by the entropy decoding unit 310. For example, the entropy decoding unit 310 may parse the bitstream and derive information (e.g., video / video information) necessary for video restoration (or picture restoration). The video / video information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). The video / video information may also include general constraint information. The decoding apparatus may decode pictures further based on the information on the parameter sets and / or the general constraint information. Signal / received information and / or syntax elements described later in this specification may be decoded by the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit 310 may decode information in a bitstream based on a coding method such as Exponential-Golomb coding, CAVLC, or CABAC, and output values of syntax elements required for image restoration and quantized values of transform coefficients related to residuals. More specifically, the CABAC entropy decoding method receives bins corresponding to each syntax element in the bitstream, determines a context model using information on the syntax element to be decoded, decoding information on neighboring and current blocks, or information on symbols / bins decoded in previous steps, predicts the occurrence probability of the bins based on the determined context model, and generates symbols corresponding to the values of each syntax element by performing arithmetic decoding of the bins. In this case, after determining the context model, the CABAC entropy decoding method may update the context model using information on the decoded symbols / bins for the context model of the next symbol / bin.Information related to prediction among the information decoded by the entropy decoding unit 310 may be provided to a prediction unit (inter prediction unit 332 and intra prediction unit 331), and residual values entropy decoded by the entropy decoding unit 310, i.e., quantized transform coefficients and related parameter information, may be input to a residual processing unit 320. The residual processing unit 320 may derive a residual signal (residual block, residual sample, residual sample array). In addition, information related to filtering among the information decoded by the entropy decoding unit 310 may be provided to a filtering unit 350. Meanwhile, a receiving unit (not shown) that receives a signal output from the encoding apparatus may be further configured as an internal / external element of the decoding apparatus 300, or the receiving unit may be a component of the entropy decoding unit 310.
[0078] Meanwhile, the decoding apparatus according to the present specification may be referred to as a video / image / picture decoding apparatus, and the decoding apparatus may be divided into an information decoding apparatus (video / image / picture information decoding apparatus) and a sample decoding apparatus (video / image / picture sample decoding apparatus). The information decoding apparatus may include the entropy decoding unit 310, and the sample decoding apparatus may include at least one of the inverse quantization unit 321, the inverse transform unit 322, the addition unit 340, the filtering unit 350, the memory 360, the inter prediction unit 332, and the intra prediction unit 331.
[0079] The inverse quantization unit 321 may inverse quantize the quantized transform coefficients and output the transform coefficients. The inverse quantization unit 321 may rearrange the quantized transform coefficients in a two-dimensional block format. In this case, the rearrangement may be performed based on the coefficient scanning order performed in the encoding apparatus. The inverse quantization unit 321 may inverse quantize the quantized transform coefficients using a quantization parameter (e.g., quantization step size information) to obtain transform coefficients.
[0080] The inverse transform unit 322 performs inverse transform on the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0081] The prediction unit 320 may perform prediction on a current block and generate a predicted block including prediction samples for the current block. The prediction unit 320 may determine whether intra prediction or inter prediction is applied to the current block based on the prediction information output from the entropy decoding unit 310, and may determine a specific intra / inter prediction mode.
[0082] The prediction unit 320 may generate a prediction signal based on various prediction methods, which will be described later. For example, the prediction unit 320 may apply intra prediction or inter prediction for predicting a block, or may simultaneously apply intra prediction and inter prediction. This may be referred to as a combined inter and intra prediction (CIIP) mode. The prediction unit may also use an intra block copy (IBC) prediction mode or a palette mode for predicting a block. The IBC prediction mode or palette mode may be used for content video / movie coding, such as games, such as screen content coding (SCC). IBC basically performs prediction within a current picture, but may be similar to inter prediction in that it derives a reference block within the current picture. That is, IBC may use at least one of the inter prediction techniques described herein. The palette mode may be considered an example of intra coding or intra prediction. When the palette mode is applied, information about a palette table and a palette index may be included in the video / picture information and signaled.
[0083] The intra prediction unit 331 may predict a current block by referring to samples in a current picture. The referenced samples may be located in the neighborhood of the current block or at a certain distance from the current block depending on the prediction mode. In intra prediction, prediction modes may include one or more non-directional modes and multiple directional modes. The intra prediction unit 331 may determine a prediction mode to be applied to the current block using prediction modes applied to neighboring blocks.
[0084] The inter prediction unit 332 may derive a prediction block for a current block based on a reference block (reference sample array) identified by a motion vector in a reference picture. To reduce the amount of motion information transmitted in inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction information (e.g., L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring blocks may include spatial neighboring blocks in the current picture and temporal neighboring blocks in the reference picture. For example, the inter prediction unit 332 may construct a motion information candidate list based on the neighboring blocks and derive a motion vector and / or a reference picture index for the current block based on received candidate selection information. Inter prediction may be performed based on various prediction modes, and the prediction information may include information indicating the inter prediction mode for the current block.
[0085] The adder 340 can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the acquired residual signal to a prediction signal (prediction block, prediction sample array) output from a prediction unit (including the inter prediction unit 332 and / or the intra prediction unit 331). When there is no residual for the current block, such as when the skip mode is applied, the prediction block may be used as the reconstructed block.
[0086] The adder 340 may be referred to as a reconstruction unit or a reconstruction block generator. The generated reconstruction signal may be used for intra prediction of a next block to be processed in a current picture, may be output after filtering as described below, or may be used for inter prediction of a next picture. Meanwhile, luma mapping with chroma scaling (LMCS) may be applied during picture decoding.
[0087] The filtering unit 350 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 350 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may transmit the modified reconstructed picture to the memory 360, specifically, to the DPB of the memory 360. The various filtering methods may include deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc.
[0088] The (modified) reconstructed picture stored in the DPB of the memory 360 may be used as a reference picture in the inter predictor 332. The memory 360 may 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 may be transmitted to the inter predictor 260 to be used as motion information of a spatially neighboring block or a temporally neighboring block. The memory 360 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra predictor 331.
[0089] In this specification, the embodiments described for the filtering unit 260, inter prediction unit 221, and intra prediction unit 222 of the encoding device 200 may also be applied identically or correspondingly to the filtering unit 350, inter prediction unit 332, and intra prediction unit 331 of the decoding device 300, respectively.
[0090] FIG. 4 is a diagram illustrating a video decoding method performed by a decoding device 300 according to an embodiment of the present disclosure.
[0091] Referring to FIG. 4, the intra prediction mode of the current block can be derived (S400).
[0092] The intra prediction mode of the current block may be induced as one of predefined intra prediction modes. The predefined intra prediction modes may include at least one of a non-directional mode or a directional mode. The non-directional mode may include at least one of a planar mode or a DC mode. The planar mode according to the present disclosure includes a non-directional planar mode and a directional planar mode, and the directional planar mode may include at least one of a horizontal planar mode or a vertical planar mode. Alternatively, the directional planar mode may be defined as a mode independent of the non-directional planar mode. In this case, the planar mode according to the present disclosure may refer to the non-directional planar mode. The directional mode may refer to a mode having a predetermined angle, such as a horizontal mode, a vertical mode, or a diagonal mode.
[0093] The intra prediction mode of the current block may be determined based on information for identifying the intra prediction mode (hereinafter referred to as intra prediction mode information). The intra prediction mode information according to the present disclosure may include at least one of an MPM flag, a planar flag, a planar direction flag, an MPM index, or residual mode information.
[0094] The intra prediction mode information may be defined differently depending on whether the planar mode is defined as a mode independent of the candidate modes in the MPM list. For example, if the planar mode is not defined as a mode independent of the candidate modes in the MPM list (i.e., if the planar mode is available as a candidate mode in the MPM list), the intra prediction mode information may include at least one of an MPM flag, an MPM index, or residual mode information. On the other hand, if the planar mode is defined as a mode independent of the candidate modes in the MPM list, the intra prediction mode may include at least one of an MPM flag, a planar flag, a planar direction flag, an MPM index, or residual mode information.
[0095] The MPM flag may indicate whether the intra prediction mode of the current block is derived from an MPM list including multiple candidate modes (Most Probable Modes (MPM)). The planar flag may include at least one of a first planar flag indicating whether the intra prediction mode of the current block belongs to a planar mode or a second planar flag indicating whether the intra prediction mode of the current block is a non-directional planar mode. The second planar flag may be defined as a flag indicating whether the intra prediction mode of the current block belongs to a directional planar mode. The planar direction flag may indicate whether the intra prediction mode of the current block is a horizontal planar mode. The MPM index may identify one of multiple candidate modes included in the MPM list. The residual mode information may identify one of predefined intra prediction modes excluding the planar mode and the candidate modes included in the MPM list.
[0096] Hereinafter, a method for signaling intra prediction mode information of the current block when the planar mode is a mode independent of the candidate modes in the MPM list will be described.
[0097] The horizontal / vertical planar modes may be signaled as one of the planar modes as shown in Table 1 below.
[0098] [Table 1]
[0099] Referring to Table 1, an MPM flag (intra_luma_mpm_flag) may be obtained from the bitstream. Based on the MPM flag indicating that the intra prediction mode of the current block is derived from the MPM list, a first planar flag (intra_luma_not_planar_flag) may be obtained from the bitstream. Based on the first planar flag indicating that the intra prediction mode of the current block does not belong to the planar modes, an MPM index may be obtained from the bitstream. The intra prediction mode of the current block may be derived as a candidate mode identified by the MPM index.
[0100] A second planar flag (planar_flag) may be obtained from the bitstream based on a first planar flag indicating that the intra prediction mode of the current block belongs to the planar mode. Based on the second planar flag indicating that the intra prediction mode of the current block is the non-directional planar mode, the intra prediction mode of the current block may be induced as the non-directional planar mode. Based on the second planar flag indicating that the intra prediction mode of the current block is not the non-directional planar mode, a planar direction flag (planar_dir_flag) may be obtained from the bitstream. Based on the planar direction flag indicating that the intra prediction mode of the current block is the horizontal planar mode, the intra prediction mode of the current block may be induced as the horizontal planar mode. On the other hand, based on the planar direction flag indicating that the intra prediction mode of the current block is the vertical planar mode, the intra prediction mode of the current block may be induced as the vertical planar mode. The second planar flag according to the present disclosure may be signaled when an intra subpartition mode (ISP mode) is not applied to the current block. The ISP mode may refer to a mode in which the current block is divided into a plurality of sub-partitions and intra prediction is performed on a sub-partition basis.
[0101] Based on the MPM flag indicating that the intra prediction mode of the current block is not derived from the MPM list, residual mode information (intra_luma_mpm_remainder) may be obtained from the bitstream. The intra prediction mode of the current block may be derived as the mode specified by the residual mode information.
[0102] The second planar flag and the planar direction flag may be entropy decoded based on the CABAC method. Alternatively, the planar direction flag may be bypass coded with a probability of 0.5 so that the context is not updated because there is no regularity in selecting the prediction direction. A flag indicating whether horizontal / vertical planar mode is available may be signaled at a higher level, such as a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), a picture header (PH), or a slice header (SH).
[0103] Alternatively, the horizontal / vertical planar modes may be signaled as modes independent of the non-directional planar modes as shown in Table 2 below.
[0104] [Table 2]
[0105] Referring to Table 2, a second planar flag (planar_horver_flag) may be obtained from the bitstream. Here, the second planar flag may indicate whether the intra prediction mode of the current block belongs to the directional planar mode. For example, if the value of the second planar flag is 1, this may indicate that the intra prediction mode of the current block is the horizontal planar mode or the vertical planar mode. If the value of the second planar flag is 0, this may indicate that the intra prediction mode of the current block is neither the horizontal planar mode nor the vertical planar mode.
[0106] A planar direction flag may be obtained from the bitstream based on a second planar flag indicating that the intra prediction mode of the current block belongs to a directional planar mode. Based on the planar direction flag indicating that the intra prediction mode of the current block is a horizontal planar mode, the intra prediction mode of the current block may be induced as a horizontal planar mode. On the other hand, based on the planar direction flag indicating that the intra prediction mode of the current block is a vertical planar mode, the intra prediction mode of the current block may be induced as a vertical planar mode. The second planar flag according to the present disclosure may be signaled when an intra subpartition mode (ISP mode) is not applied to the current block.
[0107] Based on the second planar flag indicating that the intra prediction mode of the current block does not belong to the directional planar mode, at least one of the MPM flag, the first planar flag, the MPM index, or the residual mode information may be obtained from the bitstream, and the intra prediction mode of the current block may be derived based on the obtained information. This is as described with reference to Table 1, and therefore, a redundant description will be omitted here.
[0108] The second planar flag and the planar direction flag may be entropy decoded based on the CABAC method. Alternatively, the planar direction flag may be bypass coded with a probability of 0.5 so that the context is not updated because there is no regularity in selecting the prediction direction. A flag indicating whether horizontal / vertical planar mode is available may be signaled at a higher level, such as a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), a picture header (PH), or a slice header (SH).
[0109] As described above, based on at least one of the second planar flag or the planar direction flag, the intra prediction mode of the current block may be guided as one of a non-directional planar mode, a horizontal planar mode, or a vertical planar mode.
[0110] The second planar flag and the planar direction flag according to the present disclosure may be signaled in the bitstream as described in Tables 1 and 2.
[0111] Alternatively, in Tables 1 and 2, a signaling condition for the second planar flag may further include a availability flag indicating whether decoder-side intra mode derivation (DIMD) is available. In this case, either horizontal or vertical planar mode may be induced based on the intra prediction mode induced by DIMD (hereinafter referred to as DIMD mode) without explicit signaling of the planar direction flag. In other words, based on the second planar flag indicating that the intra prediction mode of the current block is the non-directional planar mode, the intra prediction mode of the current block may be induced as the non-directional planar mode. On the other hand, based on the second planar flag indicating that the intra prediction mode of the current block is not the non-directional planar mode, the intra prediction mode of the current block may be induced as the horizontal or vertical planar mode based on the DIMD mode.
[0112] Specifically, the second planar flag may be adaptively signaled based on an availability flag indicating whether an ISP mode is applied to the current block and whether DIMD is available. For example, the second planar flag may be signaled if the ISP mode is not applied to the current block and the availability flag indicates that DIMD is available, and may not be signaled otherwise. Alternatively, the second planar flag may be signaled if the availability flag indicates that DIMD is available, regardless of whether the ISP mode is applied to the current block, and may not be signaled otherwise. The availability flag may be signaled in at least one of the VPS, PPS, PH, or SH.
[0113] Hereinafter, a method for deriving a DIMD mode and a method for deriving an intra prediction mode of a current block according to the DIMD mode will be described.
[0114] Gradients may be calculated based on at least two samples belonging to a neighboring region of the current block. Here, the gradients may include at least one of a horizontal gradient or a vertical gradient. An intra prediction mode may be derived based on at least one of the calculated gradients or gradient amplitudes. Here, the gradient amplitude may be determined based on the sum of the horizontal gradient and the vertical gradient. This derivation method may derive one intra prediction mode or two or more intra prediction modes.
[0115] For example, gradients may be calculated for each window having a predetermined size. An angle indicating the directionality of samples within the window may be calculated based on the calculated gradients. The calculated angle may correspond to one of the predefined intra prediction modes described above. The magnitude of the gradient may be stored / updated for the intra prediction mode corresponding to the calculated angle. Through this process, an intra prediction mode corresponding to the calculated gradients may be determined for each window, and the magnitude of the gradient may be stored / updated for the determined intra prediction mode. The top T intra prediction modes having the largest magnitudes of the stored gradients may be selected. Here, T may be an integer of 1, 2, 3, or greater. The selected intra prediction mode may be set as a DIMD mode.
[0116] The surrounding area used to calculate the gradient is an area previously restored to the current block and may include at least one of the left area, top area, top left area, bottom left area, or top right area adjacent to the current block. The surrounding area may include at least one of a neighboring sample line adjacent to the current block, a first non-neighboring sample line one sample away from the current block, or a second non-neighboring sample line two samples away from the current block. However, the surrounding area is not limited thereto, and may further include a non-neighboring sample line N samples away from the current block, where N may be an integer greater than or equal to 3.
[0117] The surrounding region may be a region predefined in the same way in both the encoding device and the decoding device for calculating the gradient. Alternatively, the surrounding region may be variably determined based on information specifying the position of the surrounding region. In this case, the information specifying the position of the surrounding region may be signaled in a bitstream. Alternatively, the position of the surrounding region may be determined based on at least one of whether the current block is located on a boundary of a coding tree unit, the size of the current block (e.g., width, height, width-to-height ratio, product of width and height), the division type of the current block, the prediction mode of the surrounding region, or the availability of the surrounding region.
[0118] For example, if the current block is located at the top boundary of a coding tree unit, at least one of the top region, the top-left region, or the top-right region of the current block may not be referenced for gradient calculation. If the width of the current block is greater than the height, either the top region or the left region (e.g., the top region) may be referenced for gradient calculation, while the other (e.g., the left region) may not be referenced for gradient calculation. Conversely, if the width of the current block is smaller than the height, either the top region or the left region (e.g., the left region) may be referenced for gradient calculation, while the other (e.g., the top region) may not be referenced for gradient calculation. If the current block is generated by horizontal block division, the top region may not be referenced for gradient calculation. Conversely, if the current block is generated by vertical block division, the left region may not be referenced for gradient calculation. If surrounding regions of the current block are coded in inter mode, the surrounding regions may not be referenced for gradient calculation. However, without being limited thereto, the surrounding regions may be referenced for gradient calculation regardless of the prediction mode of the surrounding regions.
[0119] If the value of the DIMD mode (or the mode with the largest gradient magnitude) is smaller than the value of the top-left diagonal mode, it is determined that the prediction mode is likely to be horizontal, and the intra prediction mode of the current block can be inferred as horizontal planar mode. On the other hand, if the value of the DIMD mode is greater than or equal to the value of the top-left diagonal mode, it is determined that the prediction mode is likely to be vertical, and the intra prediction mode of the current block can be inferred as vertical planar mode. For example, if the predefined directional modes are defined as the bottom-left diagonal mode with mode number 2 to the top-right diagonal mode with mode number 66, the top-left diagonal mode may correspond to mode number 34.
[0120] When the DIMD mode is a non-directional planar mode or a DC mode, the intra prediction mode of the current block can be inferred as a horizontal planar mode. In this case, mode numbers 0 and 1 are assigned to the non-directional planar mode and the DC mode, respectively, so the intra prediction mode can be inferred without any additional conditions. Alternatively, when the DIMD mode is a non-directional planar mode or a DC mode, the intra prediction mode of the current block can be inferred as a vertical planar mode. In general, since edges of an image are likely to be vertical, using the vertical planar mode can be expected to improve prediction performance.
[0121] Table 3 below is an example of a signaling method for the second planar flag.
[0122] [Table 3]
[0123] Referring to Table 3, planar_flag indicates whether the intra prediction mode of the current block is a non-directional planar mode and may correspond to a second planar flag according to the present disclosure. For example, if planar_flag is 1, this may indicate that the intra prediction mode of the current block is a non-directional planar mode. If planar_flag is 0, this may indicate that the intra prediction mode of the current block is a horizontal or vertical planar mode. The intra_subpartitions_mode_flag may indicate whether the ISP mode is applied to the current block, and the sps_dimd_enabled_flag may indicate whether DIMD is enabled.
[0124] The planar_flag may be obtained from the bitstream when the ISP mode is not applied to the current block (intra_subpartitions_mode_flag=0) and DIMD is enabled (sps_dimd_enabled_flag=1). Here, it is assumed that the sps_dimd_enabled_flag is signaled in a sequence parameter set, but is not limited to this. When the value of planar_flag is 1, the intra prediction mode of the current block may be induced as a non-directional planar mode. On the other hand, when the value of planar_flag is 0, the intra prediction mode of the current block may be induced as either a horizontal or vertical planar mode based on the DIMD mode.
[0125] If the ISP mode is applied to the current block or DIMD is not available, planar_flag may not be obtained from the bitstream and may be induced as 1. That is, the intra prediction mode of the current block may be induced as non-directional planar mode.
[0126] In Table 3, planar_flag is signaled depending on intra_subpartitions_mode_flag and sps_dimd_enabled_flag, but this is just an example. That is, planar_flag may be signaled depending on sps_dimd_enabled_flag regardless of intra_subpartitions_mode_flag.
[0127] Alternatively, in Tables 1 and 2, a availability flag indicating whether DIMD is available may be further considered as a signaling condition for the planar direction flag. The planar direction flag may not be signaled if the availability flag indicates that DIMD is available, and may be signaled otherwise. When the planar direction flag is signaled, the intra prediction mode of the current block may be induced as either a horizontal or vertical planar mode depending on the value of the planar direction flag. On the other hand, when the planar direction flag is not signaled, the intra prediction mode of the current block may be induced as either a horizontal or vertical planar mode based on the above-mentioned DIMD mode.
[0128] Table 4 below is an example of how the planar direction flag can be signaled.
[0129] [Table 4]
[0130] Referring to Table 4, as described in Table 3, planar_flag indicates whether the intra prediction mode of the current block is a non-directional planar mode, intra_subpartitions_mode_flag indicates whether the ISP mode is applied to the current block, and sps_dimd_enabled_flag indicates whether DIMD is enabled. planar_dir_flag indicates whether the intra prediction mode of the current block is a horizontal planar mode and may correspond to the planar direction flag according to the present disclosure.
[0131] The planar_flag may be obtained from the bitstream if the ISP mode is not applied to the current block (intra_subpartitions_mode_flag=0). The planar_flag may be obtained from the bitstream regardless of the sps_dimd_enabled_flag.
[0132] When the value of planar_flag is 1, the intra prediction mode of the current block may be induced as a non-directional planar mode. On the other hand, when the value of planar_flag is 0, planar_dir_flag may be adaptively signaled based on sps_dimd_enabled_flag. When the value of planar_flag is 0 and sps_dimd_enabled_flag is 0, planar_dir_flag may be obtained from the bitstream. When the value of planar_dir_flag is 1, the intra prediction mode of the current block may be induced as a horizontal planar mode, and when the value of planar_dir_flag is 0, the intra prediction mode of the current block may be induced as a vertical planar mode. When the value of planar_flag is 0 and sps_dimd_enabled_flag is 1, planar_dir_flag does not need to be obtained from the bitstream. In this case, the intra prediction mode of the current block may be induced as either a horizontal or vertical planar mode based on the above-mentioned DIMD mode.
[0133] In Table 4, planar_flag is signaled dependently on intra_subpartitions_mode_flag, but this is only an example, i.e., planar_flag may be signaled regardless of intra_subpartitions_mode_flag.
[0134] Alternatively, without signaling the second planar flag and the planar direction flag described above, the intra prediction mode of the current block may be induced as one of the non-directional planar mode, horizontal planar mode, or vertical planar mode based on the DIMD mode.
[0135] If the DIMD mode belongs to a predetermined first range determined based on the value of the horizontal mode (modeH), which is a directional mode, the intra prediction mode of the current block may be inferred to be a horizontal planar mode. Here, the predetermined range may refer to a range from the value of the horizontal mode minus M (modeH-M) to the value of the horizontal mode plus M (modeH+M). For example, if the value of the horizontal mode is 18, M is 5, and the value of the DIMD mode is 16, the value of the DIMD mode falls within the range from 13 to 23, and therefore the intra prediction mode of the current block may be inferred to be a horizontal planar mode.
[0136] Similarly, if the DIMD mode belongs to a predetermined second range determined based on the vertical mode, which is a directional mode, the intra prediction mode of the current block may be inferred to be a vertical planar mode. Here, the predetermined range may refer to a range from the vertical mode value minus M (modeV-M) to the vertical mode value plus M (modeV+M). For example, if the vertical mode value is 50, M is 5, and the DIMD mode value is 46, the DIMD mode value falls within the range from 45 to 55, and the intra prediction mode of the current block may be inferred to be a vertical planar mode.
[0137] If the value of the DIMD mode does not belong to either the first range or the second range, the intra prediction mode of the current block may be inferred as a non-directional planar mode.
[0138] When the number of predefined directional modes is 65, M for determining the predetermined range may be an integer greater than or equal to 0 and less than or equal to 16. Alternatively, when the number of predefined directional modes is K, M may be an integer greater than or equal to 0 and less than or equal to K / 4.
[0139] Alternatively, in Tables 1 and 2, a availability flag indicating whether Template-based intra mode derivation (TIMD) is available may be further considered as a signaling condition for the second planar flag. In this case, either horizontal or vertical planar mode may be induced based on the intra prediction mode (hereinafter referred to as TIMD mode) induced by the TIMD without explicit signaling of the planar direction flag. In other words, based on the second planar flag indicating that the intra prediction mode of the current block is a non-directional planar mode, the intra prediction mode of the current block may be induced as a non-directional planar mode. On the other hand, based on the second planar flag indicating that the intra prediction mode of the current block is not a non-directional planar mode, the intra prediction mode of the current block may be induced as a horizontal or vertical planar mode based on the TIMD mode.
[0140] Specifically, the second planar flag may be adaptively signaled based on an availability flag indicating whether the ISP mode is applied to the current block and whether TIMD is available. For example, the second planar flag may be signaled if the ISP mode is not applied to the current block and the availability flag indicates that TIMD is available, and may not be signaled otherwise. Alternatively, the second planar flag may be signaled if the availability flag indicates that TIMD is available, regardless of whether the ISP mode is applied to the current block, and may not be signaled otherwise. The availability flag may be signaled by at least one of the VPS, PPS, PH, or SH.
[0141] Hereinafter, a method for deriving a TIMD mode and a method for deriving an intra prediction mode of a current block according to the TIMD mode will be described.
[0142] A cost may be calculated for each of the horizontal planar mode and the vertical planar mode. Here, the cost may be calculated as the sum of absolute differences (SAD) between predicted samples of the template region generated based on the horizontal / vertical planar mode and pre-reconstructed samples of the template region. Alternatively, the cost may be calculated as the sum of absolute transformed differences (SATD) between predicted samples of the template region and reconstructed samples. Here, SATD may refer to SAD transformed into the frequency domain. An example of the transform may be, but is not limited to, a Hadamard transform. The mode with the smallest cost among the horizontal and vertical planar modes may be selected as the intra prediction mode of the current block as the TIMD mode.
[0143] Alternatively, the horizontal planar mode and the vertical planar mode may be reordered in ascending order of the calculated costs, and the coded planar direction flag may be signaled based on the reordered order. For example, if the cost of the vertical planar mode is greater than the cost of the horizontal planar mode, an index of 1 may be assigned to the vertical planar mode and an index of 0 may be assigned to the horizontal planar mode. If the current block is coded as the vertical planar mode, the second planar flag may be signaled as 0 and the planar direction flag may be signaled as 1. Furthermore, because both modes are reordered according to the template region-based cost, the probability that the mode with an index of 0 will be selected is increased, and therefore, CABAC-based entropy coding may be applied to the planar direction flag.
[0144] If the TIMD mode value is smaller than the value of the top-left diagonal mode, it is determined that the prediction mode is likely to be a horizontal prediction mode, and the intra prediction mode of the current block can be inferred as a horizontal planar mode. On the other hand, if the TIMD mode value is greater than or equal to the value of the top-left diagonal mode, it is determined that the prediction mode is likely to be a vertical prediction mode, and the intra prediction mode of the current block can be inferred as a vertical planar mode. For example, if the predefined directional modes are defined as a bottom-left diagonal mode with mode number 2 to a top-right diagonal mode with mode number 66, the top-left diagonal mode may correspond to mode number 34.
[0145] If the TIMD mode is a non-directional planar mode or a DC mode, the intra prediction mode of the current block can be inferred as a horizontal planar mode. In this case, since mode numbers 0 and 1 are assigned to the non-directional planar mode and the DC mode, respectively, the intra prediction mode can be inferred without any additional conditions. Alternatively, if the TIMD mode is a non-directional planar mode or a DC mode, the intra prediction mode of the current block can be inferred as a vertical planar mode. In general, since edges of an image are likely to be vertical, using the vertical planar mode can be expected to improve prediction performance.
[0146] Table 5 below is an example of a signaling method for the second planar flag.
[0147] [Table 5]
[0148] Referring to Table 5, planar_flag indicates whether the intra prediction mode of the current block is a non-directional planar mode and may correspond to a second planar flag according to the present disclosure. For example, if planar_flag is 1, this may indicate that the intra prediction mode of the current block is a non-directional planar mode. If planar_flag is 0, this may indicate that the intra prediction mode of the current block is a horizontal or vertical planar mode. The intra_subpartitions_mode_flag may indicate whether the ISP mode is applied to the current block, and the sps_timd_enabled_flag may indicate whether TIMD is available.
[0149] The planar_flag may be obtained from the bitstream when the ISP mode is not applied to the current block (intra_subpartitions_mode_flag=0) and TIMD is available (sps_timd_enabled_flag=1). Here, it is assumed that the sps_timd_enabled_flag is signaled in a sequence parameter set, but is not limited to this. When the value of planar_flag is 1, the intra prediction mode of the current block may be induced as a non-directional planar mode. On the other hand, when the value of planar_flag is 0, the intra prediction mode of the current block may be induced as either a horizontal or vertical planar mode based on the TIMD mode.
[0150] If the ISP mode is applied to the current block or TIMD is not available, planar_flag may not be obtained from the bitstream and may be induced as 1. That is, the intra prediction mode of the current block may be induced as a non-directional planar mode.
[0151] In Table 5, planar_flag is signaled depending on intra_subpartitions_mode_flag and sps_timd_enabled_flag, but this is just an example. That is, planar_flag may be signaled depending on sps_timd_enabled_flag regardless of intra_subpartitions_mode_flag.
[0152] Alternatively, in Tables 1 and 2, an availability flag indicating whether TIMD is available may be further considered as a signaling condition for the planar direction flag. The planar direction flag may not be signaled if the availability flag indicates that TIMD is available, and may be signaled otherwise. When the planar direction flag is signaled, the intra prediction mode of the current block may be induced as either a horizontal or vertical planar mode depending on the value of the planar direction flag. On the other hand, when the planar direction flag is not signaled, the intra prediction mode of the current block may be induced as either a horizontal or vertical planar mode based on the TIMD mode.
[0153] Table 6 below is an example of how the planar direction flag can be signaled.
[0154] [Table 6]
[0155] Referring to Table 6, as described in Table 5, planar_flag may indicate whether the intra prediction mode of the current block is a non-directional planar mode, intra_subpartitions_mode_flag may indicate whether the ISP mode is applied to the current block, and sps_timd_enabled_flag may indicate whether TIMD is available. planar_dir_flag indicates whether the intra prediction mode of the current block is a horizontal planar mode and may correspond to the planar direction flag according to the present disclosure.
[0156] The planar_flag may be obtained from the bitstream if the ISP mode is not applied to the current block (intra_subpartitions_mode_flag=0). The planar_flag may be obtained from the bitstream regardless of the sps_timd_enabled_flag.
[0157] When the value of planar_flag is 1, the intra prediction mode of the current block may be induced as a non-directional planar mode. On the other hand, when the value of planar_flag is 0, planar_dir_flag may be adaptively signaled based on sps_timd_enabled_flag. When the value of planar_flag is 0 and sps_timd_enabled_flag is 0, planar_dir_flag may be obtained from the bitstream. When the value of planar_dir_flag is 1, the intra prediction mode of the current block may be induced as a horizontal planar mode, and when the value of planar_dir_flag is 0, the intra prediction mode of the current block may be induced as a vertical planar mode. When the value of planar_flag is 0 and sps_timd_enabled_flag is 1, planar_dir_flag does not need to be obtained from the bitstream. In this case, the intra prediction mode of the current block may be induced as either a horizontal or vertical planar mode based on the above-mentioned TIMD mode.
[0158] In Table 6, planar_flag is signaled dependently on intra_subpartitions_mode_flag, but this is only an example, i.e., planar_flag may be signaled regardless of intra_subpartitions_mode_flag.
[0159] Alternatively, horizontal / vertical planar mode may be used as one of the TIMD candidate modes without signaling a separate second planar flag or planar direction flag. The TIMD candidate modes may include at least one of the intra prediction modes of neighboring blocks, candidate modes belonging to the MPM list, vertical mode, horizontal mode, or DC mode. Furthermore, at least one of horizontal planar mode or vertical planar mode may be included as the TIMD candidate modes. That is, if a horizontal or vertical planar mode has the smallest cost among the TIMD candidate modes of the current block, the mode may be set as the intra prediction mode of the current block. However, the mode may be used when a flag (TIMD flag) indicating whether TIMD is applied to the current block is 1. In this way, when horizontal / vertical planar mode is used as one of the TIMD candidate modes, no additional flags other than the TIMD flag are signaled, thereby improving coding efficiency.
[0160] If horizontal / vertical planar mode is used as one of the TIMD candidate modes, the horizontal / vertical planar mode may be added as a TIMD candidate mode without any additional conditions. Alternatively, if none of the intra prediction modes of the surrounding blocks are directional modes (i.e., planar mode or DC mode), the horizontal / vertical planar mode may be added as a TIMD candidate mode. If all of the intra prediction modes of the surrounding blocks are non-directional modes, the current block is unlikely to contain texture or object boundaries. Adding the horizontal / vertical planar mode as a candidate mode to such a block can improve prediction performance. Alternatively, if at least one of the intra prediction modes of the surrounding blocks is not a non-directional mode, the horizontal / vertical planar mode may be added as a TIMD candidate mode. The horizontal or vertical planar mode performs prediction mainly using the left or top reference sample, thereby having the characteristics of each mode, and also having the characteristics of the planar mode, which predicts by reflecting the distance of the reference sample, thereby improving prediction performance. Here, the peripheral blocks may include at least one of a left peripheral block, a top peripheral block, a bottom left peripheral block, a top right peripheral block, or a top left peripheral block.
[0161] From the TIMD candidate modes, the top two modes (i.e., the mode with the lowest cost and the mode with the second lowest cost) may be selected in ascending order of cost. If the selected mode is a horizontal / vertical planar mode, that mode may be used as the intra prediction mode for the current block. That is, a predicted block may be generated for each of the two modes and then blended to generate a final predicted block. Alternatively, if the mode with the lowest cost is a horizontal or vertical planar mode, that mode may be used alone without blending with other predicted blocks as described above. Alternatively, if the mode with the lowest cost is a horizontal or vertical planar mode, the cost of that mode may be compared with that of the mode with the second lowest cost to determine whether to perform the blending as described above. For example, if the second lowest cost is greater than 1.5 times the lowest cost, blending may not be performed, and the horizontal or vertical planar mode, which is the mode with the lowest cost, may be used alone. Alternatively, if the mode with the second lowest cost is a horizontal or vertical planar mode, that mode may be used alone without blending with the mode with the lowest cost. Alternatively, if the mode with the second smallest cost is a horizontal or vertical planar mode, the cost of the mode with the second smallest cost may be compared to determine whether to perform the blending. For example, if the second smallest cost is less than 1.2 times the smallest cost, blending may not be performed. This method may improve prediction performance by maintaining the characteristics of the horizontal / vertical planar mode as much as possible. For intra-slices, the TIMD may be limited by the block size. For example, if the current slice is an intra-slice, TIMD may be performed only when the number of samples in a block is 1024 or less. As described above, when using the horizontal / vertical planar mode based on TIMD, the block size restriction of TIMD may be observed only for intra-slices. Alternatively, when using the horizontal / vertical planar mode based on TIMD, the block size restriction of TIMD may not be observed for intra-slices.By using TIMD mode-based horizontal / vertical planar modes for all block sizes, the performance of intra prediction can be improved.
[0162] The planar mode does not have to be defined as a mode independent of the candidate modes of the MPM list. In this case, the planar mode may be added as a candidate mode of the MPM list. A method for configuring the MPM list will be described in detail below.
[0163] The MPM list may include multiple candidate modes. One or more modes may be derived based on at least one of the following methods (1) to (6), and multiple candidate modes may be derived based on this.
[0164] (1) Intra prediction mode of neighboring blocks of the current block
[0165] (2) Intra prediction mode derived from surrounding inter modes (IPM mode)
[0166] (3) DIMD mode
[0167] (4) TIMD mode
[0168] (5) Derived mode
[0169] (6) Default mode
[0170] The neighboring blocks may include at least one of a left neighboring block, a top neighboring block, a bottom-left neighboring block, a top-right neighboring block, or a top-left neighboring block. The order in which the intra prediction modes of the neighboring blocks are added to the MPM list may vary depending on the size of the current block. For example, if the height of the current block is greater than or equal to the width, the intra prediction mode of the top neighboring block may be added before the intra prediction mode of the left neighboring block.
[0171] If the neighboring block is coded as an inter mode rather than an intra mode, the intra prediction mode may be derived from the IPM buffer. If the position indicated by the motion vector of the neighboring block coded as an inter mode is an intra mode, the intra prediction mode of the corresponding position may be stored in the IPM buffer. The intra prediction mode stored in the IPM buffer may be used as a candidate mode for the current block.
[0172] The above-described DIMD-based induced intra prediction mode may be used as a candidate mode. If the current block is not in DIMD mode, the DIMD-based induced intra prediction mode may be used as a candidate mode.
[0173] The above-described TIMD-based induced intra prediction mode may be used as a candidate mode. If the current block is not in TIMD mode, the TIMD-based induced intra prediction mode may be used as a candidate mode.
[0174] The induced mode may refer to a mode induced by adding or subtracting a predetermined constant value to a mode induced based on at least one of the methods (1) to (4), where the constant value may be an integer of 1, 2, 3, 4, or more.
[0175] The default mode is a mode defined identically for both the encoding device and the decoding device, and may include at least one of a horizontal mode, a vertical mode, or a mode derived by adding or subtracting a predetermined constant value to the horizontal / vertical mode, where the constant value may be defined as a multiple of 4, such as 4, 8, or 12.
[0176] If a mode derived based on at least one of the above methods (1) to (6) is a horizontal or vertical planar mode, the mode may be added to the MPM list. In this case, the diversity of intra prediction modes is increased without additional signaling, and prediction performance can be expected to improve. Alternatively, if a mode derived based on at least one of the above methods (1) to (6) is a horizontal or vertical planar mode, a non-directional planar mode may be added to the MPM list instead of the horizontal or vertical planar mode. In this case, the number of candidate modes does not increase due to an increase in the number of insertion conditions into the MPM list, thereby reducing complexity. Alternatively, if an intra prediction mode derived from a surrounding inter mode is a horizontal or vertical planar mode, the mode may be added to the MPM list. In this case, the diversity of intra prediction modes is increased, and prediction performance can be expected to improve. Alternatively, if an intra prediction mode derived from a surrounding inter mode is a horizontal or vertical planar mode, a non-directional planar mode may be added to the MPM list instead of the horizontal or vertical planar mode. In this way, by using the non-directional planar mode, which is the most frequently selected mode, it is possible to expect improvement in prediction performance.
[0177] The MPM list according to the present disclosure may be divided into a primary MPM list and a secondary MPM list. The candidate modes of the primary and secondary MPM lists are derived based on at least one of the above-described methods (1) to (6), but the secondary MPM list may be configured with modes that are not identical to the candidate modes of the primary MPM list. The secondary MPM list may be configured with M candidate modes, where M may be an integer of 16 or greater. If the secondary MPM list is not completely filled, a mode derived by adding or subtracting a value of N (N=1, 2, 3, 4) to a candidate mode with a candidate index of 0 in the primary MPM list may be inserted first. Furthermore, a mode derived by adding or subtracting a value of N to a candidate mode with a candidate index of 1 in the primary MPM list may be inserted, and a mode derived by adding or subtracting a value of K (K=1, 2, 3) to a candidate mode with a candidate index of 2 in the primary MPM list may be inserted. If the secondary MPM list is still not completely filled, any default modes that are not inserted into the primary / secondary MPM lists may be inserted.
[0178] Referring to FIG. 4, a prediction block of a current block may be generated based on the intra prediction mode of the current block (S410).
[0179] Reference samples may be derived based on the intra-prediction mode of the current block, and a prediction block for the current block may be generated based on the derived reference samples.
[0180] The reference samples may be derived from filtered neighboring samples or from unfiltered neighboring samples. For example, when the reference samples are derived by filtering the neighboring samples, the filtered neighboring samples may be derived as follows:
[0181] p[ -1 ][ -1 ] = ( refUnfilt[ -1 ]
[0000] + 2 * refUnfilt[ -1 ][ -1 ] + refUnfilt
[0000] [ -1 ] + 2 ) >> 2
[0182] p[ -1 ][ y ] = ( refUnfilt[ -1 ][ y + 1 ] + 2 * refUnfilt[ -1 ][ y ] + refUnfilt[ -1 ][ y - 1 ] + 2 ) >> 2 for y = 0..refH - 2
[0183] p[ -1 ][ refH - 1 ] = refUnfilt[ -1 ][ refH - 1 ]
[0184] p[ x ][ -1 ] = ( refUnfilt[ x - 1 ][ -1 ] + 2 * refUnfilt[ x ][ -1 ] + refUnfilt[ x + 1 ][ -1 ] + 2 ) >> 2 for x = 0..refW - 2
[0185] p[ refW - 1 ][ -1 ] = refUnfilt[ refW - 1 ][ -1 ]
[0186] In the above formula, refUnfilt represents the unfiltered surrounding sample, and [x][y] represents the x and y coordinates of the sample. This can indicate the coordinates when the coordinates of the top left sample in the current block are (0,0). refH and refW can represent the height and width of the reference region for intra prediction, respectively.
[0187] The filtering of the surrounding samples may be performed if some or all of the following specific conditions are met, and may not be performed if they are not met.
[0188] - nTbW * nTbH is greater than 32 (the product of the current block's width and height is greater than 32)
[0189] - cIdx is equal to 0 (the component type of the current block is a luminance component)
[0190] - IntraSubPartitionsSplitType is equal to ISP_NO_SPLIT (ISP mode is not applied to the current block)
[0191] - one or more of the following conditions is true:
[0192] - predModeIntra is equal to INTRA_PLANAR (the intra prediction mode of the current block is non-directional planar mode)
[0193] - predModeIntra is equal to INTRA_ANGULAR34 (the intra prediction mode of the current block is the top left diagonal mode)
[0194] - predModeIntra is equal to INTRA_ANGULAR2 and nTbH is greater than or equal to nTbW (the intra prediction mode of the current block is the bottom-left diagonal mode, and the width of the current block is greater than or equal to the height)
[0195] - predModeIntra is equal to INTRA_ANGULAR66 and nTbW is greater than or equal to nTbH (the intra prediction mode of the current block is the upper right diagonal mode, and the width of the current block is greater than or equal to the height)
[0196] In the horizontal planar mode, a predicted block may be generated based on a left-side sample column of the current block and a top-right-side sample column of the current block. For example, the predicted block according to the horizontal planar mode may be generated as shown in Equation 1 or 2 below.
[0197] [Formula 1]
number
[0198] [Formula 2]
number
[0199] In Equation 1, predH(x,y) may represent an intermediate predicted sample of (x,y) coordinates. W and H may represent the width and height of the current block, respectively. rec(-1,y) may represent a left-side peripheral sample of the current block, and rec(W,-1) may represent a right-top peripheral sample of the current block. Planar Hor (x, y) may mean the final predicted sample at (x, y) coordinates. This may also be applied to Equation 2.
[0200] In the vertical planar mode, a predicted block may be generated based on a sample row around the top edge of the current block and samples around the bottom left edge of the current block. For example, the predicted block according to the vertical planar mode may be generated as shown in Equation 3 or 4 below.
[0201] [Formula 3]
number
[0202] [Formula 4]
number
[0203] In Equation 3, predV(x,y) may represent an intermediate predicted sample of (x,y) coordinates. W and H may represent the width and height of the current block, respectively. rec(x,-1) may represent a sample around the top edge of the current block, and rec(-1,H) may represent a sample around the bottom left edge of the current block. Planar Ver (x, y) may mean the final predicted sample at the (x, y) coordinates. This may also be applied to Equation 4.
[0204] If the intra prediction mode of the current block belongs to a directional planar mode, the reference samples for the current block may be derived based on the reference samples for the directional mode, that is, the horizontal mode or the vertical mode.
[0205] As shown in the above equation, in the case of horizontal planar mode, the left peripheral sample may be primarily used as a reference sample, similar to the horizontal mode, which is a directional mode, and in the case of vertical planar mode, the top peripheral sample may be primarily used as a reference sample, similar to the vertical mode, which is a directional mode.
[0206] The horizontal or vertical planar mode according to the present disclosure may have characteristics similar to the horizontal mode or vertical mode, mainly using the left or upper peripheral samples. Therefore, the horizontal planar mode and the coded block may use the same reference sample derivation method as the horizontal mode and the coded block. Similarly, the vertical planar mode and the coded block may use the same reference sample derivation method as the vertical mode and the coded block.
[0207] Alternatively, if the intra prediction mode of the current block belongs to a directional planar mode, the reference samples for the current block may be derived based on the reference samples for a non-directional planar mode.
[0208] The horizontal / vertical planar mode performs prediction by applying a weight based on the distance between a reference sample and a predicted sample, and therefore may have similar characteristics to the non-directional planar mode. Therefore, a block coded in the horizontal or vertical planar mode may use the same reference sample derivation method as a block coded in the non-directional planar mode.
[0209] Furthermore, if the intra prediction mode of the current block is horizontal or vertical planar mode, position dependent intra prediction (PDPC) can be applied to the predicted block, which may be a filtering process for mitigating discontinuities between the predicted block and reconstructed neighboring samples.
[0210] For example, since horizontal / vertical planar modes have similar characteristics to non-directional planar modes, the PDPC method applied to the non-directional planar modes can be applied in the same / similar manner. When applying the PDPC method applied to the non-directional planar modes, prediction blocks or prediction samples generated based on the horizontal or vertical planar modes may be corrected as shown in Equation 5 below.
[0211] [Formula 5]
number
[0212] In Equation 5, floorLog2(a) and min(a, b) may be defined as Equation 6 below.
[0213] [Formula 6]
number
[0214] In Equation 5, W and H represent the width and height of the current block, respectively, and pred(x,y) may represent a predicted sample of (x,y) coordinates in the predicted block. Here, the (x,y) coordinates refer to the coordinates when the coordinates of the top left sample of the current block are (0,0). rec(-1,y) and rec(x,-1) represent the left and top peripheral samples, respectively. The left and top peripheral samples may be the filtered or unfiltered peripheral samples described above. In Equation 6, n may be an integer less than or equal to log2a and greater than (log2a-1).
[0215] Alternatively, in the case of horizontal planar mode, prediction is performed mainly using samples around the left side, so a PDPC method for horizontal mode having similar characteristics may be applied in the same / similar manner. Similarly, in the case of vertical planar mode, prediction is performed mainly using samples around the top side, so a PDPC method for vertical mode having similar characteristics may be applied in the same / similar manner. When applying a PDPC method applied to vertical mode, a predicted block or predicted sample generated based on the vertical planar mode may be corrected as shown in Equation 7 below.
[0216] [Formula 7]
number
[0217] In Equation 7, Clip1(a) may be defined as Equation 8 below.
[0218] [Formula 8]
number
[0219] In Equation 8, BitDepth represents the bit depth of the current sample, and rec(-1,-1) may mean the sample around the top left corner.
[0220] Furthermore, when the PDPC method applied to the horizontal mode is applied, the prediction block or the prediction sample generated based on the horizontal planar mode may be corrected as shown in Equation 9 below.
[0221] [Formula 9]
number
[0222] Clip1(a) in Equation 9 is as defined in Equation 8 above.
[0223] Referring to FIG. 4, a residual block of the current block may be obtained by performing at least one of inverse quantization and inverse transformation on the transform coefficients of the current block (S420).
[0224] The transform coefficients of the current block can be derived by decoding residual information signaled from the bitstream.
[0225] The transform kernel for the inverse transform may be determined based on at least one of the size of the current block or the intra prediction mode.
[0226] As described above, the horizontal planar mode may use the left peripheral sample column and the top right peripheral sample, and the vertical planar mode may use the top peripheral sample row and the bottom left peripheral sample. That is, the residual characteristics of a block coded in the horizontal planar mode may be similar to the residual of a block coded in the horizontal mode or the residual of a block coded in the vertical mode. Similarly, the residual characteristics of a block coded in the vertical planar mode may be similar to the residual of a block coded in the vertical mode or the residual of a block coded in the horizontal mode. Due to the similarity of the residual characteristics, the transform kernel of a block coded in the horizontal / vertical planar mode may be determined to be the same as that of a block coded in the horizontal / vertical mode, which is a directional mode.
[0227] For example, the residual signal of a block coded in horizontal planar mode may be regarded as the residual signal of a block coded in horizontal mode, and the same transform kernel may be used for the block coded in horizontal mode. The residual signal of a block coded in vertical planar mode may be regarded as the residual signal of a block coded in vertical mode, and the same transform kernel may be used for the block coded in vertical mode. Alternatively, the residual signal of a block coded in horizontal planar mode may be regarded as the residual signal of a block coded in vertical mode, and the same transform kernel may be used for the block coded in vertical mode. The residual signal of a block coded in vertical planar mode may be regarded as the residual signal of a block coded in horizontal mode, and the same transform kernel may be used for the block coded in horizontal mode. By determining the transform kernel based on the correlation of such residual characteristics, improved transform performance and better energy compaction can be expected.
[0228] Alternatively, the horizontal / vertical planar mode may have similar characteristics to the residual of the non-directional planar mode because prediction is performed taking into account the distance between the reference sample and the predicted sample. Therefore, the residual signal of a block coded in the horizontal or vertical planar mode may be regarded as the residual signal of a block coded in the non-directional planar mode, and the same transform kernel can be used for the block coded in the non-directional planar mode. By determining the transform kernel based on the correlation of such residual characteristics, the transform performance can be improved and better energy compaction can be expected.
[0229] Referring to FIG. 4, the current block can be reconstructed based on the predicted block of the current block and the residual block (S430).
[0230] A reconstructed block may be generated by adding a predicted block of the current block and a residual block, where the predicted block may be a predicted block to which PDPC is not applied or may be a predicted block corrected by PDPC.
[0231] FIG. 5 is a diagram showing a schematic configuration of a decoding device 300 that performs the video decoding method according to the present disclosure.
[0232] 5, a decoding apparatus 300 according to the present disclosure may include an intra-prediction mode inducing unit 510, a prediction block generating unit 520, a residual block generating unit 530, and a reconstructed block generating unit 540. The intra-prediction mode inducing unit 510 and the prediction block generating unit 520 may be configured in the intra-prediction unit 331 of FIG. 3, the residual block generating unit 530 may be configured in the residual processing unit 320 of FIG. 3, and the reconstructed block generating unit 540 may be configured in the adder 340 of FIG. 3.
[0233] The intra prediction mode deriving unit 510 may derive the intra prediction mode of the current block in the same manner as in operation S400. That is, the intra prediction mode deriving unit 510 may derive the intra prediction mode of the current block based on the intra prediction mode information, and detailed description thereof will be omitted here.
[0234] The prediction block generator 520 may perform the same prediction block generation method as in step S410. That is, the prediction block of the current block may be generated based on the intra prediction mode of the current block. In this case, the prediction block generator 520 may derive reference samples for intra prediction based on neighboring samples of the current block, or may derive the reference samples by applying filtering to the neighboring samples under specific conditions. The prediction block generator 520 may also generate a compensated prediction block by applying PDPC to the prediction block.
[0235] The residual block generator 530 may perform the same residual block generation method as that performed in step S420. That is, the residual block of the current block may be obtained by performing at least one of inverse quantization and inverse transform on the transform coefficients of the current block. In this case, the transform kernel for inverse transform may be determined based on at least one of the size of the current block and the intra prediction mode, as described with reference to FIG. 4.
[0236] The reconstructed block generator 540 can reconstruct the current block based on the predicted block of the current block and the residual block.
[0237] FIG. 6 is a diagram illustrating a video encoding method performed by an encoding device 200 according to an embodiment of the present disclosure.
[0238] Referring to FIG. 6, a prediction block of a current block can be generated (S600).
[0239] A prediction block of a current block may be generated based on a predetermined intra prediction mode. The predetermined intra prediction mode may be any one of predefined intra prediction modes. The predefined intra prediction modes may include at least one of a non-directional mode or a directional mode. The non-directional mode may include at least one of a planar mode or a DC mode. The planar mode according to the present disclosure includes a non-directional planar mode and a directional planar mode, and the directional planar mode may include at least one of a horizontal planar mode or a vertical planar mode. Alternatively, the directional planar mode may be defined as a mode independent of the non-directional planar mode. In this case, the planar mode according to the present disclosure may refer to the non-directional planar mode. The directional mode may refer to a mode having a predetermined angle, such as a horizontal mode, a vertical mode, or a diagonal mode.
[0240] Intra-prediction mode information may be coded based on the intra-prediction mode used to generate the predicted block of the current block. The coded intra-prediction mode information may be inserted into a bitstream and signaled. The intra-prediction mode information may include at least one of an MPM flag, a first planar flag, a second planar flag, a planar direction flag, an MPM index, or residual mode information.
[0241] The planar mode according to the present disclosure may be signaled as a mode independent of the candidate modes in the MPM list, and the method for signaling or deriving intra-prediction mode information for this purpose has been described with reference to FIG.
[0242] Alternatively, the planar mode according to the present disclosure may not be signaled as a separate mode from the candidate modes in the MPM list, i.e., the planar mode may be added as a candidate mode in the MPM list, as described above with reference to FIG.
[0243] A prediction block of a current block may be generated based on a predetermined reference sample. Here, the predetermined reference sample may be a pre-reconstructed neighboring sample adjacent to the current block or a filtered neighboring sample, as described with reference to FIG. 4. The method of obtaining the filtered neighboring sample and whether or not filtering is performed are the same as those described with reference to FIG. 4.
[0244] Furthermore, PDPC may be applied to a prediction block of the current block. In particular, when the intra prediction mode of the current block is a horizontal or vertical planar mode, PDPC may be applied to the prediction block. In this case, in the case of the horizontal or vertical planar mode, the PDPC method applied to the non-directional planar mode may be applied in consideration of similar characteristics to the non-directional planar mode. Alternatively, in the case of the horizontal planar mode (or the vertical planar mode), the PDPC method applied to the horizontal mode (or the vertical mode) may be applied in consideration of similar characteristics to the horizontal mode (or the vertical mode).
[0245] 6, a residual block of a current block may be derived based on a predicted block of the current block (S610). Here, the residual block of the current block may be derived based on a difference between the original block of the current block and the predicted block.
[0246] Referring to FIG. 6, at least one of transformation and quantization may be performed on the residual block of the current block to derive transform coefficients of the current block (S620).
[0247] A transformation kernel for the transformation may be determined based on at least one of a size of the current block or an intra-prediction mode.
[0248] For example, the residual signal of a block coded in horizontal planar mode may be regarded as the residual signal of a block coded in horizontal mode, and the same transform kernel may be used for the block coded in horizontal mode. The residual signal of a block coded in vertical planar mode may be regarded as the residual signal of a block coded in vertical mode, and the same transform kernel may be used for the block coded in vertical mode. Alternatively, the residual signal of a block coded in horizontal planar mode may be regarded as the residual signal of a block coded in vertical mode, and the same transform kernel may be used for the block coded in vertical mode. The residual signal of a block coded in vertical planar mode may be regarded as the residual signal of a block coded in horizontal mode, and the same transform kernel may be used for the block coded in horizontal mode. By determining the transform kernel based on the correlation of such residual characteristics, improved transform performance and better energy compaction can be expected.
[0249] Alternatively, the horizontal / vertical planar mode may have similar characteristics to the residual of the non-directional planar mode because prediction is performed taking into account the distance between the reference sample and the predicted sample. Therefore, the residual signal of a block coded in the horizontal or vertical planar mode may be regarded as the residual signal of a block coded in the non-directional planar mode, and the same transform kernel can be used for the block coded in the non-directional planar mode. By determining the transform kernel based on the correlation of such residual characteristics, the transform performance can be improved and better energy compaction can be expected.
[0250] Referring to FIG. 6, the transform coefficients of the current block may be coded (S630).
[0251] FIG. 7 is a diagram showing a schematic configuration of an encoding device 200 that performs the video encoding method according to the present disclosure.
[0252] 7, the encoding apparatus 200 according to the present disclosure may include a prediction block generation unit 710, a residual block generation unit 720, a transform coefficient derivation unit 730, and a transform coefficient encoding unit 740. The prediction block generation unit 710 may be configured in the inter prediction unit 221 of FIG. 2, and the residual block generation unit 720 and the transform coefficient derivation unit 730 may be configured in the residual processing unit 230 of FIG. 2. The transform coefficient encoding unit 740 may be configured in the entropy encoding unit 240 of FIG. 2.
[0253] The prediction block generator 710 may generate a prediction block of a current block based on a predetermined intra prediction mode, and may generate intra prediction mode information based on the intra prediction mode used to generate the prediction block of the current block, as described with reference to Figure 6. The generated intra prediction mode information may be transmitted to the entropy encoding unit 240 of Figure 2 and encoded therein.
[0254] The residual block generator 720 may generate a residual block based on the difference between the original block of the current block and the predicted block.
[0255] The transform coefficient deriving unit 730 may derive transform coefficients of the current block by performing at least one of transforming or quantizing the residual block of the current block. A transform kernel for the transform may be determined based on at least one of the size of the current block or the intra prediction mode, as described with reference to FIG. 6.
[0256] The transform coefficient encoding unit 740 may encode the transform coefficients of the current block.
[0257] In the above-described embodiments, the method is described based on a flowchart with a series of steps or blocks, but the embodiment is not limited to the order of the steps, and some steps may occur in a different order or simultaneously with other steps than those described above. Furthermore, those skilled in the art will understand that the steps shown in the flowchart are not exclusive, and other steps may be included, or one or more steps of the flowchart may be deleted without affecting the scope of the embodiments of this document.
[0258] The methods according to the embodiments of the present document described above may be implemented in the form of software, and the encoding device and / or decoding device according to the present document may be included in a device that performs video processing, such as a TV, a computer, a smartphone, a set-top box, or a display device.
[0259] When embodiments in this document are embodied as software, the methods described above may be embodied as modules (processes, functions, etc.) that perform the functions described above. The modules may be stored in memory and executed by a processor. The memory may be internal or external to the processor and may be coupled to the processor by various known means. The processor may include an application-specific integrated circuit (ASIC), other chipsets, logic circuits, and / or data processing devices. The memory may include read-only memory (ROM), random access memory (RAM), flash memory, a memory card, a storage medium, and / or other storage devices. That is, the embodiments described herein may be embodied and executed on a processor, microprocessor, controller, or chip. For example, the functional units illustrated in the figures may be embodied and executed on a computer, processor, microprocessor, controller, or chip. In this case, information (e.g., information on instructions) or algorithms for the implementation may be stored on a digital storage medium.
[0260] In addition, the decoding device and encoding device to which the embodiments of the present specification are applied may be included in a multimedia broadcast transmitting / receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video conversation device, a real-time communication device such as video communication, a mobile streaming device, a storage medium, a camcorder, a custom video (VoD) service providing device, an over-the-top (OTT) video (over-the-top) device, an internet streaming service providing device, a three-dimensional (3D) video device, a virtual reality (VR) device, an augmented reality (AR) device, a video telephone video device, a vehicle terminal (e.g., a vehicle terminal (including an autonomous vehicle), an airplane terminal, a ship terminal, etc.), a medical video device, etc., and may be used to process video signals or data signals. For example, over-the-top (OTT) video (over-the-top) video devices 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.
[0261] In addition, a processing method to which the embodiments of the present specification are applied may be produced in the form of a program executed by a computer and stored in a computer-readable recording medium. Multimedia data having a data structure according to the embodiments of the present specification may also be stored in a computer-readable recording medium. The computer-readable recording medium may include any type of storage device or distributed storage device in which computer-readable data is stored. The computer-readable recording medium may include, for example, a Blu-ray Disc (BD), a Universal Serial Bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. The computer-readable recording medium may also include media embodied in the form of a carrier wave (e.g., transmission via the Internet). In addition, a bitstream generated by the encoding method may be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network.
[0262] Furthermore, the embodiments of the present specification may be embodied as a computer program product using program code, which may be executed by a computer according to the embodiments of the present specification. The program code may be stored on a computer-readable carrier.
[0263] FIG. 8 illustrates an example of a content streaming system to which the embodiments of the present disclosure can be applied.
[0264] Referring to FIG. 8, a content streaming system to which the embodiments of the present specification are applied may broadly include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.
[0265] The encoding server compresses content input from a multimedia input device such as a smartphone, camera, camcorder, etc. into digital data to generate a bitstream and transmits the bitstream to the streaming server. As another example, if a multimedia input device such as a smartphone, camera, camcorder, etc. directly generates a bitstream, the encoding server may be omitted.
[0266] The bitstream may be generated by an encoding method or a bitstream generation method to which the embodiments of this specification are applied, and the streaming server may temporarily store the bitstream during the process of transmitting or receiving the bitstream.
[0267] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server acts as an intermediary to inform 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 may include a separate control server, which controls commands and responses between devices in the content streaming system.
[0268] The streaming server can receive content from a media storage and / or encoding server. For example, when receiving content from the encoding server, the content can be received in real time. In this case, the streaming server can store the bitstream for a certain period of time to provide a smooth streaming service.
[0269] Examples of the user devices include mobile phones, smartphones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation systems, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glasses, and head-mounted displays (HMDs)), digital TVs, desktop computers, and digital signage.
[0270] Each server in the content streaming system may be operated as a distributed server, in which case data received by each server may be processed in a distributed manner.
[0271] The claims described herein may be combined in various ways. For example, technical features of method claims herein may be combined and embodied as an apparatus, and technical features of apparatus claims herein may be combined and embodied as a method. Furthermore, technical features of method claims herein and technical features of apparatus claims herein may be combined and embodied as an apparatus, and technical features of method claims herein and technical features of apparatus claims herein may be combined and embodied as a method.
Claims
1. deriving an intra prediction mode of a current block from predefined intra prediction modes, the predefined intra prediction modes including a non-directional planar mode, a directional planar mode, a horizontal mode, and a vertical mode, and the directional planar mode including at least one of a horizontal planar mode or a vertical planar mode; generating a prediction block of the current block based on the intra prediction mode; performing at least one of inverse quantization and inverse transformation on the transform coefficients of the current block to obtain a residual block of the current block; reconstructing the current block based on a predicted block and a residual block of the current block.
2. The image decoding method of claim 1 , wherein, if an intra-prediction mode of the current block belongs to the directional planar mode, a transform kernel for the inverse transform is determined based on a transform kernel for a predefined mode.
3. When the intra prediction mode of the current block is the horizontal planar mode, a transform kernel for the inverse transform is determined based on a transform kernel for the vertical mode; The image decoding method of claim 2 , wherein, when an intra-prediction mode of the current block is the vertical planar mode, a transform kernel for the inverse transform is determined based on a transform kernel for the horizontal mode.
4. When the intra prediction mode of the current block is the horizontal planar mode, a transform kernel for the inverse transform is determined based on a transform kernel for the horizontal mode; The image decoding method of claim 2 , wherein, when an intra prediction mode of the current block is the vertical planar mode, a transform kernel for the inverse transform is determined based on a transform kernel for the vertical mode.
5. The image decoding method of claim 2 , wherein, when an intra-prediction mode of the current block belongs to the directional planar mode, a transform kernel for the inverse transform is determined based on a transform kernel for the non-directional planar mode.
6. The intra prediction mode of the current block is derived based on intra prediction mode information, 2. The image decoding method of claim 1, wherein the intra-prediction mode information includes at least one of a planar flag indicating whether the intra-prediction mode of the current block is the non-directional planar mode or the directional planar mode, or a planar direction flag indicating whether the intra-prediction mode of the current block is the horizontal planar mode.
7. 7. The image decoding method of claim 6, wherein an MPM flag indicating whether the intra prediction mode of the current block is derived from an MPM list is signaled based on the planar flag indicating that the intra prediction mode of the current block does not belong to the directional planar mode.
8. 7. The video decoding method of claim 6, wherein at least one of the planar flag or the planar direction flag is adaptively signaled based on an availability flag indicating whether decoder-side intra mode derivation (DIMD) is available.
9. 7. The video decoding method of claim 6, wherein at least one of the planar flag or the planar direction flag is adaptively signaled based on an availability flag indicating whether template based intra mode derivation (TIMD) is available.
10. The image decoding method of claim 1 , wherein, when an intra-prediction mode of the current block belongs to the directional planar mode, reference samples for the current block are derived based on reference samples for the horizontal mode or the vertical mode.
11. The image decoding method of claim 1 , wherein, when an intra-prediction mode of the current block belongs to the directional planar mode, reference samples for the current block are derived based on reference samples for the non-directional planar mode.
12. generating a prediction block of the current block based on one of predefined intra prediction modes, the predefined intra prediction modes including a non-directional planar mode, a directional planar mode, a horizontal mode, and a vertical mode, and the directional planar mode including at least one of a horizontal planar mode or a vertical planar mode; deriving a residual block of the current block based on a predicted block of the current block; performing at least one of transforming and quantizing the residual block to derive transform coefficients of the current block; encoding the transform coefficients of the current block.
13. A computer-readable storage medium storing a bitstream generated by the video encoding method of claim 12.
14. obtaining a bitstream for video information, the bitstream being generated by generating a prediction block of a current block based on one of predefined intra prediction modes, deriving a residual block of the current block based on the prediction block of the current block, performing at least one of transforming and quantizing the residual block to derive transform coefficients of the current block, and encoding the transform coefficients of the current block; transmitting data including the bitstream; The data transmission method, wherein the predefined intra-prediction modes include a non-directional planar mode, a directional planar mode, a horizontal mode, and a vertical mode, and the directional planar mode includes at least one of a horizontal planar mode or a vertical planar mode.