Video decoding methods, video encoding methods, and equipment for transmitting compressed video data.
Patent Information
- Application Number
- VN1202604306
- Authority / Receiving Office
- VN · VN
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2019-08-28
- Filing Date
- 2020-08-28
- Publication Date
- 2026-07-15
AI Technical Summary
The increasing demand for high-resolution and high-quality video data leads to higher data volumes, resulting in increased transmission and storage costs, and existing video compression technologies struggle to efficiently compress high-resolution and ultra-high-resolution stereoscopic video content effectively.
The proposed method involves using a cross-component linear model (CCLM) for predicting chroma components by deriving CCLM parameters from filtered neighboring luma samples, which improves encoding/decoding efficiency by determining the down-sampling filter type and subsampling neighboring samples, regardless of their availability.
This approach enhances coding/decoding efficiency in CCLM mode by effectively predicting chroma samples using luma restoration samples, reducing data volume and costs associated with high-resolution video transmission and storage.
Smart Images

Figure VN1202604306_0
Abstract
Description
Video signal processing method and device
[0001] The present disclosure relates to a video signal processing method and device.
[0002] Recently, the demand for high-resolution, high-quality images, such as HD (High Definition) and UHD (Ultra High Definition) images, is increasing across various application fields. As image data becomes higher in resolution and quality, the relative amount of data increases compared to conventional image data. Therefore, transmitting image data using existing media such as wired and wireless broadband lines or storing it using existing storage media leads to increased transmission and storage costs. To address these issues arising from the increasing resolution and quality of image data, high-efficiency image compression technologies can be utilized.
[0003] There are various technologies for image compression, such as inter-picture prediction technology that predicts pixel values included in the current picture from pictures before or after the current picture, intra-picture prediction technology that predicts pixel values included in the current picture using pixel information in the current picture, and entropy encoding technology that assigns short codes to values with high frequency of appearance and long codes to values with low frequency of appearance. Using these image compression technologies, image data can be effectively compressed and transmitted or stored.
[0004] Meanwhile, as demand for high-resolution video grows, so does the demand for stereoscopic video content as a new video service. Discussions are underway on video compression technologies to effectively deliver high-resolution and ultra-high-resolution stereoscopic video content.
[0005] The present disclosure aims to provide an intra prediction method and device for encoding / decoding a video signal.
[0006] The present disclosure aims to provide a method and device for predicting a chroma component using a luma component restoration sample in encoding / decoding a video signal.
[0007] The technical problems to be achieved in the present disclosure are not limited to the technical problems mentioned above, and other technical problems not mentioned will be clearly understood by a person having ordinary skill in the technical field to which the present disclosure belongs from the description below.
[0008] A video signal decoding method according to the present disclosure includes the steps of: determining whether a CCLM (Cross-compoenent Linear Model) mode is applied to a chroma block; obtaining a filtered neighboring luma sample for a neighboring chroma sample adjacent to the chroma block when the CCLM mode is determined to be applied to the chroma block; deriving a CCLM parameter using the neighboring chroma sample and the filtered neighboring luma sample; and generating a prediction block for the chroma block using the CCLM parameter.
[0009] A video signal encoding method according to the present disclosure includes the steps of: determining whether a CCLM (Cross-compoenent Linear Model) mode is applied to a chroma block; obtaining a filtered neighboring luma sample for a neighboring chroma sample adjacent to the chroma block when the CCLM mode is determined to be applied to the chroma block; deriving a CCLM parameter using the neighboring chroma sample and the filtered neighboring luma sample; and generating a prediction block for the chroma block using the CCLM parameter.
[0010] In the video signal decoding method according to the present disclosure, the filtered neighboring luma sample can be generated by applying a down-sampling filter to a collocated luma sample corresponding to the neighboring chroma sample and neighboring luma samples adjacent to the collocated luma sample.
[0011] In a video signal decoding method according to the present disclosure, when at least one of the collocated luma sample and the neighboring luma samples is unavailable, a restored sample located at the boundary within a luma block may be padded in the unavailable sample location.
[0012] In the video signal decoding method according to the present disclosure, the type of the down sampling filter can be determined based on the type of the current image.
[0013] In the video signal decoding method according to the present disclosure, the type of the down sampling filter can be determined based on the position of the neighboring chroma sample.
[0014] In the video signal decoding method according to the present disclosure, the neighboring chroma sample can be extracted by sub-sampling a plurality of neighboring chroma samples neighboring the chroma block.
[0015] In the video signal decoding method according to the present disclosure, the subsampling rate can be determined based on at least one of the size or shape of the chroma block.
[0016] The features briefly summarized above for the present disclosure are merely exemplary aspects of the detailed description of the present invention that follows and do not limit the scope of the present invention.
[0017] According to the present disclosure, encoding / decoding efficiency can be improved by predicting chroma samples using luma restoration samples.
[0018] According to the present disclosure, the encoding / decoding efficiency of the CCLM mode can be improved by determining the downsampling filter type regardless of the availability of neighboring samples.
[0019] According to the present disclosure, the encoding / decoding efficiency of the CCLM mode can be improved by subsampling neighboring samples to derive CCLM parameters.
[0020] The effects that can be obtained from the present disclosure are not limited to the effects mentioned above, and other effects that are not mentioned will be clearly understood by a person having ordinary skill in the art to which the present disclosure pertains from the description below.
[0021] FIG. 1 is a block diagram illustrating an image encoding device according to an embodiment of the present disclosure.
[0022] FIG. 2 is a block diagram showing an image decoding device according to an embodiment of the present disclosure.
[0023] FIG. 3 is a flowchart illustrating an intra prediction method according to one embodiment of the present disclosure.
[0024] Figure 4 illustrates the types of intra prediction modes.
[0025] Figure 5 is a drawing for explaining an example of deriving a prediction sample under planar mode.
[0026] Figure 6 illustrates multiple reference sample set candidates.
[0027] Figure 7 is intended to explain a method for deriving prediction samples under DC mode.
[0028] FIG. 8 is a flowchart illustrating a method for deriving a prediction sample of a chroma component according to one embodiment of the present disclosure.
[0029] Figure 9 illustrates an example of a downsampling filter type by chroma sample position when the current image is an HDR image.
[0030] Figure 10 illustrates an example of a downsampling filter type by chroma sample position when the current image is not an HDR image.
[0031] Figures 11 and 12 illustrate examples in which the downsampling filter type is determined regardless of the availability of neighboring samples adjacent to the luma block.
[0032] Figure 13 shows an example in which the range of restored pixels used to derive CCLM parameters is set differently depending on the CCLM mode type.
[0033] Figure 14 illustrates the type of downsampling filter applied to the collocated luma samples of the upper neighboring samples when the current image is not an HDR image.
[0034] Figure 15 illustrates the type of downsampling filter applied to the collocated luma samples of the upper neighboring samples when the current image is an HDR image.
[0035] Figure 16 shows an example in which a fixed type filter is applied depending on the upper neighboring sample position.
[0036] Figure 17 illustrates the type of downsampling filter applied to the collocated luma samples of the left neighboring samples.
[0037] The present disclosure may be modified in various ways and encompasses numerous embodiments. Specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the present disclosure to specific embodiments, but rather to encompass all modifications, equivalents, and alternatives falling within the spirit and technical scope of the present disclosure. Similar reference numerals have been used to designate similar components throughout the description of each drawing.
[0038] While terms such as "first" and "second" may be used to describe various components, these components should not be limited by these terms. These terms are used solely to distinguish one component from another. For example, without departing from the scope of the present disclosure, a first component could be referred to as a "second component," and similarly, a second component could also be referred to as a "first component." The term "and / or" includes a combination of multiple related items described herein or any of multiple related items described herein.
[0039] When a component is referred to as being "connected" or "connected" to another component, it should be understood that it may be directly connected or connected to that other component, but that there may be other components intervening. Conversely, when a component is referred to as being "directly connected" or "connected" to another component, it should be understood that there are no other components intervening.
[0040] The terminology used in this application is only used to describe specific embodiments and is not intended to limit the present disclosure. The singular expression includes the plural expression unless the context clearly indicates otherwise. In this application, it should be understood that the terms "comprise" or "have" indicate the presence of a feature, number, step, operation, component, part, or combination thereof described in the specification, but do not preclude the possibility of the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.
[0041] Hereinafter, preferred embodiments of the present disclosure will be described in more detail with reference to the attached drawings. Hereinafter, identical components in the drawings will be designated by the same reference numerals, and redundant descriptions of identical components will be omitted.
[0042]
[0043] FIG. 1 is a block diagram illustrating an image encoding device according to an embodiment of the present disclosure.
[0044] Referring to FIG. 1, a video encoding device (100) may include a picture segmentation unit (110), a prediction unit (120, 125), a transformation unit (130), a quantization unit (135), a reordering unit (160), an entropy encoding unit (165), an inverse quantization unit (140), an inverse transformation unit (145), a filter unit (150), and a memory (155).
[0045] Each component shown in Fig. 1 is independently depicted to represent different characteristic functions in the video encoding device, and does not mean that each component is composed of separate hardware or a single software component. That is, each component is listed and included as a separate component for convenience of explanation, and at least two components among each component may be combined to form a single component, or one component may be divided into multiple components to perform a function, and such integrated and separate embodiments of each component are also included in the scope of the present disclosure as long as they do not deviate from the essence of the present disclosure.
[0046] Additionally, some components may not be essential components that perform the essential functions of the present disclosure, but may be optional components merely used to enhance performance. The present disclosure may be implemented by including only components essential to implementing the essence of the present disclosure, excluding components used solely for performance enhancement. A structure that includes only essential components, excluding optional components used solely for performance enhancement, is also within the scope of the present disclosure.
[0047] The picture splitting unit (110) can split the input picture into at least one processing unit. At this time, the processing unit may be a prediction unit (PU), a transform unit (TU), or a coding unit (CU). The picture splitting unit (110) can split one picture into a combination of multiple coding units, prediction units, and transform units, and select one combination of coding units, prediction units, and transform units based on a predetermined criterion (e.g., a cost function) to encode the picture.
[0048] For example, a picture can be split into multiple coding units. A recursive tree structure, such as a quad tree structure, can be used to split a coding unit in a picture. A coding unit that is split into other coding units starting from an image or the largest coding unit as the root can be split into as many child nodes as the number of split coding units. A coding unit that cannot be split any further according to a certain restriction becomes a leaf node. That is, assuming that only a square split is possible for a coding unit, a coding unit can be split into at most four different coding units.
[0049] Hereinafter, in the embodiments of the present disclosure, the encoding unit may be used to mean a unit that performs encoding or may be used to mean a unit that performs decoding.
[0050] A prediction unit may be divided into at least one square or rectangular shape of the same size within a single coding unit, or may be divided such that one prediction unit among the divided prediction units within a single coding unit has a different shape and / or size from another prediction unit.
[0051] When generating a prediction unit that performs intra prediction based on a coding unit, if it is not the minimum coding unit, intra prediction can be performed without dividing it into multiple prediction units NxN.
[0052] The prediction unit (120, 125) may include an inter prediction unit (120) that performs inter prediction and an intra prediction unit (125) that performs intra prediction. It may be determined whether to use inter prediction or intra prediction for a prediction unit, and specific information (e.g., intra prediction mode, motion vector, reference picture, etc.) according to each prediction method may be determined. At this time, the processing unit where prediction is performed and the processing unit where the prediction method and specific contents are determined may be different. For example, the prediction method and prediction mode may be determined in the prediction unit, and the prediction may be performed in the transformation unit. The residual value (residual block) between the generated prediction block and the original block may be input to the transformation unit (130). In addition, the prediction mode information, motion vector information, etc. used for prediction may be encoded together with the residual value in the entropy encoding unit (165) and transmitted to the decoding device. When using a specific encoding mode, it is also possible to encode the original block as is and transmit it to the decoding unit without generating a prediction block through the prediction unit (120, 125).
[0053] The inter prediction unit (120) may predict a prediction unit based on information of at least one picture among the previous or subsequent pictures of the current picture, and in some cases, may predict a prediction unit based on information of a portion of an encoded region within the current picture. The inter prediction unit (120) may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.
[0054] The reference picture interpolation unit can receive reference picture information from the memory (155) and generate pixel information less than an integer pixel from the reference picture. In the case of luminance pixels, a DCT-based 8-tap interpolation filter with different filter coefficients can be used to generate pixel information less than an integer pixel in units of 1 / 4 pixels. In the case of a chrominance signal, a DCT-based 4-tap interpolation filter with different filter coefficients can be used to generate pixel information less than an integer pixel in units of 1 / 8 pixels.
[0055] The motion prediction unit can perform motion prediction based on a reference picture interpolated by the reference picture interpolation unit. Various methods can be used to derive a motion vector, such as FBMA (Full search-based Block Matching Algorithm), TSS (Three Step Search), and NTS (New Three-Step Search Algorithm). The motion vector can have a motion vector value in units of 1 / 2 or 1 / 4 pixels based on the interpolated pixel. The motion prediction unit can predict the current prediction unit by using different motion prediction methods. Various methods can be used as motion prediction methods, such as the Skip method, the Merge method, the AMVP (Advanced Motion Vector Prediction) method, and the Intra Block Copy method.
[0056] The intra prediction unit (125) can generate a prediction unit based on reference pixel information surrounding the current block, which is pixel information within the current picture. If the surrounding block of the current prediction unit is a block on which inter prediction has been performed and the reference pixel is a pixel on which inter prediction has been performed, the reference pixel included in the block on which inter prediction has been performed can be replaced and used with reference pixel information of the surrounding block on which intra prediction has been performed. That is, if the reference pixel is not available, the unavailable reference pixel information can be replaced and used with at least one reference pixel among the available reference pixels.
[0057] In intra prediction, the prediction mode can have a directional prediction mode that uses reference pixel information according to the prediction direction, and a non-directional mode that does not use directional information when performing prediction. The mode for predicting luminance information and the mode for predicting chrominance information can be different, and the intra prediction mode information used to predict luminance information or the predicted luminance signal information can be utilized to predict chrominance information.
[0058] When performing intra prediction, if the size of the prediction unit and the size of the transformation unit are the same, intra prediction for the prediction unit can be performed based on the pixels located to the left of the prediction unit, the pixels located at the upper left, and the pixels located at the upper. However, when performing intra prediction, if the sizes of the prediction unit and the transformation unit are different, intra prediction can be performed using reference pixels based on the transformation unit. In addition, intra prediction using NxN division can be used only for the minimum coding unit.
[0059] The intra prediction method can generate a prediction block after applying an Adaptive Intra Smoothing (AIS) filter to a reference pixel according to a prediction mode. The type of AIS filter applied to the reference pixel may be different. In order to perform the intra prediction method, the intra prediction mode of the current prediction unit can be predicted from the intra prediction modes of prediction units existing around the current prediction unit. When the prediction mode of the current prediction unit is predicted using the mode information predicted from the surrounding prediction units, if the intra prediction modes of the current prediction unit and the surrounding prediction units are the same, information indicating that the prediction modes of the current prediction unit and the surrounding prediction units are the same can be transmitted using predetermined flag information, and if the prediction modes of the current prediction unit and the surrounding prediction units are different, entropy encoding can be performed to encode the prediction mode information of the current block.
[0060] Additionally, a residual block containing residual value information, which is the difference between the prediction unit that performed the prediction based on the prediction unit generated in the prediction unit (120, 125) and the original block of the prediction unit, can be generated. The generated residual block can be input to the transformation unit (130).
[0061] In the transformation unit (130), the residual block including the residual value information of the prediction unit generated through the original block and the prediction unit (120, 125) can be transformed using a transformation method such as DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), or KLT. Whether to apply DCT, DST, or KLT to transform the residual block can be determined based on the intra prediction mode information of the prediction unit used to generate the residual block.
[0062] The quantization unit (135) can quantize values converted to the frequency domain by the transformation unit (130). The quantization coefficients can vary depending on the block or the importance of the image. The values produced by the quantization unit (135) can be provided to the dequantization unit (140) and the reordering unit (160).
[0063] The rearrangement unit (160) can perform rearrangement of coefficient values for quantized residual values.
[0064] The rearrangement unit (160) can change a two-dimensional block-shaped coefficient into a one-dimensional vector form through a coefficient scanning method. For example, the rearrangement unit (160) can change the two-dimensional block-shaped coefficient into a one-dimensional vector form by scanning from the DC coefficient to the coefficient of the high-frequency region using a zig-zag scan method. Depending on the size of the transformation unit and the intra prediction mode, a vertical scan that scans the two-dimensional block-shaped coefficient in the column direction or a horizontal scan that scans the two-dimensional block-shaped coefficient in the row direction may be used instead of the zig-zag scan. That is, depending on the size of the transformation unit and the intra prediction mode, it is possible to determine which scan method among the zig-zag scan, the vertical scan, and the horizontal scan is to be used.
[0065] The entropy encoding unit (165) can perform entropy encoding based on the values produced by the rearrangement unit (160). Entropy encoding can use various encoding methods such as, for example, Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC).
[0066] The entropy encoding unit (165) can encode various information such as residual value coefficient information of an encoding unit, block type information, prediction mode information, division unit information, prediction unit information, transmission unit information, motion vector information, reference frame information, block interpolation information, and filtering information from the rearrangement unit (160) and the prediction unit (120, 125).
[0067] The entropy encoding unit (165) can entropy encode the coefficient values of the encoding unit input from the rearrangement unit (160).
[0068] The inverse quantization unit (140) and the inverse transformation unit (145) inversely quantize the values quantized in the quantization unit (135) and inversely transform the values transformed in the transformation unit (130). The residual values generated in the inverse quantization unit (140) and the inverse transformation unit (145) can be combined with the predicted prediction units predicted through the motion estimation unit, motion compensation unit, and intra prediction unit included in the prediction unit (120, 125) to generate a reconstructed block.
[0069] The filter unit (150) may include at least one of a deblocking filter, an offset correction unit, and an ALF (Adaptive Loop Filter).
[0070] A deblocking filter can remove block distortion caused by boundaries between blocks in a reconstructed picture. To determine whether to perform deblocking, a deblocking filter can be applied to the current block based on the pixels contained in several columns or rows within the block. When applying a deblocking filter to a block, a strong filter or a weak filter can be applied depending on the required deblocking filtering strength. Furthermore, when applying a deblocking filter, horizontal and vertical filtering can be processed in parallel when performing vertical and horizontal filtering.
[0071] The offset correction unit can correct the offset from the original image on a pixel-by-pixel basis for an image that has undergone deblocking. To perform offset correction for a specific picture, the pixels contained in the image can be divided into a certain number of regions, the regions to be offset can be determined, and the offset can be applied to those regions. Alternatively, the offset can be applied by considering the edge information of each pixel.
[0072] Adaptive Loop Filtering (ALF) can be performed based on the comparison of the filtered restored image with the original image. After dividing the pixels included in the image into predetermined groups, a filter to be applied to each group can be determined, and filtering can be performed differentially for each group. Information regarding whether to apply ALF can be transmitted by luminance signal for each coding unit (CU), and the shape and filter coefficients of the ALF filter to be applied can vary depending on each block. Furthermore, an ALF filter of the same shape (fixed shape) can be applied regardless of the characteristics of the target block.
[0073] The memory (155) can store a restored block or picture produced through the filter unit (150), and the stored restored block or picture can be provided to the prediction unit (120, 125) when performing inter prediction.
[0074]
[0075] FIG. 2 is a block diagram showing an image decoding device according to an embodiment of the present disclosure.
[0076] Referring to FIG. 2, the image decoding device (200) may include an entropy decoding unit (210), a rearrangement unit (215), an inverse quantization unit (220), an inverse transformation unit (225), a prediction unit (230, 235), a filter unit (240), and a memory (245).
[0077] When a video bitstream is input to a video encoding device, the input bitstream can be decoded in the opposite procedure to that of the video encoding device.
[0078] The entropy decoding unit (210) can perform entropy decoding in a procedure opposite to that of the entropy encoding unit of the video encoding device. For example, various methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) can be applied in response to the method performed in the video encoding device.
[0079] The entropy decoding unit (210) can decode information related to intra prediction and inter prediction performed in the encoding device.
[0080] The reordering unit (215) can perform reordering based on the method in which the bitstream entropy-decoded by the entropy decoding unit (210) is reordered by the encoding unit. The coefficients expressed in the form of a one-dimensional vector can be reordered by restoring them back to coefficients in the form of a two-dimensional block. The reordering unit (215) can perform reordering by receiving information related to the coefficient scanning performed by the encoding unit and performing reverse scanning based on the scanning order performed by the corresponding encoding unit.
[0081] The dequantization unit (220) can perform dequantization based on the quantization parameters provided from the encoding device and the coefficient values of the rearranged block.
[0082] The inverse transform unit (225) can perform inverse transform, i.e., inverse DCT, inverse DST, and inverse KLT, on the transforms performed by the transform unit, i.e., DCT, DST, and KLT, on the quantization result performed by the image encoding device. The inverse transform can be performed based on the transmission unit determined by the image encoding device. In the inverse transform unit (225) of the image decoding device, a transform technique (e.g., DCT, DST, KLT) can be selectively performed according to a plurality of pieces of information, such as a prediction method, the size of the current block, and the prediction direction.
[0083] The prediction unit (230, 235) can generate a prediction block based on the prediction block generation related information provided by the entropy decoding unit (210) and the previously decoded block or picture information provided by the memory (245).
[0084] As described above, when performing intra prediction in the same manner as the operation in the video encoding device, if the size of the prediction unit and the size of the transformation unit are the same, intra prediction for the prediction unit is performed based on the pixels on the left side of the prediction unit, the pixels on the upper left side, and the pixels on the upper side. However, when performing intra prediction, if the size of the prediction unit and the size of the transformation unit are different, intra prediction can be performed using a reference pixel based on the transformation unit. In addition, intra prediction using NxN division only for the minimum coding unit can be used.
[0085] The prediction unit (230, 235) may include a prediction unit determination unit, an inter prediction unit, and an intra prediction unit. The prediction unit determination unit may receive various information such as prediction unit information input from the entropy decoding unit (210), prediction mode information of an intra prediction method, and motion prediction-related information of an inter prediction method, and may distinguish a prediction unit from a current encoding unit and determine whether the prediction unit performs inter prediction or intra prediction. The inter prediction unit (230) may perform inter prediction on the current prediction unit based on information included in at least one of a previous picture or a subsequent picture of the current picture including the current prediction unit, using information necessary for inter prediction of the current prediction unit provided from the video encoding device. Alternatively, inter prediction may be performed based on information on a pre-restored portion of the current picture including the current prediction unit.
[0086] In order to perform inter prediction, it is possible to determine whether the motion prediction method of the prediction unit included in the encoding unit is Skip Mode, Merge Mode, AMVP Mode, or Intra Block Copy Mode based on the encoding unit.
[0087] The intra prediction unit (235) can generate a prediction block based on pixel information in the current picture. If the prediction unit is a prediction unit that has performed intra prediction, intra prediction can be performed based on intra prediction mode information of the prediction unit provided by the image encoding device. The intra prediction unit (235) can include an AIS (Adaptive Intra Smoothing) filter, a reference pixel interpolation unit, and a DC filter. The AIS filter is a part that performs filtering on the reference pixels of the current block, and can determine and apply whether to apply the filter according to the prediction mode of the current prediction unit. AIS filtering can be performed on the reference pixels of the current block using the prediction mode and AIS filter information of the prediction unit provided by the image encoding device. If the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.
[0088] The reference pixel interpolation unit can interpolate the reference pixel to generate a reference pixel of a pixel unit less than an integer value when the prediction mode of the prediction unit is a prediction unit that performs intra prediction based on the pixel value interpolated from the reference pixel. When the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating the reference pixel, the reference pixel may not be interpolated. The DC filter can generate a prediction block through filtering when the prediction mode of the current block is the DC mode.
[0089] The restored block or picture may be provided to a filter unit (240). The filter unit (240) may include a deblocking filter, an offset correction unit, and an ALF.
[0090] Information regarding whether a deblocking filter has been applied to a corresponding block or picture may be received from a video encoding device, and if a deblocking filter has been applied, information regarding whether a strong or weak filter has been applied. The deblocking filter of the video decoding device may receive information related to the deblocking filter provided by the video encoding device, and the video decoding device may perform deblocking filtering on the corresponding block.
[0091] The offset correction unit can perform offset correction on the restored image based on the type of offset correction applied to the image during encoding and offset value information.
[0092] ALF can be applied to an encoding unit based on information such as whether ALF is applied and ALF coefficient information provided from an encoding device. This ALF information can be provided by being included in a specific parameter set.
[0093] The memory (245) can store a restored picture or block so that it can be used as a reference picture or reference block, and can also provide the restored picture to an output unit.
[0094] As described above, in the following embodiments of the present disclosure, for convenience of explanation, the term coding unit is used as an encoding unit, but it may also be a unit that performs not only encoding but also decoding.
[0095] In addition, the current block represents a block to be encoded / decoded, and may represent a coding tree block (or coding tree unit), an encoding block (or encoding unit), a transform block (or transform unit), or a prediction block (or prediction unit), depending on the encoding / decoding step. In this specification, a 'unit' represents a basic unit for performing a specific encoding / decoding process, and a 'block' may represent a pixel array of a predetermined size. Unless otherwise specified, 'block' and 'unit' may be used with the same meaning. For example, in the embodiment described below, an encoding block (coding block) and an encoding unit (coding unit) may be understood to have the same meaning.
[0096]
[0097] FIG. 3 is a flowchart illustrating an intra prediction method according to one embodiment of the present disclosure.
[0098] Referring to FIG. 3, an index of a reference sample line of a current block can be determined (S301). The index can specify one of a plurality of reference sample line candidates. The plurality of reference sample line candidates can include an adjacent reference sample line adjacent to the current block and at least one non-adjacent reference sample line that is not adjacent to the current block.
[0099] For example, an adjacent reference sample line consisting of an adjacent row whose y-axis coordinate is 1 less than the top row of the current block and an adjacent column whose x-axis coordinate is 1 less than the leftmost column of the current block can be used as a reference sample line candidate.
[0100] A first non-adjacent reference sample line including a non-adjacent row whose y-axis coordinate is 2 less than the top row of the current block and a non-adjacent column whose x-axis coordinate is 2 less than the leftmost column of the current block can be used as a reference sample line candidate.
[0101] A second non-adjacent reference sample line including a non-adjacent row whose y-axis coordinate is 3 less than the top row of the current block and a non-adjacent column whose x-axis coordinate is 3 less than the leftmost column of the current block can be used as a reference sample line candidate.
[0102] The above index may point to one of the adjacent reference sample line, the first non-adjacent reference sample line, or the second non-adjacent reference sample line. For example, an index of 0 means that the adjacent reference sample line is selected, an index of 1 means that the first non-adjacent reference sample line is selected, and an index of 2 means that the second non-adjacent reference sample line is selected.
[0103] An index specifying one of multiple reference sample line candidates can be signaled via the bitstream.
[0104] Alternatively, an index can be signaled for a luma component block, and an index can be omitted for a chroma component block. If an index is omitted, the index can be considered as 0. That is, intra prediction can be performed for a chroma component block using adjacent reference sample lines.
[0105] The restored samples included in the selected reference sample line can be derived as reference samples.
[0106] Next, the intra prediction mode of the current block can be determined (S302).
[0107] Figure 4 illustrates the types of intra prediction modes. As shown in the example in Figure 4, the intra prediction modes include non-directional prediction modes (DC and Planar) and directional prediction modes. In Figure 4, 65 directional prediction modes are defined as examples.
[0108] A flag indicating whether the intra prediction mode of the current block is identical to the Most Probable Mode (MPM) can be signaled through the bitstream. For example, a value of the MPM flag of 1 indicates that an MPM identical to the intra prediction mode of the current block exists. Conversely, a value of the MPM flag of 0 indicates that an MPM identical to the intra prediction mode of the current block does not exist.
[0109] When the value of the MPM flag is 1, a flag indicating whether the intra prediction mode of the current block is the same as the default intra prediction mode may be signaled. The default intra prediction mode may be at least one of DC, planar, vertical direction prediction mode, or horizontal direction prediction mode. For example, a flag intra_not_planar_flag indicating whether the intra prediction mode of the current block is the planar mode may be signaled. A value of the flag intra_not_planar_flag of 0 indicates that the intra prediction mode of the current block is planar. On the other hand, a value of the flag intra_not_planar_flag of 1 indicates that the intra prediction mode of the current block is not planar. When the value of the flag intra_not_planar_flag of 1 is 1, an index specifying one of the MPM candidates may be signaled. The intra prediction mode of the current block may be set to be the same as the MPM indicated by the MPM index.
[0110] Based on the reference samples belonging to the reference sample line and the intra prediction mode, a prediction sample can be derived (S303).
[0111] If the intra prediction mode of the current block is a directional prediction mode, a prediction sample can be derived using a reference sample located on a line following the angle of the directional prediction mode.
[0112] If the intra prediction mode of the current block is planar mode, a prediction sample can be derived using a reference sample located in the vertical direction of the prediction target sample and a reference sample located in the horizontal direction.
[0113] Figure 5 is a drawing for explaining an example of deriving a prediction sample under planar mode.
[0114] In Fig. 5, T represents a reference sample adjacent to the upper right corner of the current block, and L represents a reference sample adjacent to the lower left corner of the current block.
[0115] Under planner mode, for a prediction target sample, a horizontal direction prediction sample P1 and a vertical direction prediction sample P2 can be derived.
[0116] The horizontal direction prediction sample P1 can be generated by linearly interpolating the reference sample H and the upper right reference sample T located on the same horizontal line as the prediction target sample.
[0117] The vertical direction prediction sample P2 can be generated by linearly interpolating the reference sample V and the lower left reference sample L, which are located on the same vertical line as the prediction target sample.
[0118] Thereafter, a prediction sample can be derived based on a weighted sum operation of horizontal direction prediction samples P1 and vertical direction prediction samples P2. Mathematical expression 1 shows an example in which a prediction sample P is derived by a weighted sum operation of horizontal direction prediction samples P1 and vertical direction prediction samples P2.
[0119]
[0120] In the above mathematical expression 1, α represents a weight applied to the horizontal direction prediction sample P1, and β represents a weight applied to the vertical direction prediction sample P2.
[0121] The weights α and β may be determined based on the size or shape of the current block. Specifically, the weights α and β may be determined by considering at least one of the width or height of the current block. For example, if the width and height of the current block are the same, the weights α and β may be set to the same value. If the weights α and β are the same, the prediction sample may be derived as the average value of the horizontal direction prediction sample P1 and the vertical direction prediction sample P2. On the other hand, if the width and height of the current block are different, the weights α and β may be set differently. For example, if the width of the current block is greater than the height, the weight β may be set to a value greater than the weight α, and if the height of the current block is greater than the width, the weight α may be set to a value greater than the weight β. Alternatively, conversely, if the width of the current block is greater than the height, the weight α may be set to a value greater than the weight β, and if the height of the current block is greater than the width, the weight β may be set to a value greater than the weight α.
[0122] As another example, weights α and β can be derived from one of a plurality of weight set candidates. For example, if weight candidate sets (1, 1), (3, 1), and (1, 3) representing combinations of weights α and β are predefined, weights α and β can be selected to be identical to one of the weight candidate sets.
[0123] An index pointing to one of multiple weight set candidates can be signaled via the bitstream. The index can be signaled at the block level. For example, the index can be signaled at the coding block or transform block level.
[0124] Alternatively, indices can be signaled at the coding tree unit, slice, picture, or sequence level. Blocks included in an index transmission unit can determine weights α and β by referring to indices signaled at a higher level. That is, weights α and β can be set identically for blocks included in an index transmission unit.
[0125] In the example of Fig. 5, it is shown that the upper right reference sample T is used to derive the horizontal direction prediction sample P1, and the lower left reference sample L is used to derive the vertical direction prediction sample P2.
[0126] A horizontal prediction sample P1 can be derived using reference samples other than the upper right reference sample, or a vertical prediction sample P2 can be derived using reference samples other than the lower left reference sample. For example, reference sample set candidates for a first reference sample used to derive the horizontal prediction sample P1 and a second reference sample used to derive the vertical prediction sample P2 can be configured, and a selected one of the plurality of reference sample set candidates can be used to derive the horizontal prediction sample P1 and the vertical prediction sample P2.
[0127] An index identifying one of multiple reference sample set candidates may be signaled via the bitstream. The index may be signaled on a block, sub-block, or sample basis.
[0128] Alternatively, a candidate reference sample set may be selected based on the location of the target sample to be predicted.
[0129] Figure 6 illustrates multiple reference sample set candidates.
[0130] In the example shown in Fig. 6, the notation (y, x) represents a combination of the y-coordinate and the x-coordinate of each sample. For example, (2, 1) represents a sample whose y-coordinate is 2 and whose x-coordinate is 1.
[0131] In the example of FIG. 6, the first reference sample set candidate may be composed of a reference sample T1 adjacent to the upper right corner of the current block and a reference sample L1 adjacent to the upper left corner of the current block. If the position of the upper left sample of the current block is (0, 0), T1 represents the reference sample with coordinates (-1, W), and L1 represents the reference sample with coordinates (H, -1). Here, W and H represent the width and height of the current block, respectively.
[0132] The second reference sample set candidate may be composed of a reference sample T2 adjacent to the top of T1 and a reference sample L2 adjacent to the left of L1. For example, T2 represents a reference sample at coordinates (-2, W), and L2 represents a reference sample at coordinates (H, -2).
[0133] The third reference sample set candidate may be composed of a reference sample T3 adjacent to the top of T2 and a reference sample L3 adjacent to the left of L2. For example, T3 represents a reference sample at coordinates (-3, W), and L3 represents a reference sample at coordinates (H, -3).
[0134] The fourth reference sample set candidate may be composed of a reference sample T4 adjacent to the top of T3 and a reference sample L4 adjacent to the left of L3. For example, T4 represents a reference sample at coordinates (-4, W), and L4 represents a reference sample at coordinates (H, -4).
[0135] The reference sample set candidates are not limited to the illustrated examples. For example, in the example of FIG. 6, it is illustrated that a combination of a reference sample whose x-axis coordinate of the current block is W and a reference sample whose y-axis coordinate is H is set as a reference sample set candidate. However, unlike the illustrated example, a reference sample whose x-axis coordinate is W / 2 or (W / 2)-1 or a reference sample whose y-axis coordinate is H / 2 or (H / 2)-1 may also constitute a reference sample set candidate.
[0136] A reference sample set may also be adaptively selected based on at least one of the position or size of the current block. For example, if the current block is a square with equal width and height, a reference sample set consisting of reference samples (-1, W) and reference samples (H, -1) may be used. If the current block is a non-square with a width greater than its height, a reference sample set consisting of reference samples (-1, W / 2) and reference samples (H, -1) may be used. If the current block is a non-square with a height greater than its width, a reference sample set consisting of reference samples (-1, W) and reference samples (H / 2, -1) may be used.
[0137] If the intra prediction mode of the current block is DC, the prediction sample can be derived based on the average value of the reference samples.
[0138] Figure 7 is intended to explain a method for deriving prediction samples under DC mode.
[0139] The average value of reference samples adjacent to the current block can be calculated, and the average value calculated for all samples within the current block can be set as the predicted value.
[0140] The mean value can be derived based on the upper reference samples adjacent to the upper side of the current block and the left reference samples adjacent to the left side of the current block.
[0141] Alternatively, depending on the shape of the current block, the average can be derived using only the top reference samples or only the left reference samples. For example, if the current block is a square block, the average can be derived using the top reference samples and the left reference samples. If the width of the current block is greater than the height or the width to height ratio is greater than (or less than) a predefined value, the average can be derived using only the top reference samples. If the height of the current block is greater than the width or the width to height ratio is greater than (or less than) a predefined value, the average can be derived using only the left reference samples.
[0142] When deriving the mean, unusual reference samples can be excluded. For example, when the mean of restored pixels is m and the standard deviation is σ, reference samples that do not fall within a range of k times the standard deviation from the mean can be used for calculating the mean, and reference samples that do not can be excluded from the calculation of the mean. Here, k is a natural number and can have a value such as 1, 2, 3, or 4. The value of k can be predefined in the encoder and decoder. Alternatively, the value of k can be determined based on at least one of the size or shape of the block. Alternatively, information indicating the value of k can be signaled through the bitstream.
[0143] Instead of the standard deviation σ, an arbitrary threshold value can be set to determine whether a reference sample can be used. For example, a reference sample whose absolute value of the difference from the mean is less than or equal to the threshold value can be set as usable for deriving the mean value. Conversely, a reference sample whose absolute value of the difference from the mean is greater than the threshold value can be set as unusable for deriving the mean value. The threshold value may be predefined in the encoder and decoder. Alternatively, the threshold value may be determined based on at least one of the block size or shape. Alternatively, information indicating the threshold value may be signaled through the bitstream.
[0144] To reduce the complexity of calculating the average, reference samples can be sub-sampled, and the average can be calculated using the sub-sampled reference samples. For example, when sub-sampling is performed at two-sample intervals, the upper reference samples located at coordinates (-1, 2m) among the upper reference samples can be used to derive the average, or the upper reference samples located at coordinates (-1, 2m+1) can be used to derive the average. In addition, the left reference samples located at coordinates (2n, -1) among the left reference samples can be used to derive the average, or the left reference samples located at coordinates (2n+1, -1) can be used to derive the average. Here, m is a natural number from 0 to (W / 2)-1, and n is a natural number from 0 to (H / 2)-1. The ranges of m and n can be determined based on the sub-sampling rate. The sub-sampling rate can also be adaptively determined depending on the size or shape of the current block.
[0145] During subsampling, reference samples can be selected at fixed intervals. At this time, the values representing the intervals between reference samples can be predefined in the encoder and decoder. Alternatively, the intervals between reference samples can be adaptively determined based on at least one of the size or shape of the current block. Alternatively, the intervals between reference samples can be determined based on index information specifying one of multiple candidates.
[0146] As another example, after forming multiple set candidates for reference samples, an average value can be derived based on one selected from the multiple set candidates.
[0147] For example, the first set of candidates may include all top reference samples that touch the top boundary of the current block and all left reference samples that touch the left boundary of the current block.
[0148] The second set of candidates may include upper reference samples at position (-1, 2m) among the upper reference samples of the current block and left reference samples at position (2n, -1) among the left reference samples of the current block.
[0149] The third set of candidates may include upper reference samples at position (-1, 2m+1) among the upper reference samples of the current block and left reference samples at position (2n+1, -1) among the left reference samples of the current block.
[0150] The number and types of set candidates are not limited to the examples described above. It is also possible to define more or fewer set candidates than the examples described above.
[0151] The encoder can generate a prediction block for each set candidate and measure the cost for each prediction block to determine the optimal set candidate. Furthermore, an index identifying the optimal set candidate can be encoded and signaled via the bitstream.
[0152] Alternatively, the optimal set candidate may be determined based on at least one of the size or shape of the current block.
[0153] As another example, one of a set candidate consisting of reference samples before sub-sampling is performed (e.g., at least one of the left reference samples and the top reference samples) and a set candidate consisting of reference samples after sub-sampling may be selected as the optimal set candidate.
[0154]
[0155] The intra prediction mode of the chroma component may be determined based on the intra prediction mode of the luma component. Specifically, the intra prediction mode of the chroma component is determined by referring to the intra prediction mode of the luma component, but the method for determining the intra prediction mode of the chroma component may vary depending on the chroma mode.
[0156] A chroma mode includes at least one of DC mode, planar mode, VER mode, HOR mode, or DM mode. Table 1 shows a method for deriving an intra prediction mode of a chroma component according to the chroma mode.
[0157] Chroma Mode Index Luminance Screen Prediction Mode050181X (0 <= X <= 66)0 (Planar mode)6600001 (VER mode)50665050502 (HOR mode)18186618183 (DC mode)1116614 (DM mode)050181X
[0158] Index information for specifying a chroma mode may be signaled via the bitstream. For example, a chroma mode index indicating one of DC mode, planar mode, VER mode, HOR mode, or DM mode may be signaled via the bitstream.
[0159] Referring to Table 1, when the chroma mode is a planar mode (e.g., when the chroma mode index is 0), the intra prediction mode of the chroma component can be set to the planar mode, except when the intra prediction mode of the luma component is 0 (planar).
[0160] When the chroma mode is VER mode (e.g., when the chroma mode index is 1), the intra prediction mode of the chroma component can be set to the vertical direction, except when the intra prediction mode of the luma component is 50 (vertical direction).
[0161] When the chroma mode is HOR mode (e.g., when the chroma mode index is 2), the intra prediction mode of the chroma component can be set to the horizontal direction, except when the intra prediction mode of the luma component is 18 (horizontal direction).
[0162] When the chroma mode is DC mode (e.g., when the chroma mode index is 3), the intra prediction mode of the chroma component can be set to DC, except when the intra prediction mode of the luma component is 1 (DC).
[0163] When the chroma mode is DM mode (e.g., when the chroma mode index is 4), the intra prediction mode of the chroma component can be set to be the same as the intra prediction mode of the luma component.
[0164] In the example in Table 1, the Cross-component linear mode (CCLM) mode can also be additionally defined as a chroma mode. Table 2 shows an example in which the CCLM mode is added as a new chroma mode.
[0165] Chroma Mode Index Luminance Screen Prediction Mode050181X (0 <= X <= 66)0 (Planar mode)6600001 (VER mode)50665050502 (HOR mode)18186618183 (DC mode)1116614818181818158282828282683838383837 (DM mode)050181X
[0166] In Table 2, it is shown that the index assigned to the DM mode has changed from 4 to 7, and CCLM modes have been added to 4 to 6.
[0167] Multiple CCLM modes can be defined. For example, in Table 2, indices 4 to 6 indicate the first CCLM mode (LM mode), the second CCLM mode (LM-A (Above) mode), and the third CCLM mode (LM-L (Left) mode), respectively.
[0168] Based on the chroma mode index, it can be determined whether the chroma mode is CCLM mode.
[0169] The maximum length of the chroma mode index can be determined variably depending on whether the CCLM mode is enabled. For example, if the CCLM mode is not enabled, the chroma mode index can point to one of 0 to 4, as illustrated in Table 1. On the other hand, if the CCLM mode is enabled, the chroma mode index can point to one of 0 to 7, as illustrated in Table 2.
[0170] As another example, a flag indicating whether the chroma mode is CCLM mode can be signaled. For example, a flag cclm_mode_flag of 1 indicates that the chroma mode is CCLM mode. Conversely, a flag cclm_mode_flag of 0 indicates that the chroma mode is not CCLM mode.
[0171] When the flag cclm_mode_flag is 0, a chroma mode index specifying one of the remaining chroma modes can be signaled through the bitstream. Since whether the CCLM mode is applied is determined by a separate flag, the maximum length of the chroma mode index can have a fixed value regardless of whether the CCLM mode is allowed.
[0172] When the flag cclm_mode_flag is 1, an index may be additionally signaled to specify one of multiple CCLM modes. For example, depending on the index cclm_mode_idx, one of the LM mode, LM-A mode, or LM-L mode may be determined as the chroma mode.
[0173] As another example, based on at least one of a chroma subsampling format, a size and / or shape of a current block, or whether CCLM is applied to a neighboring block, it may be determined whether to use a flag indicating whether CCLM is applied, whether to use an index specifying one of a plurality of CCLM modes, or whether to encode / decode the flag and index indicating whether CCLM mode is applied before a chroma mode index.
[0174] Under CCLM mode, prediction samples of chroma components can be derived based on restored luma component samples. Therefore, by utilizing CCLM mode, redundancy between luma component samples and chroma component samples can be eliminated. Mathematical expression 2 illustrates an example of deriving prediction samples of chroma components under CCLM mode.
[0175]
[0176] In the above mathematical expression 2, Pred C Pred means the prediction sample of the chroma component. L ' represents the restored luma component sample. Additionally, α and β represent CCLM parameters. Specifically, α represents the weight, and β represents the offset.
[0177] Below, we will examine in detail the method for deriving prediction samples of chroma components under CCLM mode.
[0178] FIG. 8 is a flowchart illustrating a method for deriving a prediction sample of a chroma component according to one embodiment of the present disclosure.
[0179] First, it is confirmed whether the sizes of the luma image and the chroma image are the same (S801). For example, if the chroma subsampling format is 4:4:4, the sizes of the luma image and the chroma image may be determined to be the same. On the other hand, if the chroma subsampling format is 4:2:2 or 4:2:0, the sizes of the luma image and the chroma image may be determined to be different.
[0180] If the sizes of the luma image and the chroma image are different, the restored samples included in the luma image can be downsampled (S802). By applying a downsampling filter to the luma block corresponding to the current chroma block, a filtered luma block having the same size as the current chroma block can be obtained.
[0181] If the sizes of the luma and chroma images are the same, applying a downsampling filter to the luma block can be omitted.
[0182] The type of the downsampling filter can be determined based on at least one of the type of the current image, the CCLM mode type, or the position of the sample. Different types of filters can differ in at least one of the filter shape, the number of taps, or the coefficients. The type of the current image indicates whether the current picture is an HDR (High Dynamic Range) image. The CCLM mode type indicates one of the LM mode, LM-A mode, or LM-L mode.
[0183] Information for determining the current video type can be signaled via the bitstream. For example, a flag indicating whether a chroma component sample position is shifted relative to a co-located luma sample position can be signaled via the bitstream. A flag of 1 indicates that the chroma component sample position is the same as the co-located luma sample position. This indicates that the current video is an HDR video. On the other hand, a flag of 0 indicates that the chroma component sample position is shifted downward by 0.5 pixels relative to the co-located luma sample position. This indicates that the current video is not an HDR video.
[0184] Depending on the size of the luma image and the size of the chroma image, the position of the collocated luma sample corresponding to the chroma sample can be determined. For example, the position of the collocated luma sample corresponding to the chroma sample at the (y, x) position can be determined as (y*subHeightC, x*subWidthC). Here, the variables subWidthC and subHeightC can be determined based on the chroma subsampling format. For example, when the chroma subsampling format is 4:4:4, the variables subWidthC and subHeightC can be set to 1. When the chroma subsampling format is 4:2:2, the variable subWidthC can be set to 2, and the variable subHeightC can be set to 1. When the chroma subsampling format is 4:2:0, the variables subWidthC and subHeightC can be set to 2.
[0185] Figure 9 illustrates an example of a downsampling filter type by chroma sample position when the current image is an HDR image.
[0186] In the illustrated example, A represents a sample located at the upper left of the current chroma block. B represents the remaining samples excluding the upper left sample A among the samples included in the upper row of the current chroma block. C represents the remaining samples excluding the upper left sample A among the samples included in the leftmost column of the current chroma block. D represents the remaining samples excluding the samples included in the upper row and the leftmost column of the current chroma block.
[0187] The variable AvailL indicates whether the left neighboring samples of the luma block are available. The variable AvailT indicates whether the top neighboring samples of the luma block are available. The variables AvailL and AvailT may be determined based on at least one of the CCLM mode type, whether the neighboring block is encoded with intra prediction, whether the luma block and the neighboring block are included in the same coding tree unit, or whether the neighboring block is outside the picture boundary.
[0188] A cross-shaped down-sampling filter may be applied to a luma sample corresponding to a chroma sample D. Specifically, the down-sampling filter may be applied to a collocated luma sample of the chroma sample D, horizontally neighboring luma samples of the collocated luma sample, and vertically neighboring luma samples of the collocated luma sample. At this time, the ratio of the filter coefficients applied to the collocated luma sample and the filter coefficients applied to the neighboring luma sample may be 4:1.
[0189] A down-sampling filter type for a luma sample corresponding to a chroma sample C included in the leftmost column within a chroma block may be determined based on a variable AvailL. For example, if left neighboring samples adjacent to the luma block are available, a cross-shaped filter may be applied. When the cross-shaped filter is applied, a down-sampling filter may be applied to the collocated luma sample of the chroma sample C, the horizontally neighboring luma samples of the collocated luma samples, and the vertically neighboring luma samples of the collocated luma samples. At this time, a ratio of a filter coefficient applied to the collocated luma sample and a filter coefficient applied to the neighboring luma sample may be 4:1.
[0190] On the other hand, if the left neighboring samples adjacent to the luma block are not available, a vertical filter may be applied. When a vertical filter is applied, a downsampling filter may be applied to the collocated luma samples of the chroma sample C and the vertically neighboring luma samples of the collocated luma samples. At this time, the ratio of the filter coefficients applied to the collocated luma samples and the filter coefficients applied to the neighboring luma samples may be 2:1.
[0191] A down-sampling filter type for a luma sample corresponding to a chroma sample B included in the top row within a chroma block may be determined based on a variable AvailT. For example, if upper neighboring samples adjacent to the luma block are available, a cross-shaped filter may be applied. When the cross-shaped filter is applied, a down-sampling filter may be applied to the collocated luma sample of the chroma sample B, the horizontally neighboring luma samples of the collocated luma samples, and the vertically neighboring luma samples of the collocated luma samples. At this time, a ratio of a filter coefficient applied to the collocated luma sample and a filter coefficient applied to the neighboring luma sample may be 4:1.
[0192] On the other hand, if the upper neighboring samples adjacent to the luma block are not available, a horizontal filter may be applied. When a horizontal filter is applied, a downsampling filter may be applied to the collocated luma samples of the chroma sample C and the horizontally neighboring luma samples of the collocated luma samples. In this case, the ratio of the filter coefficients applied to the collocated luma samples and the filter coefficients applied to the neighboring luma samples may be 2:1.
[0193] The down-sampling filter type for the luma sample corresponding to the upper left chroma sample A in the chroma block can be determined based on the variables AvailL and AvailT. For example, when both the left neighboring samples and the upper neighboring samples neighboring the luma block are available, a cross-shaped filter can be applied. When the cross-shaped filter is applied, a down-sampling filter can be applied to the collocated luma sample of the chroma sample A, the luma samples horizontally neighboring the collocated luma sample, and the luma samples vertically neighboring the collocated luma sample. At this time, the ratio of the filter coefficient applied to the collocated luma sample and the filter coefficient applied to the neighboring luma sample can be 4:1.
[0194] If the left neighboring samples of a luma block are available, while the top neighboring samples are not, a vertical filter may be applied. When a vertical filter is applied, a downsampling filter may be applied to the collocated luma samples of chroma sample A and the luma samples vertically neighboring the collocated luma samples. In this case, the ratio of the filter coefficients applied to the collocated luma samples and the filter coefficients applied to the neighboring luma samples may be 2:1.
[0195] If the upper neighboring samples adjacent to the luma block are available, while the left neighboring samples are not, a horizontal filter may be applied. When the horizontal filter is applied, a downsampling filter may be applied to the collocated luma samples of chroma sample A and the luma samples horizontally neighboring the collocated luma samples. In this case, the ratio of the filter coefficients applied to the collocated luma samples and the filter coefficients applied to the neighboring luma samples may be 2:1.
[0196] If both the top neighboring samples and the left neighboring samples adjacent to the luma block are unavailable, a downsampling filter may not be applied to the collocated luma sample corresponding to chroma sample A.
[0197] Figure 10 illustrates an example of a downsampling filter type by chroma sample position when the current image is not an HDR image.
[0198] A 6-tap down-sampling filter may be applied to collocated luma samples corresponding to samples included in the remaining rows excluding the leftmost row of a chroma block (e.g., B and D). Specifically, the down-sampling filter may be applied to horizontally neighboring samples of the collocated luma sample and the bottom neighboring sample, which are horizontally neighboring samples of each of the collocated luma sample and the bottom neighboring sample, with the collocated luma sample and the bottom neighboring sample as the center. At this time, the ratio of the filter coefficients applied to the collocated luma sample and the bottom neighboring sample and the filter coefficients applied to the horizontally neighboring samples may be 2:1.
[0199] For chroma component samples (e.g., A and C) included in the leftmost column of a luma block, different shapes of down-sampling filters may be applied depending on the variable AvailL. For example, if left neighboring samples of the luma block are available, a 6-tap down-sampling filter may be applied to the collocated luma sample corresponding to chroma component sample A or C. On the other hand, if left neighboring samples of the luma block are not available, a 2-tap down-sampling filter may be applied to the collocated luma sample corresponding to chroma component sample A or C. The 2-tap down-sampling filter may be applied to the collocated luma sample and the bottom neighboring sample located below the collocated luma sample. At this time, the ratio of filter coefficients applied to the collocated luma sample and the bottom neighboring sample may be 1:1.
[0200] In FIGS. 9 and 10, it is exemplified that the downsampling filter type is determined based on at least one of the variable AvailL indicating the availability of left neighboring samples of the luma block or the variable AvailT indicating the availability of upper neighboring blocks of the luma block.
[0201] As another example, the downsampling filter can be determined independently of the variables AvailL and AvailT. Specifically, a fixed-form downsampling filter can be applied regardless of the variables AvailL and AvailT.
[0202] Figures 11 and 12 illustrate examples in which the downsampling filter type is determined regardless of the availability of neighboring samples adjacent to a luma block. Figure 11 illustrates the application of the downsampling filter when the current image is an HDR image, and Figure 12 illustrates the application of the downsampling filter when the current image is not an HDR image.
[0203] For example, in the example illustrated in FIG. 11, the downsampling filter corresponding to each chroma sample can be determined without considering the availability of neighboring samples adjacent to the luma block.
[0204] To this end, the downsampling filter type that utilizes neighboring samples adjacent to the luma block can be set to unavailable. That is, in the examples shown in FIGS. 9 and 10, the downsampling filter selected when the variables AvailL and AvailT are false can be fixedly applied.
[0205] For example, if the luma block is an HDR image, a cross-shaped filter can be applied to the collocated luma sample corresponding to the chroma sample D in the chroma block.
[0206] For the collocated luma sample corresponding to the chroma sample C within the chroma block, a vertical filter can be applied.
[0207] For the collocated luma sample corresponding to chroma sample B within the chroma block, a horizontal filter can be applied.
[0208] For collocated luma samples corresponding to chroma sample A within a chroma block, a downsampling filter can be set not to be applied.
[0209] If the luma block is not an HDR image, a 6-tap downsampling filter can be applied to the collocated luma samples corresponding to chroma samples D or B in the chroma block.
[0210] A 2-tap down-sampling filter can be applied to the collocated luma samples corresponding to chroma samples A or C within a chroma block.
[0211] Contrary to the examples illustrated in FIGS. 11 and 12, a down-sampling filter type that utilizes neighboring samples adjacent to a luma block can also be fixedly applied to the luma block. That is, in the examples illustrated in FIGS. 9 and 10, a down-sampling filter selected when the variables AvailL and AvailT are true can be fixedly applied.
[0212] At this time, if the neighboring samples adjacent to the luma block are unavailable, the pixels located at the boundary within the luma block can be padded to the positions of the unavailable neighboring samples. That is, the unavailable neighboring samples can be replaced with pixels located at the boundary within the luma block. For example, if the left neighboring samples adjacent to the left of the luma block are unavailable, the reconstructed samples included in the leftmost column within the luma block can be padded to the left. Alternatively, if the top neighboring samples adjacent to the top of the luma block are unavailable, the reconstructed samples included in the top row within the luma block can be padded to the top.
[0213] In the examples illustrated in FIGS. 9 to 12, each of the chroma samples is classified into one of A to D, and then a different downsampling filter type is determined for each category. In this case, the classification of the chroma samples is illustrated as being performed based on at least one of whether the chroma sample is included in the top row or whether the chroma sample is included in the leftmost column.
[0214] Depending on the block size, the classification criteria for chroma samples may be set differently. For example, if the size of the chroma block is 4x4, the classification criteria illustrated in FIGS. 9 to 12 may be followed.
[0215] On the other hand, when the size of the chroma block is 16x16 or larger, the chroma samples can be classified based on whether they are included in the top two rows in the chroma block or whether they are included in the leftmost two columns in the chroma block. For example, when the chroma block is 16x16, the chroma samples included in the top left 2x2 area in the chroma block can be classified as A. In addition, the remaining chroma samples excluding the chroma samples classified as A among the chroma samples included in the top two rows in the chroma block can be classified as B. The remaining chroma samples excluding the chroma samples classified as A among the chroma samples included in the leftmost two columns of the chroma block can be classified as C. The remaining chroma samples in the chroma block can be classified as D.
[0216] CCLM parameters α and β can be derived based on the restored pixels around the chroma block and the restored pixels around the luma block (S803). If the sizes of the luma image and the chroma image are different, the restored pixels around the luma block can be downsampled.
[0217] CCLM parameters can be derived based on at least one of the upper neighboring samples adjacent to the upper side of the chroma block and the luma block or the left neighboring samples adjacent to the left side of the chroma block and the luma block.
[0218] Depending on the CCLM mode, the use of upper neighboring samples and left neighboring samples can be determined when deriving CCLM parameters. For example, under LM mode, CCLM parameters can be derived based on upper neighboring samples and left neighboring samples. Under LM-A mode, CCLM parameters can be derived based only on upper neighboring samples. Under LM-L mode, CCLM parameters can be derived based only on left neighboring samples.
[0219] Alternatively, the number or range of neighboring restored pixels may be determined based on at least one of the size and shape of the current block, the type of the current image, the CCLM mode type, or the chroma subsampling format.
[0220] Figure 13 shows an example in which the range of restored pixels used to derive CCLM parameters is set differently depending on the CCLM mode type.
[0221] For convenience of explanation, the width W and height H of the chroma block are both assumed to be 4.
[0222] When the LM mode is applied to a chroma block, the CCLM parameters can be derived using W upper neighboring samples touching the upper boundary of the chroma block and H left neighboring samples touching the left boundary of the chroma block.
[0223] When the LM-A mode is applied to a chroma block, the CCLM parameters can be derived using the 2W upper neighboring samples adjacent to the top of the chroma block.
[0224] When the LM-L mode is applied to a chroma block, CCLM parameters can be derived using the 2H left neighboring samples adjacent to the left of the chroma block.
[0225] Alternatively, the CCLM parameters can be derived by subsampling neighboring samples adjacent to the chroma block and then using only the subsampled neighboring samples.
[0226] For example, when the LM mode is applied to a chroma block, W upper neighboring samples that touch the upper boundary of the chroma block can be subsampled at intervals of two, and H left neighboring samples that touch the left boundary of the chroma block can be subsampled at intervals of two. Mathematical expression 3 shows the position combination of subsampled neighboring samples used to derive CCLM parameters under the LM mode.
[0227]
[0228] In the above mathematical expression 3, the first value in parentheses represents the y-coordinate of the neighboring sample, and the second value represents the x-coordinate of the neighboring sample.
[0229] When the LM-A mode is applied to a chroma block, 2W upper neighboring samples adjacent to the top of the chroma block can be subsampled. Equation 4 shows the position combination of the subsampled neighboring samples used to derive the CCLM parameters under the LM-A mode.
[0230]
[0231] When the LM-L mode is applied to a chroma block, 2H left neighboring samples adjacent to the left of the chroma block can be subsampled. Mathematical expression 5 shows the position combination of the subsampled neighboring samples used to derive the CCLM parameters under the LM-L mode.
[0232]
[0233] From a luma image, a collocated luma sample corresponding to a neighboring chroma sample can be extracted. In this case, if the sizes of the luma image and the chroma image are different, a luma sample to which a downsampling filter is applied can be derived.
[0234] A downsampling filter can be applied to collocated luma pixels and neighboring pixels adjacent to the collocated luma pixels.
[0235] The type of downsampling filter can be determined based on the type of the current image, the location of the collocated luma pixel, the variable AvailL, the variable AvailT, or whether the current block borders a coding tree unit. Different types of filters can differ in at least one of the filter shape, the number of taps, or the coefficients.
[0236] Below, we will look in detail at examples of deriving a filtered luma sample of an upper neighboring block adjacent to the top of a chroma block and examples of deriving a filtered luma sample of a left neighboring block adjacent to the left of a chroma block.
[0237] In order to derive a filtered luma sample for an upper neighboring sample adjacent to the upper side of a chroma block, reconstructed samples included in at most N lines from the upper boundary of the luma block can be used. Here, the number of lines can be determined based on at least one of a chroma subsampling format, a CCLM mode type, a picture type, a shape or size of a current block, whether the current block borders a coding tree unit boundary, or a type of a downsampling filter. In the present disclosure, it is assumed that when applying a downsampling filter to a collocated luma sample adjacent to the upper side of a luma block, reconstructed samples included in two rows around the upper boundary of the luma block are used.
[0238] Figure 14 illustrates the type of downsampling filter applied to the collocated luma samples of the upper neighboring samples when the current image is not an HDR image.
[0239] Figure 15 illustrates the type of downsampling filter applied to the collocated luma samples of the upper neighboring samples when the current image is an HDR image.
[0240] In the examples illustrated in FIGS. 14 and 15, the variable AvailTL may be derived by applying an AND operator between the variables AvailL and AvailT. That is, if both the left neighboring samples and the upper neighboring samples are available, the value of the variable AvailTL may be set to 1, and if at least one of the left neighboring samples and the upper neighboring samples is unavailable, the variable AvailTL may be set to 0.
[0241] The type of downsampling filter applied to the collocated luma samples can be determined based on at least one of the variables AvailL, AvailT, the position of the upper neighboring sample, and whether the current block touches the upper boundary of the coding tree unit.
[0242] First, let's look at how the downsampling filter is applied when the current image is not an HDR image.
[0243] For a chroma component upper neighboring sample whose x-axis coordinate is greater than 0, if both upper neighboring samples and left neighboring samples are available and the current block does not border the upper boundary of the coding tree unit, a 6-tap down-sampling filter may be applied to the collocated luma sample. Specifically, the down-sampling filter may be applied to horizontal neighboring samples that are horizontally neighboring to each of the collocated sample and the lower neighboring sample, centered on the collocated luma sample and the lower neighboring sample located below the collocated sample. At this time, the ratio of the filter coefficients applied to the collocated sample and the lower neighboring sample and the filter coefficients applied to the horizontal neighboring samples may be 2:1.
[0244] On the other hand, if at least one of the upper neighboring samples and the left neighboring samples is unavailable, or if the current block borders the upper boundary of the coding tree unit, a horizontal filter may be applied to the collocated luma sample. Specifically, a downsampling filter may be applied to the collocated luma sample and the horizontally neighboring luma samples of the collocated luma sample. At this time, the ratio of the filter coefficients applied to the collocated luma sample and the filter coefficients applied to the neighboring luma sample may be 2:1.
[0245] For a chroma component top neighbor sample whose x-axis coordinate is less than or equal to 0, if both top neighbor samples and left neighbor samples are available and the current block does not touch the top boundary of a coding tree unit, a 6-tap down-sampling filter may be applied to the collocated luma sample.
[0246] Both top neighbor samples and left neighbor samples are available, but if the current block touches the top boundary of the coding tree unit, a horizontal downsampling filter may be applied.
[0247] On the other hand, if the current coding block does not touch the upper boundary of the coding tree unit, but at least one of the upper neighboring samples and the left neighboring samples is unavailable, a 2-tap vertical filter may be applied to the collocated luma sample. The 2-tap vertical filter may be applied to the collocated luma sample and the lower neighboring sample located below the collocated luma sample. At this time, the ratio of the filter coefficients applied to the collocated luma sample and the lower neighboring sample may be 1:1.
[0248] On the other hand, if at least one of the upper neighboring samples and the left neighboring samples is unavailable and the current block touches the upper boundary of the coding tree unit, it may be set not to apply a downsampling filter to the collocated luma sample.
[0249] Next, we will look at how the downsampling filter is applied when the current image is an HDR image.
[0250] For a chroma component upper neighboring sample whose x-axis coordinate is greater than 0, if both upper neighboring samples and left neighboring samples are available and the current block does not touch the upper boundary of the coding tree unit, a cross-shaped filter may be applied to the collocated luma sample. Specifically, a down-sampling filter may be applied to the collocated luma sample, the horizontally neighboring luma samples of the collocated sample, and the vertically neighboring luma samples of the collocated luma sample. At this time, the ratio of the filter coefficients applied to the collocated luma sample and the filter coefficients applied to the neighboring luma samples may be 4:1.
[0251] On the other hand, if at least one of the upper neighboring samples and the left neighboring samples is unavailable, or if the current block borders the upper boundary of the coding tree unit, a horizontal filter may be applied to the collocated luma sample. Specifically, a downsampling filter may be applied to the collocated luma sample and the horizontally neighboring luma samples of the collocated luma sample. At this time, the ratio of the filter coefficients applied to the collocated luma sample and the filter coefficients applied to the neighboring luma sample may be 2:1.
[0252] For a chroma component top neighbor sample whose x-axis coordinate is less than or equal to 0, if both top neighbor samples and left neighbor samples are available and the current block does not touch the top boundary of the coding tree unit, a cross-shaped filter may be applied to the collocated luma sample.
[0253] Both top neighbor samples and left neighbor samples are available, but if the current block touches the top boundary of the coding tree unit, a horizontal downsampling filter may be applied.
[0254] On the other hand, if the current coding block does not touch the upper boundary of the coding tree unit, but at least one of the upper neighboring samples and the left neighboring samples is unavailable, it may be set not to apply a downsampling filter to the collocated luma sample.
[0255] It is possible to set not to apply a downsampling filter to a collocated luma sample even if at least one of the upper neighboring samples and the left neighboring samples is unavailable and the current block touches the upper boundary of the coding tree unit.
[0256] In the examples illustrated in FIGS. 14 and 15, the type of downsampling filter applied to the collocated luma samples is illustrated as being determined based on the image type, the variable AvailTL, and whether the current block touches the upper boundary of the coding tree unit.
[0257] As another example, the downsampling filter type may be determined independently of at least one of the image type, the variable AvailTL, or whether the current block touches the upper boundary of a coding tree unit.
[0258] Figure 16 shows an example in which a fixed type filter is applied depending on the upper neighboring sample position.
[0259] Regardless of whether the current image is an HDR image, a horizontal filter can be applied to a collocated luma sample if the x-coordinate of the upper neighboring sample of the chroma component is greater than 0.
[0260] On the other hand, if the x-coordinate of the upper neighboring sample of the chroma component is less than or equal to 0, the downsampling filter may not be applied to the collocated luma sample.
[0261] As another example, considering whether the current image is an HDR image, if the current image is an HDR image, a first type of downsampling filter can be applied to all upper neighboring samples. Conversely, if the current image is not an HDR image, a second type of downsampling filter can be applied to all upper neighboring samples.
[0262] Here, the first type and the second type may differ in at least one of the filter shape, number of taps, or coefficients. For example, the first type down-sampling filter may represent a 3-tap horizontal filter, and the second type down-sampling filter may represent a 6-tap filter.
[0263] At this time, if the neighboring samples adjacent to the luma block are unavailable, the available reconstruction samples can be padded in the positions of the unavailable neighboring samples. For example, if the left neighboring samples adjacent to the left of the luma block are unavailable, the reconstruction samples included in the leftmost column within the luma block can be padded to the left. Alternatively, if the top neighboring samples adjacent to the top of the luma block are unavailable, the reconstruction samples included in the top row within the luma block can be padded to the top.
[0264] By padding unavailable sample locations, the downsampling filter type can be determined without considering the availability of neighboring samples.
[0265] Next, we describe how to derive filtered luma samples for left neighboring samples.
[0266] When deriving a filtered luma sample, reconstructed samples included in at most M lines from the left boundary of a luma block can be used. At this time, the number of lines can be determined based on at least one of a chroma subsampling format, a CCLM mode type, a picture type, a shape or size of a current block, whether the current block borders a coding tree unit boundary, or a type of a downsampling filter. In the present disclosure, it is assumed that when applying a downsampling filter to a collocated luma sample on the left side of a luma block, reconstructed samples included in three columns around the left boundary of the luma block are used.
[0267] A downsampling filter can be applied to collocated luma pixels and neighboring pixels adjacent to the collocated luma pixels.
[0268] Figure 17 illustrates the type of downsampling filter applied to the collocated luma samples of the left neighboring samples.
[0269] The type of downsampling filter applied to the collocated luma samples can be determined based on at least one of the image type, the variable AvailL, the variable AvailT, and the position of the left neighboring sample.
[0270] First, let's look at how the downsampling filter is applied when the current image is an HDR image.
[0271] When both upper neighboring samples and left neighboring samples are available, a cross-shaped filter may be applied to the collocated luma sample. Specifically, a down-sampling filter may be applied to the collocated luma sample, the horizontally neighboring luma samples of the collocated sample, and the vertically neighboring luma samples of the collocated luma sample. At this time, the ratio of the filter coefficients applied to the collocated luma sample and the filter coefficients applied to the neighboring luma samples may be 4:1.
[0272] If the y-coordinate of the upper neighbor sample of the chroma component is greater than 0, a cross-shaped filter can be applied to the collocated luma sample, regardless of the availability of the left neighbor reference samples and the upper neighbor reference samples.
[0273] If the y-axis coordinate of the upper neighboring sample of the chroma component is less than or equal to 0 and at least one of the left neighboring reference samples and the upper neighboring reference samples is unavailable, a horizontal down-sampling filter may be applied. Specifically, the down-sampling filter may be applied to the collocated luma sample and the horizontally neighboring luma samples of the collocated sample. At this time, the ratio of the filter coefficient applied to the collocated luma sample and the filter coefficient applied to the horizontally neighboring samples may be 2:1.
[0274] If the current image is not an HDR image, a 6-tap down-sampling filter may be applied to the collocated luma samples. Specifically, the down-sampling filter may be applied to horizontal neighboring samples of the collocated luma samples and the bottom neighboring samples located below the collocated samples, centered on the collocated luma samples and the bottom neighboring samples. At this time, the ratio of the filter coefficients applied to the collocated samples and the bottom neighboring samples to the filter coefficients applied to the horizontal neighboring samples may be 2:1.
[0275] In the example illustrated in FIG. 16, the type of downsampling filter applied to the collocated luma samples is illustrated as being determined based on the image type and the variable AvailTL.
[0276] As another example, the downsampling filter type can be determined independently of at least one of the image type or the variable AvailTL.
[0277] Figure 17 shows an example in which a fixed type of filter is applied depending on the type of the current image.
[0278] If the current image is an HDR image, a horizontal filter can be applied to the collocated luma samples.
[0279] On the other hand, if the current image is not an HDR image, a 6-tap downsampling filter can be applied to the collocated luma samples.
[0280] At this time, if the neighboring samples adjacent to the luma block are unavailable, the available reconstruction samples can be padded in the positions of the unavailable neighboring samples. For example, if the left neighboring samples adjacent to the left of the luma block are unavailable, the reconstruction samples included in the leftmost column within the luma block can be padded to the left. Alternatively, if the top neighboring samples adjacent to the top of the luma block are unavailable, the reconstruction samples included in the top row within the luma block can be padded to the top.
[0281] By padding unavailable sample locations, the downsampling filter type can be determined without considering the availability of neighboring samples.
[0282] Information regarding a method for determining a down-sampling filter may be signaled via the bitstream. For example, information specifying one of a first method for determining a down-sampling filter type by considering at least one of a picture type, a variable AvailTL, or whether the current block touches the upper boundary of a coding tree unit, or a second method for determining a down-sampling filter type regardless of at least one of the above conditions may be signaled via the bitstream.
[0283] As another example, at least one of the first method or the second method may be selected based on at least one of the type of the current image, the size and / or shape of the current block, whether the current block is adjacent to the upper boundary of the coding tree unit, the chroma subsampling format, the CCLM mode type, the variable AvailL, the variable AvailT, or the variable AvailTL.
[0284] Alternatively, as described above, the filter type may be determined by considering only whether the current image is an HDR image. For example, if the current image is an HDR image, only the first type of downsampling filter may be fixedly applied to the upper neighboring sample or the left neighboring sample, and if the current image is not an HDR image, only the second type of downsampling filter may be fixedly applied to the upper neighboring sample or the left neighboring sample. Here, the first type and the second type may differ in at least one of the filter shape, the number of taps, or the coefficients.
[0285] At this time, padding may be performed in advance on N rows around the upper boundary of the luma block and / or M rows around the left boundary of the luma block. By performing padding, all neighboring samples around the luma block may be set to be available, and thus, the filter type may be determined regardless of the availability of neighboring samples.
[0286] In the example illustrated in Figure 13, the selection of neighboring samples used to derive CCLM parameters is described through subsampling. At this time, the locations of the subsampled neighboring samples can be set in different combinations than those described in the example. For example, instead of Equation 3, the sampled neighboring samples can be derived according to Equation 6 below.
[0287]
[0288] In the above mathematical expression 6, W and H represent the width and height of the current chroma block, respectively. In mathematical expression 6, the combination of variables a, b, and c can be determined based on one of the following Table 3.
[0289] (a, b)c(3, 5)8(5, 11)16(11, 21)32(21, 43)64
[0290] As mentioned above, sub-sampling neighboring samples using a combination of Equation 6 and Table 3 may be more effective in maintaining an appropriate spacing between sub-sampled neighboring samples than sub-sampling neighboring samples using Equation 3. For example, when performing sub-sampling using Equation 3, the spacing between two sub-sampled samples may change unevenly as the width or height of the current block is larger than the other. On the other hand, when using one of the variables defined in Equation 6 and Table 3, the spacing between two sub-sampled samples can be maintained more evenly compared to when Equation 3 is used.
[0291] Based on at least one of the size, shape, CCLM mode type, type of the current image, and chroma subsampling format of the current block, one of the variable combinations defined in Table 3 may be selected. For example, at least one of the width or the height of the current block may be set to the variable c, and the combination of (a, b) corresponding to the determined variable c may be called. For example, when at least one of the width or the height of the current block is 4, the combination of (a, b) may be set to (3, 5), when at least one of the width or the height of the current block is 8, the combination of (a, b) may be set to (5, 11), when at least one of the width or the height of the current block is 16, the combination of (a, b) may be set to (11, 21), and when at least one of the width or the height of the current block is 32 or greater, the combination of (a, b) may be set to (21, 43).
[0292] If the current block is non-square, the combination of variables for the horizontal direction and the combination of variables for the vertical direction can be set differently. For example, subsampling for the upper neighboring samples of the current block can be performed by setting the width W of the current block to the variable c and then calling the combination of (a, b) corresponding to the set variable c. On the other hand, subsampling for the left neighboring samples of the current block can be performed by setting the width H of the current block to the variable c and then calling the combination of (a, b) corresponding to the set variable c.
[0293] As another example, information for specifying at least one of variables a, b, and c may be signaled via the bitstream. As an example, information for specifying each of variables a, b, and c may be signaled via a sequence parameter set or a picture parameter set.
[0294] Alternatively, index information specifying one of the combinations of variables a, b, and c can be signaled via the bitstream.
[0295] Alternatively, the values of variables a, b and c may be fixed in the encoder and decoder.
[0296] The number of sub-sampled chrominance samples may be increased or decreased, as compared to what was explained through Equations 3 to 5 above. In this case, the number of sub-sampled chrominance samples may be determined based on at least one of the size and shape of the current block, the type of the current image, whether the current block borders the coding tree unit, the CCLM mode type, the chroma sub-sampling format, the variable AvailT, the variable AvailL, or the variable AvailTL.
[0297] For example, in the example illustrated in Fig. 13, when a chroma block has a size of 4x4, it is explained that a total of four neighboring samples are selected through subsampling.
[0298] If the size of the chroma block is larger than 4x4, a larger number of neighboring samples can be selected. For example, if a total of 8 neighboring samples are to be selected, Equations 3 to 5 can be changed to Equations 7 to 9 below.
[0299]
[0300]
[0301]
[0302] Mathematical expressions 7 to 9 represent combinations of neighboring samples sub-sampled under LM mode, LM-A mode, and LM-L mode, respectively.
[0303] The number of sub-sampled neighboring samples can be adjusted based on the size of the current block. For example, if the current block is smaller than a threshold value WxH, four neighboring samples may be selected. Conversely, if the current block is equal to or greater than the threshold value WxH, eight neighboring samples may be selected.
[0304] In the above-described embodiments, it has been exemplified that a down-sampling filter is applied to a collocated luma sample corresponding to a chroma sample to derive the CCLM parameter. Alternatively, the CCLM parameter can be derived without applying a down-sampling filter to the collocated luma sample. Here, not applying a down-sampling filter means that the values of the collocated luma sample are used as is when deriving the CCLM parameter.
[0305] As another example, the application of a downsampling filter can be determined based on the number of neighboring samples. For example, if four neighboring samples are selected, a downsampling filter can be applied to the collocated luma sample. Conversely, if eight neighboring samples are selected, a downsampling filter may not be applied to the collocated luma sample.
[0306] As another example, the type of downsampling filter can be adaptively determined based on the number of neighboring samples. For example, at least one of the shape, number of taps, or coefficients of the downsampling filter may be different when four neighboring samples are selected and when eight neighboring samples are selected.
[0307] A low-pass filter can be applied to a chroma or luma image to remove or mitigate singularity in restored pixels. For example, a low-pass filter can be applied before selecting neighboring samples around a chroma block. Applying a low-pass filter can better reflect block characteristics when deriving CCLM parameters.
[0308] A low-pass filter can be set to be applied only to chroma images. This is because the singularity of the reconstructed pixels in the luma image can be removed or alleviated through a downsampling filter.
[0309] As another example, a low-pass filter can be applied to both chroma and luma images.
[0310] Information indicating whether a low-pass filter is to be applied may be signaled via the bitstream. The information may be signaled for each of the luma component and the chroma component.
[0311] CCLM parameters α and β can be derived using neighboring samples neighboring the chroma block and neighboring samples neighboring the luma block.
[0312] When deriving CCLM parameters, luma component neighboring samples can be classified into two groups. This classification can be based on the values of the neighboring samples. For example, if four neighboring samples are selected, the two with the largest values can be classified into the first group, and the two with the smallest values can be classified into the second group.
[0313] Chroma component neighboring samples can also be classified into two groups. This classification can be based on the classification results of the luma component. That is, if a neighboring luma sample is classified into the Nth group, the corresponding neighboring chroma sample can also be classified into the Nth group.
[0314] Thereafter, for each of the luma component and the chroma component, the sample average value for each group can be derived. For example, for the luma component, the average value Xb can be derived by averaging the neighboring luma samples belonging to the first group, and the average value Xa can be derived by averaging the neighboring luma samples belonging to the second group. In addition, for the chroma component, the average value Yb can be derived by averaging the neighboring chroma samples belonging to the first group, and the average value Ya can be derived by averaging the neighboring chroma samples belonging to the second group.
[0315] Based on the derived average values, CCLM parameters can be derived. For example, the weights α and offset β can be derived based on the following mathematical expressions 10 and 11.
[0316]
[0317]
[0318] Once the CCLM parameters are derived, chroma samples can be predicted using the downsampled luma samples (S804). Specifically, a chroma prediction sample can be derived by adding an offset β to the product of the downsampled luma sample and the weight α.
[0319] Luma component neighboring samples and chroma component neighboring samples may be classified into three or more groups. For example, among N luma neighboring samples, n may be classified into a first group, m may be classified into a second group, and Nnm may be classified into a third group. The classification may be based on the values of the neighboring luma samples.
[0320] Chroma component neighboring samples can also be classified into three or more groups by referring to the classification results of luma component neighboring samples.
[0321] When neighboring samples are classified into three or more groups, the CCLM parameters can be derived using only two of the three or more groups. For example, the CCLM parameters can be derived using the group containing the neighboring sample with the largest value and the group containing the neighboring sample with the smallest value.
[0322] In the above example, chroma neighboring samples were classified based on the classification results of luma neighboring samples. Conversely, after classifying chroma neighboring samples, luma neighboring samples can also be classified based on the classification results of chroma neighboring samples.
[0323] As another example, neighboring luma samples and neighboring chroma samples can be independently classified into multiple groups.
[0324] The names of the syntaxes used in the above-described embodiments are merely named for convenience of explanation.
[0325] Applying the embodiments described above, focusing on the decoding or encoding process, to the encoding or decoding process is within the scope of the present disclosure. Changing the embodiments described above, in a given order, to a different order is also within the scope of the present disclosure.
[0326] Although the above-described embodiments have been described based on a series of steps or a flowchart, this does not limit the chronological order of the invention, and may be performed simultaneously or in a different order as needed. In addition, each of the components (e.g., units, modules, etc.) constituting the block diagram in the above-described embodiments may be implemented as a hardware device or software, or a plurality of components may be combined to be implemented as a single hardware device or software. The above-described embodiments may be implemented in the form of program commands that can be executed through various computer components and recorded on a computer-readable recording medium. The computer-readable recording medium may include program commands, data files, data structures, etc., singly or in combination. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical recording media such as CD-ROMs and DVDs, magneto-optical media such as floptical disks, and hardware devices specifically configured to store and execute program commands such as ROMs, RAMs, and flash memories. The above hardware device may be configured to operate as one or more software modules to perform processing according to the present disclosure, and vice versa.
[0327] The present invention can be applied to an electronic device capable of encoding / decoding an image.
Claims
1. A step for determining whether CCLM (Cross-compoenent Linear Model) mode is applied to the chroma block; When it is determined that the CCLM mode is determined for the chroma block, a step of obtaining a filtered neighboring luma sample for a neighboring chroma sample adjacent to the chroma block; A step of deriving CCLM parameters using the neighboring chroma samples and the filtered neighboring luma samples; and A method for decoding an image, comprising the step of generating a prediction block for the chroma block using the CCLM parameters.
2. In paragraph 1, A method for decoding an image, characterized in that the filtered neighboring luma sample is generated by applying a down-sampling filter to a collocated luma sample corresponding to the neighboring chroma sample and neighboring luma samples adjacent to the collocated luma sample.
3. In paragraph 2, A method for decoding an image, characterized in that if at least one of the collocated luma sample and the neighboring luma samples is unavailable, a restoration sample located at the boundary within a luma block is padded in the unavailable sample location.
4. In paragraph 2, An image decoding method, characterized in that the type of the above downsampling filter is determined based on the type of the current image.
5. In paragraph 2, An image decoding method, characterized in that the type of the down sampling filter is determined based on the position of the neighboring chroma sample.
6. In paragraph 1, A method for decoding an image, wherein the above-described neighboring chroma sample is extracted by sub-sampling a plurality of neighboring chroma samples neighboring the chroma block.
7. In paragraph 6, A method for decoding an image, characterized in that the subsampling rate is determined based on at least one of the size or shape of the chroma block.
8. A step for determining whether CCLM (Cross-compoenent Linear Model) mode is applied to the chroma block; When it is determined that the CCLM mode is determined for the chroma block, a step of obtaining a filtered neighboring luma sample for a neighboring chroma sample adjacent to the chroma block; A step of deriving CCLM parameters using the neighboring chroma samples and the filtered neighboring luma samples; and A video encoding method, comprising the step of generating a prediction block for the chroma block using the CCLM parameters.
9. A computer-readable recording medium storing a bitstream encoded by a video encoding method, The above video encoding method, A step for determining whether CCLM (Cross-compoenent Linear Model) mode is applied to a chroma block; When it is determined that the CCLM mode is determined for the chroma block, a step of obtaining a filtered neighboring luma sample for a neighboring chroma sample adjacent to the chroma block; A step of deriving CCLM parameters using the neighboring chroma samples and the filtered neighboring luma samples; and A computer-readable recording medium comprising a step of generating a prediction block for the chroma block using the CCLM parameters.