Syntax for signaling cross-component video codecs

By using homogeneous adjacent top brightness samples and dynamically adjusting the maximum block size of the transform skipped codec blocks in CCLM, the problem of failing to effectively consider color format differences in the prior art is solved, and the efficiency of video codec and codec is improved. flexibility.

CN115443658BActive Publication Date: 2025-01-10DOUYIN VISION CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202180029366.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-04-18
Filing Date
2021-04-19
Publication Date
2025-01-10
Estimated Expiration
2041-04-19

AI Technical Summary

Technical Problem

In the existing video encoding and decoding technology, there are problems with the maximum block size setting of the cross component linear model (CCLM) and transform skip codec blocks, which fail to effectively consider the color format differences, resulting in ineffective encoding and decoding efficiency.

Method used

By using homogeneous adjacent top luminance samples in CCLM parameter derivation, adjust the maximum block size of the downsampling filter and transform skip codec blocks, and dynamically adjust it according to the color format and codec information to ensure the codec efficiency of the color blocks. .

Benefits of technology

It improves the efficiency of video encoding and decoding, adapts to different color formats, enhances the flexibility and accuracy of encoding and decoding, and improves video quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115443658B_ABST
    Figure CN115443658B_ABST
Patent Text Reader

Abstract

A method of video processing is provided, comprising: for conversion between a video block of a video and a bitstream of the video, determining parameters of a cross-component linear model (CCLM) for the video block according to a rule; and performing the conversion based on the determination, wherein the rule specifies that a variable representing adjacent luma samples is used in determining the parameters of the CCLM only if the variable has a specific value.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This is the national phase application of International Patent Application No. PCT / CN2021 / 087999, filed on April 19, 2021, which claims priority to and the benefit of International Patent Application No. PCT / CN2020 / 085484, filed on April 18, 2020. The entire disclosure of the above application is incorporated by reference as part of the disclosure of this application. Technical Field

[0003] This document deals with video and image coding technologies. Background Art

[0004] Digital video accounts for the largest usage of bandwidth on the Internet and other digital communications networks. As the number of connected user devices capable of receiving and displaying video increases, bandwidth demand for digital video usage is expected to continue to grow. Summary of the Invention

[0005] The disclosed techniques may be used by video or image decoder or encoder embodiments to perform encoding or decoding using cross-component linear model prediction.

[0006] In one example aspect, a method of processing video is disclosed. The method includes: for converting between a chroma block of the video and a coded representation of the video, deriving parameters of a cross-component linear model from downsampled co-located adjacent top luma samples, the downsampled co-located adjacent top luma samples being generated from N top-neighboring rows of the co-located luma block using a downsampling filter, where N is a positive integer; and performing the conversion using a predicted chroma block generated using the cross-component linear model.

[0007] In another example aspect, a method of processing video is disclosed. The method includes: for conversion between a video block of video having a 4:2:2 color format and a bitstream of the video, determining parameters of a cross-component linear model for the video block according to a rule; and performing the conversion based on the determination, wherein a syntax element indicates whether chroma samples of the video are vertically shifted relative to luma samples of the video, and wherein the rule specifies that the parameters are determined independently of a value of the syntax element.

[0008] In another example aspect, a method of processing video is disclosed. The method includes performing conversion between the video and a bitstream of the video according to a rule, wherein the format rule specifies that a field indicating whether chroma sample positions are vertically shifted relative to corresponding luma sample positions is set to a default value because the video has a 4:2:2 or 4:4:4 color format.

[0009] In another example aspect, a method of processing video is disclosed. The method includes: for conversion between a video block of the video and a bitstream of the video, determining parameters of a cross-component linear model (CCLM) for the video block according to a rule; and performing the conversion based on the determination, wherein the rule specifies that a variable representing adjacent luma samples is used in determining the parameters of the CCLM only if the variable has a specific value.

[0010] In another example aspect, a method for processing video is disclosed. The method includes: for converting between a video including a video unit and a bitstream of the video, determining whether to enable a first codec for the video unit according to a rule, wherein the rule specifies that the first codec and a second codec are mutually exclusive, and wherein the first codec or the second codec includes a symbol data hiding tool; and performing the conversion according to the determination.

[0011] In another example aspect, a method for processing video is disclosed. The method includes: for converting between a video including a video unit and a bitstream of the video, determining whether to enable a first codec for the video unit according to a rule, wherein the rule specifies that the first codec and a second codec are mutually exclusive, and wherein the first codec or the second codec includes a dependent quantization tool; and performing the conversion according to the determination.

[0012] In another example aspect, a method of processing video is disclosed. The method includes performing conversion between a video including one or more pictures comprising one or more slices and a bitstream of the video according to a rule, wherein the rule specifies that a slice type of a slice depends on a reference picture entry of a reference picture list for the slice.

[0013] In another example aspect, a method of processing a video is disclosed. The method includes performing conversion between a video including one or more pictures comprising one or more slices and a bitstream of the video according to a rule, wherein the rule specifies that a number of filters allowed in an adaptive parameter set (APS) or a number of APSs depends on coded information of the video.

[0014] In another example aspect, the above method may be implemented by a video encoder apparatus including a processor.

[0015] In yet another example aspect, the methods may be implemented in the form of processor-executable instructions and stored on a computer-readable program medium.

[0016] These and other aspects are also described in this document. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1AThe nominal vertical and horizontal positions of the 4:2:2 luma and chroma samples in the picture are shown.

[0018] Figure 1B An example of a video encoder is shown.

[0019] Figure 2 Examples of 67 intra prediction modes are shown.

[0020] Figure 3 Examples of horizontal and vertical traversal scans are shown.

[0021] Figure 4 Examples of the locations of the sample points used for the derivation of α and β are shown.

[0022] Figure 5 An example of partitioning a block of 4x8 samples into two independent decodable areas is shown.

[0023] Figure 6 An example order of processing pixel rows to maximize throughput for a 4xN block with a vertical predictor is shown.

[0024] Figure 7 An example of a low frequency non-separable transform (LFNST) process is shown.

[0025] Figure 8 An example of adjacent chroma samples and downsampled co-located adjacent luma samples used in the derivation of CCLM parameters for 4:2:2 video is shown.

[0026] Figure 9 An example of a video processing apparatus is shown.

[0027] Figure 10 A block diagram of a video encoder is shown.

[0028] Figure 11 is a flowchart of an example of a video processing method.

[0029] Figure 12 is a block diagram of an example of a video processing system.

[0030] Figure 13 An example of the samples in the current block and the top left sample to be used is shown.

[0031] Figure 14 is a block diagram illustrating an example video encoding and decoding system.

[0032] Figure 15 is a block diagram illustrating an encoder according to some embodiments of the disclosed technology.

[0033] Figure 16 is a block diagram illustrating a decoder according to some embodiments of the disclosed technology.

[0034] Figure 17A and Figure 17B is a flow chart of an example video processing method according to some embodiments of the disclosed technology.

[0035] Figure 18 is a flow chart of an example method of video processing according to some embodiments of the disclosed technology.

[0036] 19A to 19D is a flow chart of an example video processing method according to some embodiments of the disclosed technology. DETAILED DESCRIPTION

[0037] This document provides various techniques that can be used by decoders of image or video bitstreams to improve the quality of decompressed or decoded digital video or images. For the sake of brevity, the term "video" is used herein to include both sequences of pictures (traditionally referred to as video) and single images. In addition, video encoders can also implement these techniques during the encoding process to reconstruct decoded frames for further encoding.

[0038] For ease of understanding, section headings are used in this document, and the section headings do not limit the embodiments and techniques to the corresponding subsections. Therefore, embodiments from one section can be combined with embodiments from other sections.

[0039] 1. Brief Overview

[0040] The present invention relates to video coding and decoding technology. Specifically, it relates to cross-component linear model prediction and other coding and decoding tools in image / video coding and decoding. The present invention can be applied to existing video coding and decoding standards (such as HEVC) or to standards to be finalized (Multi-functional Video Codec). It may also be applicable to future video coding and decoding standards or video codecs. 2. Background Technology

[0042] Video codec standards have evolved primarily through the development of the well-known ITU-T and ISO / IEC standards. ITU-T developed H.261 and H.263, ISO / IEC developed MPEG-1 and MPEG-4 Vision, and the two organizations jointly developed the H.262 / MPEG-2 Video, H.264 / MPEG-4 Advanced Video Codec (AVC) standards, and H.265 / HEVC standards. Since H.262, video codec standards have been based on a hybrid video codec architecture that uses temporal prediction plus transform coding. To explore future video codec technologies beyond HEVC, VCEG and MPEG jointly established the Joint Video Exploration Team (JVET) in 2015. Since then, many new methods have been adopted by JVET and incorporated into reference software called the Joint Exploration Model (JEM). In April 2018, the Joint Video Experts Team (JVET) between VCEG (Q6 / 16) and ISO / IEC JTC1 SC29 / WG11 (MPEG) was established to develop the VVC standard with the goal of reducing the bit rate by 50% compared to HEVC.

[0043] The latest version of the VVC draft, Versatile Video Coding (Draft 7), can be found at:

[0044] http: / / phenix.it-sudparis.eu / jvet / doc_end_user / documents / 16_Geneva / wg11 / JVET-P2001-v9.zip

[0045] The latest reference software for VVC (called VTM) can be found at the following URL:

[0046] https: / / vcgit.hhi.fraunhofer.de / jvet / VVCSoftware_VTM / - / tags / VTM-6.0

[0047] 2.1. Color Space and Chroma Subsampling

[0048] A color space, also called a color model (or color system), is an abstract mathematical model that simply describes the range of colors as a tuple of numbers, usually 3 or 4 values ​​or color components (such as RGB). Fundamentally, a color space is an elaboration of coordinate systems and subspaces.

[0049] For video compression, the most commonly used color spaces are YCbCr and RGB.

[0050] YCbCr, Y'CbCr, or Y Pb / Cb Pr / Cr, also written as YCBCR or Y'CBCR, is a family of color spaces used as part of the color imaging pipeline in video and digital photography systems. Y' is the luma component, while CB and CR are the blue-difference and red-difference chroma components. Y' (with a superscript notation) is distinguished from Y, which is luma, meaning that light intensity is encoded nonlinearly based on the gamma-corrected RGB primaries.

[0051] Chroma subsampling is the practice of encoding images at a lower resolution for chroma information than for luminance information, taking advantage of the fact that the human visual system is less sensitive to color differences than to luminance. 2.1.1.4:4:4

[0053] Each of the three Y'CbCr components has the same sampling rate, so there is no chroma subsampling. This scheme is sometimes used in high-end film scanners and film post-production. 2.1.2.4:2:2

[0055] The two chroma components are sampled at half the rate of luma: the horizontal chroma resolution is halved, while the vertical chroma resolution remains unchanged. This reduces the bandwidth of the uncompressed video signal by one-third with little or no visual difference. Examples of nominal vertical and horizontal positions for a 4:2:2 color format are shown in the VVC working draft. Figure 1A Depicted in. 2.1.3.4:2:0

[0057] In 4:2:0, horizontal sampling is doubled compared to 4:1:1, but because the Cb and Cr channels are sampled only on alternate lines in this scheme, vertical resolution is halved. Therefore, the data rate remains the same. Cb and Cr are subsampled by a factor of 2 both horizontally and vertically. There are three variants of the 4:2:0 scheme, with different horizontal and vertical positions.

[0058] In MPEG-2, Cb and Cr are co-located in the horizontal direction and located between pixels in the vertical direction (spaced apart).

[0059] In JPEG / JFIF, H.261, and MPEG-1, Cb and Cr are interspersed between alternate luminance samples.

[0060] In 4:2:0 DV, Cb and Cr are co-located horizontally and vertically on alternate lines.

[0061] Table 2-1 SubWidthC and SubHeightC values ​​derived from chroma_format_idc and separate_colour_plane_flag

[0062]

[0063]

[0064] 2.2. Encoding and decoding process of typical video codecs

[0065] Figure 1B An example of a VVC encoder block diagram is shown, which contains three in-loop filtering blocks: a deblocking filter (DF), sample adaptive offset (SAO), and ALF. Unlike DF, which uses a predefined filter, SAO and ALF use the original samples of the current picture to reduce the mean square error between the original samples and the reconstructed samples by adding an offset and applying a finite impulse response (FIR) filter, respectively. The offset and filter coefficients are signaled via codec-side information. ALF is located at the last processing stage for each picture and can be seen as a tool that attempts to capture and repair artifacts created by previous stages.

[0066] Intra-mode codec with 67 intra-prediction modes

[0067] To capture arbitrary edge directions present in natural videos, the number of directional intra modes is extended from 33 used in HEVC to 65. The additional directional modes are Figure 2 Depicted as red dashed arrows in , planar and DC modes remain unchanged. These more dense directional intra prediction modes apply to all block sizes and both luma and chroma intra prediction.

[0068] like Figure 2 As shown, the traditional angular intra prediction direction is defined as 45 degrees to -135 degrees in a clockwise direction. In VTM, for non-square blocks, several traditional angular intra prediction modes are adaptively replaced with wide-angle intra prediction modes. The replaced modes are signaled using the original method and remapped to the wide-angle mode index after parsing. The total number of intra prediction modes remains unchanged at 67, and the intra mode codec remains unchanged.

[0069] In HEVC, each intra-coded block has a square shape, with each side length being a power of 2. Therefore, no division operation is required to generate the intra predictor using the DC mode. In VVC, blocks can have a rectangular shape, and in general, a division operation is required for each block. To avoid the division operation for DC prediction, for non-square blocks, only the longer side is used to calculate the average.

[0070] Figure 2 Examples of 67 intra prediction modes are shown.

[0071] 2.4. Inter-frame prediction

[0072] For each inter-frame predicted CU, the motion parameters consist of a motion vector, a reference picture index and a reference picture list usage index, as well as additional information required by the new codec features of VVC that will be used for inter-frame prediction sample generation. The motion parameters can be signaled in an explicit or implicit manner. When a CU is encoded and decoded in skip mode, the CU is associated with one PU and has no significant residual coefficients, no coded motion vector increments or reference picture indices. The merge mode is specified, whereby the motion parameters of the current CU are obtained from neighboring CUs, including spatial and temporal candidates, as well as the additional scheduling introduced in VVC. The merge mode is applicable not only to skip mode, but also to any inter-frame predicted CU. An alternative to the merge mode is the explicit transmission of motion parameters, where each CU explicitly signals the motion vector, the corresponding reference picture index and reference picture list usage flag for each reference picture list, as well as other required information.

[0073] 2.5. Intra-block copy (IBC)

[0074] Intra-block copying (IBC) is a tool adopted in the HEVC extension on SCC. It is well known that it significantly improves the encoding and decoding efficiency of screen content materials. Since the IBC mode is implemented as a block-level encoding and decoding mode, block matching (BM) is performed at the encoder to find the best block vector (or motion vector) for each CU. Here, the block vector is used to indicate the displacement from the current block to the reference block, which has been reconstructed within the current picture. The luminance block vector of the CU encoded and decoded by IBC is integer precision. The chrominance block vector is also rounded to integer precision. When combined with AMVR, the IBC mode can switch between 1-pixel and 4-pixel motion vector precision. The CU encoded and decoded by IBC is regarded as a third prediction mode in addition to the intra or inter prediction mode. The IBC mode is applicable to CUs whose width and height are both less than or equal to 64 luminance samples.

[0075] On the encoder side, hash-based motion estimation is performed for IBC. The encoder performs RD checks on blocks with a width or height of no more than 16 luma samples. For non-merge mode, a block vector search is first performed using a hash-based search. If the hash search does not return a valid candidate, a local search based on block matching is performed.

[0076] In hash-based search, the hash key matching (32-bit CRC) between the current block and the reference blocks is extended to all allowed block sizes. The hash key calculation for each position in the current picture is based on a 4×4 sub-block. For larger current block sizes, the hash key that matches the hash key of the reference block is determined when all hash keys of all 4×4 sub-blocks match the hash keys in the corresponding reference positions. If multiple reference blocks are found whose hash keys match the hash key of the current block, the block vector cost of each matching reference is calculated and the one with the lowest cost is selected.

[0077] In the block matching search, the search range is set to cover both the previous and current CTUs.

[0078] At CU level, IBC mode is signaled using a flag, which can be signaled as IBC AMVP mode or IBC skip / merge mode as shown below:

[0079] -IBC skip / merge mode: merge candidate index is used to indicate which block vectors from neighboring candidate IBC codec blocks in the list are used to predict the current block. The merge list consists of spatial candidates, HMVP candidates and pairwise candidates.

[0080] -IBC AMVP mode: Block vector differences are encoded and decoded in the same way as motion vector differences. The block vector prediction method uses two candidates as predictors, one from the left neighbor and one from the upper neighbor (if IBC codec). When any neighbor is unavailable, the default block vector is used as the predictor. A flag is signaled to indicate the block vector predictor index.

[0081] 2.6. Palette Mode

[0082] For palette mode signaling, the palette mode is encoded and decoded as the prediction mode of the codec unit, that is, the prediction mode of the codec unit can be MODE_INTRA, MODE_INTER, MODE_IBC and MODE_PLT. If the palette mode is used, the pixel values ​​in the CU are represented by a small set of representative color values. This set is called a palette. For pixels whose values ​​are close to the palette color, the palette index is signaled. For pixels whose values ​​are outside the palette, the pixel is represented by an escape symbol and the quantized pixel value is signaled directly.

[0083] To decode a palette-coded block, the decoder needs to decode the palette colors and indices. The palette colors are described by a palette table and encoded by the palette table codec. An escape flag is signaled for each CU to indicate whether an escape symbol is present in the current CU. If an escape symbol is present, the palette table is incremented by one and the last index is assigned to the escape mode. The palette indices of all pixels in the CU form a palette index map and are encoded by the palette index map codec.

[0084] In order to encode and decode the palette table, a palette predictor is maintained. The predictor is initialized at the beginning of each stripe where the predictor is reset to 0. For each entry in the palette predictor, a reuse flag is signaled to indicate whether it is part of the current palette. The reuse flag is sent using run-length encoding of zero. After this, the number of new palette entries is signaled using an exponential Golomb code of order 0. Finally, the component values ​​of the new palette entries are signaled. After encoding the current CU, the palette predictor will be updated with the current palette and entries from the previous palette predictor that are not reused in the current palette will be added to the end of the new palette predictor until the maximum allowed size is reached (palette padding).

[0085] To encode and decode the palette index map, use Figure 3 The indexes are encoded and decoded by horizontal and vertical traversal scans as shown. The scan order is explicitly signaled in the bitstream using palette_transpose_flag.

[0086] Figure 3 Examples of horizontal and vertical traversal scans are shown.

[0087] Palette indexes are encoded and decoded using two main palette sampling modes: 'INDEX' and 'COPY_ABOVE'. A flag is used to signal the mode, except when the top row is used when horizontal scanning is used, the first column is used when vertical scanning is used, or the previous mode is 'COPY_ABOVE'. In 'COPY_ABOVE' mode, the palette index of the sample in the row above is copied. In 'INDEX' mode, the palette index is signaled explicitly. For both 'INDEX' and 'COPY_ABOVE' modes, a runlength value is signaled, which specifies the number of pixels to be encoded and decoded using the same mode.

[0088] The encoding order of the index map is as follows: First, the number of index values ​​for the CU is signaled. Then the actual index value for the entire CU is signaled using truncated binary encoding. Both the index number and the index value are encoded and decoded in bypass mode. This groups the index-related bypass bins together. Then, the palette mode (INDEX or COPY_ABOVE) and the run value are signaled in an interleaved manner. Finally, the component escape values ​​corresponding to the escape samples of the entire CU are grouped together and encoded and decoded in bypass mode. An additional syntax element last_run_type_flag is signaled after the signaling of the index value. This syntax element is used in conjunction with the index number to avoid the need to signal the run value corresponding to the last run in the block.

[0089] In VTM, a binary tree is enabled for the I slice, separating the luminance (Luma) and chroma (Chroma) codecs. Therefore, in this scheme, the palette is applied separately to the luminance (Y component) and chroma (Cb and Cr components). If the binary tree is disabled, the palette is applied to the Y, Cb, and Cr components together, the same as the HEVC palette.

[0090] 2.7. Cross-component linear model prediction

[0091] The cross-component linear model (CCLM) prediction mode is used in VVC. For this mode, the chrominance samples are predicted based on the reconstructed luma samples of the same CU using the following linear model:

[0092] pred C (i, j) = α·rec L ′(i, j)+β(2-1)

[0093] where pred C (i, j) represents the predicted chroma sample in the CU, and rec L (i, j) represents the downsampled reconstructed luma samples of the same CU.

[0094] Figure 4 An example of the positions of the left and upper samples involved in the LM mode and the samples of the current block is shown.

[0095] Figure 4 Examples of the locations of the sample points used for the derivation of α and β are shown.

[0096] In addition to the upper template and the left template being used together to calculate the linear model coefficients in LM mode, they can also be used alternately in the other two LM modes (i.e., LM_A and LM_L modes). In LM_A mode, only the upper template is used to calculate the linear model coefficients. In order to obtain more samples, the upper template is expanded to (W+H). In LM_L mode, only the left template is used to calculate the linear model coefficients. In order to obtain more samples, the left template is expanded to (H+W). For non-square blocks, the upper template is expanded to W+W and the left template is expanded to H+H.

[0097] The CCLM parameters (α and β) are derived using up to four adjacent chroma samples and their corresponding downsampled luma samples. Assuming the current chroma block dimension is W×H, W' and H' are set to

[0098] —When LM mode is applied, W'=W, H'=H;

[0099] —When LM-A mode is applied, W'=W+H;

[0100] —When LM-L mode is applied, H'=H+W;

[0101] The upper adjacent position is represented as S[0, -1]...S[W'-1, -1], and the left adjacent position is represented as S[-1, 0]...S[-1, H'-1]. Then the four sample points are selected as

[0102] - 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];

[0103] — When the LM-A mode is applied or only upper adjacent samples are available, S[W' / 8, -1], S[3W' / 8, -1], S[5W' / 8, -1], S[7W' / 8, -1];

[0104] - When LM-L mode is applied or only left adjacent samples are available, S[-1, H' / 8], S[-1, 3H' / 8], S[-1, 5H' / 8], S[-1, 7H' / 8];

[0105] Downsample the four adjacent brightness samples at the selected position and perform four comparisons to find the smaller of the two values: x 0 A and x 1 A , and two larger values: x 0 B and x 1 BTheir corresponding chroma sample values ​​are represented by y 0 A 、y 1 A 、y 0 B and y 1 B Then x A 、x B 、y A and y B The derivation is:

[0106] 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(2-2)

[0107] Finally, the linear model parameters α and β are obtained according to the following equations.

[0108]

[0109] β=Y b -α·X b (2-4)

[0110] The division operation for calculating the parameter α is implemented using a lookup table. To reduce the memory required to store the table, the diff value (the difference between the maximum and minimum values) and the parameter α are expressed in exponential notation. For example, diff is approximated using a 4-bit significant part and an exponent. Therefore, the table for 1 / diff is simplified to 16 elements for 16 meaningful values, as shown below:

[0111] DivTable[]={0, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0}

[0112] (2-5)

[0113] The benefit of doing this is that it reduces both the computational complexity and the memory size required to store the required tables.

[0114] To match the chroma sample positions of a 4:2:0 video sequence, two downsampling filters are applied to the luma samples, achieving a 2:1 downsampling ratio in both the horizontal and vertical directions. The choice of downsampling filter is specified by the SPS level flag. The two downsampling filters are shown below, corresponding to "Type 0" and "Type 2" content, respectively.

[0115]

[0116]

[0117] Note that when the upper reference line is at a CTU boundary, only one luma line (typically a line buffer in intra prediction) is used to derive the downsampled luma samples.

[0118] This parameter calculation is performed as part of the decoding process rather than just as an encoder search operation. As a result, no syntax is used to pass the α and β values ​​to the decoder.

[0119] For chroma intra mode coding and decoding, a total of 8 intra modes are allowed for chroma intra mode coding and decoding. These modes include five traditional intra modes and three cross-component linear model modes (LM, LM_A and LM_L). The chroma mode signaling and derivation process are shown in Table 2-2. Chroma mode coding and decoding directly depends on the intra prediction mode of the corresponding luminance block. Since separate block partitioning structures for luminance and chrominance components are enabled in the I slice, one chroma block can correspond to multiple luminance blocks. Therefore, for the chroma DM mode, the intra prediction mode of the corresponding luminance block covering the center position of the current chroma block is directly inherited.

[0120] Table 2-2. Derivation of chrominance prediction from luma mode when ccm_is is enabled

[0121]

[0122]

[0123] Specification of INTRA_LT_CCLM, INTRA_L_CCLM, and INTRA_T_CCLM intra prediction modes in JVET-Q2001-vE 8.4.5.2.13

[0125] The inputs to this process are:

[0126] —Intra prediction mode predModeIntra,

[0127] - the sample position of the upper left sample of the current transform block relative to the upper left sample of the current picture (xTbC, yTbC),

[0128] - variable nTbW specifying the transform block width,

[0129] — variable nTbH specifying the transform block height,

[0130] — variable cIdx specifying the color component of the current block,

[0131] - Chroma neighboring samples p[x][y], where x = -1, y = 0..2×nTbH-1, and x = 0..2×nTbW-1, y = -1.

[0132] The output of this process is the predicted samples predSamples[x][y], where x = 0..nTbW-1, y = 0..nTbH-1.

[0133] The current brightness position (xTbY, yTbY) is derived as follows:

[0134] (xTbY, yTbY) = (xTbC<<(SubWidthC-1), yTbC<<(SubHeightC-1))(351)

[0135] The variables availL, availT, and availTL are derived as follows:

[0136] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using as input the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY-1, yTbY), checkPredModeY set equal to false (FLASE), and cIdx, and assign the output to availL.

[0137] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY, yTbY-1), checkPredModeY set equal to false (FLASE), and cIdx as input, and assign the output to availT.

[0138] —The variable availTL is derived as follows:

[0139] availTL=availL&&availT(352)

[0140] The number of available top-right adjacent chroma samples numTopRight is derived as follows:

[0141] —The variable numTopRight is set to 0, and availTR is set to true (TRUE).

[0142] - When predModeIntra is equal to INTRA_T_CCLM, the following applies for x=nTbW..2×nTbW-1 until availTR is equal to FALSE or x is equal to 2×nTbW-1:

[0143] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using as input the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY+x, yTbY-1), checkPredModeY set equal to false (FLASE), and cIdx, and assign the output to availTR.

[0144] —When availTR is equal to true (TRUE), numTopRight is increased by 1.

[0145] The number of available lower left adjacent chroma samples numLeftBelow is derived as follows:

[0146] —The variable numLeftBelow is set to 0, and availLB is set to true (TRUE).

[0147] When predModeIntra is equal to INTRA_L_CCLM, the following applies for y=nTbH..2×nTbH-1 until availLB is equal to FALSE or y is equal to 2×nTbH-1:

[0148] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY-1, yTbY+y), checkPredModeY set equal to false (FLASE), and cIdx as input, and assign the output to availLB.

[0149] —When availLB is equal to TRUE, numLeftBelow is increased by 1.

[0150] The number of available adjacent chroma samples numSampT at the top and upper right and the number of available adjacent chroma samples numSampL at the left and lower left are derived as follows:

[0151] If predModeIntra is equal to INTRA_LT_CCLM, the following applies:

[0152] numSampT=availT? nTbW:0(353)

[0153] numSampL=availL? nTbH:0(354)

[0154] — Otherwise, the following applies:

[0155] numSampT=(availT&&predModeIntra==INTRA_T_CCLM)? (nTbW+Min(numTopRight,nTbH)):0(355)

[0156] numSampL=(availL&&predModeIntra==INTRA_L_CCLM)? (nTbH+Min(numLeftBelow,nTbW)):0 (356)

[0158] The variable bCTUboundary is derived as follows:

[0159] bCTUboundary=(yTbY&(CtbSizeY-1)==0)? TRUE:FALSE(357)

[0160] The variable cntN and array pickPosN, where N is replaced by L and T, are derived as follows:

[0161] —The variable numIs4N is derived as follows:

[0162] numIs4N=((availT&&availL&&predModeIntra==INTRA_LT_CCLM)?0:1)(358)

[0163] —The variable startPosN is set equal to numSampN>>(2+numIs4N).

[0164] - The variable pickStepN is set equal to Max(1, numSampN>>(1+numIs4N)).

[0165] —If availN is equal to TRUE and predModeIntra is equal to INTRA_LT_CCLM or INTRA_N_CCLM, then the following assignments are made:

[0166] —cntN is set equal to Min(numSampN, (1+numIs4N)<<1).

[0167] - pickPosN[pos] is set equal to (startPosN+pos×pickStepN), where pos=0..cntN-1.

[0168] Otherwise, cntN is set equal to 0.

[0169] The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[0170] — If numSampL and numSampT are both equal to 0, then the following applies:

[0171] predSamples[x][y]=1<<(BitDepth-1) (359)

[0173] — Otherwise, the following ordered steps apply:

[0174] 1. The co-located luma sample pY[x][y] where x=0..nTbW×SubWidthC-1, y=0..TbH×SubHeightC-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[0175] 2. The adjacent brightness samples pY[x][y] are derived as follows:

[0176] - When numSampL is greater than 0, the adjacent left luma sample pY[x][y] with x = -1..-3, y = 0..SubHeightC×numSampL-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[0177] - When availT is equal to FALSE, the adjacent top luma sample pY[x][y] where x = -1..SubWidthC×numSampT-1, y = -1..-2 is set equal to luma sample pY[x][0].

[0178] - When availL is equal to FALSE, the adjacent left luma sample pY[x][y] where x = -1..-3, y = -1..SubHeightC×numSampL-1 is set equal to the luma sample pY[0][y].

[0179] - When numSampT is greater than 0, the adjacent top luma sample pY[x][y] where x = 0..SubWidthC×numSampT-1, y = -1..-2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[0180] —When availTL is equal to true (TRUE), the adjacent upper left luma sample pY[x][y] where x=-1, y=-1, -2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[0181] 3. The downsampled co-located luminance sample pDsY[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[0182] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[0183] —pDsY[x][y], where x=1..nTbW-1, y=1..nTbH-1 is derived as follows:

[0184] pDstY[x][y]=pY[x][y](360)

[0185] — Otherwise, the following applies:

[0186] —The one-dimensional filter coefficient arrays F1 and F2 and the two-dimensional filter coefficient arrays F3 and F4 are specified as follows.

[0187] F1[0]=2,F1[1]=0(361)

[0188] F2[0]=1,F2[1]=2,F2[2]=1(362)

[0189] F3[i][j]=F4[i][j]=0, ​​where i=0..2, j=0..2(363)

[0190] If SubWidthC and SubHeightC are both equal to 2, then the following applies:

[0191] F1[0]=1,F1[1]=1(364)

[0192] F3[0][1]=1,F3[1][1]=4,F3[2][1]=1,F3[1][0]=1,F3[1][2]=1(365)

[0193] F4[0][1]=1, F4[1][1]=2, F4[2][1]=1(366)

[0194] F4[0][2]=1, F4[1][2]=2, F4[2][2]=1(367)

[0195] — Otherwise, the following applies:

[0196] F3[1][1]=8(368)

[0197] F4[0][1]=2, F4[1][1]=4, F4[2][1]=2, (369)

[0198] - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies:

[0199] —pDsY[x][y], where x=0..nTbW-1, y=0..nTbH-1 is derived as follows:

[0200]

[0201] Otherwise (sps_chroma_vertical_collocated_flag is equal to 0), the following applies:

[0202] —pDsY[x][y], where x=0..nTbW-1, y=0..nTbH-1 is derived as follows:

[0203]

[0204] 4. When numSampL is greater than 0, the selected adjacent left chroma sample pSelC[idx] is set equal to p[-1][pickPosL[idx]], where idx = 0..cntL-1, and the selected downsampled adjacent left luma sample pSelDsY[idx], where idx = 0..cntL-1, is derived as follows:

[0205] —The variable y is set equal to pickPosL[idx].

[0206] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[0207] pSelDsY[idx]=pY[-1][y](372)

[0208] — Otherwise, the following applies:

[0209] - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies:

[0210]

[0211] Otherwise (sps_chroma_vertical_collocated_flag is equal to 0), the following applies:

[0212]

[0213] 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=0..cntL+cntT-1 is specified as follows:

[0214] —The variable x is set equal to pickPosT[idx-cntL].

[0215] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[0216] pSelDsY[idx]=pY[x][-1](375)

[0217] — Otherwise, the following applies:

[0218] - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies:

[0219] If bCTUboundary is equal to FALSE, the following applies:

[0220]

[0221] — Otherwise (bCTUboundary is TRUE), the following applies:

[0222]

[0223] Otherwise (sps_chroma_vertical_collocated_flag is equal to 0), the following applies:

[0224] If bCTUboundary is equal to FALSE, the following applies:

[0225]

[0226] — Otherwise (bCTUboundary is TRUE), the following applies:

[0227]

[0228] 6. When cntT+cntL is not equal to 0, the variables minY, maxY, minC, and maxC are derived as follows:

[0229] —When cntT+cntL is equal to 2, pSelComp[3] is set equal to pSelComp[0], pSelComp[2] is set equal to pSelComp[1], pSelComp[0] is set equal to pSelComp[1], pSelComp[1] is set equal to pSelComp[3], and Comp is replaced by DsY and C.

[0230] —The arrays minGrpIdx and maxGrpIdx are derived as follows:

[0231] minGrpIdx[0]=0(380)

[0232] minGrpIdx[1]=2(381)

[0233] maxGrpIdx[0]=1(382)

[0234] maxGrpIdx[1]=3(383)

[0235] —When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[minGrpIdx[1]], minGrpIdx[0] and minGrpIdx[1] are swapped as follows:

[0236] (minGrpIdx[0], minGrpIdx[1])=Swap(minGrpIdx[0], minGrpIdx[1(384)

[0237] —When pSelDsY[maxGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], maxGrpIdx[0] and maxGrpIdx[1] are swapped as follows:

[0238] (maxGrpIdx[0], maxGrpIdx[1])=Swap(maxGrpIdx[0], maxGrpIdx[1] (385)

[0240] —When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], the arrays minGrpIdx and maxGrpIdx are swapped as follows:

[0241] (minGrpIdx, maxGrpIdx) = Swap (minGrpIdx, maxGrpIdx) (386)

[0242] —When pSelDsY[minGrpIdx[1]] is greater than pSelDsY[maxGrpIdx[0]], minGrpIdx[1] and maxGrpIdx[0] are swapped as follows:

[0243] (minGrpIdx[1], maxGrpIdx[0])=Swap(minGrpIdx[1], maxGrpIdx[0]) (387)

[0245] —The variables maxY, maxC, minY, and minC are derived as follows:

[0246] maxY=(pSelDsY[maxGrpIdx[0]]+pSelDsY[maxGrpIdx[1]]+1)>>1(388)

[0247] maxC=(pSelC[maxGrpIdx[0]]+pSelC[maxGrpIdx[1]]+1)>>1(389)

[0248] minY=(pSelDsY[minGrpIdx[0]]+pSelDsY[minGrpIdx[1]]+1)>>1(390)

[0249] minC=(pSelC[minGrpIdx[0]]+pSelC[minGrpIdx[1]]+1)>>1(391)

[0250] 7. The variables a, b, and k are derived as follows:

[0251] — If numSampL is equal to 0 and numSampT is equal to 0, then the following applies:

[0252] k=0(392)

[0253] a=0(393)

[0254] b=1<<(BitDepth-1)(394)

[0255] — Otherwise, the following applies:

[0256] diff=maxY-minY(395)

[0257] — If diff is not equal to 0, the following applies:

[0258] diffC=maxC-minC(396)

[0259] x=Floor(Log2(diff))(397)

[0260] normDiff=((diff<<4)>>x)&15(398)

[0261] x+=(normDiff!=0)? 1:0(399)

[0262] y=Abs(diffC)>0? Floor(Log2(Abs(diffC)))+1:0(400)

[0263] a=(diffC×(divSigTable[normDiff]|8)+2 y-1 )>>y(401)

[0264] k=((3+xy)<1)? 1:3+xy(402)

[0265] a=((3+xy)<1)? Sign(a)×15:a(403)

[0266] b=minC-((a×minY)>>k)(404)

[0267] where divSigTable[] is specified as follows:

[0268] divSigTable[]={0, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0} (405)

[0269] — Otherwise (diff is equal to 0), the following applies:

[0270] k=0(406)

[0271] a=0(407)

[0272] b=minC(408)

[0273] 8. The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[0274] predSamples[x][y]=Clip1(((pDsY[x][y]×a)>>k)+b)(409)

[0275] NOTE - This process uses sps_chroma_vertical_collocated_flag. However, to simplify the implementation, it does not use sps_chroma_horizontal_collocated_flag.

[0276] 2.8. Block Differential Pulse Code Modulation (BDPCM)

[0277] BDPCM was proposed in JVET-M0057. Due to the shape of the horizontal (vertical) predictor, which uses the left (A) (top (B)) pixels to predict the current pixel, the most throughput-efficient way to process a block is to process all pixels of a column (row) in parallel and process these columns (rows) sequentially. To improve throughput, we introduce the following procedure: when the predictor selected on this block is vertical, the block of width 4 is split into two halves with a horizontal boundary; when the predictor selected on this block is horizontal, the block of height 4 is split into two halves with a vertical boundary.

[0278] When a block is partitioned, samples from one region are not allowed to use pixels from another region to compute a prediction: if this happens, the predicted pixel is replaced by a reference pixel in the prediction direction. This is done for different positions of the current pixel X in a vertically predicted 4×8 block. Figure 5 Shown in.

[0279] Figure 5 An example of partitioning a block of 4x8 samples into two independent decodable areas is shown.

[0280] Due to this feature, it is now possible to process a 4×4 block in 2 cycles, a 4×8 or 8×4 block in 4 cycles, and so on, as Figure 6 shown.

[0281] Figure 6 An example order of processing pixel rows to maximize throughput for a 4xN block with a vertical predictor is shown.

[0282] Table 2-3 summarizes the number of cycles required to process a block, depending on the block size, showing that any block with both dimensions greater than or equal to 8 can be processed with 8 pixels per cycle or more, which is easily solvable.

[0283] Table 2-3. Worst-case throughput for blocks of size 4×N, N×4

[0284]

[0285] 2.9. Quantized Residual Domain BDPCM

[0286] JVET-N0413 proposed quantized residual domain BDPCM (hereinafter referred to as RBDPCM). Intra-frame prediction is performed on the entire block by replicating samples in the prediction direction (horizontal or vertical prediction) similar to intra-frame prediction. The residual is quantized, and the delta between the quantized residual and its predictor (horizontal or vertical) quantized value is encoded and decoded.

[0287] For a block of size M (rows) × N (columns), let r i,j , 0≤i≤M-1, 0≤j≤N-1 is the prediction residual after performing intra prediction horizontally (copying the left adjacent pixel values ​​row by row across the prediction block) or vertically (copying the top adjacent row to each row in the prediction block) using the unfiltered samples from the upper or left block boundary samples. Let Q(r i,k ), 0≤i≤M-1, 0≤j≤N-1 represents the residual r i,j The quantized version of , where the residual is the difference between the original block value and the predicted block value. Block DPCM is then applied to the quantized residual samples to obtain a value with elements The modified M×N array of When vertical BDPCM is signaled:

[0288]

[0289] For horizontal prediction, similar rules are applied and the residual quantization samples are obtained by

[0290]

[0291] Residual quantization samples is sent to the decoder.

[0292] At the decoder side, the above calculation is inverted to produce Q(r i,j ),0≤i≤M-1,0≤j≤N-1. For vertical prediction,

[0293]

[0294] For the horizontal case,

[0295]

[0296] The inverse quantized residual Q -1 (Q(r i,j )) is added to the intra-block prediction value to generate the reconstructed sample value.

[0297] The main advantage of this scheme is that the inverse DPCM can be performed dynamically during coefficient analysis, simply by adding the predictor when the coefficients are analyzed, or it can be performed after analysis.

[0298] In quantized residual domain BDPCM, the transform skip method is often used.

[0299] 2.10. Multiple Transform Set (MTS) in VVC

[0300] In VTM, large block size transforms are enabled, up to 64×64, which is mainly used for higher resolution video, such as 1080p and 4K sequences. For transform blocks with a size (width or height, or both width and height) equal to 64, the high-frequency transform coefficients are zeroed, so that only the low-frequency coefficients are retained. For example, for an M×N transform block, where M is the block width and N is the block height, when M is equal to 64, only the left 32 columns of transform coefficients are retained. Similarly, when N is equal to 64, only the top 32 rows of transform coefficients are retained. When transform skip mode is used for large blocks, the entire block will be used without clearing any values. VTM also supports a configurable maximum transform size in SPS, allowing the encoder to flexibly select transform sizes up to 16 lengths, 32 lengths, or 64 lengths according to the needs of the specific implementation.

[0301] In addition to the DCT-II used in HEVC, the Multiple Transform Selection (MTS) scheme is also used for residual coding of blocks in inter- and intra-frame coding. It uses multiple selected transforms from DCT8 / DST7. The newly introduced transform matrices are DCT-VII and DCT-VIII. Tables 2-4 show the basis functions of the selected DST / DCT.

[0302] Table 2-4. Basic functions of DCT-II / VIII and DSTVII transforms for N-point input

[0303]

[0304]

[0305] To maintain the orthogonality of the transform matrix, the quantization of the transform matrix is ​​more accurate than that in HEVC. To keep the intermediate values ​​of the transformed coefficients within the 16-bit range, all coefficients should be 10 bits after horizontal and vertical transforms.

[0306] To control the MTS scheme, separate enable flags are specified at the SPS level for intra and inter frames. When MTS is enabled at the SPS, a CU-level flag is signaled to indicate whether MTS is applied. Here, MTS applies only to luma. The MTS CU-level flag is signaled when the following conditions are met.

[0307] - Both width and height are less than or equal to 32

[0308] -CBF flag equal to 1

[0309] If the MTS CU flag is equal to zero, DCT2 is applied in both directions. However, if the MTS CU flag is equal to 1, two other flags are additionally signaled to indicate the transform type for the horizontal and vertical directions, respectively. The transform and signaling mapping table is shown in Table 2-5. The transform selection of ISP is unified, and implicit MTS is used by eliminating the dependency on intra mode and block shape. If the current block is in ISP mode, or if the current block is an intra block and both intra and inter explicit MTS are turned on, only DST7 is used for both horizontal and vertical transform kernels. When it comes to transform matrix accuracy, an 8-bit main transform kernel is used. Therefore, all transform kernels used in HEVC remain unchanged, including 4-point DCT-2 and DST-7, 8-point, 16-point and 32-point DCT-2. Moreover, other transform kernels including 64-point DCT-2, 4-point DCT-8, 8-point, 16-point, 32-point DST-7 and DCT-8 use 8-bit main transform kernel.

[0310] Table 2-5. Transformation and signaling mapping table

[0311]

[0312]

[0313] To reduce the complexity of large-size DST-7 and DCT-8, high-frequency transform coefficients are zeroed for DST-7 and DCT-8 blocks with size (width or height, or both) equal to 32. Only coefficients in the 16×16 low-frequency region are retained.

[0314] As in HEVC, the residual of a block can be coded or decoded in transform skip mode. To avoid syntax coding redundancy, the transform skip flag is not signaled when the CU level MTS_CU_flag is not equal to zero. The block size restrictions for transform skip are the same as MTS in JEM4, which indicates that transform skip applies to CUs with both block width and block height equal to or less than 32. Note that when LFNST or MIP is activated for the current CU, the implicit MTS transform is set to DCT2. Moreover, when MTS is enabled for inter-frame coded blocks, implicit MTS can still be enabled.

[0315] 2.1.1. Low-Frequency Non-Separable Transform (LFNST)

[0316] In VVC, such as Figure 7As shown, the Low Frequency Non-Separable Transform (LFNST) is applied between the forward main transform and quantization (at the encoder) and between de-quantization and the inverse main transform (at the decoder side), and it is referred to as a simplified secondary transform. In the LFNST, a 4×4 non-separable transform or an 8×8 non-separable transform is adopted according to the block size. For example, the 4×4 LFNST is applied to small blocks (i.e., min(width, height) < 8), while the 8×8 LFNST is applied to larger blocks (i.e., min(width, height) > 4).

[0317] Figure 7 An example of the Low Frequency Non-Separable Transform (LFNST) process is shown.

[0318] Taking the input as an example below, the application of the non-separable transform used in the LFNST is described. To apply the 4×4 LFNST, the 4×4 input block X

[0319]

[0320] is first represented as a vector

[0321]

[0322] The non-separable transform is calculated as where indicates the transform coefficient vector, and T is a 16×16 transform matrix. Subsequently, the 16×1 coefficient vector is reorganized into a 4×4 block using the scan order (horizontal, vertical or diagonal) of the block. The coefficients with smaller indices are placed in the 4×4 coefficient block together with the smaller scan indices.

[0323] 2.11.1 Simplified Non-Separable Transform

[0324] The Low Frequency Non-Separable Transform (LFNST) applies the non-separable transform based on direct matrix multiplication, enabling it to be achieved in a single pass without multiple iterations. However, it is necessary to reduce the dimension of the non-separable transform matrix to minimize the computational complexity and the storage spatial domain for storing the transform coefficients. Therefore, the Simplified Non-Separable Transform (or RST) method is used in the LFNST. The main idea of the simplified non-separable transform is to map an N-dimensional vector (N for the 8×8 NSST usually equals 64) to an R-dimensional vector in a different space, where N / R (R < N) is the reduction factor. Thus, the RST matrix replaces the N×N matrix to become an R×N matrix as shown below:

[0325]

[0326] The R rows of the transform are the R basis of the N-dimensional space. The inverse transform matrix of the RT is the transpose of its forward transform. For 8×8 LFNST, a reduction factor of 4 is applied, reducing the traditional 8×8 non-separable transform matrix size of 64×64 to a 16×48 direct matrix. Therefore, a 48×16 inverse RST matrix is ​​used at the decoder to generate the core (primary) transform coefficients of the 8×8 upper left region. When using a 16×48 matrix with the same transform set configuration instead of a 16×64 matrix, each matrix takes 48 input data from the three 4×4 blocks in the upper left 8×8 block, excluding the lower right 4×4 block. With the help of dimensionality reduction, the memory usage of storing all LFNST matrices is reduced from 10KB to 8KB, with reasonable performance degradation. To reduce complexity, LFNST is restricted to only be applied when all coefficients outside the first coefficient subgroup are non-significant. Therefore, when LFNST is applied, all primary transform coefficients must be zero. This allows for the adjustment of LFNST index signaling at the least significant position, thus avoiding the additional coefficient scans required in current LFNST designs to check for significant coefficients only at specific positions. The worst-case handling of LFNST (in terms of per-pixel multiplications) restricts the non-separable transforms for 4×4 and 8×8 blocks to 8×16 and 8×48 transforms, respectively. In these cases, when applying LFNST, the least significant scan position must be less than 8, and less than 16 for other sizes. For blocks of shape 4×n and N×4 with N>8, the proposed restriction means that LFNST is now applied only once, and only to the top-left 4×4 region. When applying LFNST, the number of operations required for the main transform is reduced in this case, as all main-only coefficients are zero. From the encoder's perspective, the quantization of the coefficients is significantly simplified when testing the LFNST transform. The first 16 coefficients (in scan order) must be quantized for maximum rate distortion optimization, with the remaining coefficients forced to zero.

[0327] 2.11.2. LFNST Transform Selection

[0328] A total of 4 transform sets are used in LFNST, each using 2 inseparable transform matrices (kernels). The mapping from intra prediction modes to transform sets is predefined as shown in Table 2-6. If one of the three CCLM modes (INTRA_LT_CCLM, INTRA_T_CCLM, or INTRA_L_CCLM) is used for the current block (81 <= predModeIntra <= 83), transform set 0 is selected for the current chroma block. For each transform set, the selected inseparable auxiliary transform candidate is further specified by the LFNST index that is explicitly signaled. After the transform coefficients, the index is signaled once per CU in the bitstream.

[0329] Table 2-6. Transformation selection table

[0330] IntraPredMode Tr set index IntraPredMode<0 1 0<=IntraPredMode<=1 0 2<=IntraPredMode<=12 1 13<=IntraPredMode<=23 2 24<=IntraPredMode<=44 3 45<=IntraPredMode<=55 2 56<=IntraPredMode<=80 1 81<=IntraPredMode<=83 0

[0331] 2.11.3.LFNST Index Signaling and Its Interaction with Other Tools

[0332] Since LFNST is restricted to being applicable only when all coefficients outside the first coefficient subgroup are non-significant, the LFNST index encoding depends on the position of the last significant coefficient. In addition, the LFNST index is context-encoded, but does not depend on the intra prediction mode, and only the first binary number is context-encoded. In addition, LFNST is applied to intra CUs in both intra and inter slices and for both luma and chroma. If binary tree is enabled, the LFNST indexes for luma and chroma are signaled separately. For inter slices (binary tree disabled), a single LFNST index is signaled and used for both luma and chroma.

[0333] When ISP mode is selected, LFNST is disabled and the RST index is not signaled, as even if RST is applied to every feasible partition, the performance improvement is minimal. In addition, disabling RST for ISP prediction residuals can reduce coding complexity. When MIP mode is selected, LFNST is also disabled and the index is not signaled.

[0334] Considering that due to the existing maximum transform size limit (64×64), larger CUs than 64×64 are implicitly split (TU tiling), LFNST index search can increase the data buffer by four times for a certain number of decoding pipeline stages. Therefore, the maximum size allowed by LFNST is limited to 64×64. Note that LFNST is only enabled in DCT2.

[0335] 2.12. Transform Skip for Chroma

[0336] Chroma Transform Skip (TS) was introduced in VVC. The motivation was to unify TS and MTS signaling between luma and chroma by relocating transform_skip_flag and mts_idx to the residual_coding section. A context model was added for the chroma TS. The context model and binarization for mts_idx remained unchanged. Furthermore, TS residual codec was applied when using the chroma TS.

[0337] Semantics

[0338] transform_skip_flag[x0][y0][cIdx] specifies whether the transform is applied to the associated luma transform block. Array indices x0, y0 specify the position (x0, y0) of the top-left luma sample of the transform block under consideration relative to the top-left luma sample of the picture. transform_skip_flag[x0][y0][cIdx] equal to 1 specifies that no transform is applied to the current luma transform block. Array index cIdx specifies the indicator of the color component; equal to 0 for luma, 1 for Cb, and 2 for Cr. transform_skip_flag[x0][y0][cIdx] equal to 0 specifies that whether the transform is applied to the current transform block depends on other syntax elements. When transform_skip_flag[x0][y0][cIdx] is not present, it is inferred to be equal to 0.

[0339] BDPCM for Chroma

[0340] In addition to chroma TS support, BDPCM is added to the chroma component. If sps_bdpcm_enable_flag is 1, another syntax element, sps_bdpcm_chroma_enable_flag, is added to the SPS. These flags have the following behavior, as shown in Table 2-7.

[0341] Table 2-7. SPS flags for luminance and chrominance BDPCM

[0342]

[0343] When BDPCM is only applied to luma, the current behavior is unchanged. When BDPCM is also applied to chroma, a bdpcm_chroma_flag is sent for each chroma block. This indicates whether BDPCM is used on the chroma block. When enabled, BDPCM is used for both chroma components, and an additional bdpcm_dir_chroma flag is encoded, indicating the prediction direction used for both chroma components.

[0344] The deblocking filter is deactivated on the boundary between two Block-DPCM blocks, since neither block uses the transform stage that is usually responsible for blocking artifacts. This deactivation occurs independently for the luma and chroma components.

[0345] 3. Examples of technical problems solved by the disclosed solutions

[0346] The current design of linear parameter derivation in CCLM and TS has the following problems:

[0347] 1. For non-4:4:4 color formats, the derivation of linear parameters in CCLM involves adjacent chroma samples and downsampled co-located adjacent luminance samples. Figure 8 As shown in Figure 2, in the current VVC, when the nearest row is not at a CTU boundary, the second row above the current block of 4:2:2 video is used to derive the downsampled co-located adjacent top luma sample. However, for 4:2:2 video, the vertical resolution remains unchanged. Therefore, there is a phase shift between the downsampled co-located adjacent top luma sample and the adjacent chroma samples.

[0348] Figure 8 An example of adjacent chroma samples and downsampled co-located adjacent luma samples used in the derivation of CCLM parameters for 4:2:2 video is shown.

[0349] 2. In the current VVC, for the signaling of the luma transform skip flag and the signaling of the chroma transform skip flag, the same maximum block size is used in the conditional check. This design does not take the color format into consideration, which is not desirable.

[0350] a. A similar problem exists for the signaling of the luma BDPCM flag and the signaling of the chroma BDPCM flag, where the same maximum block size is used in the conditional check.

[0351] 3. In VVC as specified in JVET-Q2001-vE, the left neighboring sample is placed before the upper neighboring sample in the selected neighboring sample list. However, it may be better to place the upper neighboring sample before the left neighboring sample.

[0352] 4. In VVC specified in JVET-Q2001-vE, two adjacent rows of luma samples are allocated. However, when sps_chroma_vertical_collocated_flag is equal to 1, three adjacent rows of luma samples are required.

[0353] 5. In VVC specified in JVET-Q2001-vE, when the left-neighboring luma sample is not available, the left-neighboring luma sample is padded with the leftmost sample of the current block, and the top-neighboring luma sample is padded with the top-left-neighboring luma sample. However, the top-neighboring luma sample has not yet been derived. For example, in JVET-Q2001-VE.

[0354] "—When availL is equal to FALSE, the adjacent left luma sample pY[x][y] where x = -1..-3, y = -1..SubHeightC×numSampL-1 is set equal to the luma sample pY[0][y].

[0355] - When numSampT is greater than 0, the adjacent top luma sample pY[x][y] where x = 0..SubWidthC×numSampT-1, y = -1..-2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[0356] 6. In VVC specified in JVET-Q2001-vE, when the top (or / and left) neighboring luma samples are not available, they are incorrectly derived. For example, in JVET-Q2001-vE, "when availT is equal to FALSE, the neighboring top luma sample pY[x][y] where x = -1..SubWidthC×numSampT-1, y = -1..-2 is set equal to luma sample pY[x][0]" is used to derive the top neighboring luma samples when they are not available. However, when the top neighboring luma sample is not available, numSampT is set to 0.

[0357] 7. In the current VVC, when the top and left neighboring luminance samples are available, the top left neighboring luminance sample is used for the derivation of CCLM parameters, but when the top and left neighboring luminance samples are in different strips (for example, in the case of raster strips), the top left neighboring luminance sample is not available.

[0358] 4. List of Examples and Techniques

[0359] The following list should be considered as examples to explain the general concept. These items should not be interpreted narrowly. In addition, these items can be combined in any way.

[0360] In this article, the term "CCLM" refers to a codec that uses cross-color component information to predict the samples / residuals of the current color component or to derive the reconstruction of the samples in the current color component. It is not limited to the CCLM technology described in VVC.

[0361] Derivation of linear parameters in CCLM

[0362] 1. When deriving CCLM parameters for a chroma block, one or more upper neighboring rows of its co-located luma block may be used to derive its downsampled co-located top luma samples.

[0363] a. In one example, when the current chroma block is not at the top CTU boundary, the nearest upper row of the co-located luma block, rather than the second row above, can be used to derive the downsampled co-located adjacent top luma sample.

[0364] i. In one example, a same downsampling filter can be used to derive the downsampled co-located adjacent top luma samples and the downsampled co-located adjacent left luma samples.

[0365] 1) For example, a [1 2 1] filter can be used. More specifically, pDsY[x] = (pY[2×x-1][-1] + 2×pY[2×x][-1] + pY[2×x+1][-1] + 2) >> 2, where pY[2×x][-1], pY[2×x-1][-1], and pY[2×x+1][-1] are luma samples from the nearest upper adjacent row, and pDsY[x] represents the downsampled co-located adjacent top luma sample.

[0366] ii. In one example, different downsampling filters (eg, different filter taps / different filter coefficients) may be used to derive the downsampled co-located adjacent top luma samples and the downsampled co-located adjacent left luma samples.

[0367] iii. In one example, a same downsampling filter may be used to derive the downsampled co-located adjacent top luma samples regardless of the location of the chroma blocks (e.g., the chroma blocks may or may not be at the top CTU boundary).

[0368] iv. In one example, the above method can be applied only to pictures / videos in 4:2:2 format.

[0369] b. In one example, when the current chroma block is not at the top CTU boundary, the upper neighboring luma samples, including the nearest upper row of the co-located luma block but excluding the second row above, can be used to derive the downsampled co-located upper neighboring luma samples.

[0370] c. In one example, the derivation of downsampled co-located adjacent top luma samples may depend on samples located at multiple rows.

[0371] i. In one example, it may rely on the second nearest row and the nearest row above the co-located luma block.

[0372] ii. In one example, for different color formats (eg, 4:2:0 and 4:2:2), a same downsampling filter can be used to derive downsampled co-located adjacent top luma samples.

[0373] 1) In one example, a 6-tap filter (eg, [1 2 1; 1 2 1]) may be used.

[0374] a) In one example, the downsampled co-located adjacent top luma sample may be derived as: pDsY[x]=(pY[2×x-1][-2]+2×pY[2×x][-2]+pY[2×x-1][-1]+2×pY[2×x][-1]+pY[2×x+1][-1]+pY[2×x+1][-1]+4)>>3, where pY is the corresponding luma sample and pDsY[x] represents the downsampled co-located adjacent top luma sample.

[0375] b) Alternatively, also when sps_cclm_colocated_chroma_flag is equal to 0, the above method may be applied.

[0376] 2) In one example, a 5-tap filter may be used (eg, [0 1 0; 1 4 1; 0 1 0]).

[0377] a) In one example, the downsampled co-located adjacent top luma sample may be derived as: pDsY[x]=(pY[2×x][-2]+pY[2×x][-1]+4×pY[2×x][-1]+pY[2×x+1][-1]+pY[2×x][0]+4)>>3, where pY is the corresponding luma sample and pDsY[x] represents the downsampled co-located adjacent top luma sample.

[0378] b) Alternatively, also when sps_cclm_colocated_chroma_flag is equal to 1, the above method may be applied.

[0379] iii. In one example, the above method can be applied only to pictures / videos in 4:2:2 format.

[0380] Change the maximum block size for skipping codec blocks (e.g., in the case where transform_skip_flag is equal to 1, or in BDPCM or other modes that skip transform processing / use a signature transform)

[0381] 2. The maximum block size of a transform skip codec block may depend on the color component. The maximum block size of transform skip codec blocks for luma and chroma are denoted by MaxTsSizeY and MaxTsSizeC respectively.

[0382] a. In one example, the maximum block sizes for luma and chroma components may be different.

[0383] b. In one example, the maximum block size for the two chroma components may be different.

[0384] c. In one example, the maximum block size for luma and chroma components or for each color component may be signaled separately.

[0385] i. In one example, MaxTsSizeC / MaxTsSizeY may be signaled at the sequence level / picture level / slice level / slice group level, such as in the sequence header / picture header / SPS / VPS / DPS / PPS / APS / slice header / slice group header.

[0386] ii. In one example, MaxTsSizeY may be signaled conditionally, such as depending on whether transform skip is enabled / BDPCM is enabled.

[0387] iii. In one example, MaxTsSizeC may be signaled conditionally, such as depending on color format / transform skip enabled / BDPCM enabled.

[0388] iv. Alternatively, a predictive codec between the maximum block sizes for luma and chroma components may be used.

[0389] d. In one example, MaxTsSizeC may depend on MaxTsSizeY.

[0390] i. In one example, MaxTsSizeC may be set equal to MaxTsSizeY.

[0391] ii. In one example, MaxTsSizeC may be set equal to MaxTsSizeY / N (N is an integer), for example, N=2.

[0392] e. In one example, MaxTsSizeC can be set according to the chroma subsampling ratio.

[0393] i. In one example, MaxTsSizeC is set equal to MaxTsSizeY>>SubWidthC, where SubWidthC is defined in Table 2-1.

[0394] ii. In one example, MaxTsSizeC is set equal to MaxTsSizeY>>SubHeightC, where SubHeightC is defined in Table 2-1.

[0395] iii. In one example, MaxTsSizeC is set equal to MaxTsSizeY>>max(SubWidthC, SubHeightC).

[0396] iv. In one example, MaxTsSizeC is set equal to MaxTsSizeY>>min(SubWidthC, SubHeightC).

[0397] 3. The maximum allowed block size, width and height of the transform codec block can be defined differently.

[0398] a. In one example, the maximum allowed block size width and height can be signaled separately.

[0399] b. In one example, the maximum allowed block size width and height of the chroma transform codec block can be expressed as MaxTsSizeWC and MaxTsSizeHC, respectively. MaxTsSizeWC can be set equal to MaxTsSizeY>>SubWidthC, and MaxTsSizeHC can be set equal to MaxTsSizeY>>SubHeightC.

[0400] i. In one example, MaxTsSizeY is that defined in bullet 2.

[0401] 4. Whether to signal the transform skip flag for chroma blocks (e.g., transform_skip_flag[x0][y0][1] and / or transform_skip_flag[x0][y0][2]) may depend on the maximum allowed size of the chroma transform skip codec block.

[0402] a. In one example, the chroma transform skip flag may be conditionally signaled based on the following conditions:

[0403] i. In one example, the condition is: tbW is less than or equal to MaxTsSizeC and tbH is less than or equal to MaxTsSizeC, where tbW and tbH are the width and height of the current chroma block.

[0404] 1) In one example, MaxTsSizeC may be defined as that in bullet points 2-3.

[0405] ii. In one example, the condition is: tbW is less than or equal to MaxTsSizeWC and tbH is less than or equal to MaxTsSizeHC, where tbW and tbH are the width and height of the current chroma block, and MaxTsSizeWC and MaxTsSizeHC represent the maximum allowed block size width and height of the chroma transform skip codec block, respectively.

[0406] 1) In one example, MaxTsSizeWC and / or MaxTsSizeHC may be defined as in bullet point 3.

[0407] b. In one example, the above method can be applied to the encoding and decoding of the chroma BDPCM flag (eg, intra_bdpcm_chroma_flag) by replacing "transform skip" with "BDPCM".

[0408] 5. It is proposed to use one syntax to indicate the use of TS for two chrominance color components, rather than encoding and decoding two TS flags for two chrominance color components.

[0409] a. In one example, instead of encoding and decoding transform_skip_flag[x0][y0][1] and / or transform_skip_flag[x0][y0][2]), a single syntax element (eg, TS_chroma_flag) may be encoded and decoded.

[0410] i. In one example, the value of a single syntax element is a binary value.

[0411] 1) Furthermore, alternatively, two chroma component blocks share the same TS mode on / off control according to a single syntax element.

[0412] a) In one example, a single syntax element with a value equal to 0 indicates that TS is disabled for both.

[0413] b) In one example, a single syntax element with a value equal to 0 indicates that TS is enabled for both.

[0414] 2) In addition, alternatively, the second syntax element may be further signaled based on whether the value of the single syntax element is equal to K (eg, K=1).

[0415] a) In one example, a single syntax element with a value equal to 0 indicates that TS is disabled for both; a single syntax element with a value equal to 0 indicates that TS is enabled for at least one of the two chroma components.

[0416] b) The second syntax element may be used to indicate to which of the two chroma components the TS is applied and / or that the TS is applied to both of them.

[0417] ii. In one example, the value of a single syntax element is a non-binary value.

[0418] 1) In one example, a single syntax element with a value equal to K0 indicates that TS is disabled for both.

[0419] 2) In one example, a single syntax element with a value equal to K1 indicates that TS is enabled for the first chroma color component and disabled for the second color component.

[0420] 3) In one example, a single syntax element with a value equal to K2 indicates that TS is disabled for the first chroma color component and enabled for the second color component.

[0421] 4) In one example, a single syntax element with a value equal to K3 indicates that TS is enabled for both.

[0422] 5) In one example, a single syntax element can be encoded and decoded using fixed-length, unary, truncated unary, and k-order EG binarization methods.

[0423] iii. In one example, the single syntax element and / or the second syntax element may be context coded or bypass coded.

[0424] General Statement

[0425] 6. Whether and / or how to apply the above disclosed method can be signaled at the sequence level / picture level / slice level / slice group level, such as in the sequence header / picture header / SPS / VPS / DPS / PPS / APS / slice header / slice group header.

[0426] 7. Whether and / or how to apply the above disclosed method depends on codec information, such as color format, single tree / binary tree partitioning.

[0427] Additional statement to CCLM

[0428] 8. During CCLM parameter derivation, the upper neighboring sample point is placed in a selected neighboring sample point list before the left neighboring sample point, and the CCLM parameters are deduced using the selected neighboring sample point list (e.g., using a four-point derivation method where the two larger values ​​are averaged, the two smaller values ​​are averaged, and the two averages are used to derive the linear parameters). An example is demonstrated in Example 5.

[0429] 9. During CCLM parameter derivation, when the downsampled upper adjacent luma sample denoted as pSelDsY[idx] is obtained, the index value idx shall be in the range of cntL to cntL+cntT-1, where cntL and cntT represent the number of left adjacent chroma samples and upper adjacent chroma samples, respectively, used to derive CCLM parameters.

[0430] a. An example is demonstrated in Example 5.

[0431] b. Additionally, alternatively, the left neighboring sample point is placed in the selected neighboring sample point list before the upper neighboring sample point.

[0432] 10. During the CCLM parameter derivation process, three rows of adjacent luminance samples are allocated. An example is demonstrated in Example 6.

[0433] 11. During CCLM parameter derivation, the upper left adjacent luminance samples of row T1 and column T2 are allocated.

[0434] a. In one example, T1 = 2 and T2 = 2. An example is demonstrated in Example 12.

[0435] b. In one example, T1=3 and T2=3.

[0436] 12. During CCLM parameter derivation, the number of rows of upper luma neighboring samples to allocate may depend on a variable or syntax element indicating whether the chroma sample positions are not vertically shifted relative to the corresponding luma sample positions, such as sps_chroma_vertical_collocated_flag in JVET-Q2001-vE.

[0437] a. In one example, when sps_chroma_vertical_collocated_flag is equal to 1, three rows of upper adjacent luma samples are allocated. Otherwise, two rows of upper adjacent luma samples are allocated. An example is demonstrated in Example 7.

[0438] 13. In the above example, adjacent luminance samples may be adjacent luminance samples before downsampling or adjacent luminance samples after downsampling.

[0439] 14. In the CCLM parameter derivation process, whether and / or how to fill the upper left neighboring sample points may depend on the availability of at least one of the upper left neighboring sample points, rather than the availability of the left neighboring sample points and / or the upper neighboring sample points.

[0440] a. In one example, the availability of at least one of the upper left neighboring samples may depend on whether at least one of the upper left neighboring samples and the samples in the current block are in the same slice or in different slices.

[0441] i. In addition, the strips can be rectangular or non-rectangular.

[0442] b. In one example, if at least one of the upper left neighboring sample and the samples in the current block are in different slices, the upper left neighboring sample is padded.

[0443] c. In one example, if the availability of at least one upper left neighboring sample point is false, fill the upper left neighboring sample point.

[0444] 15. During CCLM parameter derivation, when the upper left adjacent luminance samples are “unavailable”, they may not be used.

[0445] a. In one example, a neighboring sample is "unavailable" if it is outside the current picture, or current sub-picture, or current slice, or current slice, or current tile, or current CTU, or current processing unit, or any other current video unit.

[0446] i. In one example, for Figure 13 For the non-rectangular stripe case shown, the upper left adjacent luma sample that is in a different stripe than the current block is "unavailable".

[0447] b. In one example, whether the top left neighboring luma samples are used in the CCLM process may depend on whether they are in the same picture / sub-picture / slice / slice / brick / CTU / processing unit / other video unit as the current block.

[0448] i. In one example, when the top left neighboring luma samples are in a different raster strip than the current block, they may not be used in the CCLM process.

[0449] 1) An example is demonstrated in Example 10.

[0450] ii. In one example, the top left neighboring luma samples may not be used in the CCLM process even though they are in the same picture / sub-picture / slice / slice / brick / CTU / processing unit / other video unit as the current block.

[0451] c. During CCLM parameter derivation, when the upper left adjacent luma sample is "unavailable", repeated padding can be used to generate the upper left adjacent luma sample. Let (x, y) denote the upper left sample position of the current block. Let pY[i][j] denote the reconstructed luma sample before the deblocking filter process. Let pD[m][n] denote the padded upper left luma sample, where m = x-1...xM, n = y-1...yN, where m and n are integers such as 1.

[0452] i. In one example, when left or / and top adjacent luma samples are available, a repeat padding method can be used.

[0453] ii. In one example, when the top-neighboring luma sample is available, the top-left-neighboring luma sample may be filled from the top-neighboring luma sample.

[0454] 2) In one example, pD[m][n]=pY[x][n].

[0455] iii. In one example, when the left adjacent luma samples are available, the top left adjacent luma samples may be filled from the left adjacent luma samples.

[0456] 3) In one example, pD[m][n]=pY[m][y].

[0457] iv. In one example, when the top-neighboring luma samples are available and the left-neighboring luma samples are available, the top-left-neighboring luma samples may be filled from the top-neighboring luma samples.

[0458] 4) In one example, pD[m][n]=pY[x][n].

[0459] v. Alternatively, when the top-neighboring luma samples are available and the left-neighboring luma samples are available, the top-left-neighboring luma samples may be filled from the left-neighboring luma samples.

[0460] 5) In one example, pD[m][n]=pY[m][y].

[0461] vi. In one example, M=2, N=2, or M=3, N=3.

[0462] d. Alternatively, when the top left adjacent luma samples are "unavailable", they can be replaced by predefined values.

[0463] i. In one example, the predetermined value may be equal to a constant value, such as 128.

[0464] ii. In one example, the predefined value may be derived using the left or / and top adjacent luma samples.

[0465] 6) In one example, the predefined value may be equal to the average value of the adjacent luminance samples on the left or / and top.

[0466] iii. In one example, the predefined value may depend on the bit depth of the sample. For example, the predefined value may be equal to 1<<(BD-1), where BD represents the bit depth of the sample.

[0467] e. Alternatively, even if the upper left adjacent luma sample is "available", the above filling method in bullet 14.c and the predefined value in bullet 14.d may be used to replace the available upper left adjacent luma sample.

[0468] i. An example is demonstrated in Example 11.

[0469] f. In one example, whether to check the availability of the top left neighboring luma sample may depend on whether the left neighboring luma sample is available or / and whether the top neighboring luma sample is available.

[0470] i. In one example, the availability of the top-left neighboring luma sample is checked only when both the left-neighboring luma sample and the top-neighboring luma sample are available. An example is shown in Embodiment 17.

[0471] g. In one example, whether and / or how to use or fill the top left neighboring luma samples may depend on the availability of the top left, or / and left, or / and top neighboring luma samples.

[0472] i. In one example, the top-left neighboring luma sample may be used only if the top-left neighboring luma sample is available.

[0473] ii. In one example, the top-left adjacent luma sample can be used only when the top-left, left, and top adjacent luma samples are available. An example is shown in Example 18.

[0474] iii. In one example, when left and / or top neighboring luma samples are available, the top left neighboring luma samples may be filled.

[0475] 1) In one example, the top-left neighboring luma sample may be filled only if the left or top neighboring luma sample is available and the top-left neighboring luma sample is not available.

[0476] 2) In one example, the top-left neighboring luma sample may be filled only if the left and top neighboring luma samples are available and the top-left neighboring luma sample is not available.

[0477] 3) In one example, the top adjacent luma sample can be used to fill the upper left adjacent luma sample. The upper left adjacent luma sample pY[x][y] where x=-1,-2, y=-1,-2 is set equal to the luma sample pY[0][y]. An example is shown in Example 18.

[0478] 4) In one example, the top adjacent luma sample can be used to fill the upper left adjacent luma sample. The upper left adjacent luma sample pY[x][y] where x=-1,-2, y=-1,-2 is set equal to the luma sample pY[x][0]. An example is shown in Example 19.

[0479] 5) In one example, the top left adjacent luma samples may be filled with the top and left adjacent luma samples.

[0480] h. In one example, whether to check the availability of the upper left neighboring luma sample, or / and use the upper left neighboring luma sample, or / and fill the upper left neighboring luma sample may depend on the chroma color format.

[0481] i. In one example, when using a 4:4:4 color format, there is no need to check the availability of the upper left adjacent luma sample, or / and use the upper left adjacent luma sample, or / and fill the upper left adjacent luma sample. An example is shown in Embodiment 20.

[0482] i. In one example, whether to fill the upper left adjacent luma sample and / or which samples need to be filled may depend on a variable or syntax element indicating whether the chroma sample position is not vertically shifted relative to the corresponding luma sample position, such as sps_chroma_vertical_collocated_flag in JVET-Q2001-vE.

[0483] i. In one example, when sps_chroma_vertical_collocated_flag is equal to 1, the upper left adjacent luma samples are filled. Otherwise, the upper left adjacent samples are not filled. An example is demonstrated in Example 14.

[0484] 16. In the CCLM process, when the top (or / and left) neighboring luma samples are not available, the top (or / and left) neighboring luma samples are derived using the topmost (or / and leftmost) samples of the current block. And the top-left neighboring samples can be derived using the available left (or / and top) neighboring luma samples.

[0485] a. In one example, when the top-neighboring luma sample is not available, the top and top-left-neighboring luma samples can be derived using the topmost sample and the left-neighboring luma sample of the current block.

[0486] i. In one example, the top adjacent luma sample pY[x][y] where x=0..SubWidthC×nTbW-1, y=-1..-2 is set equal to the luma sample pY[x][0]. And the top left adjacent luma sample pY[x][y] where x=-1, y=-1..-2 is set equal to the luma sample pY[x][0], where pY[0][0] represents the top left sample of the current block, nTbW represents the width of the current block, and SubWidthC is defined in 2.1.

[0487] ii. In one example, the top adjacent sample pY[x][y] where x=0..SubWidthC×nTbW-1, y=-1..-N is set equal to the luma sample pY[x][0]. And the top left adjacent luma sample pY[x][y] where x=-M..-1, y=-1..-N is set equal to the luma sample pY[x][0], where pY[0][0] represents the top left sample of the current block, nTbW represents the width of the current block, and SubWidthC is defined in 2.1. An example is demonstrated in Example 13.

[0488] 1) In one example, M and N are integers, such as M=2 and N=3.

[0489] 2) In one example, M may depend on the chroma color format, such as M=SubWidthC, which is defined in 2.1.

[0490] 3) In one example, a maximum of T top-left adjacent luma samples may be filled, where T is an integer (such as 1).

[0491] a) In one example, pY[-M][-1]=pY[-M][0], where M=1 or M=SubWidthC.

[0492] b. In one example, when the left-neighboring luma samples are not available, the leftmost sample and the top-neighboring luma samples of the current block may be used to derive the left and top-left-neighboring luma samples.

[0493] i. In one example, the left adjacent luma sample pY[x][y] where x=0..-3, y=-1..SubHeightC×nTbH-1 is set equal to the luma sample pY[0][y]. And the top left adjacent luma sample pY[x][y] where x=0..-3, y=-1 is set equal to the luma sample pY[0][y], where pY[0][0] represents the top left sample of the current block, nTbH represents the height of the current block, and SubHeightC is defined in 2.1.

[0494] ii. In one example, the left adjacent luma sample pY[x][y] where x=-1..-M, y=0..SubHeightC×nTbH-1 is set equal to the luma sample pY[0][y]. And the top left adjacent luma sample pY[x][y] where x=-1..-M, y=-1..-N is set equal to the luma sample pY[0][y], where pY[0][0] represents the top left sample of the current block, nTbH represents the height of the current block, and SubHeightC is defined in 2.1. An example is demonstrated in Example 15.

[0495] 1) In one example, M and N are integers, such as M=2, N=3.

[0496] 2) In one example, M may depend on the chroma color format, such as N=SubHeightC, which is defined in 2.1.

[0497] 3) In one example, a maximum of T top-left adjacent luma samples may be filled, where T is an integer (such as 1).

[0498] a) In one example, pY[-1][-N]=pY[0][-N], where N=1 or N=SubHeightC.

[0499] b) Alternatively, T is equal to 2. pY[-1][-1]=pY[0][-1], pY[-1][-2]=pY[0][-2].

[0500] iii. In one example, the upper left adjacent luma sample may be filled after the top adjacent luma sample is derived. An example is demonstrated in Example 16.

[0501] c. In one example, in the process of filling the top (or / and left) neighboring luma samples, the top left neighboring luma samples derived in item 13 may be used.

[0502] d. In one example, whether to fill the top (or / and left) adjacent luma (or chroma) samples and / or which adjacent samples need to be filled depends on the chroma color format.

[0503] i. In one example, when using a 4:4:4 color format, it is not necessary to fill the top (or / and left) adjacent luma samples. An example is shown in Example 21.

[0504] e. In one example, when filling the top (or / and left) adjacent luma samples, the top left adjacent luma samples are filled using the method in 15 (such as 15.c). An example is shown in Example 22.

[0505] 17. During CCLM prediction, the top adjacent samples, left adjacent samples, and upper left adjacent samples can be filled in a fixed order. The adjacent samples can be luminance samples or chrominance samples.

[0506] a. For example, the order may be top adjacent dot fill, left adjacent dot fill, and upper left adjacent dot fill.

[0507] b. For example, the order may be left adjacent fill, top adjacent sample point fill, and top left adjacent sample point fill.

[0508] c. For example, the order may be upper left adjacent fill, top adjacent sample point fill, and left adjacent sample point fill.

[0509] d. For example, the order may be top left adjacent fill, left adjacent sample point fill, and top adjacent sample point fill.

[0510] The downsampling process in CCLM for 18.4:2:2 color format video can be decoupled from a syntax element or variable (such as sps_chroma_vertical_collocated_flag in JVET-Q2001-vE) that indicates whether the chroma sample positions are vertically shifted relative to the corresponding luma sample positions.

[0511] a. In one example, the downsampling process may refer to downsampling the adjacent upper luma samples, or / and downsampling the adjacent left luma samples, or / and downsampling the samples in the current luma block.

[0512] b. In one example, regardless of whether sps_chroma_vertical_collocated_flag is equal to 1 or 0, a fixed filter (such as a 3-tap horizontal filter with coefficients [1 / 4, 2 / 4, 1 / 4] or [2 / 8, 4 / 8, 2 / 8]) can be used for the downsampling process in CCLM of 4:2:2 color format video. An example is shown in Examples 27 and 28.

[0513] 19. In one example, a variable or syntax element indicating whether the chroma sample positions are vertically shifted relative to the corresponding luma sample positions (e.g., sps_chroma_vertical_collocated_flag in JVET-Q2001-vE) may be set to a default value, such as 0 or 1 for 4:2:2 and / or 4:4:4:4 color formats.

[0514] a. In one example, when sps_chroma_vertical_collocated_flag is not present, it can be inferred to be equal to 1.

[0515] b. In one example, when sps_chroma_vertical_collocated_flag is not present, it can be inferred to be equal to 0.

[0516] 20. In the CCLM process, a variable representing an adjacent luminance sample can be used only when the variable is set to a valid value. An example is shown in Embodiment 29 and Embodiment 30.

[0517] a. In one example, the variable representing the adjacent above luma sample can be set equal to the reconstructed luma sample before the deblocking filtering process.

[0518] i. In one example, when the adjacent above luma sample is available (e.g., availT is equal to true in JVET-Q2001-vE), the variable representing the adjacent above luma sample denoted by pY[x][y] is set equal to the reconstructed luma sample before the deblocking filtering process at the position (xTbY+x, yTbY+y), where (xTbY, yTbY) represents the upper left position of the current block.

[0519] 1) In one example, x and y can be in the range of x=0...SubWidthC×max(numSampT, nTbW)-1, y=-1, -2, where nTbW represents the width of the current block, and SubWidthC is defined in 2.1, and numSampT indicates the number of adjacent chroma samples available in the top and upper right corners and is defined in JVET-Q2001-vE.

[0520] b. In one example, the variable representing the adjacent left luma sample may be set equal to the reconstructed luma sample before the deblocking filtering process.

[0521] i. In one example, when the adjacent left luma sample is available (e.g., availL is equal to true in JVET-Q2001-vE), the variable representing the adjacent left luma sample denoted by pY[x][y] is set equal to the reconstructed luma sample before the deblocking filtering process at the position (xTbY+x, yTbY+y), where (xTbY, yTbY) represents the upper left position of the current block.

[0522] 1) In one example, x and y can be in the range of x=-1..-3, y=0..SubHeightC×max(numSampL,nTbH)-1, where nTbH represents the width of the current block, and SubHeightC is defined in 2.1, and numSampL indicates the number of adjacent chroma samples available on the left and bottom left, and is defined in JVET-Q2001-vE.

[0523] 21. The slice type of a slice may depend on the reference picture entries of the slice.

[0524] a. In one example, if the number of reference picture entries of list 0 is equal to 0, and the number of reference picture entries of list 1 is equal to 0, then the slice type must be I slice.

[0525] i. In one example, the slice type is not signaled in this case.

[0526] b. In one example, if the number of reference picture entries of list 0 is greater than 0, and the number of reference picture entries of list 1 is equal to 0, then the slice type must be a P slice.

[0527] i. Alternatively, if the number of reference picture entries of list 0 is greater than 0, and the number of reference picture entries of list 1 is equal to 0, the slice type cannot be a B slice.

[0528] ii. In one example, the slice type is not signaled in this case.

[0529] c. The reference picture entries for a slice may be signaled or inferred before the slice type is signaled or inferred.

[0530] i. The reference picture entries for a slice may be signaled in the picture header associated with the picture.

[0531] 22. The total number of filters allowed in an APS or the total number of APSs may be limited according to coded information (such as the number of sub-pictures).

[0532] a. The total number of filters allowed in an APS may include the total number of ALFs in all APS NAL units with PUs, luma / chroma ALFs, and CC-ALFs in an APS.

[0533] b. The total number of filters allowed in an APS may include the total number of adaptive loop filter classes for luma components (or luma ALF filters), the total number of alternative filters for chroma components (chroma ALF filters), and / or the total number of cross-component filters in all APS NAL units with PUs.

[0534] c.APS is ALF APS / Scaled List APS / LMCS APS.

[0535] d. How to signal the APS ID, and / or the number of APSs to be used by the video unit depends on the number of restrictions.

[0536] 23. Conformant bitstreams shall follow the following rules: If BDPCM is enabled for a video unit (e.g., sequence / picture / slice / slice / brick / sub-picture), symbol data hiding shall be disabled.

[0537] a. Alternatively, the conforming bitstream should follow the following rule, if symbol data hiding is enabled for a video unit (e.g., sequence / picture / slice / slice / brick / sub-picture), then BDPCM is disabled.

[0538] 24. Conformant bitstreams shall follow the following rules: If transform skipping / codec tools that only apply signature transforms are enabled for a video unit (e.g., sequence / picture / slice / tile / sub-picture), symbol data hiding shall be disabled.

[0539] a. Alternatively, the conforming bitstream should follow the following rule, if symbol data hiding is enabled for a video unit (e.g. sequence / picture / slice / tile / sub-picture), then only transform skipping / codec tools that identify transforms are applied are disabled.

[0540] 25. Conformant bitstreams should follow the following rules: If BDPCM is enabled for a video unit (e.g., sequence / picture / slice / slice / brick / sub-picture), DQ (dependent quantization) is disabled.

[0541] a. Alternatively, the conforming bitstream should follow the following rule, if DQ is enabled for a video unit (e.g., sequence / picture / slice / slice / brick / sub-picture), then BDPCM is disabled.

[0542] 26. Conformant bitstreams shall follow the following rules: DQ (dependent quantization) shall be disabled if transform skip / codec tools that only apply the identified transform are enabled for a video unit (e.g., sequence / picture / slice / slice / brick / sub-picture).

[0543] a. Alternatively, conforming bitstreams should follow the following rule, if DQ is enabled for a video unit (e.g. sequence / picture / slice / tile / sub-picture), then only transform skipping of the identified transform is applied / codec tools are disabled.

[0544] 5. Examples

[0545] This section shows example embodiments and methods for modifying the current VVC standard to describe these embodiments. Changes to the VVC specification are highlighted in bold and italics. Deleted text is marked with double brackets (e.g., [[a]] indicates the deletion of the character "a").

[0546] Example 1

[0547] The working draft specified in JVET-P2001-v9 may be modified as follows.

[0548] 8.4.5.2.13 Specification of INTRA_LT_CCLM, INTRA_L_CCLM and INTRA_T_CCLM intra prediction modes

[0549] …

[0550] 3. The downsampled co-located luminance sample pDsY[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[0551] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[0552] —pDsY[x][y], where x=1..nTbW-1, y=1..nTbH-1 is derived as follows:

[0553] pDstY[x][y]=pY[x][y](8-159)

[0554] — Otherwise, the following applies:

[0555] —The one-dimensional filter coefficient arrays F1 and F2 and the two-dimensional filter coefficient arrays F3 and F4 are specified as follows.

[0556] F1[i]=1, where i=0..1(8-160)

[0557] F2[0]=1,F2[1]=2,F2[2]=1(8-161)

[0558] F3[i][j]=F4[i][j]=0, ​​where i=0..2, j=0..2(8-162)

[0559] If SubWidthC and SubHeightC are both equal to 2, then the following applies:

[0560] F1[0]=1,F1[1]=1(8-163)

[0561] F3[0][1]=1,F3[1][1]=4,F3[2][1]=1,F3[1][0]=1,F3[1][2]=1(8-164)

[0562] F4[0][1]=1, F4[1][1]=2, F4[2][1]=1(8-165)

[0563] F4[0][2]=1, F4[1][2]=2, F4[2][2]=1(8-166)

[0564] — Otherwise, the following applies:

[0565] F1[0]=2, F1[1]=0(8-167)

[0566] F3[1][1]=8(8-168)

[0567] F4[0][1]=2, F4[1][1]=4, F4[2][1]=2, (8-169)

[0568] …

[0569] 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=0..cntL+cntT-1, is specified as follows:

[0570] …

[0571] Otherwise (sps_cclm_colocated_chroma_flag is equal to 0), the following applies:

[0572] — If x is greater than 0, the following applies:

[0573] If bCTUboundary is equal to FALSE, the following applies:

[0574]

[0575] — Otherwise (bCTUboundary is TRUE), the following applies:

[0576]

[0577] — Otherwise (x is equal to 0), the following applies:

[0578] —If availTL is equal to TRUE and bCTUboundary is equal to FALSE, then the following applies:

[0579]

[0580] — Otherwise, if availTL is equal to TRUE and bCTUboundary is equal to TRUE, then the following applies:

[0581] pSelDsY[idx]=(F2[0]×pY[-1][-1]+F2[1]×pY[0][-1]+F2[2]×pY[1][-1]+2)>>2(8-196)

[0582] Otherwise, if availTL is equal to FALSE and bCTUboundary is equal to TRUE, then the following applies:

[0583] pSelDsY[idx]=(F1[1]×pY[0][-2]+F1[0]×pY[0][-1]+1)>>1

[0584] (8-197)

[0585] Otherwise (availTL equals FALSE and bCTUboundary equals TRUE), the following applies:

[0586] pSelDsY[idx]=pY[0][-1](8-198)

[0587] …

[0588] 5.2. Example 2

[0589] This embodiment shows an example of encoding and decoding the chroma transform skip flag according to the maximum allowed transform skip encoding and decoding block size. The working draft specified in JVET-P2001-v9 can be modified as follows.

[0590] 7.3.9.10 Transformation unit syntax

[0591] …

[0592]

[0593]

[0594] …

[0595] 5.3. Example 3

[0596] This embodiment shows an example of encoding and decoding the chroma BDPCM flag according to the maximum allowed chroma transform skip codec block size. The working draft specified in JVET-P2001-v9 may be modified as follows.

[0597] 7.3.9.5 Codec unit syntax

[0598] …

[0599]

[0600]

[0601] …

[0602] 5.4. Example 4

[0603] The working draft specified in JVET-Q2001-vE may be modified as follows. 8.4.5.2.13

[0605] The inputs to this process are:

[0606] —Intra prediction mode predModeIntra,

[0607] - the sample position of the upper left sample of the current transform block relative to the upper left sample of the current picture (xTbC, yTbC),

[0608] - variable nTbW specifying the transform block width,

[0609] — variable nTbH specifying the transform block height,

[0610] — variable cIdx specifying the color component of the current block,

[0611] - Chroma neighboring samples p[x][y], where x = -1, y = 0..2×nTbH-1, and x = 0..2×nTbW-1, y = -1.

[0612] The output of this process is the predicted samples predSamples[x][y], where x = 0..nTbW-1, y = 0..nTbH-1.

[0613] The current brightness position (xTbY, yTbY) is derived as follows:

[0614] (xTbY, yTbY) = (xTbC<<(SubWidthC-1), yTbC<<(SubHeightC-1)) (351)

[0616] The variables availL, availT, and availTL are derived as follows:

[0617] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using as input the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY-1, yTbY), checkPredModeY set equal to false (FLASE), and cIdx, and assign the output to availL.

[0618] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY, yTbY-1), checkPredModeY set equal to false (FLASE), and cIdx as input, and assign the output to availT.

[0619] —The variable availTL is derived as follows:

[0620] availTL=availL&&availT(352)

[0621] The number of available top-right adjacent chroma samples numTopRight is derived as follows:

[0622] —The variable numTopRight is set to 0, and availTR is set to true (TRUE).

[0623] - When predModeIntra is equal to INTRA_T_CCLM, the following applies for x=nTbW..2×nTbW-1 until availTR is equal to FALSE or x is equal to 2×nTbW-1:

[0624] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using as input the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY+x, yTbY-1), checkPredModeY set equal to false (FLASE), and cIdx, and assign the output to availTR.

[0625] —When availTR is equal to true (TRUE), numTopRight is increased by 1.

[0626] The number of available lower left adjacent chroma samples numLeftBelow is derived as follows:

[0627] —The variable numLeftBelow is set to 0, and availLB is set to true (TRUE).

[0628] When predModeIntra is equal to INTRA_L_CCLM, the following applies for y=nTbH..2×nTbH-1 until availLB is equal to FALSE or y is equal to 2×nTbH-1:

[0629] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY-1, yTbY+y), checkPredModeY set equal to false (FLASE), and cIdx as input, and assign the output to availLB.

[0630] —When availLB is equal to TRUE, numLeftBelow is increased by 1.

[0631] The number of available adjacent chroma samples numSampT at the top and upper right and the number of available adjacent chroma samples numSampL at the left and lower left are derived as follows:

[0632] If predModeIntra is equal to INTRA_LT_CCLM, the following applies:

[0633] numSampT=availT? nTbW:0(353)

[0634] numSampL=availL? nTbH:0(354)

[0635] — Otherwise, the following applies:

[0636] numSampT=(availT&&predModeIntra==INTRA_T_CCLM)? (nTbW+Min(numTopRight,nTbH)):0(355)

[0637] numSampL=(availL&&predModeIntra==INTRA_L_CCLM)? (nTbH+Min(numLeftBelow,nTbW)):0(356)

[0638] The variable bCTUboundary is derived as follows:

[0639] bCTUboundary=(yTbY&(CtbSizeY-1)==0)? TRUE:FALSE (357)

[0641] The variable cntN and array pickPosN, where N is replaced by L and T, are derived as follows:

[0642] —The variable numIs4N is derived as follows:

[0643] numIs4N=((availT&&availL&&predModeIntra==INTRA_LT_CCLM)?0:1)(358)

[0644] —The variable startPosN is set equal to numSampN>>(2+numIs4N).

[0645] - The variable pickStepN is set equal to Max(1, numSampN>>(1+numIs4N)).

[0646] —If availN is equal to TRUE and predModeIntra is equal to INTRA_LT_CCLM or INTRA_N_CCLM, then the following assignments are made:

[0647] —cntN is set equal to Min(numSampN, (1+numIs4N)<<1).

[0648] - pickPosN[pos] is set equal to (startPosN+pos×pickStepN), where pos=0..cntN-1.

[0649] Otherwise, cntN is set equal to 0.

[0650] The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[0651] — If numSampL and numSampT are both equal to 0, then the following applies:

[0652] predSamples[x][y]=1<<(BitDepth-1)(359)

[0653] — Otherwise, the following ordered steps apply:

[0654] 1. The co-located luma sample pY[x][y] where x=0..nTbW×SubWidthC-1, y=0..TbH×SubHeightC-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[0655] 2. The adjacent brightness samples pY[x][y] are derived as follows:

[0656] —When numSampL is greater than 0, the adjacent left luma sample pY[x][y] where x=-1..-3, y=0..SubHeightC×numSampL-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[0657] - When availT is equal to FALSE, the adjacent top luma sample pY[x][y] where x = -1..SubWidthC×numSampT-1, y = -1..-2 is set equal to luma sample pY[x][0].

[0658] - When availL is equal to FALSE, the adjacent left luma sample pY[x][y] where x = -1..-3, y = -1..SubHeightC×numSampL-1 is set equal to the luma sample pY[0][y].

[0659] When numSampT is greater than 0, the adjacent top luma sample pY[x][y] where x=0..SubWidthC×numSampT-1, y=-1..-2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[0660] —When availTL is equal to true (TRUE), the adjacent upper left luma sample pY[x][y] where x=-1, y=-1, -2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[0661] 3. The downsampled co-located luminance sample pDsY[x][y], x=0..nTbW-1, y=0..nTbH-1 is derived as follows:

[0662] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[0663] —pDsY[x][y], where x=1..nTbW-1, y=1..nTbH-1 is derived as follows:

[0664] pDstY[x][y]=pY[x][y](360)

[0665] — Otherwise, the following applies:

[0666] —The one-dimensional filter coefficient arrays F1 and F2 and the two-dimensional filter coefficient arrays F3 and F4 are specified as follows.

[0667] F1[0]=2,F1[1]=0(361)

[0668] F2[0]=1,F2[1]=2,F2[2]=1(362)

[0669] F3[i][j]=F4[i][j]=0, ​​where i=0..2, j=0..2(363)

[0670] If SubWidthC and SubHeightC are both equal to 2, then the following applies:

[0671] F1[0]=1,F1[1]=1(364)

[0672] F3[0][1]=1,F3[1][1]=4,F3[2][1]=1,F3[1][0]=1,F3[1][2]=1(365)

[0673] F4[0][1]=1, F4[1][1]=2, F4[2][1]=1(366)

[0674] F4[0][2]=1, F4[1][2]=2, F4[2][2]=1(367)

[0675] — Otherwise, the following applies:

[0676] F3[1][1]=8(368)

[0677] F4[0][1]=2, F4[1][1]=4, F4[2][1]=2, (369)

[0678] - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies:

[0679] —pDsY[x][y], where x=0..nTbW-1, y=0..nTbH-1 is derived as follows:

[0680]

[0681]

[0682] Otherwise (sps_chroma_vertical_collocated_flag is equal to 0), the following applies:

[0683] —pDsY[x][y], where x=0..nTbW-1, y=0..nTbH-1 is derived as follows:

[0684]

[0685] [[4. When numSampL is greater than 0, the selected adjacent left chroma sample pSelC[idx] is set equal to p[-1][pickPosL[idx]], where idx = 0..cntL-1, and the selected downsampled adjacent left luma sample pSelDsY[idx], where idx = 0..cntL-1 is derived as follows:

[0686] —The variable y is set equal to pickPosL[idx].

[0687] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[0688] pSelDsY[idx]=pY[-1][y](372)

[0689] — Otherwise, the following applies:

[0690] - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies:

[0691] Otherwise (sps_chroma_vertical_collocated_flag is equal to 0), the following applies:

[0692]

[0693]

[0694] 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=0..cntL+cntT-1 is specified as follows:

[0695] —The variable x is set equal to pickPosT[idx-cntL].

[0696] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[0697] pSelDsY[idx]=pY[x][-1](375)

[0698] — Otherwise, the following applies:

[0699] - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies:

[0700] If bCTUboundary is equal to FALSE, the following applies:

[0701]

[0702] — Otherwise (bCTUboundary is TRUE), the following applies:

[0703]

[0704] Otherwise (sps_chroma_vertical_collocated_flag is equal to 0), the following applies:

[0705] If bCTUboundary is equal to FALSE, the following applies:

[0706]

[0707] — Otherwise (bCTUboundary is TRUE), the following applies:

[0708]

[0709]

[0710]

[0711] 6. When cntT+cntL is not equal to 0, the variables minY, maxY, minC, and maxC are derived as follows:

[0712] —When cntT+cntL is equal to 2, pSelComp[3] is set equal to pSelComp[0], pSelComp[2] is set equal to pSelComp[1], pSelComp[0] is set equal to pSelComp[1], pSelComp[1] is set equal to pSelComp[3], and Comp is replaced by DsY and C.

[0713] —The arrays minGrpIdx and maxGrpIdx are derived as follows:

[0714] minGrpIdx[0]=0(380)

[0715] minGrpIdx[1]=2(381)

[0716] maxGrpIdx[0]=1(382)

[0717] maxGrpIdx[1]=3(383)

[0718] —When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[minGrpIdx[1]], minGrpIdx[0] and minGrpIdx[1] are swapped as follows:

[0719] (minGrpIdx[0], minGrpIdx[1])=Swap(minGrpIdx[0], minGrpIdx[1]) (384)

[0721] —When pSelDsY[maxGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], maxGrpIdx[0] and maxGrpIdx[1] are swapped as follows:

[0722] (maxGrpIdx[0], maxGrpIdx[1])=Swap(maxGrpIdx[0], maxGrpIdx[1]) (385)

[0724] —When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], the arrays minGrpIdx and maxGrpIdx are swapped as follows:

[0725] (minGrpIdx, maxGrpIdx) = Swap (minGrpIdx, maxGrpIdx) (386)

[0726] —When pSelDsY[minGrpIdx[1]] is greater than pSelDsY[maxGrpIdx[0]], minGrpIdx[1] and maxGrpIdx[0] are swapped as follows:

[0727] (minGrpIdx[1], maxGrpIdx[0])=Swap(minGrpIdx[1], maxGrpIdx[0]) (387)

[0729] —The variables maxY, maxC, minY, and minC are derived as follows:

[0730] maxY=(pSelDsY[maxGrpIdx[0]]+pSelDsY[maxGrpIdx[1]]+1)>>1 (388)

[0732] maxC=(pSelC[maxGrpIdx[0]]+pSelC[maxGrpIdx[1]]+1)>>1 (389)

[0734] minY=(pSelDsY[minGrpIdx[0]]+pSelDsY[minGrpIdx[1]]+1)>>1 (390)

[0736] minC=(pSelC[minGrpIdx[0]]+pSelC[minGrpIdx[1]]+1)>>1(391)

[0737] 7. The variables a, b, and k are derived as follows:

[0738] — If numSampL is equal to 0 and numSampT is equal to 0, then the following applies:

[0739] k=0(392)

[0740] a=0(393)

[0741] b=1<<(BitDepth-1)(394)

[0742] — Otherwise, the following applies:

[0743] diff=maxY-minY(395)

[0744] — If diff is not equal to 0, the following applies:

[0745] diffC=maxC-minC(396)

[0746] x=Floor(Log2(diff))(397)

[0747] normDiff=((diff<<4)>>x)&15(398)

[0748] x+=(normDiff!=0)? 1:0(399)

[0749] y=Abs(diffC)>0? Floor(Log2(Abs(diffC)))+1:0(400)

[0750] a=(diffC×(divSigTable[normDiff]|8)+2 y-1 )>>y(401)

[0751] k=((3+xy)<1)? 1:3+xy(402)

[0752] a=((3+xy)<1)? Sign(a)×15:a(403)

[0753] b=minC-((a×minY)>>k)(404)

[0754] where divSigTable[] is specified as follows:

[0755] divSigTable[]={0, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0} (405)

[0757] — Otherwise (diff is equal to 0), the following applies:

[0758] k=0(406)

[0759] a=0(407)

[0760] b=minC(408)

[0761] 8. The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[0762] predSamples[x][y]=Clip1(((pDsY[x][y]×a)>>k)+b)(409)

[0763] NOTE - This process uses sps_chroma_vertical_collocated_flag. However, to simplify the implementation, it does not use sps_chroma_horizontal_collocated_flag.

[0764] 5.5. Example 5

[0765] The working draft specified in JVET-Q2001-vE may be modified as follows. 8.4.5.2.13

[0767] The inputs to this process are:

[0768] —Intra prediction mode predModeIntra,

[0769] - the sample position of the upper left sample of the current transform block relative to the upper left sample of the current picture (xTbC, yTbC),

[0770] - variable nTbW specifying the transform block width,

[0771] — variable nTbH specifying the transform block height,

[0772] — variable cIdx specifying the color component of the current block,

[0773] - Chroma adjacent samples p[x][y], where x = -1, y = 0..2×nTbH-1, x = 0..2×nTbW-1, y = -1.

[0774] The output of this process is the predicted samples predSamples[x][y], where x = 0..nTbW-1, y = 0..nTbH-1.

[0775] The current brightness position (xTbY, yTbY) is derived as follows:

[0776] (xTbY, yTbY) = (xTbC<<(SubWidthC-1), yTbC<<(SubHeightC-1)) (351)

[0778] The variables availL, availT, and availTL are derived as follows:

[0779] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using as input the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY-1, yTbY), checkPredModeY set equal to false (FLASE), and cIdx, and assign the output to availL.

[0780] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY, yTbY-1), checkPredModeY set equal to false (FLASE), and cIdx as input, and assign the output to availT.

[0781] —The variable availTL is derived as follows:

[0782] availTL=availL&&availT(352)

[0783] The number of available top-right adjacent chroma samples numTopRight is derived as follows:

[0784] —The variable numTopRight is set to 0, and availTR is set to true (TRUE).

[0785] - When predModeIntra is equal to INTRA_T_CCLM, the following applies for x=nTbW..2×nTbW-1 until availTR is equal to FALSE or x is equal to 2×nTbW-1:

[0786] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using as input the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY+x, yTbY-1), checkPredModeY set equal to false (FLASE), and cIdx, and assign the output to availTR.

[0787] —When availTR is equal to true (TRUE), numTopRight is increased by 1.

[0788] The number of available lower left adjacent chroma samples numLeftBelow is derived as follows:

[0789] —The variable numLeftBelow is set to 0, and availLB is set to true (TRUE).

[0790] When predModeIntra is equal to INTRA_L_CCLM, the following applies for y=nTbH..2×nTbH-1 until availLB is equal to FALSE or y is equal to 2×nTbH-1:

[0791] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY-1, yTbY+y), checkPredModeY set equal to false (FLASE), and cIdx as input, and assign the output to availLB.

[0792] —When availLB is equal to TRUE, numLeftBelow is increased by 1.

[0793] The number of available adjacent chroma samples numSampT at the top and upper right and the number of available adjacent chroma samples numSampL at the left and lower left are derived as follows:

[0794] If predModeIntra is equal to INTRA_LT_CCLM, the following applies:

[0795] numSampT=availT? nTbW:0(353)

[0796] numSampL=availL? nTbH:0(354)

[0797] — Otherwise, the following applies:

[0798] numSampT=(availT&&predModeIntra==INTRA_T_CCLM)? (nTbW+Min(numTopRight,nTbH)):0(355)

[0799] numSampL=(availL&&predModeIntra==INTRA_L_CCLM)? (nTbH+Min(numLeftBelow,nTbW)):0(356)

[0800] The variable bCTUboundary is derived as follows:

[0801] bCTUboundary=(yTbY&(CtbSizeY-1)==0)? TRUE:FALSE(357)

[0802] The variable cntN and array pickPosN, where N is replaced by L and T, are derived as follows:

[0803] —The variable numIs4N is derived as follows:

[0804] numIs4N=((availT&&availL&&predModeIntra==INTRA_LT_CCLM)?0:1)(358)

[0805] —The variable startPosN is set equal to numSampN>>(2+numIs4N).

[0806] - The variable pickStepN is set equal to Max(1, numSampN>>(1+numIs4N)).

[0807] —If availN is equal to TRUE and predModeIntra is equal to INTRA_LT_CCLM or INTRA_N_CCLM, then the following assignments are made:

[0808] —cntN is set equal to Min(numSampN, (1+numIs4N)<<1).

[0809] - pickPosN[pos] is set equal to (startPosN+pos×pickStepN), where pos=0..cntN-1.

[0810] Otherwise, cntN is set equal to 0.

[0811] The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[0812] — If numSampL and numSampT are both equal to 0, then the following applies:

[0813] predSamples[x][y]=1<<(BitDepth-1)(359)

[0814] — Otherwise, the following ordered steps apply:

[0815] 1. The co-located luma sample pY[x][y] where x=0..nTbW×SubWidthC-1, y=0..TbH×SubHeightC-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[0816] 2. The adjacent brightness samples pY[x][y] are derived as follows:

[0817] —When numSampL is greater than 0, the adjacent left luma sample pY[x][y] where x=-1..-3, y=0..SubHeightC×numSampL-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[0818] - When availT is equal to FALSE, the adjacent top luma sample pY[x][y] where x = -1..SubWidthC×numSampT-1, y = -1..-2 is set equal to luma sample pY[x][0].

[0819] - When availL is equal to FALSE, the adjacent left luma sample pY[x][y] where x = -1..-3, y = -1..SubHeightC×numSampL-1 is set equal to the luma sample pY[0][y].

[0820] When numSampT is greater than 0, the adjacent top luma sample pY[x][y] where x=0..SubWidthC×numSampT-1, y=-1..-2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[0821] —When availTL is equal to true (TRUE), the adjacent upper left luma sample pY[x][y] where x=-1, y=-1, -2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[0822] 3. The downsampled co-located luminance sample pDsY[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[0823] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[0824] —pDsY[x][y], where x=1..nTbW-1, y=1..nTbH-1 is derived as follows:

[0825] pDstY[x][y]=pY[x][y](360)

[0826] — Otherwise, the following applies:

[0827] —The one-dimensional filter coefficient arrays F1 and F2 and the two-dimensional filter coefficient arrays F3 and F4 are specified as follows.

[0828] F1[0]=2,F1[1]=0(361)

[0829] F2[0]=1,F2[1]=2,F2[2]=1(362)

[0830] F3[i][j]=F4[i][j]=0, ​​where i=0..2, j=0..2(363)

[0831] If SubWidthC and SubHeightC are both equal to 2, then the following applies:

[0832] F1[0]=1,F1[1]=1(364)

[0833] F3[0][1]=1,F3[1][1]=4,F3[2][1]=1,F3[1][0]=1,F3[1][2]=1(365)

[0834] F4[0][1]=1, F4[1][1]=2, F4[2][1]=1(366)

[0835] F4[0][2]=1, F4[1][2]=2, F4[2][2]=1(367)

[0836] — Otherwise, the following applies:

[0837] F3[1][1]=8(368)

[0838] F4[0][1]=2, F4[1][1]=4, F4[2][1]=2, (369)

[0839] - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies:

[0840] —pDsY[x][y], where x=0..nTbW-1, y=0..nTbH-1 is derived as follows:

[0841]

[0842] Otherwise (sps_chroma_vertical_collocated_flag is equal to 0), the following applies:

[0843] —pDsY[x][y], where x=0..nTbW-1, y=0..nTbH-1 is derived as follows:

[0844]

[0845]

[0846] 4. When numSampL is greater than 0, the selected adjacent left chroma sample pSelC[idx] is set equal to p[-1][pickPosL[idx]], where idx = 0..cntL-1, and the selected downsampled adjacent left luma sample pSelDsY[idx], where idx = 0..cntL-1, is derived as follows:

[0847] —The variable y is set equal to pickPosL[idx].

[0848] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[0849] pSelDsY[idx]=pY[-1][y](372)

[0850] — Otherwise, the following applies:

[0851] - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies:

[0852]

[0853] Otherwise (sps_chroma_vertical_collocated_flag is equal to 0), the following applies:

[0854]

[0855] 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 Specify as follows:

[0856] —The variable x is set equal to pickPosT[idx-cntL].

[0857] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[0858] pSelDsY[idx]=pY[x][-1](375)

[0859] — Otherwise, the following applies:

[0860] - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies:

[0861] If bCTUboundary is equal to FALSE, the following applies:

[0862]

[0863] — Otherwise (bCTUboundary is TRUE), the following applies:

[0864]

[0865] Otherwise (sps_chroma_vertical_collocated_flag is equal to 0), the following applies:

[0866] If bCTUboundary is equal to FALSE, the following applies:

[0867]

[0868] — Otherwise (bCTUboundary is TRUE), the following applies:

[0869]

[0870] 6. When cntT+cntL is not equal to 0, the variables minY, maxY, minC, and maxC are derived as follows:

[0871] —When cntT+cntL is equal to 2, pSelComp[3] is set equal to pSelComp[0], pSelComp[2] is set equal to pSelComp[1], pSelComp[0] is set equal to pSelComp[1], pSelComp[1] is set equal to pSelComp[3], and Comp is replaced by DsY and C.

[0872] —The arrays minGrpIdx and maxGrpIdx are derived as follows:

[0873] minGrpIdx[0]=0(380)

[0874] minGrpIdx[1]=2(381)

[0875] maxGrpIdx[0]=1(382)

[0876] maxGrpIdx[1]=3(383)

[0877] —When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[minGrpIdx[1]], minGrpIdx[0] and minGrpIdx[1] are swapped as follows:

[0878] (minGrpIdx[0], minGrpIdx[1])=Swap(minGrpIdx[0], minGrpIdx[1]) (384)

[0880] —When pSelDsY[maxGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], maxGrpIdx[0] and maxGrpIdx[1] are swapped as follows:

[0881] (maxGrpIdx[0], maxGrpIdx[1])=Swap(maxGrpIdx[0], maxGrpIdx[1]) (385)

[0883] —When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], the arrays minGrpIdx and maxGrpIdx are swapped as follows:

[0884] (minGrpIdx, maxGrpIdx) = Swap (minGrpIdx, maxGrpIdx) (386)

[0885] —When pSelDsY[minGrpIdx[1]] is greater than pSelDsY[maxGrpIdx[0]], minGrpIdx[1] and maxGrpIdx[0] are swapped as follows:

[0886] (minGrpIdx[1], maxGrpIdx[0])=Swap(minGrpIdx[1], maxGrpIdx[0]) (387)

[0888] —The variables maxY, maxC, minY, and minC are derived as follows:

[0889] maxY=(pSelDsY[maxGrpIdx[0]]+pSelDsY[maxGrpIdx[1]]+1)>>1 (388)

[0891] maxC=(pSelC[maxGrpIdx[0]]+pSelC[maxGrpIdx[1]]+1)>>1 (389)

[0893] minY=(pSelDsY[minGrpIdx[0]]+pSelDsY[minGrpIdx[1]]+1)>>1 (390)

[0895] minC=(pSelC[minGrpIdx[0]]+pSelC[minGrpIdx[1]]+1)>>1(391)

[0896] 7. The variables a, b, and k are derived as follows:

[0897] — If numSampL is equal to 0 and numSampT is equal to 0, then the following applies:

[0898] k=0(392)

[0899] a=0(393)

[0900] b=1<<(BitDepth-1)(394)

[0901] — Otherwise, the following applies:

[0902] diff=maxY-minY(395)

[0903] — If diff is not equal to 0, the following applies:

[0904] diffC=maxC-minC(396)

[0905] x=Floor(Log2(diff))(397)

[0906] normDiff=((diff<<4)>>x)&15(398)

[0907] x+=(normDiff!=0)? 1:0(399)

[0908] y=Abs(diffC)>0? Floor(Log2(Abs(diffC)))+1:0(400)

[0909] a=(diffC×(divSigTable[normDiff]|8)+2 y-1 )>>y(401)

[0910] k=((3+xy)<1)? 1:3+xy(402)

[0911] a=((3+xy)<1)? Sign(a)×15:a(403)

[0912] b=minC-((a×minY)>>k)(404)

[0913] where divSigTable[] is specified as follows:

[0914] divSigTable[]={0, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0} (405)

[0916] — Otherwise (diff is equal to 0), the following applies:

[0917] k=0(406)

[0918] a=0(407)

[0919] b=minC(408)

[0920] 8. The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[0921] predSamples[x][y]=Clip1(((pDsY[x][y]×a)>>k)+b)(409)

[0922] NOTE - This process uses sps_chroma_vertical_collocated_flag. However, to simplify the implementation, it does not use sps_chroma_horizontal_collocated_flag.

[0923] 5.6. Example 6

[0924] The working draft specified in JVET-Q2001-vE may be modified as follows. 8.4.5.2.13

[0926] The inputs to this process are:

[0927] —Intra prediction mode predModeIntra,

[0928] - the sample position of the upper left sample of the current transform block relative to the upper left sample of the current picture (xTbC, yTbC),

[0929] - variable nTbW specifying the transform block width,

[0930] — variable nTbH specifying the transform block height,

[0931] — variable cIdx specifying the color component of the current block,

[0932] - Chroma adjacent samples p[x][y], where x = -1, y = 0..2×nTbH-1, x = 0..2×nTbW-1, y = -1.

[0933] The output of this process is the predicted samples predSamples[x][y], where x = 0..nTbW-1, y = 0..nTbH-1.

[0934] The current brightness position (xTbY, yTbY) is derived as follows:

[0935] (xTbY, yTbY) = (xTbC<<(SubWidthC-1), yTbC<<(SubHeightC-1)) (351)

[0937] The variables availL, availT, and availTL are derived as follows:

[0938] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using as input the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY-1, yTbY), checkPredModeY set equal to false (FLASE), and cIdx, and assign the output to availL.

[0939] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY, yTbY-1), checkPredModeY set equal to false (FLASE), and cIdx as input, and assign the output to availT.

[0940] —The variable availTL is derived as follows:

[0941] availTL=availL&&availT(352)

[0942] The number of available top-right adjacent chroma samples numTopRight is derived as follows:

[0943] —The variable numTopRight is set to 0, and availTR is set to true (TRUE).

[0944] - When predModeIntra is equal to INTRA_T_CCLM, the following applies for x=nTbW..2×nTbW-1 until availTR is equal to FALSE or x is equal to 2×nTbW-1:

[0945] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using as input the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY+x, yTbY-1), checkPredModeY set equal to false (FLASE), and cIdx, and assign the output to availTR.

[0946] —When availTR is equal to true (TRUE), numTopRight is increased by 1.

[0947] The number of available lower left adjacent chroma samples numLeftBelow is derived as follows:

[0948] —The variable numLeftBelow is set to 0, and availLB is set to true (TRUE).

[0949] - When predModeIntra is equal to INTRA_L_CCLM, the following applies for y=nTbH..2×nTbH-1 until availLB is equal to FALSE or y is equal to 2×nTbH-1:

[0950] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY-1, yTbY+y), checkPredModeY set equal to false (FLASE), and cIdx as input, and assign the output to availLB.

[0951] —When availLB is equal to TRUE, numLeftBelow is increased by 1.

[0952] The number of available adjacent chroma samples numSampT at the top and upper right and the number of available adjacent chroma samples numSampL at the left and lower left are derived as follows:

[0953] If predModeIntra is equal to INTRA_LT_CCLM, the following applies:

[0954] numSampT=availT? nTbW:0(353)

[0955] numSampL=availL? nTbH:0(354)

[0956] — Otherwise, the following applies:

[0957] numSampT=(availT&&predModeIntra==INTRA_T_CCLM)? (nTbW+Min(numTopRight,nTbH)):0(355)

[0958] numSampL=(availL&&predModeIntra==INTRA_L_CCLM)? (nTbH+Min(numLeftBelow,nTbW)):0(356)

[0959] The variable bCTUboundary is derived as follows:

[0960] bCTUboundary=(yTbY&(CtbSizeY-1)==0)? TRUE:FALSE(357)

[0961] The variable cntN and array pickPosN, where N is replaced by L and T, are derived as follows:

[0962] —The variable numIs4N is derived as follows:

[0963] numIs4N=((availT&&availL&&predModeIntra==INTRA_LT_CCLM)?0:1)(358)

[0964] —The variable startPosN is set equal to numSampN>>(2+numIs4N).

[0965] - The variable pickStepN is set equal to Max(1, numSampN>>(1+numIs4N)).

[0966] —If availN is equal to TRUE and predModeIntra is equal to INTRA_LT_CCLM or INTRA_N_CCLM, then the following assignments are made:

[0967] —cntN is set equal to Min(numSampN, (1+numIs4N)<<1).

[0968] - pickPosN[pos] is set equal to (startPosN+pos×pickStepN), where pos=0..cntN-1.

[0969] Otherwise, cntN is set equal to 0.

[0970] The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[0971] — If numSampL and numSampT are both equal to 0, then the following applies:

[0972] predSamples[x][y]=1<<(BitDepth-1)(359)

[0973] — Otherwise, the following ordered steps apply:

[0974] 1. The co-located luma sample pY[x][y] where x=0..nTbW×SubWidthC-1, y=0..TbH×SubHeightC-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[0975] 2. The adjacent brightness samples pY[x][y] are derived as follows:

[0976] —When numSampL is greater than 0, the adjacent left luma sample pY[x][y] where x=-1..-3, y=0..SubHeightC×numSampL-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[0977] - When availT is equal to FALSE, the adjacent top luma sample pY[x][y] where x = -1..SubWidthC×numSampT-1, y = -1..-2 is set equal to luma sample pY[x][0].

[0978] - When availL is equal to FALSE, the adjacent left luma sample pY[x][y] where x = -1..-3, y = -1..SubHeightC×numSampL-1 is set equal to the luma sample pY[0][y].

[0979] —When numSampT is greater than 0, the adjacent top luma sample pY[x][y] where x=0..SubWidthC×numSampT-1, y=-1..-[[2]]3 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[0980] —When availTL is equal to true (TRUE), the adjacent upper left luma sample pY[x][y] where x=-1, y=-1, -2, -3 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[0981] 3. The downsampled co-located luminance sample pDsY[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[0982] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[0983] —pDsY[x][y], where x=1..nTbW-1, y=1..nTbH-1 is derived as follows:

[0984] pDstY[x][y]=pY[x][y](360)

[0985] — Otherwise, the following applies:

[0986] —The one-dimensional filter coefficient arrays F1 and F2 and the two-dimensional filter coefficient arrays F3 and F4 are specified as follows.

[0987] F1[0]=2,F1[1]=0(361)

[0988] F2[0]=1,F2[1]=2,F2[2]=1(362)

[0989] F3[i][j]=F4[i][j]=0, ​​where i=0..2, j=0..2(363)

[0990] If SubWidthC and SubHeightC are both equal to 2, then the following applies:

[0991] F1[0]=1,F1[1]=1(364)

[0992] F3[0][1]=1,F3[1][1]=4,F3[2][1]=1,F3[1][0]=1,F3[1][2]=1(365)

[0993] F4[0][1]=1, F4[1][1]=2, F4[2][1]=1(366)

[0994] F4[0][2]=1, F4[1][2]=2, F4[2][2]=1(367)

[0995] — Otherwise, the following applies:

[0996] F3[1][1]=8(368)

[0997] F4[0][1]=2, F4[1][1]=4, F4[2][1]=2, (369)

[0998] - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies:

[0999] —pDsY[x][y], where x=0..nTbW-1, y=0..nTbH-1 is derived as follows:

[1000]

[1001] Otherwise (sps_chroma_vertical_collocated_flag is equal to 0), the following applies:

[1002] —pDsY[x][y], where x=0..nTbW-1, y=0..nTbH-1 is derived as follows:

[1003]

[1004] 4. When numSampL is greater than 0, the selected adjacent left chroma sample pSelC[idx] is set equal to p[-1][pickPosL[idx]], where idx = 0..cntL-1, and the selected downsampled adjacent left luma sample pSelDsY[idx], where idx = 0..cntL-1, is derived as follows:

[1005] —The variable y is set equal to pickPosL[idx].

[1006] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[1007] pSelDsY[idx]=pY[-1][y](372)

[1008] — Otherwise, the following applies:

[1009] - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies:

[1010]

[1011] Otherwise (sps_chroma_vertical_collocated_flag is equal to 0), the following applies:

[1012]

[1013] 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=0..cntL+cntT-1 is specified as follows:

[1014] —The variable x is set equal to pickPosT[idx-cntL].

[1015] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[1016] pSelDsY[idx]=pY[x][-1](375)

[1017] — Otherwise, the following applies:

[1018] - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies:

[1019] If bCTUboundary is equal to FALSE, the following applies:

[1020]

[1021] — Otherwise (bCTUboundary is TRUE), the following applies:

[1022]

[1023] Otherwise (sps_chroma_vertical_collocated_flag is equal to 0), the following applies:

[1024] If bCTUboundary is equal to FALSE, the following applies:

[1025]

[1026] — Otherwise (bCTUboundary is TRUE), the following applies:

[1027]

[1028] 6. When cntT+cntL is not equal to 0, the variables minY, maxY, minC, and maxC are derived as follows:

[1029] —When cntT+cntL is equal to 2, pSelComp[3] is set equal to pSelComp[0], pSelComp[2] is set equal to pSelComp[1], pSelComp[0] is set equal to pSelComp[1], pSelComp[1] is set equal to pSelComp[3], and Comp is replaced by DsY and C.

[1030] —The arrays minGrpIdx and maxGrpIdx are derived as follows:

[1031] minGrpIdx[0]=0(380)

[1032] minGrpIdx[1]=2(381)

[1033] maxGrpIdx[0]=1(382)

[1034] maxGrpIdx[1]=3(383)

[1035] —When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[minGrpIdx[1]], minGrpIdx[0] and minGrpIdx[1] are swapped as follows:

[1036] (minGrpIdx[0], minGrpIdx[1])=Swap(minGrpIdx[0], minGrpIdx[1]) (384)

[1038] —When pSelDsY[maxGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], maxGrpIdx[0] and maxGrpIdx[1] are swapped as follows:

[1039] (maxGrpIdx[0], maxGrpIdx[1])=Swap(maxGrpIdx[0], maxGrpIdx[1]) (385)

[1041] —When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], the arrays minGrpIdx and maxGrpIdx are swapped as follows:

[1042] (minGrpIdx, maxGrpIdx) = Swap (minGrpIdx, maxGrpIdx) (386)

[1043] —When pSelDsY[minGrpIdx[1]] is greater than pSelDsY[maxGrpIdx[0]], minGrpIdx[1] and maxGrpIdx[0] are swapped as follows:

[1044] (minGrpIdx[1], maxGrpIdx[0])=Swap(minGrpIdx[1], maxGrpIdx[0]) (387)

[1046] —The variables maxY, maxC, minY, and minC are derived as follows:

[1047] maxY=(pSelDsY[maxGrpIdx[0]]+pSelDsY[maxGrpIdx[1]]+1)>>1 (388)

[1049] maxC=(pSelC[maxGrpIdx[0]]+pSelC[maxGrpIdx[1]]+1)>>1 (389)

[1051] minY=(pSelDsY[minGrpIdx[0]]+pSelDsY[minGrpIdx[1]]+1)>>1 (390)

[1053] minC=(pSelC[minGrpIdx[0]]+pSelC[minGrpIdx[1]]+1)>>1(391)

[1054] 7. The variables a, b, and k are derived as follows:

[1055] — If numSampL is equal to 0 and numSampT is equal to 0, then the following applies:

[1056] k=0(392)

[1057] a=0(393)

[1058] b=1<<(BitDepth-1)(394)

[1059] — Otherwise, the following applies:

[1060] diff=maxY-minY(395)

[1061] — If diff is not equal to 0, the following applies:

[1062] diffC=maxC-minC(396)

[1063] x=Floor(Log2(diff))(397)

[1064] normDiff=((diff<<4)>>x)&15(398)

[1065] x+=(normDiff!=0)? 1:0(399)

[1066] y=Abs(diffC)>0? Floor(Log2(Abs(diffC)))+1:0(400)

[1067] a=(diffC×(divSigTable[normDiff]|8)+2 y-1 )>>y(401)

[1068] k=((3+xy)<1)? 1:3+xy(402)

[1069] a=((3+xy)<1)? Sign(a)×15:a(403)

[1070] b=minC-((a×minY)>>k)(404)

[1071] where divSigTable[] is specified as follows:

[1072] divSigTable[]={0, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0} (405)

[1074] — Otherwise (diff is equal to 0), the following applies:

[1075] k=0(406)

[1076] a=0(407)

[1077] b=minC(408)

[1078] 8. The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[1079] predSamples[x][y]=Clip1(((pDsY[x][y]×a)>>k)+b)(409)

[1080] NOTE - This process uses sps_chroma_vertical_collocated_flag. However, to simplify the implementation, it does not use sps_chroma_horizontal_collocated_flag.

[1081] 5.7. Example 7

[1082] The working draft specified in JVET-Q2001-vE may be modified as follows. 8.4.5.2.13

[1084] The inputs to this process are:

[1085] —Intra prediction mode predModeIntra,

[1086] - the sample position of the upper left sample of the current transform block relative to the upper left sample of the current picture (xTbC, yTbC),

[1087] - variable nTbW specifying the transform block width,

[1088] — variable nTbH specifying the transform block height,

[1089] — variable cIdx specifying the color component of the current block,

[1090] - Chroma neighboring samples p[x][y], where x=-1, y=0..2×nTbH-1 and x=0..2×nTbW-1, y=-1.

[1091] The output of this process is the predicted samples predSamples[x][y], where x = 0..nTbW-1, y = 0..nTbH-1.

[1092] The current brightness position (xTbY, yTbY) is derived as follows:

[1093] (xTbY, yTbY) = (xTbC<<(SubWidthC-1), yTbC<<(SubHeightC-1)) (351)

[1095] The variables availL, availT, and availTL are derived as follows:

[1096] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using as input the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY-1, yTbY), checkPredModeY set equal to false (FLASE), and cIdx, and assign the output to availL.

[1097] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY, yTbY-1), checkPredModeY set equal to false (FLASE), and cIdx as input, and assign the output to availT.

[1098] —The variable availTL is derived as follows:

[1099] availTL=availL&&availT(352)

[1100] The number of available top-right adjacent chroma samples numTopRight is derived as follows:

[1101] —The variable numTopRight is set to 0, and availTR is set to true (TRUE).

[1102] - When predModeIntra is equal to INTRA_T_CCLM, the following applies for x=nTbW..2×nTbW-1 until availTR is equal to FALSE or x is equal to 2×nTbW-1:

[1103] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using as input the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY+x, yTbY-1), checkPredModeY set equal to false (FLASE), and cIdx, and assign the output to availTR.

[1104] —When availTR is equal to true (TRUE), numTopRight is increased by 1.

[1105] The number of available lower left adjacent chroma samples numLeftBelow is derived as follows:

[1106] —The variable numLeftBelow is set to 0, and availLB is set to true (TRUE).

[1107] When predModeIntra is equal to INTRA_L_CCLM, the following applies for y=nTbH..2×nTbH-1 until availLB is equal to FALSE or y is equal to 2×nTbH-1:

[1108] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY-1, yTbY+y), checkPredModeY set equal to false (FLASE), and cIdx as input, and assign the output to availLB.

[1109] —When availLB is equal to TRUE, numLeftBelow is increased by 1.

[1110] The number of available adjacent chroma samples numSampT at the top and upper right and the number of available adjacent chroma samples numSampL at the left and lower left are derived as follows:

[1111] If predModeIntra is equal to INTRA_LT_CCLM, the following applies:

[1112] numSampT=availT? nTbW:0(353)

[1113] numSampL=availL? nTbH:0(354)

[1114] — Otherwise, the following applies:

[1115] numSampT=(availT&&predModeIntra==INTRA_T_CCLM)? (nTbW+Min(numTopRight,nTbH)):0(355)

[1116] numSampL=(availL&&predModeIntra==INTRA_L_CCLM)? (nTbH+Min(numLeftBelow,nTbW)):0(356)

[1117] The variable bCTUboundary is derived as follows:

[1118] bCTUboundary=(yTbY&(CtbSizeY-1)==0)? TRUE:FALSE(357)

[1119] The variable cntN and array pickPosN, where N is replaced by L and T, are derived as follows:

[1120] —The variable numIs4N is derived as follows:

[1121] numIs4N=((availT&&availL&&predModeIntra==INTRA_LT_CCLM)?0:1)(358)

[1122] —The variable startPosN is set equal to numSampN>>(2+numIs4N).

[1123] - The variable pickStepN is set equal to Max(1, numSampN>>(1+numIs4N)).

[1124] —If availN is equal to TRUE and predModeIntra is equal to INTRA_LT_CCLM or INTRA_N_CCLM, then the following assignments are made:

[1125] —cntN is set equal to Min(numSampN, (1+numIs4N)<<1).

[1126] - pickPosN[pos] is set equal to (startPosN+pos×pickStepN), where pos=0..cntN-1.

[1127] Otherwise, cntN is set equal to 0.

[1128] The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[1129] — If numSampL and numSampT are both equal to 0, then the following applies:

[1130] predSamples[x][y]=1<<(BitDepth-1)(359)

[1131] — Otherwise, the following ordered steps apply:

[1132] 1. The co-located luma sample pY[x][y] where x=0..nTbW×SubWidthC-1, y=0..TbH×SubHeightC-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[1133] 2. The adjacent brightness samples pY[x][y] are derived as follows:

[1134] —When numSampL is greater than 0, the adjacent left luma sample pY[x][y] where x=-1..-3, y=0..SubHeightC×numSampL-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[1135] - when availT is equal to FALSE, where x = -1..SubWidthC×numSampT-1, The adjacent top luma sample pY[x][y] is set equal to the luma sample pY[x][0].

[1136] - When availL is equal to FALSE, the adjacent left luma sample pY[x][y] where x = -1..-3, y = -1..SubHeightC×numSampL-1 is set equal to the luma sample pY[0][y].

[1137] —When numSampT is greater than 0, The adjacent top luma sample pY[x][y] of is set equal to the reconstructed luma sample before the deblocking filtering process at the position (xTbY+x, yTbY+y).

[1138] —When availTL is equal to true (TRUE), the adjacent upper left luma sample pY[x][y] where x=-1, y=-1, -2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[1139] 3. The downsampled co-located luminance sample pDsY[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[1140] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[1141] —pDsY[x][y], where x=1..nTbW-1, y=1..nTbH-1 is derived as follows:

[1142] pDstY[x][y]=pY[x][y](360)

[1143] — Otherwise, the following applies:

[1144] —The one-dimensional filter coefficient arrays F1 and F2 and the two-dimensional filter coefficient arrays F3 and F4 are specified as follows.

[1145] F1[0]=2,F1[1]=0(361)

[1146] F2[0]=1,F2[1]=2,F2[2]=1(362)

[1147] F3[i][j]=F4[i][j]=0, ​​where i=0..2, j=0..2(363)

[1148] If SubWidthC and SubHeightC are both equal to 2, then the following applies:

[1149] F1[0]=1,F1[1]=1(364)

[1150] F3[0][1]=1,F3[1][1]=4,F3[2][1]=1,F3[1][0]=1,F3[1][2]=1(365)

[1151] F4[0][1]=1, F4[1][1]=2, F4[2][1]=1(366)

[1152] F4[0][2]=1, F4[1][2]=2, F4[2][2]=1(367)

[1153] — Otherwise, the following applies:

[1154] F3[1][1]=8(368)

[1155] F4[0][1]=2, F4[1][1]=4, F4[2][1]=2, (369)

[1156] - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies:

[1157] —pDsY[x][y], where x=0..nTbW-1, y=0..nTbH-1 is derived as follows:

[1158]

[1159] Otherwise (sps_chroma_vertical_collocated_flag is equal to 0), the following applies:

[1160] —pDsY[x][y], where x=0..nTbW-1, y=0..nTbH-1 is derived as follows:

[1161]

[1162] 4. When numSampL is greater than 0, the selected adjacent left chroma sample pSelC[idx] is set equal to p[-1][pickPosL[idx]], where idx = 0..cntL-1, and the selected downsampled adjacent left luma sample pSelDsY[idx], where idx = 0..cntL-1, is derived as follows:

[1163] —The variable y is set equal to pickPosL[idx].

[1164] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[1165] pSelDsY[idx]=pY[-1][y](372)

[1166] — Otherwise, the following applies:

[1167] - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies:

[1168] Otherwise (sps_chroma_vertical_collocated_flag is equal to 0), the following applies:

[1169]

[1170] 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=0..cntL+cntT-1 is specified as follows:

[1171] —The variable x is set equal to pickPosT[idx-cntL].

[1172] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[1173] pSelDsY[idx]=pY[x][-1](375)

[1174] — Otherwise, the following applies:

[1175] - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies:

[1176] If bCTUboundary is equal to FALSE, the following applies:

[1177]

[1178]

[1179] — Otherwise (bCTUboundary is TRUE), the following applies:

[1180]

[1181] Otherwise (sps_chroma_vertical_collocated_flag is equal to 0), the following applies:

[1182] If bCTUboundary is equal to FALSE, the following applies:

[1183]

[1184] — Otherwise (bCTUboundary is TRUE), the following applies:

[1185]

[1186] 6. When cntT+cntL is not equal to 0, the variables minY, maxY, minC, and maxC are derived as follows:

[1187] —When cntT+cntL is equal to 2, pSelComp[3] is set equal to pSelComp[0], pSelComp[2] is set equal to pSelComp[1], pSelComp[0] is set equal to pSelComp[1], pSelComp[1] is set equal to pSelComp[3], and Comp is replaced by DsY and C.

[1188] —The arrays minGrpIdx and maxGrpIdx are derived as follows:

[1189] minGrpIdx[0]=0(380)

[1190] minGrpIdx[1]=2(381)

[1191] maxGrpIdx[0]=1(382)

[1192] maxGrpIdx[1]=3(383)

[1193] —When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[minGrpIdx[1]], minGrpIdx[0] and minGrpIdx[1] are swapped as follows:

[1194] (minGrpIdx[0], minGrpIdx[1])=Swap(minGrpIdx[0], minGrpIdx[1]) (384)

[1196] —When pSelDsY[maxGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], maxGrpIdx[0] and maxGrpIdx[1] are swapped as follows:

[1197] (maxGrpIdx[0], maxGrpIdx[1])=Swap(maxGrpIdx[0], maxGrpIdx[1]) (385)

[1199] —When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], the arrays minGrpIdx and maxGrpIdx are swapped as follows:

[1200] (minGrpIdx, maxGrpIdx) = Swap (minGrpIdx, maxGrpIdx) (386)

[1201] —When pSelDsY[minGrpIdx[1]] is greater than pSelDsY[maxGrpIdx[0]], minGrpIdx[1] and maxGrpIdx[0] are swapped as follows:

[1202] (minGrpIdx[1], maxGrpIdx[0])=Swap(minGrpIdx[1], maxGrpIdx[0]) (387)

[1204] —The variables maxY, maxC, minY, and minC are derived as follows:

[1205] maxY=(pSelDsY[maxGrpIdx[0]]+pSelDsY[maxGrpIdx[1]]+1)>>1 (388)

[1207] maxC=(pSelC[maxGrpIdx[0]]+pSelC[maxGrpIdx[1]]+1)>>1 (389)

[1209] minY=(pSelDsY[minGrpIdx[0]]+pSelDsY[minGrpIdx[1]]+1)>>1 (390)

[1211] minC=(pSelC[minGrpIdx[0]]+pSelC[minGrpIdx[1]]+1)>>1(391)

[1212] 7. The variables a, b, and k are derived as follows:

[1213] — If numSampL is equal to 0 and numSampT is equal to 0, then the following applies:

[1214] k=0(392)

[1215] a=0(393)

[1216] b=1<<(BitDepth-1)(394)

[1217] — Otherwise, the following applies:

[1218] diff=maxY-minY(395)

[1219] — If diff is not equal to 0, the following applies:

[1220] diffC=maxC-minC(396)

[1221] x=Floor(Log2(diff))(397)

[1222] normDiff=((diff<<4)>>x)&15(398)

[1223] x+=(normDiff!=0)? 1:0(399)

[1224] y=Abs(diffC)>0? Floor(Log2(Abs(diffC)))+1:0(400)

[1225] a=(diffC×(divSigTable[normDiff]|8)+2 y - 1 )>>y(401)

[1226] k=((3+xy)<1)? 1:3+xy(402)

[1227] a=((3+xy)<1)? Sign(a)×15:a(403)

[1228] b=minC-((a×minY)>>k)(404)

[1229] where divSigTable[] is specified as follows:

[1230] divSigTable[]={0, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0} (405)

[1232] — Otherwise (diff is equal to 0), the following applies:

[1233] k=0(406)

[1234] a=0(407)

[1235] b=minC(408)

[1236] 8. The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[1237] predSamples[x][y]=Clip1(((pDsY[x][y]×a)>>k)+b) (409)

[1239] NOTE - This process uses sps_chroma_vertical_collocated_flag. However, to simplify the implementation, it does not use sps_chroma_horizontal_collocated_flag.

[1240] 5.8. Example 8

[1241] The working draft specified in JVET-Q2001-vE may be modified as follows. 8.4.5.2.13

[1243] The inputs to this process are:

[1244] —Intra prediction mode predModeIntra,

[1245] - the sample position of the upper left sample of the current transform block relative to the upper left sample of the current picture (xTbC, yTbC),

[1246] - variable nTbW specifying the transform block width,

[1247] — variable nTbH specifying the transform block height,

[1248] — variable cIdx specifying the color component of the current block,

[1249] - Chroma adjacent sample points p[x][y], where x = -1, y = 0..2×nTbH-1, x = 0.2×nTbW-1, y = -1.

[1250] The output of this process is the predicted samples predSamples[x][y], where x = 0..nTbW-1, y = 0..nTbH-1.

[1251] The current brightness position (xTbY, yTbY) is derived as follows:

[1252] (xTbY, yTbY) = (xTbC<<(SubWidthC-1), yTbC<<(SubHeightC-1)) (351)

[1254] The variables availL, availT, and availTL are derived as follows:

[1255] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using as input the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY-1, yTbY), checkPredModeY set equal to false (FLASE), and cIdx, and assign the output to availL.

[1256] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY, yTbY-1), checkPredModeY set equal to false (FLASE), and cIdx as input, and assign the output to availT.

[1257]

[1258] [[—The variable availTL is derived as follows:

[1259] availTL=availL&&availT(352)]]

[1260] The number of available top-right adjacent chroma samples numTopRight is derived as follows:

[1261] —The variable numTopRight is set to 0, and availTR is set to true (TRUE).

[1262] - When predModeIntra is equal to INTRA_T_CCLM, the following applies for x=nTbW..2×nTbW-1 until availTR is equal to FALSE or x is equal to 2×nTbW-1:

[1263] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using as input the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY+x, yTbY-1), checkPredModeY set equal to false (FLASE), and cIdx, and assign the output to availTR.

[1264] —When availTR is equal to true (TRUE), numTopRight is increased by 1.

[1265] The number of available lower left adjacent chroma samples numLeftBelow is derived as follows:

[1266] —The variable numLeftBelow is set to 0, and availLB is set to true (TRUE).

[1267] When predModeIntra is equal to INTRA_L_CCLM, the following applies for y=nTbH..2×nTbH-1 until availLB is equal to FALSE or y is equal to 2×nTbH-1:

[1268] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY-1, yTbY+y), checkPredModeY set equal to false (FLASE), and cIdx as input, and assign the output to availLB.

[1269] —When availLB is equal to TRUE, numLeftBelow is increased by 1.

[1270] The number of available adjacent chroma samples numSampT at the top and upper right and the number of available adjacent chroma samples numSampL at the left and lower left are derived as follows:

[1271] If predModeIntra is equal to INTRA_LT_CCLM, the following applies:

[1272] numSampT=availT? nTbW:0(353)

[1273] numSampL=availL? nTbH:0(354)

[1274] — Otherwise, the following applies:

[1275] numSampT=(availT&&predModeIntra==INTRA_T_CCLM)? (nTbW+Min(numTopRight,nTbH)):0(355)

[1276] numSampL=(availL&&predModeIntra==INTRA_L_CCLM)? (nTbH+Min(numLeftBelow,nTbW)):0(356)

[1277] The variable bCTUboundary is derived as follows:

[1278] bCTUboundary=(yTbY&(CtbSizeY-1)==0)? TRUE:FALSE(357)

[1279] The variable cntN and array pickPosN, where N is replaced by L and T, are derived as follows:

[1280] —The variable numIs4N is derived as follows:

[1281] numIs4N=((availT&&availL&&predModeIntra==INTRA_LT_CCLM)?0:1)(358)

[1282] —The variable startPosN is set equal to numSampN>>(2+numIs4N).

[1283] - The variable pickStepN is set equal to Max(1, numSampN>>(1+numIs4N)).

[1284] —If availN is equal to TRUE and predModeIntra is equal to INTRA_LT_CCLM or INTRA_N_CCLM, then the following assignments are made:

[1285] —cntN is set equal to Min(numSampN, (1+numIs4N)<<1).

[1286] - pickPosN[pos] is set equal to (startPosN+pos×pickStepN), where pos=0..cntN-1.

[1287] Otherwise, cntN is set equal to 0.

[1288] The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[1289] — If numSampL and numSampT are both equal to 0, then the following applies:

[1290] predSamples[x][y]=1<<(BitDepth-1)(359)

[1291] — Otherwise, the following ordered steps apply:

[1292] 1. The co-located luma sample pY[x][y] where x=0..nTbW×SubWidthC-1, y=0..TbH×SubHeightC-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[1293] 2. The adjacent brightness samples pY[x][y] are derived as follows:

[1294] —When numSampL is greater than 0, the adjacent left luma sample pY[x][y] where x=-1..-3, y=0..SubHeightC×numSampL-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[1295] - When availT is equal to FALSE, the adjacent top luma sample pY[x][y] where x = -1..SubWidthC×numSampT-1, y = -1..-2 is set equal to luma sample pY[x][0].

[1296] - When availL is equal to FALSE, the adjacent left luma sample pY[x][y] where x = -1..-3, y = -1..SubHeightC×numSampL-1 is set equal to the luma sample pY[0][y].

[1297] When numSampT is greater than 0, the adjacent top luma sample pY[x][y] where x=0..SubWidthC×numSampT-1, y=-1..-2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[1298] -[[when]] When availTL is equal to true (TRUE), the adjacent upper left luma sample pY[x][y] with x=-1,-2, y=-1,-2 is set equal to the reconstructed luma sample before the deblocking filtering process at the position (xTbY+x, yTbY+y).

[1299]

[1300] 3. The downsampled co-located luminance sample pDsY[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[1301] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[1302] —pDsY[x][y], where x=1..nTbW-1, y=1..nTbH-1 is derived as follows:

[1303] pDstY[x][y]=pY[x][y](360)

[1304] — Otherwise, the following applies:

[1305] —The one-dimensional filter coefficient arrays F1 and F2 and the two-dimensional filter coefficient arrays F3 and F4 are specified as follows.

[1306] F1[0]=2,F1[1]=0(361)

[1307] F2[0]=1,F2[1]=2,F2[2]=1(362)

[1308] F3[i][j]=F4[i][j]=0, ​​where i=0..2, j=0..2(363)

[1309] If SubWidthC and SubHeightC are both equal to 2, then the following applies:

[1310] F1[0]=1,F1[1]=1(364)

[1311] F3[0][1]=1,F3[1][1]=4,F3[2][1]=1,F3[1][0]=1,F3[1][2]=1(365)

[1312] F4[0][1]=1, F4[1][1]=2, F4[2][1]=1(366)

[1313] F4[0][2]=1, F4[1][2]=2, F4[2][2]=1(367)

[1314] — Otherwise, the following applies:

[1315] F3[1][1]=8(368)

[1316] F4[0][1]=2, F4[1][1]=4, F4[2][1]=2, (369)

[1317] - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies:

[1318] —pDsY[x][y], where x=0..nTbW-1, y=0..nTbH-1 is derived as follows:

[1319]

[1320] Otherwise (sps_chroma_vertical_collocated_flag is equal to 0), the following applies:

[1321] —pDsY[x][y], where x=0..nTbW-1, y=0..nTbH-1 is derived as follows:

[1322]

[1323]

[1324] 4. When numSampL is greater than 0, the selected adjacent left chroma sample pSelC[idx] is set equal to p[-1][pickPosL[idx]], where idx = 0..cntL-1, and the selected downsampled adjacent left luma sample pSelDsY[idx], where idx = 0..cntL-1, is derived as follows:

[1325] —The variable y is set equal to pickPosL[idx].

[1326] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[1327] pSelDsY[idx]=pY[-1][y](372)

[1328] — Otherwise, the following applies:

[1329] - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies:

[1330] Otherwise (sps_chroma_vertical_collocated_flag is equal to 0), the following applies:

[1331]

[1332] 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=0..cntL+cntT-1 is specified as follows:

[1333] —The variable x is set equal to pickPosT[idx-cntL].

[1334] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[1335] pSelDsY[idx]=pY[x][-1](375)

[1336] — Otherwise, the following applies:

[1337] - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies:

[1338] If bCTUboundary is equal to FALSE, the following applies:

[1339]

[1340] — Otherwise (bCTUboundary is TRUE), the following applies:

[1341]

[1342] Otherwise (sps_chroma_vertical_collocated_flag is equal to 0), the following applies:

[1343] If bCTUboundary is equal to FALSE, the following applies:

[1344]

[1345] — Otherwise (bCTUboundary is TRUE), the following applies:

[1346]

[1347] 6. When cntT+cntL is not equal to 0, the variables minY, maxY, minC, and maxC are derived as follows:

[1348] —When cntT+cntL is equal to 2, pSelComp[3] is set equal to pSelComp[0], pSelComp[2] is set equal to pSelComp[1], pSelComp[0] is set equal to pSelComp[1], pSelComp[1] is set equal to pSelComp[3], and Comp is replaced by DsY and C.

[1349] —The arrays minGrpIdx and maxGrpIdx are derived as follows:

[1350] minGrpIdx[0]=0(380)

[1351] minGrpIdx[1]=2(381)

[1352] maxGrpIdx[0]=1(382)

[1353] maxGrpIdx[1]=3(383)

[1354] —When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[minGrpIdx[1]], minGrpIdx[0] and minGrpIdx[1] are swapped as follows:

[1355] (minGrpIdx[0], minGrpIdx[1])=Swap(minGrpIdx[0], minGrpIdx[1]) (384)

[1357] —When pSelDsY[maxGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], maxGrpIdx[0] and maxGrpIdx[1] are swapped as follows:

[1358] (maxGrpIdx[0], maxGrpIdx[1])=Swap(maxGrpIdx[0], maxGrpIdx[1]) (385)

[1360] —When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], the arrays minGrpIdx and maxGrpIdx are swapped as follows:

[1361] (minGrpIdx, maxGrpIdx) = Swap (minGrpIdx, maxGrpIdx) (386)

[1362] —When pSelDsY[minGrpIdx[1]] is greater than pSelDsY[maxGrpIdx[0]], minGrpIdx[1] and maxGrpIdx[0] are swapped as follows:

[1363] (minGrpIdx[1], maxGrpIdx[0])=Swap(minGrpIdx[1], maxGrpIdx[0]) (387)

[1365] —The variables maxY, maxC, minY, and minC are derived as follows:

[1366] maxY=(pSelDsY[maxGrpIdx[0]]+pSelDsY[maxGrpIdx[1]]+1)>>1 (388)

[1368] maxC=(pSelC[maxGrpIdx[0]]+pSelC[maxGrpIdx[1]]+1)>>1 (389)

[1370] minY=(pSelDsY[minGrpIdx[0]]+pSelDsY[minGrpIdx[1]]+1)>>1 (390)

[1372] minC=(pSelC[minGrpIdx[0]]+pSelC[minGrpIdx[1]]+1)>>1(391)

[1373] 7. The variables a, b, and k are derived as follows:

[1374] — If numSampL is equal to 0 and numSampT is equal to 0, then the following applies:

[1375] k=0(392)

[1376] a=0(393)

[1377] b=1<<(BitDepth-1)(394)

[1378] — Otherwise, the following applies:

[1379] diff=maxY-minY(395)

[1380] — If diff is not equal to 0, the following applies:

[1381] diffC=maxC-minC(396)

[1382] x=Floor(Log2(diff))(397)

[1383] normDiff=((diff<<4)>>x)&15(398)

[1384] x+=(normDiff!=0)? 1:0(399)

[1385] y=Abs(diffC)>0? Floor(Log2(Abs(diffC)))+1:0(400)

[1386] a=(diffC×(divSigTable[normDiff]|8)+2 y-1 )>>y(401)

[1387] k=((3+xy)<1)? 1:3+xy(402)

[1388] a=((3+xy)<1)? Sign(a)×15:a(403)

[1389] b=minC-((a×minY)>>k)(404)

[1390] where divSigTable[] is specified as follows:

[1391] divSigTable[]={0, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0} (405)

[1392] — Otherwise (diff is equal to 0), the following applies:

[1393] k=0(406)

[1394] a=0(407)

[1395] b=minC(408)

[1396] 8. The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[1397] predSamples[x][y]=Clip1(((pDsY[x][y]×a)>>k)+b)(409)

[1398] NOTE - This process uses sps_chroma_vertical_collocated_flag. However, to simplify the implementation, it does not use sps_chroma_horizontal_collocated_flag.

[1399] 5.9. Example 9

[1400] The working draft specified in JVET-Q2001-vE may be modified as follows. 8.4.5.2.13

[1402] The inputs to this process are:

[1403] —Intra prediction mode predModeIntra,

[1404] - the sample position of the upper left sample of the current transform block relative to the upper left sample of the current picture (xTbC, yTbC),

[1405] - variable nTbW specifying the transform block width,

[1406] — variable nTbH specifying the transform block height,

[1407] — variable cIdx specifying the color component of the current block,

[1408] - Chroma adjacent sample points p[x][y], where x = -1, y = 0..2×nTbH-1, x = 0.2×nTbW-1, y = -1.

[1409] The output of this process is the predicted samples predSamples[x][y], where x = 0..nTbW-1, y = 0..nTbH-1.

[1410] The current brightness position (xTbY, yTbY) is derived as follows:

[1411] (xTbY, yTbY) = (xTbC<<(SubWidthC-1), yTbC<<(SubHeightC-1)) (351)

[1413] The variables availL, availT, and availTL are derived as follows:

[1414] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using as input the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY-1, yTbY), checkPredModeY set equal to false (FLASE), and cIdx, and assign the output to availL.

[1415] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY, yTbY-1), checkPredModeY set equal to false (FLASE), and cIdx as input, and assign the output to availT.

[1416] —The variable availTL is derived as follows:

[1417] availTL=availL&&availT(352)

[1418] The number of available top-right adjacent chroma samples numTopRight is derived as follows:

[1419] —The variable numTopRight is set to 0, and availTR is set to true (TRUE).

[1420] - When predModeIntra is equal to INTRA_T_CCLM, the following applies for x=nTbW..2×nTbW-1 until availTR is equal to FALSE or x is equal to 2×nTbW-1:

[1421] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using as input the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY+x, yTbY-1), checkPredModeY set equal to false (FLASE), and cIdx, and assign the output to availTR.

[1422] —When availTR is equal to true (TRUE), numTopRight is increased by 1.

[1423] The number of available lower left adjacent chroma samples numLeftBelow is derived as follows:

[1424] —The variable numLeftBelow is set to 0, and availLB is set to true (TRUE).

[1425] - When predModeIntra is equal to INTRA_L_CCLM, the following applies for y=nTbH..2×nTbH-1 until availLB is equal to FALSE or y is equal to 2×nTbH-1:

[1426] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY-1, yTbY+y), checkPredModeY set equal to false (FLASE), and cIdx as input, and assign the output to availLB.

[1427] —When availLB is equal to TRUE, numLeftBelow is increased by 1.

[1428] The number of available adjacent chroma samples numSampT at the top and upper right and the number of available adjacent chroma samples numSampL at the left and lower left are derived as follows:

[1429] If predModeIntra is equal to INTRA_LT_CCLM, the following applies:

[1430] numSampT=availT? nTbW:0(353)

[1431] numSampL=availL? nTbH:0(354)

[1432] — Otherwise, the following applies:

[1433] numSampT=(availT&&predModeIntra==INTRA_T_CCLM)? (nTbW+Min(numTopRight,nTbH)):0(355)

[1434] numSampL=(availL&&predModeIntra==INTRA_L_CCLM)? (nTbH+Min(numLeftBelow,nTbW)):0(356)

[1435] The variable bCTUboundary is derived as follows:

[1436] bCTUboundary=(yTbY&(CtbSizeY-1)==0)? TRUE:FALSE(357)

[1437] The variable cntN and array pickPosN, where N is replaced by L and T, are derived as follows:

[1438] —The variable numIs4N is derived as follows:

[1439] numIs4N=((availT&&availL&&predModeIntra==INTRA_LT_CCLM)?0:1)(358)

[1440] —The variable startPosN is set equal to numSampN>>(2+numIs4N).

[1441] - The variable pickStepN is set equal to Max(1, numSampN>>(1+numIs4N)).

[1442] —If availN is equal to TRUE and predModeIntra is equal to INTRA_LT_CCLM or INTRA_N_CCLM, then the following assignments are made:

[1443] —cntN is set equal to Min(numSampN, (1+numIs4N)<<1).

[1444] - pickPosN[pos] is set equal to (startPosN+pos×pickStepN), where pos=0..cntN-1.

[1445] Otherwise, cntN is set equal to 0.

[1446] The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[1447] — If numSampL and numSampT are both equal to 0, then the following applies:

[1448] predSamples[x][y]=1<<(BitDepth-1)(359)

[1449] — Otherwise, the following ordered steps apply:

[1450] 1. The co-located luma sample pY[x][y] where x=0..nTbW×SubWidthC-1, y=0..TbH×SubHeightC-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[1451] 2. The adjacent brightness samples pY[x][y] are derived as follows:

[1452] —When numSampL is greater than 0, the adjacent left luma sample pY[x][y] where x=-1..-3, y=0..SubHeightC×numSampL-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[1453] —When availT is equal to FALSE, where The adjacent top luma sample pY[x][y] with y=-1..-2 is set equal to the luma sample pY[x][0].

[1454] [[—When availL is equal to FALSE, the adjacent left luma sample pY[x][y] where x = -1..-3, y = -1..SubHeightC×numSampL-1 is set equal to the luma sample pY[0][y]. ]]

[1455] When numSampT is greater than 0, the adjacent top luma sample pY[x][y] where x=0..SubWidthC×numSampT-1, y=-1..-2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[1456]

[1457] —When availTL is equal to true (TRUE), the adjacent upper left luma sample pY[x][y] where x=-1, y=-1, -2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[1458] 3. The downsampled co-located luminance sample pDsY[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[1459] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[1460] —pDsY[x][y], where x=1..nTbW-1, y=1..nTbH-1 is derived as follows:

[1461] pDstY[x][y]=pY[x][y](360)

[1462] — Otherwise, the following applies:

[1463] —The one-dimensional filter coefficient arrays F1 and F2 and the two-dimensional filter coefficient arrays F3 and F4 are specified as follows.

[1464] F1[0]=2,F1[1]=0(361)

[1465] F2[0]=1,F2[1]=2,F2[2]=1(362)

[1466] F3[i][j]=F4[i][j]=0, ​​where i=0..2, j=0..2(363)

[1467] If SubWidthC and SubHeightC are both equal to 2, then the following applies:

[1468] F1[0]=1,F1[1]=1(364)

[1469] F3[0][1]=1,F3[1][1]=4,F3[2][1]=1,F3[1][0]=1,F3[1][2]=1(365)

[1470] F4[0][1]=1, F4[1][1]=2, F4[2][1]=1(366)

[1471] F4[0][2]=1, F4[1][2]=2, F4[2][2]=1(367)

[1472] — Otherwise, the following applies:

[1473] F3[1][1]=8(368)

[1474] F4[0][1]=2, F4[1][1]=4, F4[2][1]=2, (369)

[1475] - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies:

[1476] —pDsY[x][y], where x=0..nTbW-1, y=0..nTbH-1 is derived as follows:

[1477]

[1478] Otherwise (sps_chroma_vertical_collocated_flag is equal to 0), the following applies:

[1479] —pDsY[x][y], x=0..nTbW-1, y=0..nTbH-1 is derived as follows:

[1480]

[1481]

[1482] 4. When numSampL is greater than 0, the selected adjacent left chroma sample pSelC[idx] is set equal to p[-1][pickPosL[idx]], where idx = 0..cntL-1, and the selected downsampled adjacent left luma sample pSelDsY[idx], where idx = 0..cntL-1, is derived as follows:

[1483] —The variable y is set equal to pickPosL[idx].

[1484] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[1485] pSelDsY[idx]=pY[-1][y](372)

[1486] — Otherwise, the following applies:

[1487] - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies:

[1488] Otherwise (sps_chroma_vertical_collocated_flag is equal to 0), the following applies:

[1489]

[1490] 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=0..cntL+cntT-1 is specified as follows:

[1491] —The variable x is set equal to pickPosT[idx-cntL].

[1492] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[1493] pSelDsY[idx]=pY[x][-1](375)

[1494] — Otherwise, the following applies:

[1495] - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies:

[1496] If bCTUboundary is equal to FALSE, the following applies:

[1497]

[1498] — Otherwise (bCTUboundary is TRUE), the following applies:

[1499]

[1500] Otherwise (sps_chroma_vertical_collocated_flag is equal to 0), the following applies:

[1501] If bCTUboundary is equal to FALSE, the following applies:

[1502]

[1503] — Otherwise (bCTUboundary is TRUE), the following applies:

[1504]

[1505] 6. When cntT+cntL is not equal to 0, the variables minY, maxY, minC, and maxC are derived as follows:

[1506] —When cntT+cntL is equal to 2, pSelComp[3] is set equal to pSelComp[0], pSelComp[2] is set equal to pSelComp[1], pSelComp[0] is set equal to pSelComp[1], pSelComp[1] is set equal to pSelComp[3], and Comp is replaced by DsY and C.

[1507] —The arrays minGrpIdx and maxGrpIdx are derived as follows:

[1508] minGrpIdx[0]=0(380)

[1509] minGrpIdx[1]=2(381)

[1510] maxGrpIdx[0]=1(382)

[1511] maxGrpIdx[1]=3(383)

[1512] —When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[minGrpIdx[1]], minGrpIdx[0] and minGrpIdx[1] are swapped as follows:

[1513] (minGrpIdx[0], minGrpIdx[1])=Swap(minGrpIdx[0], minGrpIdx[1]) (384)

[1515] —When pSelDsY[maxGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], maxGrpIdx[0] and maxGrpIdx[1] are swapped as follows:

[1516] (maxGrpIdx[0], maxGrpIdx[1])=Swap(maxGrpIdx[0], maxGrpIdx[1]) (385)

[1518] —When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], the arrays minGrpIdx and maxGrpIdx are swapped as follows:

[1519] (minGrpIdx, maxGrpIdx) = Swap (minGrpIdx, maxGrpIdx) (386)

[1520] —When pSelDsY[minGrpIdx[1]] is greater than pSelDsY[maxGrpIdx[0]], minGrpIdx[1] and maxGrpIdx[0] are swapped as follows:

[1521] (minGrpIdx[1], maxGrpIdx[0])=Swap(minGrpIdx[1], maxGrpIdx[0]) (387)

[1523] —The variables maxY, maxC, minY, and minC are derived as follows:

[1524] maxY=(pSelDsY[maxGrpIdx[0]]+pSelDsY[maxGrpIdx[1]]+1)>>1 (388)

[1526] maxC=(pSelC[maxGrpIdx[0]]+pSelC[maxGrpIdx[1]]+1)>>1(389)

[1527] minY=(pSelDsY[minGrpIdx[0]]+pSelDsY[minGrpIdx[1]]+1)>>1 (390)

[1529] minC=(pSelC[minGrpIdx[0]]+pSelC[minGrpIdx[1]]+1)>>1(391)

[1530] 7. The variables a, b, and k are derived as follows:

[1531] — If numSampL is equal to 0 and numSampT is equal to 0, then the following applies:

[1532] k=0(392)

[1533] a=0(393)

[1534] b=1<<(BitDepth-1)(394)

[1535] — Otherwise, the following applies:

[1536] diff=maxY-minY(395)

[1537] — If diff is not equal to 0, the following applies:

[1538] diffC=maxC-minC(396)

[1539] x=Floor(Log2(diff))(397)

[1540] normDiff=((diff<<4)>>x)&15(398)

[1541] x+=(normDiff!=0)? 1:0(399)

[1542] y=Abs(diffC)>0? Floor(Log2(Abs(diffC)))+1:0(400)

[1543] a=(diffC×(divSigTable[normDiff]|8)+2 y-1 )>>y(401)

[1544] k=((3+xy)<1)? 1:3+xy(402)

[1545] a=((3+xy)<1)? Sign(a)×15:a(403)

[1546] b=minC-((a×minY)>>k)(404)

[1547] where divSigTable[] is specified as follows:

[1548] divSigTable[]={0, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0} (405)

[1549] — Otherwise (diff is equal to 0), the following applies:

[1550] k=0(406)

[1551] a=0(407)

[1552] b=minC(408)

[1553] 8. The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[1554] predSamples[x][y]=Clip1(((pDsY[x][y]×a)>>k)+b)(409)

[1555] NOTE - This process uses sps_chroma_vertical_collocated_flag. However, to simplify the implementation, it does not use sps_chroma_horizontal_collocated_flag.

[1556] 5.10. Example 10

[1557] The working draft specified in JVET-Q2001-vE may be modified as follows. 8.4.5.2.13

[1559] The inputs to this process are:

[1560] —Intra prediction mode predModeIntra,

[1561] - the sample position of the upper left sample of the current transform block relative to the upper left sample of the current picture (xTbC, yTbC),

[1562] - variable nTbW specifying the transform block width,

[1563] — variable nTbH specifying the transform block height,

[1564] — variable cIdx specifying the color component of the current block,

[1565] - Chroma neighboring samples p[x][y], where x = -1, y = 0..2×nTbH-1, and x = 0..2×nTbW-1, y = -1.

[1566] The output of this process is the predicted samples predSamples[x][y], where x = 0..nTbW-1, y = 0..nTbH-1.

[1567] The current brightness position (xTbY, yTbY) is derived as follows:

[1568] (xTbY, yTbY) = (xTbC<<(SubWidthC-1), yTbC<<(SubHeightC-1)) (351)

[1570] The variables availL, availT, and availTL are derived as follows:

[1571] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using as input the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY-1, yTbY), checkPredModeY set equal to false (FLASE), and cIdx, and assign the output to availL.

[1572] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY, yTbY-1), checkPredModeY set equal to false (FLASE), and cIdx as input, and assign the output to availT.

[1573]

[1574] [[—The variable availTL is derived as follows:

[1575] availTL=availL&&availT(352)]]

[1576] The number of available top-right adjacent chroma samples numTopRight is derived as follows:

[1577] —The variable numTopRight is set to 0, and availTR is set to true (TRUE).

[1578] - When predModeIntra is equal to INTRA_T_CCLM, the following applies for x=nTbW..2×nTbW-1 until availTR is equal to FALSE or x is equal to 2×nTbW-1:

[1579] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using as input the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY+x, yTbY-1), checkPredModeY set equal to false (FLASE), and cIdx, and assign the output to availTR.

[1580] —When availTR is equal to true (TRUE), numTopRight is increased by 1.

[1581] The number of available lower left adjacent chroma samples numLeftBelow is derived as follows:

[1582] —The variable numLeftBelow is set to 0, and availLB is set to true (TRUE).

[1583] When predModeIntra is equal to INTRA_L_CCLM, the following applies for y=nTbH..2×nTbH-1 until availLB is equal to FALSE or y is equal to 2×nTbH-1:

[1584] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY-1, yTbY+y), checkPredModeY set equal to false (FLASE), and cIdx as input, and assign the output to availLB.

[1585] —When availLB is equal to TRUE, numLeftBelow is increased by 1.

[1586] The number of available adjacent chroma samples numSampT at the top and upper right and the number of available adjacent chroma samples numSampL at the left and lower left are derived as follows:

[1587] If predModeIntra is equal to INTRA_LT_CCLM, the following applies:

[1588] numSampT=availT? nTbW:0(353)

[1589] numSampL=availL? nTbH:0(354)

[1590] — Otherwise, the following applies:

[1591] numSampT=(availT&&predModeIntra==INTRA_T_CCLM)? (nTbW+Min(numTopRight,nTbH)):0(355)

[1592] numSampL=(availL&&predModeIntra==INTRA_L_CCLM)? (nTbH+Min(numLeftBelow,nTbW)):0(356)

[1593] The variable bCTUboundary is derived as follows:

[1594] bCTUboundary=(yTbY&(CtbSizeY-1)==0)? TRUE:FALSE(357)

[1595] The variable cntN and array pickPosN, where N is replaced by L and T, are derived as follows:

[1596] —The variable numIs4N is derived as follows:

[1597] numIs4N=((availT&&availL&&predModeIntra==INTRA_LT_CCLM)?0:1)(358)

[1598] —The variable startPosN is set equal to numSampN>>(2+numIs4N).

[1599] - The variable pickStepN is set equal to Max(1, numSampN>>(1+numIs4N)).

[1600] —If availN is equal to TRUE and predModeIntra is equal to INTRA_LT_CCLM or INTRA_N_CCLM, then the following assignments are made:

[1601] —cntN is set equal to Min(numSampN, (1+numIs4N)<<1).

[1602] - pickPosN[pos] is set equal to (startPosN+pos×pickStepN), where pos=0..cntN-1.

[1603] Otherwise, cntN is set equal to 0.

[1604] The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[1605] — If numSampL and numSampT are both equal to 0, then the following applies:

[1606] predSamples[x][y]=1<<(BitDepth-1)(359)

[1607] — Otherwise, the following ordered steps apply:

[1608] 1. The co-located luma sample pY[x][y] where x=0..nTbW×SubWidthC-1, y=0..TbH×SubHeightC-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[1609] 2. The adjacent brightness samples pY[x][y] are derived as follows:

[1610] —When numSampL is greater than 0, the adjacent left luma sample pY[x][y] where x=-1..-3, y=0..SubHeightC×numSampL-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[1611] [[—When availT is equal to FALSE, the adjacent top luma sample pY[x][y] where x = -1..SubWidthC×numSampT-1, y = -1..-2 is set equal to luma sample pY[x][0].

[1612] - When availL is equal to FALSE, the adjacent left luma sample pY[x][y] where x = -1..-3, y = -1..SubHeightC×numSampL-1 is set equal to the luma sample pY[0][y].

[1613] When numSampT is greater than 0, the adjacent top luma sample pY[x][y] where x=0..SubWidthC×numSampT-1, y=-1..-2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[1614] -[[when]] When availTL is equal to true (TRUE), the adjacent upper left luma sample pY[x][y] with x=-1,-2, y=-1,-2 is set equal to the reconstructed luma sample before the deblocking filtering process at the position (xTbY+x, yTbY+y).

[1615]

[1616]

[1617] 3. The downsampled co-located luminance sample pDsY[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[1618] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[1619] —pDsY[x][y], x=1..nTbW-1, y=1..nTbH-1 is derived as follows:

[1620] pDstY[x][y]=pY[x][y](360)

[1621] — Otherwise, the following applies:

[1622] —The one-dimensional filter coefficient arrays F1 and F2 and the two-dimensional filter coefficient arrays F3 and F4 are specified as follows.

[1623] F1[0]=2,F1[1]=0(361)

[1624] F2[0]=1,F2[1]=2,F2[2]=1(362)

[1625] F3[i][j]=F4[i][j]=0, ​​where i=0..2, j=0..2(363)

[1626] If SubWidthC and SubHeightC are both equal to 2, then the following applies:

[1627] F1[0]=1,F1[1]=1(364)

[1628] F3[0][1]=1,F3[1][1]=4,F3[2][1]=1,F3[1][0]=1,F3[1][2]=1(365)

[1629] F4[0][1]=1, F4[1][1]=2, F4[2][1]=1(366)

[1630] F4[0][2]=1, F4[1][2]=2, F4[2][2]=1(367)

[1631] — Otherwise, the following applies:

[1632] F3[1][1]=8(368)

[1633] F4[0][1]=2, F4[1][1]=4, F4[2][1]=2, (369)

[1634] - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies:

[1635] —pDsY[x][y], where x=0..nTbW-1, y=0..nTbH-1 is derived as follows:

[1636]

[1637]

[1638] Otherwise (sps_chroma_vertical_collocated_flag is equal to 0), the following applies:

[1639] —pDsY[x][y], where x=0..nTbW-1, y=0..nTbH-1 is derived as follows:

[1640]

[1641] 4. When numSampL is greater than 0, the selected adjacent left chroma sample pSelC[idx] is set equal to p[-1][pickPosL[idx]], where idx = 0..cntL-1, and the selected downsampled adjacent left luma sample pSelDsY[idx], where idx = 0..cntL-1, is derived as follows:

[1642] —The variable y is set equal to pickPosL[idx].

[1643] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[1644] pSelDsY[idx]=pY[-1][y](372)

[1645] — Otherwise, the following applies:

[1646] - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies:

[1647] Otherwise (sps_chroma_vertical_collocated_flag is equal to 0), the following applies:

[1648]

[1649]

[1650] 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=0..cntL+cntT-1 is specified as follows:

[1651] —The variable x is set equal to pickPosT[idx-cntL].

[1652] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[1653] pSelDsY[idx]=pY[x][-1](375)

[1654] — Otherwise, the following applies:

[1655] - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies:

[1656] If bCTUboundary is equal to FALSE, the following applies:

[1657]

[1658] — Otherwise (bCTUboundary is TRUE), the following applies:

[1659]

[1660] Otherwise (sps_chroma_vertical_collocated_flag is equal to 0), the following applies:

[1661] If bCTUboundary is equal to FALSE, the following applies:

[1662]

[1663] — Otherwise (bCTUboundary is TRUE), the following applies:

[1664]

[1665] 6. When cntT+cntL is not equal to 0, the variables minY, maxY, minC, and maxC are derived as follows:

[1666] —When cntT+cntL is equal to 2, pSelComp[3] is set equal to pSelComp[0], pSelComp[2] is set equal to pSelComp[1], pSelComp[0] is set equal to pSelComp[1], pSelComp[1] is set equal to pSelComp[3], and Comp is replaced by DsY and C.

[1667] —The arrays minGrpIdx and maxGrpIdx are derived as follows:

[1668] minGrpIdx[0]=0(380)

[1669] minGrpIdx[1]=2(381)

[1670] maxGrpIdx[0]=1(382)

[1671] maxGrpIdx[1]=3(383)

[1672] —When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[minGrpIdx[1]], minGrpIdx[0] and minGrpIdx[1] are swapped as follows:

[1673] (minGrpIdx[0], minGrpIdx[1])=Swap(minGrpIdx[0], minGrpIdx[1]) (384)

[1675] —When pSelDsY[maxGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], maxGrpIdx[0] and maxGrpIdx[1] are swapped as follows:

[1676] (maxGrpIdx[0], maxGrpIdx[1])=Swap(maxGrpIdx[0], maxGrpIdx[1]) (385)

[1678] —When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], the arrays minGrpIdx and maxGrpIdx are swapped as follows:

[1679] (minGrpIdx, maxGrpIdx) = Swap (minGrpIdx, maxGrpIdx) (386)

[1680] —When pSelDsY[minGrpIdx[1]] is greater than pSelDsY[maxGrpIdx[0]], minGrpIdx[1] and maxGrpIdx[0] are swapped as follows:

[1681] (minGrpIdx[1], maxGrpIdx[0])=Swap(minGrpIdx[1], maxGrpIdx[0]) (387)

[1683] —The variables maxY, maxC, minY, and minC are derived as follows:

[1684] maxY=(pSelDsY[maxGrpIdx[0]]+pSelDsY[maxGrpIdx[1]]+1)>>1 (388)

[1686] maxC=(pSelC[maxGrpIdx[0]]+pSelC[maxGrpIdx[1]]+1)>>1 (389)

[1688] minY=(pSelDsY[minGrpIdx[0]]+pSelDsY[minGrpIdx[1]]+1)>>1 (390)

[1690] minC=(pSelC[minGrpIdx[0]]+pSelC[minGrpIdx[1]]+1)>>1(391)

[1691] 7. The variables a, b, and k are derived as follows:

[1692] — If numSampL is equal to 0 and numSampT is equal to 0, then the following applies:

[1693] k=0(392)

[1694] a=0(393)

[1695] b=1<<(BitDepth-1)(394)

[1696] — Otherwise, the following applies:

[1697] diff=maxY-minY(395)

[1698] — If diff is not equal to 0, the following applies:

[1699] diffC=maxC-minC(396)

[1700] x=Floor(Log2(diff))(397)

[1701] normDiff=((diff<<4)>>x)&15(398)

[1702] x+=(normDiff!=0)? 1:0(399)

[1703] y=Abs(diffC)>0? Floor(Log2(Abs(diffC)))+1:0(400)

[1704] a=(diffC×(divSigTable[normDiff]|8)+2 y - 1 )>>y(401)

[1705] k=((3+xy)<1)? 1:3+xy(402)

[1706] a=((3+xy)<1)? Sign(a)×15:a(403)

[1707] b=minC-((a×minY)>>k)(404)

[1708] where divSigTable[] is specified as follows:

[1709] divSigTable[]={0, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0} (405)

[1710] — Otherwise (diff is equal to 0), the following applies:

[1711] k=0(406)

[1712] a=0(407)

[1713] b=minC(408)

[1714] 8. The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[1715] predSamples[x][y]=Clip1(((pDsY[x][y]×a)>>k)+b)(409)

[1716] NOTE - This process uses sps_chroma_vertical_collocated_flag. However, to simplify the implementation, it does not use sps_chroma_horizontal_collocated_flag.

[1717] Example 11

[1718] The working draft specified in JVET-Q2001-vE may be modified as follows. 8.4.5.2.13

[1720] The inputs to this process are:

[1721] —Intra prediction mode predModeIntra,

[1722] - the sample position of the upper left sample of the current transform block relative to the upper left sample of the current picture (xTbC, yTbC),

[1723] - variable nTbW specifying the transform block width,

[1724] — variable nTbH specifying the transform block height,

[1725] — variable cIdx specifying the color component of the current block,

[1726] - Chroma neighboring samples p[x][y], where x = -1, y = 0..2×nTbH-1, and x = 0..2×nTbW-1, y = -1.

[1727] The output of this process is the predicted samples predSamples[x][y], where x = 0..nTbW-1, y = 0..nTbH-1.

[1728] The current brightness position (xTbY, yTbY) is derived as follows:

[1729] (xTbY, yTbY) = (xTbC<<(SubWidthC-1), yTbC<<(SubHeightC-1))(351)

[1730] The variables availL, availT, and availTL are derived as follows:

[1731] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using as input the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY-1, yTbY), checkPredModeY set equal to false (FLASE), and cIdx, and assign the output to availL.

[1732] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY, yTbY-1), checkPredModeY set equal to false (FLASE), and cIdx as input, and assign the output to availT.

[1733] [[—The variable availTL is derived as follows: availTL=availL&&availT(352)]]

[1734] The number of available top-right adjacent chroma samples numTopRight is derived as follows:

[1735] —The variable numTopRight is set to 0, and availTR is set to true (TRUE).

[1736] - When predModeIntra is equal to INTRA_T_CCLM, the following applies for x=nTbW..2×nTbW-1 until availTR is equal to FALSE or x is equal to 2×nTbW-1:

[1737] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using as input the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY+x, yTbY-1), checkPredModeY set equal to false (FLASE), and cIdx, and assign the output to availTR.

[1738] —When availTR is equal to true (TRUE), numTopRight is increased by 1.

[1739] The number of available lower left adjacent chroma samples numLeftBelow is derived as follows:

[1740] —The variable numLeftBelow is set to 0, and availLB is set to true (TRUE).

[1741] When predModeIntra is equal to INTRA_L_CCLM, the following applies for y=nTbH..2×nTbH-1 until availLB is equal to FALSE or y is equal to 2×nTbH-1:

[1742] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY-1, yTbY+y), checkPredModeY set equal to false (FLASE), and cIdx as input, and assign the output to availLB.

[1743] —When availLB is equal to TRUE, numLeftBelow is increased by 1.

[1744] The number of available adjacent chroma samples numSampT at the top and upper right and the number of available adjacent chroma samples numSampL at the left and lower left are derived as follows:

[1745] If predModeIntra is equal to INTRA_LT_CCLM, the following applies:

[1746] numSampT=availT? nTbW:0(353)

[1747] numSampL=availL? nTbH:0(354)

[1748] — Otherwise, the following applies:

[1749] numSampT=(availT&&predModeIntra==INTRA_T_CCLM)? (nTbW+Min(numTopRight,nTbH)):0(355)

[1750] numSampL=(availL&&predModeIntra==INTRA_L_CCLM)? (nTbH+Min(numLeftBelow,nTbW)):0(356)

[1751] The variable bCTUboundary is derived as follows:

[1752] bCTUboundary=(yTbY&(CtbSizeY-1)==0)? TRUE:FALSE(357)

[1753] The variable cntN and array pickPosN, where N is replaced by L and T, are derived as follows:

[1754] —The variable numIs4N is derived as follows:

[1755] numIs4N=((availT&&availL&&predModeIntra==INTRA_LT_CCLM)?0:1)(358)

[1756] —The variable startPosN is set equal to numSampN>>(2+numIs4N).

[1757] - The variable pickStepN is set equal to Max(1, numSampN>>(1+numIs4N)).

[1758] —If availN is equal to TRUE and predModeIntra is equal to INTRA_LT_CCLM or INTRA_N_CCLM, then the following assignments are made:

[1759] —cntN is set equal to Min(numSampN, (1+numIs4N)<<1).

[1760] - pickPosN[pos] is set equal to (startPosN+pos×pickStepN), where pos=0..cntN-1.

[1761] Otherwise, cntN is set equal to 0.

[1762] The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[1763] — If numSampL and numSampT are both equal to 0, then the following applies:

[1764] predSamples[x][y]=1<<(BitDepth-1)(359)

[1765] — Otherwise, the following ordered steps apply:

[1766] 1. The co-located luma sample pY[x][y] where x=0..nTbW×SubWidthC-1, y=0..TbH×SubHeightC-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[1767] 2. The adjacent brightness samples pY[x][y] are derived as follows:

[1768] —When numSampL is greater than 0, the adjacent left luma sample pY[x][y] where x=-1..-3, y=0..SubHeightC×numSampL-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[1769] - When availT is equal to FALSE, the adjacent top luma sample pY[x][y] where x = -1..SubWidthC×numSampT-1, y = -1..-2 is set equal to luma sample pY[x][0].

[1770] - When availL is equal to FALSE, the adjacent left luma sample pY[x][y] where x = -1..-3, y = -1..SubHeightC×numSampL-1 is set equal to the luma sample pY[0][y].

[1771] When numSampT is greater than 0, the adjacent top luma sample pY[x][y] where x=0..SubWidthC×numSampT-1, y=-1..-2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[1772] [[—When availTL is equal to TRUE, the adjacent upper left luma sample pY[x][y] with x=-1, y=-1, -2 is set equal to the reconstructed luma sample at position (xTbY+x, yTbY+y) before the deblocking filtering process. ]]

[1773]

[1774] 3. The downsampled co-located luminance sample pDsY[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[1775] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[1776] —pDsY[x][y], x=1..nTbW-1, y=1..nTbH-1 is derived as follows:

[1777] pDstY[x][y]=pY[x][y](360)

[1778] — Otherwise, the following applies:

[1779] —The one-dimensional filter coefficient arrays F1 and F2 and the two-dimensional filter coefficient arrays F3 and F4 are specified as follows.

[1780] F1[0]=2,F1[1]=0(361)

[1781] F2[0]=1,F2[1]=2,F2[2]=1(362)

[1782] F3[i][j]=F4[i][j]=0, ​​where i=0..2, j=0..2(363)

[1783] If SubWidthC and SubHeightC are both equal to 2, then the following applies:

[1784] F1[0]=1,F1[1]=1(364)

[1785] F3[0][1]=1,F3[1][1]=4,F3[2][1]=1,F3[1][0]=1,F3[1][2]=1(365)

[1786] F4[0][1]=1, F4[1][1]=2, F4[2][1]=1(366)

[1787] F4[0][2]=1, F4[1][2]=2, F4[2][2]=1(367)

[1788] — Otherwise, the following applies:

[1789] F3[1][1]=8(368)

[1790] F4[0][1]=2, F4[1][1]=4, F4[2][1]=2, (369)

[1791] - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies:

[1792] pDsY[x][y], where x = 0..nTbW-1, y = 0..nTbH-1 is derived as follows:

[1793]

[1794]

[1795] Otherwise (sps_chroma_vertical_collocated_flag is equal to 0), the following applies:

[1796] pDsY[x][y], where x = 0..nTbW-1, y = 0..nTbH-1 is derived as follows:

[1797]

[1798] 4. When numSampL is greater than 0, the selected adjacent left chroma sample pSelC[idx] is set equal to p[-1][pickPosL[idx]], where idx = 0..cntL-1, and the selected downsampled adjacent left luma sample pSelDsY[idx], where idx = 0..cntL-1, is derived as follows:

[1799] —The variable y is set equal to pickPosL[idx].

[1800] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[1801] pSelDsY[idx]=pY[-1][y](372)

[1802] — Otherwise, the following applies:

[1803] - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies:

[1804] Otherwise (sps_chroma_vertical_collocated_flag is equal to 0), the following applies:

[1805]

[1806]

[1807] 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=0..cntL+cntT-1 is specified as follows:

[1808] —The variable x is set equal to pickPosT[idx-cntL].

[1809] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[1810] pSelDsY[idx]=pY[x][-1](375)

[1811] — Otherwise, the following applies:

[1812] - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies:

[1813] If bCTUboundary is equal to FALSE, the following applies:

[1814]

[1815] — Otherwise (bCTUboundary is TRUE), the following applies:

[1816]

[1817] Otherwise (sps_chroma_vertical_collocated_flag is equal to 0), the following applies:

[1818] If bCTUboundary is equal to FALSE, the following applies:

[1819]

[1820] — Otherwise (bCTUboundary is TRUE), the following applies:

[1821]

[1822] 6. When cntT+cntL is not equal to 0, the variables minY, maxY, minC, and maxC are derived as follows:

[1823] —When cntT+cntL is equal to 2, pSelComp[3] is set equal to pSelComp[0], pSelComp[2] is set equal to pSelComp[1], pSelComp[0] is set equal to pSelComp[1], pSelComp[1] is set equal to pSelComp[3], and Comp is replaced by DsY and C.

[1824] —The arrays minGrpIdx and maxGrpIdx are derived as follows:

[1825] minGrpIdx[0]=0(380)

[1826] minGrpIdx[1]=2(381)

[1827] maxGrpIdx[0]=1(382)

[1828] maxGrpIdx[1]=3(383)

[1829] —When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[minGrpIdx[1]], minGrpIdx[0] and minGrpIdx[1] are swapped as follows:

[1830] (minGrpIdx[0], minGrpIdx[1])=Swap(minGrpIdx[0], minGrpIdx[1]) (384)

[1832] —When pSelDsY[maxGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], maxGrpIdx[0] and maxGrpIdx[1] are swapped as follows:

[1833] (maxGrpIdx[0], maxGrpIdx[1])=Swap(maxGrpIdx[0], maxGrpIdx[1]) (385)

[1835] —When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], the arrays minGrpIdx and maxGrpIdx are swapped as follows:

[1836] (minGrpIdx, maxGrpIdx) = Swap (minGrpIdx, maxGrpIdx) (386)

[1837] —When pSelDsY[minGrpIdx[1]] is greater than pSelDsY[maxGrpIdx[0]], minGrpIdx[1] and maxGrpIdx[0] are swapped as follows:

[1838] (minGrpIdx[1], maxGrpIdx[0])=Swap(minGrpIdx[1], maxGrpIdx[0]) (387)

[1840] —The variables maxY, maxC, minY, and minC are derived as follows:

[1841] maxY=(pSelDsY[maxGrpIdx[0]]+pSelDsY[maxGrpIdx[1]]+1)>>1 (388)

[1843] maxC=(pSelC[maxGrpIdx[0]]+pSelC[maxGrpIdx[1]]+1)>>1 (389)

[1845] minY=(pSelDsY[minGrpIdx[0]]+pSelDsY[minGrpIdx[1]]+1)>>1 (390)

[1847] minC=(pSelC[minGrpIdx[0]]+pSelC[minGrpIdx[1]]+1)>>1(391)

[1848] 7. The variables a, b, and k are derived as follows:

[1849] — If numSampL is equal to 0 and numSampT is equal to 0, then the following applies:

[1850] k=0(392)

[1851] a=0(393)

[1852] b=1<<(BitDepth-1)(394)

[1853] — Otherwise, the following applies:

[1854] diff=maxY-minY(395)

[1855] — If diff is not equal to 0, the following applies:

[1856] diffC=maxC-minC(396)

[1857] x=Floor(Log2(diff))(397)

[1858] normDiff=((diff<<4)>>x)&15(398)

[1859] x+=(normDiff!=0)? 1:0(399)

[1860] y=Abs(diffC)>0? Floor(Log2(Abs(diffC)))+1:0(400)

[1861] a=(diffC×(divSigTable[normDiff]|8)+2 y - 1 )>>y(401)

[1862] k=((3+xy)<1)? 1:3+xy(402)

[1863] a=((3+xy)<1)? Sign(a)×15:a(403)

[1864] b=minC-((a×minY)>>k)(404)

[1865] where divSigTable[] is specified as follows:

[1866] divSigTable[]={0, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0} (405)

[1867] — Otherwise (diff is equal to 0), the following applies:

[1868] k=0(406)

[1869] a=0(407)

[1870] b=minC(408)

[1871] 8. The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[1872] predSamples[x][y]=Clip1(((pDsY[x][y]×a)>>k)+b)(409)

[1873] NOTE - This process uses sps_chroma_vertical_collocated_flag. However, to simplify the implementation, it does not use sps_chroma_horizontal_collocated_flag.

[1874] 5.12. Example 12

[1875] The working draft specified in JVET-Q2001-vE may be modified as follows. 8.4.5.2.13

[1877] The inputs to this process are:

[1878] —Intra prediction mode predModeIntra,

[1879] - the sample position of the upper left sample of the current transform block relative to the upper left sample of the current picture (xTbC, yTbC),

[1880] - variable nTbW specifying the transform block width,

[1881] — variable nTbH specifying the transform block height,

[1882] — variable cIdx specifying the color component of the current block,

[1883] - Chroma neighboring samples p[x][y], where x = -1, y = 0..2×nTbH-1, and x = 0..2×nTbW-1, y = -1.

[1884] The output of this process is the predicted samples predSamples[x][y], where x = 0..nTbW-1, y = 0..nTbH-1.

[1885] The current brightness position (xTbY, yTbY) is derived as follows:

[1886] (xTbY, yTbY) = (xTbC<<(SubWidthC-1), yTbC<<(SubHeightC-1)) (351)

[1888] The variables availL, availT, and availTL are derived as follows:

[1889] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using as input the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY-1, yTbY), checkPredModeY set equal to false (FLASE), and cIdx, and assign the output to availL.

[1890] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY, yTbY-1), checkPredModeY set equal to false (FLASE), and cIdx as input, and assign the output to availT.

[1891] —The variable availTL is derived as follows:

[1892] availTL=availL&&availT(352)

[1893] The number of available top-right adjacent chroma samples numTopRight is derived as follows:

[1894] —The variable numTopRight is set to 0, and availTR is set to true (TRUE).

[1895] - When predModeIntra is equal to INTRA_T_CCLM, the following applies for x=nTbW..2×nTbW-1 until availTR is equal to FALSE or x is equal to 2×nTbW-1:

[1896] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using as input the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY+x, yTbY-1), checkPredModeY set equal to false (FLASE), and cIdx, and assign the output to availTR.

[1897] —When availTR is equal to true (TRUE), numTopRight is increased by 1.

[1898] The number of available lower left adjacent chroma samples numLeftBelow is derived as follows:

[1899] —The variable numLeftBelow is set to 0, and availLB is set to true (TRUE).

[1900] When predModeIntra is equal to INTRA_L_CCLM, the following applies for y=nTbH..2×nTbH-1 until availLB is equal to FALSE or y is equal to 2×nTbH-1:

[1901] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY-1, yTbY+y), checkPredModeY set equal to false (FLASE), and cIdx as input, and assign the output to availLB.

[1902] —When availLB is equal to TRUE, numLeftBelow is increased by 1.

[1903] The number of available adjacent chroma samples numSampT at the top and upper right and the number of available adjacent chroma samples numSampL at the left and lower left are derived as follows:

[1904] If predModeIntra is equal to INTRA_LT_CCLM, the following applies:

[1905] numSampT=availT? nTbW:0(353)

[1906] numSampL=availL? nTbH:0(354)

[1907] — Otherwise, the following applies:

[1908] numSampT=(availT&&predModeIntra==INTRA_T_CCLM)? (nTbW+Min(numTopRight,nTbH)):0(355)

[1909] numSampL=(availL&&predModeIntra==INTRA_L_CCLM)? (nTbH+Min(numLeftBelow,nTbW)):0(356)

[1910] The variable bCTUboundary is derived as follows:

[1911] bCTUboundary=(yTbY&(CtbSizeY-1)==0)? TRUE:FALSE(357)

[1912] The variable cntN and array pickPosN, where N is replaced by L and T, are derived as follows:

[1913] —The variable numIs4N is derived as follows:

[1914] numIs4N=((availT&&availL&&predModeIntra==INTRA_LT_CCLM)?0:1)(358)

[1915] —The variable startPosN is set equal to numSampN>>(2+numIs4N).

[1916] - The variable pickStepN is set equal to Max(1, numSampN>>(1+numIs4N)).

[1917] —If availN is equal to TRUE and predModeIntra is equal to INTRA_LT_CCLM or INTRA_N_CCLM, then the following assignments are made:

[1918] —cntN is set equal to Min(numSampN, (1+numIs4N)<<1).

[1919] - pickPosN[pos] is set equal to (startPosN+pos×pickStepN), where pos=0..cntN-1.

[1920] Otherwise, cntN is set equal to 0.

[1921] The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[1922] — If numSampL and numSampT are both equal to 0, then the following applies:

[1923] predSamples[x][y]=1<<(BitDepth-1)(359)

[1924] — Otherwise, the following ordered steps apply:

[1925] 1. The co-located luma sample pY[x][y] where x=0..nTbW×SubWidthC-1, y=0..TbH×SubHeightC-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[1926] 2. The adjacent brightness samples pY[x][y] are derived as follows:

[1927] —When numSampL is greater than 0, the adjacent left luma sample pY[x][y] where x=-1..-3, y=0..SubHeightC×numSampL-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[1928] - When availT is equal to FALSE, the adjacent top luma sample pY[x][y] where x = -1..SubWidthC×numSampT-1, y = -1..-2 is set equal to luma sample pY[x][0].

[1929] - When availL is equal to FALSE, the adjacent left luma sample pY[x][y] where x = -1..-3, y = -1..SubHeightC×numSampL-1 is set equal to the luma sample pY[0][y].

[1930] - When numSampT is greater than 0, where x = 0..SubWidthC×numSampT-1, The adjacent top luma sample pY[x][y] of is set equal to the reconstructed luma sample before the deblocking filtering process at the position (xTbY+x, yTbY+y).

[1931] —When availTL is equal to true (TRUE), the adjacent upper left luma sample pY[x][y] where x=-1,-2, y=-1,-2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[1932] 3. The downsampled co-located luminance sample pDsY[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[1933] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[1934] —pDsY[x][y], x=1..nTbW-1, y=1..nTbH-1 is derived as follows:

[1935] pDstY[x][y]=pY[x][y](360)

[1936] — Otherwise, the following applies:

[1937] —The one-dimensional filter coefficient arrays F1 and F2 and the two-dimensional filter coefficient arrays F3 and F4 are specified as follows.

[1938] F1[0]=2,F1[1]=0(361)

[1939] F2[0]=1,F2[1]=2,F2[2]=1(362)

[1940] F3[i][j]=F4[i][j]=0, ​​where i=0..2, j=0..2(363)

[1941] If SubWidthC and SubHeightC are both equal to 2, then the following applies:

[1942] F1[0]=1,F1[1]=1(364)

[1943] F3[0][1]=1,F3[1][1]=4,F3[2][1]=1,F3[1][0]=1,F3[1][2]=1(365)

[1944] F4[0][1]=1, F4[1][1]=2, F4[2][1]=1(366)

[1945] F4[0][2]=1, F4[1][2]=2, F4[2][2]=1(367)

[1946] — Otherwise, the following applies:

[1947] F3[1][1]=8(368)

[1948] F4[0][1]=2, F4[1][1]=4, F4[2][1]=2, (369)

[1949] - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies:

[1950] —pDsY[x][y], where x=0..nTbW-1, y=0..nTbH-1 is derived as follows:

[1951]

[1952]

[1953] Otherwise (sps_chroma_vertical_collocated_flag is equal to 0), the following applies:

[1954] —pDsY[x][y] where x=0..nTbW-1, y=0..nTbH-1 is derived as follows:

[1955]

[1956] 4. When numSampL is greater than 0, the selected adjacent left chroma sample pSelC[idx] is set equal to p[-1][pickPosL[idx]], where idx = 0..cntL-1, and the selected downsampled adjacent left luma sample pSelDsY[idx], where idx = 0..cntL-1, is derived as follows:

[1957] —The variable y is set equal to pickPosL[idx].

[1958] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[1959] pSelDsY[idx]=pY[-1][y](372)

[1960] — Otherwise, the following applies:

[1961] - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies:

[1962] Otherwise (sps_chroma_vertical_collocated_flag is equal to 0), the following applies:

[1963]

[1964]

[1965] 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=0..cntL+cntT-1 is specified as follows:

[1966] —The variable x is set equal to pickPosT[idx-cntL].

[1967] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[1968] pSelDsY[idx]=pY[x][-1](375)

[1969] — Otherwise, the following applies:

[1970] - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies:

[1971] If bCTUboundary is equal to FALSE, the following applies:

[1972]

[1973] — Otherwise (bCTUboundary is TRUE), the following applies:

[1974]

[1975] Otherwise (sps_chroma_vertical_collocated_flag is equal to 0), the following applies:

[1976] If bCTUboundary is equal to FALSE, the following applies:

[1977]

[1978] — Otherwise (bCTUboundary is TRUE), the following applies:

[1979]

[1980]

[1981] 6. When cntT+cntL is not equal to 0, the variables minY, maxY, minC, and maxC are derived as follows:

[1982] —When cntT+cntL is equal to 2, pSelComp[3] is set equal to pSelComp[0], pSelComp[2] is set equal to pSelComp[1], pSelComp[0] is set equal to pSelComp[1], pSelComp[1] is set equal to pSelComp[3], and Comp is replaced by DsY and C.

[1983] —The arrays minGrpIdx and maxGrpIdx are derived as follows:

[1984] minGrpIdx[0]=0(380)

[1985] minGrpIdx[1]=2(381)

[1986] maxGrpIdx[0]=1(382)

[1987] maxGrpIdx[1]=3(383)

[1988] —When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[minGrpIdx[1]], minGrpIdx[0] and minGrpIdx[1] are swapped as follows:

[1989] (minGrpIdx[0], minGrpIdx[1])=Swap(minGrpIdx[0], minGrpIdx[1]) (384)

[1991] —When pSelDsY[maxGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], maxGrpIdx[0] and maxGrpIdx[1] are swapped as follows:

[1992] (maxGrpIdx[0], maxGrpIdx[1])=Swap(maxGrpIdx[0], maxGrpIdx[1]) (385)

[1994] —When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], the arrays minGrpIdx and maxGrpIdx are swapped as follows:

[1995] (minGrpIdx, maxGrpIdx) = Swap (minGrpIdx, maxGrpIdx) (386)

[1996] —When pSelDsY[minGrpIdx[1]] is greater than pSelDsY[maxGrpIdx[0]], minGrpIdx[1] and maxGrpIdx[0] are swapped as follows:

[1997] (minGrpIdx[1], maxGrpIdx[0])=Swap(minGrpIdx[1], maxGrpIdx[0]) (387)

[1999] —The variables maxY, maxC, minY, and minC are derived as follows:

[2000] maxY=(pSelDsY[maxGrpIdx[0]]+pSelDsY[maxGrpIdx[1]]+1)>>1 (388)

[2002] maxC=(pSelC[maxGrpIdx[0]]+pSelC[maxGrpIdx[1]]+1)>>1 (389)

[2004] minY=(pSelDsY[minGrpIdx[0]]+pSelDsY[minGrpIdx[1]]+1)>>1 (390)

[2006] minC=(pSelC[minGrpIdx[0]]+pSelC[minGrpIdx[1]]+1)>>1(391)

[2007] 7. The variables a, b, and k are derived as follows:

[2008] — If numSampL is equal to 0 and numSampT is equal to 0, then the following applies:

[2009] k=0(392)

[2010] a=0(393)

[2011] b=1<<(BitDepth-1)(394)

[2012] — Otherwise, the following applies:

[2013] diff=maxY-minY(395)

[2014] — If diff is not equal to 0, the following applies:

[2015] diffC=maxC-minC(396)

[2016] x=Floor(Log2(diff))(397)

[2017] normDiff=((diff<<4)>>x)&15(398)

[2018] x+=(normDiff!=0)? 1:0(399)y=Abs(diffC)>0? Floor(Log2(Abs(diffC)))+1:0(400)

[2019] a=(diffC×(divSigTable[normDiff]|8)+2y-1 )>>y(401)

[2020] k=((3+xy)<1)? 1:3+xy(402)

[2021] a=((3+xy)<1)? Sign(a)×15:a(403)

[2022] b=minC-((a×minY)>>k)(404)

[2023] where divSigTable[] is specified as follows:

[2024] divSigTable[]={0, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0} (405)

[2025] — Otherwise (diff is equal to 0), the following applies:

[2026] k=0(406)

[2027] a=0(407)

[2028] b=minC(408)

[2029] 8. The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[2030] predSamples[x][y]=Clip1(((pDsY[x][y]×a)>>k)+b)(409)

[2031] NOTE - This process uses sps_chroma_vertical_collocated_flag. However, to simplify the implementation, it does not use sps_chroma_horizontal_collocated_flag.

[2032] 5.13. Example 13

[2033] The working draft specified in JVET-Q2001-vE may be modified as follows.

[2034] 8.4.5.2.13 Specification of INTRA_LT_CCLM, INTRA_L_CCLM and INTRA_T_CCLM intra prediction modes

[2035] The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[2036] — If numSampL and numSampT are both equal to 0, then the following applies:

[2037] predSamples[x][y]=1<<(BitDepth-1)(359)

[2038] — Otherwise, the following ordered steps apply:

[2039] 1. The co-located luma sample pY[x][y] where x=0..nTbW×SubWidthC-1, y=0..TbH×SubHeightC-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2040] 2. The adjacent brightness samples pY[x][y] are derived as follows:

[2041] —When numSampL is greater than 0, the adjacent left luma sample pY[x][y] where x=-1..-3, y=0..SubHeightC×numSampL-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2042] —When availT is equal to FALSE, where The adjacent top luma sample pY[x][y] with y=-1..-2 is set equal to the luma sample pY[x][0].

[2043] - When availL is equal to FALSE, the adjacent left luma sample pY[x][y] where x = -1..-3, y = -1..SubHeightC×numSampL-1 is set equal to the luma sample pY[0][y].

[2044] When numSampT is greater than 0, the adjacent top luma sample pY[x][y] where x=0..SubWidthC×numSampT-1, y=-1..-2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2045] —When availTL is equal to true (TRUE), the adjacent upper left luma sample pY[x][y] where x=-1, y=-1, -2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2046] 5.14. Example 14

[2047] The working draft specified in JVET-Q2001-vE may be modified as follows.

[2048] 8.4.5.2.13 Specification of INTRA_LT_CCLM, INTRA_L_CCLM and INTRA_T_CCLM intra prediction modes

[2049] The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[2050] — If numSampL and numSampT are both equal to 0, then the following applies:

[2051] predSamples[x][y]=1<<(BitDepth-1)(359)

[2052] — Otherwise, the following ordered steps apply:

[2053] 1. The co-located luma sample pY[x][y] where x=0..nTbW×SubWidthC-1, y=0..TbH×SubHeightC-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2054] 2. The adjacent brightness samples pY[x][y] are derived as follows:

[2055] —When numSampL is greater than 0, the adjacent left luma sample pY[x][y] where x=-1..-3, y=0..SubHeightC×numSampL-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2056] —When availT equals FALSE When The adjacent top luma sample pY[x][y] with y=-1..-2 is set equal to the luma sample pY[x][0].

[2057] When availL is equal to FALSE, the adjacent left luma sample pY[x][y] where x=-1..-3, y=-1..SubHeightC×numSampL-1 is set equal to the luma sample pY[0][y].

[2058] When numSampT is greater than 0, the adjacent top luma sample pY[x][y] where x=0..SubWidthC×numSampT-1, y=-1..-2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2059] —When availTL is equal to true (TRUE), the adjacent upper left luma sample pY[x][y] where x=-1, y=-1, -2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2060] 5.15. Example 15

[2061] The working draft specified in JVET-Q2001-vE may be modified as follows.

[2062] 8.4.5.2.13 Specification of INTRA_LT_CCLM, INTRA_L_CCLM and INTRA_T_CCLM intra prediction modes

[2063] The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[2064] — If numSampL and numSampT are both equal to 0, then the following applies:

[2065] predSamples[x][y]=1<<(BitDepth-1)(359)

[2066] — Otherwise, the following ordered steps apply:

[2067] 1. The co-located luma sample pY[x][y] where x=0..nTbW×SubWidthC-1, y=0..TbH×SubHeightC-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2068] 2. The adjacent brightness samples pY[x][y] are derived as follows:

[2069] —When numSampL is greater than 0, the adjacent left luma sample pY[x][y] where x=-1..-3, y=0..SubHeightC×numSampL-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2070] - When availT is equal to FALSE, the adjacent top luma sample pY[x][y] where x = -1..SubWidthC×numSampT-1, y = -1..-2 is set equal to luma sample pY[x][0].

[2071] - when availL is equal to FALSE, where x = -1..-3, The adjacent left luma sample pY[x][y] is set equal to the luma sample pY[0][y].

[2072] When numSampT is greater than 0, the adjacent top luma sample pY[x][y] where x=0..SubWidthC×numSampT-1, y=-1..-2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2073] —When availTL is equal to true (TRUE), the adjacent upper left luma sample pY[x][y] where x=-1, y=-1, -2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2074] 5.16. Example 16

[2075] The working draft specified in JVET-Q2001-vE may be modified as follows.

[2076] 8.4.5.2.13 Specification of INTRA_LT_CCLM, INTRA_L_CCLM and INTRA_T_CCLM intra prediction modes

[2077] The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[2078] — If numSampL and numSampT are both equal to 0, then the following applies:

[2079] predSamples[x][y]=1<<(BitDepth-1)(359)

[2080] — Otherwise, the following ordered steps apply:

[2081] 1. The co-located luma sample pY[x][y] where x=0..nTbW×SubWidthC-1, y=0..TbH×SubHeightC-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2082] 2. The adjacent brightness samples pY[x][y] are derived as follows:

[2083] —When numSampL is greater than 0, the adjacent left luma sample pY[x][y] where x=-1..-3, y=0..SubHeightC×numSampL-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2084] - When availT is equal to FALSE, the adjacent top luma sample pY[x][y] where x = -1..SubWidthC×numSampT-1, y = -1..-2 is set equal to luma sample pY[x][0].

[2085] —[[When availL is equal to FALSE, the adjacent left luma sample pY[x][y] where x = -1..-3, y = -1..SubHeightC×numSampL-1 is set equal to the luma sample pY[0][y]. ]]

[2086] When numSampT is greater than 0, the adjacent top luma sample pY[x][y] where x=0..SubWidthC×numSampT-1, y=-1..-2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2087]

[2088] —When availTL is equal to true (TRUE), the adjacent upper left luma sample pY[x][y] where x=-1, y=-1, -2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2089] 5.17. Example 17

[2090] The working draft specified in JVET-Q2001-vE may be modified as follows.

[2091] 8.4.5.2.13 Specification of INTRA_LT_CCLM, INTRA_L_CCLM and INTRA_T_CCLM intra prediction modes

[2092] The inputs to this process are:

[2093] —Intra prediction mode predModeIntra,

[2094] - the sample position of the upper left sample of the current transform block relative to the upper left sample of the current picture (xTbC, yTbC),

[2095] - variable nTbW specifying the transform block width,

[2096] — variable nTbH specifying the transform block height,

[2097] — variable cIdx specifying the color component of the current block,

[2098] - Chroma neighboring samples p[x][y], where x = -1, y = 0..2×nTbH-1, and x = 0..2×nTbW-1, y = -1.

[2099] The output of this process is the predicted samples predSamples[x][y], where x = 0..nTbW-1, y = 0..nTbH-1.

[2100] The current brightness position (xTbY, yTbY) is derived as follows:

[2101] (xTbY, yTbY) = (xTbC<<(SubWidthC-1), yTbC<<(SubHeightC-1)) (351)

[2103] The variables availL, availT, and availTL are derived as follows:

[2104] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using as input the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY-1, yTbY), checkPredModeY set equal to false (FLASE), and cIdx, and assign the output to availL.

[2105] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY, yTbY-1), checkPredModeY set equal to false (FLASE), and cIdx as input, and assign the output to availT.

[2106]

[2107] [[-The variable availTL is derived as follows:

[2108] availTL=availL&&availT(352)]]

[2109] 5.18. Example 18

[2110] The working draft specified in JVET-Q2001-vE may be modified as follows.

[2111] 8.4.5.2.13 Specification of INTRA_LT_CCLM, INTRA_L_CCLM and INTRA_T_CCLM intra prediction modes

[2112] The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[2113] — If numSampL and numSampT are both equal to 0, then the following applies:

[2114] predSamples[x][y]=1<<(BitDepth-1)(359)

[2115] — Otherwise, the following ordered steps apply:

[2116] 1. The co-located luma sample pY[x][y] where x=0..nTbW×SubWidthC-1, y=0..TbH×SubHeightC-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2117] 2. The adjacent brightness samples pY[x][y] are derived as follows:

[2118] —When numSampL is greater than 0, the adjacent left luma sample pY[x][y] where x=-1..-3, y=0..SubHeightC×numSampL-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2119] - When availT is equal to FALSE, the adjacent top luma sample pY[x][y] where x = -1..SubWidthC×numSampT-1, y = -1..-2 is set equal to luma sample pY[x][0].

[2120] - When availL is equal to FALSE, the adjacent left luma sample pY[x][y] where x = -1..-3, y = -1..SubHeightC×numSampL-1 is set equal to the luma sample pY[0][y].

[2121] When numSampT is greater than 0, the adjacent top luma sample pY[x][y] where x=0..SubWidthC×numSampT-1, y=-1..-2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2122] [[-When availTL is equal to TRUE, the adjacent top-left luma sample pY[x][y] where x=-1, y=-1, -2 is set equal to the reconstructed luma sample at position (xTbY+x, yTbY+y) before the deblocking filtering process. ]]

[2123]

[2124] 5.19. Example 19

[2125] The working draft specified in JVET-Q2001-vE may be modified as follows.

[2126] 8.4.5.2.13 Specification of INTRA_LT_CCLM, INTRA_L_CCLM and INTRA_T_CCLM intra prediction modes

[2127] The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[2128] — If numSampL and numSampT are both equal to 0, then the following applies:

[2129] predSamples[x][y]=1<<(BitDepth-1)(359)

[2130] — Otherwise, the following ordered steps apply:

[2131] 1. The co-located luma sample pY[x][y] where x=0..nTbW×SubWidthC-1, y=0..TbH×SubHeightC-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2132] 2. The adjacent brightness samples pY[x][y] are derived as follows:

[2133] —When numSampL is greater than 0, the adjacent left luma sample pY[x][y] where x=-1..-3, y=0..SubHeightC×numSampL-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2134] - When availT is equal to FALSE, the adjacent top luma sample pY[x][y] where x = -1..SubWidthC×numSampT-1, y = -1..-2 is set equal to luma sample pY[x][0].

[2135] - When availL is equal to FALSE, the adjacent left luma sample pY[x][y] where x = -1..-3, y = -1..SubHeightC×numSampL-1 is set equal to the luma sample pY[0][y].

[2136] When numSampT is greater than 0, the adjacent top luma sample pY[x][y] where x=0..SubWidthC×numSampT-1, y=-1..-2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2137] [[-When availTL is equal to TRUE, the adjacent top-left luma sample pY[x][y] where x=-1, y=-1, -2 is set equal to the reconstructed luma sample at position (xTbY+x, yTbY+y) before the deblocking filtering process. ]]

[2138]

[2139] 5.20. Example 20

[2140] The working draft specified in JVET-Q2001-vE may be modified as follows.

[2141] 8.4.5.2.13 Specification of INTRA_LT_CCLM, INTRA_L_CCLM and INTRA_T_CCLM intra prediction modes

[2142] The inputs to this process are:

[2143] —Intra prediction mode predModeIntra,

[2144] - the sample position of the upper left sample of the current transform block relative to the upper left sample of the current picture (xTbC, yTbC),

[2145] - variable nTbW specifying the transform block width,

[2146] — variable nTbH specifying the transform block height,

[2147] — variable cIdx specifying the color component of the current block,

[2148] - Chroma neighboring samples p[x][y], where x = -1, y = 0..2×nTbH-1, and x = 0..2×nTbW-1, y = -1.

[2149] The output of this process is the predicted samples predSamples[x][y], where x = 0..nTbW-1, y = 0..nTbH-1.

[2150] The current brightness position (xTbY, yTbY) is derived as follows:

[2151] (xTbY, yTbY) = (xTbC<<(SubWidthC-1), yTbC<<(SubHeightC-1)) (351)

[2153] The variables availL, availT, and availTL are derived as follows:

[2154] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using as input the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY-1, yTbY), checkPredModeY set equal to false (FLASE), and cIdx, and assign the output to availL.

[2155] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY, yTbY-1), checkPredModeY set equal to false (FLASE), and cIdx as input, and assign the output to availT.

[2156]

[2157] [[-The variable availTL is derived as follows:

[2158] availTL=availL&&availT(352)]]

[2159] …

[2160] The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[2161] — If numSampL and numSampT are both equal to 0, then the following applies:

[2162] predSamples[x][y]=1<<(BitDepth-1)(359)

[2163] — Otherwise, the following ordered steps apply:

[2164] 1. The co-located luma sample pY[x][y] where x=0..nTbW×SubWidthC-1, y=0..TbH×SubHeightC-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2165] 2. The adjacent brightness samples pY[x][y] are derived as follows:

[2166] —When numSampL is greater than 0, the adjacent left luma sample pY[x][y] where x=-1..-3, y=0..SubHeightC×numSampL-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2167] - When availT is equal to FALSE, the adjacent top luma sample pY[x][y] where x = -1..SubWidthC×numSampT-1, y = -1..-2 is set equal to luma sample pY[x][0].

[2168] - When availL is equal to FALSE, the adjacent left luma sample pY[x][y] where x = -1..-3, y = -1..SubHeightC×numSampL-1 is set equal to the luma sample pY[0][y].

[2169] When numSampT is greater than 0, the adjacent top luma sample pY[x][y] where x=0..SubWidthC×numSampT-1, y=-1..-2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2170] —When availTL is equal to TRUE When x=-1, y=-1, -2, the adjacent upper left luma sample pY[x][y] is set equal to the reconstructed luma sample before the deblocking filtering process at the position (xTbY+x, yTbY+y).

[2171] 5.21. Example 21

[2172] The working draft specified in JVET-Q2001-vE may be modified as follows.

[2173] 8.4.5.2.13 Specification of INTRA_LT_CCLM, INTRA_L_CCLM and INTRA_T_CCLM intra prediction modes

[2174] The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[2175] — If numSampL and numSampT are both equal to 0, then the following applies:

[2176] predSamples[x][y]=1<<(BitDepth-1)(359)

[2177] — Otherwise, the following ordered steps apply:

[2178] 1. The co-located luma sample pY[x][y] where x=0..nTbW×SubWidthC-1, y=0..TbH×SubHeightC-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2179] 2. The adjacent brightness samples pY[x][y] are derived as follows:

[2180] —When numSampL is greater than 0, the adjacent left luma sample pY[x][y] where x=-1..-3, y=0..SubHeightC×numSampL-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2181] —When availT equals FALSE When x=-1..SubWidthC×numSampT-1, y=-1..-2, the adjacent top luma sample pY[x][y] is set equal to the luma sample pY[x][0].

[2182] —When availL equals FALSE When x=-1..-3, y=-1..SubHeightC×numSampL-1, the adjacent left luma sample pY[x][y] is set equal to the luma sample pY[0][y].

[2183] When numSampT is greater than 0, the adjacent top luma sample pY[x][y] where x=0..SubWidthC×numSampT-1, y=-1..-2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2184] —When availTL is equal to true (TRUE), the adjacent upper left luma sample pY[x][y] where x=-1, y=-1, -2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2185] 5.22. Example 22

[2186] The working draft specified in JVET-Q2001-vE may be modified as follows.

[2187] 8.4.5.2.13 Specification of INTRA_LT_CCLM, INTRA_L_CCLM and INTRA_T_CCLM intra prediction modes

[2188] The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[2189] — If numSampL and numSampT are both equal to 0, then the following applies:

[2190] predSamples[x][y]=1<<(BitDepth-1)(359)

[2191] — Otherwise, the following ordered steps apply:

[2192] 1. The co-located luma sample pY[x][y] where x=0..nTbW×SubWidthC-1, y=0..TbH×SubHeightC-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2193] 2. The adjacent brightness samples pY[x][y] are derived as follows:

[2194] —When numSampL is greater than 0, where x = -1..-3, y = 0..SubHeightC×

[2195] The adjacent left luma sample pY[x][y] of numSampL-1 is set equal to the reconstructed luma sample before the deblocking filtering process at the position (xTbY+x, yTbY+y).

[2196] - When availT is equal to FALSE, the adjacent top luma sample pY[x][y] where x = [[1]] 0..SubWidthC×numSampT-1, y = -1..-2 is set equal to luma sample pY[x][0].

[2197] - When availL is equal to FALSE, the adjacent left luma sample pY[x][y] where x = -1..-3, y = [[-1]] 0..SubHeightC×numSampL-1 is set equal to the luma sample pY[0][y].

[2198] When numSampT is greater than 0, the adjacent top luma sample pY[x][y] where x=0..SubWidthC×numSampT-1, y=-1..-2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2199] —When availTL is equal to true (TRUE), the adjacent upper left luma sample pY[x][y] where x=-1, y=-1, -2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2200]

[2201] 5.23. Example 23

[2202] The working draft specified in JVET-Q2001-vE may be modified as follows.

[2203] 8.4.5.2.13 Specification of INTRA_LT_CCLM, INTRA_L_CCLM and INTRA_T_CCLM intra prediction modes

[2204] The inputs to this process are:

[2205] —Intra prediction mode predModeIntra,

[2206] - the sample position of the upper left sample of the current transform block relative to the upper left sample of the current picture (xTbC, yTbC),

[2207] - variable nTbW specifying the transform block width,

[2208] — variable nTbH specifying the transform block height,

[2209] — variable cIdx specifying the color component of the current block,

[2210] - Chroma neighboring samples p[x][y], where x = -1, y = 0..2×nTbH-1, and x = 0..2×nTbW-1, y = -1.

[2211] The output of this process is predSamples[x][y], where x = 0..nTbW-1, y = 0..nTbH-1.

[2212] The current brightness position (xTbY, yTbY) is derived as follows:

[2213] (xTbY, yTbY) = (xTbC<<(SubWidthC-1), yTbC<<(SubHeightC-1)) (351)

[2215] The variables availL, availT, and availTL are derived as follows:

[2216] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using as input the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY-1, yTbY), checkPredModeY set equal to false (FLASE), and cIdx, and assign the output to availL.

[2217] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY, yTbY-1), checkPredModeY set equal to false (FLASE), and cIdx as input, and assign the output to availT.

[2218]

[2219] [[-The variable availTL is derived as follows:

[2220] availTL=availL&&availT(352)]]

[2221] …

[2222] The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[2223] — If numSampL and numSampT are both equal to 0, then the following applies:

[2224] predSamples[x][y]=1<<(BitDepth-1)(359)

[2225] — Otherwise, the following ordered steps apply:

[2226] 1. The co-located luma sample pY[x][y] where x=0..nTbW×SubWidthC-1, y=0..TbH×SubHeightC-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2227] 2. The adjacent brightness samples pY[x][y] are derived as follows:

[2228] —When numSampL is greater than 0, the adjacent left luma sample pY[x][y] where x=-1..-3, y=0..SubHeightC×numSampL-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2229] - When availT is equal to FALSE, the adjacent top luma sample pY[x][y] where x = -1..SubWidthC×numSampT-1, y = -1..-2 is set equal to luma sample pY[x][0].

[2230] - When availL is equal to FALSE, the adjacent left luma sample pY[x][y] where x = -1..-3, y = -1..SubHeightC×numSampL-1 is set equal to the luma sample pY[0][y].

[2231] —When numSampT is greater than 0, the adjacent top luma sample pY[x][y] with x=0..SubWidthC×numSampT-1, y=-1..-2 is set equal to the reconstructed luma sample before the deblocking filtering process at the position (xTbY+x, yTbY+y).

[2232] [[-When availTL is equal to TRUE, the adjacent top-left luma sample pY[x][y] where x=-1, y=-1, -2 is set equal to the reconstructed luma sample at position (xTbY+x, yTbY+y) before the deblocking filtering process. ]]

[2233]

[2234] 5.24. Example 24

[2235] The working draft specified in JVET-Q2001-vE may be modified as follows.

[2236] 8.4.5.2.13 Specification of INTRA_LT_CCLM, INTRA_L_CCLM and INTRA_T_CCLM intra prediction modes

[2237] The inputs to this process are:

[2238] —Intra prediction mode predModeIntra,

[2239] - the sample position of the upper left sample of the current transform block relative to the upper left sample of the current picture (xTbC, yTbC),

[2240] - variable nTbW specifying the transform block width,

[2241] — variable nTbH specifying the transform block height,

[2242] — variable cIdx specifying the color component of the current block,

[2243] - Chroma neighboring samples p[x][y], where x = -1, y = 0..2×nTbH-1, and x = 0..2×nTbW-1, y = -1.

[2244] The output of this process is predSamples[x][y], where x = 0..nTbW-1, y = 0..nTbH-1.

[2245] The current brightness position (xTbY, yTbY) is derived as follows:

[2246] (xTbY, yTbY) = (xTbC<<(SubWidthC-1), yTbC<<(SubHeightC-1)) (351)

[2248] The variables availL, availT, and availTL are derived as follows:

[2249] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using as input the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY-1, yTbY), checkPredModeY set equal to false (FLASE), and cIdx, and assign the output to availL.

[2250] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY, yTbY-1), checkPredModeY set equal to false (FLASE), and cIdx as input, and assign the output to availT.

[2251]

[2252] [[-The variable availTL is derived as follows:

[2253] availTL=availL&&availT(352)]]

[2254] …

[2255] The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[2256] — If numSampL and numSampT are both equal to 0, then the following applies:

[2257] predSamples[x][y]=1<<(BitDepth-1)(359)

[2258] — Otherwise, the following ordered steps apply:

[2259] 1. The co-located luma sample pY[x][y] where x=0..nTbW×SubWidthC-1, y=0..TbH×SubHeightC-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2260] 2. The adjacent brightness samples pY[x][y] are derived as follows:

[2261] —When numSampL is greater than 0, the adjacent left luma sample pY[x][y] where x=-1..-3, y=0..SubHeightC×numSampL-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2262] - When availT is equal to FALSE, the adjacent top luma sample pY[x][y] where x = -1..SubWidthC×numSampT-1, y = -1..-2 is set equal to luma sample pY[x][0].

[2263] - When availL is equal to FALSE, the adjacent left luma sample pY[x][y] where x = -1..-3, y = -1..SubHeightC×numSampL-1 is set equal to the luma sample pY[0][y].

[2264] When numSampT is greater than 0, the adjacent top luma sample pY[x][y] where x=0..SubWidthC×numSampT-1, y=-1..-2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2265] [[-When availTL is equal to TRUE, the adjacent top-left luma sample pY[x][y] where x=-1, y=-1, -2 is set equal to the reconstructed luma sample at position (xTbY+x, yTbY+y) before the deblocking filtering process. ]]

[2266]

[2267] 5.25. Example 25

[2268] The working draft specified in JVET-Q2001-vE may be modified as follows.

[2269] 8.4.5.2.13 Specification of INTRA_LT_CCLM, INTRA_L_CCLM and INTRA_T_CCLM intra prediction modes

[2270] The inputs to this process are:

[2271] —Intra prediction mode predModeIntra,

[2272] - the sample position of the upper left sample of the current transform block relative to the upper left sample of the current picture (xTbC, yTbC),

[2273] - variable nTbW specifying the transform block width,

[2274] — variable nTbH specifying the transform block height,

[2275] — variable cIdx specifying the color component of the current block,

[2276] - Chroma neighboring samples p[x][y], where x = -1, y = 0..2×nTbH-1, and x = 0..2×nTbW-1, y = -1.

[2277] The output of this process is predSamples[x][y], where x = 0..nTbW-1, y = 0..nTbH-1.

[2278] The current brightness position (xTbY, yTbY) is derived as follows:

[2279] (xTbY, yTbY) = (xTbC<<(SubWidthC-1), yTbC<<(SubHeightC-1)) (351)

[2281] The variables availL, availT, and availTL are derived as follows:

[2282] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using as input the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY-1, yTbY), checkPredModeY set equal to false (FLASE), and cIdx, and assign the output to availL.

[2283] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY, yTbY-1), checkPredModeY set equal to false (FLASE), and cIdx as input, and assign the output to availT.

[2284]

[2285] [[-The variable availTL is derived as follows:

[2286] availTL=availL&&availT(352)]]

[2287] …

[2288] The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[2289] — If numSampL and numSampT are both equal to 0, then the following applies:

[2290] predSamples[x][y]=1<<(BitDepth-1)(359)

[2291] — Otherwise, the following ordered steps apply:

[2292] 1. The co-located luma sample pY[x][y] where x=0..nTbW×SubWidthC-1, y=0..TbH×SubHeightC-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2293] 2. The adjacent brightness samples pY[x][y] are derived as follows:

[2294] —When numSampL is greater than 0, the adjacent left luma sample pY[x][y] where x=-1..-3, y=0..SubHeightC×numSampL-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2295] - When availT is equal to FALSE, the adjacent top luma sample pY[x][y] where x = -1..SubWidthC×numSampT-1, y = -1..-2 is set equal to luma sample pY[x][0].

[2296] - When availL is equal to FALSE, the adjacent left luma sample pY[x][y] where x = -1..-3, y = -1..SubHeightC×numSampL-1 is set equal to the luma sample pY[0][y].

[2297] When numSampT is greater than 0, the adjacent top luma sample pY[x][y] where x=0..SubWidthC×numSampT-1, y=-1..-2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2298] [[-When availTL is equal to TRUE, the adjacent top-left luma sample pY[x][y] where x=-1, y=-1, -2 is set equal to the reconstructed luma sample at position (xTbY+x, yTbY+y) before the deblocking filtering process. ]]

[2299]

[2300] 5.26. Example 26

[2301] The working draft specified in JVET-Q2001-vE may be modified as follows.

[2302] 8.4.5.2.13 Specification of INTRA_LT_CCLM, INTRA_L_CCLM and INTRA_T_CCLM intra prediction modes

[2303] The inputs to this process are:

[2304] —Intra prediction mode predModeIntra,

[2305] - the sample position of the upper left sample of the current transform block relative to the upper left sample of the current picture (xTbC, yTbC),

[2306] - variable nTbW specifying the transform block width,

[2307] — variable nTbH specifying the transform block height,

[2308] — variable cIdx specifying the color component of the current block,

[2309] - Chroma neighboring samples p[x][y], where x = -1, y = 0..2×nTbH-1, and x = 0..2×nTbW-1, y = -1.

[2310] The output of this process is predSamples[x][y], where x = 0..nTbW-1, y = 0..nTbH-1.

[2311] The current brightness position (xTbY, yTbY) is derived as follows:

[2312] (xTbY, yTbY) = (xTbC<<(SubWidthC-1), yTbC<<(SubHeightC-1)) (351)

[2314] The variables availL, availT, and availTL are derived as follows:

[2315] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using as input the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY-1, yTbY), checkPredModeY set equal to false (FLASE), and cIdx, and assign the output to availL.

[2316] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY, yTbY-1), checkPredModeY set equal to false (FLASE), and cIdx as input, and assign the output to availT.

[2317]

[2318] [[-The variable availTL is derived as follows:

[2319] availTL=availL&&availT(352)]]

[2320] …

[2321] The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[2322] — If numSampL and numSampT are both equal to 0, then the following applies:

[2323] predSamples[x][y]=1<<(BitDepth-1)(359)

[2324] — Otherwise, the following ordered steps apply:

[2325] 1. The co-located luma sample pY[x][y] where x=0..nTbW×SubWidthC-1, y=0..TbH×SubHeightC-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2326] 2. The adjacent brightness samples pY[x][y] are derived as follows:

[2327] —When numSampL is greater than 0, the adjacent left luma sample pY[x][y] where x=-1..-3, y=0..SubHeightC×numSampL-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2328] - When availT is equal to FALSE, the adjacent top luma sample pY[x][y] where x = -1..SubWidthC×numSampT-1, y = -1..-2 is set equal to luma sample pY[x][0].

[2329] - When availL is equal to FALSE, the adjacent left luma sample pY[x][y] where x = -1..-3, y = -1..SubHeightC×numSampL-1 is set equal to the luma sample pY[0][y].

[2330] When numSampT is greater than 0, the adjacent top luma sample pY[x][y] where x=0..SubWidthC×numSampT-1, y=-1..-2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2331] [[-When availTL is equal to TRUE, the adjacent top-left luma sample pY[x][y] where x=-1, y=-1, -2 is set equal to the reconstructed luma sample at position (xTbY+x, yTbY+y) before the deblocking filtering process. ]]

[2332]

[2333] 5.27. Example 27

[2334] The working draft specified in JVET-Q2001-vE may be modified as follows.

[2335] 8.4.5.2.13 Specification of INTRA_LT_CCLM, INTRA_L_CCLM and INTRA_T_CCLM intra prediction modes

[2336] The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[2337] — If numSampL and numSampT are both equal to 0, then the following applies:

[2338] predSamples[x][y]=1<<(BitDepth-1)(359)

[2339] — Otherwise, the following ordered steps apply:

[2340] 1. The co-located luma sample pY[x][y] where x=0..nTbW×SubWidthC-1, y=0..TbH×SubHeightC-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2341] 2. The adjacent brightness samples pY[x][y] are derived as follows:

[2342] —When numSampL is greater than 0, the adjacent left luma sample pY[x][y] where x=-1..-3, y=0..SubHeightC×numSampL-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2343] - When availT is equal to FALSE, the adjacent top luma sample pY[x][y] where x = -1..SubWidthC×numSampT-1, y = -1..-2 is set equal to luma sample pY[x][0].

[2344] - When availL is equal to FALSE, the adjacent left luma sample pY[x][y] where x = -1..-3, y = -1..SubHeightC×numSampL-1 is set equal to the luma sample pY[0][y].

[2345] When numSampT is greater than 0, the adjacent top luma sample pY[x][y] where x=0..SubWidthC×numSampT-1, y=-1..-2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2346] —When availTL is equal to true (TRUE), the adjacent upper left luma sample pY[x][y] where x=-1, y=-1, -2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2347] 3. The downsampled co-located luminance sample pDsY[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[2348] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[2349] —pDsY[x][y], where x=1..nTbW-1, y=1..nTbH-1 is derived as follows:

[2350] pDstY[x][y]=pY[x][y](360)

[2351] — Otherwise, the following applies:

[2352] —The one-dimensional filter coefficient arrays F1 and F2 and the two-dimensional filter coefficient arrays F3 and F4 are specified as follows.

[2353] F1[0]=2,F1[1]=0(361)

[2354] F2[0]=1,F2[1]=2,F2[2]=1(362)

[2355] F3[i][j]=F4[i][j]=0,withi=0..2,j=0..2(363)

[2356] If SubWidthC and SubHeightC are both equal to 2, then the following applies:

[2357] F1[0]=1,F1[1]=1(364)

[2358] F3[0][1]=1,F3[1][1]=4,F3[2][1]=1,F3[1][0]=1,F3[1][2]=1(365)

[2359] F4[0][1]=1, F4[1][1]=2, F4[2][1]=1(366)

[2360] F4[0][2]=1, F4[1][2]=2, F4[2][2]=1(367)

[2361] — Otherwise, the following applies:

[2362] F3[0][1]=2, F3[1][1]=[[8]]4, F3[2][1]=2, (368)

[2363] F4[0][1]=2, F4[1][1]=4, F4[2][1]=2, (369)

[2364] - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies:

[2365] —pDsY[x][y], where x=0..nTbW-1, y=0..nTbH-1 is derived as follows:

[2366]

[2367] Otherwise (sps_chroma_vertical_collocated_flag is equal to 0), the following applies:

[2368] —pDsY[x][y], x=0..nTbW-1, y=0..nTbH-1 is derived as follows:

[2369]

[2370] 5.28. Example 28

[2371] The working draft specified in JVET-Q2001-vE may be modified as follows.

[2372] 8.4.5.2.13 Specification of INTRA_LT_CCLM, INTRA_L_CCLM and INTRA_T_CCLM intra prediction modes

[2373] The inputs to this process are:

[2374] —Intra prediction mode predModeIntra,

[2375] - the sample position of the upper left sample of the current transform block relative to the upper left sample of the current picture (xTbC, yTbC),

[2376] - variable nTbW specifying the transform block width,

[2377] — variable nTbH specifying the transform block height,

[2378] — variable cIdx specifying the color component of the current block,

[2379] - Chroma neighboring samples p[x][y], where x = -1, y = 0..2×nTbH-1, and x = 0..2×nTbW-1, y = -1.

[2380] The output of this process is predSamples[x][y], where x = 0..nTbW-1, y = 0..nTbH-1.

[2381] The current brightness position (xTbY, yTbY) is derived as follows:

[2382] (xTbY, yTbY) = (xTbC<<(SubWidthC-1), yTbC<<(SubHeightC-1)) (351)

[2384] The variables availL, availT, and availTL are derived as follows:

[2385] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using as input the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY-1, yTbY), checkPredModeY set equal to false (FLASE), and cIdx, and assign the output to availL.

[2386] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY, yTbY-1), checkPredModeY set equal to false (FLASE), and cIdx as input, and assign the output to availT.

[2387] —The variable availTL is derived as follows:

[2388] availTL=availL&&availT(352)

[2389] The number of available top-right adjacent chroma samples numTopRight is derived as follows:

[2390] —The variable numTopRight is set to 0, and availTR is set to true (TRUE).

[2391] - When predModeIntra is equal to INTRA_T_CCLM, the following applies for x=nTbW..2×nTbW-1 until availTR is equal to FALSE or x is equal to 2×nTbW-1:

[2392] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using as input the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY+x, yTbY-1), checkPredModeY set equal to false (FLASE), and cIdx, and assign the output to availTR.

[2393] —When availTR is equal to true (TRUE), numTopRight is increased by 1.

[2394] The number of available lower left adjacent chroma samples numLeftBelow is derived as follows:

[2395] —The variable numLeftBelow is set to 0, and availLB is set to true (TRUE).

[2396] When predModeIntra is equal to INTRA_L_CCLM, the following applies for y=nTbH..2×nTbH-1 until availLB is equal to FALSE or y is equal to 2×nTbH-1:

[2397] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY-1, yTbY+y), checkPredModeY set equal to false (FLASE), and cIdx as input, and assign the output to availLB.

[2398] —When availLB is equal to TRUE, numLeftBelow is increased by 1.

[2399] The number of available adjacent chroma samples numSampT at the top and upper right and the number of available adjacent chroma samples numSampL at the left and lower left are derived as follows:

[2400] If predModeIntra is equal to INTRA_LT_CCLM, the following applies:

[2401] numSampT=availT? nTbW:0(353)

[2402] numSampL=availL? nTbH:0(354)

[2403] — Otherwise, the following applies:

[2404] numSampT=(availT&&predModeIntra==INTRA_T_CCLM)? (nTbW+Min(numTopRight,nTbH)):0(355)

[2405] numSampL=(availL&&predModeIntra==INTRA_L_CCLM)? (nTbH+Min(numLeftBelow,nTbW)):0(356)

[2406] The variable bCTUboundary is derived as follows:

[2407] bCTUboundary=(yTbY&(CtbSizeY-1)==0)? TRUE:FALSE(357)

[2408] The variable cntN and array pickPosN, where N is replaced by L and T, are derived as follows:

[2409] —The variable numIs4N is derived as follows:

[2410] numIs4N=((availT&&availL&&predModeIntra==INTRA_LT_CCLM)?0:1)(358)

[2411] —The variable startPosN is set equal to numSampN>>(2+numIs4N).

[2412] - The variable pickStepN is set equal to Max(1, numSampN>>(1+numIs4N)).

[2413] —If availN is equal to TRUE and predModeIntra is equal to INTRA_LT_CCLM or INTRA_N_CCLM, then the following assignments are made:

[2414] —cntN is set equal to Min(numSampN, (1+numIs4N)<<1).

[2415] - pickPosN[pos] is set equal to (startPosN+pos×pickStepN), where pos=0..cntN-1.

[2416] Otherwise, cntN is set equal to 0.

[2417]

[2418] The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[2419] — If numSampL and numSampT are both equal to 0, then the following applies:

[2420] predSamples[x][y]=1<<(BitDepth-1)(359)

[2421] — Otherwise, the following ordered steps apply:

[2422] 1. The co-located luma sample pY[x][y] where x=0..nTbW×SubWidthC-1, y=0..TbH×SubHeightC-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2423] 2. The adjacent brightness samples pY[x][y] are derived as follows:

[2424] —When numSampL is greater than 0, the adjacent left luma sample pY[x][y] where x=-1..-3, y=0..SubHeightC×numSampL-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2425] - When availT is equal to FALSE, the adjacent top luma sample pY[x][y] where x = -1..SubWidthC×numSampT-1, y = -1..-2 is set equal to luma sample pY[x][0].

[2426] - When availL is equal to FALSE, the adjacent left luma sample pY[x][y] where x = -1..-3, y = -1..SubHeightC×numSampL-1 is set equal to the luma sample pY[0][y].

[2427] When numSampT is greater than 0, the adjacent top luma sample pY[x][y] where x=0..SubWidthC×numSampT-1, y=-1..-2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2428] —When availTL is equal to true (TRUE), the adjacent upper left luma sample pY[x][y] where x=-1, y=-1, -2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2429] 3. The downsampled co-located luminance sample pDsY[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[2430] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[2431] pDsY[x][y], where x=1..nTbW-1, y=1..nTbH-1 is derived as follows:

[2432] pDstY[x][y]=pY[x][y](360)

[2433] — Otherwise, the following applies:

[2434] —The one-dimensional filter coefficient arrays F1 and F2 and the two-dimensional filter coefficient arrays F3 and F4 are specified as follows.

[2435] F1[0]=2,F1[1]=0(361)

[2436] F2[0]=1,F2[1]=2,F2[2]=1(362)

[2437] F3[i][j]=F4[i][j]=0,withi=0..2,j=0..2(363)

[2438] If SubWidthC and SubHeightC are both equal to 2, then the following applies:

[2439] F1[0]=1,F1[1]=1(364)

[2440] F3[0][1]=1,F3[1][1]=4,F3[2][1]=1,F3[1][0]=1,F3[1][2]=1(365)

[2441] F4[0][1]=1, F4[1][1]=2, F4[2][1]=1(366)

[2442] F4[0][2]=1, F4[1][2]=2, F4[2][2]=1(367)

[2443]

[2444] — Otherwise, the following applies:

[2445] F3[1][1]=8(368)

[2446] F4[0][1]=2, F4[1][1]=4, F4[2][1]=2, (369)

[2447]

[2448] —if [[sps_chroma_vertical_collocated_flag]] is equal to 1, then the following applies:

[2449] —pDsY[x][y], where x=0..nTbW-1, y=0..nTbH-1 is derived as follows:

[2450]

[2451] —otherwise([[sps_chroma_vertical_collocated_flag]] is equal to 0), the following applies:

[2452] —pDsY[x][y], x=0..nTbW-1, y=0..nTbH-1 is derived as follows:

[2453]

[2454] 4. When numSampL is greater than 0, the selected adjacent left chroma sample pSelC[idx] is set equal to p[-1][pickPosL[idx]], where idx = 0..cntL-1, and the selected downsampled adjacent left luma sample pSelDsY[idx], where idx = 0..cntL-1, is derived as follows:

[2455] —The variable y is set equal to pickPosL[idx].

[2456] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[2457] pSelDsY[idx]=pY[-1][y](372)

[2458] — Otherwise, the following applies:

[2459] —if [[sps_chroma_vertical_collocated_flag]] is equal to 1, then the following applies:

[2460]

[2461] —otherwise([[sps_chroma_vertical_collocated_flag]] is equal to 0), the following applies:

[2462]

[2463] 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 adjacent top luma sample pSelDsY[idx] is downsampled, where It is specified as follows:

[2464] —The variable x is set equal to pickPosT[idx-cntL].

[2465] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[2466] pSelDsY[idx]=pY[x][-1](375)

[2467] — Otherwise, the following applies:

[2468] —if [[sps_chroma_vertical_collocated_flag]] is equal to 1, then the following applies:

[2469] If bCTUboundary is equal to FALSE, the following applies:

[2470]

[2471] — Otherwise (bCTUboundary is TRUE), the following applies:

[2472]

[2473] —otherwise([[sps_chroma_vertical_collocated_flag]] is equal to 0), the following applies:

[2474] If bCTUboundary is equal to FALSE, the following applies:

[2475]

[2476] — Otherwise (bCTUboundary is TRUE), the following applies:

[2477]

[2478] 6. When cntT+cntL is not equal to 0, the variables minY, maxY, minC, and maxC are derived as follows:

[2479] —When cntT+cntL is equal to 2, pSelComp[3] is set equal to pSelComp[0], pSelComp[2] is set equal to pSelComp[1], pSelComp[0] is set equal to pSelComp[1], pSelComp[1] is set equal to pSelComp[3], and Comp is replaced by DsY and C.

[2480] —The arrays minGrpIdx and maxGrpIdx are derived as follows:

[2481] minGrpIdx[0]=0(380)

[2482] minGrpIdx[1]=2(381)

[2483] maxGrpIdx[0]=1(382)

[2484] maxGrpIdx[1]=3(383)

[2485] —When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[minGrpIdx[1]], minGrpIdx[0] and minGrpIdx[1] are swapped as follows:

[2486] (minGrpIdx[0], minGrpIdx[1])=Swap(minGrpIdx[0], minGrpIdx[1]) (384)

[2488] —When pSelDsY[maxGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], maxGrpIdx[0] and maxGrpIdx[1] are swapped as follows:

[2489] (maxGrpIdx[0], maxGrpIdx[1])=Swap(maxGrpIdx[0], maxGrpIdx[1]) (385)

[2491] —When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], the arrays minGrpIdx and maxGrpIdx are swapped as follows:

[2492] (minGrpIdx, maxGrpIdx) = Swap (minGrpIdx, maxGrpIdx) (386)

[2493] —When pSelDsY[minGrpIdx[1]] is greater than pSelDsY[maxGrpIdx[0]], minGrpIdx[1] and maxGrpIdx[0] are swapped as follows:

[2494] (minGrpIdx[1], maxGrpIdx[0])=Swap(minGrpIdx[1], maxGrpIdx[0]) (387)

[2496] —The variables maxY, maxC, minY, and minC are derived as follows:

[2497] maxY=(pSelDsY[maxGrpIdx[0]]+pSelDsY[maxGrpIdx[1]]+1)>>1 (388)

[2499] maxC=(pSelC[maxGrpIdx[0]]+pSelC[maxGrpIdx[1]]+1)>>1 (389)

[2501] minY=(pSelDsY[minGrpIdx[0]]+pSelDsY[minGrpIdx[1]]+1)>>1 (390)

[2503] minC=(pSelC[minGrpIdx[0]]+pSelC[minGrpIdx[1]]+1)>>1(391)

[2504] 7. The variables a, b, and k are derived as follows:

[2505] — If numSampL is equal to 0 and numSampT is equal to 0, then the following applies:

[2506] k=0(392)

[2507] a=0(393)

[2508] b=1<<(BitDepth-1)(394)

[2509] — Otherwise, the following applies:

[2510] diff=maxY-minY(395)

[2511] — If diff is not equal to 0, the following applies:

[2512] diffC=maxC-minC(396)

[2513] x=Floor(Log2(diff))(397)

[2514] normDiff=((diff<<4)>>x)&15(398)

[2515] x+=(normDiff!=0)? 1:0(399)

[2516] y=Abs(diffC)>0? Floor(Log2(Abs(diffC)))+1:0(400)

[2517] a=(diffC×(divSigTable[normDiff]|8)+2 y - 1 )>>y(401)

[2518] k=((3+xy)<1)? 1:3+xy(402)

[2519] a=((3+xy)<1)? Sign(a)×15:a(403)

[2520] b=minC-((a×minY)>>k)(404)

[2521] where divSigTable[] is specified as follows:

[2522] divSigTable[]={0, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0} (405)

[2523] — Otherwise (diff is equal to 0), the following applies:

[2524] k=0(406)

[2525] a=0(407)

[2526] b=minC(408)

[2527] 8. The predicted sample point predSample[x][y], x=0..nTbW-1, y=0..nTbH-1 is derived as follows:

[2528] predSamples[x][y]=Clip1(((pDsY[x][y]×a)>>k)+b)(409)

[2529] NOTE - This process uses sps_chroma_vertical_collocated_flag. However, to simplify the implementation, it does not use sps_chroma_horizontal_collocated_flag.

[2530] 5.29. Example 29

[2531] The working draft specified in JVET-Q2001-vE may be modified as follows.

[2532] 8.4.5.2.13 Specification of INTRA_LT_CCLM, INTRA_L_CCLM and INTRA_T_CCLM intra prediction modes

[2533] The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[2534] — If numSampL and numSampT are both equal to 0, then the following applies:

[2535] predSamples[x][y]=1<<(BitDepth-1)(359)

[2536] — Otherwise, the following ordered steps apply:

[2537] 1. The co-located luma sample pY[x][y] where x=0..nTbW×SubWidthC-1, y=0..TbH×SubHeightC-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2538] 2. The adjacent brightness samples pY[x][y] are derived as follows:

[2539] —When [[numSampL is greater than 0]] When The adjacent left luma sample pY[x][y] of is set equal to the reconstructed luma sample before the deblocking filtering process at the position (xTbY+x, yTbY+y).

[2540] - When availT is equal to FALSE, the adjacent top luma sample pY[x][y] where x = -1..SubWidthC×numSampT-1, y = -1..-2 is set equal to luma sample pY[x][0].

[2541] - When availL is equal to FALSE, the adjacent left luma sample pY[x][y] where x = -1..-3, y = -1..SubHeightC×numSampL-1 is set equal to the luma sample pY[0][y].

[2542] —When [[numSampT is greater than 0]] When The adjacent top luma sample pY[x][y] of is set equal to the reconstructed luma sample before the deblocking filtering process at the position (xTbY+x, yTbY+y).

[2543] —When availTL is equal to true (TRUE), the adjacent upper left luma sample pY[x][y] where x=-1, y=-1, -2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2544] 5.30. Example 30

[2545] The working draft specified in JVET-Q2001-vE may be modified as follows.

[2546] 8.4.5.2.13 Specification of INTRA_LT_CCLM, INTRA_L_CCLM and INTRA_T_CCLM intra prediction modes

[2547] The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[2548] — If numSampL and numSampT are both equal to 0, then the following applies:

[2549] predSamples[x][y]=1<<(BitDepth-1)(359)

[2550] — Otherwise, the following ordered steps apply:

[2551] 1. The co-located luma sample pY[x][y] where x=0..nTbW×SubWidthC-1, y=0..TbH×SubHeightC-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2552] 2. The adjacent brightness samples pY[x][y] are derived as follows:

[2553] —When numSampL is greater than 0, the adjacent left luma sample pY[x][y] where x=-1..-3, y=0..SubHeightC×numSampL-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2554]

[2555] - When availT is equal to FALSE, the adjacent top luma sample pY[x][y] where x = -1..SubWidthC×numSampT-1, y = -1..-2 is set equal to luma sample pY[x][0].

[2556] - When availL is equal to FALSE, the adjacent left luma sample pY[x][y] where x = -1..-3, y = -1..SubHeightC×numSampL-1 is set equal to the luma sample pY[0][y].

[2557] When numSampT is greater than 0, the adjacent top luma sample pY[x][y] where x=0..SubWidthC×numSampT-1, y=-1..-2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2558]

[2559] —When availTL is equal to true (TRUE), the adjacent upper left luma sample pY[x][y] where x=-1, y=-1, -2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2560] 5.31. Example 31

[2561] The working draft specified in JVET-Q2001-vE may be modified as follows.

[2562] 8.4.5.2.13 Specification of INTRA_LT_CCLM, INTRA_L_CCLM and INTRA_T_CCLM intra prediction modes

[2563] The inputs to this process are:

[2564] —Intra prediction mode predModeIntra,

[2565] - the sample position of the upper left sample of the current transform block relative to the upper left sample of the current picture (xTbC, yTbC),

[2566] - variable nTbW specifying the transform block width,

[2567] — variable nTbH specifying the transform block height,

[2568] — variable cIdx specifying the color component of the current block,

[2569] - Chroma neighboring samples p[x][y], where x = -1, y = 0..2×nTbH-1, and x = 0..2×nTbW-1, y = -1.

[2570] The output of this process is predSamples[x][y], where x = 0..nTbW-1, y = 0..nTbH-1.

[2571] The current brightness position (xTbY, yTbY) is derived as follows:

[2572] (xTbY, yTbY) = (xTbC<<(SubWidthC-1), yTbC<<(SubHeightC-1)) (351)

[2574] The variables availL, availT, and availTL are derived as follows:

[2575] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using as input the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY-1, yTbY), checkPredModeY set equal to false (FLASE), and cIdx, and assign the output to availL.

[2576] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY, yTbY-1), checkPredModeY set equal to false (FLASE), and cIdx as input, and assign the output to availT.

[2577] —The variable availTL is derived as follows:

[2578] availTL=availL&&availT(352)

[2579] The number of available top-right adjacent chroma samples numTopRight is derived as follows:

[2580] —The variable numTopRight is set to 0, and availTR is set to true (TRUE).

[2581] - When predModeIntra is equal to INTRA_T_CCLM, the following applies for x=nTbW..2×nTbW-1 until availTR is equal to FALSE or x is equal to 2×nTbW-1:

[2582] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using as input the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY+x, yTbY-1), checkPredModeY set equal to false (FLASE), and cIdx, and assign the output to availTR.

[2583] —When availTR is equal to true (TRUE), numTopRight is increased by 1.

[2584] The number of available lower left adjacent chroma samples numLeftBelow is derived as follows:

[2585] —The variable numLeftBelow is set to 0, and availLB is set to true (TRUE).

[2586] When predModeIntra is equal to INTRA_L_CCLM, the following applies for y=nTbH..2×nTbH-1 until availLB is equal to FALSE or y is equal to 2×nTbH-1:

[2587] —Call the derivation process of neighbor block availability specified in clause 6.4.4 using the current luma position (xCurr, yCurr) set equal to (xTbY, yTbY), the neighboring luma position (xTbY-1, yTbY+y), checkPredModeY set equal to false (FLASE), and cIdx as input, and assign the output to availLB.

[2588] —When availLB is equal to TRUE, numLeftBelow is increased by 1.

[2589] The number of available adjacent chroma samples numSampT at the top and upper right and the number of available adjacent chroma samples numSampL at the left and lower left are derived as follows:

[2590] If predModeIntra is equal to INTRA_LT_CCLM, the following applies:

[2591] numSampT=availT? nTbW:0(353)

[2592] numSampL=availL? nTbH:0(354)

[2593] — Otherwise, the following applies:

[2594] numSampT=(availT&&predModeIntra==INTRA_T_CCLM)? (nTbW+Min(numTopRight,nTbH)):0(355)

[2595] numSampL=(availL&&predModeIntra==INTRA_L_CCLM)? (nTbH+Min(numLeftBelow,nTbW)):0(356)

[2596] The variable bCTUboundary is derived as follows:

[2597] bCTUboundary=(yTbY&(CtbSizeY-1)==0)? TRUE:FALSE(357)

[2598] The variable cntN and array pickPosN, where N is replaced by L and T, are derived as follows:

[2599] —The variable numIs4N is derived as follows:

[2600] numIs4N=((availT&&availL&&predModeIntra==INTRA_LT_CCLM)?0:1)(358)

[2601] —The variable startPosN is set equal to numSampN>>(2+numIs4N).

[2602] - The variable pickStepN is set equal to Max(1, numSampN>>(1+numIs4N)).

[2603] —If availN is equal to TRUE and predModeIntra is equal to INTRA_LT_CCLM or INTRA_N_CCLM, then the following assignments are made:

[2604] —cntN is set equal to Min(numSampN, (1+numIs4N)<<1).

[2605] - pickPosN[pos] is set equal to (startPosN+pos×pickStepN), where pos=0..cntN-1.

[2606] Otherwise, cntN is set equal to 0.

[2607]

[2608] The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[2609] — If numSampL and numSampT are both equal to 0, then the following applies:

[2610] predSamples[x][y]=1<<(BitDepth-1)(359)

[2611] — Otherwise, the following ordered steps apply:

[2612] 1. The co-located luma sample pY[x][y] where x=0..nTbW×SubWidthC-1, y=0..TbH×SubHeightC-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2613] 2. The adjacent brightness samples pY[x][y] are derived as follows:

[2614] —When numSampL is greater than 0, the adjacent left luma sample pY[x][y] where x=-1..-3, y=0..SubHeightC×numSampL-1 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2615] - When availT is equal to FALSE, the adjacent top luma sample pY[x][y] where x = -1..SubWidthC×numSampT-1, y = -1..-2 is set equal to luma sample pY[x][0].

[2616] - When availL is equal to FALSE, the adjacent left luma sample pY[x][y] where x = -1..-3, y = -1..SubHeightC×numSampL-1 is set equal to the luma sample pY[0][y].

[2617] When numSampT is greater than 0, the adjacent top luma sample pY[x][y] where x=0..SubWidthC×numSampT-1, y=-1..-2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2618] —When availTL is equal to true (TRUE), the adjacent upper left luma sample pY[x][y] where x=-1, y=-1, -2 is set equal to the reconstructed luma sample before the deblocking filtering process at position (xTbY+x, yTbY+y).

[2619] 3. The downsampled co-located luminance sample pDsY[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[2620] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[2621] —pDsY[x][y], where x=1..nTbW-1, y=1..nTbH-1 is derived as follows:

[2622] pDstY[x][y]=pY[x][y](360)

[2623] — Otherwise, the following applies:

[2624] —The one-dimensional filter coefficient arrays F1 and F2 and the two-dimensional filter coefficient arrays F3 and F4 are specified as follows.

[2625] F1[0]=2,F1[1]=0(361)

[2626] F2[0]=1,F2[1]=2,F2[2]=1(362)

[2627] F3[i][j]=F4[i][j]=0, ​​where i=0..2, j=0..2(363)

[2628] If SubWidthC and SubHeightC are both equal to 2, then the following applies:

[2629] F1[0]=1,F1[1]=1(364)

[2630] F3[0][1]=1,F3[1][1]=4,F3[2][1]=1,F3[1][0]=1,F3[1][2]=1(365)

[2631] F4[0][1]=1, F4[1][1]=2, F4[2][1]=1(366)

[2632] F4[0][2]=1, F4[1][2]=2, F4[2][2]=1(367)

[2633]

[2634] — Otherwise, the following applies:

[2635] F3[1][1]=8(368)

[2636] F4[0][1]=2, F4[1][1]=4, F4[2][1]=2, (369)

[2637]

[2638] —if [[sps_chroma_vertical_collocated_flag]] is equal to 1, then the following applies:

[2639] —pDsY[x][y], x=0..nTbW-1, y=0..nTbH-1 is derived as follows:

[2640]

[2641] —otherwise([[sps_chroma_vertical_collocated_flag]] is equal to 0), the following applies:

[2642] —pDsY[x][y], x=0..nTbW-1, y=0..nTbH-1 is derived as follows:

[2643]

[2644] F4[1][1]×pY[SubWidthC×x][SubHeightC×y]+(371)

[2645] F4[1][2]×pY[SubWidthC×x][SubHeightC×y+1]+

[2646] F4[2][1]×pY[SubWidthC×x+1][SubHeightC×y]+

[2647] F4[2][2]×pY[SubWidthC×x+1][SubHeightC×y+1]+4)>>3

[2648] 4. When numSampL is greater than 0, the selected adjacent left chroma sample pSelC[idx] is set equal to p[-1][pickPosL[idx]], where idx = 0..cntL-1, and the selected downsampled adjacent left luma sample pSelDsY[idx], where idx = 0..cntL-1, is derived as follows:

[2649] —The variable y is set equal to pickPosL[idx].

[2650] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[2651] pSelDsY[idx]=pY[-1][y](372)

[2652] — Otherwise, the following applies:

[2653] —if [[sps_chroma_vertical_collocated_flag]] is equal to 1, then the following applies:

[2654]

[2655] —otherwise([[sps_chroma_vertical_collocated_flag]] is equal to 0), the following applies:

[2656]

[2657] 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 adjacent top luma sample pSelDsY[idx] is downsampled, where Specify as follows:

[2658] —The variable x is set equal to pickPosT[idx-cntL].

[2659] If SubWidthC and SubHeightC are both equal to 1, then the following applies:

[2660] pSelDsY[idx]=pY[x][-1](375)

[2661] — Otherwise, the following applies:

[2662] —if [[sps_chroma_vertical_collocated_flag]] is equal to 1, then the following applies:

[2663] If bCTUboundary is equal to FALSE, the following applies:

[2664]

[2665] — Otherwise (bCTUboundary is TRUE), the following applies:

[2666]

[2667] —otherwise([[sps_chroma_vertical_collocated_flag]] is equal to 0), the following applies:

[2668] If bCTUboundary is equal to FALSE, the following applies:

[2669]

[2670] — Otherwise (bCTUboundary is TRUE), the following applies:

[2671]

[2672] 6. When cntT+cntL is not equal to 0, the variables minY, maxY, minC, and maxC are derived as follows:

[2673] —When cntT+cntL is equal to 2, pSelComp[3] is set equal to pSelComp[0], pSelComp[2] is set equal to pSelComp[1], pSelComp[0] is set equal to pSelComp[1], pSelComp[1] is set equal to pSelComp[3], and Comp is replaced by DsY and C.

[2674] —The arrays minGrpIdx and maxGrpIdx are derived as follows:

[2675] minGrpIdx[0]=0(380)

[2676] minGrpIdx[1]=2(381)

[2677] maxGrpIdx[0]=1(382)

[2678] maxGrpIdx[1]=3(383)

[2679] —When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[minGrpIdx[1]], minGrpIdx[0] and minGrpIdx[1] are swapped as follows:

[2680] (minGrpIdx[0], minGrpIdx[1])=Swap(minGrpIdx[0], minGrpIdx[1]) (384)

[2682] —When pSelDsY[maxGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], maxGrpIdx[0] and maxGrpIdx[1] are swapped as follows:

[2683] (maxGrpIdx[0], maxGrpIdx[1])=Swap(maxGrpIdx[0], maxGrpIdx[1]) (385)

[2685] —When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], the arrays minGrpIdx and maxGrpIdx are swapped as follows:

[2686] (minGrpIdx, maxGrpIdx) = Swap (minGrpIdx, maxGrpIdx) (386)

[2687] —When pSelDsY[minGrpIdx[1]] is greater than pSelDsY[maxGrpIdx[0]], minGrpIdx[1] and maxGrpIdx[0] are swapped as follows:

[2688] (minGrpIdx[1], maxGrpIdx[0])=Swap(minGrpIdx[1], maxGrpIdx[0]) (387)

[2690] —The variables maxY, maxC, minY, and minC are derived as follows:

[2691] maxY=(pSelDsY[maxGrpIdx[0]]+pSelDsY[maxGrpIdx[1]]+1)>>1(388)

[2692] maxC=(pSelC[maxGrpIdx[0]]+pSelC[maxGrpIdx[1]]+1)>>1 (389)

[2694] minY=(pSelDsY[minGrpIdx[0]]+pSelDsY[minGrpIdx[1]]+1)>>1(390)

[2695] minC=(pSelC[minGrpIdx[0]]+pSelC[minGrpIdx[1]]+1)>>1 (391)

[2697] 7. The variables a, b, and k are derived as follows:

[2698] — If numSampL is equal to 0 and numSampT is equal to 0, then the following applies:

[2699] k=0(392)

[2700] a=0(393)

[2701] b=1<<(BitDepth-1)(394)

[2702] — Otherwise, the following applies:

[2703] diff=maxY-minY(395)

[2704] — If diff is not equal to 0, the following applies:

[2705] diffC=maxC-minC(396)

[2706] x=Floor(Log2(diff))(397)

[2707] normDiff=((diff<<4)>>x)&15(398)

[2708] x+=(normDiff!=0)? 1:0(399)

[2709] y=Abs(diffC)>0? Floor(Log2(Abs(diffC)))+1:0(400)

[2710] a=(diffC×(divSigTable[normDiff]|8)+2 y - 1 )>>y(401)

[2711] k=((3+xy)<1)? 1:3+xy(402)

[2712] a=((3+xy)<1)? Sign(a)×15:a(403)

[2713] b=minC-((a×minY)>>k)(404)

[2714] where divSigTable[] is specified as follows:

[2715] divSigTable[]={0, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0} (405)

[2716] — Otherwise (diff is equal to 0), the following applies:

[2717] k=0(406)

[2718] a=0(407)

[2719] b=minC(408)

[2720] 8. The predicted sample point predSample[x][y], where x = 0..nTbW-1 and y = 0..nTbH-1, is derived as follows:

[2721] predSamples[x][y]=Clip1(((pDsY[x][y]×a)>>k)+b)(409)

[2722] NOTE - This process uses sps_chroma_vertical_collocated_flag. However, to simplify the implementation, it does not use sps_chroma_horizontal_collocated_flag.

[2723] Figure 9 is a block diagram of a video processing device 900. Device 900 can be used to implement one or more methods described herein. Device 900 can be embodied in a smartphone, a tablet, a computer, an Internet of Things (IoT) receiver, etc. Device 900 may include one or more processors 902, one or more memories 904, and video processing hardware 906. Processor(s) 902 can be configured to implement one or more methods described in this document. Memory(s) 904 can be used to store data and code for implementing the methods and techniques described herein. Video processing hardware 906 can be used to implement some of the techniques described in this document (e.g., listed in the previous section) in hardware circuitry.

[2724] Figure 10 A block diagram of a video encoder is shown.

[2725] Figure 11 is a flow chart of a method 1100 for processing video. The method 1100 includes: for converting between a chroma block of the video and a coded representation of the video, deriving (1102) parameters of a cross-component linear model using downsampled co-located adjacent top luma samples generated from N top-neighboring rows of the co-located luma block using a downsampled filter, where N is a positive integer; and performing (1104) the conversion using a predicted chroma block, the predicted block generated using the cross-component linear model.

[2726] Figure 12 is a block diagram of an example video processing system in which the disclosed technology may be implemented.

[2727] Figure 12 1 is a block diagram illustrating an example video processing system 1200 in which the various techniques disclosed herein may be implemented. Various implementations may include some or all of the components of system 1200. System 1200 may include an input 1202 for receiving video content. The video content may be received in a raw or uncompressed format, for example, 8-bit or 10-bit multi-component pixel values, or may be received in a compressed or encoded format. Input 1202 may represent a network interface, a peripheral bus interface, or a storage interface. Examples of network interfaces include wired interfaces such as Ethernet, a passive optical network (PON), and wireless interfaces such as Wi-Fi or a cellular interface.

[2728] System 1200 may include a codec component 1204 that implements various codecs or encoding methods described herein. Codec component 1204 may reduce the average bit rate of the video from input 1202 to the output of codec component 1204 to generate a codec representation of the video. Therefore, codec technology is sometimes referred to as video compression or video transcoding technology. The output of codec component 1204 may be stored or sent via a connected communication, as represented by component 1206. The stored or communicated bitstream (or coded) representation of the video received at input 1202 may be used by component 1208 to generate pixel values ​​or displayable video that is sent to display interface 1210. The process of generating user-viewable video from the bitstream representation is sometimes referred to as video decompression. In addition, although some video processing operations are referred to as "codec" operations or tools, it should be understood that the codec tools or operations are used at the encoder, and the corresponding decoding tools or operations that reverse the codec results will be performed by the decoder.

[2729] Examples of peripheral bus interfaces or display interfaces may include Universal Serial Bus (USB) or High-Definition Multimedia Interface (HDMI) or DisplayPort, etc. Examples of storage interfaces include SATA (Serial Advanced Technology Attachment), PCI, IDE interfaces, etc. The technology described in this document may be embodied in various electronic devices, such as mobile phones, laptop computers, smart phones, or other devices capable of performing digital data processing and / or video display.

[2730] Figure 14 is a block diagram illustrating an example video coding system 100 that may utilize the techniques of this disclosure.

[2731] like Figure 14 As shown, the video encoding and decoding system 100 may include a source device 110 and a destination device 120. The source device 110 generates encoded video data and may be referred to as a video encoding device. The destination device 120 may decode the encoded video data generated by the source device 110 and may be referred to as a video decoding device.

[2732] Source device 110 may include a video source 112 , a video encoder 114 , and an input / output (I / O) interface 116 .

[2733] The video source 112 may include a source such as a video capture device, an interface for receiving video data from a video content provider, and / or a computer graphics system for generating video data, or a combination of these sources. The video data may include one or more pictures. The video encoder 114 encodes the video data from the video source 112 to generate a bitstream. The bitstream may include a sequence of bits that form a coded representation of the video data. The bitstream may include coded pictures and associated data. A coded picture is a coded representation of a picture. The associated data may include sequence parameter sets, picture parameter sets, and other syntax structures. The I / O interface 116 may include a modulator / demodulator (modem) and / or a transmitter. The coded video data may be transmitted directly to the destination device 120 via the network 130a via the I / O interface 116. The coded video data may also be stored on a storage medium / server 130b for access by the destination device 120.

[2734] Destination device 120 may include an I / O interface 126 , a video decoder 124 , and a display device 122 .

[2735] I / O interface 126 may include a receiver and / or a modem. I / O interface 126 may obtain encoded video data from source device 110 or storage medium / server 130b. Video decoder 124 may decode the encoded video data. Display device 122 may display the decoded video data to a user. Display device 122 may be integrated with destination device 120 or may be external to destination device 120, with destination device 120 configured to interface with an external display device.

[2736] The video encoder 114 and the video decoder 124 may operate according to a video compression standard, such as the High Efficiency Video Codec (HEVC) standard, the Versatile Video Codec (VVC) standard, and other current and / or future standards.

[2737] Figure 15 is a block diagram illustrating an example of a video encoder 200, which may be Figure 14 The video encoder 114 in the system 100 is shown.

[2738] Video encoder 200 may be configured to perform any or all of the techniques of this disclosure. Figure 15 In the example of , video encoder 200 includes multiple functional components. The techniques described in this disclosure can be shared among the various components of video encoder 200. In some examples, a processor can be configured to perform any or all of the techniques described in this disclosure.

[2739] The functional components of the video encoder 200 may include a partitioning unit 201, a prediction unit 202, a residual generation unit 207, a transform unit 208, a quantization unit 209, an inverse quantization unit 210, an inverse transform unit 211, a reconstruction unit 212, a buffer 213 and an entropy coding and decoding unit 214. The prediction unit 202 may include a mode selection unit 203, a motion estimation unit 204, a motion compensation unit 205 and an intra-frame prediction unit 206.

[2740] In other examples, the video encoder 200 may include more, fewer, or different functional components. In one example, the prediction unit 202 may include an intra block copy (IBC) unit. The IBC unit may perform prediction in an IBC mode in which at least one reference picture is the picture in which the current video block is located.

[2741] Furthermore, some components such as the motion estimation unit 204 and the motion compensation unit 205 may be highly integrated, but for illustration purposes, are shown in FIG. Figure 15 In the example, they are shown separately.

[2742] The partitioning unit 201 may partition a picture into one or more video blocks. The video encoder 200 and the video decoder 300 may support various video block sizes.

[2743] The mode selection unit 203 may select one of the coding modes, intra or inter, based on the error result, for example, and provide the resulting intra or inter coded block to the residual generation unit 207 to generate residual block data, and to the reconstruction unit 212 to reconstruct the coded block for use as a reference picture. In some examples, the mode selection unit 203 may select a combined intra and inter prediction (CIIP) mode, where prediction is based on an inter prediction signal and an intra prediction signal. The mode selection unit 203 may also select a resolution of motion vectors for the block (e.g., sub-pixel or integer pixel precision) in the case of inter prediction.

[2744] To perform inter-frame prediction on the current video block, the motion estimation unit 204 may generate motion information for the current video block by comparing the current video block with one or more reference frames from the buffer 213. The motion compensation unit 205 may determine a predicted video block for the current video block based on the motion information and decoded samples of pictures from the buffer 213 other than the picture associated with the current video block.

[2745] Motion estimation unit 204 and motion compensation unit 205 may perform different operations on the current video block, eg, depending on whether the current video block is in an I slice, a P slice, or a B slice.

[2746] In some examples, motion estimation unit 204 may perform unidirectional prediction on the current video block, and motion estimation unit 204 may search the reference pictures of list 0 or list 1 to obtain a reference video block for the current video block. Motion estimation unit 204 may then generate a reference index indicating the reference picture in list 0 or list 1 that contains the reference video block, and a motion vector indicating the spatial displacement between the current video block and the reference video block. Motion estimation unit 204 may output the reference index, prediction direction indicator, and motion vector as motion information for the current video block. Motion compensation unit 205 may generate a predicted video block for the current block based on the reference video block indicated by the motion information of the current video block.

[2747] In other examples, the motion estimation unit 204 may perform bidirectional prediction on the current video block. The motion estimation unit 204 may search for a reference video block for the current video block in the reference pictures in list 0 and may also search for another reference video block for the current video block in the reference pictures in list 1. The motion estimation unit 204 may then generate reference indexes indicating the reference pictures in list 0 and list 1 containing the reference video block, and a motion vector indicating the spatial displacement between the reference video block and the current video block. The motion estimation unit 204 may output the reference index and motion vector of the current video block as motion information for the current video block. The motion compensation unit 205 may generate a predicted video block for the current video block based on the reference video block indicated by the motion information of the current video block.

[2748] In some examples, motion estimation unit 204 may output a complete set of motion information for use in the decoding process of a decoder.

[2749] In some examples, motion estimation unit 204 may not output a complete set of motion information for the current video. Instead, motion estimation unit 204 may signal the motion information of the current video block with reference to the motion information of another video block. For example, motion estimation unit 204 may determine that the motion information of the current video block is sufficiently similar to the motion information of a neighboring video block.

[2750] In one example, motion estimation unit 204 may indicate a value in a syntax structure associated with the current video block that indicates to video decoder 300 that the current video block has the same motion information as another video block.

[2751] In another example, the motion estimation unit 204 may identify another video block and a motion vector difference (MVD) in a syntax structure associated with the current video block. The motion vector difference indicates the difference between the motion vector of the current video block and the motion vector of the indicated video block. The video decoder 300 may use the motion vector of the indicated video block and the motion vector difference to determine the motion vector of the current video block.

[2752] As described above, the video encoder 200 may predictively signal the motion vector.Two examples of predictive signaling techniques that may be implemented by the video encoder 200 include advanced motion vector prediction (AMVP) and merge mode signaling.

[2753] The intra-frame prediction unit 206 can perform intra-frame prediction on the current video block. When the intra-frame prediction unit 206 performs intra-frame prediction on the current video block, the intra-frame prediction unit 206 can generate prediction data for the current video block based on decoded samples of other video blocks in the same picture. The prediction data for the current video block can include the predicted video block and various syntax elements.

[2754] The residual generation unit 207 may generate residual data for the current video block by subtracting (e.g., indicated by a minus sign) the predicted video block of the current video block from the current video block. The residual data for the current video block may include residual video blocks corresponding to different sample components of the samples in the current video block.

[2755] In other examples, such as in skip mode, there may be no residual data for the current video block, and the residual generation unit 207 may not perform a subtraction operation.

[2756] Transform processing unit 208 may generate one or more transform coefficient video blocks for a current video block by applying one or more transforms to the residual video block associated with the current video block.

[2757] After transform processing unit 208 generates a transform coefficient video block associated with the current video block, quantization unit 209 may quantize the transform coefficient video block associated with the current video block based on one or more quantization parameter (QP) values ​​associated with the current video block.

[2758] The inverse quantization unit 210 and the inverse transform unit 211 may apply inverse quantization and inverse transform, respectively, to the transform coefficient video block to reconstruct a residual video block from the transform coefficient video block. The reconstruction unit 212 may add the reconstructed residual video block to corresponding samples from one or more predicted video blocks generated by the prediction unit 202 to produce a reconstructed video block associated with the current block for storage in the buffer 213.

[2759] After the reconstruction unit 212 reconstructs the video block, a loop filtering operation may be performed to reduce video block artifacts in the video block.

[2760] The entropy coding unit 214 may receive data from other functional components of the video encoder 200. When the entropy coding unit 214 receives data, the entropy coding unit 214 may perform one or more entropy coding operations to generate entropy-coded data and output a bitstream including the entropy-coded data.

[2761] Figure 16 is a block diagram illustrating an example of a video decoder 300, which may be Figure 14 The video decoder 114 in the system 100 is shown.

[2762] Video decoder 300 may be configured to perform any or all of the techniques of this disclosure. Figure 16 In the example of FIG, video decoder 300 includes multiple functional components. The techniques described in this disclosure can be shared among the various components of video decoder 300. In some examples, a processor can be configured to perform any or all of the techniques described in this disclosure.

[2763] exist Figure 16 In the example of FIG, the video decoder 300 includes an entropy decoding unit 301, a motion compensation unit 302, an intra-frame prediction unit 303, an inverse quantization unit 304, an inverse transform unit 305, a reconstruction unit 306, and a buffer 307. In some examples, the video decoder 300 can perform the same operations as those performed with respect to the video encoder 200 (e.g., Figure 15 ) describes a decoding pass that is roughly the opposite of the encoding pass.

[2764] The entropy decoding unit 301 can retrieve an encoded bitstream. The encoded bitstream can include entropy-encoded video data (e.g., encoded blocks of video data). The entropy decoding unit 301 can decode the entropy-encoded video data, and the motion compensation unit 302 can determine motion information from the entropy-encoded video data, including motion vectors, motion vector precision, reference picture list indexes, and other motion information. The motion compensation unit 302 can determine such information, for example, by performing AMVP and merge modes.

[2765] The motion compensation unit 302 may generate a motion compensated block, possibly performing interpolation based on an interpolation filter.Identifiers o...

Claims

1. A method for processing video data, comprising: For conversion between a first chroma block of a first video picture of a video and a bitstream of the video, determining that a cross-component linear model (CCLM) prediction mode is applied to the first chroma block; Determining parameters of the CCLM for the first chrominance block according to a rule; In the CCLM prediction mode, deriving predicted samples of the first chroma block based on the CCLM and parameters of the CCLM; as well as performing the conversion based on the predicted samples of the first chrominance block, wherein the rule specifies that the parameters of the CCLM are determined based on neighboring chroma samples of the first chroma block and a first variable representing neighboring luminance samples of a first luminance block corresponding to the first chroma block, wherein the rule further specifies that when the value of the second variable indicates that the neighboring block is available, the first variable is set equal to the neighboring luma samples of the first luma block, and when the value of the second variable indicates that the neighboring block is not available, the first variable is set equal to a valid sample, wherein, when the value of the second variable indicates that the neighboring block is available, the first variable represented as pY[x][y] is set equal to the reconstructed adjacent upper luminance sample before the deblocking filtering process at the position (xTbY+x, yTbY+y), and the maximum value of x is equal to SubWidthC*Max(numSampT,nTbW)-1, wherein (xTbY, yTbY) represents the upper left position of the first luma block, x and y are integers, nTbW represents the width of the first chroma block, SubWidthC is a width scaling factor obtained according to the chroma format of the first video picture, and numSampT represents the number of top adjacent chroma samples available or the number of top and upper right adjacent chroma samples available in the CCLM prediction mode, The adjacent block indicated by the second variable is an adjacent chrominance block covering an adjacent upper position of the first luminance block.

2. The method according to claim 1, wherein: When the value of the second variable indicates that the neighboring block is available, the first variable denoted as pY[x][y] is set equal to the reconstructed neighboring left luma sample before the deblocking filtering process at the position (xTbY+x, yTbY+y), x is in the range of [-1, -3], and the maximum value of y is equal to SubHeightC*Max(numSampL, nTbH)-1, Wherein, (xTbY, yTbY) represents the upper left position of the first luminance block, x and y are integers, nTbH represents the height of the first chrominance block, SubHeightC is a height scaling factor obtained according to the chrominance format of the first video picture, and numSampL represents the number of adjacent chrominance samples available in the CCLM prediction mode.

3. The method according to claim 2, wherein: When the CCLM prediction mode is the first CCLM prediction mode, when the value of the second variable indicates that the neighboring block is available, numSampL is equal to the height of the first chroma block, When the CCLM prediction mode is the second CCLM prediction mode, numSampL is equal to nTbH+Min(numLeftBelow, nTbW), where nTbW represents the width of the first chroma block, and numLeftBelow represents the number of available lower-left adjacent chroma samples.

4. The method according to claim 2 or 3, wherein: The neighboring block indicated by the second variable is a neighboring chrominance block covering an adjacent left position of the first luminance block.

5. The method according to any one of claims 2 to 4, wherein: When the value of the second variable indicates that the neighboring block is not available, the first variable denoted as pY[x][y], where x=-1, y=-1..SubHeightC*numSampL-1, is set equal to the reconstructed luma sample pY[0][y].

6. The method according to claim 1, wherein: When the CCLM prediction mode is the first CCLM prediction mode, when the value of the second variable indicates that the neighboring block is available, numSampT is equal to the width of the first chroma block, When the CCLM prediction mode is the third CCLM prediction mode, numSampT is equal to nTbW+Min(numTopRight,nTbH), where nTbH represents the height of the first chroma block, and numTopRight represents the number of available top-right adjacent chroma samples.

7. The method according to claim 6, wherein: When the value of the second variable indicates that the neighboring block is not available, the first variable denoted as pY[x][y], where x=-1..SubWidthC*numSampT-1, y=-1..-2, is set equal to the reconstructed luma sample pY[x][0].

8. The method according to any one of claims 1 to 7, wherein: The converting includes encoding the video into the bitstream.

9. The method according to any one of claims 1 to 7, wherein: The converting includes decoding the video from the bitstream.

10. An apparatus for processing video data, comprising a processor and a non-transitory memory having instructions thereon, wherein the instructions, when executed by the processor, cause the processor to: For conversion between a first chroma block of a first video picture of a video and a bitstream of the video, determining that a cross-component linear model (CCLM) prediction mode is applied to the first chroma block; Determining parameters of the CCLM for the first chrominance block according to a rule; In the CCLM prediction mode, deriving predicted samples of the first chroma block based on the CCLM and parameters of the CCLM; and performing the conversion based on the predicted samples of the first chrominance block, wherein the rule specifies that the parameters of the CCLM are determined based on neighboring chroma samples of the first chroma block and a first variable representing neighboring luminance samples of a first luminance block corresponding to the first chroma block, wherein the rule further specifies that when the value of the second variable indicates that the neighboring block is available, the first variable is set equal to the neighboring luma samples of the first luma block, and when the value of the second variable indicates that the neighboring block is not available, the first variable is set equal to a valid sample, in, When the value of the second variable indicates that the neighboring block is available, the first variable denoted as pY[x][y] is set equal to the reconstructed adjacent upper luma sample before the deblocking filtering process at the position (xTbY+x, yTbY+y), and the maximum value of x is equal to SubWidthC*Max(numSampT,nTbW)-1, wherein (xTbY, yTbY) represents the upper left position of the first luma block, x and y are integers, nTbW represents the width of the first chroma block, SubWidthC is a width scaling factor obtained according to the chroma format of the first video picture, and numSampT represents the number of top adjacent chroma samples available or the number of top and upper right adjacent chroma samples available in the CCLM prediction mode, The adjacent block indicated by the second variable is an adjacent chrominance block covering an adjacent upper position of the first luminance block.

11. The device according to claim 10, wherein: When the value of the second variable indicates that the neighboring block is available, the first variable denoted as pY[x][y] is set equal to the reconstructed neighboring left luma sample before the deblocking filtering process at the position (xTbY+x, yTbY+y), x is in the range of [-1, -3], and the maximum value of y is equal to SubHeightC*Max(numSampL, nTbH)-1, Wherein, (xTbY, yTbY) represents the upper left position of the first luminance block, x and y are integers, nTbH represents the height of the first chrominance block, SubHeightC is a height scaling factor obtained according to the chrominance format of the first video picture, and numSampL represents the number of adjacent chrominance samples available in the CCLM prediction mode.

12. The device according to claim 11, wherein In a case where the CCLM prediction mode is the first CCLM prediction mode, when the value of the second variable indicates that the neighboring block is available, numSampL is equal to the height of the first chroma block, Wherein, when the CCLM prediction mode is the second CCLM prediction mode, numSampL is equal to nTbH+Min(numLeftBelow,nTbW), where nTbW represents the width of the first chroma block, and numLeftBelow represents the number of available lower-left adjacent chroma samples.

13. The device according to claim 11, wherein: The neighboring block indicated by the second variable is a neighboring chrominance block covering an adjacent left position of the first luminance block.

14. The device according to claim 10, wherein: In a case where the CCLM prediction mode is the first CCLM prediction mode, when the value of the second variable indicates that the neighboring block is available, numSampT is equal to the width of the first chroma block, Wherein, when the CCLM prediction mode is the third CCLM prediction mode, numSampT is equal to nTbW+Min(numTopRight,nTbH), where nTbH represents the height of the first chroma block, and numTopRight represents the number of available top-right adjacent chroma samples.

15. A non-transitory computer-readable storage medium storing instructions that cause a processor to: For conversion between a first chroma block of a first video picture of a video and a bitstream of the video, determining that a cross-component linear model (CCLM) prediction mode is applied to the first chroma block; Determining parameters of the CCLM for the first chrominance block according to a rule; In the CCLM prediction mode, deriving predicted samples of the first chroma block based on the CCLM and parameters of the CCLM; and performing the conversion based on the predicted samples of the first chrominance block, wherein the rule specifies that the parameters of the CCLM are determined based on neighboring chroma samples of the first chroma block and a first variable representing neighboring luminance samples of a first luminance block corresponding to the first chroma block, wherein the rule further specifies that when the value of the second variable indicates that the neighboring block is available, the first variable is set equal to the neighboring luma samples of the first luma block, and when the value of the second variable indicates that the neighboring block is not available, the first variable is set equal to a valid sample, in, When the value of the second variable indicates that the neighboring block is available, the first variable denoted as pY[x][y] is set equal to the reconstructed adjacent upper luma sample before the deblocking filtering process at the position (xTbY+x, yTbY+y), and the maximum value of x is equal to SubWidthC*Max(numSampT,nTbW)-1, wherein (xTbY, yTbY) represents the upper left position of the first luma block, x and y are integers, nTbW represents the width of the first chroma block, SubWidthC is a width scaling factor obtained according to the chroma format of the first video picture, and numSampT represents the number of top adjacent chroma samples available or the number of top and upper right adjacent chroma samples available in the CCLM prediction mode, The adjacent block indicated by the second variable is an adjacent chrominance block covering an adjacent upper position of the first luminance block.

16. A non-transitory computer-readable recording medium storing a bit stream of a video generated by a method performed by a video processing device, wherein the method comprises: determining that a cross-component linear model (CCLM) prediction mode is applied to a first chroma block of a first video picture of the video; Determining parameters of the CCLM for the first chrominance block according to a rule; In the CCLM prediction mode, deriving predicted samples of the first chroma block based on the CCLM and parameters of the CCLM; as well as generating the bitstream based on the predicted samples of the first chrominance block, wherein the rule specifies that the parameters of the CCLM are determined based on neighboring chroma samples of the first chroma block and a first variable representing neighboring luminance samples of a first luminance block corresponding to the first chroma block, wherein the rule further specifies that when the value of the second variable indicates that the neighboring block is available, the first variable is set equal to the neighboring luma samples of the first luma block, and when the value of the second variable indicates that the neighboring block is not available, the first variable is set equal to a valid sample, wherein, when the value of the second variable indicates that the neighboring block is available, the first variable represented as pY[x][y] is set equal to the reconstructed adjacent upper luminance sample before the deblocking filtering process at the position (xTbY+x, yTbY+y), and the maximum value of x is equal to SubWidthC*Max(numSampT,nTbW)-1, wherein (xTbY, yTbY) represents the upper left position of the first luma block, x and y are integers, nTbW represents the width of the first chroma block, SubWidthC is a width scaling factor obtained according to the chroma format of the first video picture, and numSampT represents the number of top adjacent chroma samples available or the number of top and upper right adjacent chroma samples available in the CCLM prediction mode, The adjacent block indicated by the second variable is an adjacent chrominance block covering an adjacent upper position of the first luminance block.

17. A method for storing a bitstream of a video, comprising: determining that a cross-component linear model (CCLM) prediction mode is applied to a first chroma block of a first video picture of the video; Determining parameters of the CCLM for the first chrominance block according to a rule; In the CCLM prediction mode, deriving predicted samples of the first chroma block based on the CCLM and parameters of the CCLM; generating the bitstream based on the predicted samples of the first chroma block; storing the bitstream in a non-transitory computer-readable recording medium, wherein the rule specifies that the parameters of the CCLM are determined based on neighboring chroma samples of the first chroma block and a first variable representing neighboring luminance samples of a first luminance block corresponding to the first chroma block, wherein the rule further specifies that when the value of the second variable indicates that the neighboring block is available, the first variable is set equal to the neighboring luma samples of the first luma block, and when the value of the second variable indicates that the neighboring block is not available, the first variable is set equal to a valid sample, wherein, when the value of the second variable indicates that the neighboring block is available, the first variable represented as pY[x][y] is set equal to the reconstructed adjacent upper luminance sample before the deblocking filtering process at the position (xTbY+x, yTbY+y), and the maximum value of x is equal to SubWidthC*Max(numSampT,nTbW)-1, wherein (xTbY, yTbY) represents the upper left position of the first luma block, x and y are integers, nTbW represents the width of the first chroma block, SubWidthC is a width scaling factor obtained according to the chroma format of the first video picture, and numSampT represents the number of top adjacent chroma samples available or the number of top and upper right adjacent chroma samples available in the CCLM prediction mode, The adjacent block indicated by the second variable is an adjacent chrominance block covering an adjacent upper position of the first luminance block.

Citation Information

Patent Citations

  • Single-row cross component linear model prediction mode

    CN110896479A

  • Encoder, decoder, encoding method, and decoding method

    US20200092563A1