Method and apparatus for intra prediction using linear model
The use of cross-component linear modeling in video coding selects downsampling filters based on chroma format, addressing the challenge of supporting diverse chroma formats and enhancing compression efficiency by reducing errors and bit rates.
Patent Information
- Application Number
- JP2024114922
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2019-03-28
- Filing Date
- 2024-07-18
- Publication Date
- 2024-10-23
AI Technical Summary
Current video coding technologies struggle with supporting multiple chroma formats, particularly crashing when encountering input formats like 4:4:4, necessitating improved methods for efficient compression and decompression across various chroma formats.
Implementing a method for intra prediction using cross-component linear modeling (CCLM) that selects appropriate downsampling filters based on chroma format, allowing for accurate chroma prediction signals and reduced prediction errors by determining downsampling filters based on chroma format information.
This approach enhances coding efficiency by reducing residual signal energy, lowering bit rates, and improving overall compression performance through more accurate chroma prediction and error reduction.
Smart Images

Figure 2024150594000001_ABST
Abstract
Description
[Technical field]
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This patent application claims priority to U.S. Provisional Patent Application No. 62 / 809,555, filed February 22, 2019, which claims priority to U.S. Provisional Patent Application No. 62 / 825,021, filed March 28, 2019, and which claims priority to U.S. Provisional Patent Application No. 62 / 825,796, filed March 28, 2019. The disclosures of the aforementioned patent applications are incorporated herein by reference in their entireties.
[0002] Embodiments of the present disclosure relate generally to the field of picture processing, more specifically to intra prediction (such as chroma intra prediction) using cross component linear modeling (CCLM), and more specifically to spatial filtering used in cross component linear models for intra prediction with different chroma formats. [Background technology]
[0003] Video coding (video encoding and / or decoding) is used in a wide range of digital video applications, such as digital TV broadcasting, video transmission over the Internet and mobile networks, real-time conversation applications such as video chat, video conferencing, DVDs and Blu-ray® discs, video content acquisition and editing systems, and camcorders for security applications.
[0004] The amount of video required to depict even a relatively short video can be significant, which can pose difficulties when the data is streamed or otherwise communicated across communication networks with limited bandwidth capacity. Thus, video data is typically compressed before being communicated in modern telecommunication networks. The size of the video can also be an issue when the video is stored on a storage device, since memory resources may be limited. Video compression devices often use software and / or hardware at the source to code the video data before transmission or storage, thereby reducing the amount of data required to represent a digital video image. The compressed data is then received at the destination by a video decompression device, which decodes the video data. Due to limited network resources and an ever-increasing demand for higher video quality, improved compression and decompression techniques that sacrifice little or no picture quality and have higher compression ratios are desirable.
[0005] In particular, current versatile video coding and test model (VTM) coders mainly support chroma format 4:2:0 as the input picture format. If the input chroma format becomes 4:4:4, it may cause the VTM coder to crash. To avoid such problems, a coder that supports other chroma formats (such as 4:4:4 or 4:2:2) is highly desirable and even essential for widespread applications. [Prior art documents] [Non-patent literature]
[0006] [Non-Patent Document 1] J. Kim, SW Park, JY Park, and BMJeon, Intra Chroma Prediction Using Inter Channel Correlation, Document JCTVC-B021, July 2010 [Non-Patent Document 2] G. Laroche, J. Taquet, C. Gisquet, P. Onno (Canon), "CE3: Cross-component linear model simplification (Test 5.1)", Input document to the 12th meeting of JVET, Macau, China, October 2018. [Non-Patent Document 3] P. Hanhart, Y. He, "CE3: Modified CCLM downsampling filter for "type-2" content (Test 2.4)," Input document to the 13th JVET meeting JVET-M0142, Marrakech, Morocco, January 2019. Summary of the Invention [Means for solving the problem]
[0007] In view of the problems mentioned above, a modification to a video coding process for supporting multiple chroma formats is proposed in the present disclosure. Specifically, the embodiments of the present application aim to provide an apparatus, an encoder, a decoder, and a corresponding method for inter-component prediction of a picture, such that a set of downsampling filters applied during prediction depends on a chroma format, which may be one of multiple supported chroma formats, in order to improve coding efficiency.
[0008] Embodiments are defined by the features of the independent claims and by further advantageous implementations of the embodiments by the features of the dependent claims.
[0009] Particular embodiments are outlined in the accompanying independent claims and other embodiments are outlined in the dependent claims.
[0010] The above and other objects are achieved by the subject matter of the independent claims. Further implementation forms are evident from the dependent claims, the description and the drawings.
[0011] According to a first aspect of the present invention, there is provided a method for performing intra prediction using a linear model, the method comprising: determining a set of downsampling filters (a set of downsampling filter coefficients) based on chroma format information, the chroma format information indicating the chroma format of the picture to which the current block belongs; obtaining downsampled luma samples of the reconstructed luma samples in a luma block of the current block and downsampled luma reference samples of the selected luma reference samples of the luma blocks (neighboring the luma block) using respective downsampling filters in (selected from) the set of downsampling filters; determining one or more linear model coefficients based on the downsampled luma reference sample and a (selected or available) chroma reference sample corresponding to the downsampled luma reference sample; and obtaining prediction samples of the chroma blocks corresponding to the luma blocks based on the linear model coefficients and the downsampled luma samples of the reconstructed luma samples in the luma blocks.
[0012] Thus, an improved method is provided that allows for a more accurate chroma prediction signal and prediction error reduction by selecting a filter set based on chroma format information. A technical consequence of a smaller prediction error is a reduction in the residual signal energy. The coding method may exploit this reduction to reduce the distortion of the reconstructed signal, to reduce the bit rate required to code the residual signal, or both to reduce the distortion and to reduce the bit rate. These technical effects achieved by the present invention improve the overall compression performance value of a coding method using the present invention.
[0013] It should be noted that the terms "block", "coding block", or "image block" are used in this disclosure, which may apply to transform units (TUs), prediction units (PUs), coding units (CUs), etc. In VVC, in general, transform units and coding units are largely aligned, except for a few scenarios where gradient or sub-block transforms (SBTs) of TUs are used. It may be understood that the terms "block / image block / coding block / transform block" and "block size / transform block size" may be interchanged in this disclosure. The terms "sample / pixel" may be interchanged in this disclosure.
[0014] In a possible implementation form of the method according to the first aspect itself, determining a set of downsampling filters (a set of downsampling filter coefficients) based on chroma format information comprises: determining horizontal and vertical subsampling ratio information (such as variables SubWidthC and SubHeightC) based on the chroma format information; determining a set of downsampling filters based on the subsampling ratio information (such as variables SubWidthC and SubHeightC).
[0015] In any of the above-mentioned implementation forms of the first aspect or a possible implementation form of the method according to the first aspect itself, for a chroma format that is a 4:2:0 chroma format, a first set of downsampling filters (a set of downsampling filter coefficients) is used for the luma block of the current block; For a chroma format that is a 4:2:2 chroma format, a second set of downsampling filters (a set of downsampling filter coefficients) is used for the luma block of the current block, or for a chroma format that is a 4:4:4 chroma format, a third set of downsampling filters (i.e., filters with coefficient [1], i.e., as a bypass filter) is used for the luma block of the current block.
[0016] In any of the above-mentioned implementations of the first aspect or a possible implementation form of the method according to the first aspect itself, determining the set of downsampling filters based on the subsampling ratio information may include: determining a first set of downsampling filters (a set of downsampling filter coefficients) for a luma block of the current block when variables SubWidthC=2 and SubHeightC=2; determining a second set of downsampling filters (a set of downsampling filter coefficients) for the luma block of the current block when SubWidthC=2 and SubHeightC=1; or When SubWidthC=1 and SubHeightC=1, determining a third set of downsampling filters (a set of downsampling filter coefficients) for the luma block of the current block.
[0017] In any of the above-mentioned implementations of the first aspect or a possible implementation form of the method according to the first aspect itself, when the subsampled chroma samples are co-located with the corresponding luma samples in the current block, Obtaining downsampled luma samples of the reconstructed luma samples in a luma block of the current block and downsampled luma reference samples of the selected luma reference samples of the luma block using respective downsampling filters in the set of downsampling filters, obtaining downsampled luma samples of the reconstructed luma samples in the luma block by applying a first downsampling filter to a first set of reconstructed luma samples, the first set of reconstructed luma samples comprising reconstructed luma samples that are horizontally and / or vertically adjacent to a position of the reconstructed luma sample (the downsampled luma sample); obtaining downsampled luma reference samples of at least one selected reference luma sample by applying a first downsampling filter to a second set of reconstructed luma samples, the second set of reconstructed luma samples comprising reconstructed luma samples that are horizontally and / or vertically adjacent to a position of the selected reference luma sample (downsampled luma sample); A first downsampling filter is selected from the set of downsampling filters.
[0018] In any of the above-mentioned implementations of the first aspect or in a possible implementation form of the method according to the first aspect itself, when a 4:2:2 chroma format is used (SubWidthC=2 and SubHeightC=1), the first downsampling filter is a 1D non-separable filter, or When the 4:2:0 chroma format is used (SubWidthC=2 and SubHeightC=2), the first downsampling filter is a 2D non-separable filter.
[0019] In any of the above-mentioned implementations of the first aspect or in a possible implementation form of the method according to the first aspect itself, when a 4:2:2 chroma format is used (SubWidthC=2 and SubHeightC=1), the first downsampling filter (the 1D non-separable filter F2 described in the standard) is [1,2,1] or
[0020]
number
[0021] where the non-zero coefficients are located horizontally adjacent to the position of the filtered reconstructed luma sample, and the center position with coefficient “2” corresponds to the position of the filtered reconstructed luma sample.
[0022] In any of the above-mentioned implementations of the first aspect or in a possible implementation form of the method according to the first aspect itself, when a 4:2:0 chroma format is used (SubWidthC=2 and SubHeightC=2), the first downsampling filter (2D non-separable filter F3 described in the VVC standard) is
[0023]
number
[0024] where the non-zero coefficients are horizontally and / or vertically adjacent to the position of the filtered reconstructed luma sample, and the central position with coefficient “4” corresponds to the position of the filtered reconstructed luma sample.
[0025] In any of the above-mentioned implementations of the first aspect or a possible implementation form of the method according to the first aspect itself, when a subsampled chroma sample is not co-located with a corresponding luma sample in the current block, Obtaining downsampled luma samples of the reconstructed luma samples in a luma block of the current block and downsampled luma reference samples of the selected luma reference samples of the luma block using respective downsampling filters in the set of downsampling filters, obtaining downsampled luma samples of the reconstructed luma samples in the luma block by applying a second downsampling filter to a third set of reconstructed luma samples, the third set of reconstructed luma samples comprising reconstructed luma samples at horizontal and / or vertical adjacent positions to a position of the reconstructed luma samples (the downsampled luma samples); and obtaining downsampled luma reference samples of the at least one selected reference luma sample by applying a second downsampling filter to a fourth set of reconstructed luma samples, the fourth set of reconstructed luma samples comprising reconstructed luma samples that are horizontally and / or vertically adjacent to a position of the selected reference luma sample (downsampled luma sample); A second downsampling filter is selected from the set of downsampling filters.
[0026] In any of the above-mentioned implementation forms of the first aspect or a possible implementation form of the method according to the first aspect itself, the second downsampling filter is a 1D non-separable filter if a 4:2:2 chroma format is used (SubWidthC=2 and SubHeightC=1), or the second downsampling filter is a 2D non-separable filter if a 4:2:0 chroma format is used (SubWidthC=2 and SubHeightC=2).
[0027] In any of the above-mentioned implementations of the first aspect or in a possible implementation form of the method according to the first aspect itself, when a 4:2:2 chroma format is used (SubWidthC=2 and SubHeightC=1), the second downsampling filter (1D non-separable filter F1, F2 described in the standard) is [2,0] or [1,2,1] or
[0028]
number
[0029] where the non-zero coefficients are located horizontally adjacent to the position of the filtered reconstructed luma sample, and the center position with coefficient “2” corresponds to the position of the filtered reconstructed luma sample.
[0030] In any of the above-mentioned implementations of the first aspect or in a possible implementation form of the method according to the first aspect itself, when a 4:2:0 chroma format is used (SubWidthC=2 and SubHeightC=2), the second downsampling filter (2D non-separable filter F4 described in the VVC standard) is
[0031]
number
[0032] where the non-zero coefficients are located horizontally or vertically adjacent to the position of the filtered reconstructed luma sample, and the center position with coefficient “2” corresponds to the position of the filtered reconstructed luma sample.
[0033] In any of the above-mentioned implementations of the first aspect or a possible implementation form of the method according to the first aspect itself, the subsampled chroma sample being co-located with the corresponding luma sample in the current block may be determined by the fact that the chroma sample type of the subsampled chroma sample is: - Chroma sample type 2, or - Chroma Sample Type 4 This occurs when the player has one of the following:
[0034] In any of the above-mentioned implementations of the first aspect or in a possible implementation form of the method according to the first aspect itself, the subsampled chroma sample not being co-located with the corresponding luma sample in the current block may be determined by the chroma sample type of the subsampled chroma sample being: - Chroma sample type 0, - Chroma Sample Type 1, - Chroma sample type 3, or - Chroma Sample Type 5 This occurs when the player has one of the following:
[0035] In any of the above mentioned implementations of the first aspect or in a possible implementation form of the method according to the first aspect itself, the set of downsampling filters is determined as follows: If the chroma format is a 4:4:4 chroma format, the bypass filter is used, otherwise the set of filters {F2, F3, F5, F6} is determined as follows: F3[0]=1, F3[1]=2, F3[2]=1 F5[i][j]=F6[i][j]=0, where i=0..2, j=0..2 If the chroma format is 4:2:0 chroma format, F5[0][1]=1, F5[1][1]=4, F5[2][1]=1, F5[1][0]=1, F5[1][2]=1 F6[0][1]=1, F6[1][1]=2, F6[2][1]=1 F6[0][2]=1, F6[1][2]=2, F6[2][2]=1 F2[0]=1, F2[1]=1 If the chroma format is 4:2:2 chroma format, F5[0][1]=0, F5[1][1]=8, F5[2][1]=0, F5[1][0]=0, F5[1][2]=0 F6[0][1]=2, F6[1][1]=4, F6[2][1]=2 F6[0][2]=0, F6[1][2]=0, F6[2][2]=0 F2[0]=2, F2[1]=0
[0036] As above, the filter for chroma formats 4:2:0 and 4:2:2 is enabled to minimize computational complexity by minimal access to adjacent samples. It therefore makes it possible to provide the desired spectral characteristics and smoothing effects. In addition, it makes it possible to specify the luma filtering process in case the chroma components are not subsampled.
[0037] In any of the above mentioned implementations of the first aspect or in a possible implementation form of the method according to the first aspect itself, the set of downsampling filters is determined as follows: If at least the first condition, including SubWidthC==1 and SubHeightC==1, is not satisfied, the set of filters {F2, F3, F5, F6} is determined as follows: F3[0]=1, F3[1]=2, F3[2]=1 F5[i][j]=F6[i][j]=0, where i=0..2, j=0..2 If at least the second condition is met, including SubWidthC==2 and SubHeightC==2, F5[0][1]=1, F5[1][1]=4, F5[2][1]=1, F5[1][0]=1, F5[1][2]=1 F6[0][1]=1, F6[1][1]=2, F6[2][1]=1 F6[0][2]=1, F6[1][2]=2, F6[2][2]=1 F2[0]=1, F2[1]=1 Otherwise, F5[0][1]=0, F5[1][1]=8, F5[2][1]=0, F5[1][0]=0, F5[1][2]=0 F6[0][1]=2, F6[1][1]=4, F6[2][1]=2 F6[0][2]=0, F6[1][2]=0, F6[2][2]=0 F2[0]=2, F2[1]=0
[0038] As above, the filters for the chroma formats 4:2:0 and 4:2:2 are made possible to minimize computational complexity by minimal access to adjacent samples, thus making it possible to produce the desired spectral characteristics and smoothing effects.
[0039] In any of the above-mentioned implementations of the first aspect or a possible implementation of the method according to the first aspect itself, the selected luma reference sample is A neighboring luma sample that is above the luma block and is selected based on the L available chroma reference samples, or It comprises at least one of the neighboring luma samples to the left of the luma block and selected based on the L available chroma reference samples.
[0040] In any of the above-mentioned implementations of the first aspect or a possible implementation form of the method according to the first aspect itself, the positions of the available chroma reference samples are When LM mode is applied and both upper and left adjacent samples are available, S[W' / 4, -1], S[3W' / 4, -1], S[-1, H' / 4], S[-1, 3H' / 4], When LM-A mode is applied or only the top adjacent samples are available, S[W' / 8, -1], S[3W' / 8, -1], S[5W' / 8, -1], S[7W' / 8, -1], or When LM-L mode is applied or only the left adjacent samples are available, they are specified as S[-1, H' / 8], S[-1, 3H' / 8], S[-1, 5H' / 8], S[-1, 7H' / 8], The dimensions of a chroma block are W × H, and W' and H' are When the LM mode is applied, W'=W, H'=H, When the LM-A mode is applied, W'=W+H, When the LM-L mode is applied, it is set as H'=H+W.
[0041] In any of the above-mentioned implementations of the first aspect or a possible implementation form of the method according to the first aspect itself, determining one or more linear model coefficients based on a downsampled luma reference sample of the selected luma reference sample and a chroma reference sample corresponding to the downsampled luma reference sample may include: determining a maximum luma value and a minimum luma value based on the downsampled luma reference samples; obtaining a first chroma value based at least in part on one or more positions of the one or more downsampled luma reference samples associated with a maximum luma value; obtaining a second chroma value based at least in part on one or more positions of the one or more downsampled luma reference samples associated with the minimum luma value; and calculating one or more linear model coefficients based on the first chroma value, the second chroma value, the maximum luma value, and the minimum luma value.
[0042] According to a second aspect of the present invention, there is provided a method for determining one or more downsampling filters (luma downsampling filters) to be used in inter-component prediction of a current image block of video data, the method comprising: determining chroma scaling coefficients in horizontal and vertical directions based on chroma format information, the chroma format information indicating a chroma format of a current picture to which the current image block belongs; determining a first set of downsampling filters (a set of downsampling filter coefficients) for the luma block of the current block when values of the chroma scaling coefficients in the horizontal and vertical directions are equal to a first value; determining a second set of downsampling filters (a set of downsampling filter coefficients) for the luma block of the current block when the value of the chroma scaling factor in the horizontal direction is equal to the first value and the value of the chroma scaling factor in the vertical direction is equal to the second value; or The method includes determining a third set of downsampling filters (a set of downsampling filter coefficients) for the luma block of the current block when the values of the chroma scaling coefficients in the horizontal and vertical directions are equal to the second value.
[0043] According to a third aspect of the present invention, there is provided a method for determining one or more luma downsampling filters to be used in inter-component prediction of a current block of video data, the method comprising the steps of: determining the chroma format of the picture to which the current block belongs; determining a first set of downsampling filters (a set of downsampling filter coefficients) to be used for a luma block of the current block when the chroma format is a 4:2:0 chroma format; determining a second set of downsampling filters (a set of downsampling filter coefficients) to be used for the luma block of the current block when the chroma format is a 4:2:2 chroma format; and determining a third set of downsampling filters (a set of downsampling filter coefficients) to be used for the luma block of the current block when the chroma format is a 4:4:4 chroma format.
[0044] According to a fourth aspect of the present invention, there is provided an apparatus for intra prediction using a linear model, the apparatus comprising: a determining unit configured to determine a set of downsampling filters based on chroma format information, the chroma format information indicating a chroma format of a picture to which the current block belongs; a filtering unit configured to obtain, using each downsampling filter in the set of downsampling filters, downsampled luma samples of the reconstructed luma samples in a luma block of the current block and downsampled luma reference samples of the selected luma reference samples of the luma block; a linear model derivation unit configured to determine one or more linear model coefficients based on the downsampled luma reference sample and a chroma reference sample corresponding to the downsampled luma reference sample; and a prediction processing unit configured to obtain prediction samples of the chroma blocks corresponding to the luma blocks based on the linear model coefficients and the downsampled luma samples of the reconstructed luma samples in the luma blocks.
[0045] It should be noted that the terms "block", "coding block", or "image block" are used in this disclosure, which may apply to transform units (TUs), prediction units (PUs), coding units (CUs), etc. In VVC, in general, transform units and coding units are largely aligned, except for a few scenarios where gradient or sub-block transforms (SBTs) of TUs are used. It may be understood that the terms "block / image block / coding block / transform block" and "block size / transform block size" may be interchanged in this disclosure. The terms "sample / pixel" may be interchanged in this disclosure.
[0046] Thus, an improved device is provided that allows for a more accurate chroma prediction signal and prediction error reduction by selection of filter sets based on chroma format information. A technical consequence of a smaller prediction error is a reduction in the residual signal energy. The coding method may exploit this reduction to reduce the distortion of the reconstructed signal, to reduce the bit rate required to code the residual signal, or both to reduce the distortion and to reduce the bit rate. These technical effects achieved by the present invention improve the overall compression performance of the coding method using the present invention.
[0047] In a possible implementation form of the device according to the fourth aspect itself, the decision unit comprises: determining subsampling ratio information in horizontal and vertical directions based on the chroma format information; The method is configured to determine a set of downsampling filters based on the subsampling ratio information.
[0048] In any of the above-mentioned implementations of the fourth aspect or a possible implementation of an apparatus according to the fourth aspect itself, For a chroma format that is a 4:2:0 chroma format, a first set of downsampling filters is used for the luma block of the current block; For a chroma format that is a 4:2:2 chroma format, a second set of downsampling filters is used for the luma block of the current block, or For chroma formats that are 4:4:4 chroma formats, a third set of downsampling filters is used for the luma block of the current block.
[0049] In any of the above-mentioned implementations of the fourth aspect or a possible implementation of the device according to the fourth aspect itself, the decision unit comprises: determining a first set of downsampling filters (a set of downsampling filter coefficients) for a luma block of the current block when variables SubWidthC=2 and SubHeightC=2; determining a second set of downsampling filters (a set of downsampling filter coefficients) for the luma block of the current block when SubWidthC=2 and SubHeightC=1; or When SubWidthC=1 and SubHeightC=1, it is configured for determining a third set of downsampling filters (a set of downsampling filter coefficients) for the luma blocks of the current block.
[0050] In any of the above-mentioned implementations of the fourth aspect or a possible implementation form of the apparatus according to the fourth aspect itself, when the subsampled chroma samples are co-located with the corresponding luma samples in the current block, The filtering unit obtains downsampled luma samples of the reconstructed luma samples in the luma block by applying a first downsampling filter to the first set of reconstructed luma samples, the first set of reconstructed luma samples comprising reconstructed luma samples at horizontally and / or vertically adjacent positions to positions of the reconstructed luma samples; obtaining downsampled luma reference samples of the at least one selected reference luma sample by applying a first downsampling filter to a second set of reconstructed luma samples, the second set of reconstructed luma samples comprising reconstructed luma samples at horizontally and / or vertically adjacent positions to a position of the selected reference luma sample; A first downsampling filter is selected from the set of downsampling filters.
[0051] In any of the above-mentioned implementations of the fourth aspect or in a possible implementation form of the device according to the fourth aspect itself, when a 4:2:2 chroma format is used (SubWidthC=2 and SubHeightC=1), the first downsampling filter is a 1D non-separable filter, or When the 4:2:0 chroma format is used (SubWidthC=2 and SubHeightC=2), the first downsampling filter is a 2D non-separable filter.
[0052] In any of the above-mentioned implementations of the fourth aspect or in a possible implementation form of the device according to the fourth aspect itself, when a 4:2:2 chroma format is used (SubWidthC=2 and SubHeightC=1), the first downsampling filter (1D non-separable filter F2 described in the standard) is [1,2,1] or
[0053]
number
[0054] where the non-zero coefficients horizontally adjacent to the position of the filtered reconstructed luma sample, the central position with the coefficient “2”, corresponds to the position of the filtered reconstructed luma sample.
[0055] In any of the above-mentioned implementations of the fourth aspect or in a possible implementation form of the device according to the fourth aspect itself, when a 4:2:0 chroma format is used (SubWidthC=2 and SubHeightC=2), the first downsampling filter (2D non-separable filter F3 described in the VVC standard) is
[0056]
number
[0057] where the non-zero coefficients are horizontally and / or vertically adjacent to the position of the filtered reconstructed luma sample, and the central position with coefficient “4” corresponds to the position of the filtered reconstructed luma sample.
[0058] In any of the above-mentioned implementations of the fourth aspect or a possible implementation form of the apparatus according to the fourth aspect itself, when the subsampled chroma samples are not co-located with the corresponding luma samples in the current block, the filtering unit obtains downsampled luma samples of the reconstructed luma samples in the luma block by applying a second downsampling filter to a third set of reconstructed luma samples, the third set of reconstructed luma samples comprising reconstructed luma samples at horizontally and / or vertically adjacent positions to positions of the reconstructed luma samples; obtaining downsampled luma reference samples of the at least one selected reference luma sample by applying a second downsampling filter to a fourth set of reconstructed luma samples, the fourth set of reconstructed luma samples comprising reconstructed luma samples at horizontally and / or vertically adjacent positions to a position of the selected reference luma sample; A second downsampling filter is selected from the set of downsampling filters.
[0059] In any of the above-mentioned implementations of the fourth aspect or in a possible implementation form of the device according to the fourth aspect itself, when a 4:2:2 chroma format is used (SubWidthC=2 and SubHeightC=1), the second downsampling filter is a 1D non-separable filter, or When the 4:2:0 chroma format is used (SubWidthC=2 and SubHeightC=2), the second downsampling filter is a 2D non-separable filter.
[0060] In any of the above-mentioned implementations of the fourth aspect or in a possible implementation form of the device according to the fourth aspect itself, when a 4:2:2 chroma format is used (SubWidthC=2 and SubHeightC=1), the second downsampling filter (1D non-separable filter F1, F2 described in the standard) is [2,0] or [1,2,1] or
[0061]
number
[0062] where the non-zero coefficients are located horizontally adjacent to the position of the filtered reconstructed luma sample, and the center position with coefficient “2” corresponds to the position of the filtered reconstructed luma sample.
[0063] In any of the above-mentioned implementations of the fourth aspect or in a possible implementation form of the device according to the fourth aspect itself, when a 4:2:0 chroma format is used (SubWidthC=2 and SubHeightC=2), the second downsampling filter (2D non-separable filter F4 described in the VVC standard) is
[0064]
number
[0065] where the non-zero coefficients are located horizontally or vertically adjacent to the position of the filtered reconstructed luma sample, and the center position with coefficient “2” corresponds to the position of the filtered reconstructed luma sample.
[0066] In any of the above-mentioned implementations of the fourth aspect or a possible implementation form of the device according to the fourth aspect itself, the subsampled chroma sample being co-located with the corresponding luma sample in the current block may be such that the chroma sample type of the subsampled chroma sample is: - Chroma sample type 2, or - Chroma Sample Type 4 This occurs when the player has one of the following:
[0067] In any of the above-mentioned implementations of the fourth aspect or in a possible implementation form of the device according to the fourth aspect itself, the subsampled chroma sample not being co-located with the corresponding luma sample in the current block may be determined by the fact that the chroma sample type of the subsampled chroma sample is: - Chroma sample type 0, - Chroma Sample Type 1, - Chroma sample type 3, or - Chroma Sample Type 5 This occurs when the player has one of the following:
[0068] In any of the above-mentioned implementations of the fourth aspect or a possible implementation form of the apparatus according to the fourth aspect itself, the determining unit is configured to determine the set of downsampling filters; If the chroma format is a 4:4:4 chroma format, the bypass filter is used, otherwise the set of filters {F2, F3, F5, F6} is determined as follows: F3[0]=1, F3[1]=2, F3[2]=1 F5[i][j]=F6[i][j]=0, where i=0..2, j=0..2 If the chroma format is 4:2:0 chroma format, F5[0][1]=1, F5[1][1]=4, F5[2][1]=1, F5[1][0]=1, F5[1][2]=1 F6[0][1]=1, F6[1][1]=2, F6[2][1]=1 F6[0][2]=1, F6[1][2]=2, F6[2][2]=1 F2[0]=1, F2[1]=1 If the chroma format is 4:2:2 chroma format, F5[0][1]=0, F5[1][1]=8, F5[2][1]=0, F5[1][0]=0, F5[1][2]=0 F6[0][1]=2, F6[1][1]=4, F6[2][1]=2 F6[0][2]=0, F6[1][2]=0, F6[2][2]=0 F2[0]=2, F2[1]=0
[0069] In any of the above-mentioned implementation forms of the fourth aspect or a possible implementation form of the apparatus according to the fourth aspect itself, the determination unit is configured to determine the set of filters {F2, F3, F5, F6} as follows: F3[0]=1, F3[1]=2, F3[2]=1 F5[i][j]=F6[i][j]=0, where i=0..2, j=0..2 If at least the second condition is met, including SubWidthC==2 and SubHeightC==2, F5[0][1]=1, F5[1][1]=4, F5[2][1]=1, F5[1][0]=1, F5[1][2]=1 F6[0][1]=1, F6[1][1]=2, F6[2][1]=1 F6[0][2]=1, F6[1][2]=2, F6[2][2]=1 F2[0]=1, F2[1]=1 Otherwise, F5[0][1]=0, F5[1][1]=8, F5[2][1]=0, F5[1][0]=0, F5[1][2]=0 F6[0][1]=2, F6[1][1]=4, F6[2][1]=2 F6[0][2]=0, F6[1][2]=0, F6[2][2]=0 F2[0]=2, F2[1]=0
[0070] In any of the above-mentioned implementations of the fourth aspect or a possible implementation of an apparatus according to the fourth aspect itself, the selected luma reference sample is A neighboring luma sample that is above the luma block and is selected based on the L available chroma reference samples, or It comprises at least one of the neighboring luma samples to the left of the luma block and selected based on the L available chroma reference samples.
[0071] In any of the above-mentioned implementations of the fourth aspect or a possible implementation of the apparatus according to the fourth aspect itself, the positions of the available chroma reference samples are: When LM mode is applied and both top and left adjacent chroma samples are available, S[W' / 4, -1], S[3W' / 4, -1], S[-1, H' / 4], S[-1, 3H' / 4], When LM-A mode is applied or only upper adjacent chroma samples are available, S[W' / 8, -1], S[3W' / 8, -1], S[5W' / 8, -1], S[7W' / 8, -1], When LM-L mode is applied or only left adjacent chroma samples are available, they are specified as being S[-1, H' / 8], S[-1, 3H' / 8], S[-1, 5H' / 8], S[-1, 7H' / 8], The dimensions of a chroma block are W × H, and W' and H' are When the LM mode is applied, W'=W, H'=H, When the LM-A mode is applied, W'=W+H, When the LM-L mode is applied, it is set as H'=H+W.
[0072] In any of the above-mentioned implementations of the fourth aspect or a possible implementation form of the apparatus according to the fourth aspect itself, the linear model derivation unit determines a maximum luma value and a minimum luma value based on the downsampled luma reference sample; Obtaining a first chroma value based at least in part on one or more positions of the one or more downsampled luma reference samples associated with a maximum luma value; obtaining a second chroma value based at least in part on one or more positions of the one or more downsampled luma reference samples associated with the minimum luma value; The one or more linear model coefficients are configured to calculate based on the first chroma value, the second chroma value, the maximum luma value, and the minimum luma value.
[0073] According to a fifth aspect, the present disclosure relates to a method of encoding implemented by an encoding device, the method comprising: performing intra prediction using a linear model (component-to-component linear model (CCLM) or multi-way linear model (MDLM)) according to any of the previous aspects; and generating a bitstream including a plurality of syntax elements, the plurality of syntax elements including a syntax element indicating a selection of a filter for luma samples belonging to the block (such as a selection of a luma filter of the CCLM, in particular an SPS flag such as sps_cclm_colocated_chroma_flag).
[0074] In a possible implementation form of the method according to the fifth aspect itself, when the value of the syntax element is 0 or false, the filter is applied to the luma samples for determining and predicting the linear model, When the value of the syntax element is 1 or true, the filter is not applied to the luma samples for linear model determination and prediction.
[0075] According to a sixth aspect, the present disclosure relates to a method of decoding implemented by a decoding device, the method comprising: - parsing a plurality of syntax elements from the bitstream, the plurality of syntax elements including a syntax element indicating a filter selection for luma samples belonging to the block (such as a luma filter of CCLM, in particular a selection of an SPS flag such as sps_cclm_colocated_chroma_flag); and performing intra prediction using the indicated linear model (such as CCLM) according to any of the aforementioned aspects.
[0076] In a possible implementation form of the method according to the sixth aspect itself, when the value of the syntax element is 0 or false, the filter is applied to the luma samples for determining and predicting the linear model, When the value of the syntax element is 1 or true, the filter is not applied to the luma samples for linear model determination and prediction, e.g., do not use a luma filter when co-located.
[0077] According to a seventh aspect, the present disclosure relates to a decoder, comprising: one or more processors; and a non-transitory computer-readable storage medium coupled to the processor and storing programming for execution by the processor, the programming when executed by the processor configuring the decoder to perform a method according to any of the aforementioned aspects or any possible embodiment of the aforementioned aspects.
[0078] According to an eighth aspect, the present disclosure relates to an encoder, comprising: one or more processors; and a non-transitory computer-readable storage medium coupled to the processor and storing programming for execution by the processor, the programming when executed by the processor configuring the encoder to perform a method according to the aforementioned aspect or any possible embodiment of the aforementioned aspect.
[0079] The method according to the first aspect of the present disclosure may be performed by an apparatus according to the fourth aspect of the present disclosure. Further features and implementation forms of the method according to the first aspect of the present disclosure correspond to the features and implementation forms of the apparatus according to the fourth aspect of the present disclosure.
[0080] The method according to the first aspect of the present disclosure may be performed by an apparatus according to the fourth aspect of the present disclosure. Further features and implementation forms of the method according to the first aspect of the present disclosure correspond to the features and implementation forms of the apparatus according to the fourth aspect of the present disclosure.
[0081] According to another aspect, the present disclosure relates to an apparatus for decoding a video stream, comprising a processor and a memory having stored therein instructions for causing the processor to perform a method according to the first or third aspect.
[0082] According to another aspect, the present disclosure relates to an apparatus for encoding a video stream, comprising a processor and a memory having stored thereon instructions for causing the processor to perform a method according to the second aspect.
[0083] According to another aspect, a computer-readable storage medium is proposed having stored thereon instructions that, when executed, cause one or more processors configured to code video data, the instructions causing the one or more processors to perform a method according to the first or second or third aspect, or according to any possible embodiment of the first or second or third aspect.
[0084] According to another aspect, the present disclosure relates to a computer program comprising a program code for performing, when said program is executed on a computer, the method according to the first or second or third aspect, or according to any possible embodiment of the first or second or third aspect.
[0085] The details of one or more embodiments are set forth in the accompanying drawings and the description below. Other features, objects, and advantages will become apparent from the description, drawings, and claims.
[0086] In the following, the embodiments are explained in more detail with reference to the accompanying drawings and figures. [Brief description of the drawings]
[0087] [Figure 1A] FIG. 1 is a block diagram illustrating an example of a video coding system configured to implement embodiments disclosed herein. [Figure 1B]FIG. 2 is a block diagram illustrating another example of a video coding system configured to implement embodiments disclosed herein. [Diagram 2] 1 is a block diagram illustrating an example of a video encoder configured to implement embodiments disclosed herein. [Diagram 3] 1 is a block diagram illustrating an example structure of a video decoder configured to implement embodiments disclosed herein. [Figure 4] 1 is a block diagram illustrating an example of an encoding device or a decoding device according to an embodiment disclosed herein. [Diagram 5] 1 is a block diagram showing another example of an encoding device or a decoding device according to an exemplary embodiment disclosed herein. [Figure 6A] FIG. 2 is an example diagram showing the nominal vertical and horizontal positions of 4:2:0 luma and chroma samples in a picture. [Figure 6B] FIG. 2 is an example diagram showing nominal vertical and horizontal positions of 4:2:2 luma and chroma samples in a picture. [Figure 6C] FIG. 2 is an example diagram showing the nominal vertical and horizontal positions of 4:4:4 luma and chroma samples in a picture. [Figure 6D] 1A-1C are diagrams illustrating various sampling patterns for an interlaced image. [Figure 6E] FIG. 1 illustrates the concept of a component-to-component linear model for chroma intra prediction. [Figure 7A] 1 is an example diagram showing co-located luma and chroma blocks included in a current image block and associated luma and chroma reference samples of a current picture when the chroma format of the current picture is 4:2:0. [Figure 7B] 1 is an example diagram showing co-located luma and chroma blocks included in a current image block and associated luma and chroma reference samples of a current picture when the chroma format of the current picture is 4:2:2. [Figure 7C] 1 is an example diagram showing co-located luma and chroma blocks included in a current image block and associated luma and chroma reference samples of a current picture when the chroma format of the current picture is 4:4:4. [Figure 7D] 7 is an example diagram showing a downsampled luma reference sample 719 of a selected luma reference sample 715 of a luma block 711 and a chroma reference sample 705 corresponding to the downsampled luma reference sample 719 when the chroma format of the current picture is 4:2:0. [Figure 8] FIG. 2 illustrates example chroma and luma reference samples used for linear model parameter derivation. [Figure 9] FIG. 13 illustrates the spatial locations of luma samples involved in downsampling during inter-component intra prediction when the chroma format of the current picture is 4:2:0. [Figure 10] FIG. 1 is a schematic diagram illustrating an exemplary mechanism for downsampling to support inter-component intra prediction. [Figure 11] 1 is a flow diagram illustrating a process for performing inter-component intra prediction in accordance with some aspects of the present disclosure. [Figure 12] 1 is a schematic diagram of a device configured to perform inter-component intra prediction in accordance with some aspects of the present disclosure. [Figure 13] 1 is a block diagram showing an exemplary structure of a content supply system for implementing a content distribution service. [Figure 14] FIG. 2 is a block diagram illustrating the structure of an example terminal device. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0088] In the following, identical reference signs refer to identical or at least functionally equivalent features, unless otherwise specified.
[0089] In the following description, reference is made to the accompanying drawings, which form a part of this disclosure and show, by way of example, specific aspects of the embodiments disclosed herein or specific aspects in which the embodiments disclosed herein may be used. It is understood that the embodiments disclosed herein may be used in other aspects and may have structural or logical changes that are not shown in the drawings. Therefore, the following detailed description should not be taken in a limiting sense, and the scope of the present disclosure is defined by the appended claims.
[0090] The following abbreviations apply:
[0091] For example, it is understood that disclosure related to a described method may also apply to a corresponding device or system configured to perform the method, and vice versa. For example, when one or more particular method steps are described, the corresponding device may include one or more units, e.g., functional units, for performing the described one or more method steps (e.g., one unit performing one or more steps, or multiple units performing one or more of the multiple steps, respectively), even if such one or more units are not explicitly described or illustrated in the drawings. On the other hand, when, for example, a particular apparatus is described based on one or more units, e.g., functional units, the corresponding method may include one step for performing the function of the one or more units (e.g., one step performing the function of the one or more units, or multiple steps performing one or more of the multiple units, respectively), even if such one or more steps are not explicitly described or illustrated in the drawings. Furthermore, it is understood that the features of various exemplary embodiments and / or aspects described herein may be combined with each other, unless specifically stated otherwise.
[0092] Video coding usually refers to the processing of a sequence of pictures, forming a video or a video sequence. Instead of the term "picture", in the field of video coding, the terms "frame" or "image" may be used as synonyms. Video coding (or coding in general) comprises two parts: video encoding and video decoding. Video encoding is performed on the source side, which usually comprises processing the original video picture (e.g., by compression) to reduce the amount of data required to represent the video picture (for more efficient storage and / or transmission). Video decoding is performed on the destination side, which usually comprises the reverse process compared to the encoder to reconstruct the video picture. The embodiments referring to "coding" of a video picture (or pictures in general) should be understood as relating to "encoding" or "decoding" of a video picture or a respective video sequence. The combination of the encoding and decoding parts is also called a codec (coding and decoding).
[0093] In the case of lossless video coding, the original video picture can be reconstructed, i.e., the reconstructed video picture has the same quality as the original video picture (assuming there is no transmission loss or other data loss during storage or transmission). In the case of lossy video coding, further compression, e.g., by quantization, is performed to reduce the amount of data representing the video picture, and the video picture cannot be completely reconstructed at the decoder, i.e., the quality of the reconstructed video picture is lower or worse than the quality of the original video picture.
[0094] Some video coding standards belong to the group of "lossy hybrid video codecs" (i.e., they combine spatial and temporal prediction in the sample domain and 2D transform coding to apply quantization in the transform domain). Each picture of a video sequence is usually partitioned into a set of non-overlapping blocks, and coding is usually performed at the block level. In other words, in the encoder, a video is usually processed, i.e., encoded, at the block (video block) level, for example, by using spatial (intra-picture) and / or temporal (inter-picture) prediction to generate a prediction block, subtracting the prediction block from a current block (currently being / to be processed) to obtain a residual block, transforming the residual block, and quantizing the residual block in the transform domain to reduce the amount of data to be transmitted (compression), whereas in the decoder, in order to reconstruct the current block for representation, a reverse process is applied to the coded or compressed block compared to the encoder. Furthermore, the encoder replicates the decoder's processing loop so that both the encoder and the decoder generate the same predictions (e.g., intra- and inter-predictions) and / or reconstructions for processing, i.e., coding, subsequent blocks.
[0095] In the following embodiment of the video coding system 10, the video encoder 20 and the video decoder 30 are described based on FIGS. 1 to 3.
[0096] 1A is a schematic block diagram illustrating an example coding system 10, e.g., a video coding system 10 (or short coding system 10) that may utilize techniques of the present application. A video encoder 20 (or short encoder 20) and a video decoder 30 (or short decoder 30) of the video coding system 10 represent examples of devices that may be configured to perform techniques according to various examples described in the present application.
[0097] As shown in FIG. 1A, coding system 10 includes a source device 12 configured to provide encoded picture data 21 to a destination device 14, for example, for decoding the encoded picture data 21.
[0098] The source device 12 comprises an encoder 20, and may additionally, i.e. optionally, comprise a picture source 16, a pre-processor (or pre-processing unit) 18, such as a picture pre-processor 18, and a communication interface or unit 22.
[0099] Picture source 16 may comprise or be any kind of picture capture device, e.g., a camera for capturing real-world pictures, and / or any kind of picture generation device, e.g., a computer graphics processor for generating computer-animated pictures, or any kind of other device for obtaining and / or providing real-world pictures, computer-generated pictures (e.g., screen content, virtual reality (VR) pictures), and / or any combination thereof (e.g., augmented reality (AR) pictures). Picture source may be any kind of memory or storage that stores any of the aforementioned pictures.
[0100] In distinction to the pre-processor 18 and the processing performed by the pre-processing unit 18 , the picture or picture data 17 may also be referred to as a raw picture or raw picture data 17 .
[0101] The pre-processor 18 is configured to receive (raw) picture data 17 and perform pre-processing on the picture data 17 to obtain a pre-processed picture 19 or pre-processed picture data 19. The pre-processing performed by the pre-processor 18 may comprise, for example, cropping, color format conversion (e.g., from RGB to YCbCr), color correction, or noise removal. It may be understood that the pre-processing unit 18 may be an optional component.
[0102] Video encoder 20 is configured to receive pre-processed picture data 19 and to provide encoded picture data 21 (further details are described below, eg, with reference to FIG. 2).
[0103] The communications interface 22 of the source device 12 may be configured to receive the encoded picture data 21 and transmit the encoded picture data 21 (or any further processed version thereof) via the communications channel 13 to another device, such as the destination device 14 or any other device, for storage or direct reconstruction.
[0104] The destination device 14 comprises a decoder 30 (eg, a video decoder 30), and may additionally, i.e. optionally, comprise a communications interface or unit 28, a post-processor 32 (or post-processing unit 32), and a display device 34.
[0105] The communications interface 28 of the destination device 14 is configured to receive the encoded picture data 21 (or any further processed version thereof), for example directly from the source device 12 or from any other source, for example a storage device, for example a coded picture data storage device, and to provide the encoded picture data 21 to a decoder 30.
[0106] The communication interface 22 and the communication interface 28 may be configured to transmit or receive the encoded picture data 21 or the encoded data 21 via a direct communication link between the source device 12 and the destination device 14, such as a direct wired or wireless connection, or via any type of network, such as a wired network or a wireless network or any combination thereof, or via any type of private and public network, or any type of combination thereof.
[0107] The communications interface 22 may be configured, for example, to package the encoded picture data 21 into a suitable format, e.g., packets, and / or process the encoded picture data using any type of transmission encoding or processing, for transmission over a communications link or network.
[0108] Communications interface 28, which is a counterpart to communications interface 22, may be configured, for example, to receive transmitted data and process the transmitted data using any type of corresponding transmission decoding or processing and / or depackaging to obtain encoded picture data 21.
[0109] Both communication interface 22 and communication interface 28 may be configured as unidirectional communication interfaces, as indicated by the arrow for communication channel 13 in FIG. 1A pointing from source device 12 to destination device 14, or as bidirectional communication interfaces, e.g., configured to send and receive messages, e.g., to set up a connection, acknowledge and exchange any other information related to the communication link and / or data transmission, e.g., the transmission of encoded picture data.
[0110] The decoder 30 is configured to receive the encoded picture data 21 and provide decoded picture data 31 or decoded pictures 31 (further details are described below, e.g. based on Figure 3 or Figure 5).
[0111] The post-processor 32 of the destination device 14 is configured to post-process the decoded picture data 31 (also referred to as reconstructed picture data), e.g., the decoded picture 31, to obtain post-processed picture data 33, e.g., a post-processed picture 33. The post-processing performed by the post-processing unit 32 may comprise, e.g., color format conversion (e.g., from YCbCr to RGB), color correction, cropping, or resampling, or any other processing, e.g., to prepare the decoded picture data 31, e.g., for display by a display device 34.
[0112] A display device 34 of the destination device 14 is configured to receive the post-processed picture data 33 for displaying the picture, e.g., to a user or viewer. The display device 34 may be or comprise any type of display for presenting the reconstructed picture, e.g., an integrated or external display or monitor. The display may comprise, for example, a liquid crystal display (LCD), an organic light emitting diode (OLED) display, a plasma display, a projector, a micro LED display, a liquid crystal on silicon (LCoS), a digital light processor (DLP), or any type of other display.
[0113] 1A illustrates source device 12 and destination device 14 as separate devices, an embodiment of the devices may include both or both of these functions, i.e., source device 12 or corresponding functions and destination device 14 or corresponding functions. In such an embodiment, source device 12 or corresponding functions and destination device 14 or corresponding functions may be implemented using the same hardware and / or software, or by separate hardware and / or software, or by any combination thereof.
[0114] As will be clear to a person skilled in the art based on the description, the functionality of different units, or the presence and (exact) division of functionality within source device 12 and / or destination device 14, as shown in FIG. 1A, may vary depending on the actual device and application.
[0115] The encoder 20 (e.g., video encoder 20) or the decoder 30 (e.g., video decoder 30) or both the encoder 20 and the decoder 30 may be implemented via processing circuitry as shown in FIG. 1B, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic circuits, hardware, dedicated to video coding, or any combination thereof. The encoder 20 may be implemented via processing circuitry 46 to embody various modules as discussed in connection with the encoder 20 of FIG. 2 and / or any other encoder system or subsystem described herein. The decoder 30 may be implemented via processing circuitry 46 to embody various modules as discussed in connection with the decoder 30 of FIG. 3 and / or any other decoder system or subsystem described herein. The processing circuitry may be configured to perform various operations as discussed later. 5, where the techniques are implemented partially in software, a device may store instructions for the software in a suitable non-transitory computer-readable storage medium and execute the instructions in hardware using one or more processors to perform the techniques of this disclosure. Either video encoder 20 and video decoder 30 may be integrated as part of a combined encoder / decoder (codec) in a single device, for example, as shown in FIG. 1B.
[0116] Source device 12 and destination device 14 may comprise any of a wide range of devices, including any type of handheld or stationary device, e.g., a notebook or laptop computer, a mobile phone, a smartphone, a tablet or tablet computer, a camera, a desktop computer, a set-top box, a television, a display device, a digital media player, a video game console, a video streaming device (such as a content service server or a content delivery server), a broadcast receiver device, a broadcast transmitter device, and the like, and may use no operating system or any type of operating system. In some cases, source device 12 and destination device 14 may be capable of wireless communication. Thus, source device 12 and destination device 14 may be wireless communication devices.
[0117] In some cases, the video coding system 10 shown in FIG. 1A is merely an example, and the techniques of the present application may be applied to video coding environments (e.g., video encoding or video decoding) that do not necessarily include any data communication between encoding and decoding devices. In other examples, data is retrieved from local memory, streamed over a network, etc. A video encoding device may encode data and store it in memory, and / or a video decoding device may retrieve data from memory and decode it. In some examples, encoding and decoding are performed by devices that do not communicate with each other, but simply encode data into memory and / or retrieve data from memory and decode it.
[0118] For ease of explanation, the embodiments are described herein with reference to, for example, High Efficiency Video Coding (HEVC) or with reference to reference software for Versatile Video Coding (VVC), a next-generation video coding standard being developed by the Joint Collaboration Team on Video Coding (JCT-VC) of the ITU-T Video Coding Experts Group (VCEG) and the ISO / IEC Motion Picture Experts Group (MPEG). Those skilled in the art will appreciate that the embodiments disclosed herein are not limited to HEVC or VVC.
[0119] Encoder and encoding method FIG. 2 shows a schematic block diagram of an exemplary video encoder 20 configured to implement the techniques of the present application. In the example of FIG. 2, the video encoder 20 includes an input 201 (or an input interface 201), a residual calculation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, and an inverse transform processing unit 212, a reconstruction unit 214, a loop filter unit 220, a decoded picture buffer (DPB) 230, a mode selection unit 260, an entropy coding unit 270, and an output 272 (or an output interface 272). The mode selection unit 260 may include an inter prediction unit 244, an intra prediction unit 254, and a partition unit 262. The inter prediction unit 244 may include a motion estimation unit and a motion compensation unit (not shown). The video encoder 20 as shown in FIG. 2 may also be referred to as a hybrid video encoder or a video encoder according to a hybrid video codec.
[0120] The residual calculation unit 204, the transform processing unit 206, the quantization unit 208, and the mode selection unit 260 may be referred to as forming a forward signal path of the encoder 20, while the inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the buffer 216, the loop filter 220, the decoded picture buffer (DPB) 230, the inter prediction unit 244, and the intra prediction unit 254 may be referred to as forming a backward signal path of the video encoder 20, which corresponds to the signal path of the decoder (see the video decoder 30 of FIG. 3). The inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the loop filter 220, the decoded picture buffer (DPB) 230, the inter prediction unit 244, and the intra prediction unit 254 may also be referred to as forming a “built-in decoder” of the video encoder 20.
[0121] Pictures and picture divisions (pictures and blocks) The encoder 20 may be configured to receive, for example, via an input 201, a picture 17 (or picture data 17), for example a picture of a sequence of pictures forming a video or a video sequence. The received picture or picture data may also be a preprocessed picture 19 (or preprocessed picture data 19). For brevity, the following description refers to the picture 17. The picture 17 may also be called a current picture or a picture to be coded (especially in video coding, to distinguish the current picture from other pictures, for example previously encoded and / or decoded pictures of the same video sequence, i.e. the video sequence that also comprises the current picture).
[0122] A (digital) picture is or can be considered as a two-dimensional array or matrix of samples with intensity values. The samples in the array may also be called pixels (short for picture element) or pels. The number of samples in the horizontal and vertical directions (or axes) of the array or picture defines the size and / or resolution of the picture. For color representation, three color components are usually utilized, i.e. a picture can be represented by or contain three sample arrays. In an RGB format or color space, a picture comprises corresponding red, green, and blue sample arrays. However, in video coding, each pixel is usually represented in a luma and chrominance format or color space, for example YCbCr, which comprises a luma component denoted by Y (L may be used instead) and two chrominance components denoted by Cb and Cr. The luma (or short luma) component Y represents the brightness or gray level intensity (e.g. as in a grayscale picture), and the two chrominance (or short chroma) components Cb and Cr represent the chrominance or color information components. Thus, a picture in YCbCr format comprises a luma sample array of luma sample values (Y) and two chrominance sample arrays of chrominance values (Cb and Cr). A picture in RGB format can be converted or transformed into YCbCr format and vice versa, a process also known as color conversion or color transformation. If the picture is monochrome, the picture may comprise only a luma sample array. Thus, a picture may be, for example, an array of luma samples in a monochrome format, or an array of luma samples and two corresponding arrays of chroma samples in 4:2:0, 4:2:2, and 4:4:4 color formats.
[0123] An embodiment of video encoder 20 may comprise a picture partitioning unit (not shown in FIG. 2 ) configured to partition picture 17 into multiple (usually non-overlapping) picture blocks 203. These blocks may also be called root blocks, macroblocks (H.264 / AVC) or coding tree blocks (CTBs) or coding tree units (CTUs) (H.265 / HEVC and VVC). The picture partitioning unit may be configured to partition each picture into corresponding blocks using the same block size for all pictures of a video sequence, using a corresponding grid that defines a current block size, or changing the current block size between pictures, or between subsets or groups of pictures.
[0124] In further embodiments, the video encoder may be configured to directly receive block 203 of picture 17, e.g., one, some, or all of the blocks that form picture 17. Picture block 203 may also be referred to as a current picture block or a picture block to be coded.
[0125] Like the picture 17, the picture block 203 is also or may be considered as a two-dimensional array or matrix of samples with intensity values (sample values), but with a smaller dimension than the picture 17. In other words, the current block 203 may comprise, for example, one sample array (e.g., a luma array for a monochrome picture 17, or a luma array or a chroma array for a color picture) or three sample arrays (e.g., a luma array and two chroma arrays for a color picture 17), or any other number and / or type of arrays depending on the applied color format. The number of samples in the horizontal and vertical directions (or axes) of the current block 203 defines the size of the block 203. Thus, the block may be, for example, an M×N (M columns by N rows) array of samples, or an M×N array of transform coefficients.
[0126] An embodiment of video encoder 20 as shown in FIG. 2 may be configured to encode picture 17 on a block-by-block basis, eg, encoding and prediction are performed on each block 203 .
[0127] An embodiment of video encoder 20 as shown in FIG. 2 may further be configured to partition and / or encode a picture by using slices (also referred to as video slices), where a picture may be partitioned into or encoded using one or more slices (typically non-overlapping), each of which may comprise one or more blocks (e.g., CTUs).
[0128] Embodiments of video encoder 20 as shown in FIG. 2 may further be configured to partition and / or encode a picture by using tile groups (also referred to as video tile groups) and / or tiles (also referred to as video tiles), where a picture may be partitioned into or encoded using one or more tile groups (typically non-overlapping), where each tile group may comprise, for example, one or more blocks (e.g., CTUs) or one or more tiles, where each tile may be, for example, rectangular in shape and comprise one or more blocks (e.g., CTUs), e.g., complete blocks or partial blocks.
[0129] Residual calculation The residual calculation unit 204 may be configured to calculate a residual block 205 (also referred to as residual 205) based on the picture block 203 and the prediction block 265 (further details about the prediction block 265 are provided later), for example, by subtracting sample values of the prediction block 265 from sample values of the picture block 203 on a sample-by-sample (pixel-by-pixel) basis to obtain the residual block 205 in the sample domain.
[0130] conversion The transform processing unit 206 may be configured to apply a transform, such as a discrete cosine transform (DCT) or a discrete sine transform (DST), to the sample values of the residual block 205 to obtain transform coefficients 207 in the transform domain. The transform coefficients 207 may also be referred to as transform residual coefficients and may represent the residual block 205 in the transform domain.
[0131] The transform processing unit 206 may be configured to apply an integer approximation of a DCT / DST, such as the transform specified for H.265 / HEVC. Compared to an orthogonal DCT transform, such an integer approximation is typically scaled by a factor. In order to preserve the norm of the residual block processed by the forward transform and the inverse transform, an additional scaling factor is applied as part of the transform process. The scaling factor is typically chosen based on some constraint, such as the scaling factor being a power of two for shift operations, the bit depth of the transform coefficients, a trade-off between accuracy and implementation cost, etc. A specific scaling factor may be specified, for example, for the inverse transform, e.g., by the inverse transform processing unit 212 (and a corresponding inverse transform, e.g., by the inverse transform processing unit 312 in the video decoder 30), and the corresponding scaling factor for the forward transform, e.g., by the transform processing unit 206 in the encoder 20, may be specified accordingly.
[0132] An embodiment of the video encoder 20 (respectively the transform processing unit 206) may be configured to output transform parameters, e.g., the type of transform, e.g., directly or in an encoded or compressed state via the entropy coding unit 270, such that, for example, the video decoder 30 may receive and use the transform parameters for decoding.
[0133] quantization The quantization unit 208 may be configured to quantize the transform coefficients 207, for example by applying scalar quantization or vector quantization, to obtain quantized coefficients 209. The quantized coefficients 209 may also be referred to as quantized transform coefficients 209 or quantized residual coefficients 209.
[0134] The quantization process may reduce the bit depth associated with some or all of the transform coefficients 207. For example, an n-bit transform coefficient may be rounded to an m-bit transform coefficient during quantization, where n is greater than m. The degree of quantization may be modified by adjusting a quantization parameter (QP). For example, in scalar quantization, different scaling may be applied to achieve finer or coarser quantization. A smaller quantization step size corresponds to a finer quantization, while a larger quantization step size corresponds to a coarser quantization. The applicable quantization step sizes may be indicated by a quantization parameter (QP). The quantization parameter may be, for example, an index to a predefined set of applicable quantization step sizes. For example, a small quantization parameter may correspond to fine quantization (small quantization step size) and a large quantization parameter may correspond to coarse quantization (large quantization step size), or vice versa. Quantization may include division by the quantization step size, and corresponding dequantization and / or inverse quantization, e.g., by the inverse quantization unit 210, may include multiplication by the quantization step size. Some standards, e.g., HEVC, embodiments may be configured to use the quantization parameter to determine the quantization step size. In general, the quantization step size may be calculated based on the quantization parameter using a fixed-point approximation of a formula that includes a division. For quantization and dequantization to recover the norm of the residual block, an additional scaling factor may be introduced, which may be modified due to the scaling used in the fixed-point approximation of the formula for the quantization step size and the quantization parameter. In some example implementations, the scaling of the inverse transform and dequantization may be combined. Alternatively, customized quantization tables may be used and signaled, e.g., in the bitstream, from the encoder to the decoder. Quantization is a lossy operation, and the loss increases with increasing quantization step size.
[0135] An embodiment of video encoder 20 (respectively quantization unit 208) may be configured to output a quantization parameter (QP), e.g., directly or in an encoded state via entropy coding unit 270, such that video decoder 30 may receive and apply the quantization parameter for decoding.
[0136] Dequantization The inverse quantization unit 210 is configured to apply dequantization of the quantization unit 208 to the quantized coefficients, e.g., by applying the inverse of the quantization scheme applied by the quantization unit 208, based on or using the same quantization step size as the quantization unit 208, to obtain dequantized coefficients 211. The dequantized coefficients 211, which are sometimes referred to as dequantized residual coefficients 211, may correspond to the transform coefficients 207, although they are not typically identical to the transform coefficients due to losses due to quantization.
[0137] Inverse transformation The inverse transform processing unit 212 is configured to apply an inverse transform of the transform applied by the transform processing unit 206, for example, an inverse discrete cosine transform (DCT) or an inverse discrete sine transform (DST) or other inverse transform, to obtain a reconstructed residual block 213 (or corresponding dequantized coefficients 213) in the sample domain. The reconstructed residual block 213 may also be referred to as a transform block 213.
[0138] Rebuild The reconstruction unit 214 (e.g., an adder or summer 214) is configured to add the transform block 213 (i.e., the reconstructed residual block 213) to the prediction block 265, e.g., by adding the sample values of the reconstructed residual block 213 and the sample values of the prediction block 265 sample by sample, to obtain a reconstructed block 215 in the sample domain.
[0139] filtering The loop filter unit 220 (or short "loop filter" 220) is configured to filter the reconstructed block 215 to obtain a filtered block 221, or in general, to filter the reconstructed samples to obtain filtered samples. The loop filter unit is configured, for example, to smooth pixel transitions or otherwise improve video quality. The loop filter unit 220 may comprise one or more loop filters, such as a deblocking filter, a sample adaptive offset (SAO) filter, or one or more other filters, for example, a bilateral filter, an adaptive loop filter (ALF), a sharpening filter, a smoothing filter, or a collaborative filter, or any combination thereof. Although the loop filter unit 220 is illustrated in FIG. 2 as being an in-loop filter, in other configurations, the loop filter unit 220 may be implemented as a post-loop filter. The filtered block 221 may also be referred to as a filtered reconstructed block 221.
[0140] An embodiment of video encoder 20 (respectively loop filter unit 220) may be configured to output loop filter parameters (e.g., sample adaptive offset information), e.g., directly or in an encoded state via entropy coding unit 270, so that decoder 30, for example, may receive and apply the same loop filter parameters or the respective loop filters for decoding.
[0141] Decoded Picture Buffer The decoded picture buffer (DPB) 230 may be a memory that stores reference pictures, or generally reference picture data, for encoding of video data by the video encoder 20. The DPB 230 may be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. The decoded picture buffer (DPB) 230 may be configured to store one or more filtered blocks 221. The decoded picture buffer 230 may further be configured to store other previously filtered blocks, e.g., previously reconstructed and filtered blocks 221, of the same current picture or of a different picture, e.g., a previously reconstructed picture, and may provide a complete previously reconstructed, i.e., decoded picture (and corresponding reference blocks and samples) and / or a partially reconstructed current picture (and corresponding reference blocks and samples), e.g., for inter prediction. The decoded picture buffer (DPB) 230 may also be configured to store one or more unfiltered reconstructed blocks 215, or in general, unfiltered reconstructed samples, e.g., in the case where the reconstructed blocks 215 have not been filtered by the loop filter unit 220, or to store any other further processed versions of the reconstructed blocks or samples.
[0142] Mode Selection (Segmentation and Prediction) The mode selection unit 260 comprises a partitioning unit 262, an inter prediction unit 244, and an intra prediction unit 254, and is configured to receive or obtain original picture data, e.g., original block 203 (current block 203 of current picture 17), and reconstructed picture data, e.g., filtered and / or unfiltered reconstructed samples or blocks of the same (current) picture, and / or from one or more previously decoded pictures, e.g., from a decoded picture buffer 230 or other buffer (e.g., a line buffer, not shown). The reconstructed picture data is used as reference picture data for prediction, e.g., inter prediction or intra prediction, to obtain a prediction block 265 or a predictor 265.
[0143] The mode selection unit 260 may be configured to determine or select a partition for the current block prediction mode (including no partition) and a prediction mode (e.g., an intra prediction mode or an inter prediction mode) and generate a corresponding prediction block 265, which is used for calculation of the residual block 205 and for reconstruction of the reconstructed block 215.
[0144] An embodiment of the mode selection unit 260 may be configured to select a partition and prediction mode (e.g., from those supported by or available to the mode selection unit 260) that results in the best match, or in other words, the smallest residual (smallest residual means better compression for transmission or storage), or the smallest signaling overhead (smallest signaling overhead means better compression for transmission or storage), or that considers or balances both. The mode selection unit 260 may be configured to determine the partition and prediction mode based on rate-distortion optimization (RDO), i.e., to select the prediction mode that results in the smallest rate-distortion. Terms such as "best," "minimum," "optimum," etc. in this context do not necessarily refer to "best," "minimum," "optimum," etc. overall, but may also refer to the satisfaction of a termination or selection criterion, such as a value exceeding or falling below a threshold or other constraint, that is a "non-optimal selection" but may lead to reduced complexity and processing time.
[0145] In other words, the partitioning unit 262 may be configured to partition the current block 203 into smaller block partitions or sub-blocks (which again form blocks), for example using quad-tree partitioning (QT), binary-tree partitioning (BT), or ternary-tree partitioning (TT), or any combination thereof, and to perform prediction for each of the current block partitions or sub-blocks, for example, wherein the mode selection comprises selecting a tree structure of the partitioned block 203, and a prediction mode is applied to each of the current block partitions or sub-blocks.
[0146] Below, the partitioning (eg, by partition unit 260) and prediction processes (by inter prediction unit 244 and intra prediction unit 254) performed by the exemplary video encoder 20 are described in more detail.
[0147] classification The partitioning unit 262 may partition (or split) the current block 203 into smaller partitions, e.g., smaller blocks of square or rectangular size. These smaller blocks (which may also be called sub-blocks) may be further partitioned into even smaller partitions. This is also called tree partitioning or hierarchical tree partitioning, e.g., a root block at root tree level 0 (hierarchical level 0, depth 0) may be partitioned recursively, e.g., into two or more blocks at the next lower tree level, e.g., nodes at tree level 1 (hierarchical level 1, depth 1), which may be partitioned again into two or more blocks at the next lower level, e.g., tree level 2 (hierarchical level 2, depth 2), etc., until partitioning is terminated, e.g., because a termination criterion is met, e.g., a maximum tree depth or a minimum block size is reached. Blocks that are not further partitioned are also called leaf blocks or leaf nodes of the tree. A tree that uses partitioning into two partitions is called a binary tree (BT), a tree that uses partitioning into three partitions is called a ternary tree (TT), and a tree that uses partitioning into four partitions is called a quad tree (QT).
[0148] As mentioned before, the term "block" used in this specification may be a portion of a picture, specifically a square or rectangular portion. For example, with reference to HEVC and VVC, the current block may be or correspond to a coding tree unit (CTU), a coding unit (CU), a prediction unit (PU), and a transform unit (TU), and / or may correspond to a corresponding block, such as a coding tree block (CTB), a coding block (CB), a transform block (TB), or a prediction block (PB).
[0149] For example, the coding tree unit (CTU) may be or comprise a CTB of luma samples, two corresponding CTBs of chroma samples for a picture with three sample arrays, or a CTB of samples for a monochrome picture or a picture coded using three separate color planes and syntax structures used to code the samples. Correspondingly, the coding tree block (CTB) may be an N×N block of samples for some value of N such that the division of the components into CTBs is partitioned. The coding unit (CU) may be or comprise a coding block of luma samples, two corresponding coding blocks of chroma samples for a picture with three sample arrays, or a coding block of samples for a monochrome picture or a picture coded using three separate color planes and syntax structures used to code the samples. Correspondingly, the coding block (CB) may be an M×N block of samples for some value of M and N such that the division of the CTB into coding blocks is partitioned.
[0150] For example, in an embodiment according to HEVC, a coding tree unit (CTU) may be partitioned into CUs by using a quadtree structure denoted as a coding tree. The decision of whether to code a picture area using inter-picture (temporal) prediction or intra-picture (spatial) prediction is made at the CU level. Each CU may be further partitioned into one, two, or four PUs according to a PU partition type. Within one PU, the same prediction process is applied, and related information is sent to the decoder for each PU. After obtaining the residual block by applying a prediction process based on the PU partition type, the CU may be partitioned into transform units (TUs) according to another quadtree structure similar to the coding tree for CUs.
[0151] For example, in an embodiment according to the latest video coding standard currently under development, called Versatile Video Coding (VVC), a combined quad-tree and binary tree (QTBT) partition is used, for example, to partition the coding block. In the QTBT block structure, the CU may have either a square or rectangular shape. For example, the coding tree unit (CTU) is first partitioned by a quad-tree structure. The quad-tree leaf node is further partitioned by a binary tree or a ternary tree (or tri-value tree) structure. The partition tree leaf node is called a coding unit (CU), and its segmentation is used for prediction and transformation processes without further partitioning. This means that the CU, PU, and TU have the same block size in the QTBT coding block structure. In parallel with this, multiple partitions, for example, ternary tree partitions, may be used together with the QTBT block structure.
[0152] In one example, mode selection unit 260 of video encoder 20 may be configured to perform any combination of the partitioning techniques described herein.
[0153] As described above, video encoder 20 is configured to determine or select a best or optimal prediction mode from a (e.g., predetermined) set of prediction modes. The set of prediction modes may comprise, for example, intra-prediction modes and / or inter-prediction modes.
[0154] Intra prediction The set of intra prediction modes may comprise 35 different intra prediction modes, e.g., non-directional modes such as DC (or average) mode and planar mode, or directional modes, e.g., as defined in HEVC, or may comprise 67 different intra prediction modes, e.g., non-directional modes such as DC (or average) mode and planar mode, or directional modes, e.g., as defined for VVC.
[0155] The intra prediction unit 254 is configured to generate the intra prediction block 265 according to an intra prediction mode of the set of intra prediction modes using reconstructed samples of neighboring blocks of the same current picture.
[0156] For example, video decoder 30 may receive and use the prediction parameters for decoding, since intra prediction unit 254 (or generally mode selection unit 260) is configured to output intra prediction parameters (or generally information indicating the selected intra prediction mode for the current block) to entropy encoding unit 270 in the form of syntax element 266 for inclusion in encoded picture data 21.
[0157] Inter Prediction The set of inter prediction modes (or possible inter prediction modes) depends on the available reference pictures (i.e., previous, at least partially decoded pictures, e.g., stored in DPB230) and other inter prediction parameters, e.g., whether the entire reference picture is used to search for the best matching reference block or only a portion of it, e.g., only a search window area around the area of the current block, is used, and / or, e.g., whether pixel interpolation is applied, e.g., whether half / semi-pel interpolation is applied and / or whether quarter-pel interpolation is applied.
[0158] In addition to the above prediction modes, skip mode and / or direct mode may be applied.
[0159] The inter prediction unit 244 may include a motion estimation (ME) unit and a motion compensation (MC) unit (both not shown in FIG. 2). The motion estimation unit may be configured to receive or obtain the picture block 203 (current picture block 203 of current picture 17) and the decoded picture 231, or at least one or more previously reconstructed blocks, e.g., reconstructed blocks of one or more other / different previously decoded pictures 231, for motion estimation. For example, a video sequence may comprise the current picture and the previously decoded picture 231, or in other words, the current picture and the previously decoded picture 231 may be part of or form a sequence of pictures that form a video sequence.
[0160] The encoder 20 may be configured to, for example, select a reference block from multiple reference blocks of the same picture or different pictures of multiple other pictures, and provide the reference picture (or reference picture index) and / or an offset (spatial offset) between the position (x, y coordinates) of the reference block and the position of the current block as an inter-prediction parameter to the motion estimation unit. This offset is also called a motion vector (MV).
[0161] The motion compensation unit is configured to obtain, for example receive, inter prediction parameters and perform inter prediction based on or using the inter prediction parameters to obtain inter prediction block 265. The motion compensation performed by the motion compensation unit may involve fetching or generating a predictive block based on a motion / block vector determined by motion estimation, and possibly performing interpolation to sub-pixel accuracy. Interpolation filtering may generate additional pixel samples from known pixel samples, thus potentially increasing the number of predictive block candidates that may be used to code the picture block. Upon receiving a motion vector for the PU of the current picture block, the motion compensation unit may locate the predictive block to which the motion vector points in one of the reference picture lists.
[0162] The motion compensation unit may also generate syntax elements associated with the current block and the video slice for use by video decoder 30 in decoding picture blocks of the video slice. In addition to, or instead of, slices and their respective syntax elements, tile groups and / or tiles and their respective syntax elements may be generated or used.
[0163] Entropy Coding The entropy encoding unit 270 is configured to, for example, apply an entropy encoding algorithm or scheme (e.g., a variable length coding (VLC) scheme, a context-adaptive VLC scheme (CAVLC), an arithmetic coding scheme, binarization, context-adaptive binary arithmetic coding (CABAC), syntax-based context-adaptive binary arithmetic coding (SBAC), probability interval partitioned entropy (PIPE) coding, or another entropy encoding method or technique) or bypass (no compression) to the quantized coefficients 209, inter-prediction parameters, intra-prediction parameters, loop filter parameters, and / or other syntax elements to obtain encoded picture data 21, which may be output via output 272, for example, in the form of an encoded bitstream 21, so that, for example, the video decoder 30 may receive and use the parameters for decoding. The encoded bitstream 21 may be transmitted to the video decoder 30 or may be stored in a memory for later transmission or retrieval by the video decoder 30.
[0164] Other structural variations of the video encoder 20 may be used to encode the video stream. For example, a non-transform-based encoder 20 may quantize the residual signal directly for some blocks or frames without the transform processing unit 206. In another implementation, the encoder 20 may combine the quantization unit 208 and the inverse quantization unit 210 into a single unit.
[0165] Decoder and decoding method 3 shows an example of a video decoder 30 configured to implement the techniques of the present application. The video decoder 30 is configured to receive encoded picture data 21 (e.g., encoded bitstream 21), e.g., encoded by encoder 20, to obtain a decoded picture 331. The encoded picture data or bitstream comprises information for decoding the encoded picture data, e.g., data representing picture blocks and associated syntax elements of an encoded video slice (and / or tile group or tile).
[0166] In the example of Figure 3, the decoder 30 includes an entropy decoding unit 304, an inverse quantization unit 310, an inverse transform processing unit 312, a reconstruction unit 314 (e.g., summer 314), a loop filter 320, a decoded picture buffer (DPB) 330, a mode application unit 360, an inter prediction unit 344, and an intra prediction unit 354. The inter prediction unit 344 may be or include a motion compensation unit. The video decoder 30 may, in some examples, perform a decoding path that is generally inverse to the encoding path described with respect to the video encoder 100 from Figure 2.
[0167] As described with respect to encoder 20, inverse quantization unit 210, inverse transform processing unit 212, reconstruction unit 214, loop filter 220, decoded picture buffer (DPB) 230, inter prediction unit 344, and intra prediction unit 354 are also referred to as forming a “built-in decoder” of video encoder 20. Thus, inverse quantization unit 310 may be functionally identical to inverse quantization unit 110, inverse transform processing unit 312 may be functionally identical to inverse transform processing unit 212, reconstruction unit 314 may be functionally identical to reconstruction unit 214, loop filter 320 may be functionally identical to loop filter 220, and decoded picture buffer 330 may be functionally identical to decoded picture buffer 230. Thus, the descriptions given of the respective units and functions of video encoder 20 apply correspondingly to the respective units and functions of video decoder 30.
[0168] Entropy Decoding The entropy decoding unit 304 is configured to parse the bitstream 21 (or the coded picture data 21 in general) and, e.g., perform entropy decoding on the coded picture data 21 to obtain, e.g., quantized coefficients 309 and / or decoded coding parameters (not shown in FIG. 3), e.g., any or all of inter prediction parameters (e.g., reference picture indexes and motion vectors), intra prediction parameters (e.g., intra prediction modes or indices), transform parameters, quantization parameters, loop filter parameters, and / or other syntax elements. The entropy decoding unit 304 may be configured to apply a decoding algorithm or scheme corresponding to an encoding scheme as described with respect to the entropy encoding unit 270 of the encoder 20. The entropy decoding unit 304 may further be configured to provide the inter prediction parameters, intra prediction parameters, and / or other syntax elements to the mode application unit 360 and provide other parameters to other units of the decoder 30. The video decoder 30 may receive syntax elements at a video slice level and / or a video block level. In addition to or instead of slices and their respective syntax elements, tile groups and / or tiles and their respective syntax elements may be received and / or used.
[0169] Dequantization Inverse quantization unit 310 may be configured to receive a quantization parameter (QP) (or generally, information regarding dequantization) and quantized coefficients from encoded picture data 21 (e.g., by parsing and / or decoding, e.g., by entropy decoding unit 304) and apply dequantization to the decoded quantized coefficients 309 based on the quantization parameter to obtain dequantized coefficients 311, which may also be referred to as transform coefficients 311. The inverse quantization process may include using the quantization parameter determined by video encoder 20 for each video block in a video slice (or tile or tile group) to determine the degree of quantization, and similarly, the degree of dequantization to be applied.
[0170] Inverse transformation The inverse transform processing unit 312 may be configured to receive the dequantized coefficients 311, also referred to as transform coefficients 311, and apply a transform to the dequantized coefficients 311 to obtain a reconstructed residual block 213 in the sample domain. The reconstructed residual block 213 may also be referred to as a transform block 313. The transform may be an inverse transform, e.g., an inverse DCT, an inverse DST, an inverse integer transform, or a conceptually similar inverse transform process. The inverse transform processing unit 312 may further be configured to receive transform parameters or corresponding information from the coded picture data 21 (e.g., by analysis and / or decoding, e.g., by the entropy decoding unit 304) to determine a transform to be applied to the dequantized coefficients 311.
[0171] Rebuild The reconstruction unit 314 (e.g., an adder or summer 314) may be configured to add the reconstructed residual block 313 to the prediction block 365, for example, by adding sample values of the reconstructed residual block 313 and sample values of the prediction block 365 to obtain a reconstructed block 315 in the sample domain.
[0172] filtering A loop filter unit 320 (either in the coding loop or after the coding loop) is configured to filter the reconstructed block 315 to obtain a filtered block 321, e.g., to smooth pixel transitions or otherwise improve video quality. The loop filter unit 320 may comprise one or more loop filters, such as a deblocking filter, a sample adaptive offset (SAO) filter, or one or more other filters, e.g., a bilateral filter, an adaptive loop filter (ALF), a sharpening filter, a smoothing filter, or a collaborative filter, or any combination thereof. Although the loop filter unit 320 is illustrated in FIG. 3 as being an in-loop filter, in other configurations, the loop filter unit 320 may be implemented as a post-loop filter.
[0173] Decoded Picture Buffer The decoded video blocks 321 of the picture are then stored in a decoded picture buffer 330, which stores the decoded picture 331 as a reference picture for subsequent motion compensation relative to other pictures and / or for output respective display.
[0174] The decoder 30 is arranged to output the decoded pictures 311, for presentation or viewing to a user, for example via an output 312.
[0175] prediction The inter prediction unit 344 may be identical to the inter prediction unit 244 (specifically a motion compensation unit), and the intra prediction unit 354 may be functionally identical to the intra prediction unit 254, and performs partitioning or partitioning decision and prediction based on partitioning and / or prediction parameters or respective information received from the encoded picture data 21 (e.g., by analysis and / or decoding, e.g., by the entropy decoding unit 304). The mode application unit 360 may be configured to perform prediction (intra or inter prediction) for each block based on the reconstructed picture, block, or respective samples (filtered or unfiltered) to obtain a prediction block 365.
[0176] When a video slice is coded as an intra-coded (I) slice, the intra prediction unit 354 of the mode application unit 360 is configured to generate a predictive block 365 for a picture block of the current video slice based on a signaled intra prediction mode and data from a previously decoded block of the current picture. When a video picture is coded as an inter-coded (i.e., B or P) slice, the inter prediction unit 344 (e.g., a motion compensation unit) of the mode application unit 360 is configured to generate a predictive block 365 for a video block of the current video slice based on a motion vector and other syntax elements received from the entropy decoding unit 304. For inter prediction, the predictive block may be generated from one of the reference pictures in one of the reference picture lists. The video decoder 30 may construct the reference frame lists, List 0 and List 1, using a default construction technique based on the reference pictures stored in the DPB 330. The same or similar may apply to or by embodiments that use tile groups (e.g., video tile groups) and / or tiles (e.g., video tiles) in addition to or instead of slices (e.g., video slices), e.g., video may be coded using I, P, or B tile groups and / or tiles.
[0177] Mode application unit 360 is configured to determine prediction information for video blocks of the current video slice by parsing motion vectors or related information and other syntax elements, and uses the prediction information to generate a predictive block for the current video block being decoded. For example, mode application unit 360 uses some of the received syntax elements to determine a prediction mode (e.g., intra prediction or inter prediction) used to code the video blocks of the video slice, an inter prediction slice type (e.g., B slice, P slice, or GPB slice), construction information for one or more of the reference picture lists for the slice, motion vectors for each inter coded video block of the slice, inter prediction status for each inter coded video block of the slice, and other information for decoding video blocks in the current video slice. The same or similar may apply to or with embodiments that use tile groups (e.g., video tile groups) and / or tiles (e.g., video tiles) in addition to or instead of slices (e.g., video slices), e.g., video may be coded using I, P, or B tile groups and / or tiles.
[0178] An embodiment of video decoder 30 as shown in FIG. 3 may be configured to partition and / or decode a picture by using slices (also referred to as video slices), where a picture may be partitioned into or decoded using one or more slices (typically non-overlapping), and each slice may comprise one or more blocks (e.g., CTUs).
[0179] An embodiment of video decoder 30 as shown in FIG. 3 may be configured to partition and / or decode a picture by using tile groups (also referred to as video tile groups) and / or tiles (also referred to as video tiles), where a picture may be partitioned into or decoded using one or more tile groups (typically non-overlapping), where each tile group may comprise, for example, one or more blocks (e.g., CTUs) or one or more tiles, where each tile may be, for example, rectangular in shape and comprise one or more blocks (e.g., CTUs), e.g., complete blocks or partial blocks.
[0180] Other variations of the video decoder 30 may be used to decode the encoded picture data 21. For example, the decoder 30 may generate an output video stream without the loop filtering unit 320. For example, the non-transform-based decoder 30 may inverse quantize the residual signal directly for some blocks or frames without the inverse transform processing unit 312. In another implementation, the video decoder 30 may combine the inverse quantization unit 310 and the inverse transform processing unit 312 into a single unit.
[0181] It should be understood that in the encoder 20 and the decoder 30, the processing result of the current step is further processed and output to the next step. For example, after the interpolation filtering, the motion vector derivation, or the loop filtering, further operations such as clipping or shifting may be performed on the processing result of the interpolation filtering, the motion vector derivation, or the loop filtering.
[0182] It should be noted that further operations may be applied to the derived motion vector of the current block (including but not limited to control point motion vectors in affine mode, sub-block motion vectors in affine, planar, ATMVP modes, temporal motion vectors, etc.). For example, the value of the motion vector is constrained to a predetermined range according to its representation bit. If the representation bit of the motion vector is bitDepth, the range is -2^(bitDepth-1) to 2^(bitDepth-1)-1, where "^" means exponent. For example, if bitDepth is set equal to 16, the range is -32768 to 32767. If bitDepth is set equal to 18, the range is -131072 to 131071. For example, the value of the derived motion vector (e.g., MVs of four 4x4 sub-blocks in one 8x8 block) is constrained such that the maximum difference between the integer parts of the four 4x4 sub-block MVs is not greater than N pixels, such as not greater than 1 pixel. Here we give two methods to construct motion vectors according to bitDepth.
[0183] Method 1: Remove the overflow MSB (Most Significant Bit) by performing the following operation: ux=(mvx+2 bitDepth )%2 bitDepth (1) mvx=(ux>=2 bitDepth-1 )?(ux-2 bitDepth ):ux (2) uy=(mvy+2 bitDepth )%2 bitDepth (3) mvy=(uy>=2 bitDepth-1 )?(uy-2 bitDepth ):uy (4) where mvx is the horizontal component of the motion vector of the image block or sub-block, mvy is the vertical component of the motion vector of the image block or sub-block, and ux and uy denote intermediate values.
[0184] For example, if the value of mvx is -32769, then after applying equations (1) and (2), the resulting value is 32767. In computer systems, decimal numbers are stored as two's complement numbers. The two's complement of -32769 is 1, 0111, 1111, 1111, 1111 (17 bits), and since the MSB is discarded, the resulting two's complement numbers are 0111, 1111, 1111, 1111 (decimal number 32767), which is the same as the output by applying equations (1) and (2). ux=(mvpx+mvdx+2 bitDepth )%2 bitDepth (5) mvx=(ux>=2 bitDepth-1 )?(ux-2 bitDepth ) : ux (6) uy=(mvpy+mvdy+2 bitDepth )%2 bitDepth (7) mvy=(uy>=2 bitDepth-1 )?(uy-2 bitDepth ) : uy (8)
[0185] As shown in equations (5) through (8), operations may be applied between the sums of mvp and mvd.
[0186] Method 2: Eliminate the overflow MSB by clipping the value. vx=Clip3(-2 bitDepth-1 ,2 bitDepth-1 -1,vx) vy=Clip3(-2 bitDepth-1 ,2 bitDepth-1 -1,vy) where vx is the horizontal component of the motion vector of the image block or sub-block, vy is the vertical component of the motion vector of the image block or sub-block, x, y, and z correspond to the three input values of the MV clipping process respectively, and the definition of the function Clip3 is as follows:
[0187]
number
[0188] 4 is a schematic diagram of a video coding device 400 according to an embodiment of the present disclosure. The video coding device 400 is suitable for implementing the disclosed embodiments as described herein. In an embodiment, the video coding device 400 may be a decoder, such as the video decoder 30 of FIG. 1A, or an encoder, such as the video encoder 20 of FIG. 1A.
[0189] Video coding device 400 comprises an ingress port 410 (or input port 410) and a receiver unit (Rx) 420 for receiving data, a processor, logic unit, or central processing unit (CPU) 430 for processing data, a transmitter unit (Tx) 440 and an egress port 450 (or output port 450) for transmitting data, and a memory 460 for storing data. Video coding device 400 may also comprise optical-to-electrical (OE) and electrical-to-optical (EO) components coupled to the ingress port 410, the receiver unit 420, the transmitter unit 440, and the egress port 450 for the entry and exit of optical or electrical signals.
[0190] The processor 430 is implemented by hardware and software. The processor 430 may be implemented as one or more CPU chips, cores (e.g., as a multi-core processor), FPGA, ASIC, and DSP. The processor 430 is in communication with the ingress port 410, the receiver unit 420, the transmitter unit 440, the egress port 450, and the memory 460. The processor 430 comprises a coding module 470. The coding module 470 implements the disclosed embodiments described above. For example, the coding module 470 performs, processes, prepares, or provides various coding operations. Thus, the inclusion of the coding module 470 significantly improves the functionality of the video coding device 400 and results in the transformation of the video coding device 400 into different states. Alternatively, the coding module 470 is implemented as instructions stored in the memory 460 and executed by the processor 430.
[0191] The memory 460 may comprise one or more disks, tape drives, and solid state drives, and may be used as an overflow data storage device for storing programs when such programs are selected for execution, and for storing instructions and data read during program execution. The memory 460 may be, for example, volatile and / or non-volatile, and may be read only memory (ROM), random access memory (RAM), ternary content addressable memory (TCAM), and / or static random access memory (SRAM).
[0192] FIG. 5 is a simplified block diagram of an apparatus 500 that may be used as either or both of the source device 12 and the destination device 14 from FIG. 1A, according to an example embodiment.
[0193] The processor 502 of the apparatus 500 may be a central processing unit. Alternatively, the processor 502 may be any other type of device, or devices, now existing or later developed, capable of manipulating or processing information. Although the disclosed implementations may be practiced with a single processor as shown, such as the processor 502, advantages of speed and efficiency may be achieved using more than one processor.
[0194] The memory 504 of the apparatus 500 may be a read-only memory (ROM) device or a random access memory (RAM) device in some implementations. Any other suitable type of storage device may be used as the memory 504. The memory 504 may include code and data 506 that is accessed by the processor 502 using a bus 512. The memory 504 may further include an operating system 508 and application programs 510, which include at least one program that enables the processor 502 to perform the methods described herein. For example, the application programs 510 may include applications 1 through N, which further include a video coding application that performs the methods described herein.
[0195] The apparatus 500 may also include one or more output devices, such as a display 518. The display 518, in one example, may be a touch-sensitive display that combines a display with touch-sensitive elements operable to sense touch input. The display 518 may be coupled to the processor 502 via the bus 512.
[0196] Although illustrated here as a single bus, the bus 512 of device 500 may be comprised of multiple buses. Additionally, secondary storage 514 may be directly coupled to other components of device 500 or may be accessed over a network, and may comprise a single integrated unit such as a memory card or multiple units such as multiple memory cards. Thus, device 500 may be implemented in a wide variety of configurations.
[0197] The embodiments presented herein are described in more detail below: A video source represented by a bitstream may contain a sequence of pictures in decoding order.
[0198] Each picture (which may be a source picture or a decoded picture) contains one or more of the following sample arrays: - Luma(Y) only (monochrome). - Luma and two chromas (YCbCr or YCgCo). - Green, Blue, and Red (GBR, also known as RGB). - An array representing monochrome or tristimulus color sampling (e.g., YZX, also known as XYZ), unless otherwise specified.
[0199] For convenience of notation and terminology in this disclosure, the variables and terms associated with these arrays will be referred to as luma (or L or Y) and chroma, and the two chroma arrays will be referred to as Cb and Cr.
[0200] FIG. 6A shows the location of the chroma components for a 4:2:0 sampling scheme, where each of the two chroma arrays has half the height and half the width of the luma array. FIG. 6B shows the location of the chroma components for a 4:2:2 sampling scheme, where each of the two chroma arrays has the same height and half the width of the luma array. FIG. 6C shows the location of the chroma components for a 4:4:4 sampling scheme, where each of the two chroma arrays has the same height and width as the luma array when separate_colour_plane_flag is equal to 0. FIG. 6D shows various sampling patterns for an interlaced image. In FIG. 6D, chroma sample type 0, chroma sample type 1, chroma sample type 2, chroma sample type 3, chroma sample type 4, and chroma sample type 5 are represented.
[0201] Intra prediction of chroma samples may be performed using samples of the luma block to be reconstructed.
[0202] During HEVC development, component-to-component linear model (CCLM) chroma intra prediction was proposed [J. Kim, SW Park, JY Park, and BM Jeon, Intra Chroma Prediction Using Inter Channel Correlation, document JCTVC-B021, July 2010]. CCLM uses linear correlation between chroma and luma samples at positions in a coding block that correspond to the positions of the chroma samples. When a chroma block is coded using CCLM, a linear model is derived from reconstructed adjacent luma and chroma samples through linear regression. The chroma samples in the current block may then be predicted using the reconstructed luma samples in the current block with the derived linear model (as shown in FIG. 6E). C(x,y)=α×L(x,y)+β where C and L denote the chroma and luma sample values, respectively. The parameters α and β are derived by the least squares method as follows:
[0203]
number
[0204] Here, M(A) represents the average of A, and R(A,B) is defined as follows: R(A, B) = M((AM(A)) × (BM(B))
[0205] If the encoded or decoded picture has a format that specifies different numbers of samples for the luma and chroma components (e.g., the 4:2:0 YCbCr format as shown in FIG. 6), the luma samples are downsampled before modeling and prediction.
[0206] The method is adapted for use in VTM 2.0. Specifically, parameter derivation is performed as follows:
[0207]
number
[0208] Here, L(n) represents the downsampled top and left neighboring reconstructed luma samples, and C(n) represents the top and left neighboring reconstructed chroma samples.
[0209] In [G. Laroche, J. Taquet, C. Gisquet, P. Onno (Canon), "CE3: Cross-component linear model simplification (Test 5.1)", Input document to the 12th meeting of JVET, Macau, China, October 2018], a different method was proposed to derive α and β (as shown in Figure 8). Specifically, the linear model parameters α and β are obtained according to the following equations:
[0210]
number
[0211] β = L(A) - αC(A) where B=argmax(L(n)) and A=argmin(L(n)) are the positions of the maximum and minimum in the luma samples.
[0212] 7A shows the locations of the top and left causal samples, as well as the samples of the current block involved in CCLM mode, when the YCbCr 4:2:0 chroma format is used. It should be understood that the "top and left samples" may also be referred to as "left and above samples", "left and top samples", or "above and left samples". These samples refer to samples in neighboring blocks to the left and top (or above) of the current block.
[0213] To perform inter-component prediction, in 4:2:0 chroma format, the reconstructed luma block needs to be downsampled to match the size of the chroma signal or chroma sample or chroma block. The default downsampling filter used in CCLM mode is: Rec' L [x,y]=(2×Rec L [2x,2y]+2×Rec L[2x,2y+1]+Rec L [2x-1,2y]+Rec L [2x+1,2y]+Rec L [2x-1,2y+1]+Rec L [2x+1,2y+1]+4)>>3 (0)
[0214] Note that this downsampling defines a "type 0" phase relationship for the chroma sample positions relative to the luma sample positions, i.e., assumes co-located sampling in the horizontal direction and interstitial sampling in the vertical direction. The above 6-tap downsampling filter shown in equation (0) is used as the default filter for both single model CCLM mode and multiple model CCLM mode. The spatial locations of the samples used by this 6-tap downsampling filter are shown in FIG. 9. In this figure, there are sample 901, sample 902, and sample 903, which are marked using different line patterns. During filtering, samples 901, 902, and 903 have weights of 2, 1, and 0, respectively.
[0215] If a luma sample lies on a block boundary and the adjacent blocks above and to the left are unavailable, the following formula is used: If the row with y=0 is the first row of the CTU, x=0, and the left and top neighboring blocks are unavailable, then Rec' L [x,y] = Rec L [2x,2y], or If the row with y=0 is the first row of the CTU and the neighboring block above is unavailable, then Rec' L [x, y]=(2×Rec L [2x,2y]+ Rec L [2x-1,2y]+Rec L [2x+1,2y]+2)>>2, or If x=0 and the left and top neighboring blocks are unavailable, then Rec' L [x,y]=(Rec L[2x,2y]+Rec L [2x,2y+1]+1)>>1.
[0216] When considering the sampling of luma and chroma components in the 4:2:0 sampling scheme, there may be a shift between the grid of luma components and the grid of chroma components. In a block of 2x2 pixels, the chroma components are in fact shifted vertically by half a pixel compared to the luma components (as shown in Fig. 6A). Such a shift may have an effect on the interpolation filters when downsampling or upsampling is performed. The same as described above may apply for other sampling schemes such as those shown in Fig. 6B or Fig. 6C. In Fig. 6D, various sampling patterns are represented for an interlaced image. This means that the parity, i.e. whether a pixel is in the upper or lower field of an interlaced image, is also taken into account.
[0217] As proposed in [P. Hanhart, Y. He, "CE3: Modified CCLM downsampling filter for "type-2" content (Test 2.4)", Input document to the 13th JVET meeting JVET-M0142, Marrakech, Morocco, January 2019] and included in the VVC specification draft (version 4), in order to avoid misalignment between chroma samples and downsampled luma samples, in CCLM, for "type-2" content, the following downsampling filter is applied to the luma samples for linear model determination and prediction: 3 Tap: Rec L '(i,j) = [Rec L (2i-1,2j)+2rec L (2i,2j)+Rec L (2i+1,2j)+2]>>2 5 Tap: Rec L '(i,j) = [Rec L (2i,2j-1)+Rec L(2i-1,2j)+4Rec L (2i,2j)+Rec L (2i+1,2j)+Rec L (2i,2j+1)+4]>>3
[0218] To avoid increasing the number of line buffers, these modifications are not applied at the upper CTU boundaries. The choice of downsampling filter is governed by the SPS flag sps_cclm_colocated_chroma_flag. When the value of sps_cclm_colocated_chroma_flag is 0 or false, the downsampling filter is applied to the luma samples for linear model determination and prediction. When the value of sps_cclm_colocated_chroma_flag is 1 or true, the downsampling filter is not applied to the luma samples for linear model determination and prediction.
[0219] The reconstructed boundary luma samples L used to derive the linear model parameters as described above. () is the filtered luma sample Rec' L Subsampled from [x,y].
[0220] The process of luma sample filtering and subsampling in previous designs is described in 8.3.4.2.8 of the VVC specification.
[0221] 8.3.4.2.8 INTRA_LT_CCLM, INTRA_L_CCLM, and INTRA_T_CCLM Intra Prediction Modes Specification
[0222] The inputs to this process are: - intra prediction mode predModeIntra, - the sample position (xTbC, yTbC) of the top-left sample of the current transform block relative to the top-left sample of the current picture, - variable nTbW, which specifies the transformation block width; - variable nTbH, which specifies the transformation block height, - chroma neighboring samples p[x][y], where x=-1, y=0..2*nTbH-1 and x=0..2*nTbW-1, y=-1.
[0223] The output of this process is the predicted samples predSamples[x][y], x=0..nTbW-1, y=0..nTbH-1.
[0224] The current luma position (xTbY, yTbY) is derived as follows: ( xTbY,yTbY)=(xTbC<<1,yTbC<<1) (8-155)
[0225] The variables availL, availT, and availTL are derived as follows: - The availability of the left adjacent sample derivation process for the block is called with the current chroma position (xCurr, yCurr) set equal to (xTbC, yTbC) and the adjacent chroma position (xTbC-1, yTbC) as input, and the output is assigned to availL. - The availability of upper adjacent sample derivation process for the block is called with the current chroma position (xCurr, yCurr) set equal to (xTbC, yTbC), and the adjacent chroma position (xTbC, yTbC-1) as input, and the output is assigned to availT. - The availability of the top-left neighboring sample derivation process for the block is called with the current chroma position (xCurr, yCurr) set equal to (xTbC, yTbC) and the neighboring chroma position (xTbC-1, yTbC-1) as input, and the output is assigned to availTL. - The number of available top-right adjacent chroma samples, numTopRight, is derived as follows: The variable numTopRight is set equal to 0, and availTR is set equal to TRUE. - When predModeIntra is equal to INTRA_T_CCLM, the following is true for x=nTbW..2*nTbW-1, until availTR is equal to FALSE or x is equal to 2*nTbW-1: - The availability derivation process for the block is called with the current chroma position (xCurr, yCurr) set equal to (xTbC, yTbC) and the neighbor chroma position (xTbC+x, yTbC-1) as input, and the output is assigned to availableTR. - When availableTR is equal to TRUE, numTopRight is incremented by 1. - The number of available bottom-left adjacent chroma samples, numLeftBelow, is derived as follows: The variable numLeftBelow is set equal to 0, and availLB is set equal to TRUE. - when predModeIntra is equal to INTRA_L_CCLM, the following is true for y=nTbH..2*nTbH-1, until availLB is equal to FALSE or y is equal to 2*nTbH-1: - The availability derivation process for the block is called with the current chroma position (xCurr, yCurr) set equal to (xTbC, yTbC) and the neighbor chroma position (xTbC-1, yTbC+y) as input, and the output is assigned to availableLB. - When availableLB is equal to TRUE, numLeftBelow is incremented by 1.
[0226] The number of available neighboring chroma samples above and to the right, numTopSamp, and the number of available neighboring chroma samples to the left and to the left, nLeftSamp, are derived as follows: - If predModeIntra is equal to INTRA_LT_CCLM, the following is true: numSampT=availT?nTbW:0 (8-156) numSampL=availL?nTbH:0 (8-157) - Otherwise, the following applies: numSampT=(availT&&predModeIntra==INTRA_T_CCLM)?(nTbW+ numTopRight):0 (8-158) numSampL=(availL&&predModeIntra==INTRA_L_CCLM)?(nTbH+numLeftBelow):0 (8-159)
[0227] The variable bCTUboundary is derived as follows: bCTUboundary=(yTbC&(1<<(CtbLog2SizeY-1) -1)==0)?TRUE:FALSE (8-160)
[0228] The predicted samples predSamples[x][y], where x=0..nTbW-1 and y=0..nTbH-1, are derived as follows: - If both numSampL and numSampT are equal to 0, the following is true: predSamples[x][y]=1<<(BitDepth C -1) (8-161) - Otherwise, the following ordered steps apply: 1. The co-located luma sample pY[x][y], where x=0..nTbW*2-1, y=0..nTbH*2-1, is set equal to the reconstructed luma sample before deblocking filtering at position (xTbY+x, yTbY+y). 2. The adjacent luma samples pY[x][y] are derived as follows: When numSampL is greater than 0, the adjacent left luma sample pY[x][y], for x=-1..-3, y=0..2*numSampL-1, is set equal to the reconstructed luma sample before deblocking filtering at position (xTbY+x, yTbY+y). - When numSampT is greater than 0, the adjacent upper luma sample pY[x][y], for x=0..2*numSampT-1, y=-1, -2, is set equal to the reconstructed luma sample before deblocking filtering at position (xTbY+x, yTbY+y). - When availTL is equal to TRUE, the neighboring top-left luma sample pY[x][y], with x=-1, y=-1, -2, is set equal to the reconstructed luma sample before deblocking filtering at position (xTbY+x, yTbY+y). 3. The downsampled co-located luma samples pDsY[x][y], for x=0..nTbW-1, y=0..nTbH-1, are derived as follows: - If sps_cclm_colocated_chroma_flag is equal to 1, the following is true: - pDsY[x][y] for x=1..nTbW-1 and y=1..nTbH-1 is derived as follows: pDsY[x][y]=(pY[2*x][2*y-1]+pY[2*x-1][2*y]+4*pY[2*x][2*y]+pY[2*x+1][2*y]+pY[2*x][2*y+1]+4)>>3 (8-162) - If availL is equal to TRUE, pDsY[0][y], where y=1..nTbH-1, is derived as follows: pDsY[0][y]=(pY[0][2*y-1]+pY[-1][2*y]+4*pY[0][2*y]+pY[1][2*y]+pY[0][2*y+1]+4)>>3 (8-163) - Otherwise, pDsY[0][y], for y=1..nTbH-1, is derived as follows: pDsY[0][y]=(pY[0][2*y-1]+2*pY[0][2*y]+pY[0][2*y+1]+2)>>2 (8-164) - If availT is equal to TRUE, pDsY[x][0], for x=1..nTbW-1, is derived as follows: pDsY[x][0]=(pY[2*x][ -1]+pY[2*x-1][0]+4*pY[2*x][0]+pY[2*x+1][0]+pY[2*x][1]+4)>>3 (8-165) - Otherwise, pDsY[x][0] for x=1..nTbW-1 is derived as follows: pDsY[x][0]=(pY[2*x-1][0]+2*pY[2*x][0]+pY[2*x+1][0]+2)>>2 (8-166) - If availL is equal to TRUE and availT is equal to TRUE, then pDsY[0][0] is derived as follows: pDsY[0][0]=(pY[0][ -1]+pY[-1][0]+4*pY[0][0]+pY[1][0]+pY[0][1]+4)>>3 (8-167) - Otherwise, if availL is equal to TRUE and availT is equal to FALSE, then pDsY[0][0] is derived as follows: pDsY[0][0]=(pY[-1][0]+2*pY[0][0]+pY[1][0]+2)>>2 (8-168) - Otherwise, if availL is equal to FALSE and availT is equal to TRUE, then pDsY[0][0] is derived as follows: pDsY[0][0]=(pY[0][ -1]+2*pY[0][0]+pY[0][1]+2)>>2 (8-169) - If not (availL is equal to FALSE and availT is equal to FALSE), then pDsY[0][0] is derived as follows: pDsY[0][0]=pY[0][0] (8-170) - Otherwise, the following applies: - pDsY[x][y] for x=1..nTbW-1, y=0..nTbH-1 is derived as follows: pDsY[x][y]=(pY[2*x-1][2*y]+pY[2*x-1][2*y+1]+2*pY[2*x][2*y]+2*pY[2*x][2*y+1]+pY[2*x+1][2*y]+pY[2*x+1][2*y+1]+4)>>3 (8-171) - If availL is equal to TRUE, pDsY[0][y], where y=0..nTbH-1, is derived as follows: pDsY[0][y]=(pY[-1][2*y]+pY[-1][2*y+1]+2*pY[0][2*y]+2*pY[0][2*y+1]+pY[1][2*y]+pY[1][2*y+1]+4)>>3 (8-172) - Otherwise, pDsY[0][y] for y=0..nTbH-1 is derived as follows: pDsY[0][y]=(pY[0][2*y]+pY[0][2*y+1]+1)>>1 (8-173)
[0229] CCLM predicts the values of chroma samples in a chroma block by using a subsampled luma block (downsampled luma block) that is spatially co-located with the chroma block. Subsampling or downsampling of the luma block includes filtering to suppress aliasing artifacts caused by spectral mirroring. The selection of the interpolation filter type depends on the subsampling type and the value of the subsample spatial offset between the chroma and luma samples of the original picture.
[0230] In the previous design, the set of interpolation filters was defined without considering the chroma format, so the following defects may occur when the chroma subsampling ratio in the horizontal direction (SubWidthC) is not equal to the chroma subsampling ratio in the vertical direction (SubHeightC). - Excessive smoothing, - Incorrect phase shift of the filtered luminance signal.
[0231] The present disclosure provides a method for taking into account the chroma format of a picture when predicting chroma samples from luma samples. By selecting a filter set based on the chroma format, the deficiencies of previous designs can be eliminated, which results in a more accurate chroma prediction signal and thus a reduction in prediction error. A technical consequence of a smaller prediction error is a reduction in the residual signal energy. Coding methods may exploit this reduction to reduce distortion of the reconstructed signal, to reduce the bit rate required to encode the residual signal, or both to reduce distortion and to reduce the bit rate. These technical effects achieved by the present disclosure improve the overall compression performance of the coding method.
[0232] Table 1 shows chroma formats that may be supported in this disclosure. Chroma format information, such as chroma_format_idc and / or separate_colour_plane_flag, may be used to determine values for variables SubWidthC and SubHeightC.
[0233] [Table 1]
[0234] chroma_format_idc specifies the chroma sampling relative to luma sampling. The value of chroma_format_idc shall be in the range 0 to 3, inclusive.
[0235] separate_colour_plane_flag equal to 1 specifies that the three colour components of the 4:4:4 chroma format are coded separately. separate_colour_plane_flag equal to 0 specifies that the colour components are not coded separately. When separate_colour_plane_flag is not present, it is inferred to be equal to 0. When separate_colour_plane_flag is equal to 1, the coded picture consists of three separate components, each of which consists of coded samples of one colour plane (Y, Cb, or Cr), and uses the monochrome coding syntax.
[0236] The chroma format determines the priority and subsampling of the chroma arrays.
[0237] In monochrome sampling, there is only one sample array, which is nominally considered the luma array.
[0238] In 4:2:0 sampling, each of the two chroma arrays has half the height and half the width of the luma array, as shown in FIG. 6A.
[0239] In 4:2:2 sampling, each of the two chroma arrays has the same height and half the width of the luma array, as shown in FIG. 6B.
[0240] For 4:4:4 sampling, depending on the value of separate_colour_plane_flag the following applies: - When separate_colour_plane_flag is equal to 0, each of the two chroma arrays has the same height and width as the luma array, as shown in Figure 6C. - Otherwise (separate_colour_plane_flag is equal to 1), the three colour planes are treated separately as a monochrome sampled picture.
[0241] In the present disclosure, a method is provided for processing luma samples used as input data to determine parameters of a linear model. The linear model may include, but is not limited to, a component-to-component linear model (CCLM) or a multi-directional linear model (MDLM). The method includes determining a set of filters (such as two filters) that are conditionally applied in the vertical and horizontal directions.
[0242] In some embodiments, a set of conditions is introduced that are checked to determine the coefficients of the filter to be applied to the reconstructed luma samples, including but not limited to conditions related to the chroma sampling ratio (and thus the chroma sampling factors, such as the variables SubWidthC and SubHeightC).
[0243] FIG. 7A is a schematic diagram illustrating an example mechanism for performing CCLM intra prediction 700. CCLM intra prediction 700 is a type of inter-component intra prediction. Thus, CCLM intra prediction 700 may be performed by intra prediction unit 254 of encoder 20 and / or intra prediction unit 354 of decoder 30. CCLM intra prediction 700 predicts chroma samples 703 in a chroma block 701. The chroma samples 703 appear at integer positions shown as grids or cells formed by intersecting lines. The prediction is based in part on neighboring reference samples, illustrated as black circles. The chroma samples 703 are predicted not only based on neighboring chroma reference samples 705, illustrated as reconstructed chroma samples (Rec'C). The chroma samples 703 are also predicted based on reconstructed luma samples 713 and neighboring luma reference samples 715. Specifically, a CU includes a luma block 711 and two chroma blocks 701. A model is generated that correlates chroma samples 703 and reconstructed luma samples 713 in the same CU. Linear coefficients for the model may be determined by comparing adjacent luma reference samples 715 to adjacent chroma reference samples 705, and in one example, linear coefficients for the model may be determined by comparing a downsampled luma reference sample 719 of a selected adjacent luma reference sample 715 to a selected adjacent chroma reference sample 705, and a position of the selected adjacent chroma reference sample 705 may correspond to a position of the downsampled luma reference sample 719.
[0244] The adjacent chroma reference sample 705 is selected from chroma samples in adjacent blocks next to the chroma block 701. The adjacent chroma reference sample 705 is selected from the top template 707 and / or the left template 706. For example, the adjacent chroma reference sample 705 may be selected based on the availability of the top template 707 and / or the left template 706. As shown in FIG. 7D, four adjacent chroma reference samples 705 may be selected. Since the adjacent chroma reference sample 705 is a reconstructed sample, the adjacent chroma reference sample 705 is denoted as a reconstructed chroma sample (Rec'C). The reconstructed luma sample 713 is obtained from a luma block 711 in the same CU as the chroma block 701. The adjacent luma reference sample 715 is selected from luma samples in adjacent blocks next to the luma block 711. The adjacent luma reference sample 715 is selected from the top template 717 and / or the left template 716. For example, as shown in FIG. 7D , adjacent luma reference samples 715 are selected to obtain four downsampled luma reference samples 719 corresponding to the selected four adjacent chroma reference samples 705 (i.e., the positions of the four downsampled luma reference samples 719 correspond to the positions of the selected four adjacent chroma reference samples 705). When a 6-tap downsampling filter is applied, etc., six adjacent luma reference samples 715 are used to obtain one downsampled luma reference sample 719 corresponding to one selected adjacent chroma reference sample 705. The reconstructed luma sample 713 is denoted as Rec'L. Also, in this specification, templates 706, 707, 716, and 717 are mechanisms that correlate the adjacent luma reference samples 715 with the adjacent chroma reference samples 705.
[0245] As shown, luma block 711 contains four times as many samples as chroma block 701. Specifically, chroma block 701 contains N by N samples, while luma block 711 contains 2N by 2N samples. Thus, luma block 711 is four times the resolution of chroma block 701. For prediction to operate on reconstructed luma samples 713 and (selected) adjacent luma reference samples 715, the reconstructed luma samples 713 and (selected) adjacent luma reference samples 715 are downsampled to provide an accurate comparison between adjacent chroma reference samples 705 and chroma samples 703. Downsampling is the process of reducing the resolution of a group of samples.
[0246] Once the (selected) neighboring luma reference samples 715 and the reconstructed luma samples 713 are downsampled, a model may be generated to predict the chroma samples 703 of the chroma block 701. Specifically, in CCLM intra prediction 700, a prediction for the chroma samples 703 of the chroma block 701 may be determined according to the model described by Equation 1 below. pred C (i,j)=α·rec L '(i,j)+β (1) Here, pred C (i,j) is the predicted chroma sample 703 of the chroma block 701 at position (i,j), where i is the horizontal index and j is the vertical index. L '(i,j) is the downsampled luma sample at position (i,j) of the reconstructed luma sample 713, and α and β are linear coefficients determined based on the downsampled luma reference samples of the (selected) adjacent luma reference sample 715 and the (selected) chroma reference sample 705. In the YUV 4:2:0 format, since each chroma sample has four co-located luma samples, both the luma sample used to derive α and β and the sample used to calculate the predicted chroma sample are downsampled (see FIG. 6A).
[0247] In an example, α and β are determined based on the minimum and maximum values of the downsampled neighboring luma reference samples 719 of the selected neighboring luma reference sample 715, as discussed with respect to Figures 8 and 7D. In one example implementation, after the maximum and minimum luma values are determined based on the downsampled luma reference samples 719, a first chroma value is obtained based at least in part on one or more positions (e.g., two positions) of one or more downsampled luma reference samples (e.g., two downsampled luma reference samples) associated with the maximum luma value. For example, the first chroma value is obtained based on two chroma reference samples at two positions corresponding to the two downsampled luma reference samples associated with the maximum luma value. The second chroma value is obtained based at least in part on one or more positions of the one or more downsampled luma reference samples associated with the minimum luma value. For example, the second chroma value is obtained based on two chroma reference samples at two positions corresponding to the two downsampled luma reference samples associated with the minimum luma value. The linear model coefficients α and β are calculated based on the first chroma value, the second chroma value, the maximum luma value, and the minimum luma value (see FIG. 7D and FIG. 8).
[0248] As mentioned above, the (selected) adjacent luma reference samples 715 and the reconstructed luma samples 713 are downsampled before generating the linear model. Furthermore, utilizing multiple lines / rows and columns to generate the adjacent luma reference samples 715 does not significantly increase the accuracy of the remaining calculations according to CCLM intra prediction 700. Therefore, a single row and / or column of the adjacent luma reference samples 715 can be utilized during downsampling, which reduces the utilization of the line buffer memory without significantly affecting the accuracy and / or coding efficiency of CCLM intra prediction 700.
[0249] Figure 7B shows the locations of the left and top causal samples, as well as the samples of the current block involved in CCLM mode, when the YCbCr 4:4:4 chroma format is used, in which case no downsampling is performed due to CCLM.
[0250] 7C shows the locations of the left and top causal samples, as well as the samples of the current block involved in CCLM mode, when the YCbCr 4:2:2 chroma format is used, in which filtering is performed before downsampling the luma samples in the horizontal direction for CCLM.
[0251] FIG. 10 is a schematic diagram illustrating an exemplary mechanism 1500 for downsampling to support inter-component intra prediction.
[0252] The mechanism 1500 utilizes a single row 1518 of neighboring luma reference samples and a single column 1520 of neighboring luma reference samples. The row 1518 and column 1520 are directly adjacent to the luma block 1511 that shares a CU with the chroma block being predicted according to inter-component intra prediction. After downsampling, the row 1518 of neighboring luma reference samples becomes a row 1516 of downsampled neighboring luma reference samples. Furthermore, the column 1520 of neighboring luma reference samples is downsampled to result in a single column 1517 of downsampled neighboring luma reference samples. The downsampled neighboring luma reference samples from the row 1516 and column 1517 may then be utilized for inter-component intra prediction according to Equation 1.
[0253] Thus, in one example implementation, a single row of adjacent luma reference samples 1518 and a single column of adjacent luma reference samples 1520 are downsampled for use in inter-component intra prediction. It should be noted that in another example implementation, selected luma reference samples of the single row of adjacent luma reference samples 1518 and selected luma reference samples of the single column of adjacent luma reference samples 1520 are downsampled for use in inter-component intra prediction.
[0254] For the luma block 1511, an upper neighboring row 1518, denoted as A1, is used for downsampling to obtain a downsampled neighboring row 1516, denoted as A. A[i] is the i-th sample of A, and A1[i] is the i-th sample of A1. In one particular example, the determined or selected downsampling filter or filters depend on the chroma format of the picture and may be applied to the neighboring row 1518 to obtain the downsampled neighboring row 1516. In another particular example, as shown in FIG. 7D, the determined or selected downsampling filter or filters depend on the chroma format of the picture and may be applied to several selected luma reference samples A1[i] of a single row 1518 to obtain a downsampled luma reference sample. More details on this will be provided below.
[0255] Further, a left neighboring column 1520, denoted as L1, is used for downsampling to obtain a downsampled neighboring column 1517, denoted as L. L[i] is the i-th sample of L, and L1[i] is the i-th sample of L1. In one particular example, the determined or selected one or more downsampling filters depend on the chroma format of the picture and may be applied to the neighboring column 1520 to obtain the downsampled neighboring column 1517. More details on this will be introduced below. In another particular example, as shown in FIG. 7D, the determined or selected one or more downsampling filters depend on the chroma format of the picture and may be applied to several selected luma reference samples L1[i] of a single column 1520 to obtain downsampled luma reference samples.
[0256] Furthermore, it should also be noted that the mechanism 1500 may also be applied when a dimension of the rows 1518 and / or 1516 and / or the columns 1520 and / or 1517 is greater than a width or height of the luma block 1511 or the downsampled luma block 1512. In an alternative design, the mechanism 1500 may also be applied to some selected neighboring reference samples A1[i] and / or some selected neighboring reference samples L1[i].
[0257] 11 is a flowchart of an example process 1100 for performing intra prediction using a linear model according to some embodiments of the present disclosure. The method may be performed by the video encoder 20 and / or the video decoder 30 of the codec system 10 or 40 shown in FIG. 1A and FIG. 1B. Specifically, the method may be performed by the intra prediction unit 244 of the video encoder 20 shown in FIG. 2 and / or the intra prediction unit 354 of the video decoder 30 shown in FIG. 3.
[0258] In block 1101, a set of downsampling filters is determined based on chroma format information, which indicates a chroma format of a picture to which a current block belongs. The current block comprises a luma block and a co-located chroma block. It can be understood that each downsampling filter of the set of downsampling filters can be defined by one or more downsampling filter coefficients, which will be described in detail below.
[0259] In block 1103, downsampled luma samples of the reconstructed luma samples in the luma block of the current block and downsampled luma reference samples of the selected luma reference samples (also, i.e., selected luma neighboring samples) of (its) luma block are obtained using respective downsampling filters in the set of downsampling filters.
[0260] As shown in Figure 10, the spatial resolution of a luma block is usually larger than that of a chroma block, and it can be understood that a luma block (i.e., a reconstructed luma block) is downsampled to obtain a downsampled luma block. As shown in Figure 9 or Figure 10, a reconstructed luma sample that is horizontally and / or vertically adjacent to a selected adjacent luma sample (downsampled luma reference sample) is used to obtain a downsampled luma reference sample of the selected adjacent luma sample outside the luma block.
[0261] At block 1105, one or more linear model coefficients are determined or derived based on the downsampled luma reference sample and a chroma reference sample that corresponds to (or is associated with) the downsampled luma reference sample.
[0262] In block 1107, prediction samples of a chroma block corresponding to the luma block are obtained based on the linear model coefficients and the downsampled luma samples of the reconstructed luma samples in the luma block.
[0263] Block 1101 is to determine or obtain or acquire values of variables SubWidthC and SubHeightC based on chroma format information indicating the chroma format of the picture being coded.
[0264] Block 1101 is to define or determine a filter "F" that is used for the values of the variables SubWidthC and SubHeightC.
[0265] An example embodiment of how a filter can be associated with corresponding values of SubWidthC and SubHeightC as shown in Tables 2-5. The spatial filter "F" is defined in the form of a matrix of coefficients. The sample locations to which those coefficients are applied are defined as follows, and the location of the luma sample to be filtered or modified is denoted as (x,y).
[0266]
number
[0267] When the position of the output filtered reconstructed samples is on a block boundary, some of the neighboring positions may be unavailable due to the unavailability of neighboring blocks. In this case, the selection of input samples is modified to overlap samples at the block boundary. This modification may be implemented as applying another filter to a smaller set of samples with different filter coefficients.
[0268] Specifically, when the output sample is on the left boundary of the current block and no sample to the left of the luma block is available, the position of the sample used for filtering is defined as follows:
[0269]
number
[0270] When the output sample is on the top border of the current block and no upper neighboring sample of the luma block is available, the position of the sample used for filtering is defined as follows:
[0271]
number
[0272] When the output sample position is on the right boundary of the current block, the position of the sample used for filtering is defined as follows:
[0273]
number
[0274] When the output sample position is on the bottom boundary of the current block, the position of the sample used for filtering is defined as follows:
[0275]
number
[0276] [Table 2]
[0277] [Table 3]
[0278] [Table 4]
[0279] [Table 5]
[0280] Block 1103 outputs the filtered luma sample value Rec' L The goal is to perform filtering of the reconstructed luma samples to obtain [x,y]. Specifically, this is done by filtering the reconstructed sample Rec L This is done by applying the selected filter "F" to [x,y].
[0281]
number
[0282] where F represents a spatial filter, N is the sum of coefficients of the spatial filter F, and (x,y) represents the position of the reconstructed sample. This filtering corresponds to the scenario shown in equation (5). In other scenarios, such as those described above for equations (6)-(9), filtering can be applied by adjusting the filtering described above based on the position of the sample shown in equations (6)-(9).
[0283] In further embodiments, the filter may switch between different filter types (such as the different filter associations defined in Tables 2-5) depending on the position of the subsampled chroma sample relative to the luma sample. As an example, when a subsampled chroma sample is not co-located with the corresponding luma sample (see chroma sample types 0, 1, 3, or 5, as signaled by a flag (such as sps_cclm_colocated_chroma_flag with a value of 0) in the bitstream, as shown in FIG. 6D), Table 4 is used. Otherwise, either Table 2 or Table 3 is used for the current block.
[0284] The decision to use Table 2 or Table 3 may be made based on the number of luma samples in the current block. For example, for blocks with 64 samples or less, when chroma subsampling is not performed, no chroma filtering is applied (thus the use of Table 2 is selected). On the other hand, when the block size is greater than 64 samples, Table 3 is used to define the filter "F". Note that 64 is used only as an example, and other thresholds for the number of samples may be used.
[0285] In another embodiment, the filter F is selected according to information indicating the chroma format and the chroma type as shown in Tables 6 to 10. The chroma type specifies the offset of the chroma components and is shown in FIG. 6D. In FIG. 6D, for chroma sample type 2 and chroma sample type 4, the subsampled chroma samples are co-located with the corresponding luma samples. For chroma sample types 0, 1, 3, and 5, the subsampled chroma samples are not co-located with the corresponding luma samples. In Tables 6 to 10, the filters specified in the column "YUV 4:2:0" are used in previous designs of the VVC draft. The columns "YUV 4:2:2" and "YUV 4:4:4" define filters that can replace the filters defined in the column "YUV 4:2:0" when the corresponding chroma format is defined.
[0286] [Table 6]
[0287] [Table 7]
[0288] [Table 8]
[0289] [Table 9]
[0290] [Table 10]
[0291] filter
[0292]
number
[0293] can be implemented in different ways, including a filter bypass operation (i.e., by setting the output value to the input value, i.e., the filter is a bypass filter). Alternatively, it can be implemented using similar add and shift operations.
[0294]
number
[0295] According to the proposed changes, in accordance with one exemplary embodiment presented in this specification, the details of the process for performing intra prediction using a linear model (inter-component prediction of a block) are described as follows, in the format of a portion of the VVC draft specification:
[0296] 3. The downsampled co-located luma samples pDsY[x][y], for x=0..nTbW-1, y=0..nTbH-1, are derived as follows: - If sps_cclm_colocated_chroma_flag is equal to 1, the following is true: - pDsY[x][y] for x=1..nTbW-1 and y=1..nTbH-1 is derived as follows: pDsY[x][y]= (F[1][0]*pY[SubWidthC*x][SubHeightC*y-1]+ +F[0][1]*pY[SubWidthC*x-1][SubHeightC*y]+ +F[1][1]*pY[SubWidthC*x][SubHeightC*y]+ +F[2][1]*pY[SubWidthC*x+1][SubHeightC*y]+ +F[1][2]*pY[SubWidthC*x][SubHeightC*y+1]+4)>>3 - If availL is equal to TRUE, pDsY[0][y], where y=1..nTbH-1, is derived as follows: pDsY[0][y]= (F[1][0]*pY[0][SubHeightC*y-1]+ +F[0][1]*pY[-1][SubHeightC*y]+ +F[1][1]*pY[0][SubHeightC*y]+ +2)>>2 - Otherwise, pDsY[0][y], for y=1..nTbH-1, is derived as follows: pDsY[0][y]= (2*F[1][0]*pY[0][SubHeightC*y-1]+ +F[1][1]*pY[0][SubHeightC*y]+ +2)>>2 - If availT is equal to TRUE, pDsY[x][0], for x=1..nTbW-1, is derived as follows: pDsY[x][0] = (F[1][0]*pY[SubWidthC*x][ -1]+ +F[0][1]*pY[SubWidthC*x-1][0]+ +F[1][1]*pY[SubWidthC*x][0]+ +F[2][1]*pY[SubWidthC*x+1][0]+ +F[1][2]*pY[SubWidthC*x][1]+4)>>3 - Otherwise, pDsY[x][0] for x=1..nTbW-1 is derived as follows: pDsY[x][0] = (F[1][0]*pY[SubWidthC*x][-1]+ +F[0][1]*pY[SubWidthC*x-1][0]+ +F[1][1]*pY[SubWidthC*x][0]+ +F[2][1]*pY[SubWidthC*x+1][0]+ +F[1][2]*pY[SubWidthC*x][1]+4)>>3 - If availL is equal to TRUE and availT is equal to TRUE, then pDsY[0][0] is derived as follows: pDsY[0][0]= (F[1][0]*pY[0][ -1]+ +F[0][1]*pY[-1][0]+ +F[1][1]*pY[0][0]+ +F[2][1]*pY[1][0]+ +F[1][2]*pY[0][1]+4)>>3 - Otherwise, if availL is equal to TRUE and availT is equal to FALSE, then pDsY[0][0] is derived as follows: pDsY[0][0]= (F[0][1]*pY[-1][0]+ +F[1][1]*pY[0][0]+ +F[2][1]*pY[1][0]+ +2)>>2 - Otherwise, if availL is equal to FALSE and availT is equal to TRUE, then pDsY[0][0] is derived as follows: pDsY[0][0]=(pY[0][ -1]+2*pY[0][0]+pY[0][1]+2)>>2 (8-169) - If not (availL is equal to FALSE and availT is equal to FALSE), then pDsY[0][0] is derived as follows: pDsY[0][0]=pY[0][0] (8-170) - Otherwise, the following applies: - pDsY[x][y] for x=1..nTbW-1, y=0..nTbH-1 is derived as follows: pDsY[x][y]= (F[0][1]*pY[SubWidthC*x-1][SubHeightC*y]+ +F[0][2]*pY[SubWidthC*x-1][SubHeightC*y+1]+ +F[1][1]*pY[SubWidthC*x][SubHeightC*y]+ +F[1][2]*pY[SubWidthC*x][SubHeightC*y+1]+ +F[2][1]*pY[SubWidthC*x+1][SubHeightC*y]+ +F[2][2]*pY[+1SubWidthC*x+1][SubHeightC*y+1]+4)>>3 - If availL is equal to TRUE, pDsY[0][y], where y=0..nTbH-1, is derived as follows: pDsY[0][y]= (F[0][1]*pY[-1][SubHeightC*y]+ +F[0][2]*pY[-1][SubHeightC*y+1]+ +F[1][1]*pY[0][SubHeightC*y]+ +F[1][2]*pY[0][SubHeightC*y+1]+ +F[2][1]*pY[1][SubHeightC*y]+ +F[2][2]*pY[1][SubHeightC*y+1]+4)>>3 - Otherwise, pDsY[0][y] for y=0..nTbH-1 is derived as follows: pDsY[0][y]= (F[1][1]*pY[0][SubHeightC*y]+ +F[1][2]*pY[0][SubHeightC*y+1]+1)>>1
[0297] The filters F[i][j] referred to in the above description are specified according to the embodiments presented herein.
[0298] According to another exemplary embodiment, details of a process for performing intra prediction using a linear model (inter-component prediction of a block) are described as follows, in a part format of the VVC draft specification:
[0299] 8.4.4.2.8 INTRA_LT_CCLM, INTRA_L_CCLM, and INTRA_T_CCLM Intra Prediction Modes Specification
[0300] The inputs to this process are: - intra prediction mode predModeIntra, - the sample position (xTbC, yTbC) of the top-left sample of the current transform block relative to the top-left sample of the current picture, - variable nTbW, which specifies the transformation block width; - variable nTbH, which specifies the transformation block height, - chroma neighboring samples p[x][y], where x=-1, y=0..2*nTbH-1 and x=0..2*nTbW-1, y=-1.
[0301] The output of this process is the predicted samples predSamples[x][y], x=0..nTbW-1, y=0..nTbH-1.
[0302] The current luma position (xTbY, yTbY) is derived as follows: (xTbY,yTbY)=(xTbC<<(SubWidthC-1),yTbC<<(SubHeightC-1)) (8-156)
[0303] The variables availL, availT, and availTL are derived as follows: - The availability of the left adjacent sample derivation process for the block is called with the current chroma position (xCurr, yCurr) set equal to (xTbC, yTbC) and the adjacent chroma position (xTbC-1, yTbC) as input, and the output is assigned to availL. - The availability of upper adjacent sample derivation process for the block is called with the current chroma position (xCurr, yCurr) set equal to (xTbC, yTbC), and the adjacent chroma position (xTbC, yTbC-1) as input, and the output is assigned to availT. - The availability of the top-left neighboring sample derivation process for the block is called with the current chroma position (xCurr, yCurr) set equal to (xTbC, yTbC) and the neighboring chroma position (xTbC-1, yTbC-1) as input, and the output is assigned to availTL. - The number of available top-right adjacent chroma samples, numTopRight, is derived as follows: The variable numTopRight is set equal to 0, and availTR is set equal to TRUE. - When predModeIntra is equal to INTRA_T_CCLM, the following is true for x=nTbW..2*nTbW-1, until availTR is equal to FALSE or x is equal to 2*nTbW-1: - The availability derivation process for the block is called with the current chroma position (xCurr, yCurr) set equal to (xTbC, yTbC) and the neighbor chroma position (xTbC+x, yTbC-1) as input, and the output is assigned to availableTR. - When availableTR is equal to TRUE, numTopRight is incremented by 1. - The number of available bottom-left adjacent chroma samples, numLeftBelow, is derived as follows: The variable numLeftBelow is set equal to 0, and availLB is set equal to TRUE. - when predModeIntra is equal to INTRA_L_CCLM, the following is true for y=nTbH..2*nTbH-1, until availLB is equal to FALSE or y is equal to 2*nTbH-1: - The availability derivation process for the block is called with the current chroma position (xCurr, yCurr) set equal to (xTbC, yTbC) and the neighbor chroma position (xTbC-1, yTbC+y) as input, and the output is assigned to availableLB. - When availableLB is equal to TRUE, numLeftBelow is incremented by 1.
[0304] The number of available neighboring chroma samples above and to the right, numTopSamp, and the number of available neighboring chroma samples to the left and to the left, nLeftSamp, are derived as follows: - If predModeIntra is equal to INTRA_LT_CCLM, the following is true: numSampT=availT?nTbW:0 numSampL=availL?nTbH:0 - Otherwise, the following applies: numSampT=(availT&&predModeIntra==INTRA_T_CCLM)?(nTbW+ numTopRight):0 numSampL=(availL&&predModeIntra==INTRA_L_CCLM)?(nTbH+numLeftBelow):0
[0305] The variable bCTUboundary is derived as follows: bCTUboundary=(yTbC&(1<<(CtbLog2SizeY-1) -1)==0)?TRUE:FALSE
[0306] The predicted samples predSamples[x][y], where x=0..nTbW-1 and y=0..nTbH-1, are derived as follows: - If both numSampL and numSampT are equal to 0, the following is true: predSamples[x][y]=1<<(BitDepth C -1) - Otherwise, the following ordered steps apply: 1. The co-located luma sample pY[x][y], where x=0..nTbW*SubWidthC-1, y=0..nTbH*SubHeightC-1, is set equal to the reconstructed luma sample before deblocking filtering at position (xTbY+x, yTbY+y). 2. The adjacent luma sample pY[x][y] is derived as follows: - When numSampL is greater than 0, the neighboring left luma sample pY[x][y], for x=-1..-3, y=0..SubHeightC*numSampL-1, is set equal to the reconstructed luma sample before deblocking filtering at position (xTbY+x, yTbY+y). - When numSampT is greater than 0, the adjacent upper luma sample pY[x][y], with x=0..SubWidthC*numSampT-1, y=-1, -2, is set equal to the reconstructed luma sample before deblocking filtering at position (xTbY+x, yTbY+y). - When availTL is equal to TRUE, the neighboring top-left luma sample pY[x][y], with x=-1, y=-1, -2, is set equal to the reconstructed luma sample before deblocking filtering at position (xTbY+x, yTbY+y). 3. The downsampled co-located luma samples pDsY[x][y], for x=0..nTbW-1, y=0..nTbH-1, are derived as follows: - If SubWidthC==1 and SubHeightC==1, the following is true: - pDsY[x][y] for x=1..nTbW-1 and y=1..nTbH-1 is derived as follows: pDstY[x][y]=pY[x][y] / / Explanatory note: When 4:4:4 (both SubWidthC and SubHeightC are equal to 1), no downsampling is needed, i.e. no filtering is performed. This can also be interpreted as a filter with coefficient [1], i.e. a bypass filter. / / - Otherwise the following applies for the set of filters {F3,F5,F6}. / / Explanatory note: Here we define the coefficients of the filters when 4:2:0 or 4:2:2 (when neither SubWidthC nor SubHeightC are equal to 1), and F2 belongs to both the first and second sets of downsampling filters / / - F3[0]=1, F3[1]=2, F3[2]=1 - If SubWidthC==2 and SubHeightC==2, F5[0][1]=1, F5[1][1]=4, F3[2][1]=1, F5[1][0]=1, F5[1][2]=1 F6[0][1]=1, F6[1][1]=2, F6[2][1]=1 F6[0][2]=1, F6[1][2]=2, F6[2][2]=1 F2[0]=1, F2[1]=1 - Otherwise F5[0][1]=0, F5[1][1]=8, F3[2][1]=0, F5[1][0]=0, F5[1][2]=0 F6[0][1]=2, F6[1][1]=4, F6[2][1]=2 F6[0][2]=0, F6[1][2]=0, F6[2][2]=0 F2[0]=2, F2[1]=0 - If sps_cclm_colocated_chroma_flag is equal to 1, the following is true: - pDsY[x][y] for x=1..nTbW-1, y=1..nTbH-1 is derived by setting F to F5 as follows: - pDsY[x][y]= (F[1][0]*pY[SubWidthC*x][SubHeightC*y-1]+ +F[0][1]*pY[SubWidthC*x-1][SubHeightC*y]+ +F[1][1]*pY[SubWidthC*x][SubHeightC*y]+ +F[2][1]*pY[SubWidthC*x+1][SubHeightC*y]+ +F[1][2]*pY[SubWidthC*x][SubHeightC*y+1]+4)>>3 / / Explanatory note: F5 corresponds to the first downsampling filter claimed / / / / - If availL is equal to TRUE, then for F set to F5, pDsY[0][y], for y=1..nTbH-1, is derived as follows: pDsY[0][y]= (F[1][0]*pY[0][SubHeightC*y-1]+ +F[0][1]*pY[-1][SubHeightC*y]+ +F[1][1]*pY[0][SubHeightC*y]+ +F[2][1]*pY[1][SubHeightC*y]+ +F[1][2]*pY[0][SubHeightC*y+1]+4)>>3 - Otherwise, pDsY[0][y], for y=1..nTbH-1, is derived as follows, for F set to F3: pDsY[0][y]= (F[0]*pY[0][SubHeightC*y-1]+ +F[1]*pY[0][SubHeightC*y]+ +F[2]*pY[0][SubHeightC*y+1]+ +2)>>2 - If availT is equal to TRUE, then pDsY[x][0], for x=1..nTbW-1, is derived as follows, for F set to F5: pDsY[x][0] = (F[1][0]*pY[SubWidthC*x][-1]+ +F[0][1]*pY[SubWidthC*x-1][0]+ +F[1][1]*pY[SubWidthC*x][0]+ +F[2][1]*pY[SubWidthC*x+1][0]+ +F[1][2]*pY[SubWidthC*x][1]+4)>>3 - Otherwise, pDsY[x][0], for x=1..nTbW-1, is derived as follows, for F set to F3: pDsY[x][0] = =(F[0]*pY[SubWidthC*x-1][0]+ +F[1]*pY[SubWidthC*x][0]+ +F[2]*pY[SubWidthC*x+1][0]+2)>>2 - If availL is equal to TRUE and availT is equal to TRUE, then pDsY[0][0] is derived as follows, with F set to F5: pDsY[0][0]= (F[1][0]*pY[0][-1]+ +F[0][1]*pY[-1][0]+ +F[1][1]*pY[0][0]+ +F[2][1]*pY[1][0]+ +F[1][2]*pY[0][1]+4)>>3 - Otherwise, if availL is equal to TRUE and availT is equal to FALSE, then pDsY[0][0] is derived as follows, for F set to F3: pDsY[0][0]= (F[0]*pY[-1][0]+ +F[1]*pY[0][0]+ +F[2]*pY[1][0]+ +2)>>2 - Otherwise, if availL is equal to FALSE and availT is equal to TRUE, then pDsY[0][0] is derived as follows, for F set to F3: pDsY[0][0]= (F[0]*pY[0][ -1]+ +F[1]*pY[0][0]++F[2]*pY[0][1]+ +2)>>2 - If not (availL is equal to FALSE and availT is equal to FALSE), then pDsY[0][0] is derived as follows: pDsY[0][0]=pY[0][0] - Otherwise, the following applies: - pDsY[x][y], for x=1..nTbW-1, y=0..nTbH-1, with F set to F6, is derived as follows: pDsY[x][y]= (F[0][1]*pY[SubWidthC*x-1][SubHeightC*y]+ +F[0][2]*pY[SubWidthC*x-1][SubHeightC*y+1]+ +F[1][1]*pY[SubWidthC*x][SubHeightC*y]+ +F[1][2]*pY[SubWidthC*x][SubHeightC*y+1]+ +F[2][1]*pY[SubWidthC*x+1][SubHeightC*y]+ +F[2][2]*pY[SubWidthC*x+1][SubHeightC*y+1]+4)>>3 - If availL is equal to TRUE, then for F set to F6, pDsY[0][y], for y=0..nTbH-, is derived as follows: pDsY[0][y]= (F[0][1]*pY[-1][SubHeightC*y]+ +F[0][2]*pY[-1][SubHeightC*y+1]+ +F[1][1]*pY[0][SubHeightC*y]+ +F[1][2]*pY[0][SubHeightC*y+1]+ +F[2][1]*pY[1][SubHeightC*y]+ +F[2][2]*pY[1][SubHeightC*y+1]+4)>>3 - Otherwise, pDsY[0][y], for y=0..nTbH-1, is derived as follows, for F set to F2: pDsY[0][y]= (F[0]*pY[0][SubHeightC*y]+ +F[1]*pY[0][SubHeightC*y+1]+1)>>1 / / Step 3 is an implementation for obtaining downsampled luma samples of the reconstructed luma samples in the luma blocks of the current block using the respective downsampling filters. 4. When numSampL is greater than 0, the downsampled adjacent left luma sample pLeftDsY[y], for y=0..numSampL-1, is derived as follows: - If SubWidthC==1 and SubHeightC==1, the following is true: - pLeftDsY[y] for y=0..nTbH-1 is derived as follows: pLeftDsY[y]=pY[-1][y] - Otherwise, the following applies: - If sps_cclm_colocated_chroma_flag is equal to 1, the following is true: - pLeftDsY[y], for y=1..nTbH-1, is derived as follows, for F set to F5: pLeftDsY[y] = =F[1][0]*pY[-SubWidthC][SubHeightC*y-1]+ +F[0][1]*pY[-1-SubWidthC][SubHeightC*y]+ +F[1][1]*pY[-SubWidthC][SubHeightC*y]+ +F[2][1]*pY[1-SubWidthC][SubHeightC*y]+ +F[1][2]*pY[-SubWidthC][SubHeightC*y+1]+4)>>3 - If availTL is equal to TRUE, then for F set to F5, pLeftDsY[0] is derived as follows: pLeftDsY[0] = =F[1][0]*pY[-SubWidthC][ -1]+ +F[0][1]*pY[-1-SubWidthC][0]+ +F[1][1]*pY[-SubWidthC][0]+ +F[2][1]*pY[1-SubWidthC][0]+ +F[1][2]*pY[-SubWidthC][1]+4)>>3 - Otherwise, pDsY[x][0], for x=1..nTbW-1, is derived as follows, for F set to F3: pLeftDsY[0] = (F[0]*pY[-1-SubWidthC][0]+ +F[1]*pY[-SubWidthC][0]+ +F[2]*pY[1-SubWidthC][0]+ +2)>>2 - otherwise for F set to F6, the following applies: pLeftDsY[y] = =(F[0][1]*pY[-1-SubWidthC][SubHeightC*y]+ +F[0][2]*pY[-1-SubWidthC][SubHeightC*y+1]+ +F[1][1]*pY[-SubWidthC][SubHeightC*y]+ +F[1][2]*pY[-SubWidthC][SubHeightC*y+1]+ +F[2][1]*pY[1-SubWidthC][SubHeightC*y]+ +F[2][2]*pY[1-SubWidthC][SubHeightC*y+1]+4)>>3 / / Explanatory note: Steps 4 and 5 are implementations for obtaining downsampled luma reference samples of selected neighboring luma samples of a luma block using respective downsampling filters. 5. When numSampT is greater than 0, the downsampled adjacent top luma sample pTopDsY[x], for x=0..numSampT-1, is specified as follows: - If SubWidthC==1 and SubHeightC==1, the following is true: - pTopDsY[x]=pY[x][-1] for x=0..numSampT-1 - Otherwise, the following applies: - If sps_cclm_colocated_chroma_flag is equal to 1, the following is true: - pTopDsY[x] for x=1..numSampT-1 is derived as follows: - if bCTUboundary is equal to FALSE, then for F set to F5 the following is true: pTopDsY[x] = =(F[1][0]*pY[SubWidthC*x][ -1-SubHeightC]+ +F[0][1]*pY[SubWidthC*x-1][ -SubHeightC]+ +F[1][1]*pY[SubWidthC*x][ -SubHeightC]+ +F[2][1]*pY[SubWidthC*x+1][ -SubHeightC]+ +F[1][2]*pY[SubWidthC*x][1-SubHeightC]+4)>>3 - Otherwise (bCTUboundary is equal to TRUE), for F set to F3, the following is true: pTopDsY[x] = =(F[0]*pY[SubWidthC*x-1][ -1]+ +F[1]*pY[SubWidthC*x][ -1]+ +F[2]*pY[SubWidthC*x+1][ -1]+ +2)>>2 - pTopDsY[0] is derived as follows: - If availTL is equal to TRUE and bCTUboundary is equal to FALSE, then for F set to F5 the following is true: pTopDsY[0] = F[1][0]*pY[-1][ -1-SubHeightC]+ +F[0][1]*pY[-1][ -SubHeightC]+ +F[1][1]*pY[0][ -SubHeightC]+ +F[2][1]*pY[1][ -SubHeightC]++ +F[1][2]pY[-1][1-SubHeightC]++4)>>3 - Otherwise, if availTL is equal to TRUE and bCTUboundary is equal to TRUE, then for F set to F3, the following is true: pTopDsY[0] = =(F[0]*pY[-1][-1]+ +F[1]*pY[0][-1]+ +F[2]*pY[1][ -1]+ +2)>>2 - Otherwise, if availTL is equal to FALSE and bCTUboundary is equal to FALSE, then for F set to F3, the following is true: pTopDsY[0] = =(F[0]*pY[0][-1]+ +F[1]*pY[0][-2]+ +F[2]*pY[0][-1]+ +2)>>2 - Otherwise (availTL equals FALSE and bCTUboundary equals TRUE), the following is true: pTopDsY[0]=pY[0][ -1] - Otherwise, the following applies: - pTopDsY[x] for x=1..numSampT-1 is derived as follows: - if bCTUboundary is equal to FALSE, then for F set to F6, the following is true: pTopDsY[x] = =(F[0][1]*pY[SubWidthC*x-1][ -2]+ +F[0][2]*pY[SubWidthC*x-1][ -1]+ +F[1][1]*pY[SubWidthC*x][ -2]+ +F[1][2]*pY[SubWidthC*x][ -1]+ +F[2][1]*pY[SubWidthC*x+1][ -2]+ +F[2][2]*pY[SubWidthC*x+1][ -1]+4)>>3 - Otherwise (bCTUboundary is equal to TRUE), for F set to F3, the following is true: pTopDsY[x] = =(F[0]*pY[SubWidthC*y-1][ -1]+ +F[1]*pY[SubWidthC*y][ -1]+ +F[2]*pY[SubWidthC*y+1][ -1]+ +2)>>2 - pTopDsY[0] is derived as follows: - If availTL is equal to TRUE and bCTUboundary is equal to FALSE, then for F set to F6, the following is true: pTopDsY[0] = =(F[0][1]*pY[-1][ -2]+ +F[0][2]*pY[-1][-1]+ +F[1][1]*pY[0][ -2]+ +F[1][2]*pY[0][ -1]+ +F[2][1]*pY[1][ -2]+ +F[2][2]*pY[1][ -1]+4)>>3 - Otherwise, if availTL is equal to TRUE and bCTUboundary is equal to TRUE, then for F set to F3, the following is true: pTopDsY[0] = =(F[0]*pY[-1][ -1]+ +F[1]*pY[0][ -1]+ +F[2]*pY[1][ -1]+ +2)>>2 - Otherwise, if availTL is equal to FALSE and bCTUboundary is equal to FALSE, then for F set to F2 the following is true: pTopDsY[0]=(F[1]*pY[0][ -2]+F[0]*pY[0][ -1]+1)>>1 - Otherwise (availTL equals FALSE and bCTUboundary equals TRUE), the following is true: pTopDsY[0]=pY[0][ -1] / / Explanatory note: Steps 4 and 5 are implementations for obtaining downsampled luma reference samples of selected neighboring luma samples of a luma block by applying respective downsampling filters. 6. The variables nS, xS, and yS are derived as follows: - If predModeIntra is equal to INTRA_LT_CCLM, the following is true: nS=((availL&&availT)?Min(nTbW,nTbH):(availL?nTbH:nTbW)) xS=1<<(((nTbW>nTbH)&&availL&&availT)?(Log2(nTbW) -Log2(nTbH)):0) (8-192) yS=1<<(((nTbH>nTbW)&&availL&&availT)?(Log2(nTbH) -Log2(nTbW)):0) (8-193) - Otherwise, if predModeIntra is equal to INTRA_L_CCLM, the following is true: nS=numSampL xS=1 yS=1 - Otherwise (predModeIntra is equal to INTRA_T_CCLM), the following is true: nS=numSampT xS=1 yS=1 7. The variables minY, maxY, minC, and maxC are derived as follows: - The variable minY is 1<<(BitDepth Y )+1 and the variable maxY is set equal to -1. If availT is equal to TRUE, then the variables minY, maxY, minC, and maxC, for x=0..nS-1, are derived as follows: - If minY is greater than pTopDsY[x*xS], the following is true: minY=pTopDsY[x*xS] minC=p[x*xS][ -1] - if maxY is less than pTopDsY[x*xS], the following is true: maxY=pTopDsY[x*xS] maxC=p[x*xS][ -1] If availL is equal to TRUE, the variables minY, maxY, minC, and maxC, for y=0..nS-1, are derived as follows: - If minY is greater than pLeftDsY[y*yS], the following is true: minY=pLeftDsY[y*yS] minC=p[-1][y*yS] - If maxY is less than pLeftDsY[y*yS], the following is true: maxY=pLeftDsY[y*yS] maxC=p[-1][y*yS] 8. The variables a, b, and k are derived as follows: - If numSampL is equal to 0 and numSampT is equal to 0, the following is true: k=0 a=0 b=1<<(BitDepth C -1) - Otherwise, the following applies: diff=maxY-minY - If diff is not equal to 0, the following is true: diffC=maxC-minC x=Floor(Log2(diff)) normDiff=((diff<<4)>>x)&15 x+=(normDiff !=0)?1:0 y=Floor(Log2(Abs(diffC)))+1 a=(diffC*(divSigTable[normDiff]|8)+2y-1)>>y k=((3+xy)<1)?1:3+xy a=((3+xy)<1)?Sign(a)*15:a b=minC-((a*minY)>>k) Here, divSigTable[] is defined as follows: divSigTable[]={0,7,6,5,5,4,4,3,3,2,2,1,1,1,1,0} - Otherwise (diff is equal to 0), the following is true: k=0 a=0 b=minC / / Explanatory Note: Steps 6-8 are an implementation form for determining one or more linear model coefficients based on the downsampled luma reference sample of the selected adjacent luma sample and the chroma reference sample corresponding to the downsampled luma reference sample, specifically, the determination of the linear model coefficients is based on minY, maxY, minC, and maxC. / / 9. The predicted samples predSamples[x][y], where x=0..nTbW-1 and y=0..nTbH-1, are derived as follows: predSamples[x][y]=Clip1C(((pDsY[x][y]*a)>>k)+b) / / Explanatory Note: Step 9 is an implementation for obtaining predicted samples of chroma blocks corresponding to luma blocks based on the linear model coefficients and downsampled luma samples of reconstructed luma samples in the luma blocks.
[0307] In this disclosure, for a set of filters {F2, F3, F5, F6}, it should be noted that the single digit following "F" is an index used to represent different filters in the filter set. A filter is defined by one or more filter coefficients to be applied to corresponding samples. For example, if one or more downsampling filter coefficients to be applied to corresponding samples in F3 are the same as one or more downsampling filter coefficients to be applied to corresponding samples in F2, it can be understood that F3 and F2 are the same filter. For example, if F3[0]=1, F3[1]=2, F3[2]=1, and F2[0]=1, F2[1]=2, F2[2]=1, then F3=F2.
[0308] For example, if one or more downsampling filter coefficients to be applied to corresponding samples in F5 are different from one or more downsampling filter coefficients to be applied to corresponding samples in F5, it can be understood that F5 and F5 are different filters even though they have the same name. For example, if F5[0][1]=1, F5[1][1]=4, F5[2][1]=1, F5[1][0]=1, F5[1][2]=1, and F5[0][1]=0, F5[1][1]=8, F5[2][1]=0, F5[1][0]=0, F5[1][2]=0, then F5≠F5.
[0309] Note that filters with coefficient [1] exist, namely, the bypass filter, the 1D non-separable filter (F[i]), and the 2D non-separable filter (F[i][j]) of this disclosure.
[0310] Another embodiment describes a method for deriving CCLM parameters using up to four adjacent chroma samples and their corresponding downsampled luma samples.
[0311] Assuming the current chroma block has dimensions W×H, W′ and H′ are set as follows: When LM mode is applied (top and left templates are used in LM mode), W'=W, H'=H When LM-A mode is applied (only the above template is used in LM-A mode), W'=W+H When LM-L mode is applied (only the left template is used in LM-L mode), H'=H+W
[0312] The above neighboring samples (i.e., neighboring chroma samples above the current block) are denoted as S[0,-1]...S[W'-1,-1], and the left neighboring samples (i.e., neighboring chroma samples to the left of the current block) are denoted as S[-1,0]...S[-1,H'-1]. Here, S[x,y] denotes the sample at position (x,y), where (x,y) is measured relative to the top-left sample of the current block (i.e., the top-left sample of the block is marked as (0,0)). Then, the four neighboring chroma samples used to derive the CCLM parameters may be defined as follows (correspondingly, the positions of the four downsampled neighboring luma samples of the selected neighboring luma sample are given by: When LM mode is applied and both upper and left adjacent samples are available, S[W' / 4, -1], S[3W' / 4, -1], S[-1, H' / 4], S[-1, 3H' / 4] When LM-A mode is applied or only the upper adjacent samples are available, S[W' / 8, -1], S[3W' / 8, -1], S[5W' / 8, -1], S[7W' / 8, -1] S[-1, H' / 8], S[-1, 3H' / 8], S[-1, 5H' / 8], S[-1, 7H' / 8] when LM-L mode is applied or only the left adjacent sample is available
[0313] Each of the four downsampled adjacent luma samples is obtained by applying a respective downsampling filter to a part or the whole of the selected adjacent luma samples. The four downsampled adjacent luma samples corresponding to the four adjacent chroma samples selected above are obtained by applying a respective downsampling filter to the two smaller values x 0 A and x 1 A , as well as two larger values of x 0 B and x 1 B It is compared four times to find x 0 B and x1 B x 0 A and x 1 A Their corresponding chroma sample values are greater than y 0 A , y 1 A , y 0 B , and y 1 B Then, x A , x B , y A , and y B is derived as follows: x A =(x 0 A +x 1 A +1)>>1, x B =(x 0 B +x 1 B +1)>>1,y A =(y 0 A +y 1 A +1)>>1,y B =(y 0 B +y 1 B +1)>>1
[0314] In accordance with another exemplary embodiment presented in this specification, details of the process for performing intra prediction using a linear model (inter-component prediction of blocks) are described as follows, in the format of a portion of the VVC draft specification (the version of section 8.4.4.2.8 below differs from the version of section 8.4.4.2.8 above):
[0315] 8.4.4.2.8 INTRA_LT_CCLM, INTRA_L_CCLM, and INTRA_T_CCLM Intra Prediction Modes Specification
[0316] The inputs to this process are: - intra prediction mode predModeIntra, - the sample position (xTbC, yTbC) of the top-left sample of the current transform block relative to the top-left sample of the current picture, - variable nTbW, which specifies the transformation block width; - variable nTbH, which specifies the transformation block height, - chroma neighboring samples p[x][y], where x=-1, y=0..2*nTbH-1 and x=0..2*nTbW-1, y=-1.
[0317] The output of this process is the predicted samples predSamples[x][y], x=0..nTbW-1, y=0..nTbH-1.
[0318] The current luma position (xTbY, yTbY) is derived as follows: (xTbY,yTbY)=(xTbC<<(SubWidthC-1),yTbC<<(SubHeightC-1))
[0319] The variables availL, availT, and availTL are derived as follows: - The availability of the left adjacent sample derivation process for the block is called with the current chroma position (xCurr, yCurr) set equal to (xTbC, yTbC) and the adjacent chroma position (xTbC-1, yTbC) as input, and the output is assigned to availL. - The availability of upper adjacent sample derivation process for the block is called with the current chroma position (xCurr, yCurr) set equal to (xTbC, yTbC), and the adjacent chroma position (xTbC, yTbC-1) as input, and the output is assigned to availT. - The availability of the top-left neighboring sample derivation process for the block is called with the current chroma position (xCurr, yCurr) set equal to (xTbC, yTbC) and the neighboring chroma position (xTbC-1, yTbC-1) as input, and the output is assigned to availTL. - The number of available top-right adjacent chroma samples, numTopRight, is derived as follows: The variable numTopRight is set equal to 0, and availTR is set equal to TRUE. - When predModeIntra is equal to INTRA_T_CCLM, the following is true for x=nTbW..2*nTbW-1, until availTR is equal to FALSE or x is equal to 2*nTbW-1: - The availability derivation process for the block is called with the current chroma position (xCurr, yCurr) set equal to (xTbC, yTbC) and the neighbor chroma position (xTbC+x, yTbC-1) as input, and the output is assigned to availableTR. - When availableTR is equal to TRUE, numTopRight is incremented by 1. - The number of available bottom-left adjacent chroma samples, numLeftBelow, is derived as follows: The variable numLeftBelow is set equal to 0, and availLB is set equal to TRUE. - when predModeIntra is equal to INTRA_L_CCLM, the following is true for y=nTbH..2*nTbH-1, until availLB is equal to FALSE or y is equal to 2*nTbH-1: - The availability derivation process for the block is called with the current chroma position (xCurr, yCurr) set equal to (xTbC, yTbC) and the neighbor chroma position (xTbC-1, yTbC+y) as input, and the output is assigned to availableLB. - When availableLB is equal to TRUE, numLeftBelow is incremented by 1.
[0320] The number of available neighboring chroma samples above and to the right, numTopSamp, and the number of available neighboring chroma samples to the left and to the left, nLeftSamp, are derived as follows: - If predModeIntra is equal to INTRA_LT_CCLM, the following is true: numSampT=availT?nTbW:0 numSampL=availL?nTbH:0 - Otherwise, the following applies: numSampT=(availT&&predModeIntra==INTRA_T_CCLM)?(nTbW+Min(numTopRight,nTbH)):0 numSampL=(availL&&predModeIntra==INTRA_L_CCLM)?(nTbH+Min(numLeftBelow,nTbW)):0
[0321] The variable bCTUboundary is derived as follows: bCTUboundary=(yTbC&(1<<(CtbLog2SizeY-1) -1)==0)?TRUE:FALSE
[0322] The variable cntN and the array pickPosN[], where N is replaced by L and T, are derived as follows: - The variable numIs4N is set equal to ((availT && availL && predModeIntra == INTRA_LT_CCLM) ? 0:1). - The variable startPosN is set equal to numSampN>>(2+numIs4N). - The variable pickStepN is set equal to Max(1, numSampN>>(1+numIs4N)). - if availN is equal to TRUE and predModeIntra is equal to INTRA_LT_CCLM or INTRA_N_CCLM, cntN is set equal to Min(numSampN, (1+numIs4N)<<1) and pickPosN[pos] is set equal to (startPosN+pos*pickStepN), where pos=0..(cntN-1). - Otherwise cntN is set equal to 0.
[0323] The predicted samples predSamples[x][y], where x=0..nTbW-1 and y=0..nTbH-1, are derived as follows: - If both numSampL and numSampT are equal to 0, the following is true: predSamples[x][y]=1<<(BitDepth C -1) - Otherwise, the following ordered steps apply: 1. The co-located luma sample pY[x][y], where x=0..nTbW*SubWidthC-1, y=0..nTbH*SubHeightC-1, is set equal to the reconstructed luma sample before deblocking filtering at position (xTbY+x, yTbY+y). 2. The adjacent luma sample pY[x][y] is derived as follows: - When numSampL is greater than 0, the adjacent left luma sample pY[x][y], for x=-1..-3, y=0..SubHeightC*numSampL-1, is set equal to the reconstructed luma sample before deblocking filtering at position (xTbY+x, yTbY+y). - When numSampT is greater than 0, the adjacent upper luma sample pY[x][y], with x=0..SubWidthC*numSampT-1, y=-1,-2, is set equal to the reconstructed luma sample before deblocking filtering at position (xTbY+x, yTbY+y). - When availTL is equal to TRUE, the neighboring top-left luma sample pY[x][y], with x=-1, y=-1, -2, is set equal to the reconstructed luma sample before deblocking filtering at position (xTbY+x, yTbY+y). 3. The downsampled co-located luma samples pDsY[x][y], for x=0..nTbW-1, y=0..nTbH-1, are derived as follows: - If SubWidthC==1 and SubHeightC==1, the following is true: - pDsY[x][y] for x=1..nTbW-1 and y=1..nTbH-1 is derived as follows: pDstY[x][y]=pY[x][y] / / Clarification note: Just for clarification, no filter for YUV 4:4:4. When it is 4:4:4 (both SubWidthC and SubHeightC are equal to 1), no downsampling is needed, i.e. no filtering is performed. This can also be interpreted as a filter with coefficient [1], i.e. a bypass filter / / - Otherwise the following applies for the set of filters {F3,F5,F6}. / / Explanatory note: Here we define the coefficients of the filters when 4:2:0 or 4:2:2 (when neither SubWidthC nor SubHeightC are equal to 1), and F2 belongs to both the first and second sets of downsampling filters / / - F3[0]=1, F3[1]=2, F3[2]=1 - If SubWidthC==2 and SubHeightC==2, F5[0][1]=1, F5[1][1]=4, F3[2][1]=1, F5[1][0]=1, F5[1][2]=1 F6[0][1]=1, F6[1][1]=2, F6[2][1]=1 F6[0][2]=1, F6[1][2]=2, F6[2][2]=1 F2[0]=1, F2[1]=1 - Otherwise F5[0][1]=0, F5[1][1]=8, F3[2][1]=0, F5[1][0]=0, F5[1][2]=0 F6[0][1]=2, F6[1][1]=4, F6[2][1]=2 F6[0][2]=0, F6[1][2]=0, F6[2][2]=0 F2[0]=2, F2[1]=0 - If sps_cclm_colocated_chroma_flag is equal to 1, the following is true: - pDsY[x][y] for x=1..nTbW-1, y=1..nTbH-1 is derived by setting F to F5 as follows: pDsY[x][y]= (F[1][0]*pY[SubWidthC*x][SubHeightC*y-1]+ +F[0][1]*pY[SubWidthC*x-1][SubHeightC*y]+ +F[1][1]*pY[SubWidthC*x][SubHeightC*y]+ +F[2][1]*pY[SubWidthC*x+1][SubHeightC*y]+ +F[1][2]*pY[SubWidthC*x][SubHeightC*y+1]+4)>>3 / / Explanatory note: F5 corresponds to the first downsampling filter claimed / / - If availL is equal to TRUE, then for F set to F5, pDsY[0][y], for y=1..nTbH-1, is derived as follows: pDsY[0][y]= (F[1][0]*pY[0][SubHeightC*y-1]+ +F[0][1]*pY[-1][SubHeightC*y]+ +F[1][1]*pY[0][SubHeightC*y]+ +F[2][1]*pY[1][SubHeightC*y]+ +F[1][2]*pY[0][SubHeightC*y+1]+4)>>3 - Otherwise, pDsY[0][y], for y=1..nTbH-1, is derived as follows, for F set to F3: pDsY[0][y]= (F[0]*pY[0][SubHeightC*y-1]+ +F[1]*pY[0][SubHeightC*y]+ +F[2]*pY[0][SubHeightC*y+1]+ +2)>>2 - If availT is equal to TRUE, then pDsY[x][0], for x=1..nTbW-1, is derived as follows, for F set to F5: pDsY[x][0] = (F[1][0]*pY[SubWidthC*x][-1]+ +F[0][1]*pY[SubWidthC*x-1][0]+ +F[1][1]*pY[SubWidthC*x][0]+ +F[2][1]*pY[SubWidthC*x+1][0]+ +F[1][2]*pY[SubWidthC*x][1]+4)>>3 - Otherwise, pDsY[x][0], for x=1..nTbW-1, is derived as follows, for F set to F3: pDsY[x][0] = =(F[0]*pY[SubWidthC*x-1][0]+ +F[1]*pY[SubWidthC*x][0]+ +F[2]*pY[SubWidthC*x+1][0]+2)>>2 - If availL is equal to TRUE and availT is equal to TRUE, then pDsY[0][0] is derived as follows, with F set to F5: pDsY[0][0]= (F[1][0]*pY[0][-1]+ +F[0][1]*pY[-1][0]+ +F[1][1]*pY[0][0]+ +F[2][1]*pY[1][0]+ +F[1][2]*pY[0][1]+4)>>3 - Otherwise, if availL is equal to TRUE and availT is equal to FALSE, then pDsY[0][0] is derived as follows, for F set to F3: pDsY[0][0]= (F[0]*pY[-1][0]+ +F[1]*pY[0][0]+ +F[2]*pY[1][0]+ +2)>>2 - Otherwise, if availL is equal to FALSE and availT is equal to TRUE, then pDsY[0][0] is derived as follows, for F set to F3: pDsY[0][0]= (F[0]*pY[0][-1]+ +F[1]*pY[0][0]+ +F[2]*pY[0][1]+ +2)>>2 - If not (availL is equal to FALSE and availT is equal to FALSE), then pDsY[0][0] is derived as follows: pDsY[0][0]=pY[0][0] - Otherwise, the following applies: - pDsY[x][y], for x=1..nTbW-1, y=0..nTbH-1, with F set to F6, is derived as follows: pDsY[x][y]= (F[0][1]*pY[SubWidthC*x-1][SubHeightC*y]+ +F[0][2]*pY[SubWidthC*x-1][SubHeightC*y+1]+ +F[1][1]*pY[SubWidthC*x][SubHeightC*y]+ +F[1][2]*pY[SubWidthC*x][SubHeightC*y+1]+ +F[2][1]*pY[SubWidthC*x+1][SubHeightC*y]+ +F[2][2]*pY[SubWidthC*x+1][SubHeightC*y+1]+4)>>3 - If availL is equal to TRUE, then for F set to F6, pDsY[0][y], for y=0..nTbH-1, is derived as follows: pDsY[0][y]= (F[0][1]*pY[-1][SubHeightC*y]+ +F[0][2]*pY[-1][SubHeightC*y+1]+ +F[1][1]*pY[0][SubHeightC*y]+ +F[1][2]*pY[0][SubHeightC*y+1]+ +F[2][1]*pY[1][SubHeightC*y]+ +F[2][2]*pY[1][SubHeightC*y+1]+4)>>3 - Otherwise, pDsY[0][y], for y=0..nTbH-1, is derived as follows, for F set to F2: pDsY[0][y]= (F[0]*pY[0][SubHeightC*y]+ +F[1]*pY[0][SubHeightC*y+1]1)>>1 / / Step 3 is an implementation for obtaining downsampled luma samples of the reconstructed luma samples in the luma blocks of the current block using the respective downsampling filters. 4. When numSampL is greater than 0, the selected adjacent left chroma sample pSelC[idx], with idx=0..(cntL-1), is set equal to p[-1][pickPosL[idx]], and the selected downsampled adjacent left luma sample pSelDsY[idx], with idx=0..(cntL-1), is derived as follows: - The variable y is set equal to pickPosL[idx]. - If SubWidthC==1 and SubHeightC==1, the following is true: - pSelDsY[i]=pY[-1][y] - Otherwise, the following applies: - If sps_cclm_colocated_chroma_flag is equal to 1, the following is true: - For F set to F5 if y>0 || availTL==TRUE: pSelDsY[idx] = =F[1][0]*pY[-SubWidthC][SubHeightC*y-1]+ +F[0][1]*pY[-1-SubWidthC][SubHeightC*y]+ +F[1][1]*pY[-SubWidthC][SubHeightC*y]+ +F[2][1]*pY[1-SubWidthC][SubHeightC*y]+ +F[1][2]*pY[-SubWidthC][SubHeightC*y+1]+4)>>3 - Else, for F set to F3: pSelDsY[idx] = (F[0]*pY[-1-SubWidthC][0]+ +F[1]*pY[-SubWidthC][0]+ +F[2]*pY[1-SubWidthC][0]+ +2)>>2 - Otherwise, for F set to F6, the following is true: pSelDsY[idx] = =(F[0][1]*pY[-1-SubWidthC][SubHeightC*y]+ +F[0][2]*pY[-1-SubWidthC][SubHeightC*y+1]+ +F[1][1]*pY[-SubWidthC][SubHeightC*y]+ +F[1][2]*pY[-SubWidthC][SubHeightC*y+1]+ +F[2][1]*pY[1-SubWidthC][SubHeightC*y]+ +F[2][2]*pY[1-SubWidthC][SubHeightC*y+1]+4)>>3 / / Explanatory note: Steps 4 and 5 are implementations for obtaining downsampled luma reference samples of selected neighboring luma samples of a luma block using respective downsampling filters. 5. When numSampT is greater than 0, the selected adjacent top chroma sample pSelC[idx] is set equal to p[pickPosT[idx-cntL]][-1], where idx=cntL..(cntL+cntT-1), and the downsampled adjacent top luma sample pSelDsY[idx], where idx=cntL..cntL+cntT-1, is derived as follows: - The variable x is set equal to pickPosT[idx-cntL]. - If SubWidthC==1 and SubHeightC==1, the following is true: - pSelDsY[idx]=pY[x][-1] - Otherwise, the following applies: - If sps_cclm_colocated_chroma_flag is equal to 1, the following is true: - if x>0: - if bCTUboundary is equal to FALSE, then for F set to F5 the following is true: pSelDsY[idx] = =(F[1][0]*pY[SubWidthC*x][ -1-SubHeightC]+ +F[0][1]*pY[SubWidthC*x-1][ -SubHeightC]+ +F[1][1]*pY[SubWidthC*x][ -SubHeightC]+ +F[2][1]*pY[SubWidthC*x+1][ -SubHeightC]+ +F[1][2]*pY[SubWidthC*x][1-SubHeightC]+4)>>3 - Otherwise (bCTUboundary is equal to TRUE), for F set to F3, the following is true: pSelDsY[idx] = =(F[0]*pY[SubWidthC*x-1][ -1]+ +F[1]*pY[SubWidthC*x][ -1]+ +F[2]*pY[SubWidthC*x+1][ -1]+ +2)>>2 - Otherwise: - If availTL is equal to TRUE and bCTUboundary is equal to FALSE, then for F set to F5 the following is true: pSelDsY[idx] = F[1][0]*pY[-1][ -1-SubHeightC]+ +F[0][1]*pY[-1][-SubHeightC]+ +F[1][1]*pY[0][-SubHeightC]+ +F[2][1]*pY[1][-SubHeightC]+ +F[1][2]pY[-1][1-SubHeightC]+4)>>3 - Otherwise, if availTL is equal to TRUE and bCTUboundary is equal to TRUE, then for F set to F3, the following is true: pSelDsY[idx] = =(F[0]*pY[-1][-1]+ +F[1]*pY[0][-1]+ +F[2]*pY[1][-1]+ +2)>>2 (8-182) - Otherwise, if availTL is equal to FALSE and bCTUboundary is equal to FALSE, then for F set to F3, the following is true: pSelDsY[idx] = =(F[0]*pY[0][-1]+ +F[1]*pY[0][-2]+ +F[2]*pY[0][-1]+ +2)>>2 - Otherwise (availTL equals FALSE and bCTUboundary equals TRUE), the following is true: pSelDsY[idx]=pY[0][-1] - Otherwise, the following applies: - if x>0: - if bCTUboundary is equal to FALSE, then for F set to F6, the following is true: pSelDsY[idx] = =(F[0][1]*pY[SubWidthC*x-1][-2]+ +F[0][2]*pY[SubWidthC*x-1][-1]+ +F[1][1]*pY[SubWidthC*x][-2]+ +F[1][2]*pY[SubWidthC*x][-1]+ +F[2][1]*pY[SubWidthC*x+1][-2]+ +F[2][2]*pY[SubWidthC*x+1][-1]+4)>>3 - Otherwise (bCTUboundary is equal to TRUE), for F set to F3, the following is true: pSelDsY[idx] = =(F[0]*pY[SubWidthC*y-1][-1]+ +F[1]*pY[SubWidthC*y][-1]+ +F[2]*pY[SubWidthC*y+1][-1]+ +2)>>2 - Otherwise: - If availTL is equal to TRUE and bCTUboundary is equal to FALSE, then for F set to F6, the following is true: pSelDsY[idx] = =(F[0][1]*pY[-1][-2]+ +F[0][2]*pY[-1][-1]+ +F[1][1]*pY[0][-2]+ +F[1][2]*pY[0][-1]+ +F[2][1]*pY[1][-2]+ +F[2][2]*pY[1][-1]+4)>>3 - Otherwise, if availTL is equal to TRUE and bCTUboundary is equal to TRUE, then for F set to F3, the following is true: pSelDsY[idx] = =(F[0]*pY[-1][-1]+ +F[1]*pY[0][-1]+ +F[2]*pY[1][-1]+ +2)>>2 - Otherwise, if availTL is equal to FALSE and bCTUboundary is equal to FALSE, then for F set to F2 the following is true: pSelDsY[idx]=(F[1]*pY[0][-2]+F[0]*pY[0][-1]+1)>>1 - Otherwise (availTL equals FALSE and bCTUboundary equals TRUE), the following is true: pSelDsY[idx]=pY[0][-1] / / Explanatory note: Steps 4 and 5 are implementations for obtaining downsampled luma reference samples of selected neighboring luma samples of a luma block by applying respective downsampling filters. 6. When cntT+cntL is not equal to 0, the variables minY, maxY, minC, and maxC are derived as follows: - when cntT+cntL is equal to 2, set pSelComp[3] equal to pSelComp[0], set pSelComp[2] equal to pSelComp[1], set pSelComp[0] equal to pSelComp[1], set pSelComp[1] equal to pSelComp[3], and Comp is replaced by DsY and C. - The arrays minGrpIdx[] and maxGrpIdx[] are set as minGrpIdx[0]=0, minGrpIdx[1]=2, maxGrpIdx[0]=1, maxGrpIdx[1]=3. - If pSelDsY[minGrpIdx[0]]>pSelDsY[minGrpIdx[1]], then Swap(minGrpIdx[0], minGrpIdx[1]). - If pSelDsY[maxGrpIdx[0]]>pSelDsY[maxGrpIdx[1]] then Swap(maxGrpIdx[0], maxGrpIdx[1]). - If pSelDsY[minGrpIdx[0]]>pSelDsY[maxGrpIdx[1]], then Swap(minGrpIdx, maxGrpIdx). - If pSelDsY[minGrpIdx[1]]>pSelDsY[maxGrpIdx[0]], then Swap(minGrpIdx[1], maxGrpIdx[0]). - maxY=( pSelDsY[maxGrpIdx[0]]+pSelDsY[maxGrpIdx[1]]+1)>>1 - maxC=(pSelC[maxGrpIdx[0]]+pSelC[maxGrpIdx[1]]+1)>>1 - minY=(pSelDsY[minGrpIdx[0]]+pSelDsY[minGrpIdx[1]]+1)>>1 - minC=(pSelC[minGrpIdx[0]]+pSelC[minGrpIdx[1]]+1)>>1 7. The variables a, b, and k are derived as follows: - If numSampL is equal to 0 and numSampT is equal to 0, the following is true: k=0 a=0 b=1<<(BitDepth C -1) - Otherwise, the following applies: diff=maxY-minY - If diff is not equal to 0, the following is true: diffC=maxC-minC x=Floor(Log2(diff)) normDiff=((diff<<4)>>x)&15 x+=(normDiff !=0)?1:0 y=Floor(Log2(Abs(diffC)))+1 a=(diffC*(divSigTable[normDiff]|8)+2y-1)>>y k=((3+xy)<1)?1:3+xy a=((3+xy)<1)?Sign(a)*15:a b=minC-((a*minY)>>k) Here, divSigTable[] is defined as follows: divSigTable[]={0,7,6,5,5,4,4,3,3,2,2,1,1,1,1,0} - Otherwise (diff is equal to 0), the following is true: k=0 a=0 b=minC / / Explanatory Note: Steps 6-7 are an implementation form for determining one or more linear model coefficients based on the downsampled luma reference sample of the selected adjacent luma sample and the chroma reference sample corresponding to the downsampled luma reference sample, specifically, the determination of the linear model coefficients is based on minY, maxY, minC, and maxC. / / 8. The predicted samples predSamples[x][y], where x=0..nTbW-1 and y=0..nTbH-1, are derived as follows: predSamples[x][y]=Clip1C(((pDsY[x][y]*a)>>k)+b) / / Explanatory note: Step 8 is an implementation for obtaining predicted samples of a chroma block corresponding to a luma block based on the linear model coefficients and the downsampled luma samples of the reconstructed luma samples in the luma block.
[0324] FIG. 12 illustrates a device for performing intra prediction using a linear model according to another aspect of the present disclosure. The device 1200 includes: A determining unit 1201 configured to determine a set of downsampling filters based on chroma format information, the chroma format information indicating a chroma format of a picture to which a current block belongs; a filtering unit 1203 configured to obtain downsampled luma samples of the reconstructed luma samples in a luma block of the current block and downsampled luma reference samples of the selected luma reference samples (or selected luma neighboring samples) of the luma block using a respective downsampling filter in (selected from) a set of downsampling filters; a linear model derivation unit 1205 configured to determine one or more linear model coefficients based on the downsampled luma reference samples and chroma reference samples corresponding to the downsampled luma reference samples; and a prediction unit 1207 configured to obtain prediction samples of a chroma block corresponding to the luma block based on the linear model coefficients and the downsampled luma samples of the reconstructed luma samples in the luma block.
[0325] Correspondingly, in one example, the exemplary structure of the device 1200 may correspond to the encoder 20 of Figure 2. In another example, the exemplary structure of the device 1200 may correspond to the decoder 30 of Figure 3.
[0326] In another example, the exemplary structure of the device 1200 may correspond to the intra prediction unit 254 of FIG. 2. In another example, the exemplary structure of the device 1200 may correspond to the intra prediction unit 354 of FIG.
[0327] The present disclosure provides the following further aspects.
[0328] According to a first aspect, the present disclosure relates to a method for intra prediction using a linear model, the method being executed by a coding device, in particular a device for intra prediction. The method comprises: - determining a filter for luma samples (such as each luma sample) belonging to a block (i.e., internal samples of the current block) based on the chroma format of the picture to which the current block belongs, in particular, different luma samples may correspond to different filters.
[0329] Basically depending on if it's on the border or not. - At the position of the luma samples (e.g. each luma sample) belonging to the current block, apply the determined filter to the area of the reconstructed luma samples to generate the filtered reconstructed luma samples (Rec' L [x, y], etc.) - obtaining a set of luma samples based on the filtered reconstructed luma samples, the set being used as an input for deriving a linear model; and Performing inter-component prediction (such as inter-component luma-to-chroma prediction or CCLM prediction) based on the linear model coefficients of the linear model derivation and the filtered reconstructed luma samples.
[0330] This disclosure relates to luma filters in CCLM. This disclosure relates to filtering luma samples. This disclosure relates to filter selection performed inside CCLM.
[0331] CCLM refers to chroma prediction, which uses the reconstructed luma to predict the chroma signal.
[0332] In a possible implementation form of the method according to the first aspect itself, determining the filter comprises: determining a filter based on a position of the luma sample within the current block and a chroma format; or determining respective filters for the luma samples belonging to the current block based on their respective positions within the current block and on the chroma format. It may be appreciated that if neighboring samples of the current block are available, the filter may also use them to filter boundary areas of the current block.
[0333] In a possible implementation form of the method according to the first aspect itself, determining the filter comprises: Chroma format of the picture to which the current block belongs, The position of the luma sample within the current block, The number of luma samples that belong to the current block, The width and height of the current block, and The position of the subsampled chroma sample relative to the luma sample in the current block. determining a filter based on one or more of:
[0334] In a possible implementation form of the method according to the first aspect itself, when the subsampled chroma samples are not co-located with the corresponding luma samples, a first relationship between the plurality of filters and the width and height values of the current block (such as in Table 4) is used for determining the filters; When the subsampled chroma samples are co-located with the corresponding luma samples, a second or third relationship between the filters and the width and height values of the current block (such as either Table 2 or Table 3) is used for the filter determination.
[0335] In a possible implementation form of the method according to the first aspect itself, a second or third relationship (such as one of Table 2 or Table 3) between the multiple filters and the width and height values of the current block is determined based on the number of luma samples belonging to the current block.
[0336] In a possible implementation form of the method according to the first aspect itself, when the chroma components of the current block are not subsampled, the filter comprises non-zero coefficients that are horizontally and vertically adjacent to the position of the filtered reconstructed luma sample. (
[0337]
number
[0338] etc., the center position with coefficient "4" corresponds to the position of the filtered reconstructed luma sample)
[0339] In a possible implementation form of the method according to the first aspect itself, the area of reconstructed luma samples comprises a plurality of reconstructed luma samples relative to a position of the filtered reconstructed luma samples, the position of the filtered reconstructed luma samples corresponds to a position of a luma sample belonging to the current block, and the position of the filtered reconstructed luma samples is inside a luma block of the current block.
[0340] In a possible implementation form of the method according to the first aspect itself, the area of reconstructed luma samples includes a plurality of reconstructed luma samples at positions horizontally and vertically adjacent to a position of the filtered reconstructed luma sample, the positions of the filtered reconstructed luma samples correspond to positions of luma samples belonging to a current block, and the positions of the filtered reconstructed luma samples are inside the current block (such as the current luma block or the luma components of the current block). For example, the positions of the filtered reconstructed luma samples are inside the current block (right part of Figure 8, applying a filter to the luma samples).
[0341] In a possible implementation form of the method according to the first aspect itself, the chroma format comprises a YCbCr 4:4:4 chroma format, a YCbCr 4:2:0 chroma format, a YCbCr 4:2:2 chroma format, or monochrome.
[0342] In a possible implementation form of the method according to the first aspect itself, the set of luma samples used as input for the linear model derivation is Filtered reconstructed luma samples (Rec' L [x,y]).
[0343] In a possible implementation form of the method according to the first aspect itself, the predictor for the current chroma block is pred C (i,j)=α·rec L '(i,j)+β is obtained based on
[0344] Here, pred C (i,j) represents a chroma sample, rec L (i,j) represents the corresponding reconstructed luma sample.
[0345] In a possible implementation form of the method according to the first aspect itself, the linear model is a multi-way linear model (MDLM) and the linear model coefficients are used to obtain the MDLM.
[0346] According to a second aspect of the present disclosure, there is provided a method for intra prediction using a linear model, the method comprising: - determining a filter for a luma component of the current block based on the chroma format of the picture to which the current block belongs; - applying the determined filter to an area of reconstructed luma samples of the luma component of the current block and to luma samples at selected positions adjacent to the current block (one or several rows / columns adjacent to the left or upper side of the current block) to obtain filtered reconstructed luma samples (e.g. filtered reconstructed luma samples inside the current block (e.g. luma component of the current block)); Based on the filtered reconstructed luma samples as inputs of a linear model derivation (e.g., the set of luma samples includes filtered reconstructed luma samples inside the current block and filtered neighboring luma samples outside the current block, e.g., the determined filter may also be applied to the neighboring luma samples outside the current block), obtaining linear model coefficients; and performing inter-component prediction based on the obtained linear model coefficients and the filtered reconstructed luma samples of the current block (e.g., the filtered reconstructed luma samples inside the current block (e.g., the luma components of the current block)) to obtain a predictor for the current chroma block.
[0347] In a possible implementation form of the method according to the second aspect itself, determining the filter comprises: determining a filter based on a position of the luma sample within the current block and a chroma format; or Determining respective filters for a plurality of luma samples belonging to the current block based on respective positions of the luma samples within the current block and a chroma format.
[0348] In a possible implementation form of the method according to the second aspect itself, determining the filter comprises: Subsampling ratio information (such as SubWidthC and SubHeightC, which can be obtained from a table according to the chroma format of the picture to which the current block belongs); The chroma format of the picture to which the current block belongs (e.g., the chroma format is used to obtain the subsampling ratio information (e.g., SubWidthC and SubHeightC)), The position of the luma sample within the current block, The number of luma samples that belong to the current block, The width and height of the current block, and / or The position of the subsampled chroma sample relative to the luma sample in the current block. determining a filter based on one or more of:
[0349] In any of the above-mentioned implementations of the second aspect or a possible implementation form of the method according to the second aspect itself, when a subsampled chroma sample is not co-located with a corresponding luma sample, a first pre-defined relationship (such as Table 4) between the multiple filters and subsampling ratio information (such as SubWidthC and SubHeightC, or width and height values of the current block) is used for determining the filters, and / or When a subsampled chroma sample is co-located with the corresponding luma sample, a second or third pre-defined relationship (such as either Table 2 or Table 3) between multiple filters and subsampling ratio information (such as SubWidthC and SubHeightC, or the width and height values of the current block) is used for filter determination.
[0350] In any of the aforementioned implementation forms of the second aspect or a possible implementation form of the method according to the second aspect itself, a second or third relationship (such as one of Table 2 or Table 3) between the multiple filters and subsampling ratio information (such as SubWidthC and SubHeightC, or the width and height values of the current block) is determined based on the number of several luma samples (such as available luma samples) belonging to the current block.
[0351] In any of the above mentioned implementations of the second aspect or in a possible implementation form of the method according to the second aspect itself, the filter is conditionally determined as follows: If the first condition (such as subsampling ratio information obtained from a table defined herein, such as SubWidthC==1 and SubHeightC==1) is not met, the following applies for the set of filters {F3, F5, F6}: F3[0]=1, F3[1]=2, F3[2]=1 If the second condition is met (e.g., subsampling ratio information obtained from a table, such as SubWidthC==2 and SubHeightC==2), F5[0][1]=1, F5[1][1]=4, F3[2][1]=1, F5[1][0]=1, F5[1][2]=1 F6[0][1]=1, F6[1][1]=2, F6[2][1]=1 F6[0][2]=1, F6[1][2]=2, F6[2][2]=1 F2[0]=1, F2[1]=1 Otherwise (for example, if the second condition (subsampling ratio information from the table, such as SubWidthC==2 and SubHeightC==2) is not met), F5[0][1]=0, F5[1][1]=8, F5[2][1]=0, F5[1][0]=0, F5[1][2]=0 F6[0][1]=2, F6[1][1]=4, F6[2][1]=2 F6[0][2]=0, F6[1][2]=0, F6[2][2]=0 F2[0]=2, F2[1]=0
[0352] In any of the aforementioned implementation forms of the second aspect or in a possible implementation form of the method according to the second aspect itself, when the chroma samples of the current block are not subsampled, the filter comprises non-zero coefficients that are horizontally and / or vertically adjacent to the position of the filtered reconstructed luma sample. (
[0353]
number
[0354] etc., the center position with coefficient "4" corresponds to the position of the filtered reconstructed luma sample)
[0355] In any of the aforementioned implementation forms of the second aspect or a possible implementation form of the method according to the second aspect itself, the area of reconstructed luma samples includes a plurality of reconstructed luma samples relative to a position of the filtered reconstructed luma samples, the positions of the filtered reconstructed luma samples correspond to positions of luma samples belonging to a block, and the positions of the filtered reconstructed luma samples are inside a luma block of the block.
[0356] In any of the aforementioned implementation forms of the second aspect or a possible implementation form of the method according to the second aspect itself, the area of reconstructed luma samples includes a plurality of reconstructed luma samples at positions horizontally and / or vertically adjacent to a position of the filtered reconstructed luma sample, the position of the filtered reconstructed luma sample corresponds to a position of a luma sample belonging to a block, and the position of the filtered reconstructed luma sample is inside the block (such as the current luma block or a luma component of the current block).
[0357] In any of the aforementioned implementation forms of the second aspect or a possible implementation form of the method according to the second aspect itself, the chroma format comprises a YCbCr 4:4:4 chroma format, a YCbCr 4:2:0 chroma format, a YCbCr 4:2:2 chroma format, or monochrome.
[0358] In any of the above-mentioned implementations of the second aspect or a possible implementation form of the method according to the second aspect itself, the set of luma samples used as input for the linear model derivation is Filtered reconstructed luma samples (Rec' L [x,y]).
[0359] In any of the above-mentioned implementations of the second aspect or a possible implementation form of the method according to the second aspect itself, the predictor for the current chroma block is pred C (i,j)=α·rec L '(i,j)+β is obtained based on
[0360] Here, pred C (i,j) represents a chroma sample, rec L (i,j) represents the corresponding reconstructed value of the luma sample (e.g., the position of the corresponding reconstructed luma sample is inside the current block), and α and β represent the linear model coefficients.
[0361] In any of the aforementioned implementation forms of the second aspect or a possible implementation form of the method according to the second aspect itself, the linear model is a multi-way linear model (MDLM) and the linear model coefficients are used to obtain the MDLM.
[0362] According to a third aspect of the present disclosure, there is provided a method of encoding implemented by an encoding device, the method comprising: performing intra prediction using a linear model (such as a component-by-component linear model (CCLM) or a multi-way linear model (MDLM)) as described in this disclosure; and generating a bitstream including a plurality of syntax elements, the plurality of syntax elements including a syntax element indicating a selection of a filter for luma samples belonging to the block (such as a selection of a luma filter of the CCLM, in particular an SPS flag such as sps_cclm_colocated_chroma_flag).
[0363] In a possible implementation form of the method according to the third aspect itself, when the value of the syntax element is 1 or true, the filter is not applied to the luma samples for determining and predicting the linear model, When the value of the syntax element is 0 or false, the filter is applied to the luma samples for linear model determination and prediction.
[0364] According to a fourth aspect of the present disclosure, there is provided a method of decoding implemented by a decoding device, the method comprising: - parsing a plurality of syntax elements from the bitstream, the plurality of syntax elements including a syntax element indicating a filter selection for luma samples belonging to the block (such as a luma filter of CCLM, in particular a selection of an SPS flag such as sps_cclm_colocated_chroma_flag); and performing intra prediction using a depicted linear model (such as CCLM) as described in this disclosure.
[0365] In a possible implementation form of the method according to the fourth aspect itself, when the value of the syntax element is 0 or false, the filter is applied to the luma samples for determining and predicting the linear model, When the value of the syntax element is 1 or true, the filter is not applied to the luma samples for linear model determination and prediction.
[0366] According to a fifth aspect of the present disclosure, there is provided an apparatus for intra prediction using a linear model, the apparatus comprising: - a determination unit configured to determine a filter for luma samples belonging to a block based on a chroma format of a picture to which the current block belongs; - a filtering unit configured to apply the determined filter to an area of the reconstructed luma samples at a position of the luma samples belonging to the current block to obtain filtered reconstructed luma samples; - an acquisition unit configured to acquire a set of luma samples to be used as an input for deriving a linear model based on the filtered reconstructed luma samples; a prediction unit configured to perform inter-component prediction based on the linear model coefficients of the linear model derivation and the filtered reconstructed luma samples.
[0367] In any of the above-mentioned implementation forms of the fifth aspect or a possible implementation form of a device according to the fifth aspect itself, the number of filtered reconstructed samples is equal to or greater than the size of the current luma block.
[0368] In any of the above-mentioned implementations of the fifth aspect or a possible implementation form of a device according to the fifth aspect itself, CCLM is performed for the downsampled reconstructed samples.
[0369] In any of the above-mentioned implementation forms of the fifth aspect or a possible implementation form of a device according to the fifth aspect itself, when the current chroma block is at the upper boundary, only one row of reconstructed adjacent luma samples is used to obtain a filtered reconstructed sample.
[0370] In any of the above-mentioned implementation forms of the fifth aspect or a possible implementation form of the device according to the fifth aspect itself, the linear model is a multi-directional linear model (MDLM), and the linear model coefficients are used to obtain the MDLM.
[0371] In any of the aforementioned implementation forms of the fifth aspect or a possible implementation form of a device according to the fifth aspect itself, the CCLM or MDLM parameter derivation is performed for filtered reconstructed samples belonging only to the top template of the current luma block, or only to the left template of the current luma block, or the reconstructed samples belonging to both the top template of the current luma block and the left template of the current luma block.
[0372] In any of the aforementioned implementation forms of the fifth aspect or a possible implementation form of a device according to the fifth aspect itself, luma samples at selected positions adjacent to the current block, being samples in an adjacent sample row above the current block and / or in an adjacent sample column to the left of the current block, are equally spaced apart by a spacing / distance / number of pixels between them.
[0373] In any of the above-mentioned implementations of the fifth aspect or a possible implementation form of a device according to the fifth aspect itself, the selected position adjacent to the current block is denoted by: When LM mode is applied and both upper and left adjacent samples are available, S[W' / 4, -1], S[3W' / 4, -1], S[-1, H' / 4], S[-1, 3H' / 4] When LM-A mode is applied or only the upper adjacent samples are available, S[W' / 8, -1], S[3W' / 8, -1], S[5W' / 8, -1], S[7W' / 8, -1] When LM-L mode is applied or only the left adjacent sample is available, S[-1, H' / 8], S[-1, 3H' / 8], S[-1, 5H' / 8], S[-1, 7H' / 8]
[0374] A sixth aspect of a decoder (30), comprising processing circuitry for performing a method according to any one of the first to third aspects.
[0375] A seventh aspect of a computer program product comprising program code for performing a method according to any one of the first to third aspects.
[0376] An eighth aspect of the decoder, which is and a non-transitory computer-readable storage medium coupled to the processor and storing programming for execution by the processor, the programming, when executed by the processor, configuring the decoder to perform a method according to any one of the first to third aspects.
[0377] A ninth aspect of the encoder, which is and a non-transitory computer-readable storage medium coupled to the processor and storing programming for execution by the processor, the programming, when executed by the processor, configuring the encoder to perform a method according to any one of the first to third aspects.
[0378] A tenth aspect of a non-transitory computer-readable medium carrying program code that, when executed by a computing device, causes the computing device to perform a method according to any one of the first to third aspects.
[0379] An eleventh aspect of an encoder (20), comprising a processing circuit for performing a method according to any one of the first to third aspects.
[0380] Based on the above, the embodiments disclosed herein have the following technical advantages: The embodiments disclosed herein take into account the chroma format of a picture when predicting chroma samples from luma samples. By selecting a filter set based on the chroma format, the flaws of previous designs are eliminated, leading to a reduction in prediction error and thus a more accurate chroma prediction. The technical consequence of a smaller prediction error is a reduction in the residual signal energy. Coding methods may exploit this reduction in the residual signal energy to reduce distortion of the reconstructed signal, to reduce the bit rate required to encode the residual signal, or both to reduce distortion and to reduce the bit rate. These technical effects achieved by the embodiments presented herein improve the overall compression performance of the coding method.
[0381] In addition, the filters disclosed herein have the following two properties: - The number of taps in the horizontal and vertical directions does not exceed 3. - The coefficient values are powers of two.
[0382] The first property allows the region accessed for filtering to not exceed 3 samples (the size that the smallest possible non-phase-shifting filter supports). The second property (coefficients that are powers of 2) allows the filter to be implemented without multiplications. Instead, the filter may be implemented using left shifts by a constant value, which requires minimal complexity in the hardware design.
[0383] None of the prior art has proposed a practical FIR (Finite Impulse Response) filter with the above properties. None of the FIR filters in the art can provide the same smoothing properties or have the same simple implementation as the one disclosed herein.
[0384] The following is a description of the application of the encoding and decoding methods as illustrated in the above embodiments and the systems using them.
[0385] 13 is a block diagram showing a content supply system 3100 for realizing a content distribution service. The content supply system 3100 includes a capture device 3102, a terminal device 3106, and optionally a display 3126. The capture device 3102 communicates with the terminal device 3106 via a communication link 3104. The communication link may include the communication channel 13 described above. The communication link 3104 includes, but is not limited to, WIFI, Ethernet, cable, wireless (3G / 4G / 5G), USB, or any type of combination thereof, etc.
[0386] The capture device 3102 may generate data and encode the data by the encoding method as shown in the above embodiment. Alternatively, the capture device 3102 may deliver the data to a streaming server (not shown in the figure), which encodes the data and transmits the encoded data to the terminal device 3106. The capture device 3102 includes, but is not limited to, a camera, a smartphone or pad, a computer or laptop, a video conferencing system, a PDA, an in-vehicle device, or any combination thereof. For example, the capture device 3102 may include a source device 12 as described above. When the data includes video, the video encoder 20 included in the capture device 3102 may actually perform the video encoding process. When the data includes audio (i.e., voice), the audio encoder included in the capture device 3102 may actually perform the audio encoding process. In some practical scenarios, the capture device 3102 delivers the encoded video data and audio data by multiplexing them together. In other practical scenarios, for example in a video conferencing system, the encoded audio data and the encoded video data are not multiplexed. The capture device 3102 delivers the encoded audio data and the encoded video data separately to the terminal device 3106 .
[0387] In the content supply system 3100, the terminal device 310 receives and reproduces the encoded data. The terminal device 3106 can be a device with data receiving and restoring capabilities, such as a smartphone or pad 3108, a computer or laptop 3110, a network video recorder (NVR) / digital video recorder (DVR) 3112, a TV 3114, a set-top box (STB) 3116, a video conferencing system 3118, a video surveillance system 3120, a personal digital assistant (PDA) 3122, an in-vehicle device 3124, or any combination thereof, capable of decoding the above-mentioned encoded data. For example, the terminal device 3106 can include a destination device 14 as described above. When the encoded data includes video, the video decoder 30 included in the terminal device performs video decoding preferentially. When the encoded data includes audio, the audio decoder included in the terminal device performs audio decoding preferentially.
[0388] In a terminal device with a display, such as a smartphone or pad 3108, a computer or laptop 3110, a network video recorder (NVR) / digital video recorder (DVR) 3112, a TV 3114, a personal digital assistant (PDA) 3122, or an in-vehicle device 3124, the terminal device can feed the decoded data to the display. In a terminal device without a display, such as an STB 3116, a video conferencing system 3118, or a video conferencing system 3120, an external display 3126 is connected to the terminal device to receive and show the decoded data.
[0389] When each device in the system performs encoding or decoding, a picture encoding device or a picture decoding device as shown in the above embodiments may be used.
[0390] 14 is a diagram showing an example structure of a terminal device 3106. After the terminal device 3106 receives a stream from the capture device 3102, a protocol progression unit 3202 analyzes the transmission protocol of the stream. The protocol includes, but is not limited to, Real Time Streaming Protocol (RTSP), HyperText Transfer Protocol (HTTP), HTTP Live Streaming Protocol (HLS), MPEG-DASH, Real Time Transport Protocol (RTP), Real Time Messaging Protocol (RTMP), or any kind of combination thereof, etc.
[0391] After the protocol processing unit 3202 processes the stream, a stream file is generated. The file is output to the demultiplexing unit 3204. The demultiplexing unit 3204 can separate the multiplexed data into encoded audio data and encoded video data. As described above, in some practical scenarios, for example in a video conferencing system, the encoded audio data and the encoded video data are not multiplexed. In this situation, the encoded data is sent to the video decoder 3206 and the audio decoder 3208 without passing through the demultiplexing unit 3204.
[0392] Through the demultiplexing process, a video elementary stream (ES), an audio ES, and optionally subtitles are generated. The video decoder 3206, including the video decoder 30 as described in the above embodiment, decodes the video ES by the decoding method as shown in the above embodiment to generate video frames, and feeds this data to the synchronization unit 3212. The audio decoder 3208 decodes the audio ES to generate audio frames, and feeds this data to the synchronization unit 3212. Alternatively, the video frames may be stored in a buffer (not shown in Figure Y) before feeding them to the synchronization unit 3212. Similarly, the audio frames may be stored in a buffer (not shown in Figure Y) before feeding them to the synchronization unit 3212.
[0393] The synchronization unit 3212 synchronizes video and audio frames and provides the video / audio to a video / audio display 3214. For example, the synchronization unit 3212 synchronizes the presentation of video and audio information. The information may be coded in a syntax using timestamps for the presentation of the coded audio and visual data and timestamps for the delivery of the data stream itself.
[0394] If subtitles are included in the stream, the subtitle decoder 3210 decodes the subtitles, synchronizes it with the video and audio frames, and provides the video / audio / subtitles to the video / audio / subtitle display 3216.
[0395] The present invention is not limited to the above-mentioned system, and either the picture encoding device or the picture decoding device in the above-mentioned embodiments may be incorporated into other systems, for example, a vehicle system.
[0396] Mathematical Operators The mathematical operators used in this application are similar to those used in the C programming language. However, the results of integer division and arithmetic shift operations are more precisely defined, and additional operations such as exponential and real-valued division are defined. In general, the numbering and counting notation starts at 0, e.g., "first" is equivalent to 0th, "second" is equivalent to 1st, etc.
[0397] Arithmetic Operators The following arithmetic operators are defined as follows: + Add - Subtraction (two-argument operator) or negation (unary prefix operator) * Multiplication, including matrix multiplication x y Exponent. Specifies x to the power of y. In other contexts, such notation is used for superscripts that are not intended to be interpreted as exponents. / Integer division with truncation of the result towards 0. For example, 7 / 4 and -7 / -4 truncate towards 1, and -7 / 4 and 7 / -4 truncate towards -1. ÷ Used to denote division in mathematical expressions where truncation or rounding is not intended.
[0398]
number
[0399] Used to denote division in mathematical expressions where truncation or rounding is not intended.
[0400]
number
[0401] The addition of f(i), for i taking all integer values from x to y inclusive. x%y Modulus. The remainder when x is divided by y, defined only for integers x and y, x>0 and y>0.
[0402] Logical Operators The following logical operators are defined as follows: x&&y The Boolean logical "intersection" of x and y x||y The Boolean logical "union" of x and y ! Boolean logic "negation" x?y:zIf x is TRUE or not equal to 0, then the value of y; otherwise, the value of z.
[0403] Relational Operators The following relational operators are defined as follows: > Greater than ≧ Greater than or equal to < Less than <= Equal to == equal to != not equal
[0404] When a relational operator is applied to a syntactic element or variable to which the value "na" (not applicable) has been assigned, the value "na" is treated as a distinct value for that syntactic element or variable. The value "na" is considered not equal to any other value.
[0405] Bitwise operators The following bitwise operators are defined as follows. & Bitwise "product". When operating on integer arguments, it operates on the two's complement representation of the integer values. When operating on a binary argument that contains fewer bits than the other argument, the shorter argument is extended by adding additional high-order bits equal to 0. | Bitwise "sum". When operating on integer arguments, it operates on the two's complement representation of the integer values. When operating on a binary argument that contains fewer bits than the other argument, the shorter argument is extended by adding additional high-order bits equal to 0. ^ Bitwise "exclusive or". When operating on integer arguments, it operates on the two's complement representation of the integer values. When operating on a binary argument that contains fewer bits than the other argument, the shorter argument is extended by adding additional high-order bits equal to 0. x>>y Arithmetic right shift of the two's complement integer representation of x by binary y bits. This function is defined only for non-negative integer values of y. The bit shifted into the most significant bit (MSB) as a result of the right shift has the same value as the MSB of x before the shift operation. x<<y Arithmetic left shift of the two's complement integer representation of x by binary y bits. This function is defined only for non-negative integer values of y. The bit shifted into the least significant bit (LSB) as a result of the left shift has a value equal to 0.
[0406] Assignment operators The following arithmetic operators are defined as follows. = Assignment operator ++ Increment, i.e., x++ is equivalent to x=x+1, and when used in an array index, becomes the value of the variable before the increment operation. -- Decrement, i.e., x-- is equivalent to x=x-1, and when used in an array index, becomes the value of the variable before the decrement operation. += increment by a specified amount, i.e. x+=3 is equivalent to x=x+3, x+=(-3) is equivalent to x=x+(-3). -= increment by a specified amount, i.e. x-=3 is equivalent to x=x-3, x-=(-3) is equivalent to x=x-(-3).
[0407] Range Notation The following notation is used to specify ranges of values: x=y..zx takes integer values between y and z, inclusive, where x, y, and z are integers and z is greater than y.
[0408] Mathematical Functions The following mathematical functions are defined:
[0409]
number
[0410] Asin(x) The inverse trigonometric sine function, operated on argument x in the range -1.0 to 1.0, inclusive, and producing a value in radians in the range -π÷2 to π÷2, inclusive. Atan(x) The inverse trigonometric tangent function, calculated on the argument x, has a value in radians in the range -π÷2 to π÷2 inclusive.
[0411]
number
[0412] Ceil(x) The smallest integer greater than or equal to x. Clip1 Y (x)=Clip3(0,(1< <BitDepthY)-1,x) Clip1 C (x)=Clip3(0,(1< <BitDepthC)-1,x)
[0413]
number
[0414] Cos(x) The trigonometric cosine function operated on argument x in radians. Floor(x) The largest integer less than or equal to x.
[0415]
number
[0416] Ln(x) The natural logarithm of x (logarithm to the base e, where e is the base of the natural logarithms, 2.718281828...). Log2(x) The base 2 logarithm of x. Log10(x) The base 10 logarithm of x.
[0417]
number
[0418] Round(x)=Sign(x)*Floor(Abs(x)+0.5)
[0419]
number
[0420] Sin(x) The trigonometric sine function operated on argument x in radians.
[0421]
number
[0422] Swap(x,y)=(y,x) Tan(x) The trigonometric tangent function, operated on argument x in radians.
[0423] Precedence of operations When the order of precedence in an expression is not explicitly indicated through the use of parentheses, the following rules apply: - An operation with higher precedence is evaluated before any operation with lower precedence. - Operations of equal precedence are evaluated in order from left to right.
[0424] The following table specifies the precedence of operators from highest to lowest, with a higher position in the table indicating a higher precedence.
[0425] For operators that are also used in the C programming language, the precedence order used herein is the same as that used in the C programming language.
[0426] [Table 11]
[0427] Text description of the logical operators In the text, a statement of logical operators as mathematically written in the form if(condition 0) statement 0 else if(condition 1) statement 1 ... else / *helpful remarks about remaining conditions* / statement n can be written in the following way: As follows... / ...the following is true: - If condition 0, then statement 0 - Otherwise, if condition 1, then statement 1 - ... - otherwise (helpful observations about the remaining conditions), statement n
[0428] Each "if ... then .... not, if ... then ..., otherwise ..." statement in the text is introduced with "such that ..." or "...the following is true" immediately preceding the "if ... then ...". The final conditional of an "if .... not, if ... then ..., otherwise ..." is always "otherwise ...". An interrupted "if .... not, if ... then ..., otherwise ..." statement can be identified by matching the "such that ..." or "...the following is true" with the final "otherwise ...".
[0429] In the text, a statement of logical operators as mathematically written in the form if(condition0a&&condition0b) statement 0 else if(condition 1a||condition 1b) statement 1 ... else statement n can be written in the following way: - As follows / ...the following applies: - Statement 0 if all of the following conditions are true: - Condition 0a - Condition 0b - Otherwise, if one or more of the following conditions are true, then statement 1: - Condition 1a - Condition 1b - ... - otherwise, statement n
[0430] In the text, a statement of logical operators as mathematically written in the form if(condition 0) statement 0 if(condition1) statement 1 can be written in the following way: If condition 0, then statement 0 If condition 1, then statement 1
[0431] Although the embodiments disclosed herein have been described primarily in terms of video coding, embodiments of coding system 10, encoder 20, and decoder 30 (and correspondingly system 10), as well as other embodiments described herein, may also be configured for processing or coding of still pictures, i.e., individual pictures unrelated to any preceding or subsequent pictures, as in video coding. In general, only inter prediction units 244 (encoder) and 344 (decoder) may not be available when picture processing coding is limited to a single picture 17. All other functions (also called tools or techniques) of the video encoder 20 and the video decoder 30 may be equally used for still picture processing, e.g., residual calculation 204 / 304, transform 206, quantization 208, inverse quantization 210 / 310, (inverse) transform 212 / 312, partitioning 262 / 362, intra prediction 254 / 354, and / or loop filtering 220, 320, and entropy coding 270 and entropy decoding 304.
[0432] Embodiments of, e.g., the encoder 20 and the decoder 30, and functions described herein with reference to, e.g., the encoder 20 and the decoder 30, may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on a computer-readable medium or transmitted over a communication medium as one or more instructions or code and executed by a hardware-based processing unit.
[0433] A computer-readable medium may include a computer-readable storage medium, which corresponds to a tangible medium, such as a data storage medium, or a communication medium, including any medium that facilitates transfer of a computer program from one place to another, for example according to a communication protocol. In this manner, a computer-readable medium may generally correspond to (1) a tangible computer-readable storage medium that is non-transitory, or (2) a communication medium, such as a signal or carrier wave. A data storage medium may be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, code, and / or data structures for implementation of the techniques described in this disclosure. A computer program product may include a computer-readable medium.
[0434] By way of example and not limitation, such computer-readable storage media may comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or any other medium that can be used to store the required program code in the form of instructions or data structures and accessed by a computer. Also, any connection is properly referred to as a computer-readable medium. For example, if the instructions are transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of the medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transitory media, but instead cover non-transitory tangible storage media. As used herein, disk and disc include compact discs (CDs), laser discs, optical disks, digital versatile discs (DVDs), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically and discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer readable media.
[0435] The instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general-purpose microprocessors, application specific integrated circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalent integrated circuits or discrete logic circuits. Thus, the term "processor" as used herein may refer to any of the foregoing structures, or any other structure suitable for implementing the techniques described herein. In addition, in some aspects, the functionality described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into a composite codec. Also, the techniques may be implemented entirely in one or more circuits or logic elements.
[0436] The techniques of the present disclosure may be implemented in a wide variety of devices or apparatuses, including wireless handsets, integrated circuits (ICs), or sets of ICs (e.g., chipsets). Various components, modules, or units are described in the present disclosure to highlight functional aspects of devices configured to perform the disclosed techniques, but do not necessarily require realization by different hardware units. Rather, as described above, the various units may be combined in a codec hardware unit, along with appropriate software and / or firmware, or may be provided by a collection of interoperable hardware units including one or more processors as described above. [Explanation of symbols]
[0437] 10. Video Coding System 12 Source Device 13 Communication Channels 14 Destination Device 16 Picture Source 17 Picture Data 18 Preprocessors 19 Preprocessed Picture Data 20 Encoder 21 Encoded Picture Data 22 Communication Interface 28 Communication Interface 30 Video Decoder 31 Decoded picture data 32 Post Processor 33 Post-Processed Picture Data 34 Display Devices 40 Codec System 41 Imaging Devices 42 Antenna 43 Processors 44 Memory Store 45 Display Devices 46 Processing Circuit 201 Input 203 Picture Block 204 Residual Calculation Unit 205 Residual Blocks 206 Conversion Processing Unit 207 Conversion Factors 208 Quantization Units 209 Quantized Coefficients 210 Inverse Quantization Unit 211 Dequantized Coefficients 212 Inverse Transformation Processing Unit 213 Reconstructed Residual Blocks 214 Reconstruction Unit 215 reconstructed blocks 220 Loop Filter 221 Filtered Blocks 230 Decoded Picture Buffer 231 Decoded Pictures 244 Inter Prediction Units 254 intra prediction units 260 Mode Selection Unit 262 Division Unit 265 predicted blocks 266 Syntax Elements 270 Entropy Coding Unit 272 Output 304 Entropy Decoding Unit 309 Quantized Coefficients 310 Inverse Quantization Unit 311 Dequantized Coefficients 312 Inverse Transformation Processing Unit 313 Reconstructed Residual Blocks 314 Reconstruction Unit 315 Reconstructed Blocks 320 Loop Filter 321 Filtered Blocks 330 Decoded Picture Buffer 331 Decoded Pictures 332 Output 344 Inter Prediction Units 354 intra prediction units 360 mode application unit 365 predicted blocks 366 Syntax Elements 400 Video Coding Device 410 Inlet Port 420 Receiver Unit 430 Processor 440 Transmitter Unit 450 Exit Port 460 Memory 470 Coding Module 500 devices 502 processor 504 Memory 506 Data 508 Operating Systems 510 Application Program 512 Bus 518 Display 700 CCLM Intra Prediction 701 Chroma Block 703 Chroma Samples 705 adjacent chroma reference samples 706 Left Template 707 Upper Template 711 Luma Block 713 Reconstructed Luma Samples 715 adjacent luma reference samples 716 Left Template 717 Upper Template 719 downsampled luma reference samples 901 Samples 902 Samples 903 Samples 1200 devices 1201 Decision Unit 1203 Filtering Unit 1205 Linear Model Derivation Unit 1207 Prediction Units 1500 mechanism 1511 Luma Block 1512 downsampled luma blocks 3100 Contents Supply System 3102 Capture Device 3104 Communication Links 3106 Terminal Device 3108 Smartphone / Pad 3110 Computer / Laptop 3112 NVR / DVR 3114 TV 3116 Set-top box 3118 Video Conference System 3120 Video Surveillance System 3122 PDA 3124 In-vehicle devices 3126 Display 3202 Protocol Progression Unit 3204 Demultiplexing Unit 3206 Video Decoder 3208 Audio Decoder 3210 Subtitle Decoder 3212 Synchronous Unit 3214 Video / Audio Display 3216 Video / Audio / Subtitle Display
Claims
1. 1. A method for performing intra prediction using a linear model, comprising: determining a set of downsampling filters based on chroma format information, the chroma format information indicating the chroma format of a picture to which the current block belongs; obtaining downsampled luma samples of reconstructed luma samples in a luma block of the current block and downsampled luma reference samples of selected luma reference samples of the luma block using respective downsampling filters in the set of downsampling filters; determining one or more linear model coefficients based on the downsampled luma reference samples and chroma reference samples corresponding to the downsampled luma reference samples; and obtaining prediction samples of a chroma block corresponding to the luma block based on the linear model coefficients and the downsampled luma samples of the reconstructed luma samples in the luma block.
2. determining a set of downsampling filters based on chroma format information; determining subsampling ratio information in horizontal and vertical directions based on the chroma format information; and determining the set of downsampling filters based on the subsampling ratio information.
3. For the chroma format being a 4:2:0 chroma format, a first set of downsampling filters is used for the luma block of the current block; For the chroma format being a 4:2:2 chroma format, a second set of downsampling filters is used for the luma block of the current block; or The method of claim 1 , wherein for the chroma format being a 4:4:4 chroma format, a third set of downsampling filters is used for a luma block of the current block.
4. when a subsampled chroma sample is co-located with a corresponding luma sample in the current block; obtaining downsampled luma samples of reconstructed luma samples in a luma block of the current block and downsampled luma reference samples of selected luma reference samples of the luma block using respective downsampling filters in the set of downsampling filters, obtaining downsampled luma samples of reconstructed luma samples in the luma block by applying a first downsampling filter to a first set of reconstructed luma samples, the first set of reconstructed luma samples comprising reconstructed luma samples at horizontal and / or vertical adjacent positions to a position of the reconstructed luma samples; obtaining downsampled luma reference samples of at least one selected reference luma sample by applying the first downsampling filter to a second set of reconstructed luma samples, the second set of reconstructed luma samples comprising reconstructed luma samples at horizontally and / or vertically adjacent positions to the position of the selected reference luma sample; The method according to claim 1 , wherein the first downsampling filter is selected from the set of downsampling filters.
5. when a subsampled chroma sample is not co-located with a corresponding luma sample in the current block; obtaining downsampled luma samples of reconstructed luma samples in a luma block of the current block and downsampled luma reference samples of selected luma reference samples of the luma block using respective downsampling filters in the set of downsampling filters, obtaining downsampled luma samples of the reconstructed luma samples in the luma block by applying a second downsampling filter to a third set of reconstructed luma samples, the third set of reconstructed luma samples comprising reconstructed luma samples at horizontal and / or vertical adjacent positions to positions of the reconstructed luma samples; obtaining downsampled luma reference samples of at least one selected reference luma sample by applying the second downsampling filter to a fourth set of reconstructed luma samples, the fourth set of reconstructed luma samples comprising reconstructed luma samples at horizontally and / or vertically adjacent positions to the position of the selected reference luma sample; The method according to claim 1 , wherein the second downsampling filter is selected from the set of downsampling filters.
6. If the subsampled chroma sample is co-located with the corresponding luma sample in the current block, the chroma sample type of the subsampled chroma sample is: - Chroma sample type 2, or - Chroma Sample Type 4 The method of claim 4, wherein the method comprises any one of the following steps:
7. If the subsampled chroma sample is not co-located with the corresponding luma sample in the current block, the chroma sample type of the subsampled chroma sample is: - Chroma sample type 0, - Chroma Sample Type 1, - Chroma sample type 3, or - Chroma Sample Type 5 The method of claim 5, wherein the method occurs when the device comprises any one of the following:
8. If at least one condition is met, comprising the chroma format being a 4:4:4 chroma format, the set of downsampling filters comprises a bypass filter; or if at least one condition is met, comprising the chroma format being a 4:2:0 chroma format, the set of downsampling filters comprises a set of filters {F2, F3, F5, F6}; F3[0]=1, F3[1]=2, F3[2]=1 F5[i][j]=F6[i][j]=0, where i=0..2, j=0..2 F5[0][1]=1, F5[1][1]=4, F5[2][1]=1, F5[1][0]=1, F5[1][2]=1 F6[0][1]=1, F6[1][1]=2, F6[2][1]=1 F6[0][2]=1, F6[1][2]=2, F6[2][2]=1 F2[0]=1, F2[1]=1, or if at least one condition is met, comprising the chroma format being a 4:2:2 chroma format, the set of downsampling filters comprises a set of filters {F2, F3, F5, F6}; F3[0]=1, F3[1]=2, F3[2]=1 F5[i][j]=F6[i][j]=0, where i=0..2, j=0..2 F5[0][1]=0, F5[1][1]=8, F5[2][1]=0, F5[1][0]=0, F5[1][2]=0 F6[0][1]=2, F6[1][1]=4, F6[2][1]=2 F6[0][2]=0, F6[1][2]=0, F6[2][2]=0 F2[0]=2, F2[1]=0 The method according to any one of claims 1 to 7, wherein
9. the subsampling ratio information in the horizontal and vertical directions is represented by the values of variables SubWidthC and SubHeightC, respectively; if at least one condition is satisfied, including that SubWidthC==2 and SubHeightC==2, the set of dow sampling filters comprises a set of filters {F2, F3, F5, F6}; F3[0]=1, F3[1]=2, F3[2]=1 F5[i][j]=F6[i][j]=0, where i=0..2, j=0..2 F5[0][1]=1,F5[1][1]=4,F5[2][1]=1,F5[1][0]=1,F5[1][2]=1 F6[0][1]=1, F6[1][1]=2, F6[2][1]=1 F6[0][2]=1, F6[1][2]=2, F6[2][2]=1 F2[0]=1, F2[1]=1 if at least one condition is satisfied, including that SubWidthC==2 and SubHeightC==1, the set of dow sampling filters comprises a set of filters {F2, F3, F5, F6}; F3[0]=1, F3[1]=2, F3[2]=1 F5[i][j]=F6[i][j]=0, where i=0..2, j=0..2 F5[0][1]=0, F5[1][1]=8, F5[2][1]=0, F5[1][0]=0, F5[1][2]=0 F6[0][1]=2, F6[1][1]=4, F6[2][1]=2 F6[0][2]=0, F6[1][2]=0, F6[2][2]=0 F2[0]=2, F2[1]=0 The method according to any one of claims 2 to 7, wherein
10. The selected luma reference sample is a neighboring luma sample located above the luma block and selected based on the L available chroma reference samples; or 10. The method of claim 1, comprising at least one of the neighboring luma samples to the left of the luma block and selected based on L available chroma reference samples.
11. The location of the available chroma reference sample is: When LM mode is applied and both upper and left adjacent samples are available, S[W' / 4, -1], S[3W' / 4, -1], S[-1, H' / 4], S[-1, 3H' / 4], When LM-A mode is applied or when only the above adjacent samples are available, S[W' / 8, -1], S[3W' / 8, -1], S[5W' / 8, -1], S[7W' / 8, -1], or When LM-L mode is applied or when only the left adjacent sample is available, they are specified as being S[-1, H' / 8], S[-1, 3H' / 8], S[-1, 5H' / 8], S[-1, 7H' / 8]; The chroma block has dimensions W×H, and W′ and H′ are: When the LM mode is applied, W'=W, H'=H, When the LM-A mode is applied, W'=W+H; When the LM-L mode is applied, H′=H+W is set; The method of claim 10.
12. determining one or more linear model coefficients based on the downsampled luma reference sample of the selected luma reference sample and a chroma reference sample corresponding to the downsampled luma reference sample, determining a maximum luma value and a minimum luma value based on the downsampled luma reference samples; obtaining a first chroma value based at least in part on one or more positions of one or more downsampled luma reference samples associated with the maximum luma value; obtaining a second chroma value based at least in part on one or more positions of one or more downsampled luma reference samples associated with the minimum luma value; and calculating the one or more linear model coefficients based on the first chroma value, the second chroma value, the maximum luma value, and the minimum luma value.
13. 1. An apparatus for intra prediction using a linear model, comprising: a determining unit configured to determine a set of downsampling filters based on chroma format information, the chroma format information indicating a chroma format of a picture to which a current block belongs; a filtering unit configured to obtain downsampled luma samples of reconstructed luma samples in a luma block of the current block and downsampled luma reference samples of selected luma reference samples of the luma block using respective downsampling filters in the set of downsampling filters; a linear model derivation unit configured to determine one or more linear model coefficients based on the downsampled luma reference samples and chroma reference samples corresponding to the downsampled luma reference samples; a prediction processing unit configured to obtain prediction samples of a chroma block corresponding to the luma block based on the linear model coefficients and the downsampled luma samples of the reconstructed luma samples in the luma block.
14. The decision unit: determining subsampling ratio information in horizontal and vertical directions based on the chroma format information; The apparatus of claim 13 , configured to determine the set of downsampling filters based on the subsampling ratio information.
15. For the chroma format being a 4:2:0 chroma format, a first set of downsampling filters is used for the luma block of the current block; For the chroma format being a 4:2:2 chroma format, a second set of downsampling filters is used for the luma block of the current block; or 14. The apparatus of claim 13, wherein for the chroma format being a 4:4:4 chroma format, a third set of downsampling filters is used for a luma block of the current block.
16. when a subsampled chroma sample is co-located with a corresponding luma sample in the current block; the filtering unit applies a first downsampling filter to a first set of reconstructed luma samples to obtain downsampled luma samples of the reconstructed luma samples in the luma block, the first set of reconstructed luma samples comprising reconstructed luma samples at horizontal and / or vertical adjacent positions to positions of the reconstructed luma samples; obtaining downsampled luma reference samples of at least one selected reference luma sample by applying the first downsampling filter to a second set of reconstructed luma samples, the second set of reconstructed luma samples comprising reconstructed luma samples at horizontally and / or vertically adjacent positions to the position of the selected reference luma sample; 16. The apparatus of claim 13, wherein the first downsampling filter is selected from the set of downsampling filters.
17. when a subsampled chroma sample is not co-located with a corresponding luma sample in the current block; the filtering unit applies a second downsampling filter to a third set of reconstructed luma samples to obtain downsampled luma samples of the reconstructed luma samples in the luma block, the third set of reconstructed luma samples comprising reconstructed luma samples at horizontally and / or vertically adjacent positions to positions of the reconstructed luma samples; obtaining downsampled luma reference samples of at least one selected reference luma sample by applying the second downsampling filter to a fourth set of reconstructed luma samples, the fourth set of reconstructed luma samples comprising reconstructed luma samples at horizontally and / or vertically adjacent positions to the position of the selected reference luma sample; 16. The apparatus of claim 13, wherein the second downsampling filter is selected from the set of downsampling filters.
18. If the subsampled chroma sample is co-located with the corresponding luma sample in the current block, the chroma sample type of the subsampled chroma sample is: - Chroma sample type 2, or - Chroma Sample Type 4 The apparatus of claim 16, wherein the apparatus comprises any one of the following:
19. If the subsampled chroma sample is not co-located with the corresponding luma sample in the current block, the chroma sample type of the subsampled chroma sample is: - Chroma sample type 0, - Chroma Sample Type 1, - Chroma sample type 3, or - Chroma Sample Type 5 The apparatus of claim 17, wherein the apparatus comprises any one of the following:
20. the determining unit is configured to determine a set of downsampling filters; If at least one condition is met, comprising the chroma format being a 4:4:4 chroma format, the set of downsampling filters comprises a bypass filter; or if at least one condition is met, comprising the chroma format being a 4:2:0 chroma format, the set of downsampling filters comprises a set of filters {F2, F3, F5, F6}; F3[0]=1, F3[1]=2, F3[2]=1 F5[i][j]=F6[i][j]=0, where i=0..2, j=0..2 F5[0][1]=1, F5[1][1]=4, F5[2][1]=1, F5[1][0]=1, F5[1][2]=1 F6[0][1]=1, F6[1][1]=2, F6[2][1]=1 F6[0][2]=1, F6[1][2]=2, F6[2][2]=1 F2[0]=1, F2[1]=1, or if at least one condition is met, comprising the chroma format being a 4:2:2 chroma format, the set of downsampling filters comprises a set of filters {F2, F3, F5, F6}; F3[0]=1, F3[1]=2, F3[2]=1 F5[i][j]=F6[i][j]=0, where i=0..2, j=0..2 F5[0][1]=0, F5[1][1]=8, F5[2][1]=0, F5[1][0]=0, F5[1][2]=0 F6[0][1]=2, F6[1][1]=4, F6[2][1]=2 F6[0][2]=0, F6[1][2]=0, F6[2][2]=0 F2[0]=2, F2[1]=0 20. The device according to any one of claims 13 to 19, wherein
21. the subsampling ratio information in the horizontal and vertical directions is represented by the values of variables SubWidthC and SubHeightC, respectively; the determining unit is configured to determine the set of downsampling filters; if at least one condition is satisfied, including that SubWidthC==2 and SubHeightC==2, the set of dow sampling filters comprises a set of filters {F2, F3, F5, F6}; F3[0]=1, F3[1]=2, F3[2]=1 F5[i][j]=F6[i][j]=0, where i=0..2, j=0..2 F5[0][1]=1, F5[1][1]=4, F5[2][1]=1, F5[1][0]=1, F5[1][2]=1 F6[0][1]=1, F6[1][1]=2, F6[2][1]=1 F6[0][2]=1, F6[1][2]=2, F6[2][2]=1 F2[0]=1, F2[1]=1 if at least one condition is satisfied, including that SubWidthC==2 and SubHeightC==1, the set of dow sampling filters comprises a set of filters {F2, F3, F5, F6}; F3[0]=1, F3[1]=2, F3[2]=1 F5[i][j]=F6[i][j]=0, where i=0..2, j=0..2 F5[0][1]=0, F5[1][1]=8, F5[2][1]=0, F5[1][0]=0, F5[1][2]=0 F6[0][1]=2, F6[1][1]=4, F6[2][1]=2 F6[0][2]=0, F6[1][2]=0, F6[2][2]=0 F2[0]=2, F2[1]=0 20. The device according to any one of claims 14 to 19, wherein
22. The selected luma reference sample is a neighboring luma sample located above the luma block and selected based on the L available chroma reference samples; or 22. The apparatus of claim 13, comprising at least one of the neighboring luma samples to the left of the luma block and selected based on L available chroma reference samples.
23. The location of the available chroma reference sample is: When LM mode is applied and both top and left adjacent chroma samples are available, S[W' / 4, -1], S[3W' / 4, -1], S[-1, H' / 4], S[-1, 3H' / 4], When LM-A mode is applied or only the top adjacent chroma samples are available, S[W' / 8, -1], S[3W' / 8, -1], S[5W' / 8, -1], S[7W' / 8, -1], or When LM-L mode is applied or only left adjacent chroma samples are available, they are specified as S[-1, H' / 8], S[-1, 3H' / 8], S[-1, 5H' / 8], S[-1, 7H' / 8], The chroma block has dimensions W×H, and W′ and H′ are: When the LM mode is applied, W'=W, H'=H, When the LM-A mode is applied, W'=W+H; When the LM-L mode is applied, H′=H+W is set; 23. The apparatus of claim 22.
24. 24. The apparatus of claim 13, wherein the linear model derivation unit is configured to determine a maximum luma value and a minimum luma value based on the downsampled luma reference samples, obtain a first chroma value based at least in part on one or more positions of the one or more downsampled luma reference samples associated with the maximum luma value, obtain a second chroma value based at least in part on one or more positions of the one or more downsampled luma reference samples associated with the minimum luma value, and calculate one or more linear model coefficients based on the first chroma value, the second chroma value, the maximum luma value, and the minimum luma value.
25. An encoder (20) comprising processing circuitry for performing the method according to any one of claims 1 to 12.
26. A decoder (30) comprising processing circuitry for performing the method according to any one of claims 1 to 12.
27. A computer program product comprising program code for carrying out the method according to any one of claims 1 to 12.
28. A non-transitory computer readable medium carrying program code that, when executed by a computing device, causes the computing device to perform the method of any one of claims 1 to 12.
29. A decoder comprising: one or more processors; and a non-transitory computer-readable storage medium coupled to the processor and storing programming for execution by the processor, the programming, when executed by the processor, configuring the decoder to perform the method of any one of claims 1 to 12.
30. 1. An encoder comprising: one or more processors; and a non-transitory computer-readable storage medium coupled to the processor and storing programming for execution by the processor, the programming, when executed by the processor, configuring the encoder to perform the method of any one of claims 1 to 12.
Citation Information
Patent Citations
Method and device for processing colour information in an image
WO2012175646A1
