Video encoding / decoding method and device, and recording medium storing bitstream
By deriving and utilizing optimized intra prediction modes for current blocks through adaptive signaling and threshold-based decisions, the method improves encoding efficiency for high-resolution images.
Patent Information
- Application Number
- PCT/KR2025/005489
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-04-24
- Filing Date
- 2025-04-23
- Publication Date
- 2025-10-30
AI Technical Summary
Existing image compression technologies face challenges in efficiently encoding and decoding high-resolution, high-quality images, particularly in deriving optimal intra prediction modes for current blocks, leading to suboptimal encoding efficiency.
The method and device derive one or more Derived Intra Prediction Modes (DIPMs) for a current block, construct a candidate list based on these modes, generate a prediction block, and reconstruct the current block using residual blocks, with adaptive signaling and threshold-based decisions to optimize intra prediction.
This approach improves encoding efficiency by deriving more accurate DIPMs, enhancing the encoding efficiency of intra prediction and enabling more efficient video/image compression.
Smart Images

Figure KR2025005489_30102025_PF_FP_ABST
Abstract
Description
Video encoding / decoding method and device, and recording medium storing bitstream
[0001] The present invention relates to a video encoding / decoding method and device, and a recording medium storing a bitstream.
[0002] Recently, the demand for high-resolution, high-quality images, such as HD (High Definition) images and UHD (Ultra High Definition) images, is increasing in various application fields, and accordingly, high-efficiency image compression technologies are being discussed.
[0003] There are various technologies for image compression, such as inter prediction technology that predicts pixel values included in the current picture from pictures before or after the current picture, intra prediction technology that predicts pixel values included in the current picture using pixel information within the current picture, and entropy encoding technology that assigns short codes to values with high frequency of appearance and long codes to values with low frequency of appearance, and these technologies can be used to effectively compress and transmit or store image data.
[0004] The present disclosure provides a method and device for inducing DIPM.
[0005] The present disclosure provides a method and device for configuring a template area for DIPM.
[0006] The present disclosure provides a signaling method and device for adaptive utilization of DIPM mode.
[0007] The video decoding method and device according to the present disclosure can derive one or more DIPMs (derived intra prediction modes) for a current block, construct a candidate list based on the one or more DIPMs, generate a prediction block of the current block based on the candidate list, and reconstruct the current block based on the prediction block and the residual block of the current block.
[0008] In the image decoding method and device according to the present disclosure, when the average absolute deviation of the pre-restored samples in the surrounding area adjacent to the current block is less than a threshold value, a non-directional mode can be induced as DIPM.
[0009] In the image decoding method and device according to the present disclosure, the average absolute deviation can be derived based on a predetermined reference value. Here, the reference value can be the mean value, median value, mode value, maximum value, or minimum value of the pre-restored samples.
[0010] In the image decoding method and device according to the present disclosure, the threshold value may be determined based on at least one of the size or quantization parameter of the current block.
[0011] In the image decoding method and device according to the present disclosure, either the planar mode or the DC mode among the non-directional modes can be selectively induced into the DIPM.
[0012] In the image decoding method and device according to the present disclosure, the non-directional mode can be induced to the DIPM based on information indicating whether the non-directional mode is available to the DIPM.
[0013] In the image decoding method and device according to the present disclosure, the step of deriving one or more DIPMs may include a step of obtaining amplitude values for directional modes by applying a predetermined filter to samples belonging to a template area of the current block.
[0014] In the image decoding method and device according to the present disclosure, when the amplitude values for the directional modes are less than or equal to a threshold value, the non-directional mode can be induced as DIPM.
[0015] In the image decoding method and device according to the present disclosure, when the number of directional modes having similar amplitude values is P or more, a non-directional mode can induce DIPM.
[0016] In the image decoding method and device according to the present disclosure, the step of deriving one or more DIPMs may include the step of applying a predetermined filter to a sample belonging to a template area of the current block to derive a horizontal direction change amount and a vertical direction change amount in the sample, and the step of obtaining an amplitude value for a directional mode based on the horizontal direction change amount and the vertical direction change amount.
[0017] In the image decoding method and device according to the present disclosure, when the amplitude value for the directional mode is less than or equal to a threshold value, the amplitude value for the directional mode can be assigned to the non-directional mode.
[0018] In the image decoding method and device according to the present disclosure, when at least one of the magnitude of the horizontal direction change or the magnitude of the vertical direction change is less than or equal to a threshold value, the amplitude value for the directional mode can be assigned to the non-directional mode.
[0019] The video encoding method and device according to the present disclosure can derive one or more DIPMs (derived intra prediction modes) for a current block, construct a candidate list based on the one or more DIPMs, generate a prediction block of the current block based on the candidate list, generate a residual block of the current block based on the prediction block of the current block, derive transform coefficients of the current block based on the residual block, and encode residual information regarding the transform coefficients.
[0020] A computer-readable digital storage medium is provided, which stores encoded video / image information that causes a decoding device according to the present disclosure to perform a video decoding method.
[0021] A computer-readable digital storage medium storing video / image information generated by a video encoding method according to the present disclosure is provided.
[0022] A method and device for transmitting video / image information generated by a video encoding method according to the present disclosure are provided.
[0023] According to the present disclosure, by deriving and utilizing DIPM, which is a mode more optimized for the current block, in an encoding device and a decoding device, the encoding efficiency of intra prediction can be improved.
[0024] According to the present disclosure, a more accurate DIPM can be derived based on various or variable template regions, thereby improving the encoding efficiency of intra prediction.
[0025] According to the present disclosure, DIPM-related information can be efficiently signaled.
[0026] FIG. 1 illustrates a video / image coding system according to the present disclosure.
[0027] FIG. 2 is a schematic block diagram of an encoding device to which an embodiment of the present disclosure can be applied and in which encoding of a video / image signal is performed.
[0028] FIG. 3 is a schematic block diagram of a decoding device to which an embodiment of the present disclosure can be applied and in which decoding of a video / image signal is performed.
[0029] FIG. 4 illustrates a decoding method performed by a decoding device (300) as an embodiment according to the present disclosure.
[0030] FIG. 5 and FIG. 6 illustrate a template area according to an MRL mode as an embodiment according to the present disclosure.
[0031] FIG. 7 illustrates an example of a method for obtaining an error value for sorting a candidate list according to the present disclosure.
[0032] FIG. 8 illustrates a schematic configuration of a decoding device (300) that performs a decoding method according to the present disclosure.
[0033] FIG. 9 illustrates an encoding method performed by an encoding device (200) as an embodiment according to the present disclosure.
[0034] Fig. 10 illustrates a schematic configuration of an encoding device (200) that performs an encoding method according to the present disclosure.
[0035] FIG. 11 illustrates an example of a content streaming system to which embodiments of the present disclosure can be applied.
[0036] The present disclosure may be modified in various ways and encompasses numerous embodiments. Specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the present disclosure to specific embodiments, but rather to encompass all modifications, equivalents, and alternatives falling within the spirit and technical scope of the present disclosure. Similar reference numerals have been used to designate similar components throughout the description of each drawing.
[0037] While terms such as "first" and "second" may be used to describe various components, these components should not be limited by these terms. These terms are used solely to distinguish one component from another. For example, without departing from the scope of the present disclosure, a first component could be referred to as a "second component," and similarly, a second component could also be referred to as a "first component." The term "and / or" includes a combination of multiple related items described herein or any of multiple related items described herein.
[0038] When a component is referred to as being "connected" or "connected" to another component, it should be understood that it may be directly connected or connected to that other component, but that there may be other components intervening. Conversely, when a component is referred to as being "directly connected" or "connected" to another component, it should be understood that there are no other components intervening.
[0039] The terminology used in this application is only used to describe specific embodiments and is not intended to limit the present disclosure. The singular expression includes the plural expression unless the context clearly indicates otherwise. In this application, it should be understood that the terms "comprise" or "have" indicate the presence of a feature, number, step, operation, component, part, or combination thereof described in the specification, but do not preclude the possibility of the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.
[0040] The present disclosure relates to video / image coding. For example, the methods / embodiments disclosed in this specification can be applied to methods disclosed in the versatile video coding (VVC) standard. In addition, the methods / embodiments disclosed in this specification can be applied to methods disclosed in the essential video coding (EVC) standard, the AOMedia Video 1 (AV1) standard, the second generation of audio video coding standard (AVN2), or the next generation of video / image coding standards (e.g., H.267 or H.268).
[0041] This specification presents various embodiments of video / image coding, and unless otherwise stated, the embodiments may be performed in combination with each other.
[0042] In this specification, a video may refer to a set of images over time. A picture generally refers to a unit representing one image at a specific time point, and a slice / tile is a unit that constitutes part of a picture in coding. A slice / tile may include one or more coding tree units (CTUs). A picture may be composed of one or more slices / tiles. A tile is a rectangular area consisting of multiple CTUs within a specific tile column and a specific tile row of a picture. A tile column is a rectangular area of CTUs that has a height equal to the height of the picture and a width specified by the syntax requirements of the picture parameter set. A tile row is a rectangular area of CTUs that has a height specified by the picture parameter set and a width equal to the width of the picture. CTUs within a tile are arranged consecutively according to the CTU raster scan, while tiles within a picture may be arranged consecutively according to the tile raster scan. A slice may contain an integer number of complete tiles or an integer number of contiguous complete CTU rows within a picture, which may be exclusively contained within a single NAL unit. Meanwhile, a picture may be divided into two or more subpictures. A subpicture may be a rectangular region of one or more slices within a picture.
[0043] A pixel, or pel, can refer to the smallest unit that constitutes a picture (or image). Additionally, the term "sample" can be used as a counterpart to a pixel. A sample can generally represent a pixel or a pixel value, and can represent only the pixel / pixel value of the luminance component, or only the pixel / pixel value of the chrominance component.
[0044] A unit may represent a basic unit of image processing. A unit may include at least one of a specific region of a picture and information related to the region. One unit may include one luma block and two chroma (e.g., cb, cr) blocks. In some cases, the term "unit" may be used interchangeably with terms such as "block" or "area." In general, an MxN block may include a set (or array) of samples (or sample array) or transform coefficients consisting of M columns and N rows.
[0045] As used herein, "A or B" can mean "only A," "only B," 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 "only A," "only B," "only C," or "any combination of A, B and C."
[0046] As used herein, a slash ( / ) or a comma can mean "and / or." For example, "A / B" can mean "A and / or B." Accordingly, "A / B" can mean "only A," "only B," or "both A and B." For example, "A, B, C" can mean "A, B, or C."
[0047] In this specification, "at least one of A and B" may mean "only A", "only B" or "both A and B". Additionally, in this specification, the expressions "at least one of A or B" or "at least one of A and / or B" may be interpreted identically to "at least one of A and B".
[0048] Additionally, in this specification, “at least one of A, B and C” can mean “only A,” “only B,” “only C,” or “any combination of A, B and C.” Additionally, “at least one of A, B or C” or “at least one of A, B and / or C” can mean “at least one of A, B and C.”
[0049] Additionally, parentheses used herein may mean "for example." Specifically, when "prediction (intra-prediction)" is indicated, "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, even when "prediction (i.e., intra-prediction)" is indicated, "intra-prediction" may be suggested as an example of "prediction."
[0050] Technical features individually described in a single drawing in this specification may be implemented individually or simultaneously.
[0051] FIG. 1 illustrates a video / image coding system according to the present disclosure.
[0052] Referring to FIG. 1, a video / image coding system may include a first device (source device) and a second device (receiving device).
[0053] 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 device. The receiving device may include a receiving device, a decoding device, and a renderer. The encoding device may be referred to as a video / image encoding device, and the decoding device may be referred to as a video / image decoding device. The transmitter may be included in the encoding device. The receiver may be included in the decoding device. The renderer may include a display unit, and the display unit may be configured as a separate device or an external component.
[0054] A video source may obtain video / images through a process of capturing, synthesizing, or generating video / images. The video source may include a video / image capture device and / or a video / image generation device. The video / image capture device may include one or more cameras, a video / image archive containing previously captured video / images, etc. The video / image generation device may include a computer, a tablet, a smartphone, etc., and may (electronically) generate video / images. For example, a virtual video / image may be generated through a computer, etc., in which case the video / image capture process may be replaced by a process of generating related data.
[0055] An encoding device can encode input video / images. The encoding device can perform a series of procedures, such as prediction, transformation, and quantization, to improve compression and coding efficiency. The encoded data (encoded video / image information) can be output in the form of a bitstream.
[0056] The transmission unit can transmit encoded video / image information or data output in the form of a bitstream to the receiving unit of a receiving device via a digital storage medium or 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 transmission unit can include an element for generating a media file via a predetermined file format and an element for transmission via a broadcasting / communication network. The receiving unit can receive / extract the bitstream and transmit it to a decoding device.
[0057] The decoding device can decode the video / image by performing a series of procedures such as inverse quantization, inverse transformation, and prediction corresponding to the operation of the encoding device.
[0058] The renderer can render decoded video / images. The rendered video / images can be displayed through the display unit.
[0059] FIG. 2 is a schematic block diagram of an encoding device to which an embodiment of the present disclosure can be applied and in which encoding of a video / image signal is performed.
[0060] Referring to FIG. 2, the encoding device (200) may be configured to include an image partitioner (210), a prediction unit (predictor) 220, a residual processor (residual processor) 230, an entropy encoder (entropy encoder) 240, an adder (adder) 250, a filter (filter) 260, and a memory (memory) 270. The prediction unit (220) may include an inter prediction unit (221) and an intra prediction unit (222). The residual processor (230) may include a transformer (transformer) 232, a quantizer (quantizer) 233, a dequantizer (dequantizer) 234, and an inverse transformer (inverse transformer) 235. The residual processing unit (230) may further include a subtractor (231). The addition unit (250) may be called a reconstructor or a recontructed block generator. The image segmentation unit (210), the prediction unit (220), the residual processing unit (230), the entropy encoding unit (240), the addition unit (250), and the filtering unit (260) described above may be configured by one or more hardware components (e.g., an encoding device chipset or processor) according to an embodiment. In addition, the memory (270) may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware component may further include the memory (270) as an internal / external component.
[0061] The image segmentation unit (210) can segment an input image (or picture, frame) input to the encoding device (200) into one or more processing units. For example, the processing unit may be called a coding unit (CU). In this case, the coding unit may be recursively segmented from a coding tree unit (CTU) or a largest coding unit (LCU) according to a QTBTTT (Quad-tree binary-tree ternary-tree) structure.
[0062] For example, a single coding unit may be split into multiple coding units with deeper depths based on a quad-tree structure, a binary tree structure, and / or a ternary structure. In this case, for example, the quad-tree structure may be applied first, and the binary tree structure and / or the ternary structure may be applied later. Alternatively, the binary tree structure may be applied before the quad-tree structure. The coding procedure according to the present specification may be performed based on the final coding unit that is no longer split. In this case, based on coding efficiency according to image characteristics, etc., the largest coding unit may be used directly as the final coding unit, or, if necessary, the coding unit may be recursively split 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.
[0063] As another example, the processing unit may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may each be split or partitioned from the final coding unit described above. The prediction unit may be a unit of sample prediction, and the transform unit may be a unit for deriving a transform coefficient and / or a unit for deriving a residual signal from a transform coefficient.
[0064] The term "unit" may be used interchangeably with terms such as "block" or "area" depending on the case. In general, an MxN block can represent a set of samples or transform coefficients consisting of M columns and N rows. A sample can generally represent a pixel or a pixel value, and can represent only the pixel / pixel value of the luminance component, or only the pixel / pixel value of the chrominance component. A sample can be used as a term corresponding to a pixel or pel in a picture (or image).
[0065] The encoding device (200) can generate a residual signal (residual block, residual sample array) by subtracting a prediction signal (prediction block, prediction sample array) output from an inter prediction unit (221) or an intra prediction unit (222) from an input video signal (original block, original sample array), and the generated residual signal is transmitted to a conversion unit (232). In this case, a unit that subtracts a prediction signal (prediction block, prediction sample array) from an input video signal (original block, original sample array) within the encoding device (200) may be called a subtraction unit (231).
[0066] The prediction unit (220) can perform a prediction on a block to be processed (hereinafter, referred to as a current block) and generate a predicted block including prediction samples for the current block. The prediction unit (220) can determine whether intra prediction or inter prediction is applied on a current block or CU basis. The prediction unit (220) can generate various information related to prediction, such as prediction mode information, as described later in the description of each prediction mode, and transmit the information to the entropy encoding unit (240). The information related to prediction can be encoded by the entropy encoding unit (240) and output in the form of a bitstream.
[0067] The intra prediction unit (222) can predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located a certain distance away from the current block depending on the prediction mode. In intra prediction, the prediction modes may include one or more non-directional modes and multiple directional modes. The non-directional mode may include at least one of a DC mode or a planar mode. The directional mode may include 33 directional modes or 65 directional modes depending on the degree of detail in the prediction direction. However, this is only an example, and a greater or lesser number of directional modes may be used depending on the settings. The intra prediction unit (222) may also determine the prediction mode applied to the current block by using the prediction mode applied to the template region.
[0068] The inter prediction unit (221) can derive a prediction block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information can be predicted in units of blocks, subblocks, or samples based on the correlation of the motion information between the template region and the current block. The motion information can include a motion vector and a reference picture index. The motion information can further include inter prediction direction information (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the template region can include a spatial template region (spatial neighboring block) existing in the current picture and a temporal template region (temporal neighboring block) existing in the reference picture. The reference picture including the reference block and the reference picture including the temporal template region may be the same or different. The temporal template region may be called a collocated reference block, a collocated CU (colCU), etc., and a reference picture including the temporal template region may be called a collocated picture (colPic). For example, the inter prediction unit (221) may configure a motion information candidate list based on template regions, and generate information indicating which candidate is used to derive the motion vector and / or reference picture index of the current block. Inter prediction may be performed based on various prediction modes, and for example, in the case of skip mode and merge mode, the inter prediction unit (221) may use the motion information of the template region as the motion information of the current block. In the case of skip mode, unlike the merge mode, a residual signal may not be transmitted.In the motion vector prediction (MVP) mode, the motion vector of the template area is used as a motion vector predictor, and the motion vector of the current block can be indicated by signaling the motion vector difference.
[0069] The prediction unit (220) can generate a prediction signal based on various prediction methods described below. For example, the prediction unit can apply intra prediction or inter prediction for prediction of a single block, and can also apply intra prediction and inter prediction simultaneously. This can be called combined inter and intra prediction (CIIP) mode. In addition, the prediction unit can be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block. The IBC prediction mode or palette mode can be used for content image / video coding such as games, such as screen content coding (SCC). IBC basically performs prediction within the current picture, but can be performed similarly to inter prediction in that it derives a reference block within the current picture. That is, IBC can utilize at least one of the inter prediction techniques described herein. Palette mode can be viewed as an example of intra coding or intra prediction. When the palette mode is applied, sample values within a picture can be signaled based on information about the palette table and palette index. The prediction signal generated through the prediction unit (220) can be used to generate a restoration signal or a residual signal.
[0070] The transform unit (232) can apply a transform technique to the residual signal to generate transform coefficients. For example, the transform technique can include at least one of a Discrete Cosine Transform (DCT), a Discrete Sine Transform (DST), a Karhunen-Loeve Transform (KLT), a Graph-Based Transform (GBT), or a Conditionally Non-linear Transform (CNT). Here, GBT refers to a transform obtained from a graph when the relationship information between pixels is expressed as a graph. CNT refers to a transform obtained based on generating a prediction signal using all previously restored pixels. In addition, the transform process can be applied to a pixel block having a square size and the same size, or can be applied to a block of a non-square variable size.
[0071] The quantization unit (233) quantizes the transform coefficients and transmits them to the entropy encoding unit (240), and the entropy encoding unit (240) can encode the quantized signal (information about the quantized transform coefficients) and output it as a bitstream. The information about the quantized transform coefficients can be called residual information. The quantization unit (233) can rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on the coefficient scan order, and can also generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form.
[0072] 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 also encode information necessary for video / image restoration (e.g., values of syntax elements, etc.) together or separately from quantized transform coefficients.
[0073] Encoded information (e.g., encoded video / image information) can be transmitted or stored in the form of a bitstream in units of NAL (network abstraction layer) units. The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may further include general constraint information. In the present specification, information and / or syntax elements transmitted / signaled from an encoding device to a decoding device may be included in the video / image information. The video / image information may be encoded through the above-described encoding procedure and included in the bitstream. The bitstream may be transmitted via a network or stored in a digital storage medium. Here, the network may include a broadcasting network and / or a communication network, and the digital storage medium may include various storage media, such as a USB, SD, CD, DVD, Blu-ray, HDD, or SSD. The signal output from the entropy encoding unit (240) may be configured as an internal / external element of the encoding device (200) by a transmitting unit (not shown) and / or a storing unit (not shown), or the transmitting unit may be included in the entropy encoding unit (240).
[0074] The quantized transform coefficients output from the quantization unit (233) can be used to generate a prediction signal. For example, by applying inverse quantization and inverse transformation to the quantized transform coefficients through the inverse quantization unit (234) and the inverse transform unit (235), a residual signal (residual block or residual samples) can be restored. The addition unit (250) can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed residual signal to the prediction signal output from the inter prediction unit (221) or the intra prediction unit (222). When there is no residual for the block to be processed, such as when skip mode is applied, the predicted block can be used as a reconstructed block. The addition unit (250) may be called a restoration unit or a reconstructed block generation unit. The generated restoration signal can be used for intra prediction of the next processing target block within the current picture, and can also be used for inter prediction of the next picture after filtering as described below. Meanwhile, LMCS (luma mapping with chroma scaling) may be applied during the picture encoding and / or restoration process.
[0075] The filtering unit (260) can improve subjective / objective picture quality by applying filtering to the restoration signal. For example, the filtering unit (260) can apply various filtering methods to the restoration picture to generate a modified restoration picture, and store the modified restoration picture in the memory (270), specifically, in the DPB of the memory (270). The various filtering methods can include deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc. The filtering unit (260) can generate various information regarding filtering and transmit it to the entropy encoding unit (240). The information regarding filtering can be encoded by the entropy encoding unit (240) and output in the form of a bitstream.
[0076] The modified restored picture transmitted to the memory (270) can be used as a reference picture in the inter prediction unit (221). Through this, when inter prediction is applied, the encoding device can avoid prediction mismatch between the encoding device (200) and the decoding device, and can also improve encoding efficiency.
[0077] The DPB of the memory (270) can store the modified restored picture to be used as a reference picture in the inter prediction unit (221). The memory (270) can store motion information of a block from which motion information in the current picture is derived (or encoded) and / or motion information of blocks in an already restored picture. The stored motion information can be transferred to the inter prediction unit (221) to be used as motion information in a spatial template area or motion information in a temporal template area. The memory (270) can store restored samples of restored blocks in the current picture and transfer them to the intra prediction unit (222).
[0078] FIG. 3 is a schematic block diagram of a decoding device to which an embodiment of the present disclosure can be applied and in which decoding of a video / image signal is performed.
[0079] Referring to FIG. 3, the decoding device (300) may be configured to include an entropy decoder (310), a residual processor (320), a predictor (330), an adder (340), a filter (350), and a memory (360). The predictor (330) may include an inter-prediction unit (332) and an intra-prediction unit (331). The residual processor (320) may include a dequantizer (321) and an inverse transformer (321).
[0080] The entropy decoding unit (310), residual processing unit (320), prediction unit (330), addition unit (340), and filtering unit (350) described above may be configured by a single hardware component (e.g., a decoding device chipset or processor) depending on the embodiment. In addition, the memory (360) may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware component may further include the memory (360) as an internal / external component.
[0081] When a bitstream including video / image information is input, the decoding device (300) can restore the image corresponding to the process in which the video / image information is processed in the encoding device of FIG. 2. For example, the decoding device (300) can derive units / blocks based on block division-related information obtained from the bitstream. The decoding device (300) can perform decoding using a processing unit applied in the encoding device. Accordingly, the processing unit for decoding may be a coding unit, and the coding unit may be divided from a coding tree unit or a maximum coding unit according to a quad tree structure, a binary tree structure, and / or a ternary tree structure. One or more transform units may be derived from the coding unit. Then, the restored image signal decoded and output by the decoding device (300) can be reproduced through a reproduction device.
[0082] The decoding device (300) can receive a signal output from the encoding device of FIG. 2 in the form of a bitstream, and the received signal can be decoded through the entropy decoding unit (310). For example, the entropy decoding unit (310) can parse the bitstream to derive information (e.g., video / image information) necessary for image restoration (or picture restoration). The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may further include general constraint information. The decoding device can decode the picture further based on the information on the parameter set and / or the general constraint information. The signaling / received information and / or syntax elements described later in this specification can be decoded through the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit (310) can decode information in a bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output the values of syntax elements required for image restoration and the quantized values of transform coefficients for residuals. More specifically, the CABAC entropy decoding method receives a bin corresponding to each syntax element in the bitstream, determines a context model using information of the syntax element to be decoded and decoding information of the surrounding and decoding target blocks or information of symbols / bins decoded in the previous step, and predicts the occurrence probability of the bin according to the determined context model to perform arithmetic decoding of the bin to generate a symbol corresponding to the value of each syntax element.At this time, the CABAC entropy decoding method can update the context model using the information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model. Information regarding prediction among the information decoded by the entropy decoding unit (310) is provided to the prediction unit (inter prediction unit (332) and intra prediction unit (331)), and residual values on which entropy decoding is performed by the entropy decoding unit (310), i.e., quantized transform coefficients and related parameter information, can be input to the residual processing unit (320). The residual processing unit (320) can derive a residual signal (residual block, residual samples, residual sample array). In addition, information regarding filtering among the information decoded by the entropy decoding unit (310) can be provided to the filtering unit (350). Meanwhile, a receiving unit (not shown) that receives a signal output from an encoding device may be further configured as an internal / external element of a decoding device (300), or the receiving unit may be a component of an entropy decoding unit (310).
[0083] Meanwhile, a decoding device according to the present specification may be called a video / video / picture decoding device, and the decoding device may be divided into an information decoding device (video / video / picture information decoding device) and a sample decoding device (video / video / picture sample decoding device). The information decoding device may include the entropy decoding unit (310), and the sample decoding device may include at least one of the inverse quantization unit (321), the inverse transformation unit (322), the adding unit (340), the filtering unit (350), the memory (360), the inter prediction unit (332), and the intra prediction unit (331).
[0084] The inverse quantization unit (321) can inverse quantize the quantized transform coefficients and output the transform coefficients. The inverse quantization unit (321) can rearrange the quantized transform coefficients into a two-dimensional block form. In this case, the rearrangement can be performed based on the coefficient scanning order performed in the encoding device. The inverse quantization unit (321) can perform inverse quantization on the quantized transform coefficients using quantization parameters (e.g., quantization step size information) and obtain transform coefficients.
[0085] In the inverse transform unit (322), the transform coefficients are inversely transformed to obtain a residual signal (residual block, residual sample array).
[0086] The prediction unit (320) can perform a prediction on the current block and generate a predicted block including prediction samples for the current block. The prediction unit (320) can determine whether intra-prediction or inter-prediction is applied to the current block based on the information regarding the prediction output from the entropy decoding unit (310), and can determine a specific intra / inter-prediction mode.
[0087] The prediction unit (320) can generate a prediction signal based on various prediction methods described below. For example, the prediction unit (320) can apply intra prediction or inter prediction for prediction of a single block, and can also apply intra prediction and inter prediction simultaneously. This can be called combined inter and intra prediction (CIIP) mode. In addition, the prediction unit can be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block. The IBC prediction mode or palette mode can be used for content image / video coding such as games, such as screen content coding (SCC). IBC basically performs prediction within the current picture, but can be performed similarly to inter prediction in that it derives a reference block within the current picture. That is, IBC can utilize at least one of the inter prediction techniques described herein. Palette mode can be viewed as an example of intra coding or intra prediction. When palette mode is applied, information about the palette table and palette index may be included and signaled in the video / image information.
[0088] The intra prediction unit (331) can predict the current block by referring to samples within the current picture. The referenced samples may be located in the neighborhood of the current block, or may be located a certain distance away from the current block, depending on the prediction mode. In intra prediction, the prediction modes may include one or more non-directional modes and multiple directional modes. The intra prediction unit (331) may also determine the prediction mode applied to the current block by using the prediction mode applied to the template region.
[0089] The inter prediction unit (332) can derive a prediction block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information can be predicted in units of blocks, subblocks, or samples based on the correlation of the motion information between the template region and the current block. The motion information can include a motion vector and a reference picture index. The motion information can further include inter prediction direction information (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the template region can include a spatial template region (spatial neighboring block) existing in the current picture and a temporal template region (temporal neighboring block) existing in the reference picture. For example, the inter prediction unit (332) can construct a motion information candidate list based on the template regions, and derive the motion vector and / or reference picture index of the current block based on the received candidate selection information. Inter prediction can be performed based on various prediction modes, and information about the prediction can include information indicating an inter prediction mode for the current block.
[0090] The addition unit (340) can generate a restoration signal (restored picture, restoration block, restoration sample array) by adding the acquired residual signal to the prediction signal (prediction block, prediction sample array) output from the prediction unit (including the inter-prediction unit (332) and / or intra-prediction unit (331)). When there is no residual for the block to be processed, such as when skip mode is applied, the prediction block can be used as the restoration block.
[0091] The addition unit (340) may be referred to as a restoration unit or restoration block generation unit. The generated restoration signal may be used for intra prediction of the next processing target block within the current picture, may be output after filtering as described below, or may be used for inter prediction of the next picture. Meanwhile, LMCS (luma mapping with chroma scaling) may be applied during the picture decoding process.
[0092] The filtering unit (350) can improve subjective / objective image quality by applying filtering to the restored signal. For example, the filtering unit (350) can apply various filtering methods to the restored picture to generate a modified restored picture, and transmit the modified restored picture to the memory (360), specifically, to the DPB of the memory (360). The various filtering methods can include deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.
[0093] The (modified) reconstructed picture stored in the DPB of the memory (360) can be used as a reference picture in the inter prediction unit (332). The memory (360) can store motion information of a block from which motion information is derived (or decoded) in the current picture and / or motion information of blocks in an already reconstructed picture. The stored motion information can be transferred to the inter prediction unit (332) to be used as motion information of a spatial template area or motion information of a temporal template area. The memory (360) can store reconstructed samples of reconstructed blocks in the current picture and transfer them to the intra prediction unit (331).
[0094] In this specification, the embodiments described in the filtering unit (260), the inter prediction unit (221), and the intra prediction unit (222) of the encoding device (200) can be applied to the filtering unit (350), the inter prediction unit (332), and the intra prediction unit (331) of the decoding device (300) in the same or corresponding manner, respectively.
[0095] FIG. 4 illustrates an image decoding method performed by a decoding device (300) as an embodiment according to the present disclosure.
[0096] Referring to FIG. 4, one or more derived intra prediction modes (DIPMs) can be derived for the current block (S400).
[0097] The DIPM according to the present disclosure can be derived based on pre-restored sample values belonging to the surrounding area of the current block. The DIPM according to the present disclosure may also be referred to as a virtual intra prediction mode (VIPM). The DIPM may be used as a candidate mode for deriving the intra prediction mode of the current block, or may be set as the intra prediction mode of the current block.
[0098] Example 1
[0099] DIPM can be a mode derived based on the gradient of pre-reconstructed sample values within the template region of the current block. DIPM can be derived by determining the similarity between the distribution of pre-reconstructed sample values within the template region of the current block and the directionality of each intra prediction mode. To determine the similarity between the distribution of sample values and the directionality of the intra prediction mode, a predetermined filter can be applied to the sample values within the template region.
[0100] For example, a gradient of sample values can be derived based on the ratio of horizontal and vertical changes. The derived gradient can be mapped to the most similar intra prediction mode. An amplitude value corresponding to the gradient can be assigned to the mapped intra prediction mode. This process can be applied to sample values within the template region while moving horizontally and / or vertically, and a final accumulated amplitude value can be obtained for each intra prediction mode. Here, the amplitude value can be defined as the sum of the magnitude of the horizontal change and the magnitude of the vertical change. The top N intra prediction mode(s) in descending order of amplitude value can be set as DIPM(s).
[0101] A template region according to the present disclosure may refer to a region for inducing DIPM. One or more template regions may be defined for a current block. For example, an upper region (A) adjacent to the current block may be used as a template region. A left region (L) adjacent to the current block may be used as a template region. An upper left region (AL) adjacent to the current block may be used as a template region. An upper right region (AR) adjacent to the current block may be used as a template region. A lower left region (LB) adjacent to the current block may be used as a template region. Regions including the aforementioned A, L, AL, AR, and LB may be used as template regions, or a region composed of a combination of at least two of A, L, AL, AR, or LB may be used as a template region.
[0102] Assume that the width and height of the current block are W and H. At this time, the width and height of the upper area are W A Wow H A It can be. The width and height of the upper right area are W AR Wow H A It can be. The width and height of the upper left area are WL Wow H A It can be. The width and height of the left area are W L Wow H L It can be. The width and height of the lower left area are W L Wow H LB It can be. Here, W A may be an integer less than or equal to W. W AR can be an integer less than or equal to W. H A can be an integer of 1, 2, 3 or more. H L may be an integer less than or equal to H. H LB may be an integer less than or equal to H. W L can be an integer of 1, 2, 3 or more.
[0103] The template region can be pre-defined in the encoding and decoding devices, or the template region can be explicitly signaled.
[0104] The size of the template area may vary depending on the current block size. A smaller template area may be used for smaller blocks, and a larger template area may be used for larger blocks.
[0105] For example, if the current block is a 4x4 block, a region consisting of at least one of AL, A, or L can be used as a template region. If the current block is not a 4x4 block, a region including AL, A, AR, L, and LB can be used as a template region. Since the computational complexity required in the process of applying DIPM is directly related to the size of the template region, a template region of a relatively small size can be used for small blocks to reduce the computational complexity required for each sample.
[0106] If there are unavailable samples within the template region described above, the template region may not be used. Alternatively, if some samples within the template region are unavailable, only the available samples may be used. If a sample in an area adjacent to the current block exceeds the picture boundary, the sample may be determined to be an unavailable sample. If a sample in an area adjacent to the current block belongs to at least one slice, tile, or coding tree unit (CTU) different from the current block, the sample may be determined to be an unavailable sample. If a sample in an area adjacent to the current block exists beyond a virtual boundary, the sample may be determined to be an unavailable sample.
[0107] H, which determines the sizes of A, AR, L, LB, and AL, taking into account the shape of the current block (e.g., the ratio of width to height). A Wow W L The size of H can be determined differently. For example, for a 32x4 block, a relatively small value of H is used to minimize the computational complexity and memory increase required for the DIPM derivation process. A can be used and have relatively large values of W L can be used. For example, H A can be 3, W L can be 4. This is just an example, and H can be based on other values and / or other conditions. A Wow W L The size of may be determined.
[0108] H, which determines the sizes of A, AR, L, LB, and AL based on the size of the current block (e.g., the product of width and height). A Wow W L The size of H can be determined differently. For example, if the size of the current block is greater than or equal to 256, H A can be 4, W Lcan be 4. Or, if the current block size is less than or equal to 64, H A can be 3, W L can be 3. This is just an example, and H can be based on other values and / or other conditions. A Wow W L The size of may be determined.
[0109] A combination of the above-described embodiments may also be possible. For example, if the current block size is 16, an area consisting of at least one of AL, A, or L may be used as a template area, and H A Wow W L can be 3 each. Or, if the size of the current block is 256, the area including AL, A, AR, L and LB can be used as a template area, and H A Wow W L can be 4 each. Alternatively, if the current block is a 4x16 block, the area including AL, A, AR, L and LB can be used as a template area, and H A can be 4, W L It can be 3 days.
[0110] The above-described embodiment has the heights of AL, A, and AR being H A , and the width of AL, L and LB is W L It relates to the same case. However, it is not limited thereto, and at least one of AL, A, or AR may have a different height from the other. At least one of AL, L, or LB may have a different width from the other.
[0111] In the process of obtaining the accumulated amplitude value for each intra prediction mode, when applying a differentiation filter, the amplitude value can be obtained by moving the sample value within the template region in the vertical or horizontal direction by 1 sample unit. The directionality within the template region may be determined in units of M samples rather than being precisely determined in units of samples. In order to reduce unnecessary computational complexity, a differentiation filter may be applied in units of M samples in the process of obtaining the amplitude value in the vertical or horizontal direction. Here, M may be an integer greater than or equal to 2. Alternatively, the sample unit to which the differentiation filter is applied may be determined differently depending on the location of the region constituting the template region. For example, a filter may be applied in units of 2 samples in A, AR, L, or LB, and a filter may be applied in units of 1 sample in AL.
[0112] A Sobel filter can be used as a differential filter to obtain the amount of change in the horizontal direction and the amount of change in the vertical direction. For example, a horizontal differential filter M x and vertical differential filter M y can be as follows: mathematical equations 1 to 3.
[0113] [Mathematical Formula 1]
[0114]
[0115] [Equation 2]
[0116]
[0117] [Equation 3]
[0118]
[0119] The differential filters in Equations 1 to 3 are merely examples, and other filters may be applied to determine the amount of variation in sample values. In addition to Equations 1 to 3, differential filters with different differential sizes and filter coefficients may also be used.
[0120] Information indicating a differential filter may be signaled. For example, any one of the differential filters in Equations 1 to 3 may be used based on the signaled information.
[0121] Alternatively, a predefined differential filter may be used in the encoding device and the decoding device without signaling information indicating the differential filter. For example, the differential filter of Equation 1 may be defined as being used. Alternatively, the differential filter of Equation 2 may be defined as being used. Alternatively, the differential filter of Equation 3 may be defined as being used.
[0122] The differential filter can be adaptively determined based on the size of the current block. For example, if the size of the current block is greater than or equal to 64, the differential filter of Equation 1 can be used, and otherwise, the differential filter of Equation 2 or 3 can be used.
[0123] Edges with abrupt brightness changes in the sample distribution within the template region can help predict directionality. Therefore, before calculating the amplitude values for each intra prediction mode, a sharpening filter can be applied to samples within the template region to emphasize the edges. For example, a 3x3 sharpening filter (F) can be expressed as follows:
[0124] [Equation 4]
[0125]
[0126] The DIPM according to the present disclosure can be derived based on one or more template regions defined for the current block. Various DIPMs can be derived depending on which template region is used. For example, the following DIPMs can be derived based on the template region.
[0127] - Mode(1) All , Mode(2) All , Mode(3)All , Mode(4) All ,...
[0128] - Mode(1) L , Mode(2) L , Mode(3) L , Mode(4) L ,...
[0129] - Mode(1) L+LB , Mode(2) L+LB , Mode(3) L+LB , Mode(4) L+LB ,...
[0130] - Mode(1) L+LB+AL , Mode(2) L+LB+AL , Mode(3) L+LB+AL , Mode(4) L+LB+AL ,...
[0131] - Mode(1) A , Mode(2) A , Mode(3) A , Mode(4) A ,...
[0132] - Mode(1) A+AR , Mode(2) A+AR , Mode(3) A+AR , Mode(4) A+AR ,...
[0133] - Mode(1) A+AR+AL , Mode(2) A+AR+AL , Mode(3) A+AR+AL , Mode(4) A+AR+AL ,...
[0134] - Mode(1) AL , Mode(2) AL , Mode(3) AL , Mode(4) AL ,...
[0135] Here, Mode(K) All can mean a DIPM derived using the area including AL, A, AR, L, and LB as a template area. Mode(K) Lcan mean DIPM derived using L as template region. Mode(K) L+LB can mean a DIPM derived using the area including L and LB as a template area. Mode(K) L+LB+AL can mean a DIPM derived using the area including L, LB, and AL as a template area. Mode(K) A can mean DIPM derived using A as a template region. Mode(K) A+AR can mean a DIPM derived using the area including A and AR as a template area. Mode(K) A+AR+AL can mean a DIPM derived using the area including A, AR, and AL as a template area. Mode(K) AL may refer to a DIPM derived using AL as a template region. In addition, it goes without saying that a DIPM may be derived using a region including at least one of AL, A, AR, L, or LB as a template region. Mode(K) may refer to the Kth DIPM in descending order of amplitude value among the DIPMs derived based on the template region.
[0136] If a determined template region includes three regions (e.g., AL, A, and L), only template regions defined by a combination of one or more of the three regions (e.g., AL+A, AL+L, AL+A+L, etc.) may be allowed. Furthermore, if some samples are not available in a specific template region, it is natural that those samples will not be available either.
[0137] Based on the template area with the sharpening filter applied, the following DIPM can be derived.
[0138] - F_Mode(1) All , F_Mode(2) All , F_Mode(3) All, F_Mode(4) All ,...
[0139] - F_Mode(1) L , F_Mode(2) L , F_Mode(3) L , F_Mode(4) L ,...
[0140] - F_Mode(1) L+LB , F_Mode(2) L+LB , F_Mode(3) L+LB , F_Mode(4) L+LB ,...
[0141] - F_Mode(1) L+LB+AL , F_Mode(2) L+LB+AL , F_Mode(3) L+LB+AL , F_Mode(4) L+LB+AL ,...
[0142] - F_Mode(1) A , F_Mode(2) A , F_Mode(3) A , F_Mode(4) A ,...
[0143] - F_Mode(1) A+AR , F_Mode(2) A+AR , F_Mode(3) A+AR , F_Mode(4) A+AR ,...
[0144] - F_Mode(1) A+AR+AL , F_Mode(2) A+AR+AL , F_Mode(3) A+AR+AL , F_Mode(4) A+AR+AL ,...
[0145] - F_Mode(1) AL , F_Mode(2) AL , F_Mode(3) AL , F_Mode(4) AL ,...
[0146] 여기서, F_Mode(K) Allmay mean a DIPM derived using the areas including AL, A, AR, L, and LB as template areas. F_Mode(K) L can mean DIPM derived using L as template area. F_Mode(K) L+LB can mean a DIPM derived using the area including L and LB as a template area. F_Mode(K) L+LB+AL can mean a DIPM derived using the area including L, LB, and AL as a template area. F_Mode(K) A can mean DIPM derived using A as template area. F_Mode(K) A+AR can mean a DIPM derived using the area including A and AR as a template area. F_Mode(K) A+AR+AL can mean a DIPM derived using the area including A, AR, and AL as a template area. F_Mode(K) AL may refer to a DIPM derived using AL as a template region. In addition, it goes without saying that a DIPM may be derived using a region including at least one of AL, A, AR, L, or LB as a template region. F_Mode(K) may refer to the Kth DIPM in descending order of amplitude value among the DIPMs derived based on the template region.
[0147] If a determined template region includes three regions (e.g., AL, A, and L), only template regions defined by a combination of one or more of the three regions (e.g., AL+A, AL+L, AL+A+L, etc.) may be allowed. Furthermore, if some samples are not available in a specific template region, it is natural that those samples will not be available either.
[0148] Example 2
[0149] This embodiment describes a method for deriving a non-directional mode into a DIPM. Conventional DIPM derivation methods have limitations in deriving non-directional modes such as planar mode and DC mode. Non-directional modes derived from surrounding information of the current block can be used to determine the intra prediction mode and / or transformation kernel of the current block.
[0150] When the variation between samples is small, a non-directional mode is more likely to be selected. For example, DC mode generates a predicted block based on the average value of the reference samples. If the variation between reference samples is large, each reference sample will differ significantly from the average, and an intra prediction mode other than DC mode is more likely to be selected. Considering this tendency, the non-directional mode can be derived as DIPM.
[0151] If the mean absolute deviation (MAD) of the reconstructed samples within the surrounding area adjacent to the current block is less than a threshold, a non-directional mode may be induced as DIPM. Otherwise, the non-directional mode may not be induced as DIPM. The MAD may be induced based on a predetermined reference value. Here, the reference value is a value for inducing a deviation from the reconstructed samples, and may be induced based on at least one of the reconstructed samples.
[0152] For example, MAD can be derived as shown in the following mathematical expression 5.
[0153] [Equation 5]
[0154]
[0155] According to Equation 5, N pre-reconstructed samples (i.e., Rec0, ..., Rec (N-1) ) for the average (Avg Rec) can be obtained. For each of the restored samples, the absolute value of the difference between the restored sample and the mean value can be calculated, and the sum of the calculated absolute values can be divided by N to derive the MAD.
[0156] Equation 5 uses the mean of the reconstructed samples as a reference value to calculate the difference between the reconstructed samples and the reference value. However, this is merely an example. For example, the median of the reconstructed samples could be used as the reference value. Alternatively, the mode of the reconstructed samples could be used as the reference value. Alternatively, the maximum or minimum value among the reconstructed samples could be used as the reference value.
[0157] The threshold value may be a value that is identically predefined for both the encoding device and the decoding device. For example, the threshold value may be 10.
[0158] Alternatively, the threshold value may vary depending on the size of the current block. The smaller the block size, the greater the deviation of the samples. A relatively larger threshold value may be used for a smaller block size. In this way, by using different threshold values depending on the size of the current block, the non-directional mode can be induced into DIPM. For example, the threshold value for a 4x4 block may be 20. The threshold value for a 32x32 block may be 10. Conversely, a relatively smaller threshold value may be used for a larger block size. For example, the threshold value for a 4x4 block may be 10. The threshold value for a 32x32 block may be 20. This is just one example of how the threshold value is determined differently depending on the block size, and other pre-defined threshold values may be used in the encoding device and the decoding device.
[0159] Alternatively, the same threshold value can be used regardless of the current block size. For example, for a relatively small block, assume that N pre-reconstructed samples are used to derive the MAD. Similarly, for a relatively large block, the MAD can be derived by subsampling the same number (N) of pre-reconstructed samples from the surrounding area.
[0160] Alternatively, the threshold value may vary depending on the quantization parameter (QP). A smaller QP may result in a larger deviation between samples. Taking this into account, a larger threshold value may be set for a smaller QP. For example, if the QP is 22, the threshold value may be set to 20. If the QP is 27, the threshold value may be set to 15. If the QP is 32, the threshold value may be set to 10. If the QP is 37, the threshold value may be set to 5. This is just one example of how the threshold value is determined differently depending on the QP, and may also be determined as another threshold value pre-defined in the encoding device and the decoding device.
[0161] If MAD is less than or equal to a threshold, at least one of the planar mode or DC mode can be induced as DIPM. The non-directional mode induced as DIPM can be determined by a prior agreement between the encoding device and the decoding device. For example, if MAD is less than or equal to a threshold, the planar mode can be induced as DIPM. Alternatively, if MAD is less than or equal to a threshold, the DC mode can be induced as DIPM. Alternatively, if MAD is less than or equal to a threshold, both the planar mode and the DC mode can be induced as DIPM.
[0162] Even if the MAD is less than or equal to the threshold, either the planar mode or the DC mode may be selectively induced into DIPM.
[0163] For example, if MAD is less than or equal to the first value, the DC mode can be induced into DIPM, and if MAD is greater than the first value, the planar mode can be induced into DIPM. Here, the first value may be 5. However, the present invention is not limited thereto, and the first value may be set to another value that is identically predefined for the encoding device and the decoding device.
[0164] Alternatively, a flag indicating either planar mode or DC mode can be explicitly signaled. The mode selected by the flag can be induced by DIPM. The flag can be signaled if the MAD is less than or equal to the threshold, and not signaled otherwise.
[0165] Alternatively, if the MAD is less than or equal to the threshold, either the planar mode or the DC mode can be selectively induced as DIPM based on whether the width and height of the current block are the same. If the width and height of the blocks of the current block are different, the DC mode can be induced as DIPM. If the width and height of the blocks of the current block are the same, the planar mode can be induced as DIPM.
[0166] The pre-restored samples for inducing the above-described MAD may include at least one of a pre-restored sample of an upper area (A) adjacent to the current block, a pre-restored sample of a left area (L) adjacent to the current block, a pre-restored sample of an upper left area (AL) adjacent to the current block, a pre-restored sample of an upper right area (AR) adjacent to the current block, or a pre-restored sample of a lower left area (LB) in the current block.
[0167] Assume that the width and height of the current block are W and H. At this time, the width and height of the upper area are W A Wow H A It can be. The width and height of the upper right area are W AR Wow H AIt can be. The width and height of the upper left area are W L Wow H A It can be. The width and height of the left area are W L Wow H L It can be. The width and height of the lower left area are W L Wow H LB It can be. Here, W A may be an integer less than or equal to W. W AR can be an integer less than or equal to W. H A can be an integer of 1, 2, 3 or more. H L may be an integer less than or equal to H. H LB may be an integer less than or equal to H. W L can be an integer of 1, 2, 3 or more.
[0168] In the above example, the heights of AL, A, and AR are H A , and the width of AL, L, LB is W L , but is not limited thereto. At least one of AL, A, or AR may have a different height than the other. At least one of AL, L, or LB may have a different width than the other.
[0169] The size of the surrounding region for deriving MAD may be defined such that the number of samples belonging to that surrounding region is a power of 2.
[0170] In inducing a non-directional mode, a sufficient number of surrounding samples may be required to improve accuracy. Therefore, surrounding areas of the same location and / or size may be used, regardless of the size of the current block.
[0171] Depending on the size of the current block, different locations and / or sizes of surrounding regions may be utilized. Small blocks may utilize smaller surrounding regions, and large blocks may utilize larger surrounding regions. For example, for a 4x4 block, A and L may be utilized, and for non-4x4 blocks, A, AR, L, and LB may be utilized. Since the computational complexity required to induce non-directional modes is directly related to the size of the surrounding region, to reduce the computational complexity required for each sample, a relatively small surrounding region may be defined for small blocks.
[0172] H, which determines the size of the A, AR, L, LB, and AL areas based on the size of the current block. A Wow W L can be determined differently. For example, assume that the size of the current block is defined as the product of the width and the height. If the size of the current block is greater than or equal to 256, H A Wow W L can be determined as 4 each. If the size of the current block is less than or equal to 64, H A Wow W L Each can be determined as 2. The above examples are only examples and can be replaced with other values and / or other conditions.
[0173] If a surrounding region is located beyond a picture boundary, slice boundary, tile boundary, CTU boundary, or virtual boundary (i.e., if no pre-reconstructed sample is available for that surrounding region), that surrounding region may not be used for derivation of MAD.
[0174] In DC mode, prediction can be performed using only the left reference samples for blocks whose width is smaller than their height, and prediction can be performed using only the upper reference samples for blocks whose width is larger than their height. Considering that the reference samples used to generate a predicted block may vary depending on the block shape, the locations of the surrounding regions for deriving the MAD can be defined differently depending on the shape of the current block. For example, for blocks whose width is larger than their height (e.g., 32x4 blocks), the upper region can be used to derive the MAD. Conversely, for blocks whose height is larger than their width (e.g., 4x32 blocks), the left region can be used to derive the MAD.
[0175] The method for inducing a non-directional mode to DIPM according to the aforementioned embodiment 2 can be adaptively performed based on information signaled through a bitstream. The information can be signaled in a high-level syntax of the bitstream. The high-level syntax can include at least one of a VPS, an SPS, an APS, a PPS, a picture header, or a slice header. The information can indicate whether a non-directional mode including at least one of a planar mode or a DC mode is available as a DIPM. For example, when the value of the signaled information is 1, this can indicate that the non-directional mode is available as a DIPM. Based on the value of the signaled information being 1, the non-directional mode can be induced as a DIPM. On the other hand, when the value of the signaled information is not 1, this can indicate that the non-directional mode is not available as a DIPM. Based on the fact that the value of the signaled information is not 1, the non-directional mode may not be induced into DIPM, and DIPM may be induced based on the method according to Example 1.
[0176] Example 3
[0177] This embodiment relates to a method for deriving a non-directional mode using distribution information for each directional mode.
[0178] A predetermined filter can be applied to a sample belonging to a template area of a current block to derive horizontal and vertical variations in the sample. Based on the horizontal and vertical variations, a gradient (or angle) can be derived for the sample. A predetermined amplitude value can be assigned to a directional mode mapped to the gradient (or angle). Here, the amplitude value can be derived based on the horizontal and vertical variations. For example, the amplitude value can be defined as the sum of the magnitudes of the horizontal and vertical variations.
[0179] The above process can be performed by moving horizontally and / or vertically over all or part of the samples within the template region, thereby obtaining a final accumulated amplitude value for each directional mode.
[0180] If the (ultimately accumulated) amplitude value for the directional modes is less than or equal to a threshold, the non-directional mode may be induced into DIPM. Otherwise, the non-directional mode may not be induced into DIPM. Here, the threshold may be a fixed value pre-defined in the encoding device and the decoding device. For example, the threshold may be 10. Alternatively, the threshold may be determined based on at least one of the size of the current block or the quantization parameter. This is as discussed in Embodiment 2, and a duplicate description thereof will be omitted here.
[0181] Alternatively, even if there are multiple directional modes with amplitude values greater than a threshold value, if the amplitude values of the multiple directional modes are similar to each other, it can be determined that there is no distinct directionality. If the amplitude values of the multiple directional modes are similar to each other, a non-directional mode can be induced as a DIPM.
[0182] For example, if the difference between the maximum and minimum amplitude values of multiple directional modes is less than or equal to a certain threshold, the amplitude values of multiple directional modes may be determined to be similar to each other. In this case, a non-directional mode may be induced as a DIPM.
[0183] Alternatively, if the number of directional modes with similar amplitude values is P or more, the non-directional mode can be induced as a DIPM. Here, P can be an integer greater than or equal to 2. For example, P can be 5. However, the present invention is not limited thereto, and P can also be defined as another value pre-defined in the encoding device and the decoding device. Whether the amplitude values are similar to each other can be determined as follows.
[0184] If amplitude1 is greater than or equal to amplitude2 and (amplitude1-α) is less than or equal to amplitude2, amplitude1 and amplitude2 can be determined to be similar to each other. More generally, if the maximum value of the P amplitude values minus α is less than or equal to the remaining (P-1) amplitude values, the P amplitude values can be determined to be similar to each other. Here, α can be 10. However, this is only an example, and α can be set to another value pre-defined in the encoding device and the decoding device.
[0185] If amplitude1 is greater than or equal to amplitude2 and (β×amplitude1) is less than or equal to amplitude2, amplitude1 and amplitude2 can be determined to be similar to each other. More generally, if the maximum value among the P amplitude values multiplied by β is less than or equal to the remaining (P-1) amplitude values, the P amplitude values can be determined to be similar to each other. Here, β can be 0.9. However, this is only an example, and β can be set to another value pre-defined in the encoding device and the decoding device.
[0186] If the amplitude values for the plurality of directional modes are determined to be similar to each other, at least one of the planar mode or the DC mode can be induced as the DIPM. The non-directional mode induced as the DIPM can be determined by a prior agreement between the encoding device and the decoding device. For example, if the amplitude values for the plurality of directional modes are determined to be similar to each other, the planar mode can be induced as the DIPM. Alternatively, if the amplitude values for the plurality of directional modes are determined to be similar to each other, the DC mode can be induced as the DIPM. Alternatively, if the amplitude values for the plurality of directional modes are determined to be similar to each other, both the planar mode and the DC mode can be induced as the DIPM.
[0187] Even if the amplitude values for multiple directional modes are determined to be similar to each other, either the planar mode or the DC mode may be selectively induced into the DIPM.
[0188] For example, when a predetermined amplitude value is less than or equal to a first value, a DC mode can be induced into a DIPM, and when the predetermined amplitude value is greater than the first value, a planar mode can be induced into a DIPM. Here, the predetermined amplitude value can be defined as an average value, a median value, a minimum value, or a maximum value of amplitude values for a plurality of directional modes. Alternatively, the predetermined amplitude value can be understood as being replaced with amplitude values for a plurality of directional modes. The first value can be 5. However, the present invention is not limited thereto, and the first value can be set to another value that is predefined identically in the encoding device and the decoding device.
[0189] Alternatively, a flag indicating either the planar mode or the DC mode may be explicitly signaled. The mode selected by the flag may be induced by the DIPM. The flag may be signaled if the amplitude values for the multiple directional modes are determined to be similar to each other, and may not be signaled otherwise.
[0190] Example 4
[0191] This embodiment relates to a method for deriving DIPM using distribution information for non-directional modes and directional modes.
[0192] A predetermined filter can be applied to a sample belonging to a template area of a current block to derive a horizontal change amount and a vertical change amount in the corresponding sample. Based on the horizontal change amount and the vertical change amount, a slope (or angle) can be derived for the corresponding sample. A predetermined amplitude value can be assigned to a directional mode mapped to the slope (or angle). Here, the amplitude value can be derived based on the horizontal change amount and the vertical change amount. For example, the amplitude value can be defined as the sum of the magnitudes of the horizontal change amount and the vertical change amount. The above-described process can be performed by moving in the horizontal and / or vertical directions for all or part of the samples within the template area, thereby obtaining a final accumulated amplitude value for each directional mode.
[0193] Through the aforementioned method, for each sample to which a filter is applied, a directional mode mapped to it can be selected and a predetermined amplitude value can be assigned to the selected directional mode. In this case, if the amplitude value is less than or equal to a threshold value, the intra prediction mode mapped to the corresponding sample can be determined to be more similar to a non-directional mode than to a directional mode.
[0194] Accordingly, if the amplitude value is less than or equal to the threshold value, the amplitude value assigned to the directional mode can be additionally assigned to the non-directional mode. Otherwise, the amplitude value assigned to the directional mode may not be assigned to the non-directional mode. By assigning / accumulating the amplitude values for samples having amplitude values less than or equal to the threshold value to the non-directional mode, the final accumulated amplitude value for the non-directional mode can be obtained. Here, the threshold value may be a fixed value pre-defined in the encoding device and the decoding device. For example, the threshold value may be 10. However, this is only an example, and the threshold value may be set to another value pre-defined in the encoding device and the decoding device.
[0195] If the amplitude value assigned to the directional mode is less than or equal to a threshold value, the amplitude value may be assigned to at least one of the planar mode and the DC mode. The mode to which the amplitude value is assigned may be determined by a prior agreement between the encoding device and the decoding device. For example, if the amplitude value assigned to the directional mode is less than or equal to the threshold value, the amplitude value may be assigned to the planar mode. Alternatively, if the amplitude value assigned to the directional mode is less than or equal to the threshold value, the amplitude value may be assigned to the DC mode. Alternatively, if the amplitude value assigned to the directional mode is less than or equal to the threshold value, it may be assigned to both the planar mode and the DC mode.
[0196] If the amplitude value assigned to the directional mode is less than or equal to a threshold value, the amplitude value may be selectively assigned to either the planar mode or the DC mode.
[0197] For example, if the amplitude value assigned to the directional mode is less than or equal to the first value, the amplitude value may be assigned to the DC mode, and if the amplitude value assigned to the directional mode is greater than the first value, the amplitude value may be assigned to the planar mode. The first value may be 5. However, the present invention is not limited thereto, and the first value may be set to another value that is identically predefined for the encoding device and the decoding device.
[0198] Based on the slope (or angle) of a sample to which a filter is applied, the intra prediction mode to be mapped can be determined. In this case, if the magnitude of the horizontal change (|dx|) and the magnitude of the vertical change (|dy|) are very small, the intra prediction mode mapped to the sample can be determined to be more similar to a non-directional mode than a directional mode.
[0199] If at least one of the magnitude of the horizontal change (|dx|) or the magnitude of the vertical change (|dy|) in each sample is less than or equal to a threshold value, the amplitude value for that sample may be assigned to the non-directional mode. Otherwise, the amplitude value for that sample may not be assigned to the non-directional mode.
[0200] For example, if |dx| is less than or equal to a first threshold value (threshold1) and |dy| is less than or equal to a second threshold value (threshold2), the amplitude value for the corresponding sample may be assigned to the non-directional mode. Here, the first and second threshold values may be values pre-defined in the encoding device and the decoding device. For example, the first and second threshold values may each be 10. Alternatively, the first and second threshold values may have the same value or different values.
[0201] If at least one of the magnitude of the horizontal change (|dx|) or the magnitude of the vertical change (|dy|) in each sample is less than a threshold, the amplitude value for the corresponding sample may be assigned to at least one of the planar mode or the DC mode. The mode to which the amplitude value is assigned may be determined by a prior agreement between the encoding device and the decoding device. For example, if at least one of the magnitude of the horizontal change (|dx|) or the magnitude of the vertical change (|dy|) in each sample is less than a threshold, the amplitude value for the corresponding sample may be assigned to the planar mode. Alternatively, if at least one of the magnitude of the horizontal change (|dx|) or the magnitude of the vertical change (|dy|) in each sample is less than a threshold, the amplitude value for the corresponding sample may be assigned to the DC mode. Alternatively, if at least one of the magnitude of the horizontal change (|dx|) or the magnitude of the vertical change (|dy|) in each sample is less than a threshold, the amplitude value for that sample may be assigned to both the planar mode and the DC mode.
[0202] If at least one of the magnitude of the horizontal change (|dx|) or the magnitude of the vertical change (|dy|) in each sample is less than a threshold, the amplitude value for that sample may be optionally assigned to either the planar mode or the DC mode.
[0203] For example, if both |dx| and |dy| are less than or equal to a first value, the amplitude value for that sample can be assigned to the DC mode. Otherwise, the amplitude value for that sample can be assigned to the planar mode. If both |dx| and |dy| are less than or equal to a second value, the amplitude value for that sample can be assigned to the planar mode. Alternatively, a flag indicating either the planar mode or the DC mode can be explicitly signaled. The amplitude value can be assigned to the mode selected by that flag.
[0204] The reason for assigning amplitude values to non-directional modes is that the intra-prediction mode mapped to the corresponding sample is judged to be more similar to the non-directional mode than to the directional mode. Nevertheless, the aforementioned method may reduce the likelihood of the non-directional mode being selected as the DIPM because relatively small amplitude values are assigned to the non-directional mode. Therefore, the amplitude values assigned to the non-directional mode can be set to be large.
[0205] For example, a value obtained by multiplying the amplitude value assigned to the directional mode by a predetermined real number (K) can be assigned / accumulated to the non-directional mode. Here, K can be determined based on the size of the current block. Alternatively, K can be determined based on the size of the template region. Alternatively, K can be a value pre-defined to the encoding device and the decoding device. For example, K can be 10. However, this is merely an example, and K can be set to another value pre-defined to the encoding device and the decoding device. Alternatively, in order to increase the amplitude value assigned to the non-directional mode, the amplitude value can be replaced with another value, or a predetermined real number can be added to the amplitude value.
[0206] According to Example 4, the final accumulated amplitude values can be obtained for intra prediction modes including non-directional modes. The top N intra prediction modes in descending order of amplitude values for the intra prediction modes can be set as the DIPM of the current block.
[0207] One or more DIPMs may be derived for the current block based on any one of Embodiments 1 to 4. Alternatively, one or more DIPMs may be derived for the current block based on a combination of at least two of Embodiments 1 to 4.
[0208] Referring to FIG. 4, a candidate list for the current block can be constructed (S410).
[0209] A candidate list for the current block can be constructed based on the DIPM(s) derived from S400.
[0210] A candidate list according to the present disclosure may be configured as follows. The size of the candidate list may be M (M is a natural number). M may be a value predefined in the encoding device and the decoding device.
[0211] For example, the candidate list is derived from the DIPM (i.e., Mode(K)) based on the template region including AL, A, AR, L, and LB. All ) can be included. If M is 4, the candidate list is Mode(1) All , Mode(2) All , Mode(3) All and Mode(4) All may include. If M is 2, the candidate list is Mode(1) All and Mode(2) All may include.
[0212] Alternatively, the candidate list may include a DIPM derived based on a template region comprising one or a combination of at least two of AL, A, AR, L, or LB.
[0213] For example, the candidate list is derived from the DIPM (i.e., Mode(K)) based on the template region including A, L, and AL. AL+L+A ) can be included. If M is 4, the candidate list is Mode(1) A+L+AL , Mode(2) A+L+AL , Mode(3) A+L+AL and Mode(4) A+L+AL may include. If M is 2, the candidate list is Mode(1) A+L+AL and Mode(2) A+L+AL may include.
[0214] Alternatively, the candidate list may include DIPMs derived based on different template regions. That is, the candidate list may include at least one of X first DIPMs derived based on a first template region or Y second DIPMs derived based on a second template region. Here, the first template region may be a region including AL, A, AR, L, and LB. The second template region may be a region formed by a combination of any one or at least two of AL, A, AR, L, or LB. X and Y may be integers greater than or equal to 1. X may be an integer greater than or equal to Y.
[0215] For example, if M is 4, the candidate list is Mode(1) All , Mode(2) All , Mode(1) A+AR+AL and Mode(1) L+LB+AL may include. Or, if M is 4, the candidate list is Mode(1) All , Mode(2) All , Mode(1) A+AR and Mode(1) L+LB may include. Or, if M is 4, the candidate list is Mode(1) All , Mode(1) A+AR , Mode(1) L+LB and F_Mode(1) All may include. Or, if M is 4, the candidate list is F_Mode(1) All , F_Mode(2) All , F_Mode(3) All and F_Mode(4) All may include. If M is 2, the candidate list is Mode(1) All and F_Mode(1) All may include.
[0216] When deriving DIPMs based on different template regions, the same DIPM may be derived. To improve encoding efficiency, DIPMs within the candidate list can be structured so that they do not overlap. The candidate list can be structured as follows to fill M non-overlapping DIPMs. For example, Mode(1) All , Mode(2) All , Mode(1) A+AR+AL , Mode(1) L+LB+AL , Mode(3) All and Mode(4) All The candidate list can be constructed to include:
[0217] The examples of composing the above candidate list are merely examples. The candidate list may include more DIPMs than those listed above.
[0218] During the process of constructing a candidate list, there may be cases where not all M DIPMs are filled. In this case, a default mode may be added to the candidate list. Multiple default modes may be defined, and they may be added to the candidate list in a pre-defined order. Furthermore, default modes may be added so as not to overlap with DIPMs already included in the candidate list. For example, default modes may be organized in order of highest selectivity. If 67 intra prediction modes are defined in the encoding device and the decoding device, the default modes may be as follows. This is an example of a default mode, and the number, construction order, etc. of default modes may be defined differently.
[0219] default mode ={ DC mode, Vertical mode, Horizontal mode, Vertical mode - 4, Vertical mode + 4, Horizontal mode - 4, Horizontal mode + 4, Vertical mode - 8, Vertical mode + 8, Horizontal mode - 8, Horizontal mode + 8, Vertical mode - 12, Vertical mode + 12, Horizontal mode - 12, Horizontal mode + 12, 34, 66, 2, Vertical mode - 2, Vertical mode + 2, Horizontal mode -2, Horizontal mode +2}
[0220] Through the process of S400, P DIPMs can be derived. Here, P can be greater than or equal to the size (M) of the candidate list. In this case, a candidate list including M DIPMs can be constructed based on the P DIPMs. Specifically, the method for constructing the candidate list can include a step of constructing P DIPMs, a step of sorting the P DIPMs, or a step of constructing a candidate list based on the top M DIPMs.
[0221] The step of configuring P DIPMs can configure P DIPMs among DIPMs derived for each template area.
[0222] - Mode(1) All , Mode(2) All , Mode(3) All , Mode(4) All ,...
[0223] - Mode(1) L , Mode(2) L , Mode(3) L , Mode(4) L ,...
[0224] - Mode(1) L+LB , Mode(2) L+LB , Mode(3) L+LB , Mode(4) L+LB ,...
[0225] - Mode(1) L+LB+AL , Mode(2) L+LB+AL , Mode(3) L+LB+AL , Mode(4) L+LB+AL ,...
[0226] - Mode(1) A , Mode(2) A , Mode(3) A , Mode(4) A ,...
[0227] - Mode(1) A+AR , Mode(2) A+AR , Mode(3) A+AR , Mode(4) A+AR ,...
[0228] - Mode(1) A+AR+AL , Mode(2) A+AR+AL , Mode(3) A+AR+AL , Mode(4) A+AR+AL ,...
[0229] - Mode(1) AL , Mode(2) AL , Mode(3) AL , Mode(4) AL ,...
[0230] - F_Mode(1) All , F_Mode(2) All , F_Mode(3) All , F_Mode(4) All ,...
[0231] - F_Mode(1) L , F_Mode(2) L , F_Mode(3) L , F_Mode(4) L ,...
[0232] - F_Mode(1) L+LB , F_Mode(2)L+LB , F_Mode(3) L+LB , F_Mode(4) L+LB ,...
[0233] - F_Mode(1) L+LB+AL , F_Mode(2) L+LB+AL , F_Mode(3) L+LB+AL , F_Mode(4) L+LB+AL ,...
[0234] - F_Mode(1) A , F_Mode(2) A , F_Mode(3) A , F_Mode(4) A ,...
[0235] - F_Mode(1) A+AR , F_Mode(2) A+AR , F_Mode(3) A+AR , F_Mode(4) A+AR ,...
[0236] - F_Mode(1) A+AR+AL , F_Mode(2) A+AR+AL , F_Mode(3) A+AR+AL , F_Mode(4) A+AR+AL ,...
[0237] - F_Mode(1) AL , F_Mode(2) AL , F_Mode(3) AL , F_Mode(4) AL ,...
[0238] For example, P DIPMs can be configured as follows. However, this is only an example, and P DIPMs can be defined as a promise between an encoding device and a decoding device.
[0239] P DIPM = {Mode(1) All , Mode(2) All , Mode(3) All , Mode(4) All , Mode(1) L+LB+AL , Mode(2) L+LB+AL , Mode(3) L+LB+AL, Mode(4) L+LB+AL , F_Mode(1) A+AR+AL , F_Mode(2) A+AR+AL , F_Mode(3) A+AR+AL , F_Mode(4) A+AR+AL , F_Mode(1) All , F_Mode(2) All , F_Mode(3) All , F_Mode(4) All}
[0240] P can be a value predefined between the encoding device and the decoding device. For example, P can have a value that is a multiple of M, such as (M*4) or (M*2). Alternatively, P can be the same value as M. Alternatively, P can be 20. This is just an example of P being set to a multiple of M or a fixed value, and it can be set to other values.
[0241] During the process of configuring P DIPMs, cases may arise where P DIPMs are not configured. In this case, the aforementioned default mode can be used to configure P DIPMs. In this case, the P DIPMs can be configured so that they do not overlap with each other.
[0242] In the step of sorting P DIPMs, the P DIPMs can be sorted based on a predetermined error value. The error value can be derived based on the difference between the predicted value of the template region and the base-reconstructed value of the template region. The error value can be calculated for each of the P DIPMs. The predicted value of the template region can be generated by performing intra prediction based on surrounding reference sample(s) of the template region and the DIPM.
[0243] For example, as illustrated in Fig. 7, a predicted value of a template area can be generated based on DIPM, which is a vertical mode, and an error value can be obtained based on the difference between the predicted value and the base-restored value.
[0244] To obtain the error value, error calculation methods such as SAD (Sum of difference), SATD (Sum of transformed difference), SSE (Sum of squared error), MR-SAD (Mean-removed sum of difference), MR-SSE (Mean-removed sum of squared error), and MR-SATD (Mean-removed sum of transformed difference) can be used.
[0245] The template region for obtaining the error value may be defined differently from the template region for deriving the DIPM. For example, H of the template region for obtaining the error value A Wow W L Each can be 1.
[0246] AL, A, and L can be used as template regions for calculating error values, or some of AL, A, or L can be used. For example, A and L can be used to calculate error values, but AL can be omitted. The region (or template region) containing unavailable samples can be omitted. Here, whether a sample is unavailable or not is as discussed above.
[0247] In the step of forming a candidate list based on the top M DIPMs, the candidate list can be formed based on the top M DIPMs in ascending order of error values among the P DIPMs.
[0248] When a non-directional mode is induced into a DIPM according to Embodiment 2 or 3, the non-directional mode may be included in a candidate list. In this case, the non-directional mode may be included in a specific position within the candidate list. Here, the specific position may be the first position of the candidate list or the last position of the candidate list. The first position of the candidate list may correspond to the smallest index (e.g., 0) within the candidate list. The last position of the candidate list may correspond to the largest index within the candidate list.
[0249] For example, if the size of the candidate list (i.e., the maximum number of DIPMs that can be included in the candidate list) is 4, and the non-directional mode is included in the last position of the candidate list, the candidate list is Mode(1) All , Mode(2) All , Mode(3) All and can be composed in the order of non-directional modes. Or, if the size of the candidate list is 2, the candidate list is Mode(1) All and can be configured in the order of non-directional mode.
[0250] Alternatively, if a non-directional mode is induced into a DIPM according to embodiments 2 or 3, the non-directional mode may be defined as a separate DIPM distinct from the candidate list. In this case, the candidate list may not include the DIPM, which is a non-directional mode.
[0251] According to the DIPM derivation method of Example 4, a non-directional mode may be included in a candidate list. At this time, the non-directional mode may be included in a specific position within the candidate list. Here, the specific position may be the first position of the candidate list or the last position of the candidate list. The first position of the candidate list may correspond to the smallest index (e.g., 0) within the candidate list. The last position of the candidate list may correspond to the largest index within the candidate list. Alternatively, the candidate list may be arranged in descending order of amplitude values for the DIPMs. In this case, the position of the non-directional mode within the candidate list may be determined based on the amplitude value for the non-directional mode.
[0252] Referring to FIG. 4, a prediction block of the current block can be generated based on the candidate list (S420).
[0253] An intra prediction mode of the current block can be derived based on any one of multiple DIPMs in the candidate list. A prediction block of the current block can be generated based on the derived intra prediction mode.
[0254] A DIPM index indicating one of multiple DIPMs in the candidate list can be signaled through the bitstream. The intra prediction mode of the current block can be derived based on the DIPM indicated by the signaled DIPM index.
[0255] Alternatively, the intra prediction mode of the current block can be derived from the candidate list without signaling the DIPM index. For example, the first DIPM among multiple DIPMDs in the candidate list can be set as the intra prediction mode of the current block. Here, the first DIPM can mean the DIPM with the smallest index (e.g., 0) among the multiple DIPMs in the candidate list. Alternatively, the first DIPM can mean the DIPM with the smallest error value among the multiple DIPMs in the candidate list.
[0256] A prediction block of the current block can be generated based on at least one of the DIPMs in the candidate list. At least two prediction blocks can be generated based on at least two DIPMs in the candidate list, and a prediction block of the current block can be generated based on a weighted sum of the at least two generated prediction blocks.
[0257] Even if the candidate list does not include a non-directional mode, additional prediction blocks can be generated based on a non-directional mode, such as a planar mode or DC mode, in addition to the prediction block(s) generated based on the candidate list. In this case, the prediction block of the current block can be generated through a weighted sum of the prediction block(s) generated based on the candidate list and the additional prediction block(s) generated based on the non-directional mode.
[0258] If a non-directional mode is induced as a DIPM according to Embodiment 2 or 3, the non-directional mode may be included in the candidate list. In this case, one or more DIPMs including the non-directional mode may be selected from the candidate list, and a prediction block of the current block may be generated based on the selected DIPM.
[0259] When a non-directional mode is induced as a DIPM according to Embodiment 2 or 3, the non-directional mode may be defined as a separate DIPM distinct from the candidate list. That is, the candidate list may not include a non-directional mode. In this case, a prediction block may be generated based on at least one DIPM belonging to the candidate list. In addition, an additional prediction block may be generated based on a non-directional mode (e.g., at least one of a planar mode or a DC mode) induced by the DIPM. A prediction block of the current block may be generated through a weighted sum of the prediction block(s) generated based on the candidate list and the additional prediction block generated based on the non-directional mode.
[0260] If the non-directional mode is not induced into a DIPM according to Embodiment 2 or 3, the candidate list may be composed of DIPMs corresponding to directional modes excluding the non-directional mode. In this case, the prediction block of the current block may be generated based on one or more DIPMs belonging to the candidate list. That is, the process of generating an additional prediction block based on the non-directional mode and the weighted sum with the additional prediction block may be omitted.
[0261] The prediction block of the current block can be generated based on the top M DIPMs in descending order of (finally accumulated) amplitude values among the DIPMs in the candidate list. That is, M prediction blocks can be generated based on the top M DIPMs, and the prediction block of the current block can be generated based on the weighted sum of the M prediction blocks.
[0262] For example, according to embodiment 4, if a non-directional mode is included in the candidate list but does not belong to the top M DIPMs, a prediction block based on the non-directional mode may not be generated. On the other hand, if the non-directional mode belongs to the top M DIPMs, a prediction block of the current block can be generated through a weighted sum with the non-directional mode. At this time, the weight for the weighted sum can be derived in proportion to the amplitude values for the top M DIPMs. Here, M can be an integer greater than or equal to 1. M can be less than or equal to the size of the candidate list (i.e., the maximum number of DIPMs that can be included in the candidate list).
[0263] Referring to FIG. 4, the current block can be restored based on the prediction block and the residual block (S430).
[0264] Transform coefficients can be derived based on residual information signaled through the bitstream. A residual block can be generated by applying at least one of inverse quantization or inverse transformation to the derived transform coefficients. A reconstruction block of the current block can be generated based on the prediction block of the current block and the residual block.
[0265] The above inverse transformation can be performed based on a non-separable transform. Here, the non-separable transform can be a non-separable primary transform (NSPT) or a low frequency non-separable transform (LFNST).
[0266] When a non-directional mode is induced by DIPM, a transform set for NSPT corresponding to the non-directional mode can be determined from a table pre-defined in the encoding device and the decoding device. Here, the table may be a table defining a mapping relationship between intra prediction modes and transform sets for NSPT. Each transform set may include one or more transform kernels. An NSPT-based inverse transform can be performed based on any one of the one or more transform kernels included in the determined transform set.
[0267] Alternatively, if a non-directional mode is induced by DIPM, a transform kernel for NSPT corresponding to the non-directional mode can be determined from a table pre-defined in the encoding device and the decoding device. Here, the table may be a table defining a mapping relationship between intra prediction modes and transform kernels for NSPT. An NSPT-based inverse transform can be performed based on the determined transform kernel.
[0268] When a non-directional mode is induced by DIPM, a transform set for LFNST corresponding to the non-directional mode can be determined from a table pre-defined in an encoding device and a decoding device. Here, the table may be a table defining a mapping relationship between intra prediction modes and transform sets for LFNST. Each transform set may include one or more transform kernels. An LFNST-based inverse transform can be performed based on any one of the one or more transform kernels included in the determined transform set.
[0269] Alternatively, if a non-directional mode is induced by DIPM, a transform kernel for LFNST corresponding to the non-directional mode can be determined from a table pre-defined in the encoding device and the decoding device. Here, the table may be a table defining a mapping relationship between intra prediction modes and transform kernels for LFNST. An LFNST-based inverse transform can be performed based on the determined transform kernel.
[0270] The method of generating prediction blocks based on the aforementioned DIPM is called DIPM mode (or VIPM mode). This DIPM mode can be applied adaptively based on a DIPM flag indicating whether DIPM mode is applied. Below, we will examine how to signal the DIPM flag.
[0271] The DIPM flag can be signaled in the coding unit syntax corresponding to the current block. The coding unit syntax can define at least one of DIPM-related information, MRL-related information, ISP (intra subpartition prediction)-related information, or MPM-related information.
[0272] The DIPM-related information may include at least one of a DIPM flag indicating whether the DIPM mode is applied to the current block or a DIPM index indicating one of multiple DIPMs in the candidate list. For example, if the value of the DIPM flag is 1, this may indicate that the DIPM mode is applied, and if the value of the DIPM flag is 0, this may indicate that the DIPM mode is not applied.
[0273] The MRL-related information may include MRL index information regarding at least one reference sample line used for intra prediction of the current block among reference sample lines available for intra prediction.
[0274] ISP may be a mode that divides a current block into multiple subpartitions and performs intra prediction for each subpartition. ISP-related information may include at least one of an ISP flag indicating whether ISP is applied to the current block or a flag indicating the division direction of the current block.
[0275] The MPM-related information may include at least one of an MPM flag indicating whether the intra-prediction mode of the current block is derived based on an MPM candidate, a planar flag indicating whether the intra-prediction mode of the current block is a planar mode, an MPM index of any one of a plurality of MPM candidates belonging to an MPM list, or remaining mode information of any one of the remaining modes. For example, when the value of the MPM flag is 1, this may indicate that the intra-prediction mode of the current block is derived based on an MPM candidate, and when the value of the MPM flag is 0, this may indicate that the intra-prediction mode of the current block is not derived based on an MPM candidate. When the value of the planar flag is 0, this may indicate that the intra-prediction mode of the current block is a planar mode, and when the value of the planar flag is 1, this may indicate that the intra-prediction mode of the current block is not a planar mode.
[0276] coding_unit( x0, y0, cbWidth, cbHeight, cqtDepth, treeType, modeType ) {Descriptor...if( intra_mip_flag ) {intra_mip_transposed_flag[ x0 ][ y0 ]ae(v)intra_mip_mode[ x0 ][ y0 ]ae(v)} else {if( sps_vipm_enabled_flag )intra_vipm_flag[ x0 ][ y0 ]ae(v)if ( intra_vipm_flag[ x0 ][ y0 ] )intra_vipm_idx[ )intra_luma_ref_idxae(v)...intra_luma_mpm_remainder[ x0 ][ y0 ]ae(v)}}...
[0277] According to Table 1, DIPM-related information may include a DIPM flag (intra_vipm_flag) and a DIPM index (intra_vipm_idx). DIPM-related information may be signaled before MRL-related information is signaled in the coding unit syntax.
[0278] The intra_vipm_flag can be signaled based on the DIPM enable flag (sps_vipm_enabled_flag). Here, the sps_vipm_enabled_flag can indicate whether the DIPM mode is enabled. For example, if the value of sps_vipm_enabled_flag is 1, this can indicate that the DIPM mode is enabled, and if the value of sps_vipm_enabled_flag is 0, this can indicate that the DIPM mode is not enabled. The intra_vipm_flag can be signaled based on the value of sps_vipm_enabled_flag being 1, and can not be signaled based on the value of sps_vipm_enabled_flag being 0.
[0279] intra_vipm_idx may be signaled based on the value of intra_vipm_flag being 1, or may not be signaled based on the value of intra_vipm_flag being 0.
[0280] The DIPM activation flag in Table 1 is assumed to be signaled in the SPS, but this is only an example. The DIPM activation flag may also be signaled in higher-level syntax, such as the picture parameter set, the picture header, or the slice header. The intra_luma_mpm_remainder according to Table 1 may correspond to the remaining mode information described above. In this case, the remaining modes may mean modes other than the MPM candidates in the MPM list, the planar mode, and the DIPMs in the candidate list.
[0281] coding_unit( x0, y0, cbWidth, cbHeight, cqtDepth, treeType, modeType ) {Descriptor...if( intra_mip_flag ) {intra_mip_transposed_flag[ x0 ][ y0 ]ae(v)intra_mip_mode[ x0 ][ y0 ]ae(v)} else {if( sps_vipm_enabled_flag )intra_vipm_flag[ x0 ][ y0 ]ae(v)if ( intra_vipm_flag[ y0 ]ae(v)}}...
[0282] Table 2 shows cases where the DIPM index signaling is omitted. That is, DIPM-related information may include a DIPM flag but not a DIPM index. The omission of the DIPM index signaling may occur when the candidate list size is 1, or when the intra prediction mode of the current block can be derived from the candidate list through a predefined method between the encoding device and the decoding device. For example, the first DIPM in the candidate list can be selected and used without signaling the DIPM index.
[0283] DIPM-related information according to Table 2 can be signaled before MRL-related information is signaled in the coding unit syntax. intra_vipm_flag can be signaled based on sps_vipm_enabled_flag, as discussed with reference to Table 1. Based on the value of intra_vipm_flag being 0, at least one of MRL-related information, intra subpartition prediction (ISP)-related information, or MPM-related information can be signaled.
[0284] coding_unit( x0, y0, cbWidth, cbHeight, cqtDepth, treeType, modeType ) {Descriptor...if( sps_mrl_enabled_flag && ( ( y0 % CtbSizeY ) > 0 ) )intra_luma_ref_idx[ x0 ][ y0 ]ae(v)if ( sps_isp_enabled_flag && intra_luma_ref_idx[ x0 ][ y0 ] = = 0 && ( cbWidth <= MaxTbSizeY && cbHeight <= MaxTbSizeY ) && ( cbWidth * cbHeight > MinTbSizeY * MinTbSizeY ) )intra_subpartitions_mode_flag[ intra_subpartitions_mode_flag[ x0 ][ y0 ] = = 1 &&cbWidth <= MaxTbSizeY && cbHeight <= MaxTbSizeY )intra_subpartitions_split_flag[ x0 ][ y0 ]ae(v)if( sps_vipm_enabled_flag )intra_vipm_flag[ intra_vipm_flag[ x0 ][ y0 ] )intra_vipm_idx[ x0 ][ y0 ]ae(v)else {if( intra_luma_ref_idx[ x0 ][ y0 ] = = 0 && intra_subpartitions_mode_flag[ y0 ]ae(v)...intra_luma_mpm_remainder[ x0 ][ y0 ]ae(v)}...
[0285] According to Table 3, DIPM-related information may include a DIPM flag (intra_vipm_flag) and a DIPM index (intra_vipm_idx).
[0286] DIPM-related information may be signaled after MRL-related information is signaled in the coding unit syntax. DIPM-related information may be signaled after ISP-related information is signaled in the coding unit syntax. This may be to apply MRL mode and / or ISP mode to the DIPM. DIPM-related information may be signaled before MPM-related information is signaled in the coding unit syntax.
[0287] intra_vipm_flag can be signaled based on sps_vipm_enabled_flag, and intra_vipm_idx can be signaled based on intra_vipm_flag, as seen in Table 1.
[0288] According to Table 3, MPM related information can be signaled based on the value of intra_vipm_flag being 0.
[0289] coding_unit( x0, y0, cbWidth, cbHeight, cqtDepth, treeType, modeType ) {Descriptor...if( sps_mrl_enabled_flag && ( ( y0 % CtbSizeY ) > 0 ) )intra_luma_ref_idx[ x0 ][ y0 ]ae(v)if ( sps_isp_enabled_flag && intra_luma_ref_idx[ x0 ][ y0 ] = = 0 && ( cbWidth <= MaxTbSizeY && cbHeight <= MaxTbSizeY ) && ( cbWidth * cbHeight > MinTbSizeY * MinTbSizeY ) )intra_subpartitions_mode_flag[ intra_subpartitions_mode_flag[ x0 ][ y0 ] = = 1 &&cbWidth <= MaxTbSizeY && cbHeight <= MaxTbSizeY )intra_subpartitions_split_flag[ x0 ][ y0 ]ae(v)if( sps_vipm_enabled_flag )intra_vipm_flag[ intra_vipm_flag[ x0 ][ y0 ] = = 0 ) {if( intra_luma_ref_idx[ x0 ][ y0 ] = = 0 &&intra_subpartitions_mode_flag[ ]ae(v)...intra_luma_mpm_remainder[ x0 ][ y0 ]ae(v)}...
[0290] Table 4 shows cases where DIPM index signaling is omitted. Cases where DIPM index signaling is omitted are as discussed in Table 2.
[0291] DIPM-related information according to Table 4 may be signaled after MRL-related information is signaled in the coding unit syntax. DIPM-related information may be signaled after ISP-related information is signaled in the coding unit syntax. This may be to apply MRL mode and / or ISP mode to the DIPM. DIPM-related information may be signaled before MPM-related information is signaled in the coding unit syntax.
[0292] intra_vipm_flag can be signaled based on sps_vipm_enabled_flag, as seen in Table 1.
[0293] According to Table 4, MPM related information can be signaled based on the value of intra_vipm_flag being 0.
[0294] coding_unit( x0, y0, cbWidth, cbHeight, cqtDepth, treeType, modeType ) {Descriptor...if( sps_vipm_enabled_flag )intra_vipm_flag[ x0 ][ y0 ]ae(v)if ( intra_vipm_flag[ x0 ][ y0 ] )intra_vipm_idx[ x0 ][ y0 ]ae(v)if( sps_mrl_enabled_flag && ( ( y0 % CtbSizeY ) > 0 ) )intra_luma_ref_idx[ x0 ][ y0 ]ae(v)if ( sps_isp_enabled_flag && intra_luma_ref_idx[ x0 ][ y0 ] = = 0 && ( cbWidth <= MaxTbSizeY && cbHeight <= MaxTbSizeY ) && ( cbWidth * cbHeight > MinTbSizeY * MinTbSizeY ) )intra_subpartitions_mode_flag[ x0 ][ y0 ]ae(v)if( intra_subpartitions_mode_flag[ x0 ][ y0 ] = = 1 &&cbWidth <= MaxTbSizeY && cbHeight <= MaxTbSizeY )intra_subpartitions_split_flag[ 0 )intra_luma_mpm_flag[ x0 ][ y0 ]ae(v)...intra_luma_mpm_remainder[ x0 ][ y0 ]ae(v)}...
[0295] According to Table 5, DIPM-related information may include a DIPM flag (intra_vipm_flag) and a DIPM index (intra_vipm_idx).
[0296] DIPM-related information can be signaled before MRL-related information. DIPM-related information can be signaled before ISP-related information. DIPM-related information can be signaled before MPM-related information. Since the selectivity of MRL and ISP modes may be lower than that of DIPM mode, MRL-related information and ISP-related information can be signaled before MRL and ISP-related information, taking this selectivity into account.
[0297] intra_vipm_flag can be signaled based on sps_vipm_enabled_flag, and intra_vipm_idx can be signaled based on intra_vipm_flag, as seen in Table 1.
[0298] According to Table 5, MPM-related information may be signaled based on the value of intra_vipm_flag being 0. At least one of MRL-related information or ISP-related information may be signaled regardless of the value of intra_vipm_flag.
[0299] coding_unit( x0, y0, cbWidth, cbHeight, cqtDepth, treeType, modeType ) {Descriptor...if( sps_vipm_enabled_flag )intra_vipm_flag[ x0 ][ y0 ]ae(v)if( sps_mrl_enabled_flag && ( ( y0 % CtbSizeY ) > 0 ) )intra_luma_ref_idx[x0][y0]ae(v)if ( sps_isp_enabled_flag && intra_luma_ref_idx[ ) )intra_subpartitions_mode_flag[x0][ y0 ]ae(v)if( intra_subpartitions_mode_flag[ intra_vipm_flag[ x0 ][ y0 ] = = 0 )if( intra_luma_ref_idx[ x0 ][ y0 ] = = 0 && intra_subpartitions_mode_flag [ y0 ]ae(v)}...
[0300] Table 6 shows cases where DIPM index signaling is omitted. Cases where DIPM index signaling is omitted are as discussed in Table 2.
[0301] DIPM-related information can be signaled before MRL-related information. DIPM-related information can be signaled before ISP-related information. DIPM-related information can be signaled before MPM-related information. Since the selectivity of MRL and ISP modes may be lower than that of DIPM mode, MRL-related information and ISP-related information can be signaled before MRL and ISP-related information, taking this selectivity into account.
[0302] intra_vipm_flag can be signaled based on sps_vipm_enabled_flag, as seen in Table 1.
[0303] According to Table 6, MPM-related information may be signaled based on the value of intra_vipm_flag being 0. At least one of MRL-related information or ISP-related information may be signaled regardless of the value of intra_vipm_flag.
[0304] coding_unit( x0, y0, cbWidth, cbHeight, cqtDepth, treeType, modeType ) {Descriptor...intra_luma_mpm_flag[ x0 ][ y0 ]ae(v)if( intra_luma_mpm_flag[ x0 ][ y0 ] ) {if( intra_luma_ref_idx[ x0 ][ y0 ] = = 0 )intra_luma_not_planar_flag[ x0 ][ y0 ]ae(v)if( sps_vipm_enabled_flag && intra_luma_not_planar_flag[ x0 ][ y0 ] )intra_vipm_flag[ )intra_vipm_idx[ x0 ][ y0 ]ae(v)if ( intra_luma_not_planar_flag[ x0 ][ y0 ] && intra_vipm_flag[ x0 ][ y0 ] = = 0 )intra_luma_mpm_idx[ ]ae(v)}...
[0305] According to Table 7, DIPM-related information may include a DIPM flag (intra_vipm_flag) and a DIPM index (intra_vipm_idx).
[0306] The DIPM in the candidate list may be classified as a separate MPM candidate from the MPM candidates in the MPM list. In this case, DIPM-related information may be signaled after the MPM flag (intra_luma_mpm_flag) is signaled. For example, intra_vipm_flag may be signaled based on the value of intra_luma_mpm_flag being 1, and may not be signaled based on the value of intra_luma_mpm_flag being 0.
[0307] Since planar mode is a highly selective mode, DIPM-related information can be signaled after the planar flag (intra_luma_not_planar_flag) is signaled, as shown in Table 7. For example, intra_vipm_flag can be signaled based on the value of intra_luma_not_planar_flag being 1.
[0308] intra_vipm_flag can be signaled based on sps_vipm_enabled_flag, and intra_vipm_idx can be signaled based on intra_vipm_flag, as seen in Table 1.
[0309] According to Table 7, the MPM index (intra_luma_mpm_idx) can be signaled based on the value of intra_vipm_flag being 0. When the value of intra_vipm_flag is 0, the MPM list can be constructed based on the remaining modes excluding the DIPMs in the candidate list.
[0310] coding_unit( x0, y0, cbWidth, cbHeight, cqtDepth, treeType, modeType ) {Descriptor...intra_luma_mpm_flag[ x0 ][ y0 ]ae(v)if( intra_luma_mpm_flag[ x0 ][ y0 ] ) {if( intra_luma_ref_idx[ x0 ][ y0 ] = = 0 )intra_luma_not_planar_flag[ x0 ][ y0 ]ae(v)if( sps_vipm_enabled_flag && intra_luma_not_planar_flag[ x0 ][ y0 ] )intra_vipm_flag[ intra_vipm_flag[ x0 ][ y0 ] = = 0 )intra_luma_mpm_idx[ x0 ][ y0 ]ae(v)}else...
[0311] Table 8 shows cases where DIPM index signaling is omitted. Cases where DIPM index signaling is omitted are as discussed in Table 2.
[0312] As seen in Table 7, intra_vipm_flag can be signaled based on the MPM flag (intra_luma_mpm_flag). Additionally, intra_vipm_flag can be signaled based on the planar flag (intra_luma_not_planar_flag).
[0313] intra_vipm_flag can be signaled based on sps_vipm_enabled_flag, as seen in Table 1.
[0314] According to Table 8, the MPM index (intra_luma_mpm_idx) can be signaled based on the value of intra_vipm_flag being 0. When the value of intra_vipm_flag is 0, the MPM list can be constructed based on the remaining modes excluding the DIPMs in the candidate list.
[0315] coding_unit( x0, y0, cbWidth, cbHeight, cqtDepth, treeType, modeType ) {Descriptor...if( intra_luma_ref_idx[ x0 ][ y0 ] = = 0 && intra_subpartitions_mode_flag[ sps_vipm_enabled_flag && intra_luma_mpm_flag [ x0 ][ y0 ] )intra_vipm_flag[ x0 ][ y0 ]ae(v)if ( intra_vipm_flag[ x0 ][ y0 ] )intra_vipm_idx[ [ x0 ][ y0 ] && intra_vipm_flag [ x0 ][ y0 ] = = 0 ) {if( intra_luma_ref_idx [
[0316] According to Table 9, DIPM-related information may include a DIPM flag (intra_vipm_flag) and a DIPM index (intra_vipm_idx).
[0317] DIPM related information can be signaled after the MPM flag (intra_luma_mpm_flag) is signaled. For example, intra_vipm_flag can be signaled based on the value of intra_luma_mpm_flag being 1, and can be not signaled based on the value of intra_luma_mpm_flag being 0.
[0318] The selectivity of DIPM mode may be higher than that of planar mode. Considering this, DIPM-related information may be signaled before the planar flag (intra_luma_not_planar_flag) is signaled.
[0319] intra_vipm_flag can be signaled based on sps_vipm_enabled_flag, and intra_vipm_idx can be signaled based on intra_vipm_flag, as seen in Table 1.
[0320] According to Table 9, intra_luma_not_planar_flag can be signaled based on the value of intra_vipm_flag being 0.
[0321] coding_unit( x0, y0, cbWidth, cbHeight, cqtDepth, treeType, modeType ) {Descriptor...if( intra_luma_ref_idx[ sps_vipm_enabled_flag && intra_luma_mpm_flag [ x0 ][ y0 ])intra_vipm_flag[ x0 ][ y0 ]ae(v)if ( intra_luma_mpm_flag [ x0 ][ y0 ] && intra_vipm_flag [ intra_luma_ref_idx[ x0 ][ y0 ] = = 0 )intra_luma_not_planar_flag[ x0 ][ y0 ]ae(v)...intra_luma_mpm_remainder[ x0 ][ y0 ]ae(v)}...
[0322] Table 10 shows cases where DIPM index signaling is omitted. Cases where DIPM index signaling is omitted are as discussed in Table 2.
[0323] The DIPM flag (intra_vipm_flag) may be signaled after the MPM flag (intra_luma_mpm_flag) is signaled. For example, intra_vipm_flag may be signaled based on the value of intra_luma_mpm_flag being 1, or may not be signaled based on the value of intra_luma_mpm_flag being 0. intra_vipm_flag may be signaled before the planar flag (intra_luma_not_planar_flag) is signaled.
[0324] intra_vipm_flag can be signaled based on sps_vipm_enabled_flag, as seen in Table 1.
[0325] According to Table 10, intra_luma_not_planar_flag can be signaled based on the value of intra_vipm_flag being 0.
[0326] The DIPM index can be binarized based on truncated binary coding, unary coding, golomb coding, exponential-golomb coding, truncated rice coding, or truncated unary coding. For example, if the candidate list size is 4 and truncated unary coding is used, the bins corresponding to each index can be as shown in Table 11 below. The binarized bins can be input to a regular coding engine or a bypass coding engine. Here, inputting to a regular coding engine can mean encoding based on context coding.
[0327] IndexBin string0011021103111
[0328] If the DIPM mode is not applied to the current block, at least one of the MPM index, the secondary MPM index, or the remaining mode information may be signaled. If the DIPM is not applied to the current block, this may mean that the VIPM in the candidate list is not selected as the intra prediction mode for the current block. In this case, the MPM list (including the secondary MPM list) and the non-MPM list may be configured so as not to overlap with the DIPM in the candidate list.
[0329] For example, a DIPM in the candidate list may not be included in the MPM list, the secondary MPM list, and the non-MPM list. That is, the MPM list may be configured so as not to overlap with a DIPM in the candidate list. In addition, the secondary MPM list may be configured so as not to overlap with a VIPM in the candidate list. In addition, the non-MPM list may be configured so as not to overlap with a VIPM in the candidate list. The non-MPM list may correspond to modes remaining except for the VIPM in the candidate list and the MPM candidates in the MPM list. For example, if a total of 67 intra prediction modes are defined, the size of the MPM list is 6, and the size of the candidate list is 4, the remaining mode information (intra_luma_mpm_remainder) may be changed to indicate any one of the 57 (= 67 - 6 - 4) modes.
[0330] This embodiment relates to a method for deriving a DIPM for a multi-reference line (MRL) mode. In conventional MRL mode, the intra prediction mode for the MRL mode can be set as an MPM candidate from an MPM list excluding the planar mode. However, since the MPM list is constructed based on the intra prediction modes of neighboring blocks adjacent to the current block, applying the corresponding intra prediction mode to the MRL mode may not be accurate. Rather, more accurate predictions may be possible when using an intra prediction mode that considers distant reference samples. For this purpose, the aforementioned DIPM can be derived and utilized.
[0331] When the MRL mode is applied to DIPM, the template area for DIPM can be defined to include a reference sample line according to the MRL mode. That is, the template area discussed with reference to FIG. 4 can be modified for the MRL mode. For example, the template area according to the MRL mode can be defined as shown in FIG. 5. Referring to FIG. 5, the template area can include adjacent samples in both directions based on the reference sample line according to the MRL mode.
[0332] Alternatively, unavailable samples may not be included in the template area. If samples further from the current block than the reference sample line are unavailable, the template area may be defined using available samples. For example, the template area may be defined as shown in Fig. 6. In Fig. 6, it is assumed that samples further from the reference sample line are unavailable, while samples closer than the reference sample line are available. In this case, the template area may be defined using only available samples.
[0333] As seen with reference to Fig. 4, the template area defined for the MRL mode can also be variably determined based on at least one of the size or shape of the current block. In addition, W A , W AR , H A , W L , H L , H LB It may have the same meaning as the variable defined in Example 1, and may be variably determined based on the size of the current block or the location of the corresponding area.
[0334] Alternatively, for some reference sample lines, DIPM can be derived by the method described with reference to FIG. 4 without setting a separate template area for the MRL mode. For example, a template area can be defined for reference sample lines 0 or 2 as in Example 1. Here, reference sample line 0 can represent a reference sample line adjacent to the current block. Reference sample line 2 can represent a reference sample line 2 samples away from the current block.
[0335] The size of the candidate list for cases where MRL mode is applied to DIPM may differ from the size of the candidate list for cases where MRL mode is not applied to DIPM. For example, the size of the candidate list for cases where MRL mode is applied may be 5. In other words, the number of DIPMs that can be included in the candidate list may be 5. The method for constructing the candidate list is as described with reference to Fig. 4.
[0336] FIG. 8 illustrates a schematic configuration of a decoding device (300) that performs a decoding method according to the present disclosure.
[0337] Referring to FIG. 8, the decoding device (300) may include a DIPM derivation unit (800), a candidate list construction unit (810), a prediction block generation unit (820), and a restoration unit (830). The DIPM derivation unit (800), the candidate list construction unit (810), and the prediction block generation unit (820) may be provided in the intra prediction unit (331) of FIG. 3.
[0338] The DIPM induction unit (800) can perform the DIPM induction process according to S400. The candidate list construction unit (810) can perform the candidate list construction process according to S410. The prediction block generation unit (820) can perform the prediction block generation process according to S420. The restoration unit (830) can perform the current block restoration process according to S430.
[0339] FIG. 9 illustrates an encoding method performed by an encoding device (200) as an embodiment according to the present disclosure.
[0340] One or more DIPMs can be derived for the current block (S900). The DIPM derivation method is as described with reference to FIG. 4.
[0341] A candidate list for the current block can be constructed based on the DIPM(s) derived from S900 (S910). The method for constructing the candidate list is as described with reference to FIG. 4.
[0342] A prediction block of the current block can be generated based on the candidate list configured in S910 (S920). That is, an intra prediction mode of the current block can be derived based on any one of a plurality of DIPMs included in the candidate list, and a prediction block of the current block can be generated based on the derived intra prediction mode. At this time, a DIPM index indicating any one of the plurality of DIPMs can be encoded in the bitstream. Alternatively, the first DIPM among a plurality of DIPMDs included in the candidate list can be set as the intra prediction mode of the current block, and encoding of the DIPM index can be omitted.
[0343] Transform coefficients of the current block can be derived based on the residual block of the current block (S930). The residual block of the current block can be generated based on the prediction block generated in S920. Transform coefficients can be derived by performing at least one of transformation or quantization on the residual block. The transformation can be performed based on a non-separable transformation, and the non-separable transformation can be the NSPT or LFNST described above. When the non-directional mode is derived as DIPM, a transform set (or transform kernel) for NSPT / LFNST corresponding to the non-directional mode can be determined based on a table pre-defined in the encoding device and the decoding device, as described with reference to FIG. 4.
[0344] A bitstream can be generated by encoding residual information about the transform coefficients of the current block (S940).
[0345] Fig. 10 illustrates a schematic configuration of an encoding device (200) that performs an encoding method according to the present disclosure.
[0346] Referring to FIG. 10, the encoding device (200) may include a DIPM derivation unit (1000), a candidate list construction unit (1010), a prediction block generation unit (1020), a transform coefficient derivation unit (1030), and a residual information encoding unit (1040).
[0347] The DIPM derivation unit (1000), candidate list construction unit (1010), and prediction block generation unit (1020) may be provided in the intra prediction unit (222) of FIG. 2. The transform coefficient derivation unit (1030) may be provided in the residual processing unit (230) of FIG. 2. The residual information encoding unit (1040) may be provided in the entropy encoding unit (240).
[0348] The DIPM derivation unit (1000) can perform the DIPM derivation process according to S900. The candidate list construction unit (1010) can perform the candidate list construction process according to S910. The prediction block generation unit (1020) can perform the prediction block generation process according to S920. The transform coefficient derivation unit (1030) can perform the transform coefficient derivation process according to S930. The residual information encoding unit (1040) can perform the residual information encoding process according to S940.
[0349] In the embodiments described above, the methods are described based on a flowchart as a series of steps or blocks. However, the embodiments are not limited to the order of the steps, and some steps may occur in a different order or simultaneously with other steps described above. Furthermore, those skilled in the art will understand that the steps depicted in the flowchart are not exclusive, and other steps may be included, or one or more steps in the flowchart may be deleted without affecting the scope of the embodiments of this document.
[0350] The method according to the embodiments of the present document described above can be implemented in the form of software, and the encoding device and / or decoding device according to the present document can be included in a device that performs image processing, such as a TV, a computer, a smartphone, a set-top box, a display device, etc.
[0351] When the embodiments in this document are implemented as software, the above-described method can be implemented as a module (process, function, etc.) that performs the above-described function. The module can be stored in memory and executed by a processor. The memory can be internal or external to the processor and can be connected to the processor by various well-known means. The processor can include an application-specific integrated circuit (ASIC), another chipset, logic circuit, and / or data processing device. The memory can include a read-only memory (ROM), a random access memory (RAM), flash memory, a memory card, a storage medium, and / or other storage devices. That is, the embodiments described in this document can be implemented and performed on a processor, a microprocessor, a controller, or a chip. For example, the functional units illustrated in each drawing can be implemented and performed on a computer, a processor, a microprocessor, a controller, or a chip. In this case, information for implementation (e.g., information on instructions) or an algorithm can be stored on a digital storage medium.
[0352] In addition, the decoding device and encoding device to which the embodiment(s) of the present specification are applied may be included in a multimedia broadcasting transmitting and 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 a video communication, a mobile streaming device, a storage medium, a camcorder, a video-on-demand (VoD) service providing device, an OTT (Over the top video) device, an Internet streaming service providing device, a three-dimensional (3D) video device, a VR (virtual reality) device, an AR (argumente reality) device, a video phone video device, a transportation terminal (ex. a vehicle (including an autonomous vehicle) terminal, an airplane terminal, a ship terminal, etc.), and a medical video device, and may be used to process a video signal or a data signal. For example, the OTT (Over the top video) device may include a game console, a Blu-ray player, an Internet-connected TV, a home theater system, a smartphone, a tablet PC, a DVR (Digital Video Recorder), etc.
[0353] In addition, the processing method to which the embodiment(s) of the present specification are applied can be produced in the form of a computer-executable program and can be stored in a computer-readable recording medium. Multimedia data having a data structure according to the embodiment(s) of the present specification can also be stored in a computer-readable recording medium. The computer-readable recording medium includes all types of storage devices and distributed storage devices in which computer-readable data is stored. The computer-readable recording medium can 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. In addition, the computer-readable recording medium includes a medium implemented in the form of a carrier wave (e.g., transmission via the Internet). In addition, a bitstream generated by an encoding method can be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network.
[0354] Additionally, the embodiments of the present disclosure may be implemented as a computer program product by program code, and the program code may be executed on a computer by the embodiments of the present disclosure. The program code may be stored on a computer-readable carrier.
[0355] FIG. 11 illustrates an example of a content streaming system to which embodiments of the present disclosure can be applied.
[0356] Referring to FIG. 11, a content streaming system to which the embodiment(s) of the present specification are applied may largely include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.
[0357] The encoding server compresses content input from multimedia input devices such as smartphones, cameras, and camcorders into digital data, generates a bitstream, and transmits it to the streaming server. Alternatively, if multimedia input devices such as smartphones, cameras, and camcorders directly generate bitstreams, the encoding server may be omitted.
[0358] The above bitstream can be generated by an encoding method or a bitstream generation method to which the embodiment(s) of the present specification are applied, and the streaming server can temporarily store the bitstream during the process of transmitting or receiving the bitstream.
[0359] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server 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, and the streaming server transmits the multimedia data to the user. At this time, the content streaming system may include a separate control server, in which case the control server controls commands / responses between each device within the content streaming system.
[0360] The streaming server can receive content from a media repository and / or an encoding server. For example, when receiving content from the encoding server, the content can be received in real time. In this case, to provide a smooth streaming service, the streaming server can store the bitstream for a certain period of time.
[0361] Examples of the user devices may include mobile phones, smart phones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation devices, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glasses, HMDs), digital TVs, desktop computers, digital signage, etc.
[0362] Each server within the above content streaming system can be operated as a distributed server, in which case data received from each server can be processed in a distributed manner.
[0363] The claims set forth in this specification may be combined in various ways. For example, the technical features of the method claims of this specification may be combined and implemented as a device, and the technical features of the device claims of this specification may be combined and implemented as a method. Furthermore, the technical features of the method claims and the technical features of the device claims of this specification may be combined and implemented as a device, and the technical features of the method claims and the technical features of the device claims of this specification may be combined and implemented as a method.
Claims
1. A step of deriving one or more DIPMs (derived intra prediction modes) for the current block; A step of constructing a candidate list based on one or more of the above DIPMs; A step of generating a prediction block of the current block based on the candidate list; A method comprising the step of restoring a current block based on the predicted block and the residual block of the current block.
2. In paragraph 1, A method in which a non-directional mode is induced into DIPM when the average absolute deviation of the reconstructed samples within the surrounding area adjacent to the current block is less than or equal to a threshold value.
3. In paragraph 2, The above average absolute deviation is derived based on a given reference value, The above reference value is the mean, median, mode, maximum, or minimum value of the above-restored samples.
4. In paragraph 2, A method wherein the threshold value is determined based on at least one of the size or quantization parameters of the current block.
5. In paragraph 2, A method wherein either the planar mode or the DC mode, which are non-directional modes, are selectively induced into the DIPM.
6. In paragraph 2, A method wherein the non-directional mode is induced into the DIPM based on information indicating whether the non-directional mode is available to the DIPM.
7. In paragraph 1, The step of inducing one or more of the above DIPMs comprises: A method comprising the step of obtaining amplitude values for directional modes by applying a predetermined filter to samples belonging to a template area of the current block.
8. In paragraph 7, A method in which a non-directional mode is induced into DIPM when the amplitude values for the above directional modes are less than or equal to a threshold value.
9. In paragraph 7, A method in which a non-directional mode induces DIPM when the number of directional modes with similar amplitude values is P or more.
10. In paragraph 1, The step of inducing one or more of the above DIPMs comprises: A step of applying a predetermined filter to a sample belonging to a template area of the current block to derive a horizontal direction change amount and a vertical direction change amount in the sample; and A method comprising a step of obtaining an amplitude value for a directional mode based on the amount of change in the horizontal direction and the amount of change in the vertical direction.
11. In paragraph 10, A method in which the amplitude value for the directional mode is assigned to the non-directional mode when the amplitude value for the directional mode is less than or equal to a threshold value.
12. In paragraph 10, A method in which, if at least one of the magnitude of the horizontal direction change or the magnitude of the vertical direction change is less than or equal to a threshold value, the amplitude value for the directional mode is assigned to the non-directional mode.
13. A step of deriving one or more DIPMs (derived intra prediction modes) for the current block; A step of constructing a candidate list based on one or more of the above DIPMs; A step of generating a prediction block of the current block based on the candidate list; A step of generating a residual block of the current block based on a prediction block of the current block; A step of deriving transform coefficients of the current block based on the residual block; and A method comprising a step of encoding residual information regarding the above transform coefficients.
14. A computer-readable storage medium storing a bitstream generated by the method according to Article 13.
15. A step of obtaining a bitstream for image information; wherein the bitstream is generated based on a step of deriving one or more DIPMs (derived intra prediction modes) for a current block, a step of constructing a candidate list based on the one or more DIPMs, a step of generating a prediction block of the current block based on the candidate list, a step of generating a residual block of the current block based on the prediction block of the current block, a step of deriving transform coefficients of the current block based on the residual block, and a step of encoding residual information about the transform coefficients, and A method comprising the step of transmitting data including the bitstream.
Citation Information
Patent Citations
Video encoding apparatus for performing intra-prediction based on directionality of neighboring block, video decoding apparatus and video decoding method for performing the same
KR101713295B1
Organoid seed preparing method and organoid seed preparing apparatus for preparing organoid
KR1020240092558A
Gel-type hairdye using natural materials and its manufacturing method
KR102170417B1
A cationic compound having aggregation-induced emission properties and uses thereof
KR102875465B1
KR20240026180A