VIDEO ENCODING/DECODING METHOD AND RECORDING MEDIUM FOR STORING BITSTREAM
A video encoding/decoding method according to the present invention comprise the steps of: dividing a chroma block into a plurality of partitions; and performing intra-prediction for each of the partitions in the chroma block.
Latest KT CORPORATION Patents:
- IMAGE ENCODING/DECODING METHOD AND APPARATUS
- METHOD AND APPARATUS FOR PERFORMING RANDOM ACCESS PROCEDURE FOR COVERAGE ENHANCEMENT
- METHOD FOR REFINING A MOTION VECTOR DERIVED UNDER A MERGE MODE USING A DIFFERENCE VECTOR
- VIDEO SIGNAL PROCESSING METHOD AND DEVICE FOR PERFORMING INTRA-PREDICTION FOR AN ENCODING/DECODING TARGET BLOCK
- VIDEO SIGNAL ENCODING/DECODING METHOD, AND RECORDING MEDIUM HAVING BITSTREAM STORED THEREON
The present disclosure relates to a method and a device for processing an image signal.
BACKGROUND ARTRecently, demands for high-resolution and high-quality images such as HD (High Definition) images and UHD (Ultra High Definition) images have increased in a variety of application fields. As image data becomes high-resolution and high-quality, the volume of data relatively increases compared to the existing image data, so when image data is transmitted by using media such as the existing wire and wireless broadband circuit or is stored by using the existing storage medium, expenses for transmission and expenses for storage increase. High efficiency image compression technologies may be utilized to resolve these problems which are generated as image data becomes high-resolution and high-quality.
There are various technologies such as an inter prediction technology which predicts a pixel value included in a current picture from a previous or subsequent picture of a current picture with an image impression technology, an intra prediction technology which predicts a pixel value included in a current picture by using pixel information in a current picture, an entropy encoding technology which assigns a short sign to a value with high appearance frequency and assigns a long sign to a value with low appearance frequency and so on, and image data may be effectively compressed and transmitted or stored by using these image compression technologies.
On the other hand, as demands for a high-resolution image have increased, demands for stereo-scopic image contents have increased as a new image service. A video compression technology for effectively providing high-resolution and ultra high-resolution stereo-scopic image contents has been discussed.
DISCLOSURE Technical ProblemIn encoding/decoding an image signal, the present disclosure is to provide a method and a device for predicting a chroma block by using a reconstructed luma block.
In encoding/decoding an image signal, the present disclosure is to provide a method and a device for predicting a chroma block based on the linearity of a luma component and a chroma component.
In encoding/decoding an image signal, the present disclosure is to provide a method and a device for deriving encoding/decoding information on a chroma block from a collocated luma block.
Technical effects of the present disclosure may be non-limited by the above-mentioned technical effects, and other unmentioned technical effects may be clearly understood from the following description by those having ordinary skill in the technical field to which the present disclosure pertains.
Technical SolutionAn image encoding/decoding method according to the present disclosure may include partitioning a chroma block into a plurality of partitions; and performing intra prediction for each of the partitions in the chroma block. In this case, a partition type of the chroma block may be determined based on at least one of a partition type or a directionality of a collocated luma block of the chroma block.
In an image decoding/encoding method according to the present disclosure, the partition type of the chroma block may be set to be the same as the partition type of the collocated luma block.
In an image decoding/encoding method according to the present disclosure, the plurality of partitions may be generated by partitioning the chroma block in a horizontal direction or in a vertical direction, and a division direction of the chroma block may be determined based on the directionality of the collocated luma block.
In an image decoding/encoding method according to the present disclosure, decoding order for a plurality of partitions in the chroma block may be determined based on the directionality of the collocated luma block.
An image decoding/encoding method according to the present disclosure may further include determining whether to perform flipping on the chroma block. In this case, the flipping for the chroma block may be performed for at least one of a horizontal direction or a vertical direction.
In an image decoding/encoding method according to the present disclosure, whether to perform the flipping and a direction in which the flipping is performed may be determined based on the directionality of the collocated luma block.
In an image decoding/encoding method according to the present disclosure, the flipping may be allowed only when the collocated luma block is encoded by intra prediction.
In an image decoding/encoding method according to the present disclosure, an intra prediction mode of each of the plurality of partitions in the chroma block may be set to be the same as an intra prediction mode of each of a plurality of partitions included in the collocated luma block.
In an image decoding/encoding method according to the present disclosure, a predefined intra prediction mode may be applied to a partition corresponding to a region with a large prediction error in the collocated luma block among the plurality of partitions in the chroma block, and an intra prediction mode of the collocated luma block may be applied to a partition that does not.
In an image decoding/encoding method according to the present disclosure, whether a sub-region in the collocated luma block is a region with a large prediction error may be determined by comparing an average value of absolute values of residual samples in the sub-region with a threshold value.
In an image decoding/encoding method according to the present disclosure, the threshold value may be derived based on an average value of absolute values of residual samples in the collocated luma block.
In an image decoding/encoding method according to the present disclosure, the directionality of the collocated luma block may be determined based on an optimal intra prediction mode derived according to a result of performing intra prediction performed based on predefined intra prediction modes and reference samples around the collocated luma block.
In an image decoding/encoding method according to the present disclosure, the directionality of the collocated luma block may be set to be the same as a directionality of a reference block in which the collocated luma block is included.
A computer readable recording medium storing a bitstream encoded by an image encoding method according to the present disclosure may be provided.
Technical EffectAccording to the present disclosure, encoding/decoding efficiency may be improved by predicting a chroma block by using a reconstructed luma block.
According to the present disclosure, the accuracy of intra prediction may be improved by predicting a chroma block based on the linearity of a luma component and a chroma component.
According to the present disclosure, compression efficiency for a chroma block may be improved by deriving encoding/decoding information of a chroma block by referring to a collocated luma block.
Effects obtainable from the present disclosure are not limited to the above-mentioned effects and other unmentioned effects may be clearly understood from the following description by those having ordinary skill in the technical field to which the present disclosure pertains.
As the present disclosure may make various changes and have several embodiments, specific embodiments will be illustrated in a drawing and described in detail. But, it is not intended to limit the present disclosure to a specific embodiment, and it should be understood that it includes all changes, equivalents or substitutes included in an idea and a technical scope for the present disclosure. A similar reference numeral was used for a similar component while describing each drawing.
A term such as first, second, etc. may be used to describe various components, but the components should not be limited by the terms. The terms are used only to distinguish one component from other components. For example, without going beyond a scope of a right of the present disclosure, a first component may be referred to as a second component and similarly, a second component may be also referred to as a first component. A term of and/or includes a combination of a plurality of relative entered items or any item of a plurality of relative entered items.
When a component is referred to as being “linked” or “connected” to other component, it should be understood that it may be directly linked or connected to that other component, but other component may exist in the middle. On the other hand, when a component is referred to as being “directly linked” or “directly connected” to other component, it should be understood that other component does not exist in the middle.
As terms used in this application are just used to describe a specific embodiment, they are not intended to limit the present disclosure. Expression of the singular includes expression of the plural unless it clearly has a different meaning contextually. In this application, it should be understood that a term such as “include” or “have”, etc. is to designate the existence of characteristics, numbers, steps, motions, components, parts or their combinations entered in the specification, but is not to exclude a possibility of addition or existence of one or more other characteristics, numbers, steps, motions, components, parts or their combinations in advance.
Hereinafter, referring to the attached drawings, a desirable embodiment of the present disclosure will be described in more detail. Hereinafter, the same reference numeral is used for the same component in a drawing and an overlapping description for the same component is omitted.
Referring to
As each construction unit shown in
Further, some components may be just an optional component for improving performance, not a necessary component which perform an essential function in the present disclosure. The present disclosure may be implemented by including only a construction unit necessary for implementing the essence of the present disclosure excluding a component used to just improve performance, and a structure including only a necessary component excluding an optional component used to just improve performance is also included in a scope of a right of the present disclosure.
A picture partitioning unit 110 may partition an input picture into at least one processing unit. In this case, a processing unit may be a prediction unit (PU), a transform unit (TU) or a coding unit (CU). In a picture partitioning unit 110, one picture may be partitioned into a combination of a plurality of coding units, prediction units and transform units and a picture may be encoded by selecting a combination of one coding unit, prediction unit and transform unit according to a predetermined standard (e.g., a cost function).
For example, one picture may be partitioned into a plurality of coding units. In order to partition a coding unit in a picture, a recursive tree structure such as a quad tree may be used, and a coding unit which is partitioned into other coding units by using one image or the largest coding unit as a route may be partitioned with as many child nodes as the number of partitioned coding units. A coding unit which is no longer partitioned according to a certain restriction becomes a leaf node. In other words, when it is assumed that only square partitioning is possible for one coding unit, one coding unit may be partitioned into up to four other coding units.
Hereinafter, in an embodiment of the present disclosure, a coding unit may be used as a unit for encoding or may be used as a unit for decoding.
A prediction unit may be partitioned with at least one square or rectangular shape, etc. in the same size in one coding unit or may be partitioned so that any one prediction unit of prediction units partitioned in one coding unit can have a shape and/or a size different from another prediction unit.
When a prediction unit for which intra prediction is performed based on a coding unit is generated and it is not the minimum coding unit, intra prediction may be performed without being partitioned into a plurality of prediction units N×N.
Prediction units 120 and 125 may include an inter prediction unit 120 performing inter prediction and an intra prediction unit 125 performing intra prediction. Whether to perform inter prediction or intra prediction for a coding unit may be determined and detailed information according to each prediction method (e.g., an intra prediction mode, a motion vector, a reference picture, etc.) may be determined. In this case, a processing unit that prediction is performed may be different from a processing unit that a prediction method and details are determined. For example, a prediction method, a prediction mode, etc. may be determined in a prediction unit and prediction may be performed in a transform unit. A residual value (a residual block) between a generated prediction block and an original block may be input to a transform unit 130. In addition, prediction mode information, motion vector information, etc. used for prediction may be encoded with a residual value in an entropy encoding unit 165 and may be transmitted to a decoding device. When a specific encoding mode is used, an original block may be encoded as it is and transmitted to a decoding unit without generating a prediction block through prediction units 120 or 125.
An inter prediction unit 120 may predict a prediction unit based on information on at least one picture of a previous picture or a subsequent picture of a current picture, or in some cases, may predict a prediction unit based on information on some encoded regions in a current picture. An inter prediction unit 120 may include a reference picture interpolation unit, a motion prediction unit and a motion compensation unit.
A reference picture interpolation unit may receive reference picture information from a memory 155 and generate pixel information equal to or less than an integer pixel in a reference picture. For a luma pixel, a 8-tap DCT-based interpolation filter having a different filter coefficient may be used to generate pixel information equal to or less than an integer pixel in a ¼ pixel unit. For a chroma signal, a 4-tap DCT-based interpolation filter having a different filter coefficient may be used to generate pixel information equal to or less than an integer pixel in a ⅛ pixel unit.
A motion prediction unit may perform motion prediction based on a reference picture interpolated by a reference picture interpolation unit. As a method for calculating a motion vector, various methods such as FBMA (Full search-based Block Matching Algorithm), TSS (Three Step Search), NTS (New Three-Step Search Algorithm), etc. may be used. A motion vector may have a motion vector value in a ½ or ¼ pixel unit based on an interpolated pixel. A motion prediction unit may predict a current prediction unit by varying a motion prediction method. As a motion prediction method, various methods such as a skip method, a merge method, an advanced motion vector prediction (AMVP) method, an intra block copy method, etc. may be used.
An intra prediction unit 125 may generate a prediction unit based on reference pixel information around a current block which is pixel information in a current picture. When a neighboring block in a current prediction unit is a block which performed inter prediction and accordingly, a reference pixel is a pixel which performed inter prediction, a reference pixel included in a block which performed inter prediction may be used by being replaced with reference pixel information of a surrounding block which performed intra prediction. In other words, when a reference pixel is unavailable, unavailable reference pixel information may be used by being replaced with at least one reference pixel of available reference pixels.
A prediction mode in intra prediction may have a directional prediction mode using reference pixel information according to a prediction direction and a non-directional mode not using directional information when performing prediction. A mode for predicting luma information may be different from a mode for predicting chroma information and intra prediction mode information used for predicting luma information or predicted luma signal information may be utilized to predict chroma information.
When a size of a prediction unit is the same as that of a transform unit in performing intra prediction, intra prediction for a prediction unit may be performed based on a pixel at a left position of a prediction unit, a pixel at a top-left position and a pixel at a top position. However, if a size of a prediction unit is different from a size of a transform unit when intra prediction is performed, intra prediction may be performed by using a reference pixel based on a transform unit. In addition, intra prediction using N×N partition may be used only for the minimum coding unit.
An intra prediction method may generate a prediction block after applying an adaptive intra smoothing (AIS) filter to a reference pixel according to a prediction mode. A type of an AIS filter applied to a reference pixel may be different. In order to perform an intra prediction method, an intra prediction mode in a current prediction unit may be predicted from an intra prediction mode in a prediction unit around a current prediction unit. When a prediction mode in a current prediction unit is predicted by using mode information predicted from a surrounding prediction unit, information that a prediction mode in a current prediction unit is the same as a prediction mode in a surrounding prediction unit may be transmitted by using predetermined flag information if an intra prediction mode in a current prediction unit is the same as an intra prediction mode in a surrounding prediction unit, and prediction mode information of a current block may be encoded by performing entropy encoding if a prediction mode in a current prediction unit is different from a prediction mode in a surrounding prediction unit.
In addition, a residual block may be generated which includes information on a residual value that is a difference value between a prediction unit which performed prediction based on a prediction unit generated in prediction units 120 and 125 and an original block in a prediction unit. A generated residual block may be input to a transform unit 130.
A transform unit 130 may transform an original block and a residual block including residual value information in a prediction unit generated through prediction units 120 and 125 by using a transform method such as DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), KLT. Whether to apply DCT, DST or KLT to transform a residual block may be determined based on intra prediction mode information in a prediction unit used to generate a residual block.
A quantization unit 135 may quantize values transformed into a frequency domain in a transform unit 130. A quantization coefficient may be changed according to a block or importance of an image. A value calculated in a quantization unit 135 may be provided to a dequantization unit 140 and a rearrangement unit 160.
A rearrangement unit 160 may perform rearrangement of a coefficient value for a quantized residual value.
A rearrangement unit 160 may change a coefficient in a shape of a two-dimensional block into a shape of a one-dimensional vector through a coefficient scan method. For example, a rearrangement unit 160 may scan a DC coefficient to a coefficient in a high-frequency domain by using a zig-zag scan method and change it into a shape of a one-dimensional vector. According to a size of a transform unit and an intra prediction mode, instead of zig-zag scan, vertical scan where a coefficient in a shape of a two-dimensional block is scanned in a column direction or horizontal scan where a coefficient in a shape of a two-dimensional block is scanned in a row direction may be used. In other words, which scan method among zig-zag scan, vertical directional scan and horizontal directional scan will be used may be determined according to a size of a transform unit and an intra prediction mode.
An entropy encoding unit 165 may perform entropy encoding based on values calculated by a rearrangement unit 160. Entropy encoding, for example, may use various encoding methods such as exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), CABAC (Context-Adaptive Binary Arithmetic Coding).
An entropy encoding unit 165 may encode a variety of information such as residual value coefficient information and block type information in a coding unit, prediction mode information, partitioning unit information, prediction unit information and transmission unit information, motion vector information, reference frame information, block interpolation information, filtering information, etc. from a rearrangement unit 160 and prediction units 120 and 125.
An entropy encoding unit 165 may perform entropy encoding for a coefficient value in a coding unit which is input from a rearrangement unit 160.
A dequantization unit 140 and an inverse transform unit 145 dequantize values quantized in a quantization unit 135 and inversely transform values transformed in a transform unit 130. A residual value generated by a dequantization unit 140 and an inverse transform unit 145 may be combined with a prediction unit predicted by a motion prediction unit, a motion compensation unit and an intra prediction unit included in prediction units 120 and 125 to generate a reconstructed block.
A filter unit 150 may include at least one of a deblocking filter, an offset correction unit and an adaptive loop filter (ALF).
A deblocking filter may remove block distortion which is generated by a boundary between blocks in a reconstructed picture. In order to determine whether deblocking is performed, whether a deblocking filter will be applied to a current block may be determined based on a pixel included in several rows or columns included in a block. When a deblocking filter is applied to a block, a strong filter or a weak filter may be applied according to required deblocking filtering strength. In addition, in applying a deblocking filter, when horizontal filtering and vertical filtering are performed, horizontal directional filtering and vertical directional filtering may be set to be processed in parallel.
An offset correction unit may correct an offset with an original image in a unit of a pixel for an image that deblocking was performed. In order to perform offset correction for a specific picture, a region where an offset will be performed may be determined after dividing a pixel included in an image into the certain number of regions and a method in which an offset is applied to a corresponding region or a method in which an offset is applied by considering edge information of each pixel may be used.
Adaptive loop filtering (ALF) may be performed based on a value obtained by comparing a filtered reconstructed image with an original image. After a pixel included in an image is divided into predetermined groups, filtering may be discriminately performed per group by determining one filter which will be applied to a corresponding group. Information related to whether to apply ALF may be transmitted per coding unit (CU) for a luma signal and a shape and a filter coefficient of an ALF filter to be applied may vary according to each block. In addition, an ALF filter in the same shape (fixed shape) may be applied regardless of a characteristic of a block to be applied.
A memory 155 may store a reconstructed block or picture calculated through a filter unit 150 and a stored reconstructed block or picture may be provided to prediction units 120 and 125 when performing inter prediction.
Referring to
When an image bitstream is input from an image encoding device, an input bitstream may be decoded according to a procedure opposite to that of an image encoding device.
An entropy decoding unit 210 may perform entropy decoding according to a procedure opposite to a procedure in which entropy encoding is performed in an entropy encoding unit of an image encoding device. For example, in response to a method performed in an image encoding device, various methods such as Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), CABAC (Context-Adaptive Binary Arithmetic Coding) may be applied.
An entropy decoding unit 210 may decode information related to intra prediction and inter prediction performed in an encoding device.
A rearrangement unit 215 may perform rearrangement based on a method that a bitstream entropy-decoded in an entropy decoding unit 210 is rearranged in an encoding unit. Coefficients expressed in a form of a one-dimensional vector may be rearranged by being reconstructed into coefficients in a form of a two-dimensional block. A rearrangement unit 215 may receive information related to coefficient scanning performed in an encoding unit and perform rearrangement through a method in which scanning is inversely performed based on scanning order performed in a corresponding encoding unit.
A dequantization unit 220 may perform dequantization based on a quantization parameter provided from an encoding device and a coefficient value of a rearranged block.
An inverse transform unit 225 may perform transform performed in a transform unit, i.e., inverse transform for DCT, DST, and KLT, i.e., inverse DCT, inverse DST and inverse KLT for a result of quantization performed in an image encoding device. Inverse transform may be performed based on a transmission unit determined in an image encoding device. In an inverse transform unit 225 of an image decoding device, a transform technique (for example, DCT, DST, KLT) may be selectively performed according to a plurality of information such as a prediction method, a size of a current block, a prediction mode, etc.
Prediction units 230 and 235 may generate a prediction block based on information related to generation of a prediction block provided from an entropy decoding unit 210 and pre-decoded block or picture information provided from a memory 245.
As described above, when a size of a prediction unit is the same as a size of a transform unit in performing intra prediction in the same manner as an operation in an image encoding device, intra prediction for a prediction unit may be performed based on a pixel at a left position of a prediction unit, a pixel at a top-left position and a pixel at a top position, but when a size of a prediction unit is different from a size of a transform unit in performing intra prediction, intra prediction may be performed by using a reference pixel based on a transform unit. In addition, intra prediction using N×N partitioning may be used only for the smallest coding unit.
Prediction units 230 and 235 may include a prediction unit determination unit, an inter prediction unit and an intra prediction unit. A prediction unit determination unit may receive a variety of information such as prediction unit information, prediction mode information of an intra prediction method, motion prediction-related information of an inter prediction method, etc. which are input from an entropy decoding unit 210, divide a prediction unit in a current coding unit and determine whether a prediction unit performs inter prediction or intra prediction. An inter prediction unit 230 may perform inter prediction for a current prediction unit based on information included in at least one picture of a previous picture or a subsequent picture of a current picture including a current prediction unit by using information necessary for inter prediction in a current prediction unit provided from an image encoding device. Alternatively, inter prediction may be performed based on information on some regions which are pre-reconstructed in a current picture including a current prediction unit.
In order to perform inter prediction, whether a motion prediction method in a prediction unit included in a corresponding coding unit is a skip mode, a merge mode, an AMVP mode, or an intra block copy mode may be determined based on a coding unit.
An intra prediction unit 235 may generate a prediction block based on pixel information in a current picture. When a prediction unit is a prediction unit which performed intra prediction, intra prediction may be performed based on intra prediction mode information in a prediction unit provided from an image encoding device. An intra prediction unit 235 may include an adaptive intra smoothing (AIS) filter, a reference pixel interpolation unit and a DC filter. As a part performing filtering on a reference pixel of a current block, an AIS filter may be applied by determining whether a filter is applied according to a prediction mode in a current prediction unit. AIS filtering may be performed for a reference pixel of a current block by using AIS filter information and a prediction mode in a prediction unit provided from an image encoding device. When a prediction mode of a current block is a mode which does not perform AIS filtering, an AIS filter may not be applied.
When a prediction mode in a prediction unit is a prediction unit which performs intra prediction based on a pixel value which interpolated a reference pixel, a reference pixel interpolation unit may interpolate a reference pixel to generate a reference pixel in a unit of a pixel equal to or less than an integer value. When a prediction mode in a current prediction unit is a prediction mode which generates a prediction block without interpolating a reference pixel, a reference pixel may not be interpolated. A DC filter may generate a prediction block through filtering when a prediction mode of a current block is a DC mode.
A reconstructed block or picture may be provided to a filter unit 240. A filter unit 240 may include a deblocking filter, an offset correction unit and an ALF.
Information on whether a deblocking filter was applied to a corresponding block or picture and information on whether a strong filter or a weak filter was applied when a deblocking filter was applied may be provided from an image encoding device. Information related to a deblocking filter provided from an image encoding device may be provided in a deblocking filter of an image decoding device and deblocking filtering for a corresponding block may be performed in an image decoding device.
An offset correction unit may perform offset correction on a reconstructed image based on offset value information, a type of offset correction, etc. applied to an image when performing encoding.
An ALF may be applied to a coding unit based on information on whether ALF is applied, ALF coefficient information, etc. provided from an encoding device. Such ALF information may be provided by being included in a specific parameter set.
A memory 245 may store a reconstructed picture or block for use as a reference picture or a reference block and provide a reconstructed picture to an output unit.
As described above, hereinafter, in an embodiment of the present disclosure, a coding unit is used as a term of a coding unit for convenience of a description, but it may be a unit which performs decoding as well as encoding.
In addition, as a current block represents a block to be encoded/decoded, it may represent a coding tree block (or a coding tree unit), a coding block (or a coding unit), a transform block (or a transform unit) or a prediction block (or a prediction unit), etc. according to an encoding/decoding step. In this specification, ‘unit’ may represent a base unit for performing a specific encoding/decoding process and ‘block’ may represent a pixel array in a predetermined size. Unless otherwise classified, ‘block’ and ‘unit’ may be used interchangeably. For example, in the after-described embodiment, it may be understood that a coding block (a coding block) and a coding unit (a coding unit) are used interchangeably.
Referring to
A current block may use one or more of a plurality of reference line candidates pre-defined in an image encoding/decoding device as a reference line for intra prediction. Here, a plurality of pre-defined reference line candidates may include a neighboring reference line adjacent to a current block to be decoded and N non-neighboring reference lines 1-sample to N-samples away from a boundary of a current block. N may be an integer of 1, 2, 3 or more. Hereinafter, for convenience of a description, it is assumed that a plurality of reference line candidates available for a current block consist of a neighboring reference line candidate and three non-neighboring reference line candidates, but it is not limited thereto. In other words, of course, a plurality of reference line candidates available for a current block may include four or more non-neighboring reference line candidates.
An image encoding device may determine an optimal reference line candidate among a plurality of reference line candidates and encode an index for specifying it. An image decoding device may determine a reference line of a current block based on an index signaled through a bitstream. The index may specify any one of a plurality of reference line candidates. A reference line candidate specified by the index may be used as a reference line of a current block.
The number of indexes signaled to determine a reference line of a current block may be 1, 2 or more. As an example, when the number of indexes signaled above is 1, a current block may perform intra prediction by using only a single reference line candidate specified by the signaled index among a plurality of reference line candidates. Alternatively, when the number of indexes signaled above is at least two, a current block may perform intra prediction by using a plurality of reference line candidates specified by a plurality of indexes among a plurality of reference line candidates.
Referring to
Referring to
A directional mode may be expanded more than shown in
In
A scope of available wide-angle intra prediction modes may be adaptively determined according to a width-to-height ratio of a current block. Table 1 shows a scope of available wide-angle intra prediction modes according to a width-to-height ratio of a current block.
Among the plurality of intra prediction modes, K candidate modes (most probable mode, MPM) may be selected. A candidate list including a selected candidate mode may be generated. An index indicating any one of candidate modes belonging to a candidate list may be signaled. An intra prediction mode of a current block may be determined based on a candidate mode indicated by the index. As an example, a candidate mode indicated by the index may be configured as an intra prediction mode of a current block. Alternatively, an intra prediction mode of a current block may be determined based on a value of a candidate mode indicated by the index and a predetermined difference value. The difference value may be defined as a difference between a value of an intra prediction mode of the current block and a value of a candidate mode indicated by the index. The difference value may be signaled through a bitstream. Alternatively, the difference value may be a value pre-defined in an image encoding/decoding device. Alternatively, an intra prediction mode of a current block may be determined based on a flag showing whether a mode identical to an intra prediction mode of a current block exists in the candidate list. As an example, when the flag is a first value, an intra prediction mode of a current block may be determined from the candidate list. In this case, an index indicating any one of a plurality of candidate modes belonging to a candidate list may be signaled. A candidate mode indicated by the index may be configured as an intra prediction mode of a current block. On the other hand, when the flag is a second value, any one of the remaining intra prediction modes may be configured as an intra prediction mode of a current block. The remaining intra prediction modes may refer to a mode excluding a candidate mode belonging to the candidate list among a plurality of pre-defined intra prediction modes. When the flag is a second value, an index indicating any one of the remaining intra prediction modes may be signaled. An intra prediction mode indicated by the signaled index may be configured as an intra prediction mode of a current block. An intra prediction mode of a chroma block may be selected among intra prediction mode candidates of a plurality of chroma blocks. To this end, index information indicating one of intra prediction mode candidates of a chroma block may be explicitly encoded and signaled through a bitstream. Table 2 illustrates intra prediction mode candidates of a chroma block.
In an example of Table 2, a direct mode (DM) refers to setting an intra prediction mode of a luma block existing at the same position as a chroma block as an intra prediction mode of a chroma block. Meanwhile, a luma block existing at the same position as a chroma block may be determined based on a position of a top-left sample or a position of a center sample of a chroma block. As an example, if an intra prediction mode (a luma mode) of a luma block is No. 0 (a planar mode) and an index indicates No. 2, an intra prediction mode of a chroma block may be determined as a horizontal mode (No. 18). As an example, if an intra prediction mode (a luma mode) of a luma block is No. 1 (a DC mode) and an index indicates No. 0, an intra prediction mode of a chroma block may be determined as a planar mode (No. 0).
As a result, an intra prediction mode of a chroma block may be also set as one of intra prediction modes shown in
Referring to
Hereinafter, an intra prediction method per intra prediction mode is described in detail by referring to
Referring to
(α×P1+β×P2)/(α+β) [Equation 1]
In Equation 1, weight α and β may be determined by considering a width and a height of a current block. According to a width and a height of a current block, weight α and β may have the same value or a different value. If a width and a height of a current block are the same, weight α and β may be configured to be the same and a prediction sample of a current sample may be configured as an average value of P1 and P2. When a width and a height of a current block are not the same, weight α and β may have a different value. As an example, when a width is greater than a height, a smaller value may be configured to a weight corresponding to a width of a current block and a larger value may be configured to a weight corresponding to a height of a current block. Conversely, when a width is greater than a height, a larger value may be configured to a weight corresponding to a width of a current block and a smaller value may be configured to a weight corresponding to a height of a current block. Here, a weight corresponding to a width of a current block may refer to β and a weight corresponding to a height of a current block may refer to a.
Referring to
When an intra prediction mode of a current block is a directional mode, projection may be performed to a reference line according to an angle of a corresponding directional mode. When a reference sample exists at a projected position, a corresponding reference sample may be configured as a prediction sample of a current sample. If a reference sample does not exist at a projected position, a sample corresponding to a projected position may be generated by using one or more surrounding samples neighboring a projected position. As an example, interpolation may be performed based on two or more surrounding samples neighboring bidirectionally based on a projected position to generate a sample corresponding to a projected position. Alternatively, one surrounding sample neighboring a projected position may be configured as a sample corresponding to a projected position. In this case, among a plurality of surrounding samples neighboring a projected position, a surrounding sample closest to a projected position may be used. A sample corresponding to a projected position may be configured as a prediction sample of a current sample.
Referring to
In an example of
Variable w may be derived as in Equation 2 below.
w=h tan θ [Equation 2]
Then, if an integer position is removed from variable w, finally, a fractional position may be derived.
A fractional position sample may be generated by interpolating adjacent integer position reference samples. As an example, a fractional position reference sample at a x position may be generated by interpolating integer position reference sample R2 and integer position reference sample R3.
In deriving a fractional position sample, a scaling factor may be used to avoid a real number operation. As an example, when scaling factor f is set as 32, as in an example shown in
In addition, a tangent value for angle θ determined according to directivity of an intra prediction mode may be also scaled up by using the same scaling factor (e.g., 32).
If a tangent value (tan θ) for an angle value of an intra prediction mode is positive, intra prediction may be performed by using only one of reference samples belonging to a top line of a current block (i.e., top reference samples) or reference samples belonging to a left line of a current block (i.e., left reference samples). Meanwhile, when a tangent value for an angle value of an intra prediction mode is negative, both reference samples at a top position and reference samples at a left position are used.
In this case, in order to simplify implementation, left reference samples may be projected to the top or may be projected to the left to arrange reference samples in a 1D array form, and reference samples in a 1D array form may be used to perform intra prediction.
When an intra prediction mode of a current block is one of mode no. 34 to mode no. 49, intra prediction is performed by using not only top reference samples of a current block, but also left reference samples. In this case, as in an example shown in
As an example, when a reference sample for position A on the top of a current block is obtained, considering directivity of an intra prediction mode of a current block, projection may be performed on a left line of a current block at position A on a top line. If a projected position is called a, a value corresponding to position a may be copied or a fractional position value corresponding to a may be generated and set as a value of position A. As an example, if position a is an integer position, a value of position A may be generated by copying an integer position reference sample. On the other hand, when position a is a fractional position, a reference sample at a top position of position a and a reference sample at a bottom position of position a may be interpolated and an interpolated value may be set as a value of position A. Meanwhile, at position A on the top of a current block, a direction projected to a left line of a current block may be parallel to and opposite to a direction of an intra prediction mode of a current block.
In
Variable h may be derived as in Equation 3 below.
h=w/tan θ [Equation 3]
Afterwards, if an integer position is removed from variable h, a fractional position may be derived finally.
In deriving a fractional position sample, a scaling factor may be used to avoid a real number operation. As an example, a tangent value for variable θ may be scaled by using scaling factor f1. Here, since a direction projected to a left line is parallel and opposite to a directional prediction mode, a scaled tangent value shown in
When scaling factor f1 is applied, Equation 3 may be modified and used as in Equation 4 below.
h=(w*f1*f2)/(f1*tan θ) [Equation 4]
In the same way as above, a 1D reference sample array may be configured only with reference samples belonging to a top line. As a result, intra prediction for a current block may be performed by using only top reference samples composed of 1D arrays.
As in an example shown in
Contrary to what is shown in
As described above, a picture may be encoded/decoded in a unit of a block. As an example, a picture may be partitioned into blocks in a predetermined size. A block in a predetermined size may be referred to as a coding tree block (or a coding tree unit) or a reference block. Information showing a size of a reference block may be signaled through a bitstream. As an example, information showing a size of a coding tree block may be encoded through a sequence parameter set or a picture header.
Afterwards, a reference block may be added as blocks in various sizes based on at least one of tree structures predefined in a reference block. Then, encoding/decoding processing such as prediction, transform, quantization and/or entropy encoding, etc. may be performed for each partitioned block. Each partitioned block may be a coding block, a prediction block or a transform block.
Meanwhile, for a color picture, a luma picture and a chroma picture are encoded/decoded, respectively. In this case, a chroma picture usually has a characteristic similar to that of a luma picture. In other words, a characteristic of chroma samples in a chroma picture tends to be similar to a characteristic of collocated luma samples in a luma picture. This characteristic may be used to independently determine a partition structure for a reference block only for one reference component among the color components, and a tree structure determined in an existing component may be applied equally to other components. As such, a partition structure in which a tree partition structure of a reference component is applied to other components as it is may be referred to as a single tree structure.
Meanwhile, in embodiments described below, it is assumed that a reference component is a luma component. In other words, it is assumed that while a tree partition structure is independently applied to a luma component, a tree partition structure of a luma component is applied as it is to a chroma component.
Information about a tree partition structure in a reference component may be explicitly encoded and signaled. As an example, tree partition structure information about a luma reference block may be encoded and signaled. On the other hand, for a chroma reference block, encoding/decoding of tree partition structure information may be omitted and tree partition structure information in a luma reference block may be used in the same manner.
As in an example shown in
Meanwhile, encoding/decoding may be performed in the alternating order of a luma component and a chroma component. As an example, in
Meanwhile, a partition structure in which a tree structure for each color component is independently determined may be referred to as a dual tree structure. When a dual tree structure is applied, the information of a tree partition structure for a luma component and the information of a tree partition structure for a chroma component may be independently encoded and signaled.
When a dual tree structure is applied, after encoding/decoding for any one component ends, encoding/decoding for a next component may strat.
As an example, after encoding/decoding for a luma component picture ends, encoding/decoding for a chroma component picture may be performed.
Alternatively, inter-component encoding/decoding order may be set in a unit of a reference block. As an example, after encoding/decoding for a luma component reference block ends, encoding/decoding for a chroma component reference block may be performed.
In an example shown in
A reconstructed luma block may be used to perform prediction on a chroma block. As above, a prediction model using a different color component may be referred to as a cross-component linear model (CCLM). When a CCLM is applied, a process of deriving an intra prediction mode of a chroma block may be omitted based on an intra prediction mode of a luma block.
Referring to
When an image format is not 4:4:4, a luma block is downsampled and adjusted to have the same size as a chroma block.
For convenience of a description, it is assumed that an image format is 4:2:0.
When an image format is 4:2:0, as in an example shown in
Downsampled_Luma[w][h]=(Luma[2*w][2*h−1]+Luma[2*w−1][2*h]+4*Luma[2*w][2*h]+Luma[2*w+1][2*h]+Luma[2*w][2*h+1]+4)>3 [Equation 5]
In Equation 5, Downsampled_Luma refers to a sample value in a downsampled luma block, and Luma refers to a value of a luma sample before downsampling. For example, Luma [0] [0] may represent a position of a top-left sample in a luma block before downsampling. Since a size of a downsampled luma block is 2×2, variables w and h representing a coordinate of a sample may have a value from 0 to 1, respectively.
When a downsampling filter according to Equation 5 is applied, a value of a downsampled luma sample may be obtained by applying a cross-shaped downsampling filter to luma samples. As an example, a value of a downsampled luma sample at a position of (0, 0) may be obtained by applying a downsampling filter to a luma sample at a position of (0, 0), a top luma sample at the position of (0, 0), a left luma sample at the position of (0, 0), a bottom luma sample at the position of (0, 0) and a right luma sample at the position of (0, 0).
A downsampling filter in a different shape from that shown in
A shape of a filter may be predefined in an encoder and a decoder.
Alternatively, a shape of a filter may be adaptively determined based on at least one of a size/a shape of a current block, an intra prediction mode applied to a luma block, whether a position of a chroma sample matches a position of a luma sample or an image format.
Alternatively, information indicating one of a plurality of filter candidates may be encoded and signaled.
Alternatively, a filter type may be different according to a downsampling position. As an example, a 1D filter or a rectangular filter may be applied to a luma sample positioned at a boundary of a luma block, while a cross-shaped filter may be applied to a luma sample not positioned at a boundary of a luma block.
As shown in
An application position of a downsampling filter may be set differently from that shown in
After predefining a plurality of candidates related to a downsampling application position, one of a plurality of candidates may be selected. As an example, after defining examples of
Alternatively, one of a plurality of candidates may be selected based on whether a position of a chroma sample matches a position of a luma sample.
A downsampling filter may also be applied to reference samples around a luma block. Here, a reference sample may represent a pre-reconstructed sample. Specifically, a downsampled luma reference sample may be obtained by applying a downsampling filter to at least one of a top reference region adjacent to the top of a luma block or a left reference region adjacent to the left.
The same number of downsampled luma reference samples as the number of reference samples included in a reference region of a chroma block may be obtained.
Meanwhile, a reference region of a luma block may be referred to as a luma reference region and a reference region of a chroma block may be referred to as a chroma reference region.
An inter-component prediction mode may be divided into a top inter-component prediction mode, a left inter-component prediction mode and a top and left inter-component prediction mode according to a configuration of a reference region. When a top inter-component prediction mode is selected, a reference region of each of a luma block and a chroma block is composed of only top reference regions. When a left inter-component prediction mode is selected, a reference region of each of a luma block and a chroma block is composed of only left reference regions. When a top and left inter-component prediction mode is selected, a reference region of each of a luma block and a chroma block may be composed of a top reference region and a left reference region.
Information indicating which of a top inter-component prediction mode, a left inter-component prediction mode and a top and left inter-component prediction mode is applied to a current block may be explicitly encoded and signaled. As an example, index information indicating a type of an inter-component prediction mode may be encoded and signaled.
Alternatively, one of a top inter-component prediction mode, a left inter-component prediction mode and a top and left inter-component prediction mode may be selected based on at least one of a size/a shape of a current block, whether a current block is adjacent to a CTU or a picture boundary or an intra prediction mode applied to a luma block.
For convenience of a description, in an embodiment described below, it is assumed that a reference region of each of a luma block and a chroma block includes a top reference region and a left reference region.
A shape of a downsampling filter applied to a reference region of a luma block may be the same as a downsampling filter applied to a luma block. Alternatively, a shape of a downsampling filter applied to a reference region of a luma block may be different from a downsampling filter applied to a luma block. Alternatively, a shape of a downsampling filter applied to a top reference region of a luma block may be different from a shape of a downsampling filter applied to a left reference region of a luma block.
Meanwhile, a position where downsampling is applied within a reference region may be predefined in an encoder and a decoder.
As another example, a decoder may determine by itself a position where downsampling is applied within a reference region in the same manner as an encoder.
When an image format is 4:2:0, a 1×1-sized chroma block corresponds to a 2×2-sized luma block. Accordingly, a downsampled luma reference sample corresponding to a chroma reference sample may be derived by applying a downsampling filter to a position of one of the four luma reference samples.
When four luma reference samples corresponding to one chroma reference sample are A to D, downsampling may be performed on each of the positions A to D in a reference region and a cost for each position may be calculated. Here, a cost for a specific position may be derived based on the sum of differences between a downsampled luma reference sample obtained by applying a downsampling filter centered on a corresponding position and a chroma reference sample corresponding to a corresponding position or the sum of absolute values of the differences. As such, a cost derived based on the sum of absolute values of a difference may also be called a SAD
(Sum of Difference).Afterwards, a position with the lowest cost may be determined as an optimal position, and a process of deriving a prediction parameter described below may be performed by using downsampled luma samples at an optimal position.
Alternatively, information indicating one of a plurality of positions to which a downsampling filter may be applied may be encoded and signaled. As an example, in an example shown in
Meanwhile, determining an optimal downsampling application position within a top reference region may be independent of determining an optimal downsampling application position within a left reference region. In this case, an optimal downsampling application position within a top reference region may be different from an optimal downsampling application position within a left reference region.
A prediction parameter for a chroma block may be derived by using downsampled luma reference samples and reference samples of a chroma block. A prediction parameter may include weight α and offset β. A prediction parameter may be derived by using a least square method, etc.
Alternatively, weight α and offset β may be derived based on the maximum value and the minimum value of downsampled luma reference samples and the linearity of the maximum value and the minimum value of chroma reference samples.
In this case, a prediction parameter may also be derived by using only chroma reference samples at a predefined position and downsampled luma reference samples corresponding thereto. In this case, a process of deriving a prediction parameter may be simplified to reduce complexity in an encoder and a decoder. As an example, a prediction parameter may be derived by using chroma reference samples at a position illustrated in Equation 6 below.
(−1,W/4),(−1,3W/4),(H/4,−1),(3H/4,−1) [Equation 6]
In the example, W and H represent a width and a height of a chroma block, respectively. A prediction parameter may be derived by using four chroma reference samples according to the example and four downsampled luma reference samples corresponding thereto.
A prediction parameter may also be obtained by using reference samples at a position different from that in the example. As an example, a position of reference samples may be determined as in Equation 7 and Equation 8 below.
(−1,W/4),(−1,3W/4),(−1,5W/4),(−1,7W/4) [Equation 7]
(H/4,−1),(3H/4,−1),(5H/4,−1),(7H/4,−1) [Equation 8]
After predefining a plurality of candidates for a position of reference samples, one of a plurality of candidates may be selected. As an example, after each example in Equation 6 to Equation 8 listed above is set as a position candidate, reference samples may be selected according to one of a plurality of position candidates.
Information for selecting one of a plurality of position candidates may be encoded and signaled. As an example, an index indicating one of a plurality of position candidates may be encoded and signaled.
Alternatively, one of a plurality of position candidates may be adaptively selected based on at least one of a size/a shape of a current block, a color format or whether a position of a chroma sample matches a position of a luma sample.
As an example, when a current block is square, a prediction parameter may be derived by using a position candidate in Equation 6. On the other hand, when a current block is non-square, a prediction parameter may be derived by using a position candidate in Equation 7 or Equation 8. As an example, when a current block has a non-square shape that a width is greater than a height, a position candidate in Equation 7 may be used, and when a current block has a non-square shape that a height is greater than a width, a position candidate in Equation 8 may be used.
Once a prediction parameter is derived, a prediction sample of a chroma block may be obtained based on a downsampled luma sample S1720. As an example, a prediction sample of a chroma block may be obtained according to Equation 9 below.
PredChroma[w][h]=α×Downsampled_luma[w][h]+β, 0≤w<W,0≤h<H [Equation 9]
In Equation 9, PredChroma represents a prediction sample of a chroma block and Downsampled_Luma represents a downsampled luma sample at a position corresponding to a chroma prediction sample.
Meanwhile, when an image format is 4:4:4, the above-described downsampling process may be omitted. In other words, when an image format is 4:4:4, a process of performing downsampling on reconstructed samples in a luma block and a process of performing downsampling on reference samples of a luma block may be omitted.
As another example, regardless of an image format, a downsampling filter may not be applied to a reference region of a luma block. In other words, in deriving a prediction parameter, instead of using the minimum value and the maximum value among the downsampled luma reference samples, the minimum value and the maximum value among the luma reference samples may be used.
Meanwhile, a picture may be encoded/decoded in a unit of a block. As an example, a picture may be partitioned into blocks in a predetermined size. A block in a predetermined size may be referred to as a coding tree block (or a coding tree unit) or a reference block. Information showing a size of a reference block may be signaled through a bitstream. As an example, information showing a size of a coding tree block may be encoded through a sequence parameter set or a picture header.
Afterwards, a reference block may be added as blocks in various sizes based on at least one of tree structures predefined in a reference block. Then, encoding/decoding processing such as prediction, transform, quantization and/or entropy encoding, etc. may be performed for each partitioned block. Each partitioned block may be a coding block, a prediction block or a transform block.
Meanwhile, for a color picture, a luma picture and a chroma picture are encoded/decoded, respectively. In this case, a chroma picture usually has a characteristic similar to that of a luma picture. In other words, a characteristic of chroma samples in a chroma picture tends to be similar to a characteristic of collocated luma samples in a luma picture. This characteristic may be used to independently determine a partition structure for a reference block only for one reference component among the color components, and a tree structure determined in an existing component may be applied equally to other components. As such, a partition structure in which a tree partition structure of a reference component is applied to other components as it is may be referred to as a single tree structure.
Meanwhile, in embodiments described below, it is assumed that a reference component is a luma component. In other words, it is assumed that while a tree partition structure is independently applied to a luma component, a tree partition structure of a luma component is applied as it is to a chroma component.
As another example, after deriving encoding/decoding information for a chroma block by referring to a collocated luma block, encoding/decoding for a chroma block may be performed based on derived encoding/decoding information. In this case, since a partition structure of a luma reference block and a partition structure of a chroma reference block are the same in a single tree structure, a luma block at the same position as a chroma block may be clearly specified.
On the other hand, a partition structure of a luma reference block and a partition structure of a chroma reference block are independent in a dual tree structure. Under a dual tree structure, a region in a luma picture corresponding to a region occupied by a chroma block or a higher node luma block including a region in the luma picture may be treated as a luma block at the same position as a chroma block.
Alternatively, a luma block including a region in a luma picture corresponding to a region occupied by a chroma block may be set as a collocated luma block. In this case, if a region within the luma picture is included in a plurality of luma blocks, a representative block among a plurality of luma blocks may be determined as a collocated luma block. Here, a representative block may be a luma block occupying the most of the region, the largest block among the luma blocks or a luma block including a reference position sample of a region within the luma picture. A reference position may be a top-left position, a center position, a top-right position, a bottom-left position or a bottom-right position within a region.
Alternatively, when a plurality of luma blocks are included in a region within a luma picture corresponding to a region occupied by a chroma block, a representative block among a plurality of luma blocks may be determined as a collocated luma block. Here, a representative block may be a luma block occupying the most of the region, the largest block among the luma blocks or a luma block including a reference position sample of a region within the luma picture.
Alternatively, when a plurality of luma blocks are included in a region within a luma picture corresponding to a region occupied by a chroma block, a higher node luma block including the plurality of luma blocks may be determined as a collocated luma block.
Alternatively, a reference position for determining a luma block at the same position as a chroma reference block may be defined, and a collocated luma block may be determined based on a reference position. A reference position may be a top-left position, a center position, a top-right position, a bottom-left position or a bottom-right position of a chroma block.
As an example, when a reference position is a center position of a chroma block, a luma block including a luma sample corresponding to a center position of a chroma block may be determined as a luma block at the same position as a chroma block.
In a dual tree structure, when determining a partition structure of a chroma block, a partition structure of a collocated luma block may be referred to. Whether to partition a chroma block into a plurality of partitions may be determined based on whether a collocated luma block is partitioned into a plurality of partitions.
As described through
Accordingly, encoding/decoding information for a chroma block may be derived by referring to encoding/decoding information of a collocated luma block. As a specific example, in encoding/decoding a chroma block, the partition information of a luma block may be applied to a chroma block as it is. Here, partition information may include at least one of whether to partition a block or a partition type of a block. Here, a partition type may relate to at least one of the number of partitions generated by partitioning a block, whether to perform asymmetrical partition or a partition direction of a block.
As an example, in an example shown in
Not only the partition information of a luma block, but also the prediction information of a luma block may be referenced when encoding/decoding a chroma block. In other words, the prediction information of each partition generated by partitioning a chroma block may be set to be the same as a collocated luma block for each partition.
As an example, in an example shown in
Similarly, a partition type for a second chroma block may be set to be the same as a partition type of a collocated luma block. In an example shown in
In addition, a prediction mode used in partitions generated by partitioning a chroma block (i.e., e, f, g, h) may be set to be the same as a prediction mode of each partition generated by partitioning a luma block (i.e., E, F, G, H), respectively.
Meanwhile, information showing whether encoding/decoding information of a chroma block will be set to be the same as that of a collocated luma block may be encoded and signaled. The information may be a 1-bit flag.
As an example, a first flag showing whether a partition type of a chroma block will be set to be the same as that of a collocated luma block may be encoded and signaled. When the first flag is true, encoding/decoding of partition information for a chroma block may be omitted, and a partition type of a chroma block may be set to be the same as that of a collocated luma block.
As an example, a second flag showing whether a prediction mode of a chroma block will be set to be the same as that of a collocated luma block may be encoded and signaled. When the second flag is true, encoding/decoding of a prediction mode for a chroma block may be omitted, and a prediction mode of a chroma block may be set to be the same as that of a collocated luma block.
Meanwhile, in an example shown in
Meanwhile, for a chroma block, whether prediction and transform are performed sequentially may be adaptively determined. As an example, when at least one of partition information and/or prediction information of a collocated luma block is applied to a chroma block, prediction and transform for a next partition may be performed after prediction and transform for a partition with preceding encoding/decoding order within a chroma block are completed. As an example, in an example shown in
Perform prediction for sub-block E→Perform transform and quantization (and reconstruction or entropy encoding) for sub-block E→Perform prediction for sub-block F→Perform transform and quantization (and reconstruction or entropy encoding) for sub-block F→Perform prediction for sub-block G→Perform transform and quantization (and reconstruction or entropy encoding) for sub-block G→Perform prediction for sub-block H→Perform transform and quantization (and reconstruction or entropy encoding) for sub-block H
Alternatively, after performing prediction for each sub-block first, transform for sub-blocks may be performed after prediction for sub-blocks is completed.
Unlike an example shown in
As an example, a partition type of a chroma block may be determined by referring to a partition type of a collocated luma block. When a chroma block is partitioned into a plurality of partitions, a prediction mode of each partition may be set to be the same as a prediction mode of a partition in a luma block corresponding to each partition.
As an example, in
A second chroma block has a size corresponding to the sum of a plurality of luma blocks (i.e., E, F, G, H, J). In this case, chroma block 2 may be partitioned in the same shape as a plurality of luma blocks. In other words, a chroma block may be partitioned into two parts in a horizontal direction, and then quad partition may be applied to a top chroma block generated by two partitions. Then, a prediction mode of each partition generated by partitioning a chroma block (i.e., e, f, g, h, j) may be set to be the same as a prediction mode of each corresponding luma block (i.e., E, F, G, H, J).
Meanwhile, a size of a chroma block may be compared with a size of a collocated luma block to adaptively determine whether to apply the encoding/decoding information of a luma block to a chroma block. As an example, when a size of a chroma block does not correspond to a size of a collocated luma block, it may be set not to refer to the encoding/decoding information of a luma block in deriving the encoding/decoding information of a chroma block (e.g., at least one of a partition type or a prediction mode).
As an example, in an example shown in
On the other hand, in an example shown in
As another example, when encoding/decoding a chroma block, whether to partition a chroma block and/or encoding/decoding order may be determined based on a directionality for luma samples.
In
If a collocated luma block is determined, a directionality for a collocated luma block is determined based on luma samples included in a collocated luma block. Specifically, after applying a plurality of intra prediction modes to a collocated luma block, an intra prediction mode with the lowest cost among a plurality of intra prediction modes may be selected. In this case, intra prediction may be performed by assuming that neighboring samples adjacent to a collocated luma block (i.e., block A) are reference samples. A cost for each intra prediction mode may be derived by adding up the absolute values of a difference at all positions in a collocated luma block after subtracting a prediction value generated through intra prediction from a reconstructed (or, original) sample included in a collocated luma block (i.e., block A). After that, an intra prediction mode with the lowest cost is set as a directionality of a collocated luma block (i.e., block A).
Specifically, for block A, when an intra prediction mode with an optimal cost is one of modes 2 to 33 in
Meanwhile, in encoding/decoding a chroma block, for a collocated luma block (i.e., block A), pre-reconstructed samples may exist not only in top and left regions, but also in right and bottom regions. Accordingly, other than predefined intra prediction modes (i.e., intra prediction modes shown in
Meanwhile, in order to simplify implementation, block A and neighboring samples adjacent to block A may be rotated 180 degrees clockwise, and then a cost for each predefined intra prediction mode may be calculated. When block A and neighboring samples are rotated 180 degrees clockwise, top reference samples may be set as top reference samples, and right reference samples may be set as left reference samples. A mode with the smallest cost among the predefined intra prediction modes may be selected, and a selected intra prediction mode may be rotated 180 degrees in the opposite direction (i.e., counterclockwise) to determine an optimal intra prediction mode for a right/bottom direction.
Afterwards, a cost between an optimal intra prediction mode for a left/top direction selected when block A is not rotated and an optimal intra prediction mode for a right/bottom direction selected when block A is rotated may be compared to determine a directionality for block A.
As an example, when an optimal intra prediction mode for block A is derived when block A is rotated 180 degrees and the optimal intra prediction mode is one of modes 2 to 33 in
It is also possible to determine an optimal intra prediction mode for a collocated luma block by setting reconstructed samples positioned at a boundary within a collocated luma block as a reference sample.
In an example shown in
As in the above-described example, an optimal intra prediction mode for a collocated luma block may be determined by calculating a cost for each of the predefined intra prediction modes and/or the intra prediction modes in an extended direction.
Alternatively, for simplicity, an intra prediction mode of a collocated luma block may be used when determining a directionality of a collocated luma block. In other words, a directionality of a collocated luma block may be determined based on an intra prediction mode used to encode/decode a collocated luma block.
Alternatively, intra prediction modes may be classified into a plurality of groups and a cost for each group may be calculated to determine a directionality of a collocated luma block.
As in an example shown in
Afterwards, for each group, a cost for each intra prediction mode belonging to a group may be calculated, and a calculated cost may be combined to derive a cost of a group.
Afterwards, a cost of groups corresponding to a left direction among a plurality of groups may be combined to calculate a cost for a left direction.
As an example, in an example shown in
A cost for each of top, right, bottom and left directions may be compared to select a direction with the lowest cost as a direction of a collocated luma block.
Alternatively, in an example shown in
Meanwhile, for a luma component, a directionality may be determined for each block in a predefined unit, and a directionality for a collocated luma block may be set to be the same as a directionality of a block in a predefined unit to which a collocated luma block belongs.
As an example, after determining a directionality in a unit of a coding tree unit, a directionality of a coding tree unit to which a collocated luma block belongs may be determined as a directionality of a collocated luma block. In this case, a method for deriving an optimal directionality for a coding tree unit may follow embodiments described above.
Meanwhile, according to a directionality of a collocated luma block, whether to partition a chroma block into a plurality of partitions may be determined. As an example, when an optimal intra prediction mode for a collocated luma block is a non-directional prediction mode, a chroma block may not be partitioned into a plurality of partitions. On the other hand, when an optimal intra prediction mode for a collocated luma block is a directional prediction mode, it may be determined to partition a chroma block into a plurality of partitions.
Alternatively, whether to partition a chroma block may be independently determined without considering a collocated luma block.
If a directionality of a collocated luma block (i.e., block A) is determined, the encoding/decoding order of a plurality of sub-blocks within a chroma block may be determined based on a directionality of a collocated luma block. As an example, when a chroma block is partitioned into four parts and encoded/decoded, scan order and an encoding/decoding start point for four sub-blocks may be determined according to a directionality of a collocated luma block.
In
Unlike a shown example, this embodiment may be applied even when a chroma block is partitioned into a larger number of partitions or when a chroma block is partitioned into a smaller number of partitions.
In
Unlike an example shown in
In this case, a partition direction of a chroma block may be determined according to a directionality of a collocated luma block. As an example, when a directionality of a collocated luma block is top or bottom, a chroma block may be partitioned in a horizontal direction, as in an example shown in
Meanwhile,
Meanwhile, when encoding/decoding a chroma block, a directionality of a collocated luma block may be determined, and rotation and/or flipping may be performed for a chroma block according to a directionality of a luma block. Here, rotation and/or flipping may be performed in a unit of a reference block, an encoding block, a prediction block or a transform block.
When rotation and/or flipping is performed, encoding/decoding may be performed for a rotated and/or flipped chroma block.
In
In an example shown in
When a directionality for a collocated luma block is left, as in an example shown in
Alternatively, at least one of information indicating whether flipping is applied to a chroma block or information indicating a flipping direction may be encoded and signaled without being based on a directionality of a collocated luma block.
Meanwhile, flipping for a chroma block may be set to be applied only when a collocated luma block is encoded by intra prediction. As an example, when a collocated luma block is encoded by inter prediction, not intra prediction, the encoding/decoding of flipping-related information may be omitted for a chroma block, and flipping may not be performed for a chroma block.
As another example, an intra prediction mode of a chroma block may be determined based on a method for determining an optimal intra prediction mode for a collocated luma block described above. In other words, an optimal intra prediction mode for a collocated luma block may be set as an intra prediction mode of a chroma block.
Alternatively, intra prediction for a chroma block may be performed based on an intra prediction mode of a predetermined chroma block and an intra prediction mode of a collocated luma block. Here, an intra prediction mode of a determined chroma block may be at least one of a Direct Mode (DM), a Horizontal Mode, a Vertical Mode, a DC Mode, a planar mode or an inter-component cross prediction mode. Here, a DM mode may set an intra prediction mode used to encode/decode a collocated luma block as an intra prediction mode of a chroma block.
As an example, a first prediction block for a chroma block may be obtained based on an intra prediction mode of a determined chroma block, and a second prediction block for a chroma block may be obtained based on an optimal intra prediction mode of a collocated luma block. Afterwards, based on an average or a weighted sum operation of a first prediction block and a second prediction block, a final prediction block for a chroma block may be obtained.
As another example, a final prediction block for a chroma block may be obtained by combining an inter prediction mode and an intra prediction mode. As an example, a final prediction block for a chroma block may be generated through an average or a weighted sum operation between an intra prediction block obtained by intra prediction (or a first prediction block) and an inter prediction block obtained by inter prediction (or a second prediction block).
In this case, intra prediction may be performed based on an optimal intra prediction mode of a collocated luma block or may be performed based on a CCLM mode.
In addition, inter prediction may be performed by at least one of a motion information merge mode, a motion vector prediction mode or a template matching mode.
Meanwhile, when a final prediction block is obtained based on a weighted sum operation between a first prediction block and a second prediction block, a weight applied to each of a first prediction block and a second prediction block may always be set as the same value. Alternatively, a weight applied to each of a first prediction block and a second prediction block may be determined by using one of a plurality of weight candidates in a preset weight table. In this case, an index indicating one of a plurality of weight candidates may be encoded and signaled.
Alternatively, a weight applied to each of a first prediction block and a second prediction block may be determined by referring to an encoding mode of at least one neighboring block. As an example, when the number of neighboring blocks encoded/decoded by intra prediction is greater than the number of neighboring blocks encoded/decoded by inter prediction among a plurality of neighboring blocks, a weight applied to a first prediction block may have a larger value than a weight applied to a second prediction block. On the other hand, when the number of neighboring blocks encoded/decoded by inter prediction is greater than the number of neighboring blocks encoded/decoded by intra prediction among a plurality of neighboring blocks, a weight applied to a second prediction block may have a larger value than a weight applied to a first prediction block. When the number of neighboring blocks encoded/decoded by intra prediction is the same as the number of neighboring blocks encoded/decoded by inter prediction among a plurality of neighboring blocks, a weight applied to a first prediction block may be set as the same value as a weight applied to a second prediction block.
As another example, when a DM mode is used to derive an intra prediction mode of a chroma block, post-processing for derived prediction samples may be performed by performing intra prediction for a chroma block. The post-processing may correct prediction samples.
As an example, when an intra prediction mode of a chroma block is a DM mode, an intra prediction mode of a collocated luma block is set as an intra prediction mode of a chroma block.
Meanwhile, a collocated luma block may be reconstructed by combining a prediction sample obtained through intra prediction and a residual sample representing a difference between an original sample and a prediction sample. In this case, in a region within a chroma block corresponding to a region with a large prediction error within a collocated luma block, it may be set not to use a DM mode.
Here, whether it is a region with a large prediction error may be determined by comparing a value of residual samples with a threshold value. In addition, a judgment on a region with a large prediction error may be performed in a unit of a sample or in a unit of a sub-block in a predefined size. As an example, the judgment may be performed in a unit of a 2×2 or 4×4-sized sub-block.
As in an example shown in
Afterwards, for each sub-block in a collocated luma block, whether it is a region with a large prediction error is determined. The determination may be performed by comparing an average of absolute values of residual samples in a sub-block with a threshold value. As an example, when an average value is greater than a threshold value, a corresponding sub-block may be determined as a region with a large prediction error, and otherwise, a corresponding sub-block may be determined as a region with a small prediction error.
Alternatively, whether a corresponding sub-block is a region with a large prediction error may be determined by comparing a threshold value with the minimum value, the maximum value or a median value of absolute values of residual samples in a sub-block.
Here, a threshold value may be a value predefined in an encoder and a decoder. Alternatively, information showing a threshold value may be explicitly encoded and signaled.
Alternatively, a threshold value may be derived based on an average of absolute values of residual samples in a collocated luma block. As an example, the threshold value may be an average of absolute values of residual samples in a luma block or a value obtained by adding or subtracting an offset to or from the average value.
Alternatively, a threshold value may be derived based on the minimum value, the maximum value or a median value of absolute values of residual samples in a collocated luma block. As an example, the threshold value may be set to be the same as the minimum value, the maximum value or a median value of absolute values of residual samples in a luma block or may be a value obtained by adding or subtracting an offset to or from the minimum value, the maximum value or a median value.
In an example shown in
In a region where a DM mode is not used, intra prediction may be performed by using a predefined intra prediction mode. As an example, a predefined intra prediction mode may be a planar mode or a DC mode.
Alternatively, a decoder side may derive an intra prediction mode for a region where a DM mode is not used. As an example, an optimal intra prediction mode for a region with a large prediction error may be derived by using reconstructed samples around a region with a large prediction error within a luma block. As an example, in an example shown in
Meanwhile, for a region with a large prediction error within a collocated luma block, information showing whether the application of a DM mode is limited may be explicitly encoded and signaled. The information may be a 1-bit flag.
A term of syntaxes used in the above-described embodiments is just named for convenience of a description.
When embodiments described based on a decoding process or an encoding process are applied to an encoding process or a decoding process, it is included in a scope of the present disclosure. When embodiments described in predetermined order are changed in order different from a description, it is also included in a scope of the present disclosure.
The above-described disclosure is described based on a series of steps or flow charts, but it does not limit a time series order of the present disclosure and if necessary, it may be performed at the same time or in different order. In addition, each component (e.g., a unit, a module, etc.) configuring a block diagram in the above-described disclosure may be implemented as a hardware device or software and a plurality of components may be combined and implemented as one hardware device or software. As an example, the hardware device may include at least one of a processor for performing an operation, a memory for storing data, a transmitter for transmitting data and a receiver for receiving data.
The above-described disclosure may be recorded in a computer readable recoding medium by being implemented in a form of a program instruction which may be performed by a variety of computer components. The computer readable recoding medium may include a program instruction, a data file, a data structure, etc. solely or in combination.
In addition, according to the present disclosure, a computer readable recording medium storing a bitstream generated by the above-described encoding method may be provided. The bitstream may be transmitted by an encoding device and a decoding device may receive the bitstream to decode an image.
A hardware device which is specially configured to store and perform magnetic media such as a hard disk, a floppy disk and a magnetic tape, optical recording media such as CD-ROM, DVD, magneto-optical media such as a floptical disk and a program instruction such as ROM, RAM, a flash memory, etc. is included in a computer readable recoding medium. The hardware device may be configured to operate as one or more software modules in order to perform processing according to the present disclosure and vice versa.
INDUSTRIAL AVAILABILITYEmbodiments through the present disclosure may be applied to an electronic device that encodes or decodes an image.
Claims
1. A method of decoding an image, the method comprising:
- partitioning a chroma block into a plurality of partitions; and
- performing an intra prediction for each of the partitions in the chroma block,
- wherein a partition type of the chroma block is determined based on at least one of a partition type or a directionality of a collocated luma block of the chroma block.
2. The method of claim 1, wherein:
- the partition type of the chroma block is set to be the same as the partition type of the collocated luma block.
3. The method of claim 1, wherein:
- the plurality of partitions are generated by partitioning the chroma block in a horizontal direction or in a vertical direction, and
- a partition direction of the chroma block is determined based on the directionality of the collocated luma block.
4. The method of claim 1, wherein a decoding order for a plurality of partitions in the chroma block is determined based on the directionality of the collocated luma block.
5. The method of claim 1, wherein the method further includes determining whether to perform a flipping on the chroma block, and
- wherein the flipping for the chroma block is performed for at least one of a horizontal direction or a vertical direction.
6. The method of claim 5, wherein based on the directionality of the collocated luma block, whether to perform the flipping and a direction in which the flipping is performed are determined.
7. The method of claim 5, wherein the flipping is allowed only when the collocated luma block is encoded by the intra prediction.
8. The method of claim 1, wherein an intra prediction mode of each of the plurality of partitions in the chroma block is set to be the same as an intra prediction mode of each of a plurality of partitions included in the collocated luma block.
9. The method of claim 1, wherein:
- a predefined intra prediction mode is applied to a partition corresponding to a region with a large prediction error in the collocated luma block among the plurality of partitions in the chroma block, and
- an intra prediction mode of the collocated luma block is applied to a partition that does not.
10. The method of claim 9, wherein whether a sub-region in the collocated luma block is a region with a large prediction error is determined by comparing an average value of absolute values of residual samples in the sub-region with a threshold value.
11. The method of claim 10, wherein the threshold value is derived based on an average value of absolute values of residual samples in the collocated luma block.
12. The method of claim 1, wherein the directionality of the collocated luma block is determined based on an optimal intra prediction mode derived according to a result of performing an intra prediction performed based on predefined intra prediction modes and reference samples around the collocated luma block.
13. The method of claim 12, wherein the directionality of the collocated luma block is set to be the same as a directionality of a reference block in which the collocated luma block is included.
14. A method of encoding an image, the method comprising:
- dividing a chroma block into a plurality of partitions; and
- performing an intra prediction for each of the partitions in the chroma block,
- wherein a partition type of the chroma block is determined based on at least one of a partition type or a directionality of a collocated luma block of the chroma block.
15. A computer readable recording medium storing a bitstream generated by an image encoding method, the computer readable recording medium comprising:
- dividing a chroma block into a plurality of partitions; and
- performing an intra prediction for each of the partitions in the chroma block,
- wherein a partition type of the chroma block is determined based on at least one of a partition type or a directionality of a collocated luma block of the chroma block.
Type: Application
Filed: Oct 30, 2023
Publication Date: Nov 26, 2026
Applicant: KT CORPORATION (Gyeonggi-do)
Inventor: Sung Won LIM (Gyeonggi-do)
Application Number: 19/122,254