Filtering method and apparatus for predicting cross-component linear models

Cross-component linear models in video coding improve compression efficiency by determining filters based on chroma format and luma sample position, enhancing video encoding and decoding quality.

JP7864149B2Active Publication Date: 2026-05-22HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2024-04-04
Publication Date
2026-05-22

AI Technical Summary

Technical Problem

Existing video coding technologies face challenges in achieving efficient compression of video data without sacrificing picture quality, particularly in scenarios with limited network bandwidth or memory resources.

Method used

The use of cross-component linear models (CCLMs) for intra-prediction, where filters are determined based on the chroma format, position, and format of luma samples within a block, allowing for improved filtering and prediction of chroma signals using reconstructed luma samples.

Benefits of technology

Enhances video compression efficiency by reducing the number of filter taps and improving picture quality during encoding and decoding processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007864149000043
    Figure 0007864149000043
  • Figure 0007864149000044
    Figure 0007864149000044
  • Figure 0007864149000045
    Figure 0007864149000045
Patent Text Reader

Abstract

To provide a device and method for encoding and decoding.SOLUTION: A method for chroma block prediction by a video decoder includes the steps of determining a filter for a luma component of a current block on the basis of a chroma format of a picture to which the current block belongs, applying the determined filter to reconstructed luma sample of the luma component of the current block and / or an area of luma sample at a selected position adjacent to the current block to obtain filtered reconstructed luma sample, obtaining a linear model coefficient on the basis of the filtered reconstructed luma sample, and performing cross-component prediction on the basis of the linear model coefficient of the linear model derivation and the filtered reconstructed luma sample to obtain a predicted value of a chroma component of the current block.SELECTED DRAWING: Figure 14
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] Embodiments of the present application (disclosure) relate to the field of picture processing, more specifically to intra-prediction using cross-component linear models (CCLMs) (e.g., chroma intra-prediction), and more specifically to spatial filtering used in CCLMs for intra-prediction with different chroma formats. [Background technology]

[0002] Video coding (video encoding and decoding) is used in a wide range of digital video applications, such as broadcast digital TV, video transmission over the internet and mobile networks, real-time conversation applications like video chat, video conferencing, DVD and Blu-ray discs, video content acquisition and editing systems, and camcorders in security applications.

[0003] Even relatively short videos require a considerable amount of video data to render, which can cause difficulties when data is streamed or otherwise transmitted over networks with limited bandwidth. Therefore, video data is generally compressed before being transmitted over modern telecommunications networks. Video size also becomes an issue when video is stored on storage devices, as memory resources may be limited. Video compression devices often use software and / or hardware at the source to encode the video data before transmission or storage, thereby reducing the amount of data required to represent the digital video image. The compressed data is then received at the destination by a video decompression device that decodes the video data. With limited network resources and the increasing demand for higher video quality, improved compression and decompression techniques that improve the compression ratio with little to no sacrifice of picture quality are desirable. [Overview of the project]

[0004] Embodiments of the present application provide apparatus and methods for encoding and decoding.

[0005] According to a first aspect of this disclosure, it relates to an intra-prediction method using a linear model, the method being performed by a coding apparatus (in particular, an apparatus for intra-prediction). The method is This involves determining a filter for each lumen sample (e.g., each lumen sample) belonging to the block (i.e., an internal sample of the current block) based on the chroma format of the picture to which the block currently belongs, and in particular, different lumen samples may correspond to different filters. Essentially, it depends on whether it is on a boundary. At the current position of each lumern sample belonging to the block (e.g., each lumern sample), the determined filter is applied to the reconstructed lumern sample to obtain the filtered, reconstructed lumern sample (e.g., Rec'). L Get the [x, y] coordinates. Based on the filtered and reconstructed lumens samples, we obtain a set of lumens samples to be used as input for the linear model derivation. Cross-component prediction (e.g., lumern-to-chroman cross-component prediction or CCLM prediction) is performed based on the linear model coefficients of the linear model derivation and the filtered, reconstructed lumern samples.

[0006] Embodiments of this application relate to lumens filtering in CCML. This disclosure relates to filtering for lumens samples. This disclosure relates to filter selection performed within CCML.

[0007] CCLM is related to chroma prediction, which predicts chroma signals using reconstructed chroma. CCLM==chroma from luma.

[0008] In such an embodiment, determining the filter is possible in the method according to the first aspect. Currently, the filter is determined based on the position of the chroma sample within the block and the chroma format, or Based on the position and chroma format of each lumens sample within the current block, determine the respective filters for multiple lumens samples belonging to the current block. It has the following properties. If samples adjacent to the current block are available, the filter may also use them to filter the boundary area of ​​the current block.

[0009] In an embodiment of the method according to the first aspect, determining the filter is as follows: The chroma format of the picture to which the block currently belongs, The current location of the luma sample within the block, The number of luma samples currently belonging to a block, Currently, the width and height of the block, and Current position of subsampled chroma samples relative to luma samples within a block The filter is determined based on one or more of the following:

[0010] In one possible embodiment of the method according to the first aspect, when a subsampled chroma sample is not in the same position as the corresponding luma sample, a first relationship (e.g., Table 4) between a plurality of filters and the width and height values ​​of the current block is used to determine the filter. When a subsampled chroma sample is in the same position as the corresponding luma sample, a second or third relationship (e.g., either Table 2 or Table 3) between multiple filters and the width and height values ​​of the current block is used to determine the filter.

[0011] In one possible embodiment of the method according to the first aspect, a second or third relationship (for example, one of Table 2 or Table 3) between a plurality of filters and the width and height values ​​of the current block is determined based on the number of rumor samples belonging to the current block.

[0012] In one possible embodiment of the method according to the first aspect, the filter includes non-zero coefficients located horizontally and vertically adjacent to the position of the filtered and reconstructed lumens sample when the chroma component of the block is not currently subsampled.

[0013] In one possible embodiment of the method according to the first aspect, the area of ​​the reconstructed rumor sample includes a plurality of reconstructed rumor samples relative to the positions of the filtered reconstructed samples, the positions of the filtered reconstructed rumor samples correspond to the positions of rumor samples belonging to the current block, and the positions of the filtered reconstructed rumor samples are within the rumor blocks of the current block.

[0014] In one possible embodiment of the method according to the first aspect, the area of ​​the reconstructed lumens sample includes a plurality of reconstructed lumens samples located horizontally and vertically adjacent to the location of the filtered reconstructed lumens sample, the location of the filtered reconstructed lumens sample corresponds to the location of a lumens sample belonging to the current block, and the location of the filtered reconstructed lumens sample is within the current block (e.g., the current lumens block or lumens component of the current block). In such an embodiment, the location of the filtered reconstructed lumens sample is within the current block (right portion of Figure 8, applying a filter to the lumens sample).

[0015] In an embodiment of the method according to the first aspect, the chroma format may be a YCbCr 4:4:4 chroma format, a YCbCr 4:2:0 chroma format, a YCbCr 4:2:2 chroma format, or a monochrome format.

[0016] In one possible embodiment of the method according to the first aspect, the set of luma samples used as input for linear model derivation is: Filtered and reconstructed luma samples (e.g., Rec' L It has a boundary luma reconstruction sample subsampled from [x,y]).

[0017] In one possible embodiment of the method according to the first aspect, the predictor of the chromablock is currently, Nod C (i,j) = α·rec L '(i,j)+β It is obtained based on pred C (i,j) represents a chroma sample, rec L (i,j) represents the corresponding reconstructed ruma sample.

[0018] In one possible embodiment of the method according to the first aspect, the linear model is a multidirectional linear model (MDLM), and the linear model coefficients are used to obtain the MDLM.

[0019] In accordance with a second aspect, the present application relates to an encoding method implemented by an encoding device, Performing intraprediction using a linear model (e.g., cross-component linear model, CCLM, or multidirectional linear model, MDLM), This involves generating a bitstream containing multiple syntax elements, where these multiple syntax elements include syntax elements indicating the selection of filters for lumens samples belonging to a block (e.g., the selection of lumens filters for CCLM, in particular SPS flags such as sps_cclm_colocated_chroma_flag). This relates to methods that have [something].

[0020] In one possible embodiment of the method according to the second aspect, when the value of the syntax element is 0 or FALSE, the filter is applied to the lumens sample for linear model determination and prediction. When the value of the syntax element is 1 or TRUE, the filter is not applied to the lumens sample for linear model determination and prediction.

[0021] In accordance with a third aspect, the present application relates to a decoding method implemented by a decoding device, This involves parsing multiple syntax elements from a bitstream, where these elements include syntax elements indicating the selection of filters for lumens samples belonging to a block (e.g., the selection of lumens filters for CCLM, in particular SPS flags such as sps_cclm_colocated_chroma_flag), Perform intra-prediction using the shown linear model (e.g., CCLM) and This relates to methods that have [something].

[0022] In one possible embodiment of the method according to the third aspect, when the value of the syntax element is 0 or FALSE, the filter is applied to the lumens sample for linear model determination and prediction. When the value of the syntax element is 1 or TRUE, the filter is not applied to lumens samples for linear model determination and prediction. For example, lumens filters are not used when samples are in the same location.

[0023] In accordance with the fourth aspect, the present application is: One or more processors, A non-temporary computer-readable storage medium that is coupled to a processor and stores the programming executed by the processor. The decoder relates to having a decoder having such a decoder, and the programming, when executed by the processor, configures the decoder to perform a method according to an embodiment that may take the first or second, or the first, second, or third, aspect.

[0024] In accordance with the fifth aspect, the present application is: One or more processors, A non-temporary computer-readable storage medium that is coupled to a processor and stores the programming executed by the processor. The present invention relates to an encoder having such a feature, and the programming, when executed by the processor, configures the encoder to perform a method according to an embodiment that may take the first or second, or first, second, or third, aspect.

[0025] In accordance with the sixth aspect, the present application relates to an apparatus for intraprediction using a linear model, A decision unit configured to determine a filter for each lumens sample belonging to a block (e.g., each lumens sample) based on the chroma format of the picture to which the block currently belongs, At the current position of each lumern sample belonging to the block (e.g., each lumern sample), the determined filter is applied to the reconstructed lumern sample to obtain the filtered, reconstructed lumern sample (e.g., Rec'). L A filtering unit configured to obtain [x,y]), An acquisition unit configured to obtain a set of lumens samples used as input for linear model derivation, based on filtered and reconstructed lumens samples, A prediction unit configured to perform cross-component prediction (e.g., lumar-to-chromar cross-component prediction or CCLM prediction) based on linear model coefficients of linear model derivation and filtered reconstructed lumar samples, and This relates to devices that have [this feature].

[0026] The method according to the first aspect of the present application may be carried out by the apparatus according to the sixth aspect of the present application. Further features and embodiments of the apparatus according to the sixth aspect of the present application correspond to features and embodiments of the method according to the first aspect of the present application.

[0027] In other aspects of this application, a method for intraprediction using a linear model is provided. The method is as follows: The steps include determining a set of downsampling filters based on the chroma format of the picture to which the block currently belongs, and When a reconstructed adjacent upper luma sample is unavailable, the step is to obtain two ascending rows of adjacent samples by padding from the reconstructed luma block, When a reconstructed adjacent left lumen sample is unavailable, the step is to obtain three left columns of the adjacent sample by padding from the reconstructed lumen sample, The steps include obtaining a downsampled rumor sample of the reconstructed rumor sample within the rumor block of the current block, The steps include obtaining an upper downsampled luma reference sample by applying each downsampling filter in the set of downsampling filters to a selected sample from the two upper rows of the acquired neighboring samples, wherein when the selected sample is in the upper left position (1202), each downsampling filter is applied to the combination of the reconstructed neighboring sample and the padded neighboring sample, and The steps include: obtaining the left-side downsampled lumen reference sample by applying each downsampling filter in the set of downsampling filters to a selected sample from the three left columns of the acquired adjacent samples; A step of determining one or more linear model coefficients based on downsampled lumern reference samples from the upper side, left side, or a combination of the upper and left sides, and chroma reference samples corresponding to the downsampled lumern reference samples, The steps include obtaining a predicted sample of the chroma block corresponding to the chroma block based on linear model coefficients and downsampled chroma samples of reconstructed chroma samples within the chroma block, and It has.

[0028] The method according to the first aspect of the present application may be carried out by the apparatus according to the sixth aspect of the present application. Further features and embodiments of the method according to the first aspect of the present application correspond to features and embodiments of the apparatus according to the sixth aspect of the present application.

[0029] In other embodiments, the present invention relates to a device for decoding a video stream, including a processor and memory. The memory stores instructions causing the processor to perform the method according to the first or third embodiment.

[0030] In other embodiments, the present invention relates to a device for encoding a video stream, including a processor and memory. The memory stores instructions that cause the processor to perform the method according to a second embodiment.

[0031] A computer-readable storage medium is proposed which stores instructions that, when executed according to other embodiments, bring to one or more processors configured to encode video data. The instructions cause one or more processors to perform a method according to any of the first or second embodiments or the first, second, or third embodiments.

[0032] In other embodiments, the present application relates to a computer program including program code for performing a method according to any of the first or second embodiments or the first, second, or third embodiments.

[0033] In the embodiments described above and any possible embodiments thereof, in order to apply a filter to the reconstructed lumens sample in the lumens block of the current block and / or to the lumens sample at a selected location adjacent to the current block, the filter belongs to a set of downsampling filters, and the set of downsampling filters includes only a reduced number of filters. Accordingly, it is possible to reduce the number of filter taps applied to the reconstructed lumens sample and / or to the lumens sample at a selected location adjacent to the current block.

[0034] Details of one or more embodiments are shown in the accompanying drawings and the following description. Other features, purposes, and advantages will become apparent from the specification, drawings, and claims.

[0035] Embodiments of the present invention will be described in more detail below with reference to the attached figures and drawings. [Brief explanation of the drawing]

[0036] [Figure 1A] Block diagram showing an example of a video coding system configured to implement an embodiment of the present invention. [Figure 1B] Block diagram shows another example of a video coding system configured to implement an embodiment of the present invention. [Figure 2] This is a block diagram showing an example of a video encoder configured to implement an embodiment of the present invention. [Figure 3] This is a block diagram illustrating an exemplary structure of a video decoder configured to implement an embodiment of the present invention. [Figure 4] This is a block diagram showing an example of an encoding or decoding device according to an embodiment of the present disclosure. [Figure 5] This is a block diagram representing another example of an encoding or decoding device according to an exemplary embodiment of the present disclosure. [Figure 6] This diagram illustrates the concept of a cross-component linear model for chromatintra prediction. [Figure 7] This figure illustrates a simplified method for deriving linear model parameters. [Figure 8] This diagram illustrates the process of downsampling chroma samples for the YUV 4:2:0 chroma format and how these samples correspond to chroma samples. [Figure 9] This diagram shows the spatial position of lumens samples used for downsampling filtering in the YUV 4:2:0 chroma format. [Figure 10A] This diagram illustrates different chromatic sample types. [Figure 10B] This diagram illustrates different chromatic sample types. [Figure 11] This figure illustrates a method according to an exemplary embodiment of the present disclosure. [Figure 12A] This example shows a configuration where the top-left sample is available and the chroma format is specified as YUV 4:2:0, or where the block boundaries are CTU line boundaries. [Figure 12B] This embodiment shows a case where the block boundary is not a CTU line boundary, the upper left sample is available, and the chroma format is specified as YUV 4:2:0 (or any other chroma format using vertical chroma subsampling). [Figure 12C] This example shows a configuration where the top-left sample is unavailable, the chroma format is specified as YUV 4:2:0, or the block boundary is a CTU line boundary. [Figure 12D] This embodiment shows a case where the block boundary is not a CTU line boundary, the upper left sample is available, and the chroma format is specified as YUV 4:2:0 (or any other chroma format using vertical chroma subsampling). [Figure 13] This illustrates the filtering operation of the reconstructed luminance block 1301 by an exemplary 3-tap filter 1302. [Figure 14] This describes a chromablock prediction method according to an embodiment of the present application. [Figure 15] This represents a device according to an embodiment of the present application. [Figure 16] This block diagram shows an example of the structure of a content supply system 3100 that realizes a content distribution service. [Figure 17] This is a block diagram showing the structure of an example terminal device. [Modes for carrying out the invention]

[0037] In the following, unless explicitly specified otherwise, the same reference numeral refers to the same or at least functionally equivalent feature.

[0038] In the following description, accompanying drawings, which form part of the present disclosure and illustrate, as examples, specific embodiments of the present invention or specific embodiments of the present invention in which such embodiments may be used, will be referenced. It will be understood that embodiments of the present invention may be used in other embodiments and may include structural or logical changes not shown in the drawings.

[0039] The following abbreviations apply: ABT: asymmetric BT AMVP:advanced motion vector prediction ASIC: application-specific integrated circuit AVC: Advanced Video Coding B: Bidirectional prediction BT: binary tree CABAC:context-adaptive binary arithmetic coding CAVLC:context-adaptive variable-length coding CD: compact disc CD-ROM:compact disc read-only memory CPU: Central Processing Unit CRT: Cathode-ray tube CTU: coding tree unit CU: coding unit DASH:Dynamic Adaptive Streaming over HTTP DCT: discrete cosine transform DMM: Depth Modeling Mode DRAM:dynamic random-access memory DSL:digital subscriber line DSP:digital signal processor DVD:digital video disc EEPROM:electrically-erasable programmable read-only memory EO:electrical-to-optical FPGA:field-programmable gate array FTP:File Transfer Protocol GOP:group of pictures GPB:generalized P / B GPU:graphics processing unit HD:high-definition HEVC:High Efficiency Video Coding HM:HEVC Test Model I:intra-mode IC:integrated circuit ISO / IEC:International Organization for Standardization / International Electrotechnical Commission ITU-T:International Telecommunications Union Telecommunication Standardization Sector JVET:Joint Video Exploration Team LCD:liquid-crystal display LCU:largest coding unit LED:light-emitting diode MPEG:Motion Picture Expert Group MPEG-2:Motion Picture Expert Group 2 MPEG-4:Motion Picture Expert Group 4 MTT:multi-type tree mux-demux:multiplexer-demultiplexer MV:motion vector NAS:network-attached storage OE:optical-to-electrical OLED:organic light-emitting diode PIPE:probability interval portioning entropy P:unidirectional prediction PPS:picture parameter set PU:prediction unit QT:quadtree, quaternary tree QTBT:quadtree plus binary tree RAM:random-access memory RDO:rate-distortion optimization RF:radio frequency ROM:read-only memory Rx:receiver unit SAD:sum of absolute differences SBAC:syntax-based arithmetic coding SH:slice header SPS:sequence parameter set SRAM:static random-access memory SSD:sum of squared differences SubCE: SubCore Experiment TCAM:ternary content-addressable memory TT: ternary tree Tx:transmitter unit TU: transform unit UDP: User Datagram Protocol VCEG:Video Coding Experts Group VTM: VVC Test Model VVC: Versatile Video Coding

[0040] For example, disclosures relating to a described method may also apply to a corresponding device or system configured to perform the method, and vice versa. For example, where one or more specific method steps are described, the corresponding device may include one or more units, e.g., functional units (e.g., one unit performing one or more steps, or multiple units each performing one or more of the steps), even if such one or more units are not explicitly described or illustrated. On the other hand, for example, where a specific device is described based on one or more units, e.g., functional units, the corresponding method may include one step performing the function of one or more units (e.g., one or more steps performing the function of one or more units, or multiple steps each performing one or more of the functions of multiple units), even if such one or more steps are not explicitly described or illustrated. Furthermore, it is understood that the various exemplary embodiments and / or features described herein may be combined with each other unless otherwise specified.

[0041] Video coding typically refers to the processing of a sequence of pictures that make up a video or video sequence. The terms “frame” or “image” are sometimes used synonymously in the field of video coding instead of “picture.” Video coding (or coding in general) has two parts: video encoding and video decoding. Video encoding is performed at the source and typically involves processing the original video picture (e.g., by compression) to reduce the amount of data needed to represent the video picture (for more efficient storage and / or transmission). Video decoding is performed at the destination and typically involves the reverse processing compared to the encoder, to reconstruct the video picture. Embodiments referring to “coding” a video picture (or pictures in general) should be understood as relating to the “encoding” or “decoding” of the video picture or each video sequence. The combination of the encoding and decoding parts is also called a CODEC (Coding and Decoding).

[0042] In lossless video coding, the original video picture is reconstructible. That is, the reconstructed video picture has the same quality as the original video picture (assuming there is no transmission loss or other data loss during storage or transmission). In lossy video coding, for example, further compression by quantization is performed to reduce the amount of data representing the video picture, and the video picture cannot be fully reconstructed by the decoder. That is, the quality of the reconstructed video picture is reduced or worsened compared to the quality of the original video picture.

[0043] Several video coding standards belong to the group of “lossy hybrid video codecs” (i.e., 2D transform coding that combines spatial and temporal prediction in the sample region with quantization in the transform region). Each picture in a video sequence is typically divided into a set of non-overlapping blocks, and coding is usually performed at the block level. In other words, in an encoder, video is typically processed, i.e., encoded, at the block (video block) level by generating predicted blocks using, for example, spatial (intra-picture) and / or temporal (inter-picture) predictions, subtracting the predicted blocks from the current block (the block currently being processed / to be processed) to obtain a residual block, transforming the residual block, and quantizing the residual block in the transform region to reduce the amount of data to be transmitted (compression). In a decoder, the reverse process compared to the encoder is applied to the encoded or compressed block so that the current block is reconstructed for display. Furthermore, the encoder duplicates the decoder processing loop so that both generate the same predictions (e.g., intra and inter predictions) and / or reconstructions for processing, i.e., coding, the subsequent blocks.

[0044] Hereinafter, embodiments of the video coding system 10, video encoder 20, and video decoder 30 will be described with reference to Figures 1 to 3.

[0045] Figure 1A is a schematic block diagram representing an example coding system 10, for example, a video coding system 10 (abbreviated as coding system 10) that can utilize the technology of the present application. The video encoder 20 (abbreviated as encoder 20) and video decoder 30 (abbreviated as decoder 30) of the video coding system 10 represent examples of devices that may be configured to perform technology according to the various examples described herein.

[0046] As shown in Figure 1A, the coding system 10 has a source device 12 configured to supply the encoded picture data 21 to, for example, a destination device 14 that decodes the encoded picture data 21.

[0047] The source device 12 has an encoder 20 and may also optionally have a picture source 16, a preprocessor (or preprocessing unit) 18, for example, a picture preprocessor 18, and a communication interface or communication unit 22.

[0048] The picture source 16 may have, or be, any kind of picture capturing device, e.g., a camera for capturing real-world pictures, and / or any kind of picture generating device, e.g., a computer graphics processor for generating computer-animated pictures, or any other kind of device for acquiring and / or supplying real-world pictures, computer-generated pictures (e.g., screen content, virtual reality (VR) pictures), and / or any combination thereof (e.g., augmented reality (AR) pictures). The picture source may be any kind of memory or storage for storing any of the above pictures.

[0049] To distinguish it from the processing performed by the preprocessor 18 and the preprocessing unit 18, the picture or picture data 17 may also be called a raw picture or raw picture data 17.

[0050] The preprocessor 18 is configured to receive (raw) picture data 17 and perform preprocessing on the picture data 17 to obtain a preprocessed picture 19 or preprocessed picture data 19. The preprocessing performed by the preprocessor 18 may include, for example, cropping, color format conversion (e.g., RGB to YCbCr), color correction, or noise reduction. It can be understood that the preprocessing unit 18 may be any component.

[0051] The video encoder 20 is configured to receive pre-processed picture data 19 and supply encoded picture data 21 (further details are described below, for example, based on Figure 2).

[0052] The communication interface 22 of the source device 12 may be configured to receive the encoded picture data 21 and transmit the encoded picture data 21 (or any further processed version thereof) to another device, such as the destination device 14 or any other device, via the communication channel 13 for storage or direct reconstruction.

[0053] The destination device 14 has a decoder 30 (for example, a video decoder 30), and may also optionally have a communication interface or communication unit 28, a post-processor 32 (or post-processing unit 32), and a display device 34.

[0054] The communication interface 28 of the destination device 14 is configured to receive the encoded picture data 21 (or any further processed version thereof) for example directly from the source device 12, or from some other source, for example, a storage device, for example, an encoded picture data storage device, and to supply the encoded picture data 21 to the decoder 30.

[0055] Communication interfaces 22 and 28 may be configured to transmit or receive encoded picture data 21 or encoded data 13 via a direct communication link between the source device 12 and the destination device 14, for example, via a direct wired or wireless connection, or via any kind of network, for example, a wired or wireless network or any combination thereof, or any kind of private and public network, or any kind of combination thereof.

[0056] The communication interface 22 may be configured, for example, to package the encoded picture data 21 into an appropriate format, such as a packet, and / or to process the encoded picture data using any kind of transmission coding or processing for transmission over a communication link or communication network.

[0057] A communication interface 28 forming a counterpart to communication interface 22 may be configured, for example, to process the transmitted data using any kind of corresponding transmission decoding or processing and / or unpackaging to receive transmitted data and obtain encoded picture data 21.

[0058] Both communication interfaces 22 and 28 may be configured as one-way or two-way communication interfaces, as indicated by the arrow for the communication channel 13 pointing from the source device 12 to the destination device 14 in Figure 1A, and may be configured to set up connections, for example, to send and receive messages, to acknowledge and exchange any other information relating to a communication link and / or data transmission, for example, encoded picture data transmission.

[0059] The decoder 30 is configured to receive the encoded picture data 21 and supply the decoded picture data 31 or the decoded picture 31 (further details are described below, for example, based on Figure 3 or Figure 5).

[0060] The post-processor 32 of the destination device 14 is configured to post-process the decoded picture data 31 (also called reconstructed picture data), for example, the decoded picture 31, in order to obtain the post-processed picture data 33, for example, the post-processed picture 33. The post-processing performed by the post-processing unit 32 may include, for example, color format conversion (e.g., YCbCr to RGB), color correction, cropping, or resampling, or any other processing to prepare the decoded picture data 31 for display, for example, by the display device 34.

[0061] The display device 34 of the destination device 14 is configured to receive post-processed picture data 33 for displaying the picture, for example, to a user or viewer. The display device 34 may have or may have any kind of display that represents the reconstructed picture, for example, an internal or external display or monitor. The display may have, for example, a liquid crystal display (LCD), an organic light-emitting diode (OLED) display, a plasma display, a projector, a microLED display, a liquid crystal on silicon (LCoS), a digital light processor (DLP), or any other kind of display.

[0062] Figure 1A shows the source device 12 and destination device 14 as separate devices, but the device embodiment may have both or both functions, i.e., the source device 12 or its corresponding function and the destination device 14 or its corresponding function. In such an embodiment, the source device 12 or its corresponding function and the destination device 14 or its corresponding function may be implemented using the same hardware and / or software, or by separate hardware and / or software, or any combination thereof.

[0063] As will be apparent to those skilled in the art based on the description, the functions of different units, or the presence and (strict) division of functions within the source device 12 and / or destination device 14 shown in Figure 1A, may vary depending on the actual device and application.

[0064] The encoder 20 (e.g., video encoder 20) or the decoder 30 (e.g., video decoder), or both the encoder 20 and the decoder 30, may be implemented using the processing circuitry shown in Figure 1B, such as one or more microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), discrete logic, hardware, or any combination thereof dedicated to video coding. The encoder 20 may be implemented using the processing circuitry 46 to embody the various modules discussed with respect to the encoder 20 in Figure 2 and / or any other encoder systems or subsystems described herein. The decoder 30 may be implemented using the processing circuitry 46 to embody the various modules discussed with respect to the decoder 30 in Figure 3 and / or any other decoder systems or subsystems described herein. The processing circuitry may be configured to perform various operations as described below. As shown in Figure 5, when the technology is partially implemented in software, the device may store instructions for the software in a suitable, non-temporary computer-readable storage medium and execute the instructions in hardware using one or more processors to perform the technology of the present disclosure. Either the video encoder 20 or the video decoder 30 may be incorporated as part of a composite encoder / decoder (CODEC) in a single device, for example, as shown in Figure 1B.

[0065] The source device 12 and destination device 14 may have any of the wide range of portable or stationary devices, such as notebook or laptop computers, mobile phones, smartphones, tablets or tablet computers, cameras, desktop computers, set-top boxes, television receivers, display devices, digital media players, video game consoles, video streaming devices (e.g., content service servers or content distribution servers), broadcast receiver devices, broadcast transmitter devices, etc., and may or may not use any type of operating system. In some cases, the source device 12 and destination device 14 may be equipped for wireless communication. Therefore, the source device 12 and destination device 14 may be wireless communication devices.

[0066] In some cases, the video coding system 10 shown in Figure 1A is merely an example, and the technology of the present invention may be applied to video coding configurations (e.g., video coding or video decoding) that do not necessarily involve any data communication between coding and decoding devices. In other examples, data may be retrieved from local memory or streamed over a network. A video coding device may code the data and store it in memory, and / or a video decoding device may retrieve the data from memory and decode it. In some examples, coding and decoding are performed by devices that do not communicate with each other, but simply code the data, store it in memory, and / or read the data from memory and decode it.

[0067] For convenience of description, embodiments of the present invention are described herein with reference to, for example, High-Efficiency Video Coding (HEVC) or Versatile Video Coding (VVC), a next-generation video coding standard developed by the Joint Collaboration Team on Video Coding (JCT-VC) of the ITU-T Video Coding Experts Group (VCEG) and the ISO / IEC Motion Picture Experts Group (MPEG). Those skilled in the art will understand that embodiments of the present invention are not limited to HEVC or VVC.

[0068] Encoder and encoding method Figure 2 shows a schematic block diagram of an example video encoder 20 configured to implement the technology of the present invention. In the example of Figure 2, the video encoder 20 has an input unit 201 (or input interface 201), a residual calculation unit 204, a conversion processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse conversion processing unit 212, a reconstruction unit 214, a loop filter unit 220, a decoding picture buffer (DPB) 230, a mode selection unit 260, an entropy coding unit 270, and an output unit 272 (or output interface 272). The mode selection unit 260 may include an inter-prediction unit 244, an intra-prediction unit 254, and a partitioning unit 262. The inter-prediction unit 244 may include a motion estimation unit and a motion compensation unit (not shown). The video encoder 20 shown in Figure 2 may also be called a hybrid video encoder or a video encoder that follows a hybrid video codec.

[0069] The residual calculation unit 204, the conversion processing unit 206, the quantization unit 208, and the mode selection unit 260 are sometimes said to form the forward signal path of the encoder 20, while the inverse quantization unit 210, the inverse conversion processing unit 212, the reconstruction unit 214, the buffer 216, the loop filter 220, the decoding picture buffer (DPB) 230, the inter-prediction unit 244, and the intra-prediction unit 254 are sometimes said to form the reverse signal path of the video encoder 20, and the reverse signal path of the video encoder 20 corresponds to the signal path of the decoder (see video decoder 30 in Figure 3). The inverse quantization unit 210, the inverse conversion processing unit 212, the reconstruction unit 214, the loop filter 220, the decoding picture buffer (DPB) 230, the inter-prediction unit 244, and the intra-prediction unit 254 are also said to form the “built-in decoder” of the video encoder 20.

[0070] Pictures and picture partitioning (pictures and blocks) The encoder 20 may be configured to receive, for example, a picture 17 (or picture data 17) via the input unit 202, for example, a picture in a sequence of pictures forming a video or video sequence. The received picture or picture data may also be a pre-processed picture 19 (or pre-processed picture data 19). For simplicity, the following description will refer to picture 17. Picture 17 may also be called the current picture or the picture to be coded (particularly in video coding to distinguish the current picture from other pictures, for example, previously coded and / or decoded pictures in the same video sequence, i.e., the video sequence that also contains the current picture).

[0071] A (digital) picture is, or can be considered, a two-dimensional array or matrix of samples having intensity values. A sample in an array may also be called a pixel (a shortened form of picture element) or pel. The number of samples in the horizontal and vertical directions (or axes) of the array or picture defines the size and / or resolution of the picture. For color representation, typically three color components are used; that is, a picture may represent or contain three sample arrays. In the RGB format or color space, a picture has corresponding red, green, and blue sample arrays. However, in video coding, each pixel is typically represented in a luminance and chrominance format or color space, for example, YCbCr, which has a luminance component represented by Y (sometimes L is used instead) and two chrominance components represented by Cb and Cr. The luminance (or abbreviated as luma) component Y represents brightness or gray level intensity (for example, as in a grayscale picture), while the two chrominance (or abbreviated as chroma) components Cb and Cr represent chromaticity or color information components. Thus, a picture in YCbCr format has a luminance sample array of luminance sample values ​​(Y) and two chrominance sample arrays of chrominance values ​​(Cb and Cr). A picture in RGB format may be converted to or from YCbCr format, and vice versa; this process is also known as color conversion or transformation. If the picture is monochrome, the picture may have only a luminance sample array. Thus, a picture may be, for example, an array of luma samples in a monochrome format, or an array of luma samples and two corresponding arrays of chroma samples in 4:2:0, 4:2:2, and 4:4:4 color formats.

[0072] Embodiments of the video encoder 20 may have a picture partitioning unit (not shown in Figure 2) configured to divide a picture 17 into a plurality of (usually non-overlapping) picture blocks 203. These blocks may also be called root blocks, macro blocks (H.264 / AVC), coding tree blocks (CTB), or coding tree units (CTU) (H.265 / HEVC and VVC). The picture partitioning unit may be configured to use a corresponding grid that defines the same block size and current block size for all pictures in the video sequence, or to change the current block size between pictures or subsets or groups of pictures, partitioning each picture into a corresponding block.

[0073] In a further embodiment, the video encoder may be configured to directly receive blocks 203 of picture 17, for example, one, some, or all of the blocks that make up picture 17. Picture blocks 203 may also be called the current picture block or the picture to be coded.

[0074] Like picture 17, picture block 203 is also smaller in dimensions than picture 17, but can be considered as a two-dimensional array or matrix of samples having intensity values ​​(sample values). That is, block 203 may have, for example, one sample array (e.g., a lumen array in the case of monochrome picture 17, or a lumen or chromen array in the case of a color picture), or three sample arrays (e.g., a lumen and two chromen arrays in the case of color picture 17), or any other number and / or type of arrays depending on the applied color format. The number of samples in the horizontal and vertical directions (or axes) of block 203 defines the size of block 203. Thus, the block may be, for example, an M×N (N rows M columns) array of samples, or an M×N array of conversion coefficients.

[0075] The embodiment of the video encoder 20 shown in Figure 2 may be configured to encode the picture 17 block by block, for example, encoding and prediction may be performed for each block 203.

[0076] The embodiment of the video encoder 20 shown in Figure 2 may be further configured to partition and / or encode a picture using slices (also called video slices), the picture may be partitioned or encoded using one or more slices (usually not overlapping), each slice may have one or more blocks (e.g., CTUs).

[0077] The embodiment of the video encoder 20 shown in Figure 2 may be further configured to partition and / or encode a picture by using tile groups (also called video tile groups) and / or tiles (also called video tiles), the picture may be partitioned or encoded using one or more tile groups (usually not overlapping), each tile may be, for example, rectangular in shape and may have one or more blocks (e.g., CTUs), for example, complete or partial blocks.

[0078] Residual calculation The residual calculation unit 204 may be configured to calculate the residual block 205 (also called residual 205) based on the picture block 203 and the prediction block 265 (further details regarding the prediction block 265 will be described later), for example, by subtracting the sample value of the prediction block 265 from the sample value of the picture block 203 for each sample (for each pixel) to obtain the residual block 205 in the sample region.

[0079] conversion The transformation processing unit 206 may be configured to apply a transformation, such as a discrete cosine transform (DCT) or discrete sine transform (DST), to the sample values ​​of the residual block 205 in order to obtain transformation coefficients 207 in the transformation domain. The transformation coefficients 207, also called transformation residual coefficients, may represent the residual block 205 in the transformation domain.

[0080] The conversion processing unit 206 may be configured to apply an integer approximation of DCT / DST, such as the conversion defined for H.265 / HEVC. Compared to the orthogonal DCT conversion, such an integer approximation is typically scaled by a specific coefficient. Additional scaling coefficients are applied as part of the conversion process to maintain the norm of the residual blocks processed by the forward and inverse conversions. The scaling coefficients are typically selected based on specific constraints, such as a scaling coefficient that is a power of 2 for the shift operation, the bit depth of the conversion coefficients, and the trade-off between precision and implementation cost. For example, a specific scaling coefficient may be defined for the inverse conversion by, for example, the inverse conversion processing unit 212 (and the corresponding inverse conversion by, for example, the inverse conversion processing unit 312 in the video decoder 30), and accordingly, a corresponding scaling coefficient for the forward conversion by, for example, the conversion processing unit 206 in the encoder 20 may be defined.

[0081] Embodiments of the video encoder 20 (individually, the conversion processing unit 206) may be configured to output conversion parameters, for example, the type of conversion or multiple conversions, either directly or encoded or compressed by the entropy encoding unit 270, so that the video decoder 30 can receive the conversion parameters and use them for decoding.

[0082] quantization The quantization unit 208 may be configured to quantize the transformation coefficient 207 to obtain a quantized coefficient 209, for example, by applying scalar quantization or vector quantization. The quantized coefficient 209 may also be called the quantized transformation coefficient 209 or the quantized residual coefficient 209.

[0083] The quantization process can reduce the bit depth associated with some or all of the 207 conversion coefficients. For example, n-bit conversion coefficients may be rounded down to m-bit conversion coefficients during quantization, where n is greater than m. The degree of quantization may be changed by adjusting the quantization parameter (QP). For example, for scalar quantization, different scaling may be applied to achieve finer or coarser quantization. Smaller quantization step sizes correspond to finer quantization, while larger quantization step sizes correspond to coarser quantization. Applicable quantization step sizes may be indicated by the quantization parameter (QP). The quantization parameter may be, for example, an index to a predefined set of applicable quantization step sizes. For example, a small quantization parameter may correspond to finer quantization (smaller quantization step size), a large quantization parameter may correspond to coarser quantization (larger quantization step size), and vice versa. Quantization may involve division by the quantization step size, and the corresponding and / or inverse inverse quantization by, for example, the inverse quantization unit 210 may involve multiplication by the quantization step size. Embodiments conforming to some standards, e.g., HEVC, may be configured to use quantization parameters to determine the quantization step size. Generally, the quantization step size can be calculated based on the quantization parameters using a fixed-point approximation of an equation involving division. Additional scaling factors may be introduced for quantization and inverse quantization to recover the norm of the residual block, which may be modified for scaling used in the fixed-point approximation of the equation for the quantization step size and quantization parameters. In one example implementation, the scaling of the inverse transform and inverse quantization may be combined. Alternatively, a customized quantization table may be used and transmitted from encoder to decoder, e.g., in a bitstream. Quantization is an irreversible operation, and the loss increases with increasing quantization step size.

[0084] Embodiments of the video encoder 20 (individually, a quantization unit 208) may be configured to output quantization parameters (QP), for example, directly or encoded by an entropy coding unit 270, so that a video decoder 30 can receive and apply the quantization parameters for decoding.

[0085] inverse quantization The inverse quantization unit 210 is configured to apply the inverse quantization of the quantization unit 208 to the quantized coefficients in order to obtain the inverse quantized coefficients 211, for example, by applying the inverse of the quantization scheme applied by the quantization unit 208, based on or using the same quantization step size as the quantization unit 208. The inverse quantized coefficients 211 are also called the inverse quantized residual coefficients 211 and are usually not the same as the transformed coefficients due to losses in quantization, but may correspond to the transformed coefficients 207.

[0086] Inverse Transform The inverse transform processing unit 212 is configured to apply the inverse transform of the transform applied by the transform processing unit 206, such as the inverse discrete cosine transform (DCT) or the inverse discrete sine transform (DST) or other inverse transform, in order to obtain the reconstructed residual block 213 (or the corresponding inverse quantized coefficient 213) in the sample region. The reconstructed residual block 213 may also be called the transform block 213.

[0087] Reconstruction The reconstruction unit 214 (e.g., an adder or summer 214) is configured to add the transformation block 213 (i.e., the reconstructed residual block 213) to the prediction block 265 in order to obtain the reconstructed block 215 in the sample region, for example, by adding the sample values ​​of the reconstructed residual block 213 and the prediction block 265 sample by sample.

[0088] filtering The loop filter unit 220 (abbreviated as "loop filter" 220) is configured to filter the reconstructed block 215 to obtain a filtered block 221, or more generally, to filter the reconstructed sample to obtain a filtered sample. The loop filter unit is configured, for example, to smooth pixel transitions or to improve video quality in other ways. The loop filter unit 220 may have one or more loop filters, such as a deblocking filter, a sample-adaptive offset (SAO) filter, or one or more other filters, such as a bilateral filter, an adaptive loop filter (ALF), a sharpening, smoothing filter, or a co-filter, or any combination thereof. In Figure 2, the loop filter unit 220 is shown as an in-loop filter, but in other configurations, the loop filter unit 220 may be implemented as a post-loop filter. The filtered block 221 may also be called a filtered reconstructed block 221.

[0089] Embodiments of the video encoder 20 (each a loop filter unit 220) may be configured to output loop filter parameters (e.g., sample-adaptive offset information), for example, directly or encoded by the entropy coding unit 270, so that a decoder 30 can receive the same loop filter parameters or each loop filter and apply them for decoding.

[0090] Decoded picture buffer The Decoded Picture Buffer (DPB) 230 may be a reference picture for encoding video data by the video encoder 20, or more generally, a memory for storing reference picture data. The DPB 230 may be formed from any of various memory devices, such as dynamic random access memory (DRAM) including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. The Decoded Picture Buffer (DPB) 230 may be configured to store one or more filtered blocks 221. The Decoded Picture Buffer 230 may be further configured to store other previously filtered blocks of the same current picture or of different pictures, e.g., a previously reconstructed picture, e.g., a previously reconstructed and filtered block 221, e.g., for interpretation, it may provide a complete, previously reconstructed, i.e., decoded picture (and corresponding reference blocks and samples) and / or a partially reconstructed current picture (and corresponding reference blocks and samples). The decoded picture buffer (DPB) 230 may also be configured to store, for example, one or more unfiltered reconstructed blocks 215, or generally, unfiltered reconstructed samples, or any other further processed versions of a reconstructed block or sample, if the reconstructed block 215 has not been filtered by the loop filter unit 220.

[0091] Mode selection (partitioning and prediction) The mode selection unit 260 has a partitioning unit 262, an inter-prediction unit 244, and an intra-prediction unit 254, and is configured to receive or acquire original picture data, e.g., the original block 203 (the current block 203 of the current picture 17), and reconstructed picture data, e.g., filtered and / or unfiltered reconstructed samples or blocks from, for example, the decoded picture buffer 230 or other buffers (e.g., line buffers, not shown) from the same (current) picture and / or one or more previously decoded pictures. The reconstructed picture data is used as reference picture data for predictions, e.g., inter-prediction or intra-prediction, to acquire prediction blocks 265 or predictors 265.

[0092] The mode selection unit 260 may be configured to determine or select partitioning for the current block prediction mode (without partitioning) and prediction mode (e.g., intra or inter-prediction mode), and to generate corresponding prediction blocks 265 used for calculating residual blocks 205 and for reconstructing reconstructed blocks 215.

[0093] Embodiments of the mode selection unit 260 may be configured to select a partitioning and prediction mode (for example, from those supported by or available for the mode selection unit 260) that yields the best match, i.e., minimum residual (minimum residual meaning better compression for transmission or storage), or minimum signaling overhead (minimum signaling overhead meaning better compression for transmission or storage), or that takes both into consideration or balances them. The mode selection unit 260 may be configured to determine the partitioning and prediction mode based on rate distortion optimization (RDO), i.e., to select a prediction mode that yields the lowest rate distortion. In this context, terms such as “best,” “minimum,” and “optimized” do not necessarily refer to the entire “best,” “minimum,” or “optimized,” but may refer to the achievement of termination or selection criteria such as values ​​above or below a threshold, or other constraints that reduce complexity and processing time, which may lead to a “second-best choice.”

[0094] In other words, the partitioning unit 262 may be configured to repeatedly use, for example, quadtree partitioning (QT), binary tree partitioning (BT), or ternary tree partitioning (TT), or any combination thereof, to divide the current block 203 into smaller block partitions or subblocks (which then form blocks again), and to perform predictions for each of the current block partitions or subblocks, where the mode selection involves selecting the tree structure of the partitioned block 203, and the prediction mode is applied to each of the block partitions or subblocks.

[0095] The following describes in more detail the partitioning (e.g., by the partitioning unit 262) and prediction processing (by the inter-prediction unit 244 and the intra-prediction unit 254) performed by the example video encoder 20.

[0096] Partitioning The partitioning unit 262 may now partition (or divide) block 203 into smaller partitions, for example, smaller blocks of a square or rectangular size. These smaller blocks (also called subblocks) may be further partitioned into even smaller partitions. This is also called tree partitioning or hierarchical tree partitioning. For example, the root block at root tree level 0 (hierarchical level 0, depth 0) may be recursively partitioned, for example, into two or more blocks at the next lower tree level, for example, into nodes at tree level 1 (hierarchical level 1, depth 1). These blocks may then be further partitioned into two or more blocks at the next lower level, for example, tree level 2 (hierarchical level 2, depth 2), until partitioning ends, for example, when a termination criterion is satisfied, for example, when the maximum tree depth or minimum block size is reached. Blocks that are not further partitioned are also called leaf blocks or leaf nodes of the tree. A tree partitioned into two partitions is called a binary tree (BT), a tree partitioned into three partitions is called a ternary tree (TT), and a tree partitioned into four partitions is called a quadary tree (QT).

[0097] As stated above, the term “block” as used herein may refer to a portion of a picture, particularly a square or rectangular portion. For example, with reference to HEVC and VVC, the current block is a coding tree unit (CTU), coding unit (CU), prediction unit (PU), and transformation unit (TU), and / or a corresponding block, such as a coding tree block (CTB), coding block (CB), transformation block (TB), or prediction block (PB), or may correspond to these.

[0098] For example, a coding tree unit (CTU) may be a CTB of a lumen sample of a picture having three sample arrays, two corresponding CTBs of a chroma sample, or a CTB of a sample of a monochrome picture or a picture coded using three separate color planes and the syntax structure used to code the sample. Accordingly, a coding tree block (CTB) may be an N×N block of samples for some value of N, such that the division of components into the CTB is partitioning. A coding unit (CU) may be a coding block of a lumen sample of a picture having three sample arrays, two corresponding coding blocks of a chroma sample, or a coding block of a sample of a monochrome picture or a picture coded using three separate color planes and the syntax structure used to code the sample. Accordingly, a coding block (CB) may be an M×N block of samples for some values ​​of M and N, such that the division of the CTB into the coding block is partitioning.

[0099] In an embodiment, for example, according to HEVC, a coding tree unit (CTU) may be partitioned into CUs by using a quadtree structure represented as a coding tree. The decision of whether to code a picture area using interpicture (time) or intrapicture (spatial) prediction is made at the CU level. Each CU may be further partitioned into one, two, or four PUs according to the PU partitioning type. Within a single PU, the same prediction process is applied, and the relevant information is sent to the decoder on a PU basis. After obtaining residual blocks by applying the prediction process based on the PU partitioning type, the CU may be partitioned into transformation units (TUs) according to other quadtree structures similar to coding trees for the CUs.

[0100] In some embodiments, partitioning, which is a quadtree-binary tree composite (QTBT), is used to partition coding blocks, for example, according to the latest video coding standard currently under development called Versatile Video Coding (VVC). In the QTBT block structure, CUs can have either a square or rectangular shape. For example, a coding tree unit (CTU) is first partitioned by a quadtree structure. The quadtree leaf nodes are further partitioned by a binary tree or ternary (or triple) tree structure. The partitioned tree leaf nodes are called coding units (CUs), and their segmentation is used for prediction and transformation processing without further partitioning. This means that CUs, PUs, and TUs have the same block size in the QTBT coding block structure. At the same time, multiple partitions, such as triple tree partitions, may also be used with the QTBT block structure.

[0101] In one example, the mode selection unit 260 of the video encoder 20 may be configured to perform any combination of the partitioning techniques described herein.

[0102] As described above, the video encoder 20 is configured to determine or select the best or most optimal prediction mode from a set of (predetermined) prediction modes. The set of prediction modes may include, for example, an intra-prediction mode and / or an inter-prediction mode.

[0103] Intra Prediction The set of intra-prediction modes may have 35 different intra-prediction modes, for example, omnidirectional modes such as DC (or average) mode and planar mode, or directional modes such as those defined in HEVC, or it may have 67 different intra-prediction modes, for example, omnidirectional modes such as DC (or average) mode and planar mode, or directional modes such as those defined in VVC.

[0104] The intra-prediction unit 254 is configured to use reconfigured samples of adjacent blocks of the same current picture to generate an intra-prediction block 265 according to a certain intra-prediction mode in a set of intra-prediction modes.

[0105] The intra-prediction unit 254 (or generally, the mode selection unit 260) is further configured to output intra-prediction parameters (or generally, information indicating the selected intra-prediction mode for the current block) in the form of syntax elements 266 to the entropy coding unit 270 for inclusion in the encoded picture data 21, for example, so that the video decoder 30 can receive the prediction parameters and use them for decoding.

[0106] Interpretation The possible sets of interpretation modes depend on the available reference picture (i.e., a previous, at least partially decoded picture stored in DPB230, for example) and other interpretation parameters, such as whether the entire reference picture or only a portion of the reference picture, for example, the search window area around the area of ​​the current block, is used to find the reference block that shows the best match, and / or whether pixel interpolation, such as half / semi-per and / or quarter-per interpolation, is applied.

[0107] In addition to the prediction modes described above, skip mode and / or direct mode may also be applied.

[0108] The interpretation unit 244 may include a motion estimation (ME) unit and a motion compensation (MC) unit (neither of which are shown in Figure 2). The motion estimation unit may be configured to receive or acquire for motion estimation a picture block 203 (the current picture block 203 of the current picture 17) and a decoded picture 231, or at least one or more previously reconstructed blocks, e.g., one or more other / different reconstructed blocks of previously decoded pictures 231. For example, a video sequence may have a current picture and a previously decoded picture 231, i.e., in other words, the current picture and the previously decoded picture 231 may be part of a sequence of pictures that make up the video sequence, or may form a sequence of pictures.

[0109] The encoder 20 may be configured, for example, to select a reference block from multiple reference blocks of the same or different pictures among multiple other pictures, and to supply the reference picture (or reference picture index) and / or the position (x, y coordinates) of the reference block and the offset (spatial offset) between the current block's position to the motion estimation unit as interpretation parameters. This offset is also called the motion vector (MV).

[0110] The motion compensation unit is configured to acquire, for example, interprediction parameters, receive them, and perform interprediction based on or using the interprediction parameters to acquire interprediction blocks 265. Motion compensation performed by the motion compensation unit may involve fetching or generating prediction blocks based on motion / block vectors determined by motion estimation, and optionally performing interpolation to sub-pixel precision. Interpolation filtering may generate additional pixel samples from known pixel samples, thus optionally increasing the number of candidate prediction blocks that can be used to code picture blocks. Now receiving motion vectors for the picture block PU, the motion compensation unit may find the prediction block pointed to by the motion vectors in one of the reference picture lists.

[0111] The motion compensation unit may also generate the current block and the syntax elements associated with the video slice, which are used by the video decoder 30 when decoding the picture block of the video slice. In addition to, or instead of, the slice and each syntax element, tile groups and / or tiles and each syntax element may be generated or used.

[0112] Entropic coding The entropy coding unit 270 is configured to apply, or bypass (uncompress) an entropy coding algorithm or scheme (e.g., variable-length coding (VLC) scheme, context-adaptive VLC scheme (CAVLC), arithmetic coding scheme, binarization, context-adaptive binary arithmetic coding (CABAC), syntax-based context-adaptive binary arithmetic coding (SBAC), stochastic interval partitioning entropy (PIPE) coding, or other entropy coding method or technique) to quantized coefficients 209, inter-prediction parameters, intra-prediction parameters, loop filter parameters and / or other syntax elements in order to obtain encoded picture data 21 that can be output, for example, in the form of an encoded bitstream 21 via the output unit 272, so that, for example, the video decoder 30 can receive the parameters and use them for decoding. The encoded bitstream 21 may be sent to the video decoder 30 or stored in memory for later transmission or reading by the video decoder 30.

[0113] Other structural variations of the video encoder 20 may be used to encode video streams. For example, a non-conversion based encoder 20 can directly quantize the residual signal for a particular block or frame without relying on a conversion processing unit 206. In other implementations, the encoder 20 may have a quantization unit 208 and an inverse quantization unit 210 combined into a single unit.

[0114] Decoder and decoding method Figure 3 shows an example of a video decoder 30 configured to implement the technology of the present invention. The video decoder 30 is configured to receive encoded picture data 21 (e.g., encoded bitstream 21), encoded by, for example, the encoder 20, in order to obtain a decoded picture 331. The encoded picture data or bitstream includes information for decoding the encoded picture data, for example, data representing picture blocks and associated syntax elements of the encoded video slice.

[0115] In the example in Figure 3, the decoder 30 includes an entropy decoding unit 304, an inverse quantization unit 310, an inverse transformation unit 312, a reconstruction unit 314 (e.g., an aggregater 314), a loop filter 320, a decoded picture buffer (DPB) 330, a mode application unit 360, an interpretation unit 344, and an intraprediction unit 354. The interpretation unit 344 is or may include a motion compensation unit. In some examples, the video decoder 30 may perform a decoding path that is generally the reverse of the encoding path described with respect to the video encoder 20 in Figure 2.

[0116] As described with respect to encoder 20, the inverse quantization unit 210, inverse processing unit 212, reconstruction unit 214, loop filter 220, decoding picture buffer (DPB) 230, inter-prediction unit 244, and intra-prediction unit 254 are also said to form the “built-in decoder” of video encoder 20. Therefore, the inverse quantization unit 310 may be functionally the same as the inverse quantization unit 210, the inverse processing unit 312 may be functionally the same as the inverse processing unit 212, the reconstruction unit 314 may be functionally the same as the reconstruction unit 214, the loop filter 320 may be functionally the same as the loop filter 220, and the decoding picture buffer 330 may be functionally the same as the decoding picture buffer 230. Accordingly, the descriptions given for each unit and function of video encoder 20 also apply correspondingly to each unit and function of video decoder 30.

[0117] Entropy decoding The entropy decoding unit 304 is configured to parse the bitstream 21 (or generally, the encoded picture data 21) and perform, for example, entropy decoding on the encoded picture data 21 to obtain, for example, quantized coefficients 309 and / or decoded coding parameters (not shown in Figure 3), for example, inter-prediction parameters (e.g., reference picture index and motion vector), intra-prediction parameters (e.g., intra-prediction mode or index), transformation parameters, quantization parameters, loop filter parameters, and / or other syntax elements, or any or all of them. The entropy decoding unit 304 may be configured to apply a decoding algorithm or scheme corresponding to the coding scheme described with respect to the entropy coding unit 270 of the encoder 20. The entropy decoding unit 304 may be further configured to supply the inter-prediction parameters, intra-prediction parameters, and / or other syntax elements to the mode application unit 360 and the other parameters to other units of the decoder 30. The video decoder 30 may receive syntax elements at the video slice level and / or video block level. In addition to slices and their respective syntax elements, groups and / or tiles and their respective syntax elements may be received and / or used.

[0118] inverse quantization The inverse quantization unit 310 may be configured to receive quantization parameters (QP) (or generally information about inverse quantization) and quantized coefficients from the encoded picture data 21 (for example, by parsing and / or decoding by the entropy decoding unit 304), and to apply inverse quantization to the decoded quantized coefficients 309 based on the quantization parameters to obtain inverse quantized coefficients 311, which may also be called transformed coefficients 311. The inverse quantization process may include using quantization parameters determined by the video encoder 20 for each video block in the video slice to determine the degree of quantization and, likewise, the degree of inverse quantization to be applied.

[0119] Inverse Transform The inverse transformation processing unit 312 may be configured to receive inversely quantized coefficients 311, also called transformation coefficients 311, and to apply a transformation to the inversely quantized coefficients 311 in order to obtain a reconstructed residual block 313 in the sample region. The reconstructed residual block 313 may also be called a transformation block 313. The transformation may be an inverse transformation, such as an inverse DCT, inverse DST, inverse integer transformation, or a conceptually similar inverse transformation process. The inverse transformation processing unit 312 may be further configured to receive transformation parameters or corresponding information from the encoded picture data 21 (for example, by parsing and / or decoding by the entropy decoding unit 304) in order to determine the transformation to be applied to the inversely quantized coefficients 311.

[0120] Reconstruction The reconstruction unit 314 (for example, an adder or summer 314) may be configured to add the reconstructed residual block 313 to the prediction block 365, for example, by adding the sample values ​​of the reconstructed residual block 313 to the sample values ​​of the prediction block 365, thereby obtaining the reconstructed block 315 in the sample region.

[0121] filtering The loop filter unit 320 (either within or after the coding loop) is configured to filter the reconstructed block 315 to obtain a filtered block 321, for example, to smooth pixel transitions or to otherwise improve video quality. The loop filter unit 320 may have one or more loop filters, such as a deblocking filter, a sample-adaptive offset (SAO) filter, or one or more other filters, such as a bilateral filter, an adaptive loop filter (ALF), a sharpening, smoothing, or co-filter, or any combination thereof. Although the loop filter unit 320 is shown as an in-loop filter in Figure 3, in other configurations, the loop filter unit 320 may be implemented as a post-loop filter.

[0122] Decoded picture buffer The decoded video block 321 of the picture is then stored in the decoded picture buffer 330. The decoded picture buffer 330 stores the decoded picture 331 as a reference picture for subsequent motion compensation of other pictures and / or for outputting their respective displays.

[0123] The decoder 30 is configured to output the decoded picture 331 to the user for presentation or viewing, for example, via the output unit 332.

[0124] prediction The inter-prediction unit 344 may be the same as the inter-prediction unit 244 (in particular, the motion compensation unit), and the intra-prediction unit 354 may be functionally the same as the intra-prediction unit 254, and perform partitioning or partitioning decisions and predictions based on partitioning and / or prediction parameters, or each piece of information, received from the encoded picture data 21 (for example, by parsing and / or decoding by the entropy decoding unit 304). The mode application unit 360 may be configured to obtain a predicted block 365 by performing block-by-block predictions (intra or inter-predictions) based on the reconstructed picture, block, or each sample (filtered or unfiltered).

[0125] When a video slice is coded as an intra-coded (I) slice, the intra-prediction unit 354 of the mode application unit 360 is configured to generate a prediction block 365 for the picture block of the current video slice based on the notified intra-prediction mode and data from blocks decoded prior to the current picture. When a video picture is coded as an inter-coded (i.e., B or P) slice, the inter-prediction unit 344 (e.g., motion compensation unit) of the mode application unit 360 is configured to generate a prediction block 365 for the video block of the current video slice based on motion vectors and other syntax elements received from the entropy decoding unit 304. In the case of inter-prediction, the prediction block may be generated from one of the reference pictures in one of the reference picture lists. The video decoder 30 may configure reference frame lists List 0 and List 1 using default configuration techniques based on the reference pictures stored in the DPB 330. The same or similar may apply to or by embodiments that use tile groups (e.g., video tile groups) and / or tiles (e.g., video tiles) in addition to or instead of slices (e.g., video slices), for example, video may be coded using I, P, or B tile groups and / or tiles.

[0126] The mode application unit 360 is configured to determine prediction information about the video blocks of the current video slice by parsing motion vectors or related information and other syntax elements, and to use the prediction information to generate prediction blocks for the current video blocks being decoded. For example, in order to decode the video blocks in the current video slice, the mode application unit 360 uses some of the received syntax elements to determine the prediction mode used to code the video blocks of the video slice (e.g., intra or inter-predict), the inter-predict slice type (e.g., B-slice, P-slice, or GPB-slice), configuration information for one or more of the slice's reference picture lists, motion vectors for each inter-coded video block of the slice, the inter-predict status for each inter-coded video block of the slice, and other information. The same or similar may be applied for or by embodiments that use tile groups (e.g., video tile groups) and / or tiles (e.g., video tiles) in addition to or instead of slices (e.g., video slices), for example, video may be coded using I, P, or B tile groups and / or tiles.

[0127] The embodiment of the video decoder 30 shown in Figure 3 may be configured to partition and / or decode a picture using slices (also called video slices). The picture may be partitioned or decoded using one or more slices (usually not overlapping), each slice may have one or more blocks (e.g., CTUs).

[0128] The embodiment of the video decoder 30 shown in Figure 3 may be configured to partition and / or decode a picture using tile groups (also called video tile groups) and / or tiles (also called video tiles), the picture may be partitioned or decoded using one or more tile groups (usually not overlapping), each tile group may have, for example, one or more blocks (e.g., CTUs) or one or more tiles, each tile may be, for example, rectangular in shape and may have one or more blocks (e.g., CTUs), for example, complete or partial blocks.

[0129] Other variations of the video decoder 30 may be used to decode encoded picture data 21. For example, the decoder 30 can generate an output video stream without a loop filtering unit 320. For example, a non-transformation based decoder 30 can directly dequantize the residual signal for a particular block or frame without an inverse transformation processing unit 312. In other implementations, the video decoder 30 may have an inverse quantization unit 310 and an inverse transformation processing unit 312 combined into a single unit.

[0130] It should be understood that in encoder 20 and decoder 30, the processing result of the current step may be further processed and then output to the next step. For example, after interpolation filtering, motion vector derivation, or loop filtering, further operations such as clipping or shifting may be performed on the processing result of interpolation filtering, motion vector derivation, or loop filtering.

[0131] It should be noted that further operations may be applied to the derived motion vectors of the current block (including, but not limited to, the affine mode control point motion vectors, affine, planar, sub-block motion vectors in the ATMVP mode, temporal motion vectors, etc.). For example, the value of the motion vector is constrained within a predefined range according to its representation bits. When the representation bit of the motion vector is bitDepth, the range is -2^(bitDepth - 1) to 2^(bitDepth - 1) - 1, where "^" means exponentiation. For example, when bitDepth is set equal to 16, the range is -32768 to 32767, and when bitDepth is set equal to 18, the range is -131072 to 131071. For example, the value of the derived motion vector (e.g., the MV of 4 4×4 sub-blocks within one 8×8 block) is constrained such that the maximum difference between the integer parts of the 4 4×4 sub-block MVs is no more than N pixels, e.g., no more than 1 pixel. Here, two methods for constraining the motion vector according to bitDepth are provided.

[0132] Method 1: Exclude the overflow MSB (Most Significant Bit) by the following operation ux = (mvx + 2<![CDATA[ bitDepth ]]>) % 2<![CDATA[ bitDepth ]]>(1) [[ID=!14]]mvx = (ux >= 2<![CDATA[ bitDepth-1 ]]>)? (ux - 2<![CDATA[ bitDepth ]]>): ux (2) uy = (mvy + 2<![CDATA[ bitDepth ]]>) % 2<![CDATA[ bitDepth ]]>(3) mvy = (uy >= 2<![CDATA[ bitDepth-1 ]]>)? (uy - 2<![CDATA[ bitDepth ]]>): uy (4) Here, mvx is the horizontal component of the motion vector of an image block or subblock, mvy is the vertical component of the motion vector of an image block or subblock, and ux and uy represent the intermediate values. For example, if the value of mvx is -32769, the resulting value after applying equations (1) and (2) is 32767. In computer systems, decimal numbers are stored as two's complement. The two's complement of -32769 is 1,0111,1111,1111,1111 (17 bits), and in this case the MSB is discarded, so the resulting two's complement is 0111,1111,1111,1111 (decimal number is 32767), which is the same as the output by applying equations (1) and (2). ux=(mvpx+mvdx+2 bitDepth )%2 bitDepth (5) mvx=(ux>=2 bitDepth-1 )?(ux-2 bitDepth ):ux (6) uy=(mvpy+mvdy+2 bitDepth )%2 bitDepth (7) mvy=(uy>=2 bitDepth-1 )?(uy-2 bitDepth ):uy (8) As shown in equations (5) through (8), the operation may be applied during the summation of mvp and mvd.

[0133] Method 2: Remove overflow MSB by clipping the value vx=Clip3(-2 bitDepth-1 ,2 bitDepth-1 -1,vx) vy=Clip3(-2 bitDepth-1 ,2 bitDepth-1 -1, vy) Here, vx is the horizontal component of the motion vector of an image block or subblock, vy is the vertical component of the motion vector of an image block or subblock, x, y, and z correspond to the three input values ​​of the MV clipping process, respectively, and the definition of the function Clip3 is as follows:

number

[0134] Figure 4 is a schematic diagram of a video coding device 400 according to an embodiment of the present disclosure. The video coding device 400 is suitable for implementing the embodiments of the disclosure described herein. In the embodiment, the video coding device 400 may be a decoder, such as the video decoder 30 in Figure 1A, or an encoder, such as the video encoder 20 in Figure 1A.

[0135] The video coding device 400 includes an inlet port 410 (or input port 410) and a receiver unit (Rx) 420 for receiving data, a processor, logic unit, or central processing unit (CPU) 430 for processing data, a transmitter unit (Tx) 440 and an exit port 450 (or output port 450) for transmitting data, and memory 460 for storing data. The video coding device 400 may also have optoelectronic (OE) components and electrooptic (EO) components coupled to the inlet port 410, receiver unit 420, transmitter unit 440, and exit port 450 for the input or output of optical or electrical signals.

[0136] The processor 430 is implemented by hardware and software. The processor 430 may be implemented as one or more CPU chips, cores (e.g., as a multi-core processor), FPGAs, ASICs, and DSPs. The processor 430 communicates with an inlet port 410, a receiver unit 420, a transmitter unit 440, an exit port 450, and memory 460. The processor 430 has a coding module 470. The coding module 470 implements the disclosed embodiments described above. For example, the coding module 470 implements, processes, prepares, or provides various coding operations. The inclusion of the coding module 470 thus results in a substantial improvement to the functionality of the video coding device 400 and achieves transformations of the video coding device 400 to different states. Alternatively, the coding module 470 is implemented as instructions stored in memory 460 and executed by the processor 430.

[0137] Memory 460 may have one or more disks, tape drives, and solid-state drives, and may be used as an overflow data storage device to store programs when such programs are selected for execution, and to store instructions and data to be read during program execution. Memory 460 may be, for example, volatile and / or non-volatile, and may be read-only memory (ROM), random-access memory (RAM), tri-associative memory (TCAM), and / or static random-access memory (SRAM).

[0138] Figure 5 is a schematic block diagram of a device 500 that can be used as either or both of the source device 12 and destination device 14 in Figure 1, according to an exemplary embodiment.

[0139] The processor 502 within the apparatus 500 may be a central processing unit. Alternatively, the processor 502 may be any other type of device or multiple devices currently existing or to be developed that are capable of manipulating or processing information. The disclosed implementation may be carried out with a single processor, e.g., processor 502, as shown, but speed and efficiency advantages may be achieved using more than one processor.

[0140] The memory 504 within the device 500 may in practice be a read-only memory (ROM) device or a random-access memory (RAM) device. Any other suitable type of storage device may be used as memory 504. Memory 504 may contain code and data 506 accessed by the processor 502 using the bus 512. Memory 504 may further contain an operating system 508 and an application program 510, the application program 510 containing at least one program that enables the processor 502 to perform the method described herein. For example, the application program 510 may contain applications 1 to N, further including a video coding application that performs the method described herein.

[0141] The device 500 may also include one or more output devices, such as a display 518. In one example, the display 518 may be a touch-sensitive display that combines a display with a touch-sensing element that is operable to detect touch input. The display 518 may be coupled to the processor 502 via the bus 512.

[0142] Although represented here as a single bus, the bus 512 of device 500 may consist of multiple buses. Furthermore, the secondary storage device 514 may be directly coupled to other components of device 500 or be accessible via a network, and may have a single integrated unit such as a memory card or multiple units such as multiple memory cards. In this way, device 500 can be implemented in a wide variety of configurations.

[0143] Intra-prediction of chroma samples may be performed using reconstructed ruma block samples.

[0144] During the development of HEVC, a cross-component linear model (CCLM) chromatic intra-prediction was proposed [J. Kim, S.-W. Park, J.-Y. Park, and B.-M. Jeon, Intra Chroma Prediction Using Inter-Channel Correlation, document JCTVC-B021, July 2010]. CCLM uses linear correlations between chroma and lumen samples at corresponding positions within a coding block. When a chroma block is coded using CCLM, the linear model is derived by linear regression from reconstructed adjacent lumen and chroma samples. The chroma samples in the current block can then be predicted by the reconstructed lumen samples in the current block using the derived linear model (illustrated in Figure 6): C(x,y) = α × L(x,y) + β Here, C and L represent the chroma value and lumen value, respectively. The parameters α and β are derived by the least squares method as follows: α = R(L,C) / R(L,L) β = M(C) - α × M(L) Here, M(A) represents the mean of A, and R(A,B) is defined as follows: R(A,B) = M((AM(A)) × (BM(B)))

[0145] If the encoded or decoded picture has a format that specifies different numbers of samples for the lumens and chroma components (e.g., 4:2:0 YCbCr format), the lumens samples are downsampled before modeling and prediction.

[0146] The method is adopted for use with VTM2.0. Specifically, parameter derivation is performed as follows:

number

[0147] Figure 8 shows the locations of the current block samples and the left and top causal samples involved in CCLM when the YCbCr 4:4:4 chroma format is used.

[0148] To perform cross-component prediction, for the 4:2:0 chroma format, the reconstructed chroma blocks must be downsampled to match the size of the chroma sample or multiple chroma samples or chroma block. The default downsampling filters used in CCLM mode are as follows: Rec' L [x,y]=(2×Rec L [2x,2y]+2×Rec L [2x, 2y+1] + Rec L [2x-1,2y]+Rec L [2x+1,2y]+Rec L [2x-1,2y+1]+Rec L [2x+1,2y+1]+4)>>3 Note that this downsampling assumes a "type 0" phase relationship between the chroma sample position and the lumana sample position, i.e., collated sampling horizontally and interstitial sampling vertically. The 6-tap downsampling shown in Figure 9 is used as the default filter for both single-model CCLM mode and multiple-model CCLM mode. The spatial positions of the samples used by the 6-tap downsampling filter are shown in Figure 9. Samples 901, 902, and 903 have weights of 2, 1, and 0, respectively.

[0149] The following formula is used when a luma sample is on a block boundary and the adjacent blocks above and to the left are unavailable: If y=0 and the row is the first row of the CTU, and x=0, and the adjacent blocks to the left and above are unavailable, then Rec' L [x,y]=Rec L [2x, 2y] If y=0 and the row is the first row of the CTU, and the adjacent block above is unavailable, then Rec' L [x,y]=(2×Rec L [2x,2y]+Rec L[2x-1,2y]+RecL[2x+1,2y]+2)>>2, If x=0 and the adjacent blocks to the left and above are unavailable, then Rec' L [x,y]=(Rec L [2x,2y]+Rec L [2x, 2y+1]+1)>>1

[0150] Figures 10A and 10B show the chroma component positions in the case of a 4:2:0 sampling scheme. Naturally, the same can be said for other sampling schemes.

[0151] When considering the sampling of lumern and chroma components in a 4:2:0 sampling scheme, it is known that a shift can exist between the lumern and chroma component grids. In a 2x2 pixel block, the chroma component is actually shifted vertically by half a pixel compared to the lumern component (as shown in Figure 10A). Such a shift can affect the interpolation filter when downsampling from 4:4:4 or when upsampling. Figure 10B shows various sampling patterns for interlaced images. This means that parity, i.e., whether a pixel lies in the upper or lower field of the interlaced image, is also taken into consideration.

[0152] As proposed in [P. Hanhart, Y. He, “CE3: Modified CCLM downsampling filter for “type-2” content (Test 2.4)”, Input document JVET-M0142 to the 13th JVET Meeting in Marrakech, Morocco, January 2019] and included in the VVC specification draft (version 4), the following downsampling filter is applied to the lumens for linear model determination and prediction in CCLM to avoid alignment mismatches between chroma samples and downsampled lumens for “type-2” content: [Table 1]

[0153] These changes are not applied at the upper CTU boundary to avoid increasing the number of line buffers. Downsampling filter selection is controlled by the SPS flag sps_cclm_colocated_chroma_flag. When the value of sps_cclm_colocated_chroma_flag is 0 or FALSE, the downsampling filter is applied to the luma for linear model determination and prediction; when the value of sps_cclm_colocated_chroma_flag is 1 or TRUE, the downsampling filter is not applied to the luma for linear model determination and prediction.

[0154] As described above, the boundary lumern reconstruction sample L() used to derive the linear model parameters is the filtered lumern sample Rec' L Subsampled from [x,y]. [Table 2]

[0155] The lumar sample filtering and subsampling processes are described in section 8.3.4.2.8 of the VVC specification.

[0156] 8.3.4.2.8. Specifications for INTRA_LT_CCLM, INTRA_L_CCLM, and INTRA_T_CCLM intra-prediction modes The inputs to this process are: - Intra predictive mode predModeIntra, - The sample position (xTbC, yTbC) of the top-left sample of the current transformation block relative to the top-left sample of the current picture. - Variable nTbW that specifies the width of the transformation block, - Variable nTbH that specifies the height of the transformation block, - These are chromatic adjacent samples p[x][y] where x=-1, y=0..2*nTbH-1 and x=0..2*nTbW-1, y=-1. The output of this process is predSamples[x][y] where x=0..nTbW-1, y=0..nTbH-1. The current luma position (xTbY, yTbY) is derived as follows: (xTbY,yTbY)=(xTbC<<1,yTbC<<1) (8-155) The variables availL, availT, and availTL are derived as follows: - The process for deriving the availability of the left adjacent sample in a block is invoked using the current chroma position (xCurr, yCurr) and the adjacent chroma position (xTbC-1, yTbC), which are set to (xTbC, yTbC), as inputs, and the output is assigned to availL. - The process for deriving the availability of the upper adjacent sample in a block is invoked using the current chroma position (xCurr, yCurr) and the adjacent chroma position (xTbC, yTbC-1), which are set to (xTbC, yTbC), as inputs, and the output is assigned to availT. - The process for deriving the availability of the upper-left adjacent sample in a block is invoked using the current chroma position (xCurr, yCurr) and the adjacent chroma position (xTbC-1, yTbC-1), which are set to (xTbC, yTbC), as input, and the output is assigned to availTL. - The number of available top-right adjacent chroma samples, numTopRight, is derived as follows: - The variable numTopRight is set to equal to 0, and availTR is set to equal to TRUE. - When predModeIntra is equal to INTRA_T_CCLM, for x = nTbW..2*nTbW-1, the following applies until availTR is equal to FALSE or x is equal to 2*nTbW-1: - The block availability derivation process is invoked using the current chroma position (xCurr, yCurr) and the adjacent chroma position (xTbC+x, yTbC-1), which are set to (xTbC, yTbC), as inputs, and the output is assigned to availTR. - When availTR is equal to TRUE, numTopRight is incremented by 1. - The number of available lower-left adjacent chroma samples, numLeftBelow, is derived as follows: - The variable numLeftBelow is set to equal to 0, and availLB is set to equal to TRUE. - When predModeIntra is equal to INTRA_L_CCLM, for y=nTbH..2*nTbH-1, the following applies until availLB is equal to FALSE or y is equal to 2*nTbH-1: - The block availability derivation process is invoked using the current chroma position (xCurr, yCurr) and the adjacent chroma position (xTbC-1, yTbC+y), which are set to (xTbC, yTbC), as inputs, and the output is assigned to availLB. - When availLB is equal to TRUE, numLeftBelow is incremented by 1. The number of available adjacent chromatic samples at the top and upper right, numSampT, and the number of available adjacent chromatic samples at the left and lower left, numSampL, are derived as follows: - When predModeIntra is equal to INTRA_LT_CCLM, the following applies: numSampT=availT?nTbW:0 (8-156) numSampL=availL?nTbH:0 (8-157) - Otherwise, the following applies: numSampT = (availT && predModeIntra == INTRA_T_CCLM)? (nTbW + numTopRight) : 0 (8 - 158) numSampL = (availL && predModeIntra == INTRA_L_CCLM)? (nTbH + numLeftBelow) : 0 (8 - 159) The variable bCTUboundary is derived as follows: bCTUboundary = (yTbC & (1 << (CtbLog2SizeY - 1) - 1) == 0)? TRUE : FALSE (8 - 160) The prediction samples predSamples[x][y] with x = 0..nTbW - 1, y = 0..nTbH - 1 are derived as follows: - If both numSampL and numSampT are equal to 0, the following applies: predSamples[x][y] = 1 << (BitDepth C - 1) (8 - 161) - Otherwise, the following ordered steps apply: 1. The luma samples pY[x][y] at the same position with x = 0..nTbW * 2 - 1, y = 0..nTbH * 2 - 1 are set equal to the reconstructed luma samples before the deblocking filter process at position (xTbY + x, yTbY + y). 2. The adjacent luma samples pY[x][y] are derived as follows: - When numSampL is greater than 0, the adjacent left luma samples pY[x][y] where x = -1..-3 and y = 0..2*numSampL - 1 are set equal to the reconstructed luma samples before the deblocking filter process at the position (xTbY + x, yTbY + y). - When numSampT is greater than 0, the adjacent upper luma samples pY[x][y] where x = 0..2*numSampT - 1 and y = -1, -2 are set equal to the reconstructed luma samples before the deblocking filter process at the position (xTbY + x, yTbY + y). - When availTL is equal to TRUE, the adjacent upper left luma samples pY[x][y] where x = -1 and y = -1, -2 are set equal to the reconstructed luma samples before the deblocking filter process at the position (xTbY + x, yTbY + y). 3. The downsampled luma samples pDsY[x][y] at the same position where x = 0..nTbW - 1 and y = 0..nTbH - 1 are derived as follows: - When sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - For pDsY[x][y] where x = 1..nTbW - 1 and y = 1..nTbH - 1, it is derived as follows: pDsY[x][y]=(pY[2*x][2*y - 1]+pY[2*x - 1][2*y]+4*pY[2*x][2*y]+pY[2*x + 1][2*y]+pY[2*x][2*y + 1]+4)>>3 (8 - 162) - When availL is equal to TRUE, for pDsY[0][y] where y = 1..nTbH - 1, it is derived as follows: pDsY[0][y]=(pY[0][2*y - 1]+pY[-1][2*y]+4*pY[0][2*y]+pY[1][2*y]+pY[0][2*y + 1]+4)>>3 (8 - 163) - Otherwise, pDsY[0][y], where y=1..nTbH-1, is derived as follows: pDsY[0][y]=(pY[0][2*y-1]+2*pY[0][2*y]+pY[0][2*y+1]+2)>>2 (8-164) - If availT is equal to TRUE, then pDsY[x][0] where x=1..nTbW-1 is derived as follows: pDsY[x][0]=(pY[2*x][-1]+pY[2*x-1][0]+4*pY[2*x][0]+pY[2*x+1][0]+pY[2*x][1]+4)>>3 (8-165) - Otherwise, pDsY[x][0] where x=1..nTbW-1 is derived as follows: pDsY[x][0]=(pY[2*x-1][0]+2*pY[2*x][0]+pY[2*x+1][0]+2)>>2 (8-166) - If availL is equal to TRUE and availT is equal to TRUE, then pDsY[0][0] is derived as follows: pDsY[0][0]=(pY[0][-1]+pY[-1][0]+4*pY[0][0]+pY[1][0]+pY[0][1]+4)>>3 (8-167) - Instead, if availL is equal to TRUE and availT is equal to FALSE, then pDsY[0][0] is derived as follows: pDsY[0][0]=(pY[-1][0]+2*pY[0][0]+pY[1][0]+2)>>2 (8-168) - Instead, if availL is equal to FALSE and availT is equal to TRUE, then pDsY[0][0] is derived as follows: pDsY[0][0]=(pY[0][-1]+2*pY[0][0]+pY[0][1]+2)>>2 (8-169) - In the other case (where availL is equal to FALSE and availT is equal to FALSE), pDsY[0][0] is derived as follows: pDsY[0][0]=pY[0][0] (8-170) - In other cases, the following applies: - Let x=1..nTbW-1, y=0..nTbH-1. The pDsY[x][y] can be derived as follows: pDsY[x][y]=(pY[2*x-1][2*y]+pY[2*x-1][2*y+1]+2*pY[2*x][2*y]+2*pY[2*x][2*y+1]+pY[2*x+1][2*y]+pY[2*x+1][2*y+1]+4)>>3 (8-171) - If availL is equal to TRUE, then pDsY[0][y], where y=0..nTbH-1, is derived as follows: pDsY[0][y]=(pY[-1][2*y]+pY[-1][2*y+1]+2*pY[0][2*y]+2*pY[0][2*y+1]+pY[1][2*y]+pY[1][2*y+1]+4)>>3 (8-172) - Otherwise, pDsY[0][y], where y=0..nTbH-1, is derived as follows: pDsY[0][y]=(pY[0][2*y]+pY[0][2*y+1]+1)>>1 (8-173)

[0157] State-of-the-art technology does not specify a lumen filtering process when the chroma component is not subsampled. How the lumen component should be handled when the chroma format is different from 4:2:0 is disclosed below.

[0158] This specification discloses a method for processing a lumen sample used as input data to determine parameters of a linear model. The method includes determining two filters that are conditionally applied in the vertical and horizontal directions.

[0159] Embodiments of the present application describe the introduction of a set of conditions including, but not limited to, chroma sampling coefficients, which are checked to determine the coefficients of the filter to be applied to the reconstructed lumen sample.

[0160] As shown in FIG. 11, the method is described as follows.

[0161] The current block 1101 is to determine or calculate or obtain the values of SubWidthC (i.e., the width of the image block) and SubHeightC (i.e., the height of the image block) based on the chroma format of the coded picture.

[0162] The current block 1102 is to define or determine the filter "F" used for the values of SubWidthC and SubHeightC.

[0163] Exemplary embodiments of how the filter can be associated with the corresponding values of SubWidthC and SubHeightC are as shown in Tables 2 to 5. The spatial filter "F" is defined in the form of a matrix of coefficients. The corresponding positions to which these coefficients are applied are defined as follows with respect to the position (x, y) of the filtered lumen sample:

Number

[0164] When the positions of the output filtered reconstructed samples lie on block boundaries, some adjacent positions may become unavailable because the adjacent blocks are unavailable. In this case, the input sample positions are modified to select the same positions. This sampling modification may be implemented as an equivalent filter of a smaller dimension with different coefficients.

[0165] Specifically, if the output sample is currently located at the left boundary of a block and no adjacent samples are available to the left of the rumor block, the filtering location is defined as follows:

number

[0166] If the output sample is currently located at the upper boundary of a block and no adjacent samples are available above the rumor block, the filtering location is defined as follows:

number

[0167] When the output sample is currently located at the right-hand boundary of the block, the filtering position is defined as follows:

number

[0168] When the output sample is currently located at the lower boundary of the block, the filtering position is defined as follows:

number

[0169] [Table 3] [Table 4] [Table 5] [Table 6]

[0170] The current block 1103 contains the filtered lumens sample values ​​Rec' L To obtain [x,y], the process involves filtering the reconstructed lumens sample. Specifically, this involves filtering the reconstructed sample Rec using the selected filter "F". L By applying it to [x,y], it will be executed:

number

[0171] A further embodiment involves switching the filter type (i.e., the filter association defined in Tables 2-5) depending on the position of the subsampled chroma sample relative to the lumana sample. For example, Table 4 is used when the subsampled chroma sample is not at the same position as the corresponding lumana sample (indicated by a flag in the bitstream). Otherwise, either Table 2 or Table 3 is used for the current block.

[0172] The distinction between Table 2 and Table 3 may be based on the number of chroma samples currently belonging to the block. For example, if chroma subsampling is not performed for blocks containing 64 or fewer samples, chroma filtering is not applied (Table 2). If, however, the block size is greater than 64 samples, Table 3 will be used to define the filter "F". The value 64 is merely an example, and other thresholds may be applied.

[0173] In other embodiments, filter F is selected according to the chroma format and chroma type, as shown in Tables 6-10. The chroma type specifies the displacement of the chroma component and is shown in Figures 10A and 10B. In Tables 6-10, the filter specified in the "YUV 4:2:0" column is used in the latest VVC draft. The columns "YUV 4:2:2" and "YUV 4:4:4" define filters that replace those defined in the "YUV 4:2:0" column when corresponding chroma formats are defined. [Table 7] [Table 8] [Table 9] [Table 10] [Table 11]

[0174] filter (outside 1) TIFF0007864149000020.tif23170 may be implemented in different ways, including filter bypass operation (i.e., by setting the output value to the input value). Alternatively, it may be implemented using similar addition and shift operations, i.e.:

number

[0175] In accordance with the proposed changes, the method may be implemented as part of the specification text: 3. The downsampled lumens sample pDsY[x][y] at the same location, where x=0..nTbW-1 and y=0..nTbH-1, is derived as follows: - If sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - Let x=1..nTbW-1 and y=1..nTbH-1. The pDsY[x][y] can be derived as follows: pDsY[x][y]= (F[1][0]*pY[SubWidthC*x][SubHeightC*y-1] +F[0][1]*pY[SubWidthC*x-1][SubHeightC*y] +F[1][1]*pY[SubWidthC*x][SubHeightC*y] +F[2][1]*pY[SubWidthC*x+1][SubHeightC*y] +F[1][2]*pY[SubWidthC*x][SubHeightC*y+1]+4)>>3 - If availL is equal to TRUE, then pDsY[0][y], where y=1..nTbH-1, is derived as follows: pDsY[0][y]= (F[1][0]*pY[0][SubHeightC*y-1] +F[0][1]*pY[-1][SubHeightC*y] +F[1][1]*pY[0][SubHeightC*y] +2)>>2 - Otherwise, pDsY[0][y], where y=1..nTbH-1, is derived as follows: pDsY[0][y]= (2*F[1][0]*pY[0][SubHeightC*y-1] +F[1][1]*pY[0][SubHeightC*y] +2)>>2 - If availT is equal to TRUE, then pDsY[x][0] where x=1..nTbW-1 is derived as follows: pDsY[x][0]= (F[1][0]*pY[SubWidthC*x][-1] +F[0][1]*pY[SubWidthC*x-1][0] +F[1][1]*pY[SubWidthC*x][0] +F[2][1]*pY[SubWidthC*x+1][0] +F[1][2]*pY[SubWidthC*x][1]+4)>>3 - Otherwise, pDsY[x][0] where x=1..nTbW-1 is derived as follows: pDsY[x][0]= (F[1][0]*pY[SubWidthC*x][-1] +F[0][1]*pY[SubWidthC*x-1][0] +F[1][1]*pY[SubWidthC*x][0] +F[2][1]*pY[SubWidthC*x+1][0] +F[1][2]*pY[SubWidthC*x][1]+4)>>3 - If availL is equal to TRUE and availT is equal to TRUE, then pDsY[0][0] is derived as follows: pDsY[0][0]= (F[1][0]*pY[0][-1] +F[0][1]*pY[-1][0] +F[1][1]*pY[0][0] +F[2][1]*pY[1][0] +F[1][2]*pY[0][1]+4)>>3 - Instead, if availL is equal to TRUE and availT is equal to FALSE, then pDsY[0][0] is derived as follows: pDsY[0][0]= (F[0][1]*pY[-1][0] +F[1][1]*pY[0][0] +F[2][1]*pY[1][0] +2)>>2 - Instead, if availL is equal to FALSE and availT is equal to TRUE, then pDsY[0][0] is derived as follows: pDsY[0][0]=(pY[0][-1]+2*pY[0][0]+pY[0][1]+2)>>2 (8-169) - In the other case (where availL is equal to FALSE and availT is equal to FALSE), pDsY[0][0] is derived as follows: pDsY[0][0]=pY[0][0] (8-170) - In other cases, the following applies: - Let x=1..nTbW-1, y=0..nTbH-1. The pDsY[x][y] can be derived as follows: pDsY[x][y]= (F[0][1]*pY[SubWidthC*x-1][SubHeightC*y] +F[0][2]*pY[SubWidthC*x-1][SubHeightC*y+1] +F[1][1]*pY[SubWidthC*x][SubHeightC*y] +F[1][2]*pY[SubWidthC*x][SubHeightC*y+1] +F[2][1]*pY[SubWidthC*x+1][SubHeightC*y] +F[2][2]*pY[SubWidthC*x+1][SubHeghtC*y+1]+4)>>3 - If availL is equal to TRUE, then pDsY[0][y], where y=0..nTbH-1, is derived as follows: pDsY[0][y]= (F[0][1]*pY[-1][SubHeightC*y] +F[0][2]*pY[-1][SubHeightC*y+1] +F[1][1]*pY[0][SubHeightC*y] +F[1][2]*pY[0][SubHeightC*y+1] +F[2][1]*pY[1][SubHeightC*y] +F[2][2]*pY[1][SubHeghtC*y+1]+4)>>3 - Otherwise, pDsY[0][y], where y=0..nTbH-1, is derived as follows: pDsY[0][y]= +F[1][1]*pY[0][SubHeightC*y] +F[1][2]*pY[0][SubHeightC*y+1]+1)>>1

[0176] The filters F[i][j] described above are determined in accordance with the embodiments of this application.

[0177] Other exemplary embodiments may be described in part as part of the VVC specification draft: 8.4.4.2.8 Specifications for INTRA_LT_CCLM, INTRA_L_CCLM, and INTRA_T_CCLM intra-prediction modes The inputs to this process are: - Intra predictive mode predModeIntra, - The sample position (xTbC, yTbC) of the top-left sample of the current transformation block relative to the top-left sample of the current picture. - Variable nTbW that specifies the width of the transformation block, - Variable nTbH that specifies the height of the transformation block, - These are chromatic adjacent samples p[x][y] where x=-1, y=0..2*nTbH-1 and x=0..2*nTbW-1, y=-1. The output of this process is predSamples[x][y] where x=0..nTbW-1, y=0..nTbH-1. The current luma position (xTbY, yTbY) is derived as follows: (xTbY,yTbY)=(xTbC<<(SubWidthC-1),yTbC<<(SubHeightC-1)) (8-156) The variables availL, availT, and availTL are derived as follows: - The process for deriving the availability of the left adjacent sample in a block is invoked using the current chroma position (xCurr, yCurr) and the adjacent chroma position (xTbC-1, yTbC), which are set to (xTbC, yTbC), as inputs, and the output is assigned to availL. - The process for deriving the availability of the upper adjacent sample in a block is invoked using the current chroma position (xCurr, yCurr) and the adjacent chroma position (xTbC, yTbC-1), which are set to (xTbC, yTbC), as inputs, and the output is assigned to availT. - The process for deriving the availability of the upper-left adjacent sample in a block is invoked using the current chroma position (xCurr, yCurr) and the adjacent chroma position (xTbC-1, yTbC-1), which are set to (xTbC, yTbC), as input, and the output is assigned to availTL. - The number of available top-right adjacent chroma samples, numTopRight, is derived as follows: - The variable numTopRight is set to equal to 0, and availTR is set to equal to TRUE. - When predModeIntra is equal to INTRA_T_CCLM, for x = nTbW..2*nTbW-1, the following applies until availTR is equal to FALSE or x is equal to 2*nTbW-1: - The block availability derivation process is invoked using the current chroma position (xCurr, yCurr) and the adjacent chroma position (xTbC+x, yTbC-1), which are set to (xTbC, yTbC), as inputs, and the output is assigned to availTR. - When availTR is equal to TRUE, numTopRight is incremented by 1. - The number of available lower-left adjacent chroma samples, numLeftBelow, is derived as follows: - The variable numLeftBelow is set to equal to 0, and availLB is set to equal to TRUE. - When predModeIntra is equal to INTRA_L_CCLM, for y=nTbH..2*nTbH-1, the following applies until availLB is equal to FALSE or y is equal to 2*nTbH-1: - The block availability derivation process is invoked using the current chroma position (xCurr, yCurr) and the adjacent chroma position (xTbC-1, yTbC+y), which are set to (xTbC, yTbC), as inputs, and the output is assigned to availLB. - When availLB is equal to TRUE, numLeftBelow is incremented by 1. The number of available adjacent chromatic samples at the top and upper right, numSampT, and the number of available adjacent chromatic samples at the left and lower left, numSampL, are derived as follows: - When predModeIntra is equal to INTRA_LT_CCLM, the following applies: numSampT=availT?nTbW:0 numSampL=availL?nTbH:0 - Otherwise, the following applies: numSampT=(availT&&predModeIntra==INTRA_T_CCLM)?(nTbW+numTopRight):0 numSampL=(availL&&predModeIntra==INTRA_L_CCLM)?(nTbH+numLeftBelow):0 The variable bCTUboundary is derived as follows: bCTUboundary=(yTbC&(1<<(CtbLog2SizeY-1)-1)==0)?TRUE:FALSE The prediction sample predSamples[x][y] for x=0..nTbW-1, y=0..nTbH-1 is derived as follows: - If both numSampL and numSampT are equal to 0, the following applies: predSamples[x][y]=1<<(BitDepth C -1) - Otherwise, the following ordered steps apply: 1. A lumern sample pY[x][y] at the same position, where x=0..nTbW*SubWidthC-1 and y=0..nTbH*SubHeightC-1, is set to be equal to the reconstructed lumern sample before the deblocking filter process at position (xTbY+x, yTbY+y). 2. The adjacent lumens sample pY[x][y] is derived as follows: - When numSampL is greater than 0, the adjacent left lumern sample pY[x][y] where x=-1..-3, y=0..SubHeightC*numSampL-1 is set to equal the reconstructed lumern sample before the deblocking filter process at position (xTbY+x, yTbY+y). - When numSampT is greater than 0, adjacent upper lumern samples pY[x][y] where x=0..SubWidthC*numSampT-1, y=-1,-2 are set to equal the reconstructed lumern samples before the deblocking filter process at position (xTbY+x, yTbY+y). - When availTL is equal to TRUE, adjacent upper-left lumens samples pY[x][y] where x=-1, y=-1, -2 are set to equal the reconstructed lumens sample before the deblocking filter process at position (xTbY+x, yTbY+y). 3. The downsampled lumens sample pDsY[x][y] at the same location, where x=0..nTbW-1 and y=0..nTbH-1, is derived as follows: - If SubWidthC==1 and SubHeightC==1, the following applies: - Let x=1..nTbW-1 and y=1..nTbH-1. The pDsY[x][y] can be derived as follows: pDsY[x][y]=pY[x][y] / / For explanatory purposes only: No filter for YUV 4:4:4 / / Otherwise, the following applies to the filter set {F3, F5, F6}: / / Here, we define the coefficients / / F3[0]=1,F3[1]=2,F3[2]=1 - If SubWidthC==2 and SubHeightC==2 F5[0][1]=1,F5[1][1]=4,F3[2][1]=1, F5[1][0]=1,F5[1][2]=1,F6[0][1]=1, F6[1][1]=2,F6[2][1]=1,F6[0][2]=1, F6[1][2]=2,F6[2][2]=1,F2[0]=1,F2[1]=1 - Other cases F5[0][1]=0,F5[1][1]=8,F3[2][1]=0, F5[1][0]=0,F5[1][2]=0,F6[0][1]=2, F6[1][1]=4,F6[2][1]=2,F6[0][2]=0, F6[1][2]=0,F6[2][2]=0,F2[0]=2,F2[1]=0 - / / See the bolded portion of the embodiment of this application / / - If sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - For x=1..nTbW-1 and y=1..nTbH-1, the pDsY[x][y] values ​​for F set in F5 are derived as follows: pDsY[x][y]= (F[1][0]*pY[SubWidthC*x][SubHeightC*y-1] +F[0][1]*pY[SubWidthC*x-1][SubHeightC*y] +F[1][1]*pY[SubWidthC*x][SubHeightC*y] +F[2][1]*pY[SubWidthC*x+1][SubHeightC*y] +F[1][2]*pY[SubWidthC*x][SubHeightC*y+1]+4)>>3 / / For the purpose of this explanation only: Apply the determined filter and all other occurrences of the "F" filter / / - If availL is equal to TRUE, then pDsY[0][y], where y=1..nTbH-1, is derived for F set in F5 as follows: pDsY[0][y]= (F[1][0]*pY[0][SubHeightC*y-1] +F[0][1]*pY[-1][SubHeightC*y] +F[1][1]*pY[0][SubHeightC*y] +F[2][1]*pY[1][SubHeightC*y] +F[1][2]*pY[0][SubHeightC*y+1]+4)>>3 - Otherwise, pDsY[0][y] where y=1..nTbH-1 is derived for F set in F3 as follows: pDsY[0][y]= (F[0]*pY[0][SubHeightC*y-1] +F[1]*pY[0][SubHeightC*y] +F[2]*pY[0][SubHeightC*y+1] +2)>>2 - If availT is equal to TRUE, then pDsY[x][0] where x=1..nTbW-1 is derived for F set in F5 as follows: pDsY[x][0]= (F[1][0]*pY[SubWidthC*x][-1] +F[0][1]*pY[SubWidthC*x-1][0] +F[1][1]*pY[SubWidthC*x][0] +F[2][1]*pY[SubWidthC*x+1][0] +F[1][2]*pY[SubWidthC*x][1]+4)>>3 - Otherwise, pDsY[x][0] where x=1..nTbW-1 is derived for F set in F3 as follows: pDsY[x][0]= (F[0]*pY[SubWidthC*x-1][0] +F[1]*pY[SubWidthC*x][0] +F[2]*pY[SubWidthC*x+1][0]+2)>>2 - If availL is equal to TRUE and availT is equal to TRUE, then pDsY[0][0] is derived for F set to F5 as follows: pDsY[0][0]= (F[1][0]*pY[0][-1] +F[0][1]*pY[-1][0] +F[1][1]*pY[0][0] +F[2][1]*pY[1][0] +F[1][2]*pY[0][1]+4)>>3 - Instead, if availL is equal to TRUE and availT is equal to FALSE, then pDsY[0][0] is derived for F set to F3 as follows: pDsY[0][0]= (F[0]*pY[-1][0] +F[1]*pY[0][0] +F[2]*pY[1][0] +2)>>2 - Instead, if availL is equal to FALSE and availT is equal to TRUE, then pDsY[0][0] is derived for F set to F3 as follows: pDsY[0][0]= (F[0]*pY[0][-1] +F[1]*pY[0][0]+F[2]*pY[0][1] +2)>>2 - In the other case (where availL is equal to FALSE and availT is equal to FALSE), pDsY[0][0] is derived as follows: pDsY[0][0]=pY[0][0] - In other cases, the following applies: - For x=1..nTbW-1 and y=0..nTbH-1, the pDsY[x][y] values ​​for F set in F6 are derived as follows: pDsY[x][y]= (F[0][1]*pY[SubWidthC*x-1][SubHeightC*y] +F[0][2]*pY[SubWidthC*x-1][SubHeightC*y+1] +F[1][1]*pY[SubWidthC*x][SubHeightC*y] +F[1][2]*pY[SubWidthC*x][SubHeightC*y+1] +F[2][1]*pY[SubWidthC*x+1][SubHeightC*y] +F[2][2]*pY[SubWidthC*x+1][SubHeightC*y+1]+4)>>3 - If availL is equal to TRUE, then pDsY[0][y], where y=0..nTbH-1, is derived for F set in F6 as follows: pDsY[0][y]= (F[0][1]*pY[-1][SubHeightC*y] +F[0][2]*pY[-1][SubHeightC*y+1] +F[1][1]*pY[0][SubHeightC*y] +F[1][2]*pY[0][SubHeightC*y+1] +F[2][1]*pY[1][SubHeightC*y] +F[2][2]*pY[1][SubHeightC*y+1]+4)>>3 - Otherwise, pDsY[0][y], where y=0..nTbH-1, is derived for F set in F2 as follows: pDsY[0][y]= (F[0]*pY[0][SubHeightC*y] +F[1]*pY[0][SubHeightC*y+1]+1)>>1 4. When numSampL is greater than 0, the downsampled adjacent left lumens sample pLeftDsY[y] where y = 0 ..numSampL - 1 is derived as follows: - If SubWidthC==1 and SubHeightC==1, the following applies: - The value of pLeftDsY[y] where y=0..nTbH-1 is derived as follows: pLeftDsY[y]=pY[-1][y] - Otherwise, the following applies: - If sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - pLeftDsY[y] where y=1..nTbH-1 is derived for F set to F5 as follows: pLeftDsY[y]= (F[1][0]*pY[-SubWidthC][SubHeightC*y-1] +F[0][1]*pY[-1-SubWidthC][SubHeightC*y] +F[1][1]*pY[-SubWidthC][SubHeightC*y] +F[2][1]*pY[1-SubWidthC][SubHeightC*y] +F[1][2]*pY[-SubWidthC][SubHeightC*y+1]+4)>>3 - If availTL is equal to TRUE, pLeftDsY[0] is derived for F set to F5 as follows: pLeftDsY[0]= (F[1][0]*pY[-SubWidthC][-1] +F[0][1]*pY[-1-SubWidthC][0] +F[1][1]*pY[-SubWidthC][0] +F[2][1]*pY[1-SubWidthC][0] +F[1][2]*pY[-SubWidthC][1]+4)>>3 - Otherwise, pLeftDsY[0] is derived for F set to F3 as follows: pLeftDsY[0]= =(F[0]*pY[-1-SubWidthC][0] +F[1]*pY[-SubWidthC][0] +F[2]*pY[1-SubWidthC][0] +2)>>2 - In other cases, for F set to F6, the following applies: pLeftDsY[y]= (F[0][1]*pY[-1-SubWidthC][SubHeightC*y] +F[0][2]*pY[-1-SubWidthC][SubHeightC*y+1] +F[1][1]*pY[-SubWidthC][SubHeightC*y] +F[1][2]*pY[-SubWidthC][SubHeightC*y+1] +F[2][1]*pY[1-SubWidthC][SubHeightC*y] +F[2][2]*pY[1-SubWidthC][SubHeightC*y+1]+4)>>3 5. When numSampT is greater than 0, the downsampled adjacent upper lumen sample pTopDsY[x] where x = 0 ..numSampT - 1 is defined as follows: - If SubWidthC==1 and SubHeightC==1, the following applies: - For x=0..numSampT-1, pTopDsY[x]=pY[x][-1] - Otherwise, the following applies: - If sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - pTopDsY[x] where x=1..numSampT-1 is derived as follows: - If bCTUboundary is equal to FALSE, the following applies to F set to F5: pTopDsY[x]= (F[1][0]*pY[SubWidthC*x][-1-SubHeightC] +F[0][1]*pY[SubWidthC*x-1][-SubHeightC] +F[1][1]*pY[SubWidthC*x][-SubHeightC] +F[2][1]*pY[SubWidthC*x+1][-SubHeightC] +F[1][2]*pY[SubWidthC*x][1-SubHeightC]+4)>>3 - Otherwise (when bCTUboundary is equal to TRUE), the following applies to F set to F3: pTopDsY[x]= (F[0]*pY[SubWidthC*x-1][-1] +F[1]*pY[SubWidthC*x][-1] +F[2]*pY[SubWidthC*x+1][-1] +2)>>2 - pTopDsY[0] is derived as follows: - If availTL is equal to TRUE and bCTUboundary is equal to FALSE, the following applies to F set to F5: pTopDsY[0]= (F[1][0]*pY[-1][-1-SubHeightC] +F[0][1]*pY[-1][-SubHeightC] +F[1][1]*pY[0][-SubHeightC] +F[2][1]*pY[1][-SubHeightC] +F[1][2]*pY[-1][1-SubHeightC]+4)>>3 - Instead, if availTL is equal to TRUE and bCTUboundary is equal to TRUE, the following applies to F set to F3: pTopDsY[0]= (F[0]*pY[-1][-1] +F[1]*pY[0][-1] +F[2]*pY[1][-1] +2)>>2 - Instead, if availTL is equal to FALSE and bCTUboundary is equal to FALSE, then for F set to F3, the following applies: pTopDsY[0]= (F[0]*pY[0][-1] +F[1]*pY[0][-2] +F[2]*pY[0][-1] +2)>>2 - In other cases (where availTL is equal to FALSE and bCTUboundary is equal to TRUE), the following applies: pTopDsY[0]=pY[0][-1] - In other cases, the following applies: - pTopDsY[x] where x=1..numSampT-1 is derived as follows: - If bCTUboundary is equal to FALSE, the following applies to F set to F6: pTopDsY[x]= (F[0][1]*pY[SubWidthC*x-1][-2] +F[0][2]*pY[SubWidthC*x-1][-1] +F[1][1]*pY[SubWidthC*x][-2] +F[1][2]*pY[SubWidthC*x][-1] +F[2][1]*pY[SubWidthC*x+1][-2] +F[2][2]*pY[SubWidthC*x+1][-1]+4)>>3 - Otherwise (when bCTUboundary is equal to TRUE), the following applies to F set to F3: pTopDsY[x]= (F[0]*pY[SubWidthC*x-1][-1] +F[1]*pY[SubWidthC*x][-1] +F[2][1]*pY[SubWidthC*x+1][-1] +2)>>2 - pTopDsY[0] is derived as follows: - If availTL is equal to TRUE and bCTUboundary is equal to FALSE, the following applies to F set to F6: pTopDsY[0]= (F[0][1]*pY[-1][-2] +F[0][2]*pY[-1][-1] +F[1][1]*pY[0][-2] +F[1][2]*pY[0][-1] +F[2][1]*pY[1][-2] +F[2][2]*pY[1][-1]+4)>>3 - Instead, if availTL is equal to TRUE and bCTUboundary is equal to TRUE, the following applies to F set to F3: pTopDsY[0]= (F[0]*pY[-1][-1] +F[1]*pY[0][-1] +F[2]*pY[1][-1] +2)>>2 - Instead, if availTL is equal to FALSE and bCTUboundary is equal to FALSE, the following applies to F set in F2: pTopDsY[0]=(F[1]*pY[0][-2]+F[0]*pY[0][-1]+1)>>1 - In other cases (where availTL is equal to FALSE and bCTUboundary is equal to TRUE), the following applies: pTopDsY[0]=pY[0][-1] 6. The variables nS, xS, and yS are derived as follows: - If predModeIntra is equal to INTRA_LT_CCLM, the following applies: nS=((availL&&availT)?Min(nTbW,nTbH):(availL?nTbH:nTbW)) xS=1<<(((nTbW>nTbH)&&availL&&availT)?(Log2(nTbW)-Log2(nTbH)):0) (8-192) yS=1<<(((nTbH>nTbW)&&availL&&availT)?(Log2(nTbH)-Log2(nTbW)):0) (8-193) - Instead, if predModeIntra is equal to INTRA_L_CCLM, the following applies: nS=numSampL xS=1 yS=1 - In other cases (when predModeIntra is equal to INTRA_T_CCLM), the following applies: nS=numSampT xS=1 yS=1 7. The variables minY, maxY, minC, and maxC are derived as follows: - The variable minY is 1 << (BitDepth Y The variable maxY is set to equal to -1. - If availT is equal to TRUE, then with x = 0..nS-1, the variables minY, maxY, minC, and maxC are derived as follows: - If minY is greater than pTopDsY[x*xS], the following applies: minY=pTopDsY[x*sS] minC=p[x*xS][-1] - If maxY is less than pTopDsY[x*xS], the following applies: maxY=pTopDsY[x*xS] maxC=p[x*xS][-1] - When availL is equal to TRUE, the variables minY, maxY, minC, and maxC are derived as follows, with y = 0..nS-1: - If minY is greater than pLeftDsY[y*yS], the following applies: minY=pLeftDsY[y*yS] minC=p[-1][y*yS] - If maxY is less than pLeftDsY[y*yS], the following applies: maxY=pLeftDsY[y*yS] maxC=p[-1][y*yS] 8. Variables a, b, and k are derived as follows: - If numSampL is equal to 0 and numSampT is equal to 0, the following applies: k=0 a=0 b=1<<(BitDepth C -1) - Otherwise, the following applies: diff = maxY - minY - If diff is not equal to 0, the following applies: diffC = maxC - minC x = Floor(Log2(diff)) normDiff=((diff<<4)>>x)&15 x += (normDiff != 0) ? 1 : 0 y = Floor(Log2(Abs(diffC))) + 1 a=(diffC*(divSigTable[normDiff]|8)+2 y-1 )>>y k=((3+xy)<1)?1:3+xy a=((3+xy)<1)?Sign(a)*15:a b = minC - ((a*minY)>>k) Here, divSigTable[] is defined as follows: divSigTable[] ={0,7,6,5,5,4,4,3,3,2,2,1,1,1,1,0} -If not (diff is equal to 0), the following applies: k=0 a=0 b = min C 9. Predicted samples predSamples[x][y] where x=0..nTbW-1, y=0..nTbH-1 are derived as follows: predSamples[x][y] =Clip1C(((pDsY[x][y]*a)>>k)+b)

[0178] Other embodiments describe methods for deriving CCLM parameters from at most four adjacent chromatic samples and their corresponding downsampled chromatic samples.

[0179] If the current size of the chroma block is W×H, then W' and H' are ●When LM mode is applied, W'=W,H'=H; ●When LM-A mode is applied, W'=W+H; ●When LM-L mode is applied, H'=H+W It will be set as such.

[0180] The upper adjacent positions are represented as S[0,-1]...S[W'-1,-1], and the left adjacent positions are represented as S[-1,0]...S[-1,H'-1]. In that case, the four samples are ●When LM mode is applied and both the upper and left adjacent samples are available, use S[W' / 4,-1], S[3W' / 4,-1], S[-1,H' / 4], S[-1,3H' / 4]; ●When LM-A mode is applied, or when only the upper adjacent sample is available, use S[W' / 8,-1], S[3W' / 8,-1], S[5W' / 8,-1], S[7W' / 8,-1]; ●When LM-L mode is applied, or when only the left adjacent sample is available, S[-1,H' / 8], S[-1,3H' / 8], S[-1,5H' / 8], S[-1,7H' / 8] It is selected as such.

[0181] The four adjacent lumens samples at the selected location are downsampled to two smaller values: x 0 A and x 1 A and two larger values: x 0 B and x 1 B They are compared four times to find their corresponding chroma sample values, y 0 A , y 1 A , y 0 B and y 1B It is represented as follows. Then, x A , x B , y A and y B are: 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[[ID=​​​​​​​​​​​​​​​​​​​​​​​​The output of this process is predSamples[x][y] where x=0..nTbW-1, y=0..nTbH-1. The current luma position (xTbY, yTbY) is derived as follows: (xTbY,yTbY)=(xTbC<<(SubWidthC-1),yTbC<<(SubHeightC-1)) The variables availL, availT, and availTL are derived as follows: - The process for deriving the availability of the left adjacent sample in a block is invoked using the current chroma position (xCurr, yCurr) and the adjacent chroma position (xTbC-1, yTbC), which are set to (xTbC, yTbC), as inputs, and the output is assigned to availL. - The process for deriving the availability of the upper adjacent sample in a block is invoked using the current chroma position (xCurr, yCurr) and the adjacent chroma position (xTbC, yTbC-1), which are set to (xTbC, yTbC), as inputs, and the output is assigned to availT. - The process for deriving the availability of the upper-left adjacent sample in a block is invoked using the current chroma position (xCurr, yCurr) and the adjacent chroma position (xTbC-1, yTbC-1), which are set to (xTbC, yTbC), as input, and the output is assigned to availTL. - The number of available top-right adjacent chroma samples, numTopRight, is derived as follows: - The variable numTopRight is set to equal to 0, and availTR is set to equal to TRUE. - When predModeIntra is equal to INTRA_T_CCLM, for x = nTbW..2*nTbW-1, the following applies until availTR is equal to FALSE or x is equal to 2*nTbW-1: - The block availability derivation process is invoked using the current chroma position (xCurr, yCurr) and the adjacent chroma position (xTbC+x, yTbC-1), which are set to (xTbC, yTbC), as inputs, and the output is assigned to availTR. - When availTR is equal to TRUE, numTopRight is incremented by 1. - The number of available lower-left adjacent chroma samples, numLeftBelow, is derived as follows: - The variable numLeftBelow is set to equal to 0, and availLB is set to equal to TRUE. - When predModeIntra is equal to INTRA_L_CCLM, for y=nTbH..2*nTbH-1, the following applies until availLB is equal to FALSE or y is equal to 2*nTbH-1: - The block availability derivation process is invoked using the current chroma position (xCurr, yCurr) and the adjacent chroma position (xTbC-1, yTbC+y), which are set to (xTbC, yTbC), as inputs, and the output is assigned to availLB. - When availLB is equal to TRUE, numLeftBelow is incremented by 1. The number of available adjacent chromatic samples at the top and upper right, numSampT, and the number of available adjacent chromatic samples at the left and lower left, numSampL, are derived as follows: - When predModeIntra is equal to INTRA_LT_CCLM, the following applies: numSampT=availT?nTbW:0 numSampL=availL?nTbH:0 - Otherwise, the following applies: numSampT=(availT&&predModeIntra==INTRA_T_CCLM)?(nTbW+Min(numTopRight,nTbH)):0 numSampL=(availL&&predModeIntra==INTRA_L_CCLM)?(nTbH+Min(numLeftBelow,nTbW)):0 The variable bCTUboundary is derived as follows: bCTUboundary=(yTbC&(1<<(CtbLog2SizeY-1)-1)==0)?TRUE:FALSE The variable cntN and the array pickPosN[], where N is replaced by L and T, are derived as follows: - The variable numIs4N is set to equal to ((availT&&availL&&predModeIntra==INTRA LT CCLM)?0:1). - The variable startPosN is set to equal numSampN >> (2 + numIs4N). - The variable pickStepN is set to equal to Max(1, numSampN >> (1 + numIs4N)). - If availN is equal to TRUE and predModeIntra is equal to INTRA_LT_CCLM or INTRA_N_CCLM, then cntN is set to Min(numSampN,(1+numIs4N)<<1), pickPosN[pos] is set to (startPosN+pos*pickStepN), and pos=0..(cntN-1). - Otherwise, cntN is set to equal to 0. The prediction sample predSamples[x][y] for x=0..nTbW-1, y=0..nTbH-1 is derived as follows: - If both numSampL and numSampT are equal to 0, the following applies: predSamples[x][y]=1<<(BitDepth C -1) - Otherwise, the following ordered steps apply: 1. A lumern sample pY[x][y] at the same position, where x=0..nTbW*SubWidthC-1 and y=0..nTbH*SubHeightC-1, is set to be equal to the reconstructed lumern sample before the deblocking filter process at position (xTbY+x, yTbY+y). 2. The adjacent lumens sample pY[x][y] is derived as follows: - When numSampL is greater than 0, the adjacent left lumern sample pY[x][y] where x=-1..-3, y=0..SubHeightC*numSampL-1 is set to equal the reconstructed lumern sample before the deblocking filter process at position (xTbY+x, yTbY+y). - When numSampT is greater than 0, adjacent upper lumern samples pY[x][y] where x=0..SubWidthC*numSampT-1, y=-1,-2 are set to equal the reconstructed lumern samples before the deblocking filter process at position (xTbY+x, yTbY+y). - When availTL is equal to TRUE, adjacent upper-left lumens samples pY[x][y] where x=-1, y=-1, -2 are set to equal the reconstructed lumens sample before the deblocking filter process at position (xTbY+x, yTbY+y). 3. The downsampled lumens sample pDsY[x][y] at the same location, where x=0..nTbW-1 and y=0..nTbH-1, is derived as follows: - If SubWidthC==1 and SubHeightC==1, the following applies: - Let x=1..nTbW-1 and y=1..nTbH-1. The pDsY[x][y] can be derived as follows: pDsY[x][y]=pY[x][y] - Otherwise, the following applies to the filter set {F3,F5,F6}: F3[0]=1,F3[1]=2,F3[2]=1 - If SubWidthC==2 and SubHeightC==2 F5[0][1]=1,F5[1][1]=4,F3[2][1]=1, F5[1][0]=1,F5[1][2]=1,F6[0][1]=1, F6[1][1]=2,F6[2][1]=1,F6[0][2]=1, F6[1][2]=2,F6[2][2]=1,F2[0]=1, F2[1]=1 - Other cases F5[0][1]=0,F5[1][1]=8,F3[2][1]=0, F5[1][0]=0,F5[1][2]=0,F6[0][1]=2, F6[1][1]=4,F6[2][1]=2,F6[0][2]=0, F6[1][2]=0,F6[2][2]=0,F2[0]=2, F2[1]=0 - If sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - For x=1..nTbW-1 and y=1..nTbH-1, the pDsY[x][y] values ​​for F set in F5 are derived as follows: pDsY[x][y]= (F[1][0]*pY[SubWidthC*x][SubHeightC*y-1] +F[0][1]*pY[SubWidthC*x-1][SubHeightC*y] +F[1][1]*pY[SubWidthC*x][SubHeightC*y] +F[2][1]*pY[SubWidthC*x+1][SubHeightC*y] +F[1][2]*pY[SubWidthC*x][SubHeightC*y+1]+4)>>3 - If availL is equal to TRUE, then pDsY[0][y], where y=1..nTbH-1, is derived for F set in F5 as follows: pDsY[0][y]= (F[1][0]*pY[0][SubHeightC*y-1] +F[0][1]*pY[-1][SubHeightC*y] +F[1][1]*pY[0][SubHeightC*y] +F[2][1]*pY[1][SubHeightC*y] +F[1][2]*pY[0][SubHeightC*y+1]+4)>>3 - Otherwise, pDsY[0][y] where y=1..nTbH-1 is derived for F set in F3 as follows: pDsY[0][y]= (F[0]*pY[0][SubHeightC*y-1] +F[1]*pY[0][SubHeightC*y] +F[2]*pY[0][SubHeightC*y+1] +2)>>2 - If availT is equal to TRUE, then pDsY[x][0] where x=1..nTbW-1 is derived for F set in F5 as follows: pDsY[x][0]= (F[1][0]*pY[SubWidthC*x][-1] +F[0][1]*pY[SubWidthC*x-1][0] +F[1][1]*pY[SubWidthC*x][0] +F[2][1]*pY[SubWidthC*x+1][0] +F[1][2]*pY[SubWidthC*x][1]+4)>>3 - Otherwise, pDsY[x][0] where x=1..nTbW-1 is derived for F set in F3 as follows: pDsY[x][0]= (F[0]*pY[SubWidthC*x-1][0] +F[1]*pY[SubWidthC*x][0] +F[2]*pY[SubWidthC*x+1][0]+2)>>2 - If availL is equal to TRUE and availT is equal to TRUE, then pDsY[0][0] is derived for F set to F5 as follows: pDsY[0][0]= (F[1][0]*pY[0][-1] +F[0][1]*pY[-1][0] +F[1][1]*pY[0][0] +F[2][1]*pY[1][0] +F[1][2]*pY[0][1]+4)>>3 - Instead, if availL is equal to TRUE and availT is equal to FALSE, then pDsY[0][0] is derived for F set to F3 as follows: pDsY[0][0]= (F[0]*pY[-1][0] +F[1]*pY[0][0] +F[2]*pY[1][0] +2)>>2 - Instead, if availL is equal to FALSE and availT is equal to TRUE, then pDsY[0][0] is derived for F set to F3 as follows: pDsY[0][0]= (F[0]*pY[0][-1] +F[1]*pY[0][0] +F[2]*pY[0][1] +2)>>2 - In the other case (where availL is equal to FALSE and availT is equal to FALSE), pDsY[0][0] is derived as follows: pDsY[0][0]=pY[0][0] - In other cases, the following applies: - For x=1..nTbW-1 and y=0..nTbH-1, the pDsY[x][y] values ​​for F set in F6 are derived as follows: pDsY[x][y]= (F[0][1]*pY[SubWidthC*x-1][SubHeightC*y] +F[0][2]*pY[SubWidthC*x-1][SubHeightC*y+1] +F[1][1]*pY[SubWidthC*x][SubHeightC*y] +F[1][2]*pY[SubWidthC*x][SubHeightC*y+1] +F[2][1]*pY[SubWidthC*x+1][SubHeightC*y] +F[2][2]*pY[SubWidthC*x+1][SubHeightC*y+1]+4)>>3 - If availL is equal to TRUE, then pDsY[0][y], where y=0..nTbH-1, is derived for F set in F6 as follows: pDsY[0][y]= (F[0][1]*pY[-1][SubHeightC*y] +F[0][2]*pY[-1][SubHeightC*y+1] +F[1][1]*pY[0][SubHeightC*y] +F[1][2]*pY[0][SubHeightC*y+1] +F[2][1]*pY[1][SubHeightC*y] +F[2][2]*pY[1][SubHeightC*y+1]+4)>>3 - Otherwise, pDsY[0][y], where y=0..nTbH-1, is derived for F set in F2 as follows: pDsY[0][y]= (F[0]*pY[0][SubHeightC*y] +F[1]*pY[0][SubHeightC*y+1]+1)>>1 4. When numSampL is greater than 0, the selected adjacent left chroma sample pSelC[idx] is set equal to p[-1][pickPosL[idx]] with idx=0..(cntL-1), and the selected downsampled adjacent left chroma sample pSelDsY[idx] is derived with idx=0..(cntL-1) as follows: - The variable y is set to equal to pickPosL[idx]. - If SubWidthC==1 and SubHeightC==1, the following applies: - pSelDsY[i]=pY[-1][y] - Otherwise, the following applies: - If sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - For F set to F5 when y>0||availTL==TRUE: pSelDsY[idx]= (F[1][0]*pY[-SubWidthC][SubHeightC*y-1] +F[0][1]*pY[-1-SubWidthC][SubHeightC*y] +F[1][1]*pY[-SubWidthC][SubHeightC*y] +F[2][1]*pY[1-SubWidthC][SubHeightC*y] +F[1][2]*pY[-SubWidthC][SubHeightC*y+1]+4)>>3 - Otherwise, for F set to F3: pSelDsY[idx]= (F[0]*pY[-1-SubWidthC][0] +F[1]*pY[-SubWidthC][0] +F[2]*pY[1-SubWidthC][0] +2)>>2 - In other cases, for F set to F6, the following applies: pSelDsY[idx]= (F[0][1]*pY[-1-SubWidthC][SubHeightC*y] +F[0][2]*pY[-1-SubWidthC][SubHeightC*y+1] +F[1][1]*pY[-SubWidthC][SubHeightC*y] +F[1][2]*pY[-SubWidthC][SubHeightC*y+1] +F[2][1]*pY[1-SubWidthC][SubHeightC*y] +F[2][2]*pY[1-SubWidthC][SubHeightC*y+1]+4)>>3 5. When numSampT is greater than 0, the selected adjacent upper chroma sample pSelC[idx] is set equal to p[pickPosT[idx-cntL]][-1], where idx=cntL..(cntL+cntT-1), and the downsampled adjacent upper chroma sample pSelDsY[idx] is derived as follows, where idx=cntL..cntL+cntT-1: - The variable x is set to equal to pickPosT[idx-cntL]. - If SubWidthC==1 and SubHeightC==1, the following applies: - pSelDsY[idx]=pY[x][-1] - Otherwise, the following applies: - If sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - If x > 0: - If bCTUboundary is equal to FALSE, the following applies to F set to F5: pSelDsY[idx]= (F[1][0]*pY[SubWidthC*x][-1-SubHeightC] +F[0][1]*pY[SubWidthC*x-1][-SubHeightC] +F[1][1]*pY[SubWidthC*x][-SubHeightC] +F[2][1]*pY[SubWidthC*x+1][-SubHeightC] +F[1][2]*pY[SubWidthC*x][1-SubHeightC]+4)>>3 - Otherwise (when bCTUboundary is equal to TRUE), the following applies to F set to F3: pSelDsY[idx]= (F[0]*pY[SubWidthC*x-1][-1] +F[1]*pY[SubWidthC*x][-1] +F[2]*pY[SubWidthC*x+1][-1] +2)>>2 - Other cases: - If availTL is equal to TRUE and bCTUboundary is equal to FALSE, the following applies to F set to F5: pSelDsY[idx]= (F[1][0]*pY[-1][-1-SubHeightC] +F[0][1]*pY[-1][-SubHeightC] +F[1][1]*pY[0][-SubHeightC] +F[2][1]*pY[1][-SubHeightC] +F[1][2]*pY[-1][1-SubHeightC]+4)>>3 - Instead, if availTL is equal to TRUE and bCTUboundary is equal to TRUE, the following applies to F set to F3: pSelDsY[idx]= (F[0]*pY[-1][-1] +F[1]*pY[0][-1] +F[2]*pY[1][-1] +2)>>2 (8-182) - Instead, if availTL is equal to FALSE and bCTUboundary is equal to FALSE, then for F set to F3, the following applies: pSelDsY[idx]= (F[0]*pY[0][-1] +F[1]*pY[0][-2] +F[2]*pY[0][-1] +2)>>2 - In other cases (where availTL is equal to FALSE and bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=pY[0][-1] - In other cases, the following applies: - If x > 0: - If bCTUboundary is equal to FALSE, the following applies to F set to F6: pSelDsY[idx]= (F[0][1]*pY[SubWidthC*x-1][-2] +F[0][2]*pY[SubWidthC*x-1][-1] +F[1][1]*pY[SubWidthC*x][-2] +F[1][2]*pY[SubWidthC*x][-1] +F[2][1]*pY[SubWidthC*x+1][-2] +F[2][2]*pY[SubWidthC*x+1][-1]+4)>>3 - Otherwise (when bCTUboundary is equal to TRUE), the following applies to F set to F3: pSelDsY[idx]= (F[0]*pY[SubWidthC*x-1][-1] +F[1]*pY[SubWidthC*x][-1] +F[2][1]*pY[SubWidthC*x+1][-1] +2)>>2 - Other cases: - If availTL is equal to TRUE and bCTUboundary is equal to FALSE, the following applies to F set to F6: pSelDsY[idx]= (F[0][1]*pY[-1][-2] +F[0][2]*pY[-1][-1] +F[1][1]*pY[0][-2] +F[1][2]*pY[0][-1] +F[2][1]*pY[1][-2] +F[2][2]*pY[1][-1]+4)>>3 - Instead, if availTL is equal to TRUE and bCTUboundary is equal to TRUE, the following applies to F set to F3: pSelDsY[idx]= (F[0]*pY[-1][-1] +F[1]*pY[0][-1] +F[2]*pY[1][-1] +2)>>2 - Instead, if availTL is equal to FALSE and bCTUboundary is equal to FALSE, the following applies to F set in F2: pSelDsY[idx]=(F[1]*pY[0][-2]+F[0]*pY[0][-1]+1)>>1 - In other cases (where availTL is equal to FALSE and bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=pY[0][-1] 6. When cntT + cntL is not equal to 0, the variables minY, maxY, minC, and maxC are derived as follows: - When cntT + cntL is equal to 2, set pSelComp[3] to equal pSelComp[0], set pSelComp[2] to equal pSelComp[1], set pSelComp[0] to equal pSelComp[1], and set pSelComp[1] to equal pSelComp[3], where Comp is replaced by DsY and C. - The arrays minGrpIdx[] and maxGrpIdx[] are set to minGrpIdx[0]=0, minGrpIdx[1]=2, maxGrpIdx[0]=1, and maxGrpIdx[1]=3. - If pSelDsY[minGrpIdx[0]] > pSelDsY[minGrpIdx[1]], then Swap(minGrpIdx[0],minGrpIdx[1]). - If pSelDsY[maxGrpIdx[0]] > pSelDsY[maxGrpIdx[1]], then Swap(maxGrpIdx[0],maxGrpIdx[1]). - Swap(minGrpIdx,maxGrpIdx) if pSelDsY[minGrpIdx[0]]>pSelDsY[maxGrpIdx[1]]. - If pSelDsY[minGrpIdx[1]] > pSelDsY[maxGrpIdx[0]], then Swap(minGrpIdx[1],maxGrpIdx[0]). - maxY=(pSelDsY[maxGrpIdx[0]]+pSelDsY[maxGrpIdx[1]]+1)>>1. - maxC=(pSelC[maxGrpIdx[0]]+pSelC[maxGrpIdx[1]]+1)>>1. - minY=(pSelDsY[minGrpIdx[0]]+pSelDsY[minGrpIdx[1]]+1)>>1. - minC=(pSelC[minGrpIdx[0]]+pSelC[minGrpIdx[1]]+1)>>1. 7. Variables a, b, and k are derived as follows: - If numSampL is equal to 0 and numSampT is equal to 0, the following applies: k=0 a=0 b=1<<(BitDepth C -1) - Otherwise, the following applies: diff = maxY - minY - If diff is not equal to 0, the following applies: diffC = maxC - minC x = Floor(Log2(diff)) normDiff=((diff<<4)>>x)&15 x += (normDiff != 0) ? 1 : 0 y = Floor(Log2(Abs(diffC))) + 1 a=(diffC*(divSigTable[normDiff]|8)+2 y-1 )>>y k=((3+xy)<1)?1:3+xy a=((3+xy)<1)?Sign(a)*15:a b = minC - ((a*minY)>>k) Here, divSigTable[] is defined as follows: divSigTable[] ={0,7,6,5,5,4,4,3,3,2,2,1,1,1,1,0} -If not (diff is equal to 0), the following applies: k=0 a=0 b = min C 8. Predicted samples predSamples[x][y] where x=0..nTbW-1, y=0..nTbH-1 are derived as follows: predSamples[x][y] =Clip1C(((pDsY[x][y]*a)>>k)+b)

[0183] Other embodiments differ in the fetching of lumen reference samples with respect to the predicted block position relative to the block boundary. In particular, when the chroma format is specified as YUV 4:2:2 and the chroma and lumen components are in the same position ("Chroma Sample Type 2" and "Chroma Sample Type 4" in Figure 10B), sampling from the lumen component may be performed with a different offset relative to the upper side of the lumen block (see Figures 12A and 12C).

[0184] To obtain a filtered luminance reference sample at position 1202, a filter with the coefficient

[0121] / 4 is applied to the set of reference samples, including the sample at position 1202. Figure 12A shows an embodiment where the top-left sample is available and the chroma format is specified as YUV 4:2:2, or the block boundary 1201 is a CTU line boundary. In this case, the

[0121] / 4 filter is applied to reference sample 1202 (indicated by a hatched rectangle), thereby applying the coefficient 2 / 4 to the coefficient at the central position.

[0185] Figure 12B shows an embodiment in which the block boundary 1201 is not a CTU line boundary, the upper left sample is available, and the chroma format is specified as YUV 4:2:0 (or any other chroma format using vertical chroma subsampling). In this case, the [1 2 1; 1 2 1] / 8 filter is applied to the reference sample 1202 (indicated by the hatched rectangle), thereby applying the coefficient "2 / 4" to the coefficients at the two central positions.

[0186] Figure 12C shows an embodiment in which the upper left sample is unavailable and the chroma format is specified as YUV 4:2:2, or the block boundary 1201 is a CTU line boundary. In this case, a bypass[1] / 1 filter is applied to the reference sample 1202 (indicated by a hatched rectangle).

[0187] Figure 12D shows an embodiment in which the block boundary 1201 is not a CTU line boundary, the upper left sample is available, and the chroma format is specified as YUV 4:2:0 (or any other chroma format using vertical chroma subsampling). In this case, the

[0011] / 2 filter is applied to the reference sample 1202 (indicated by a hatched rectangle).

[0188] The following sections of the VVC specification draft correspond to the cases shown in Figures 12A-12D: The prediction sample predSamples[x][y] for x=0..nTbW-1, y=0..nTbH-1 is derived as follows: - If both numSampL and numSampT are equal to 0, the following applies: predSamples[x][y]=1<<(BitDepth C -1) - Otherwise, the following ordered steps apply: 1. A lumern sample pY[x][y] at the same position, where x=0..nTbW*SubWidthC-1 and y=0..nTbH*SubHeightC-1, is set to be equal to the reconstructed lumern sample before the deblocking filter process at position (xTbY+x, yTbY+y). 2. The adjacent lumens sample pY[x][y] is derived as follows: - When numSampL is greater than 0, the adjacent left lumern sample pY[x][y] where x=-1..-3, y=0..SubHeightC*numSampL-1 is set to equal the reconstructed lumern sample before the deblocking filter process at position (xTbY+x, yTbY+y). - When numSampT is greater than 0, adjacent upper lumern samples pY[x][y] where x=0..SubWidthC*numSampT-1, y=-1,-2 are set to equal the reconstructed lumern samples before the deblocking filter process at position (xTbY+x, yTbY+y). - When availTL is equal to TRUE, adjacent upper-left lumens samples pY[x][y] where x=-1, y=-1, -2 are set to equal the reconstructed lumens sample before the deblocking filter process at position (xTbY+x, yTbY+y). 3. The downsampled lumens sample pDsY[x][y] at the same location, where x=0..nTbW-1 and y=0..nTbH-1, is derived as follows: - If SubWidthC==1 and SubHeightC==1, the following applies: - Let x=1..nTbW-1 and y=1..nTbH-1. The pDsY[x][y] can be derived as follows: pDsY[x][y]=pY[x][y] - Otherwise, the following applies to the filter set {F3,F5,F6}: F3[0]=1,F3[1]=2,F3[2]=1 - If SubWidthC==2 and SubHeightC==2 F5[0][1]=1,F5[1][1]=4,F3[2][1]=1, F5[1][0]=1,F5[1][2]=1,F6[0][1]=1, F6[1][1]=2,F6[2][1]=1,F6[0][2]=1, F6[1][2]=2,F6[2][2]=1,F2[0]=1, F2[1]=1 - Other cases F5[0][1]=0,F5[1][1]=8,F3[2][1]=0, F5[1][0]=0,F5[1][2]=0,F6[0][1]=2, F6[1][1]=4,F6[2][1]=2,F6[0][2]=0, F6[1][2]=0,F6[2][2]=0,F2[0]=2, F2[1]=0 - If sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - For x=1..nTbW-1 and y=1..nTbH-1, the pDsY[x][y] values ​​for F set in F5 are derived as follows: pDsY[x][y]= (F[1][0]*pY[SubWidthC*x][SubHeightC*y-1] +F[0][1]*pY[SubWidthC*x-1][SubHeightC*y] +F[1][1]*pY[SubWidthC*x][SubHeightC*y] +F[2][1]*pY[SubWidthC*x+1][SubHeightC*y] +F[1][2]*pY[SubWidthC*x][SubHeightC*y+1]+4)>>3 - If availL is equal to TRUE, then pDsY[0][y], where y=1..nTbH-1, is derived for F set in F5 as follows: pDsY[0][y]= (F[1][0]*pY[0][SubHeightC*y-1] +F[0][1]*pY[-1][SubHeightC*y] +F[1][1]*pY[0][SubHeightC*y] +F[2][1]*pY[1][SubHeightC*y] +F[1][2]*pY[0][SubHeightC*y+1]+4)>>3 - Otherwise, pDsY[0][y] where y=1..nTbH-1 is derived for F set in F3 as follows: pDsY[0][y]= (F[0]*pY[0][SubHeightC*y-1] +F[1]*pY[0][SubHeightC*y] +F[2]*pY[0][SubHeightC*y+1] +2)>>2 - If availT is equal to TRUE, then pDsY[x][0] where x=1..nTbW-1 is derived for F set in F5 as follows: pDsY[x][0]= (F[1][0]*pY[SubWidthC*x][-1] +F[0][1]*pY[SubWidthC*x-1][0] +F[1][1]*pY[SubWidthC*x][0] +F[2][1]*pY[SubWidthC*x+1][0] +F[1][2]*pY[SubWidthC*x][1]+4)>>3 - Otherwise, pDsY[x][0] where x=1..nTbW-1 is derived for F set in F3 as follows: pDsY[x][0]= (F[0]*pY[SubWidthC*x-1][0] +F[1]*pY[SubWidthC*x][0] +F[2]*pY[SubWidthC*x+1][0]+2)>>2 - If availL is equal to TRUE and availT is equal to TRUE, then pDsY[0][0] is derived for F set to F5 as follows: pDsY[0][0]= (F[1][0]*pY[0][-1] +F[0][1]*pY[-1][0] +F[1][1]*pY[0][0] +F[2][1]*pY[1][0] +F[1][2]*pY[0][1]+4)>>3 - Instead, if availL is equal to TRUE and availT is equal to FALSE, then pDsY[0][0] is derived for F set to F3 as follows: pDsY[0][0]= (F[0]*pY[-1][0] +F[1]*pY[0][0] +F[2]*pY[1][0] +2)>>2 - Instead, if availL is equal to FALSE and availT is equal to TRUE, then pDsY[0][0] is derived for F set to F3 as follows: pDsY[0][0]= (F[0]*pY[0][-1] +F[1]*pY[0][0] +F[2]*pY[0][1] +2)>>2 - In the other case (where availL is equal to FALSE and availT is equal to FALSE), pDsY[0][0] is derived as follows: pDsY[0][0]=pY[0][0] - In other cases, the following applies: - For x=1..nTbW-1 and y=0..nTbH-1, the pDsY[x][y] values ​​for F set in F6 are derived as follows: pDsY[x][y]= (F[0][1]*pY[SubWidthC*x-1][SubHeightC*y] +F[0][2]*pY[SubWidthC*x-1][SubHeightC*y+1] +F[1][1]*pY[SubWidthC*x][SubHeightC*y] +F[1][2]*pY[SubWidthC*x][SubHeightC*y+1] +F[2][1]*pY[SubWidthC*x+1][SubHeightC*y] +F[2][2]*pY[SubWidthC*x+1][SubHeightC*y+1]+4)>>3 - If availL is equal to TRUE, then pDsY[0][y], where y=0..nTbH-1, is derived for F set in F6 as follows: pDsY[0][y]= (F[0][1]*pY[-1][SubHeightC*y] +F[0][2]*pY[-1][SubHeightC*y+1] +F[1][1]*pY[0][SubHeightC*y] +F[1][2]*pY[0][SubHeightC*y+1] +F[2][1]*pY[1][SubHeightC*y] +F[2][2]*pY[1][SubHeightC*y+1]+4)>>3 - Otherwise, pDsY[0][y], where y=0..nTbH-1, is derived for F set in F2 as follows: pDsY[0][y]= (F[0]*pY[0][SubHeightC*y] +F[1]*pY[0][SubHeightC*y+1]+1)>>1 4. When numSampL is greater than 0, the selected adjacent left chroma sample pSelC[idx] is set equal to p[-1][pickPosL[idx]] with idx=0..(cntL-1), and the selected downsampled adjacent left chroma sample pSelDsY[idx] is derived with idx=0..(cntL-1) as follows: - The variable y is set to equal to pickPosL[idx]. - If SubWidthC==1 and SubHeightC==1, the following applies: - pSelDsY[i]=pY[-1][y] - Otherwise, the following applies: - If sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - For F set to F5 when y>0||availTL==TRUE: pSelDsY[idx]= (F[1][0]*pY[-SubWidthC][SubHeightC*y-1] +F[0][1]*pY[-1-SubWidthC][SubHeightC*y] +F[1][1]*pY[-SubWidthC][SubHeightC*y] +F[2][1]*pY[1-SubWidthC][SubHeightC*y] +F[1][2]*pY[-SubWidthC][SubHeightC*y+1]+4)>>3 - Otherwise, for F set to F3: pSelDsY[idx]= (F[0]*pY[-1-SubWidthC][0] +F[1]*pY[-SubWidthC][0] +F[2]*pY[1-SubWidthC][0] +2)>>2 - In other cases, for F set to F6, the following applies: pSelDsY[idx]= (F[0][1]*pY[-1-SubWidthC][SubHeightC*y] +F[0][2]*pY[-1-SubWidthC][SubHeightC*y+1] +F[1][1]*pY[-SubWidthC][SubHeightC*y] +F[1][2]*pY[-SubWidthC][SubHeightC*y+1] +F[2][1]*pY[1-SubWidthC][SubHeightC*y] +F[2][2]*pY[1-SubWidthC][SubHeightC*y+1]+4)>>3 5. When numSampT is greater than 0, the selected adjacent upper chroma sample pSelC[idx] is set equal to p[pickPosT[idx-cntL]][-1], where idx=cntL..(cntL+cntT-1), and the downsampled adjacent upper chroma sample pSelDsY[idx] is derived as follows, where idx=cntL..cntL+cntT-1: - The variable x is set to equal to pickPosT[idx-cntL]. - If SubWidthC==1 and SubHeightC==1, the following applies: - pSelDsY[idx]=pY[x][-1] - Otherwise, the following applies: - If sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - If x > 0: - If bCTUboundary is equal to FALSE, the following applies to F set to F5: pSelDsY[idx]= (F[1][0]*pY[SubWidthC*x][-1-SubHeightC] +F[0][1]*pY[SubWidthC*x-1][-SubHeightC] +F[1][1]*pY[SubWidthC*x][-SubHeightC] +F[2][1]*pY[SubWidthC*x+1][-SubHeightC] +F[1][2]*pY[SubWidthC*x][1-SubHeightC]+4)>>3 - Otherwise (when bCTUboundary is equal to TRUE), the following applies to F set to F3: pSelDsY[idx]= (F[0]*pY[SubWidthC*x-1][-1] +F[1]*pY[SubWidthC*x][-1] +F[2]*pY[SubWidthC*x+1][-1] +2)>>2 - Other cases: - If availTL is equal to TRUE and bCTUboundary is equal to FALSE, the following applies to F set to F5: pSelDsY[idx]= (F[1][0]*pY[-1][-1-SubHeightC] +F[0][1]*pY[-1][-SubHeightC] +F[1][1]*pY[0][-SubHeightC] +F[2][1]*pY[1][-SubHeightC] +F[1][2]*pY[-1][1-SubHeightC]+4)>>3 - Instead, if availTL is equal to TRUE and bCTUboundary is equal to TRUE, the following applies to F set to F3: pSelDsY[idx]= (F[0]*pY[-1][-1] +F[1]*pY[0][-1] +F[2]*pY[1][-1] +2)>>2 (8-182) - Instead, if availTL is equal to FALSE and bCTUboundary is equal to FALSE, then for F set to F3, the following applies: pSelDsY[idx]= (F[0]*pY[0][-1] +F[1]*pY[0][-2] +F[2]*pY[0][-1] +2)>>2 - In other cases (where availTL is equal to FALSE and bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=pY[0][-1] - In other cases, the following applies: - If x > 0: - If bCTUboundary is equal to FALSE, the following applies to F set to F6: pSelDsY[idx]= (F[0][1]*pY[SubWidthC*x-1][-1] +F[0][2]*pY[SubWidthC*x-1][-2] +F[1][1]*pY[SubWidthC*x][-1] +F[1][2]*pY[SubWidthC*x][-2] +F[2][1]*pY[SubWidthC*x+1][-1] +F[2][2]*pY[SubWidthC*x+1][-2]+4)>>3 - Otherwise (when bCTUboundary is equal to TRUE), the following applies to F set to F3: pSelDsY[idx]= (F[0]*pY[SubWidthC*x-1][-1] +F[1]*pY[SubWidthC*x][-1] +F[2][1]*pY[SubWidthC*x+1][-1] +2)>>2 - Other cases: - If availTL is equal to TRUE and bCTUboundary is equal to FALSE, the following applies to F set to F6: pSelDsY[idx]= (F[0][1]*pY[-1][-1] +F[0][2]*pY[-1][-2] +F[1][1]*pY[0][-1] +F[1][2]*pY[0][-2] +F[2][1]*pY[1][-1] +F[2][2]*pY[1][-2]+4)>>3 - Instead, if availTL is equal to TRUE and bCTUboundary is equal to TRUE, the following applies to F set to F3: pSelDsY[idx]= (F[0]*pY[-1][-1] +F[1]*pY[0][-1] +F[2]*pY[1][-1] +2)>>2 - Instead, if availTL is equal to FALSE and bCTUboundary is equal to FALSE, the following applies to F set in F2: pSelDsY[idx]=(F[1]*pY[0][-2]+F[0]*pY[0][-1]+1)>>1 - In other cases (where availTL is equal to FALSE and bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=pY[0][-1] 6. When cntT + cntL is not equal to 0, the variables minY, maxY, minC, and maxC are derived as follows: - When cntT + cntL is equal to 2, set pSelComp[3] to equal pSelComp[0], set pSelComp[2] to equal pSelComp[1], set pSelComp[0] to equal pSelComp[1], and set pSelComp[1] to equal pSelComp[3], where Comp is replaced by DsY and C. - The arrays minGrpIdx[] and maxGrpIdx[] are set to minGrpIdx[0]=0, minGrpIdx[1]=2, maxGrpIdx[0]=1, and maxGrpIdx[1]=3. - If pSelDsY[minGrpIdx[0]] > pSelDsY[minGrpIdx[1]], then Swap(minGrpIdx[0],minGrpIdx[1]). - If pSelDsY[maxGrpIdx[0]] > pSelDsY[maxGrpIdx[1]], then Swap(maxGrpIdx[0],maxGrpIdx[1]). - Swap(minGrpIdx,maxGrpIdx) if pSelDsY[minGrpIdx[0]]>pSelDsY[maxGrpIdx[1]]. - If pSelDsY[minGrpIdx[1]] > pSelDsY[maxGrpIdx[0]], then Swap(minGrpIdx[1],maxGrpIdx[0]). - maxY=(pSelDsY[maxGrpIdx[0]]+pSelDsY[maxGrpIdx[1]]+1)>>1. - maxC=(pSelC[maxGrpIdx[0]]+pSelC[maxGrpIdx[1]]+1)>>1. - minY=(pSelDsY[minGrpIdx[0]]+pSelDsY[minGrpIdx[1]]+1)>>1. - minC=(pSelC[minGrpIdx[0]]+pSelC[minGrpIdx[1]]+1)>>1. 7. Variables a, b, and k are derived as follows: - If numSampL is equal to 0 and numSampT is equal to 0, the following applies: k=0 a=0 b=1<<(BitDepth C -1) - Otherwise, the following applies: diff = maxY - minY - If diff is not equal to 0, the following applies: diffC = maxC - minC x = Floor(Log2(diff)) normDiff=((diff<<4)>>x)&15 x += (normDiff != 0) ? 1 : 0 y = Floor(Log2(Abs(diffC))) + 1 a=(diffC*(divSigTable[normDiff]|8)+2 y-1 )>>y k=((3+xy)<1)?1:3+xy a=((3+xy)<1)?Sign(a)*15:a b = minC - ((a*minY)>>k) Here, divSigTable[] is defined as follows: divSigTable[] ={0,7,6,5,5,4,4,3,3,2,2,1,1,1,1,0} -If not (diff is equal to 0), the following applies: k=0 a=0 b = min C 8. Predicted samples predSamples[x][y] where x=0..nTbW-1, y=0..nTbH-1 are derived as follows: predSamples[x][y] =Clip1C(((pDsY[x][y]*a)>>k)+b)

[0189] Another formulation of the specification uses sequential notation for the filters (F1, F2, F3, and F4). Disclosures using sequential filter notation are as follows: The inputs to this process are: - Intra predictive mode predModeIntra, - The sample position (xTbC, yTbC) of the top-left sample of the current transformation block relative to the top-left sample of the current picture. - Variable nTbW that specifies the width of the transformation block, - Variable nTbH that specifies the height of the transformation block, - These are chromatic adjacent samples p[x][y] where x=-1, y=0..2*nTbH-1 and x=0..2*nTbW-1, y=-1. The output of this process is predSamples[x][y] where x=0..nTbW-1, y=0..nTbH-1. The current luma position (xTbY, yTbY) is derived as follows: (xTbY,yTbY)=(xTbC<<(SubWidthC-1),yTbC<<(SubHeightC-1)) (346) The variables availL, availT, and availTL are derived as follows: - The process for deriving the availability of adjacent blocks, as defined in Section 6.4.4, is invoked using the current chroma position (xCurr, yCurr) set to (xTbC, yTbC), the adjacent chroma position (xTbC-1, yTbC), checkPredModeY set to FALSE, and cIdx as inputs, and the output is assigned to availL. - The process for deriving the availability of adjacent blocks, as defined in Section 6.4.4, is invoked using the current chroma position (xCurr, yCurr) set to (xTbC, yTbC) m adjacent chroma position (xTbC, yTbC-1), checkPredModeY set to FALSE, and cIdx as inputs, and the output is assigned to availT. - The variable availTL is derived as follows: availTL=availL&&availT (347) - The number of available top-right adjacent chroma samples, numTopRight, is derived as follows: - The variable numTopRight is set to equal to 0, and availTR is set to equal to TRUE. - When predModeIntra is equal to INTRA_T_CCLM, for x = nTbW..2*nTbW-1, the following applies until availTR is equal to FALSE or x is equal to 2*nTbW-1: - The process for deriving the availability of adjacent blocks, as defined in Section 6.4.4, is invoked using the current chroma position (xCurr, yCurr) set to (xTbC, yTbC), the adjacent chroma position (xTbC+x, yTbC-1), checkPredModeY set to FALSE, and cIdx as inputs, and the output is assigned to availableTR. - When availableTR is equal to TRUE, numTopRight is incremented by 1. - The number of available lower-left adjacent chroma samples, numLeftBelow, is derived as follows: - The variable numLeftBelow is set to equal to 0, and availLB is set to equal to TRUE. - When predModeIntra is equal to INTRA_L_CCLM, for y=nTbH..2*nTbH-1, the following applies until availLB is equal to FALSE or y is equal to 2*nTbH-1: - The process for deriving the availability of adjacent blocks, as defined in Section 6.4.4, is invoked using the current chroma position (xCurr, yCurr) set to (xTbC, yTbC), the adjacent chroma position (xTbC-1, yTbC+y), checkPredModeY set to FALSE, and cIdx as inputs, and the output is assigned to availLB. - When availLB is equal to TRUE, numLeftBelow is incremented by 1. The number of available adjacent chromatic samples at the top and upper right, numSampT, and the number of available adjacent chromatic samples at the left and lower left, numSampL, are derived as follows: - When predModeIntra is equal to INTRA_LT_CCLM, the following applies: numSampT=availT?nTbW:0 (348) numSampL=availL?nTbH:0 (349) - Otherwise, the following applies: numSampT=(availT&&predModeIntra==INTRA_T_CCLM)?(nTbW+Min(numTopRight,nTbH)):0 (350) numSampL=(availL&&predModeIntra==INTRA_L_CCLM)?(nTbH+Min(numLeftBelow,nTbW)):0 (351) The variable bCTUboundary is derived as follows: bCTUboundary=(yTbC&(1<<(CtbLog2SizeY-1)-1)==0)?TRUE:FALSE (352) The variable cntN and the array pickPosN, where N is replaced by L and T, are derived as follows: - The variable numIs4N is derived as follows: numIs4N=((availT&&availL&&predModeIntra==INTRA LT CCLM)?0:1) (353) - The variable startPosN is set to equal numSampN >> (2 + numIs4N). The variable pickStepN is set to equal to Max(1, numSampN >> (1 + numIs4N)). - When availN is equal to TRUE and predModeIntra is equal to INTRA_LT_CCLM or INTRA_N_CCLM, the following assignment is made: - cntN is set equal to Min(numSampN,(1+numIs4N)<<1). - pickPosN[pos] is set equal to (startPosN+pos*pickStepN), where pos = 0..(cntN-1). - Otherwise, cntN is set equal to 0. The prediction samples predSamples[x][y] with x = 0..nTbW-1, y = 0..nTbH-1 are derived as follows: - When both numSampL and numSampT are equal to 0, the following applies: predSamples[x][y] =1<<(BitDepth C -1) (354) - Otherwise, the following ordered steps apply: 1. The luma sample pY[x][y] at the same position with x = 0..nTbW*SubWidthC-1, y = 0..nTbH*SubHeightC-1 is set equal to the reconstructed luma sample before the deblocking filter process at position (xTbY+x,yTbY+y). 2. The adjacent luma samples pY[x][y] are derived as follows: - When numSampL is greater than 0, the adjacent left luma samples pY[x][y] with x = -1..-3, y = 0..SubHeightC*numSampL-1 are set equal to the reconstructed luma samples before the deblocking filter process at position (xTbY+x,yTbY+y). - When numSampT is greater than 0, adjacent upper lumern samples pY[x][y] where x=0..SubWidthC*numSampT-1, y=-1,-2 are set to equal the reconstructed lumern samples before the deblocking filter process at position (xTbY+x, yTbY+y). - When availTL is equal to TRUE, adjacent upper-left lumens samples pY[x][y] where x=-1, y=-1, -2 are set to equal the reconstructed lumens sample before the deblocking filter process at position (xTbY+x, yTbY+y). 3. The downsampled lumens sample pDsY[x][y] at the same location, where x=0..nTbW-1 and y=0..nTbH-1, is derived as follows: - If both SubWidthC and SubHeightC are equal to 1, the following applies: - Let x=1..nTbW-1 and y=1..nTbH-1. The pDsY[x][y] can be derived as follows: pDsY[x][y]=pY[x][y] (355) - Otherwise, the following applies: - The one-dimensional filter coefficient arrays F1 and F2, and the two-dimensional filter coefficient arrays F3 and F4 are defined as follows: F1[0]=2,F1[1]=0 (356) F2[0]=1,F2[1]=2,F2[2]=1 (357) F3[i][j]=F4[i][j]=0, However, i=0..2, j=0..2 (358) - If both SubWidthC and SubHeightC are equal to 2, the following applies: F1[0]=1,F1[1]=1 (359) F3[0][1]=1,F3[1][1]=4,F3[2][1]=1, F3[1][0]=1,F3[1][2]=1 (360) F4[0][1]=1,F4[1][1]=2,F4[2][1]=1 (361) F4[0][2]=1,F4[1][2]=2,F4[2][2]=1 (362) - In other cases, the following applies: F3[1][1]=8 (363) F4[0][1]=2,F4[1][1]=4,F4[2][1]=2 (364) -If sps_chroma_vertical_collocated_flag is equal to 1, the following applies: - Let x=1..nTbW-1 and y=1..nTbH-1. The pDsY[x][y] can be derived as follows: pDsY[x][y]=(F3[1][0]*pY[SubWidthC*x][SubHeightC*y-1]+F3[0][1]*pY[SubWidthC*x-1][SubHeightC*y]+F3[1][1]*pY[SubW idthC*x][SubHeightC*y]+F3[2][1]*pY[SubWidthC*x+1][SubHeightC*y]+F3[1][2]*pY[SubWidthC*x][SubHeightC*y+1]+4)>>3 (365) - If availL is equal to TRUE, then pDsY[0][y], where y=1..nTbH-1, is derived as follows: pDsY[0][y]= (F3[1][0]*pY[0][SubHeightC*y-1]+ F3[0][1]*pY[-1][SubHeightC*y]+ F3[1][1]*pY[0][SubHeightC*y]+ F3[2][1]*pY[1][SubHeightC*y]+ F3[1][2]*pY[0][SubHeightC*y+1] +4)>>3 (366) - If not (availL is equal to FALSE), then pDsY[0][y] where y=1..nTbH-1 is derived as follows: pDsY[0][y]= (F2[0]*pY[0][SubHeightC*y-1]+ F2[1]*pY[0][SubHeightC*y]+ F2[2]*pY[0][SubHeightC*y+1] +2)>>2 (367) - If availT is equal to TRUE, then pDsY[x][0] where x=1..nTbW-1 is derived as follows: pDsY[x][0]= (F3[1][0]*pY[SubWidthC*x][-1]+ F3[0][1]*pY[SubWidthC*x-1][0]+ F3[1][1]*pY[SubWidthC*x][0]+ F3[2][1]*pY[SubWidthC*x+1][0]+ F3[1][2]*pY[SubWidthC*x][1] +4)>>3 (368) - If not (availT is equal to FALSE), then pDsY[x][0] where x=1..nTbW-1 is derived as follows: pDsY[x][0]= (F2[0]*pY[SubWidthC*x-1][0]+ F2[1]*pY[SubWidthC*x][0]+ F2[2]*pY[SubWidthC*x+1][0] +2)>>2 (369) - If availL is equal to TRUE and availT is equal to TRUE, then pDsY[0][0] is derived as follows: pDsY[0][0]= (F3[1][0]*pY[0][-1]+ F3[0][1]*pY[-1][0]+ F3[1][1]*pY[0][0]+ F3[2][1]*pY[1][0]+ F3[1][2]*pY[0][1]+4)>>3 (370) - Instead, if availL is equal to TRUE and availT is equal to FALSE, then pDsY[0][0] is derived as follows: pDsY[0][0]=(F2[0]*pY[-1][0] +F2[1]*pY[0][0]+F2[2]*pY[1][0] +2)>>2 (371) - Instead, if availL is equal to FALSE and availT is equal to TRUE, then pDsY[0][0] is derived as follows: pDsY[0][0]=(F2[0]*pY[0][-1] +F2[1]*pY[0][0]+F2[2]*pY[0][1] +2)>>2 (372) - In the other case (where availL is equal to FALSE and availT is equal to FALSE), pDsY[0][0] is derived as follows: pDsY[0][0]=pY[0][0] (373) - In other cases (when sps_chroma_vertical_collocated_flag is equal to 0), the following applies: - Let x=1..nTbW-1, y=0..nTbH-1. The pDsY[x][y] can be derived as follows: pDsY[x][y]=(F4[0][1]*pY[SubWidthC*x-1][SubHeightC*y]+F4[0][2]*pY[SubWidthC*x-1][SubHeightC*y+1]+F4[1][1]*pY[SubWidthC*x][SubHeightC* y]+F4[1][2]*pY[SubWidthC*x][SubHeightC*y+1]+F4[2][1]*pY[SubWidthC*x+1][SubHeightC*y]+F4[2][2]*pY[SubWidthC*x+1][SubHeightC*y+1]+4)>>3 (374) - If availL is equal to TRUE, then pDsY[0][y], where y=0..nTbH-1, is derived as follows: pDsY[0][y]= (F4[0][1]*pY[-1][SubHeightC*y]+ F4[0][2]*pY[-1][SubHeightC*y+1]+ F4[1][1]*pY[0][SubHeightC*y]+ F4[1][2]*pY[0][SubHeightC*y+1]+ F4[2][1]*pY[1][SubHeightC*y]+ F4[2][2]*pY[1][SubHeightC*y+1] +4)>>3 (375) - If not (availL is equal to FALSE), then pDsY[0][y] where y=0..nTbH-1 is derived as follows: pDsY[0][y]=(F1[0]*pY[0][SubHeightC*y]+ F1[1]*pY[0][SubHeightC*y+1]+1) >>1 (376) 4. When numSampL is greater than 0, the selected adjacent left chroma sample pSelC[idx] is set equal to p[-1][pickPosL[idx]] with idx=0..cntL-1, and the selected downsampled adjacent left chroma sample pSelDsY[idx] is derived with idx=0..cntL-1 as follows: - The variable y is set to equal to pickPosL[idx]. - If both SubWidthC and SubHeightC are equal to 1, the following applies: pSelDsY[idx]=pY[-1][y] (377) - Otherwise, the following applies: - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies: - If y is greater than 0 or availTL is equal to TRUE, then pSelDsY[idx] is derived as follows: pSelDsY[idx]=(F3[1][0]*pY[-SubWidthC][SubHeightC*y-1]+F3[0][1]*pY[-1-SubWidthC][SubHeightC*y]+F3[1][1]*pY[-S ubWidthC][SubHeightC*y]+F3[2][1]*pY[1-SubWidthC][SubHeightC*y]+F3[1][2]*pY[-SubWidthC][SubHeightC*y+1]+4)>>3 (378) - Otherwise (when y is equal to 0), pSelDsY[idx] is derived as follows: pSelDsY[idx]= (F2[0]*pY[-1-SubWidthC][0]+ F2[1]*pY[-SubWidthC][0]+ F2[2]*pY[1-SubWidthC][0] +2)>>2 (379) - In other cases (when sps_chroma_vertical_collocated_flag is equal to 0), the following applies: pSelDsY[idx]=(F4[0][1]*pY[-1-SubWidthC][SubHeightC*y]+F4[0][2]*pY[-1-SubWidthC][SubHeightC*y+1]+F4[1][1]*pY[-SubWidthC][SubHeight C*y]+F4[1][2]*pY[-SubWidthC][SubHeightC*y+1]+F4[2][1]*pY[1-SubWidthC][SubHeightC*y]+F4[2][2]*pY[1-SubWidthC][SubHeightC*y+1]+4)>>3 (380) 5. When numSampT is greater than 0, the selected adjacent upper chroma sample pSelC[idx] is set to equal p[pickPosT[idx-cntL]][-1], where idx=cntL..cntL+cntT-1, and the downsampled adjacent upper chroma sample pSelDsY[idx] is defined as follows, where idx=0..cntL+cntT-1: - The variable x is set to equal to pickPosT[idx-cntL]. - If both SubWidthC and SubHeightC are equal to 1, the following applies: pSelDsY[idx]=pY[x][-1] (381) - Otherwise, the following applies: - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies: - If x is greater than 0, the following applies: - If bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(F3[1][0]*pY[SubWidthC*x][-1-SubHeightC]+F3[0][1]*pY[SubWidthC*x-1][-SubHeightC]+F3[1][1]*pY[Su bWidthC*x][-SubHeightC]+F3[2][1]*pY[SubWidthC*x+1][-SubHeightC]+F3[1][2]*pY[SubWidthC*x][1-SubHeightC]+4)>>3 (382) - Otherwise (when bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]= (F2[0]*pY[SubWidthC*x-1][-1]+ F2[1]*pY[SubWidthC*x][-1]+ F2[2]*pY[SubWidthC*x+1][-1] +2)>>2 (383) - In other cases (when x is equal to 0), the following applies: - If availTL is equal to TRUE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=F3[1][0]*pY[-1][-1-SubHeightC]+F3[0][1]*pY[-1][-SubHeightC]+F3[1][1]* pY[0][-SubHeightC]+F3[2][1]*pY[1][-SubHeightC]+F3[1][2]*pY[-1][1-SubHeightC]+4)>>3 (384) - Instead, if availTL is equal to TRUE and bCTUboundary is equal to TRUE, the following applies: pSelDsY[idx]=(F2[0]*pY[-1][-1]+ F2[1]*pY[0][-1]+F2[2]*pY[1][-1]+2) >>2 (385) - If availTL is equal to FALSE and bCTUboundary is equal to FALSE, then the following applies: pSelDsY[idx]=(F2[0]*pY[0][-1]+ F2[1]*pY[0][-2]+F2[2]*pY[0][-1]+2) >>2 (386) - In other cases (where availTL is equal to FALSE and bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=pY[0][-1] (387) - In other cases (when sps_chroma_vertical_collocated_flag is equal to 0), the following applies: - If x is greater than 0, the following applies: - If bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(F4[0][1]*pY[SubWidthC*x-1][-1]+F4[0][2]*pY[SubWidthC*x-1][-2]+F4[1][1]*pY[SubWidthC*x] [-1]+F4[1][2]*pY[SubWidthC*x][-2]+F4[2][1]*pY[SubWidthC*x+1][-1]+F4[2][2]*pY[SubWidthC*x+1][-2]+4)>>3 (388) - Otherwise (when bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]= (F2[0]*pY[SubWidthC*x-1][-1]+ F2[1]*pY[SubWidthC*x][-1]+ F2[2]*pY[SubWidthC*x+1][-1] +2)>>2 (389) - In other cases (when x is equal to 0), the following applies: - If availTL is equal to TRUE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(F4[0][1]*pY[-1][-1]+F4[0][2]*pY[-1][-2]+F4[1][1]*pY[0 ][-1]+F4[1][2]*pY[0][-2]+F4[2][1]*pY[1][-1]+F4[2][2]*pY[1][-2]+4)>>3 (390) - Instead, if availTL is equal to TRUE and bCTUboundary is equal to TRUE, the following applies: pSelDsY[idx]=(F2[0]*pY[-1][-1]+ F2[1]*pY[0][-1]+F2[2]*pY[1][-1]+2) >>2 (391) - Instead, if availTL is equal to FALSE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(F1[1]*pY[0][-2]+ F1[0]*pY[0][-1]+1)>>1 (392) - In other cases (where availTL is equal to FALSE and bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=pY[0][-1] (393) 6. When cntT + cntL is not equal to 0, the variables minY, maxY, minC, and maxC are derived as follows: - When cntT + cntL is equal to 2, pSelComp[3] is set to equal to pSelComp[0], pSelComp[2] is set to equal to pSelComp[1], pSelComp[0] is set to equal to pSelComp[1], and pSelComp[1] is set to equal to pSelComp[3], where Comp is replaced by DsY and C. - The array values ​​minGrpIdx and maxGrpIdx are derived as follows: minGrpIdx[0]=0 (394) minGrpIdx[1]=2 (395) maxGrpIdx[0]=1 (396) maxGrpIdx[1]=3 (397) - When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[minGrpIdx[1]], minGrpIdx[0] and minGrpIdx[1] are swapped as follows: (minGrpIdx[0],minGrpIdx[1]) =Swap(minGrpIdx[0],minGrpIdx[1]) (398) - When pSelDsY[maxGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], maxGrpIdx[0] and maxGrpIdx[1] are swapped as follows: (maxGrpIdx[0],maxGrpIdx[1]) =Swap(maxGrpIdx[0],maxGrpIdx[1]) (399) - When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], the arrays minGrpIdx and maxGrpIdx are swapped as follows: (minGrpIdx, maxGrpIdx) =Swap(minGrpIdx,maxGrpIdx) (400) - When pSelDsY[minGrpIdx[1]] is greater than pSelDsY[maxGrpIdx[0]], minGrpIdx[1] and maxGrpIdx[0] are swapped as follows: (minGrpIdx[1],maxGrpIdx[0]) =Swap(minGrpIdx[1],maxGrpIdx[0]) (401) -The variables minY, maxY, minC, and maxC are derived as follows: maxY=(pSelDsY[maxGrpIdx[0]] +pSelDsY[maxGrpIdx[1]]+1)>>1 (402) maxC=(pSelC[maxGrpIdx[0]] +pSelC[maxGrpIdx[1]]+1)>>1 (403) minY=(pSelDsY[minGrpIdx[0]] +pSelDsY[minGrpIdx[1]]+1)>>1 (404) minC=(pSelC[minGrpIdx[0]] +pSelC[minGrpIdx[1]]+1)>>1 (405) 7. Variables a, b, and k are derived as follows: - If numSampL is equal to 0 and numSampT is equal to 0, the following applies: k=0 (406) a=0 (407) b=1<<(BitDepth C -1) (408) - Otherwise, the following applies: diff = maxY - minY (409) - If diff is not equal to 0, the following applies: diffC = maxC - minC (410) x = Floor(Log2(diff)) (411) normDiff=((diff<<4)>>x)&15 (412) x + = (normDiff != 0) ? 1 : 0 (413) y=Floor(Log2(Abs(diffC)))+1 (414) a=(diffC*(divSigTable[normDiff]|8) +2 y-1 )>>y (415) k=((3+xy)<1)?1:3+xy (416) a=((3+xy)<1)?Sign(a)*15:a (417) b = minC - ((a*minY)>>k) (418) Here, divSigTable[] is defined as follows: divSigTable[] ={0,7,6,5,5,4,4,3,3,2,2,1,1,1,1,0} (419) -If not (diff is equal to 0), the following applies: k=0 (420) a=0 (421) b = min C (422) 8. Predicted samples predSamples[x][y] where x=0..nTbW-1, y=0..nTbH-1 are derived as follows: predSamples[x][y] =Clip1(((pDsY[x][y]*a)>>k)+b) (423) Note - This process uses sps_chroma_vertical_collocated_flag. However, for ease of implementation, it does not use sps_chroma_horizontal_collocated_flag.

[0190] In other embodiments, padding operations may be used to implement filter selection on the boundaries of the reconstructed rumor block. When a filter is applied to an area of ​​the reconstructed sample, the filtering process should be adjusted when the location of the filtered area is on a block boundary.

[0191] Figure 13 shows the filtering operation on the reconstructed luminance block 1301 by an example 3-tap filter 1302. When filtering boundary samples, one of the filter coefficients may not be used in the filtering operation because the reconstructed lumens sample is at the same position as the reconstructed sample outside the bloom case, which may be unavailable for the left side 1303.

[0192] In the above embodiment, it was proposed to reduce the number of filter taps applied to the reconstructed luminance samples in the left column and top row. In practice, the filter coefficients were defined to be position-dependent.

[0193] In other embodiments, this position dependency is handled by left and top padding for reconstructed samples at the boundary. When the left side is unavailable, the sample on the unavailable side is obtained by horizontally copying the leftmost reconstructed sample of the reconstructed block 1301. This operation is effectively a duplicate of the first column of reconstructed samples on the left side. When the top side is unavailable, the sample on the unavailable side is obtained by vertically copying the topmost reconstructed sample of the reconstructed block 1301. This operation is effectively a duplicate of the first row of reconstructed samples above block 1301.

[0194] It is noted that linear filtering of an area of ​​a reconstructed sample containing padded samples can be performed without using the padding action. In fact, for this location in the area, a longer tap filter can be replaced with an equivalent filter of a lower order. The presence of padded samples within the filtered area allows for a simplified filtering action through coefficient grouping.

[0195] This embodiment may be represented as the following part of the VVC specification: 3. The downsampled lumens sample pDsY[x][y] at the same location, where x=0..nTbW-1 and y=0..nTbH-1, is derived as follows: - If both SubWidthC and SubHeightC are equal to 1, the following applies: - Let x=1..nTbW-1 and y=1..nTbH-1. The pDsY[x][y] can be derived as follows: pDsY[x][y]=pY[x][y] (355) - Otherwise, the following applies: - The one-dimensional filter coefficient arrays F1 and F2, and the two-dimensional filter coefficient arrays F3 and F4 are defined as follows: F1[0]=4,F1[1]=0 (356) F2[0]=1,F2[1]=2,F2[2]=1 (357) F3[i][j]=F4[i][j]=0, However, i=0..2, j=0..2 (358) - If both SubWidthC and SubHeightC are equal to 2, the following applies: F1[0]=3,F1[1]=1 (359) F3[0][1]=1,F3[1][1]=4,F3[2][1]=1, F3[1][0]=1,F3[1][2]=1 (360) F4[0][1]=1,F4[1][1]=2,F4[2][1]=1 (361) F4[0][2]=1,F4[1][2]=2,F4[2][2]=1 (362) - In other cases, the following applies: F3[1][1]=8 (363) F4[0][1]=2,F4[1][1]=4,F4[2][1]=2 (364) -If sps_chroma_vertical_collocated_flag is equal to 1, the following applies: - Let x=1..nTbW-1 and y=1..nTbH-1. The pDsY[x][y] can be derived as follows: pDsY[x][y]=(F3[1][0]*pY[SubWidthC*x][SubHeightC*y-1]+F3[0][1]*pY[SubWidthC*x-1][SubHeightC*y]+F3[1][1]*pY[SubW idthC*x][SubHeightC*y]+F3[2][1]*pY[SubWidthC*x+1][SubHeightC*y]+F3[1][2]*pY[SubWidthC*x][SubHeightC*y+1]+4)>>3 (365) - If availL is equal to TRUE, then pDsY[0][y], where y=1..nTbH-1, is derived as follows: pDsY[0][y]= (F3[1][0]*pY[0][SubHeightC*y-1]+ F3[0][1]*pY[-1][SubHeightC*y]+ F3[1][1]*pY[0][SubHeightC*y]+ F3[2][1]*pY[1][SubHeightC*y]+ F3[1][2]*pY[0][SubHeightC*y+1] +4)>>3 (366) - If not (availL is equal to FALSE), then pDsY[0][y] where y=1..nTbH-1 is derived as follows: pDsY[0][y]= (F2[0]*pY[0][SubHeightC*y-1]+ F2[1]*pY[0][SubHeightC*y]+ F2[2]*pY[0][SubHeightC*y+1] +2)>>2 (367) - If availT is equal to TRUE, then pDsY[x][0] where x=1..nTbW-1 is derived as follows: pDsY[x][0]= (F3[1][0]*pY[SubWidthC*x][-1]+ F3[0][1]*pY[SubWidthC*x-1][0]+ F3[1][1]*pY[SubWidthC*x][0]+ F3[2][1]*pY[SubWidthC*x+1][0]+ F3[1][2]*pY[SubWidthC*x][1] +4)>>3 (368) - If not (availT is equal to FALSE), then pDsY[x][0] where x=1..nTbW-1 is derived as follows: pDsY[x][0]= (F2[0]*pY[SubWidthC*x-1][0]+ F2[1]*pY[SubWidthC*x][0]+ F2[2]*pY[SubWidthC*x+1][0] +2)>>2 (369) - If availL is equal to TRUE and availT is equal to TRUE, then pDsY[0][0] is derived as follows: pDsY[0][0]= (F3[1][0]*pY[0][-1]+ F3[0][1]*pY[-1][0]+ F3[1][1]*pY[0][0]+ F3[2][1]*pY[1][0]+ F3[1][2]*pY[0][1]+4)>>3 (370) - Instead, if availL is equal to TRUE and availT is equal to FALSE, then pDsY[0][0] is derived as follows: pDsY[0][0]=(F2[0]*pY[-1][0] +F2[1]*pY[0][0]+F2[2]*pY[1][0] +2)>>2 (371) - Instead, if availL is equal to FALSE and availT is equal to TRUE, then pDsY[0][0] is derived as follows: pDsY[0][0]=(F2[0]*pY[0][-1] +F2[1]*pY[0][0]+F2[2]*pY[0][1] +2)>>2 (372) - In the other case (where availL is equal to FALSE and availT is equal to FALSE), pDsY[0][0] is derived as follows: pDsY[0][0]=pY[0][0] (373) - In other cases (when sps_chroma_vertical_collocated_flag is equal to 0), the following applies: - Let x=1..nTbW-1, y=0..nTbH-1. The pDsY[x][y] can be derived as follows: pDsY[x][y]=(F4[0][1]*pY[SubWidthC*x-1][SubHeightC*y]+F4[0][2]*pY[SubWidthC*x-1][SubHeightC*y+1]+F4[1][1]*pY[SubWidthC*x][SubHeightC* y]+F4[1][2]*pY[SubWidthC*x][SubHeightC*y+1]+F4[2][1]*pY[SubWidthC*x+1][SubHeightC*y]+F4[2][2]*pY[SubWidthC*x+1][SubHeightC*y+1]+4)>>3 (374) - If availL is equal to TRUE, then pDsY[0][y], where y=0..nTbH-1, is derived as follows: pDsY[0][y]= (F4[0][1]*pY[-1][SubHeightC*y]+ F4[0][2]*pY[-1][SubHeightC*y+1]+ F4[1][1]*pY[0][SubHeightC*y]+ F4[1][2]*pY[0][SubHeightC*y+1]+ F4[2][1]*pY[1][SubHeightC*y]+ F4[2][2]*pY[1][SubHeightC*y+1] +4)>>3 (375) - If not (availL is equal to FALSE), then pDsY[0][y] where y=0..nTbH-1 is derived as follows: pDsY[0][y]=(F1[0]*pY[0][SubHeightC*y]+ F1[1]*pY[0][SubHeightC*y+1]+2) >>2 (376) 4. When numSampL is greater than 0, the selected adjacent left chroma sample pSelC[idx] is set equal to p[-1][pickPosL[idx]] with idx=0..cntL-1, and the selected downsampled adjacent left chroma sample pSelDsY[idx] is derived with idx=0..cntL-1 as follows: - The variable y is set to equal to pickPosL[idx]. - If both SubWidthC and SubHeightC are equal to 1, the following applies: pSelDsY[idx]=pY[-1][y] (377) - Otherwise, the following applies: - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies: - If y is greater than 0 or availTL is equal to TRUE, then pSelDsY[idx] is derived as follows: pSelDsY[idx]=(F3[1][0]*pY[-SubWidthC][SubHeightC*y-1]+F3[0][1]*pY[-1-SubWidthC][SubHeightC*y]+F3[1][1]*pY[-S ubWidthC][SubHeightC*y]+F3[2][1]*pY[1-SubWidthC][SubHeightC*y]+F3[1][2]*pY[-SubWidthC][SubHeightC*y+1]+4)>>3 (378) - Otherwise (when y is equal to 0), pSelDsY[idx] is derived as follows: pSelDsY[idx]= (F2[0]*pY[-1-SubWidthC][0]+ F2[1]*pY[-SubWidthC][0]+ F2[2]*pY[1-SubWidthC][0] +2)>>2 (379) - In other cases (when sps_chroma_vertical_collocated_flag is equal to 0), the following applies: pSelDsY[idx]=(F4[0][1]*pY[-1-SubWidthC][SubHeightC*y]+F4[0][2]*pY[-1-SubWidthC][SubHeightC*y+1]+F4[1][1]*pY[-SubWidthC][SubHeight C*y]+F4[1][2]*pY[-SubWidthC][SubHeightC*y+1]+F4[2][1]*pY[1-SubWidthC][SubHeightC*y]+F4[2][2]*pY[1-SubWidthC][SubHeightC*y+1]+4)>>3 (380) 5. When numSampT is greater than 0, the selected adjacent upper chroma sample pSelC[idx] is set to equal p[pickPosT[idx-cntL]][-1], where idx=cntL..cntL+cntT-1, and the downsampled adjacent upper chroma sample pSelDsY[idx] is defined as follows, where idx=0..cntL+cntT-1: - The variable x is set to equal to pickPosT[idx-cntL]. - If both SubWidthC and SubHeightC are equal to 1, the following applies: pSelDsY[idx]=pY[x][-1] (381) - Otherwise, the following applies: - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies: - If x is greater than 0, the following applies: - If bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(F3[1][0]*pY[SubWidthC*x][-1-SubHeightC]+F3[0][1]*pY[SubWidthC*x-1][-SubHeightC]+F3[1][1]*pY[Su bWidthC*x][-SubHeightC]+F3[2][1]*pY[SubWidthC*x+1][-SubHeightC]+F3[1][2]*pY[SubWidthC*x][1-SubHeightC]+4)>>3 (382) - Otherwise (when bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]= (F2[0]*pY[SubWidthC*x-1][-1]+ F2[1]*pY[SubWidthC*x][-1]+ F2[2]*pY[SubWidthC*x+1][-1] +2)>>2 (383) - In other cases (when x is equal to 0), the following applies: - If availTL is equal to TRUE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=F3[1][0]*pY[-1][-1-SubHeightC]+F3[0][1]*pY[-1][-SubHeightC]+F3[1][1]* pY[0][-SubHeightC]+F3[2][1]*pY[1][-SubHeightC]+F3[1][2]*pY[-1][1-SubHeightC]+4)>>3 (384) - Instead, if availTL is equal to TRUE and bCTUboundary is equal to TRUE, the following applies: pSelDsY[idx]=(F2[0]*pY[-1][-1]+ F2[1]*pY[0][-1]+F2[2]*pY[1][-1]+2) >>2 (385) - If availTL is equal to FALSE and bCTUboundary is equal to FALSE, then the following applies: pSelDsY[idx]=(F2[0]*pY[0][-1]+ F2[1]*pY[0][-2]+F2[2]*pY[0][-1]+2) >>2 (386) - In other cases (where availTL is equal to FALSE and bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=pY[0][-1] (387) - In other cases (when sps_chroma_vertical_collocated_flag is equal to 0), the following applies: - If x is greater than 0, the following applies: - If bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(F4[0][1]*pY[SubWidthC*x-1][-1]+F4[0][2]*pY[SubWidthC*x-1][-2]+F4[1][1]*pY[SubWidthC*x] [-1]+F4[1][2]*pY[SubWidthC*x][-2]+F4[2][1]*pY[SubWidthC*x+1][-1]+F4[2][2]*pY[SubWidthC*x+1][-2]+4)>>3 (388) - Otherwise (when bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]= (F2[0]*pY[SubWidthC*x-1][-1]+ F2[1]*pY[SubWidthC*x][-1]+ F2[2]*pY[SubWidthC*x+1][-1] +2)>>2 (389) - In other cases (when x is equal to 0), the following applies: - If availTL is equal to TRUE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(F4[0][1]*pY[-1][-1]+F4[0][2]*pY[-1][-2]+F4[1][1]*pY[0 ][-1]+F4[1][2]*pY[0][-2]+F4[2][1]*pY[1][-1]+F4[2][2]*pY[1][-2]+4)>>3 (390) - Instead, if availTL is equal to TRUE and bCTUboundary is equal to TRUE, the following applies: pSelDsY[idx]=(F2[0]*pY[-1][-1]+ F2[1]*pY[0][-1]+F2[2]*pY[1][-1]+2) >>2 (391) - Instead, if availTL is equal to FALSE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(F1[1]*pY[0][-2]+ F1[0]*pY[0][-1]+2)>>2 (392) - In other cases (where availTL is equal to FALSE and bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=pY[0][-1] (393) 6. When cntT + cntL is not equal to 0, the variables minY, maxY, minC, and maxC are derived as follows: - When cntT + cntL is equal to 2, pSelComp[3] is set to equal to pSelComp[0], pSelComp[2] is set to equal to pSelComp[1], pSelComp[0] is set to equal to pSelComp[1], and pSelComp[1] is set to equal to pSelComp[3], where Comp is replaced by DsY and C. - The array values ​​minGrpIdx and maxGrpIdx are derived as follows: minGrpIdx[0]=0 (394) minGrpIdx[1]=2 (395) maxGrpIdx[0]=1 (396) maxGrpIdx[1]=3 (397) - When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[minGrpIdx[1]], minGrpIdx[0] and minGrpIdx[1] are swapped as follows: (minGrpIdx[0],minGrpIdx[1]) =Swap(minGrpIdx[0],minGrpIdx[1]) (398) - When pSelDsY[maxGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], maxGrpIdx[0] and maxGrpIdx[1] are swapped as follows: (maxGrpIdx[0],maxGrpIdx[1]) =Swap(maxGrpIdx[0],maxGrpIdx[1]) (399) - When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], the arrays minGrpIdx and maxGrpIdx are swapped as follows: (minGrpIdx, maxGrpIdx) =Swap(minGrpIdx,maxGrpIdx) (400) - When pSelDsY[minGrpIdx[1]] is greater than pSelDsY[maxGrpIdx[0]], minGrpIdx[1] and maxGrpIdx[0] are swapped as follows: (minGrpIdx[1],maxGrpIdx[0]) =Swap(minGrpIdx[1],maxGrpIdx[0]) (401) -The variables minY, maxY, minC, and maxC are derived as follows: maxY=(pSelDsY[maxGrpIdx[0]] +pSelDsY[maxGrpIdx[1]]+1)>>1 (402) maxC=(pSelC[maxGrpIdx[0]] +pSelC[maxGrpIdx[1]]+1)>>1 (403) minY=(pSelDsY[minGrpIdx[0]] +pSelDsY[minGrpIdx[1]]+1)>>1 (404) minC=(pSelC[minGrpIdx[0]] +pSelC[minGrpIdx[1]]+1)>>1 (405) 7. Variables a, b, and k are derived as follows: - If numSampL is equal to 0 and numSampT is equal to 0, the following applies: k=0 (406) a=0 (407) b=1<<(BitDepth C -1) (408) - Otherwise, the following applies: diff = maxY - minY (409) - If diff is not equal to 0, the following applies: diffC = maxC - minC (410) x = Floor(Log2(diff)) (411) normDiff=((diff<<4)>>x)&15 (412) x + = (normDiff != 0) ? 1 : 0 (413) y=Floor(Log2(Abs(diffC)))+1 (414) a=(diffC*(divSigTable[normDiff]|8) +2 y-1 )>>y (415) k=((3+xy)<1)?1:3+xy (416) a=((3+xy)<1)?Sign(a)*15:a (417) b = minC - ((a*minY)>>k) (418) Here, divSigTable[] is defined as follows: divSigTable[] ={0,7,6,5,5,4,4,3,3,2,2,1,1,1,1,0} (419) -If not (diff is equal to 0), the following applies: k=0 (420) a=0 (421) b = min C (422) 8. Predicted samples predSamples[x][y] where x=0..nTbW-1, y=0..nTbH-1 are derived as follows: predSamples[x][y] =Clip1(((pDsY[x][y]*a)>>k)+b) (423) Note - This process uses sps_chroma_vertical_collocated_flag. However, for ease of implementation, it does not use sps_chroma_horizontal_collocated_flag.

[0196] Another variation of the embodiment involves padding. In this case, the filter “F1” is not explicitly defined; instead, it is implemented as a combination of padding and filtering using the “F2” filter. The specification for this variation is given below: [Table 12-1] [Table 12-2] [Table 12-3] [Table 12-4] [Table 12-5] [Table 12-6] [Table 12-7] [Table 12-8] [Table 12-9]

[0197] Without marking the changes, the above specifications could be expressed as follows: 1. A lumern sample pY[x][y] at the same position, where x=0..nTbW*SubWidthC-1 and y=0..nTbH*SubHeightC-1, is set to be equal to the reconstructed lumern sample before the deblocking filter process at position (xTbY+x, yTbY+y). 2. The adjacent lumens sample pY[x][y] is derived as follows: - When numSampL is greater than 0, the adjacent left lumern sample pY[x][y] where x=-1..-3, y=0..SubHeightC*numSampL-1 is set to equal the reconstructed lumern sample before the deblocking filter process at position (xTbY+x, yTbY+y). - When numSampT is greater than 0, adjacent upper lumern samples pY[x][y] where x=0..SubWidthC*numSampT-1, y=-1,-2 are set to equal the reconstructed lumern samples before the deblocking filter process at position (xTbY+x, yTbY+y). - When availTL is equal to TRUE, adjacent upper-left lumens samples pY[x][y] where x=-1, y=-1, -2 are set to equal the reconstructed lumens sample before the deblocking filter process at position (xTbY+x, yTbY+y). - When availT is equal to FALSE, adjacent upper luma samples pY[x][y] where x=-1,.SubWidthC*numSampT-1, y=-1,-2 are set to equal luma sample pY[x][0]. - When availL is equal to FALSE, adjacent left lumens samples pY[x][y] where x=-1,-2,-3, y=-1,..SubHeightC*numSampL-1 are set to be equal to lumens sample pY[0][y]. 3. The downsampled lumens sample pDsY[x][y] at the same location, where x=0..nTbW-1 and y=0..nTbH-1, is derived as follows: - If both SubWidthC and SubHeightC are equal to 1, the following applies: - Let x=1..nTbW-1 and y=1..nTbH-1. The pDsY[x][y] can be derived as follows: pDsY[x][y]=pY[x][y] (355) - Otherwise, the following applies: - The one-dimensional filter coefficient arrays F1 and F2, and the two-dimensional filter coefficient arrays F3 and F4 are defined as follows: F2[0]=1,F2[1]=2,F2[2]=1 (357) F3[i][j]=F4[i][j]=0, However, i=0..2, j=0..2 (358) - If both SubWidthC and SubHeightC are equal to 2, the following applies: F3[0][1]=1,F3[1][1]=4,F3[2][1]=1, F3[1][0]=1,F3[1][2]=1 (360) F4[0][1]=1,F4[1][1]=2,F4[2][1]=1 (361) F4[0][2]=1,F4[1][2]=2,F4[2][2]=1 (362) - In other cases, the following applies: F3[1][1]=8 (363) F4[0][1]=2,F4[1][1]=4,F4[2][1]=2 (364) - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies: - Let x=0..nTbW-1 and y=0..nTbH-1. The pDsY[x][y] can be derived as follows: pDsY[x][y]= (F3[1][0]*pY[SubWidthC*x][SubHeightC*y-1] +F3[0][1]*pY[SubWidthC*x-1][SubHeightC*y] +F3[1][1]*pY[SubWidthC*x][SubHeightC*y] +F3[2][1]*pY[SubWidthC*x+1][SubHeightC*y] +F3[1][2]*pY[SubWidthC*x][SubHeightC*y+1] +4)>>3 (365) - In other cases (when sps_chroma_vertical_collocated_flag is equal to 0), the following applies: - Let x=0..nTbW-1 and y=0..nTbH-1. The pDsY[x][y] can be derived as follows: pDsY[x][y]=(F4[0][1]*pY[SubWidthC*x-1][SubHeightC*y]+F4[0][2]*pY[SubWidthC*x-1][SubHeightC*y+1]+F4[1][1]*pY[SubWidthC*x][SubHeightC* y]+F4[1][2]*pY[SubWidthC*x][SubHeightC*y+1]+F4[2][1]*pY[SubWidthC*x+1][SubHeightC*y]+F4[2][2]*pY[SubWidthC*x+1][SubHeightC*y+1]+4)>>3 (374) 4. When numSampL is greater than 0, the selected adjacent left chroma sample pSelC[idx] is set equal to p[-1][pickPosL[idx]] with idx=0..cntL-1, and the selected downsampled adjacent left chroma sample pSelDsY[idx] is derived with idx=0..cntL-1 as follows: - The variable y is set to equal to pickPosL[idx]. - If both SubWidthC and SubHeightC are equal to 1, the following applies: pSelDsY[idx]=pY[-1][y] (377) - Otherwise, the following applies: - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies: pSelDsY[idx]= (F3[1][0]*pY[-SubWidthC][SubHeightC*y-1] +F3[0][1]*pY[-1-SubWidthC][SubHeightC*y] +F3[1][1]*pY[-SubWidthC][SubHeightC*y] +F3[2][1]*pY[1-SubWidthC][SubHeightC*y] +F3[1][2]*pY[-SubWidthC][SubHeightC*y+1] +4)>>3 (378) - In other cases (when sps_chroma_vertical_collocated_flag is equal to 0), the following applies: pSelDsY[idx]=(F4[0][1]*pY[-1-SubWidthC][SubHeightC*y]+F4[0][2]*pY[-1-SubWidthC][SubHeightC*y+1]+F4[1][1]*pY[-SubWidthC][SubHeight C*y]+F4[1][2]*pY[-SubWidthC][SubHeightC*y+1]+F4[2][1]*pY[1-SubWidthC][SubHeightC*y]+F4[2][2]*pY[1-SubWidthC][SubHeightC*y+1]+4)>>3 (380) 5. When numSampT is greater than 0, the selected adjacent upper chroma sample pSelC[idx] is set to equal p[pickPosT[idx-cntL]][-1], where idx=cntL..cntL+cntT-1, and the downsampled adjacent upper chroma sample pSelDsY[idx] is defined as follows, where idx=0..cntL+cntT-1: - The variable x is set to equal to pickPosT[idx-cntL]. - If both SubWidthC and SubHeightC are equal to 1, the following applies: pSelDsY[idx]=pY[x][-1] (381) - Otherwise, the following applies: -If sps_chroma_vertical_collocated_flag is equal to 1, the following applies: - If bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]= (F3[1][0]*pY[SubWidthC*x][-1-SubHeightC] +F3[0][1]*pY[SubWidthC*x-1][-SubHeightC] +F3[1][1]*pY[SubWidthC*x][-SubHeightC] +F3[2][1]*pY[SubWidthC*x+1][-SubHeightC] +F3[1][2]*pY[SubWidthC*x][1-SubHeightC] +4)>>3 (382) - Otherwise (when bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]= (F2[0]*pY[SubWidthC*x-1][-1]+ F2[1]*pY[SubWidthC*x][-1]+ F2[2]*pY[SubWidthC*x+1][-1] +2)>>2 (383) - In other cases (when sps_chroma_vertical_collocated_flag is equal to 0), the following applies: - If bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(F4[0][1]*pY[SubWidthC*x-1][-1]+F4[0][2]*pY[SubWidthC*x-1][-2]+F4[1][1]*pY[SubWidthC*x] [-1]+F4[1][2]*pY[SubWidthC*x][-2]+F4[2][1]*pY[SubWidthC*x+1][-1]+F4[2][2]*pY[SubWidthC*x+1][-2]+4)>>3 (388) - Otherwise (when bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]= (F2[0]*pY[SubWidthC*x-1][-1]+ F2[1]*pY[SubWidthC*x][-1]+ F2[2]*pY[SubWidthC*x+1][-1] +2)>>2 (389) 6. When cntT + cntL is not equal to 0, the variables minY, maxY, minC, and maxC are derived as follows: - When cntT + cntL is equal to 2, pSelComp[3] is set to equal to pSelComp[0], pSelComp[2] is set to equal to pSelComp[1], pSelComp[0] is set to equal to pSelComp[1], and pSelComp[1] is set to equal to pSelComp[3], where Comp is replaced by DsY and C. - The array values ​​minGrpIdx and maxGrpIdx are derived as follows: minGrpIdx[0]=0 (394) minGrpIdx[1]=2 (395) maxGrpIdx[0]=1 (396) maxGrpIdx[1]=3 (397) - When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[minGrpIdx[1]], minGrpIdx[0] and minGrpIdx[1] are swapped as follows: (minGrpIdx[0],minGrpIdx[1]) =Swap(minGrpIdx[0],minGrpIdx[1]) (398) - When pSelDsY[maxGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], maxGrpIdx[0] and maxGrpIdx[1] are swapped as follows: (maxGrpIdx[0],maxGrpIdx[1]) =Swap(maxGrpIdx[0],maxGrpIdx[1]) (399) - When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], the arrays minGrpIdx and maxGrpIdx are swapped as follows: (minGrpIdx, maxGrpIdx) =Swap(minGrpIdx,maxGrpIdx) (400) - When pSelDsY[minGrpIdx[1]] is greater than pSelDsY[maxGrpIdx[0]], minGrpIdx[1] and maxGrpIdx[0] are swapped as follows: (minGrpIdx[1],maxGrpIdx[0]) =Swap(minGrpIdx[1],maxGrpIdx[0]) (401) - The variables minY, maxY, minC, and maxC are derived as follows: maxY=(pSelDsY[maxGrpIdx[0]] +pSelDsY[maxGrpIdx[1]]+1)>>1 (402) maxC=(pSelC[maxGrpIdx[0]] +pSelC[maxGrpIdx[1]]+1)>>1 (403) minY=(pSelDsY[minGrpIdx[0]] +pSelDsY[minGrpIdx[1]]+1)>>1 (404) minC=(pSelC[minGrpIdx[0]] +pSelC[minGrpIdx[1]]+1)>>1 (405) 7. Variables a, b, and k are derived as follows: - If numSampL is equal to 0 and numSampT is equal to 0, the following applies: k=0 (406) a=0 (407) b=1<<(BitDepth C -1) (408) - Otherwise, the following applies: diff = maxY - minY (409) - If diff is not equal to 0, the following applies: diffC = maxC - minC (410) x = Floor(Log2(diff)) (411) normDiff=((diff<<4)>>x)&15 (412) x + = (normDiff != 0) ? 1 : 0 (413) y=Floor(Log2(Abs(diffC)))+1 (414) a=(diffC*(divSigTable[normDiff]|8) +2 y-1 )>>y (415) k=((3+xy)<1)?1:3+xy (416) a=((3+xy)<1)?Sign(a)*15:a (417) b = minC - ((a*minY)>>k) (418) Here, divSigTable[] is defined as follows: divSigTable[] ={0,7,6,5,5,4,4,3,3,2,2,1,1,1,1,0} (419) - Otherwise (if diff is equal to 0), the following applies: k=0 (420) a=0 (421) b = min C (422) 8. Predicted samples predSamples[x][y] where x=0..nTbW-1, y=0..nTbH-1 are derived as follows: predSamples[x][y] =Clip1(((pDsY[x][y]*a)>>k)+b) (423) Note - This process uses sps_chroma_vertical_collocated_flag. However, for ease of implementation, it does not use sps_chroma_horizontal_collocated_flag.

[0198] The following methods and embodiments are provided that are implemented by a decoding device. The decoding device may be the video decoder 30 in Figures 1A, 1B, or the decoder 30 in Figure 3. According to the solution, a method for a chroma block prediction method according to Embodiment 1400 of the present application is provided, as shown in Figure 14. The method may be part of a method for decoding an encoded video sequence.

[0199] As shown in Figure 14, in step 1401, the device parses multiple syntax elements from the bitstream. These multiple syntax elements include a first syntax element that indicates the selection of a filter for the chroma sample. For example, the first syntax element is the SPS parameter sps_cclm_colocated_chroma_flag.

[0200] Multiple syntax elements may include a second syntax element, which is used to indicate that the intra-prediction mode used for current decoding is a CCLM mode. CCLM modes include INTRA_LT_CCLM, INTRA_L_CCLM, or INTRA_T_CCLM.

[0201] In step 1402, the device applies a filter to the reconstructed lumen sample of the current block's lumen component based at least on a first syntax element to obtain a filtered, reconstructed lumen sample of the current block. A filter belongs to a set of filters, and a set of filters contains only two filters. A filter is the first filter when the value of the syntax element is the first value, or the second filter when the value of the syntax element is the second value. For example, when sps_chroma_vertical_collocated_flag is equal to 1, the F3 filter is applied, or when sps_chroma_vertical_collocated_flag is equal to 0, the F4 filter is applied.

[0202] Specifically, the downsampled lumens sample pDsY[x][y] at the same location is derived as follows when x=0..nTbW-1, y=0..nTbH-1: - If both SubWidthC and SubHeightC are equal to 1, the following applies: pDsY[x][y]=pY[x][y] - Otherwise, the following applies: - The one-dimensional filter coefficient array F2 is defined as follows: F2[0]=1,F2[1]=2,F2[2]=1 - Otherwise, the two-dimensional filter coefficient arrays F3 and F4 are defined as follows: F3[0][1]=1,F3[1][1]=4,F3[2][1]=1, F3[1][0]=1,F3[1][2]=1 F4[0][1]=1,F4[1][1]=2,F4[2][1]=1 F4[0][2]=1,F4[1][2]=2,F4[2][2]=1 - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies: pDsY[x][y]= (F3[1][0]*pY[SubWidthC*x][SubHeightC*y-1] +F3[0][1]*pY[SubWidthC*x-1][SubHeightC*y] +F3[1][1]*pY[SubWidthC*x][SubHeightC*y] +F3[2][1]*pY[SubWidthC*x+1][SubHeightC*y] +F3[1][2]*pY[SubWidthC*x][SubHeightC*y+1] +4)>>3 - In other cases (when sps_chroma_vertical_collocated_flag is equal to 0), the following applies: pDsY[x][y]=(F4[0][1]*pY[SubWidthC*x-1][SubHeightC*y]+F4[0][2]*pY[SubWidthC*x-1][SubHeightC*y+1]+F4[1][1]*pY[SubWidthC*x][SubHeightC* y]+F4[1][2]*pY[SubWidthC*x][SubHeightC*y+1]+F4[2][1]*pY[SubWidthC*x+1][SubHeightC*y]+F4[2][2]*pY[SubWidthC*x+1][SubHeightC*y+1]+4)>>3

[0203] In step 1403, the device applies a filter to adjacent left lumens samples based on at least the first syntax element to obtain downsampled adjacent left lumens samples. A filter belongs to a filter set, and a filter set contains only two filters. A filter is the first filter when the value of the syntax element is the first value, or the second filter when the value of the syntax element is the second value. For example, when sps_chroma_vertical_collocated_flag is equal to 1, the F3 filter is applied, or when sps_chroma_vertical_collocated_flag is equal to 0, the F4 filter is applied.

[0204] Specifically, when numSampL is greater than 0, the selected adjacent left chroma sample pSelC[idx] is set equal to p[-1][pickPosL[idx]] with idx=0..cntL-1, and the selected downsampled adjacent left chroma sample pSelDsY[idx] is derived as follows with idx=0..cntL-1: - The variable y is set to equal to pickPosL[idx]. - If both SubWidthC and SubHeightC are equal to 1, the following applies: pSelDsY[idx]=pY[-1][y] - Otherwise, the following applies: - If sps_chroma_vertical_collocated_flag is equal to 1, the following applies: pSelDsY[idx]= (F3[1][0]*pY[-SubWidthC][SubHeightC*y-1] +F3[0][1]*pY[-1-SubWidthC][SubHeightC*y] +F3[1][1]*pY[-SubWidthC][SubHeightC*y] +F3[2][1]*pY[1-SubWidthC][SubHeightC*y] +F3[1][2]*pY[-SubWidthC][SubHeightC*y+1] +4)>>3 - In other cases (when sps_chroma_vertical_collocated_flag is equal to 0), the following applies: pSelDsY[idx]=(F4[0][1]*pY[-1-SubWidthC][SubHeightC*y]+F4[0][2]*pY[-1-SubWidthC][SubHeightC*y+1]+F4[1][1]*pY[-SubWidthC][SubHeight C*y]+F4[1][2]*pY[-SubWidthC][SubHeightC*y+1]+F4[2][1]*pY[1-SubWidthC][SubHeightC*y]+F4[2][2]*pY[1-SubWidthC][SubHeightC*y+1]+4)>>3

[0205] In step 1404, the device applies a filter to adjacent upper lumens samples based on at least the first syntax element to obtain downsampled adjacent upper lumens samples. A filter belongs to a filter set, and a filter set contains only two filters. A filter is the first filter when the value of the syntax element is the first value, or the second filter when the value of the syntax element is the second value. For example, when sps_chroma_vertical_collocated_flag is equal to 1, the F3 filter is applied, or when sps_chroma_vertical_collocated_flag is equal to 0, the F4 filter is applied.

[0206] Specifically, when numSampT is greater than 0, the selected adjacent upper chroma sample pSelC[idx] is set to equal p[pickPosT[idx-cntL]][-1], where idx=cntL..cntL+cntT-1, and the downsampled adjacent upper chroma sample pSelDsY[idx] is defined as follows, where idx=0..cntL+cntT-1: - The variable x is set to equal to pickPosT[idx-cntL]. - If both SubWidthC and SubHeightC are equal to 1, the following applies: pSelDsY[idx]=pY[x][-1] - Otherwise, the following applies: -If sps_chroma_vertical_collocated_flag is equal to 1, the following applies: - If bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]= (F3[1][0]*pY[SubWidthC*x][-1-SubHeightC] +F3[0][1]*pY[SubWidthC*x-1][-SubHeightC] +F3[1][1]*pY[SubWidthC*x][-SubHeightC] +F3[2][1]*pY[SubWidthC*x+1][-SubHeightC] +F3[1][2]*pY[SubWidthC*x][1-SubHeightC] +4)>>3 - Otherwise (when bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]= (F2[0]*pY[SubWidthC*x-1][-1]+ F2[1]*pY[SubWidthC*x][-1]+ F2[2]*pY[SubWidthC*x+1][-1]+2)>>2 - In other cases (when sps_chroma_vertical_collocated_flag is equal to 0), the following applies: - If bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]= (F4[0][1]*pY[SubWidthC*x-1][-1]+ F4[0][2]*pY[SubWidthC*x-1][-2]+ F4[1][1]*pY[SubWidthC*x][-1]+ F4[1][2]*pY[SubWidthC*x][-2]+ F4[2][1]*pY[SubWidthC*x+1][-1]+ F4[2][2]*pY[SubWidthC*x+1][-2]+4)>>3 - Otherwise (when bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]= (F2[0]*pY[SubWidthC*x-1][-1]+ F2[1]*pY[SubWidthC*x][-1]+ F2[2]*pY[SubWidthC*x+1][-1]+2)>>2

[0207] There is no order between Step 1402, 1403, and 1404.

[0208] In step 1405, the device obtains linear model coefficients based on the filtered and reconstructed lumen samples. The filtered and reconstructed lumen samples include the filtered and reconstructed lumen sample of the current block in step 1402, the downsampled adjacent left lumen sample in step 1403, and / or the downsampled adjacent upper lumen sample in step 1404. In step 1406, the device performs cross-component prediction based on the obtained linear model coefficients and the filtered and reconstructed lumen sample of the current block to obtain predicted values ​​for the chroma components of the current block.

[0209] The above embodiment may be implemented in the coding device 1500, as shown in Figure 15. The coding device 1500 includes: - A parsing unit 1501 configured to parse a first syntax element from the bitstream. As described above, for example, the first syntax element is sps_cclm_colocated_chroma_flag included in the SPS parameters.

[0210] - A filtering unit 1502 configured to obtain a filtered and reconstructed rumor sample of the current block by applying a filter to a reconstructed rumor sample of the current block's rumor components based at least on a first syntax element, wherein the filter belongs to a set of filters, the set of filters contains only two filters, and the filter is the first filter when the value of the syntax element is the first value, or the filter is the second filter when the value of the syntax element is the second value.

[0211] For example, when sps_chroma_vertical_collocated_flag is equal to 1, an F3 filter is applied, or when sps_chroma_vertical_collocated_flag is equal to 0, an F4 filter is applied.

[0212] The filtering unit 1502 may also apply a filter to adjacent left lumens samples based at least on the first syntax element, as described above, to obtain downsampled adjacent left lumens samples, and apply a filter to adjacent upper lumens samples based at least on the first syntax element, to obtain a filter to downsampled adjacent upper lumens samples.

[0213] - Acquisition unit 1503 configured to obtain linear model coefficients based on filtered and reconstructed lumens samples.

[0214] - A prediction unit 1504 is configured to obtain predicted values ​​for the chroma components of the current block by performing cross-component prediction (e.g., lumar-to-chroma cross-component prediction or CCLM prediction) based on the acquired linear model coefficients and the filtered and reconstructed lumar sample of the current block.

[0215] In particular, the following embodiments are provided in this application: Embodiment 1. An intra-prediction method using a linear model, Based on the chroma format of the picture to which the current block belongs, a filter is determined for the chroma component of the current block, Applying the determined filter to the area between the reconstructed ruma sample of the ruma component of the current block and the ruma sample at a selected position adjacent to the ruma component of the current block (one or more rows / columns adjacent to the left or above the current block) to obtain a filtered and reconstructed ruma sample (e.g., a filtered and reconstructed ruma sample within the current block (e.g., the ruma component of the current block)), As input to the linear model derivation, linear model coefficients are obtained based on the filtered and reconstructed lumens samples (for example, a set of lumens samples includes filtered and reconstructed lumens samples within the current block and filtered neighboring lumens samples outside the current block, and for example, the determined filter may also be applied to neighboring lumens samples outside the current block), Based on the obtained linear model coefficients and the filtered and reconstructed lumen samples of the current block (e.g., filtered and reconstructed lumen samples within the current block (e.g., lumen components of the current block)), cross-component prediction is performed to obtain predictors for the current chroma block. A method of having.

[0216] Embodiment 2. The method of Embodiment 1, wherein determining the filter is: The filter is determined based on the position of the lumens sample in the current block and the chroma format, or The filter for each of the multiple lumens samples belonging to the current block is determined based on the position of each lumens sample within the current block and the chroma format. A method having.

[0217] Embodiment 3. The method of Embodiment 1, wherein determining the filter is: Next: Subsampling ratio information (for example, SubWidthC and SubHeightC which can be obtained from a table according to the chroma format of the picture to which the current block belongs), The chroma format of the picture to which the aforementioned block belongs (for example, the chroma format is used to obtain subsampling ratio information (e.g., SubWidthC and SubHeightC)), The position of the luma sample within the aforementioned block, The number of luma samples belonging to the aforementioned block, The width and height of the aforementioned block, and / or Position of subsampled chroma sample relative to luma sample in the current block A method comprising determining the filter based on one or more of the following.

[0218] Embodiment 4. The method of Embodiment 3, wherein, when the subsampled chroma sample is not in the same position as the corresponding luma sample, a first preset relationship (e.g., Table 4) between a plurality of filters and subsampling ratio information (e.g., SubWidthC and SubHeightC, i.e., the width and height values ​​of the current block) is used to determine the filters and / or A method in which, when the subsampled chroma sample is in the same position as the corresponding luma sample, a second or third preset relationship (e.g., either Table 2 or Table 3) between a plurality of filters and subsampling ratio information (e.g., SubWidthC and SubHeightC, i.e., the width and height values ​​of the current block) is used to determine the filter.

[0219] Embodiment 5. A method of Embodiment 4, wherein the second or third relationship (e.g., either Table 2 or Table 3) between a plurality of filters and subsampling ratio information (e.g., SubWidthC and SubHeightC, i.e., the width and height values ​​of the current block) is determined based on the number of specific lumens belonging to the current block (e.g., available lumens).

[0220] Embodiment 6. A method of any one of the embodiments described above, wherein the filter is conditionally determined as follows: If the first condition (for example, subsampling ratio information obtained from a table defined in the specification, such as SubWidthC==1 and SubHeightC==1) is not satisfied, the following applies to the filter set {F3, F5, F6}: F3[0]=1,F3[1]=2,F3[2]=1 If the second condition (for example, subsampling ratio information obtained from the table, such as SubWidthC==2 and SubHeightC==2) is satisfied, F5[0][1]=1,F5[1][1]=4,F3[2][1]=1, F5[1][0]=1,F5[1][2]=1,F6[0][1]=1, F6[1][1]=2,F6[2][1]=1,F6[0][2]=1, F6[1][2]=2,F6[2][2]=1,F2[0]=1,F2[1]=1 In other cases (for example, when the second condition (e.g., subsampling ratio information obtained from the table, such as SubWidthC==2 and SubHeightC==2) is not satisfied), F5[0][1]=0,F5[1][1]=8,F3[2][1]=0, F5[1][0]=0,F5[1][2]=0,F6[0][1]=2, F6[1][1]=4,F6[2][1]=2,F6[0][2]=0, F6[1][2]=0,F6[2][2]=0,F2[0]=2,F2[1]=0 The method.

[0221] Embodiment 7. A method of any of the embodiments described above, wherein the filter is conditionally determined using sequential filter notation as follows: If the first condition (e.g., subsampling ratio information obtained from a specification-defined table, such as SubWidthC==1 and SubHeightC==1) is not satisfied, the following applies to the filter set {F1, F2, F3}: F1[0]=2,F1[1]=0 F2[0]=1,F2[1]=2,F2[2]=1 F3[i][j]=F4[i][j]=0, where i=0..2 and j=0..2 If the second condition (for example, subsampling ratio information obtained from the table, such as SubWidthC==2 and SubHeightC==2) is satisfied, F1[0]=1,F1[1]=1, F3[0][1]=1,F3[1][1]=4,F3[2][1]=1, F3[1][0]=1,F3[1][2]=1, F4[0][1]=1,F4[1][1]=2,F4[2][1]=1, F4[0][2]=1,F4[1][2]=2,F4[2][2]=1 In other cases (for example, when the second condition (e.g., subsampling ratio information obtained from the table, such as SubWidthC==2 and SubHeightC==2) is not satisfied), F3[0][1]=0,F3[1][1]=8,F3[2][1]=0, F3[1][0]=0,F3[1][2]=0 F4[0][1]=2,F4[1][1]=4,F4[2][1]=2, F4[0][2]=0,F4[1][2]=0,F4[2][2]=0 The method.

[0222] Embodiment 7a. The method of Embodiments 1 to 6, wherein the filter is conditionally determined using sequential filter notation as follows: If the first condition (e.g., subsampling ratio information obtained from a specification-defined table, such as SubWidthC==1 and SubHeightC==1) is not satisfied, the following applies to the filter set {F1, F2, F3}: F1[0]=4,F1[1]=0 F2[0]=1, F2[1]=2, F2[2]=1 F3[i][j]=F4[i][j]=0, where i=0..2 and j=0..2 If the second condition (for example, subsampling ratio information obtained from the table, such as SubWidthC==2 and SubHeightC==2) is satisfied, F1[0]=3,F1[1]=1, F3[0][1]=1,F3[1][1]=4,F3[2][1]=1, F3[1][0]=1,F3[1][2]=1, F4[0][1]=1,F4[1][1]=2,F4[2][1]=1, F4[0][2]=1,F4[1][2]=2,F4[2][2]=1 In other cases (for example, when the second condition (e.g., subsampling ratio information obtained from the table, such as SubWidthC==2 and SubHeightC==2) is not satisfied), F3[0][1]=0,F3[1][1]=8,F3[2][1]=0, F3[1][0]=0,F3[1][2]=0 F4[0][1]=2,F4[1][1]=4,F4[2][1]=2, F4[0][2]=0,F4[1][2]=0,F4[2][2]=0 The method.

[0223] Embodiment 7b. A method of Embodiment 7, wherein filtering by one of the filters Fa ∈ {F1...F4} is performed using a padding operation and a filter Fb having more non-zero coefficients than filter Fa.

[0224] Embodiment 7c. The method of Embodiment 7b, wherein Fa is F1 and Fb is F2, and the filter is conditionally determined using sequential filter notation as follows: If the first condition (for example, subsampling ratio information obtained from a table defined in the specification, such as SubWidthC==1 and SubHeightC==1) is not satisfied, F2[0]=1, F2[1]=2, F2[2]=1 F3[i][j]=F4[i][j]=0, where i=0..2 and j=0..2 If the second condition (for example, subsampling ratio information obtained from the table, such as SubWidthC==2 and SubHeightC==2) is satisfied, F3[0][1]=1,F3[1][1]=4,F3[2][1]=1, F3[1][0]=1,F3[1][2]=1, F4[0][1]=1,F4[1][1]=2,F4[2][1]=1, F4[0][2]=1,F4[1][2]=2,F4[2][2]=1 In other cases (for example, when the second condition (e.g., subsampling ratio information obtained from the table, such as SubWidthC==2 and SubHeightC==2) is not satisfied), F3[0][1]=0,F3[1][1]=8,F3[2][1]=0, F3[1][0]=0,F3[1][2]=0 F4[0][1]=2,F4[1][1]=4,F4[2][1]=2, F4[0][2]=0,F4[1][2]=0,F4[2][2]=0 The method.

[0225] Embodiment 8. A method of any one of the embodiments described above, wherein the filter has non-zero coefficients at positions adjacent horizontally and / or vertically to the position of the filtered reconstructed chroma sample when the chroma component of the current block is not subsampled (for example, (outside 2) TIFF0007864149000031.tif21170, the center position with coefficient "4" corresponds to the position of the filtered and reconstructed lumens sample).

[0226] Embodiment 9. A method according to any one of the embodiments described above, wherein the chroma format is a YCbCr 4:4:4 chroma format, a YCbCr 4:2:0 chroma format, a YCbCr 4:2:2 chroma format, or a monochrome format.

[0227] Embodiment 10. A method of any one of the embodiments described above, wherein the set of lumens samples used as input to the linear model derivation is: Filtered and reconstructed luma samples (e.g., Rec' L A method having a boundary luma reconstruction sample subsampled from [x,y]).

[0228] Embodiment 11. A method of any one of the embodiments described above, wherein the predictor of the current chroma block is Nod c (i,j) = α·rec L '(i,j)+β Obtained based on pred c (i,j) represents a chroma sample, rec L (i,j) is a method representing the corresponding reconstructed ruma sample (for example, the location of the corresponding reconstructed ruma sample is currently within the block).

[0229] Embodiment 12. A method of any one of the embodiments described above, wherein the linear model is a multidirectional linear model (MDLM), and the linear model coefficients are used to obtain the MDLM.

[0230] Embodiment 13. A coding method implemented by an coding device, Performing intraprediction using a linear model (e.g., cross-component linear model, CCLM, or multidirectional linear model, MDLM), Generating a bitstream containing multiple syntax elements and It has, The aforementioned plurality of syntax elements include syntax elements that indicate the selection of a filter for lumens samples belonging to a block (e.g., the selection of a lumens filter for CCLM, in particular an SPS flag such as sps_cclm_colocated_chroma_flag), and a method.

[0231] Embodiment 14. A method in any of the embodiments described above, in which, when the value of the syntax element is 1 or TRUE, the filter is not applied to the lumens sample for determining the linear model and for making the predictions. A method wherein, when the value of the syntax element is 0 or FALSE, the filter is applied to the lumens sample for determining the linear model and for making the prediction.

[0232] Embodiment 15. A decoding method implemented by a decoding device, This involves parsing multiple syntax elements from a bitstream, where these multiple syntax elements include syntax elements indicating the selection of filters for lumens samples belonging to a block (e.g., the selection of lumens filters for CCLM, in particular SPS flags such as sps_cclm_colocated_chroma_flag), Perform intra-prediction using the specified linear model (e.g., CCLM) and A method of having.

[0233] Embodiment 16. A method in any of the embodiments described above, in which, when the value of the syntax element is 0 or FALSE, the filter is applied to the lumens sample for determining the linear model and for making the predictions. A method wherein, when the value of the syntax element is 1 or TRUE, the filter is not applied to the lumens sample for determining the linear model and for making the prediction.

[0234] Embodiment 17. A method for performing intra-prediction using a linear model, The process involves determining a set of downsampling filters based on chroma format information, wherein the chroma format information indicates the chroma format of the picture to which the block currently belongs. The downsampled lumen sample of the reconstructed lumen sample within the lumen block of the current block, and the downsampled lumen reference sample of a selected adjacent lumen sample outside the lumen block are obtained by applying each of the downsampled filters in the set of downsampled filters. Based on the downsampled lumern reference sample of the selected adjacent lumern sample and the chroma reference sample corresponding to the downsampled lumern reference sample, one or more linear model coefficients are determined. Based on the linear model coefficients and the downsampled chroma samples of the reconstructed chroma samples within the entire chroma block, predictive samples of the chroma block corresponding to the chroma block are obtained. A method of having.

[0235] Embodiment 18. The method of Embodiment 17, wherein determining a set of downsampling filters based on chroma format information is: Based on the chroma format information, the subsampling ratio information (e.g., SubWidthC and SubHeightC) is determined, The set of downsampling filters is determined based on the aforementioned subsampling ratio information (e.g., SubWidthC and SubHeightC). A method having.

[0236] Embodiment 19. The method of Embodiment 17, wherein determining a set of downsampling filters based on the chroma format of the picture to which the current block belongs is as follows: When the chroma format is a 4:2:0 color format, determine the first set of downsampling filters to be used for the chroma block of the current block. When the chroma format is a 4:2:2 color format, determine the second set of downsampling filters to be used for the chroma block of the current block, or When the chroma format is a 4:4:4 color format, determine the set of third downsampling filters to be used for the chroma block of the current block. A method having one or more of these.

[0237] Embodiment 20. The method of Embodiment 18, wherein determining the set of downsampling filters (set of downsampling filter coefficients) based on the subsampling ratio information (e.g., SubWidthC and SubHeightC) is as follows: When SubWidthC==2 and SubHeightC==2, determine the first set of downsampling filters (set of downsampling filter coefficients) to be used for the lumens block of the current block. When SubWidthC==2 and SubHeightC==1, determine the second set of downsampling filters (set of downsampling filter coefficients) to be used for the lumens block of the current block, or When SubWidthC==1 and SubHeightC==1, determine the third downsampling filter set (set of downsampling filter coefficients) to be used for the lumens block of the current block. A method having one or more of the following.

[0238] Embodiment 21. A method according to any one of Embodiments 17 to 20, wherein the subsampled chroma sample is in the same position as the corresponding chroma sample in the current block, Obtaining the downsampled lumen sample of the reconstructed lumen sample within the lumen block of the current block, and the downsampled lumen reference sample of a selected adjacent lumen sample outside the lumen block, by applying each of the downsampled filters in the set of downsampled filters, The method involves obtaining a downsampled lumens sample of the reconstructed lumens sample within the lumens block by applying a first downsampling filter to the spatial area of ​​the reconstructed lumens sample, wherein the spatial area of ​​the reconstructed lumens sample includes reconstructed lumens samples located horizontally and / or vertically adjacent to the position of the reconstructed lumens sample (downsampled lumens sample), The method involves obtaining a downsampled lumen reference sample of a selected adjacent lumen sample by applying the first downsampling filter to the spatial area of ​​the reconstructed lumen sample, wherein the spatial area of ​​the reconstructed lumen sample includes reconstructed lumen samples located horizontally and / or vertically adjacent to the location of the selected adjacent lumen sample (the downsampled lumen reference sample). It has, The first downsampling filter is a method within the set of downsampling filters.

[0239] Embodiment 22. The method of Embodiment 21, wherein a 4:2:2 color format is used (SubWidthC==2 and SubHeightC==1), the first downsampling filter is a 1D non-separable filter, or A method in which, when a 4:2:0 color format is used (SubWidthC==2 and SubHeightC==2), the first downsampling filter is a 2D non-separable filter.

[0240] Embodiment 23. The method of Embodiment 21, in which a 4:2:2 color format is used (SubWidthC==2 and SubHeightC==1), the first downsampling filter (the 1D non-separable filter F2 described in the standard) is [1,2,1] or (Outside 3) A method represented by TIFF0007864149000032.tif23170, wherein the non-zero coefficients are located horizontally adjacent to the location of the filtered reconstructed lumens sample, and the central location having a coefficient of "2" corresponds to the location of the filtered reconstructed lumens sample.

[0241] Embodiment 24. The method of Embodiment 21, in which a 4:2:0 color format is used (SubWidthC==2 and SubHeightC==2), the first downsampling filter (2D non-separable filter F3 as described in the VVC standard) is: (outside 4) A method represented by TIFF0007864149000033.tif23170, wherein the non-zero coefficients are located horizontally and / or vertically adjacent to the location of the filtered reconstructed lumens sample, and the central location having a coefficient of "4" corresponds to the location of the filtered reconstructed lumens sample.

[0242] Embodiment 25. A method according to any one of Embodiments 17 to 20, wherein the subsampled chroma sample is not in the same position as the corresponding chroma sample in the current block, Obtaining the downsampled lumen sample of the reconstructed lumen sample within the lumen block of the current block, and the downsampled lumen reference sample of a selected adjacent lumen sample outside the lumen block, by applying each of the downsampled filters in the set of downsampled filters, The method involves obtaining a downsampled lumens sample of the reconstructed lumens sample within the lumens block by applying a second downsampling filter to the spatial area of ​​the reconstructed lumens sample, wherein the spatial area of ​​the reconstructed lumens sample includes reconstructed lumens samples located horizontally and / or vertically adjacent to the position of the reconstructed lumens sample (downsampled lumens sample). The method involves obtaining a downsampled lumen reference sample of a selected adjacent lumen sample by applying the second downsampling filter to the spatial area of ​​the reconstructed lumen sample, wherein the spatial area of ​​the reconstructed lumen sample includes reconstructed lumen samples located horizontally and / or vertically adjacent to the location of the selected adjacent lumen sample (the downsampled lumen reference sample). It has, The second downsampling filter is a method within the set of downsampling filters.

[0243] Embodiment 26. The method of Embodiment 25, wherein a 4:2:2 color format is used (SubWidthC==2 and SubHeightC==1), the second downsampling filter is a 1D non-separable filter, or A method in which, when a 4:2:0 color format is used (SubWidthC==2 and SubHeightC==2), the second downsampling filter is a 2D non-separable filter.

[0244] Embodiment 27. The method of Embodiment 25, in which a 4:2:2 color format is used (SubWidthC==2 and SubHeightC==1), the second downsampling filter (1D non-separable filters F1, F2 as described in the standard) is [2,0] or [1,2,1] or (outside 5) A method represented by TIFF0007864149000034.tif22170, wherein the non-zero coefficients are located horizontally adjacent to the location of the filtered reconstructed lumens sample, and the central location having a coefficient of "2" corresponds to the location of the filtered reconstructed lumens sample.

[0245] Embodiment 28. The method of Embodiment 25, in which a 4:2:0 color format is used (SubWidthC==2 and SubHeightC==2), the second downsampling filter (2D non-separable filter F4 as described in the VVC standard) is: (outside 6) A method represented by TIFF0007864149000035.tif23170, wherein the non-zero coefficients are located horizontally and / or vertically adjacent to the location of the filtered reconstructed lumens sample, and the center location having a coefficient of "2" corresponds to the location of the filtered reconstructed lumens sample.

[0246] Embodiment 29. One of the methods of Embodiments 21 to 24, wherein the subsampled chroma sample is in the same position as the corresponding chroma sample in the current block, Chroma sample type 2, or Chroma Sample Type 4 A method that can be represented by any one of the following.

[0247] Embodiment 30. One of the methods of Embodiments 25 to 28, wherein the subsampled chroma sample is not in the same position as the corresponding chroma sample in the current block, Chroma sample type 0, Chroma sample type 1, Chroma sample type 3, or Chroma Sample Type 5 A method that can be represented by any one of the following.

[0248] Embodiment 31. A method of any one of the embodiments described above, wherein the filter is conditionally determined as follows: If the first condition (for example, subsampling ratio information obtained from a table defined in the specification, such as SubWidthC==1 and SubHeightC==1) is not satisfied, the following applies to the filter set {F3, F5, F6}: F3[0]=1,F3[1]=2,F3[2]=1 If the second condition (for example, subsampling ratio information obtained from the table, such as SubWidthC==2 and SubHeightC==2) is satisfied, F5[0][1]=1,F5[1][1]=4,F3[2][1]=1, F5[1][0]=1,F5[1][2]=1,F6[0][1]=1, F6[1][1]=2,F6[2][1]=1,F6[0][2]=1, F6[1][2]=2,F6[2][2]=1,F2[0]=1,F2[1]=1 In other cases (for example, when the second condition (e.g., subsampling ratio information obtained from the table, such as SubWidthC==2 and SubHeightC==2) is not satisfied), F5[0][1]=0,F5[1][1]=8,F3[2][1]=0, F5[1][0]=0,F5[1][2]=0,F6[0][1]=2, F6[1][1]=4,F6[2][1]=2,F6[0][2]=0, F6[1][2]=0,F6[2][2]=0,F2[0]=2,F2[1]=0 The method.

[0249] Embodiment 32. A method of any of the embodiments described above, wherein the filter is conditionally determined using sequential filter notation as follows: If the first condition (e.g., subsampling ratio information obtained from a specification-defined table, such as SubWidthC==1 and SubHeightC==1) is not satisfied, the following applies to the filter set {F1, F2, F3}: F1[0]=2 or 4, F1[1]=0 F2[0]=1,F2[1]=2,F2[2]=1 F3[i][j]=F4[i][j]=0, where i=0..2 and j=0..2 If the second condition (for example, subsampling ratio information obtained from the table, such as SubWidthC==2 and SubHeightC==2) is satisfied, F1[0]=1 or 3, F1[1]=1, F3[0][1]=1,F3[1][1]=4,F3[2][1]=1, F3[1][0]=1,F3[1][2]=1, F4[0][1]=1,F4[1][1]=2,F4[2][1]=1, F4[0][2]=1,F4[1][2]=2,F4[2][2]=1 In other cases (for example, when the second condition (e.g., subsampling ratio information obtained from the table, such as SubWidthC==2 and SubHeightC==2) is not satisfied), F3[0][1]=0,F3[1][1]=8,F3[2][1]=0, F3[1][0]=0,F3[1][2]=0 F4[0][1]=2,F4[1][1]=4,F4[2][1]=2, F4[0][2]=0,F4[1][2]=0,F4[2][2]=0 The method.

[0250] Embodiment 33. A method of any one of the above embodiments, wherein, when the chroma format is specified as YUV 4:2:2, or when the chroma component and the lumar component are in the same position (indicated as "chroma sample type 2" and "chroma sample type 4" in Figure 10B), sampling from the lumar component is performed with an offset relative to the upper side of the lumar block.

[0251] Embodiment 34. A method of any one of the embodiments described above, wherein the

[0121] / 4 filter is applied to a reference sample when the upper left sample is available and the chroma format is specified as YUV 4:2:2 or the block boundary is a CTU line boundary.

[0252] Embodiment 35. The method of Embodiment 34, where availTL is equal to TRUE and bCTUboundary is equal to TRUE, applies to F set in F3 as follows: pSelDsY[idx]= (F[0]*pY[-1][-1] +F[1]*pY[0][-1] +F[2]*pY[1][-1] +2)>>2 method.

[0253] Embodiment 36. A method according to any one of the embodiments described above, wherein the [1 2 1;1 2 1] / 8 filter is applied to a reference sample when the block boundary is not a CTU line boundary, the upper left sample is available, and the chroma format is specified as YUV 4:2:0 (or any other chroma format using vertical chroma subsampling).

[0254] Embodiment 37. The method of Embodiment 36, where availTL is equal to TRUE and bCTUboundary is equal to FALSE, applies to F set in F6 as follows: pSelDsY[idx]= (F[0][1]*pY[-1][-1] +F[0][2]*pY[-1][-2] +F[1][1]*pY[0][-1] +F[1][2]*pY[0][-2] +F[2][1]*pY[1][-1] +F[2][2]*pY[1][-2]+4)>>3 method.

[0255] Embodiment 38. A method of any one of the embodiments described above, wherein a bypass[1] / 1 filter is applied to a reference sample when the upper-left sample is unavailable and the chroma format is specified as YUV 4:2:2 or the block boundary is a CTU line boundary.

[0256] Embodiment 39. The method of Embodiment 38, where availTL is equal to FALSE and bCTUboundary is equal to TRUE, is as follows: pSelDsY[idx]=pY[0][-1] method.

[0257] Embodiment 40. A method of any one of the embodiments described above, wherein the block boundary is not a CTU line boundary, the upper left sample is available, and the chroma format is specified as YUV 4:2:0 (or any other chroma format using vertical chroma subsampling), wherein the

[0011] / 2 filter is applied to a reference sample.

[0258] Embodiment 41. The method of Embodiment 40, in which, when availTL is equal to FALSE and bCTUboundary is equal to FALSE, the following applies to F set in F2: pSelDsY[idx]= (F[1]*pY[0][-2]+F[0]*pY[0][-1]+1)>>1 method.

[0259] Embodiment 42. In any one of the above embodiments, if at least the first condition is not satisfied (for example, bCTUboundary is equal to FALSE), the following applies: pSelDsY[idx]= (F4[0][1]*pY[SubWidthC*x-1][-1]+ F4[0][2]*pY[SubWidthC*x-1][-2]+ F4[1][1]*pY[SubWidthC*x][-1]+ F4[1][2]*pY[SubWidthC*x][-2]+ F4[2][1]*pY[SubWidthC*x+1][-1]+ F4[2][2]*pY[SubWidthC*x+1][-2]+4>>3 method.

[0260] Embodiment 43. In any one of the embodiments described above, if at least the first condition is satisfied (for example, bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]= (F2[0]*pY[SubWidthC*x-1][-1]+ F2[1]*pY[SubWidthC*x][-1]+ F2[2]*pY[SubWidthC*x+1][-1]+2>>2 method.

[0261] Embodiment 44. In any one of the above embodiments, if at least the first condition is not satisfied and the second condition is satisfied (for example, bCTUboundary is equal to FALSE and availTL is equal to TRUE), then the following applies: If at least the first condition is not satisfied (for example, bCTUboundary is equal to FALSE), then the following applies: pSelDsY[idx]= (F4[0][1]*pY[-1][-1]+ F4[0][2]*pY[-1][-2]+ F4[1][1]*pY[0][-1]+ F4[1][2]*pY[0][-2]+ F4[2][1]*pY[1][-1]+ F4[2][2]*pY[1][-2]+4>>3 method.

[0262] Embodiment 45. In any one of the embodiments described above, if at least the first condition is satisfied and the second condition is satisfied (for example, bCTUboundary is equal to TRUE and availTL is equal to TRUE), then the following applies: pSelDsY[idx]= (F2[0]*pY[-1][-1]+ F2[1]*pY[0][-1]+ F2[2]*pY[1][-1]+2>>2 method.

[0263] Embodiment 46. In any one of the above embodiments, if at least the first condition is not satisfied and the second condition is not satisfied (bCTUboundary is equal to FALSE and availTL is equal to FALSE), then the following applies: pSelDsY[idx]= (F1[1]*pY[0][-2]+F1[0]*pY[0][-1]+1)>>1 or pSelDsY[idx]= (F1[1]*pY[0][-2]+F1[0]*pY[0][-1]+2)>>2 method.

[0264] Embodiment 47. In any one of the above embodiments, if at least the first condition is satisfied and the second condition is not satisfied (bCTUboundary is equal to TRUE and availTL is equal to FALSE), the following applies: pSelDsY[idx]=pY[0][-1] method.

[0265] Embodiment 48. In any one of the above embodiments, if the second condition is satisfied (for example, availTL is equal to TRUE), the following applies: pDsY[0][y]= (F1[0]*pY[0][SubHeightC*y]+ F1[1]*pY[0][SubHeightC*y+1]+2)>>2 method.

[0266] Embodiment 49. A method of any one of the above embodiments, wherein a padding operation is used to implement filter selection on the boundaries of a reconstructed rumor block.

[0267] Embodiment 50. A method of any one of the embodiments described above, A method further comprising adjusting the filtering process when the location of the filtered area is at a block boundary.

[0268] Embodiment 51. A method according to any one of the above embodiments, wherein the filter coefficient is position-dependent.

[0269] Embodiment 52. A method of Embodiment 51, wherein, if the left side is unavailable, the left-side sample is obtained by horizontally copying the leftmost reconfigured sample of the reconfigured block.

[0270] Embodiment 53. A method of Embodiment 51, wherein, if the upper part is unavailable, the upper part sample is obtained by vertically copying the top reconstructed sample of the reconstructed block.

[0271] Embodiment 54. A method of any one of the embodiments described above, wherein filtering by one of the filters Fa ∈ {F1...F4} is performed by using a padding operation and a filter Fb, wherein the filter Fb has more non-zero coefficients than the filter Fa.

[0272] Embodiment 55. A method of Embodiment 54, wherein when Fa is F1 and Fb is F2, filter F1 is implemented as a combination of padding and filtering using filter F2.

[0273] Embodiment 56. One of the methods from Embodiments 49 to 55, wherein the filter is conditionally determined as follows: If the first condition (e.g., subsampling ratio information obtained from a specification-defined table, such as SubWidthC==1 and SubHeightC==1) is not satisfied, the following applies to the filter set {F1, F2, F3}: F2[0]=1,F2[1]=2,F2[2]=1 F3[i][j]=F4[i][j]=0, where i=0..2 and j=0..2 If the second condition (for example, subsampling ratio information obtained from the table, such as SubWidthC==2 and SubHeightC==2) is satisfied, F3[0][1]=1,F3[1][1]=4,F3[2][1]=1, F3[1][0]=1,F3[1][2]=1, F4[0][1]=1,F4[1][1]=2,F4[2][1]=1, F4[0][2]=1,F4[1][2]=2,F4[2][2]=1 In other cases (for example, when the second condition (e.g., subsampling ratio information obtained from the table, such as SubWidthC==2 and SubHeightC==2) is not satisfied), F3[0][1]=0,F3[1][1]=8,F3[2][1]=0, F3[1][0]=0,F3[1][2]=0 F4[0][1]=2,F4[1][1]=4,F4[2][1]=2, F4[0][2]=0,F4[1][2]=0,F4[2][2]=0 The method.

[0274] Embodiment 57. Any one of Embodiments 49 to 56, wherein the padding operation is: If availT is equal to FALSE, then adjacent upper luma samples pY[x][y] where x=-1,..SubWidthC*numSampT-1, y=-1,-2 are set to equal luma sample pY[x][0], or, If availL is equal to FALSE, then adjacent left lumens samples pY[x][y] where x=-1,-2,-3, y=-1,..SubHeightC*numSampL-1 are set to be equal to lumens sample pY[0][y]. A method having the following characteristics.

[0275] In the embodiments described above and any possible embodiments thereof, in order to apply a filter to the reconstructed lumen sample in the lumen block of the current block and / or to the lumen sample at a selected location adjacent to the current block, the filter belongs to a set of downsampling filters, and the set of downsampling filters contains only a reduced number of filters. That is, the number of filters in the set of downsampling filters is reduced. For example, depending on the value of the syntax element (e.g., sps_chroma_vertical_collocated_flag), the set of filters may contain only F3 and F4 filters, meaning only F3 and F4 can be selected. Accordingly, it may reduce the number of filter taps applied to the reconstructed lumen sample and / or to the lumen sample at a selected location adjacent to the current block.

[0276] Figure 16 is a block diagram showing a content supply system 3100 that realizes a content distribution service. This content supply system 3100 includes a capture device 3102 and a terminal device 3106, and optionally includes a display 3126. The capture device 3102 communicates with the terminal device 3106 via a communication link 3104. The communication link may include the communication channel 13 described above. The communication link 3104 includes, but is not limited to, Wi-Fi, Ethernet, cable, wireless (3G / 4G / 5G), USB, or any combination thereof.

[0277] The capture device 3102 may generate data and encode the data using the encoding method shown in the above embodiment. Alternatively, the capture device 3102 may distribute the data to a streaming server (not shown), which encodes the data and sends the encoded data to the terminal device 3106. The capture device 3102 includes, but is not limited to, a camera, a smartphone or tablet, a computer or laptop, a video conferencing system, a PDA, an in-vehicle device, or any combination thereof. For example, the capture device 3102 may include the source device 12 described above. If the data includes video, the video encoder included in the capture device 3102 may actually perform video encoding. If the data includes audio (i.e., voice), the audio encoder included in the capture device 3102 may actually perform audio encoding. In some practical scenarios, the capture device 3102 distributes the encoded video and audio data by multiplexing them together. In other practical scenarios, for example, in a video conferencing system, the encoded audio data and encoded video data are not multiplexed. The capture device 3102 distributes the encoded audio data and encoded video data separately to the terminal device 3106.

[0278] In the content supply system 3100, the terminal device 3106 receives and plays back the encoded data. The terminal device 3106 may be a device equipped with data reception and recovery functions, such as a smartphone or tablet 3108, a computer or laptop 3110, a network video recorder (NVR) / digital video recorder (DVR) 3112, a TV 3114, a set-top box (STB) 3116, a video conferencing system 3118, a video surveillance system 3120, a personal digital assistant (PDA) 3122, an in-vehicle device 3124, or any combination thereof, that can decode the above-mentioned encoded data. For example, the terminal device 3106 may include the above-mentioned destination device 14. If the encoded data includes video, the video decoder 30 included in the terminal device is given priority to perform video decoding. If the encoded data includes audio, the audio decoder included in the terminal device is given priority to perform audio decoding.

[0279] For terminal devices equipped with a display, such as a smartphone or tablet 3108, a computer or laptop 3110, a network video recorder (NVR) / digital video recorder (DVR) 3112, a TV 3114, a personal digital assistant (PDA) 3122, or an in-vehicle device 3124, the terminal device can supply the decoded data to its own display. For terminal devices without a display, such as an STB 3116, a video conferencing system 3118, or a video surveillance system 3120, an external display 3126 makes contact to receive and display the decoded data.

[0280] When each device in this system performs encoding or decoding, the picture encoding device or picture decoding device shown in the above embodiment may be used.

[0281] Figure 17 shows the structure of an example terminal device 3106. After the terminal device 3106 receives a stream from the capture device 3102, the protocol processing unit 3202 analyzes the transmission protocol of the stream. The protocol includes, but is not limited to, Real-Time Streaming Protocol (RTSP), Hypertext Transfer Protocol (HTTP), HTTP Live Streaming Protocol (HLS), MPEG-DASH, Real-Time Transport Protocol (RTP), Real-Time Messaging Protocol (RTMP), or any combination thereof.

[0282] After the protocol processing unit 3202 processes the stream, a stream file is generated. The file is output to the demultiplexing unit 3204. The demultiplexing unit 3204 can separate the multiplexed data into encoded audio data and encoded video data. As described above, in some real-world scenarios, for example, in a video conferencing system, the encoded audio data and encoded video data are not multiplexed. In this situation, the encoded data is sent to the video decoder 3206 and audio decoder 3208 without passing through the demultiplexing unit 3204.

[0283] The demultiplexing process generates a video elementary stream (ES), an audio ES, and optionally a subtitle. The video decoder 3206, including the video decoder 30 described in the above embodiment, decodes the video ES using the decoding method shown in the above embodiment to generate video frames and supplies this data to the synchronization unit 3212. The audio decoder 3208 decodes the audio ES to generate audio frames and supplies this data to the synchronization unit 3212. Alternatively, the video frames may be stored in a buffer (not shown in Figure 17) before supplying them to the synchronization unit 3212. Similarly, the audio frames may be stored in a buffer (not shown in Figure 17) before supplying them to the synchronization unit 3212.

[0284] The synchronization unit 3212 synchronizes video frames and audio frames and supplies video / audio to the video / audio display 3214. For example, the synchronization unit 3212 synchronizes the presentation of video and audio information. The information may be coded using syntax with timestamps relating to the presentation of coded audio and visual data and timestamps relating to the delivery of the data stream itself.

[0285] If subtitles are included in the stream, the subtitle decoder 3210 decodes the subtitles, synchronizes them with the video and audio frames, and supplies the video / audio / subtitle to the video / audio / subtitle display 3216.

[0286] The present invention is not limited to the above-described system, and either the picture encoding device or the picture decoding device in the above-described embodiment may be incorporated into other systems, such as a car system.

[0287] Mathematical operators The mathematical operators used in this application are similar to those used in the C programming language. However, the results of integer division and arithmetic shift operations are more strictly defined, and further operations such as exponential and real-valued division are defined. The rules for numbering and counting generally start from 0, for example, "1st" is equivalent to the 0th, "2nd" is equivalent to the 1st, and so on.

[0288] Arithmetic operators The following arithmetic operations are defined as follows: [Table 13]

[0289] Logical operators The following arithmetic operators are defined as follows: x&&y: Boolean logic "AND" for x and y. Boolean logic "OR" of x and y: x||yx ! Boolean logic "NOT" If x?y:zx is TRUE or not equal to 0, evaluate it as the value of y; otherwise, evaluate it as the value of z.

[0290] Relational operators The following relational operators are defined as follows: > Larger than ~ >= ~End < Smaller than ~ <= ~below == is equal to ~ != is not equal to ~.

[0291] When a relational operator is applied to a syntax element or variable that has been assigned the value "NA" (not applicable), the value "NA" is treated as the distinctive value of that syntax element or variable. The value "NA" is considered not to be equal to any other value.

[0292] Bitwise operators The following bitwise operators are defined as follows: & Bitwise "AND". When acting on an integer argument, it acts on the two's complement representation of the integer value. When acting on a binary argument that contains fewer bits than other arguments, the shorter argument is expanded by adding an additional significant bit equal to 0. | Bitwise "OR". When acting on integer arguments, it operates on the two's complement representation of the integer value. When acting on a binary argument that contains fewer bits than other arguments, the shorter argument is expanded by adding an additional significant bit equal to 0. ^ Bitwise "XOR". When acting on an integer argument, it operates on the two's complement representation of the integer value. When acting on a binary argument that contains fewer bits than other arguments, the shorter argument is expanded by adding an additional significant bit equal to 0. x >> y Arithmetic right shift of the two's complement integer representation of x by y binary digits. This function is defined only for non-negative integer values of y. The bits shifted into the most significant bit (MSB) as a result of the right shift have the same value as the MSB of x before the shift operation. x << y Arithmetic left shift of the two's complement integer representation of x by y binary digits. This function is defined only for non-negative integer values of y. The bits shifted into the least significant bit (LSB) as a result of the left shift have a value equal to 0.

[0293] Assignment operator The following arithmetic operators are defined as follows: = Assignment operator ++ Increment, i.e., x++ is equivalent to x = x + 1 and, when used as an array index, is evaluated as the value of the variable before the increment operation. -- Decrement, i.e., x-- is equivalent to x = x - 1 and, when used as an array index, is evaluated as the value of the variable before the decrement operation. [[ID=十六]]+= Increment by the specified amount, i.e., x += 3 is equivalent to x = x + 3 and x += (-3) is equivalent to x = x + (-3). [[ID=十七]] [[ID=十八]]-= Decrement by the specified amount, i.e., x -= 3 is equivalent to x = x - 3 and x -= (-3) is equivalent to x = x - (-3).

[0294] Range notation The following notations are used to specify a range of values: x = y..z x, y, and z are integers and assuming z is greater than y, x assumes integer values from y up to and including z. <了

[0295] Mathematical functions The following mathematical functions are defined:

Number

number

number

number

number

[0296] Order of operations When precedence in an expression is not explicitly indicated by the use of parameters, the following rules apply: • Operations with higher priority are evaluated before operations with lower priority. Operations with the same priority are evaluated from left to right.

[0297] The table below defines the order of operations from highest to lowest, with higher positions in the table indicating higher priority.

[0298] For operations also used in the C programming language, the order of precedence used herein is the same as that used in the C programming language. [Table 14]

[0299] Text description of logical operations In the text, logical operation statements will be mathematically described in the following format: if (condition 0) Statement 0 else if (condition 1) Statement 1 ... else / * Explanatory findings regarding the remaining conditions * / statement n It may be described in the following manner: ...The following applies: - If condition 0, statement 0 - Instead, in the case of condition 1, statement 1 - ··· - In cases other than those mentioned above (explanatory observations regarding the remaining conditions), statement n

[0300] Each statement in the text that begins with "...if..., ...otherwise, ...if..., ...otherwise, ..." is introduced by "...if..., ...then" or "...then" immediately following it. The last condition in "...if..., ...otherwise, ...if..., ...otherwise, ..." is always "otherwise, ...". Alternating statements of "...if..., ...otherwise, ...if..., ...otherwise, ..." can be identified by fitting "...then" or "...then" to the final "otherwise, ...".

[0301] In the text, logical operation statements will be mathematically described in the following format: if(condition 0a &&condition 0b) Statement 0 else if(condition 1a||condition 1b) Statement 1 ... else statement n It may be described in the following manner: ...The following applies: - Statement 0 if all of the following conditions are true: - Condition 0a - Condition 0b - If not, then statement 1: if one or more of the following conditions are true: - Condition 1a - Condition 1b - ··· - In cases other than those mentioned above, statement n

[0302] In the text, logical operation statements will be mathematically described in the following format: if (condition 0) Statement 0 if (condition 1) Statement 1 It may be described in the following manner: If condition 0, statement 0 If condition 1 is met, statement 1

[0303] While embodiments of this application have been described primarily in relation to video coding, it should be noted that embodiments of the coding system 10, encoder 20, and decoder 30 (and, correspondingly, system 10), and other embodiments described herein, may also be configured for still image processing or coding, that is, processing or coding of individual pictures independent of any preceding or sequential pictures, as seen in video coding. Generally, when picture processing coding is limited to a single picture 17, only the interpretation units 244 (encoder) and 344 (decoder) may not be available. All other functions (also called tools or techniques) of the video encoder 20 and video decoder 30, such as residual calculation 204 / 304, transformation 206, quantization 208, inverse quantization 210 / 310, (inverse) transformation 212 / 312, partitioning 262 / 362, intra prediction 254 / 354, and / or loop filtering 220, 320, as well as entropy coding 270 and entropy decoding 304, may similarly be used for still image processing.

[0304] For example, embodiments of the encoder 20 and decoder 30, and the functions described herein with reference to the encoder 20 and decoder 30, may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored as one or more instructions or codes on a computer-readable medium or transmitted over a communication medium and executed by a hardware-based processing unit. The computer-readable medium may include a computer-readable storage medium corresponding to a tangible medium such as a data storage medium, or a communication medium including, for example, any medium that facilitates the transfer of computer programs from one place to another according to a communication protocol. Thus, the computer-readable medium may generally correspond to (1) a non-transient, tangible computer-readable storage medium, or (2) a communication medium such as a signal or carrier wave. The data storage medium may be any available medium that can be accessed by one or more computers or one or more processors to read instructions, codes and / or data structures for implementation of the technology described herein. A computer program product may include a computer-readable medium.

[0305] For example, and not as an limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer. Furthermore, any connection is appropriately referred to as computer-readable media. For example, when instructions are transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio waves, and microwaves, these are included in the definition of media. However, it should be understood that computer-readable storage media and data storage media do not include connections, carriers, signals, or other temporary media, but instead refer to non-temporary, tangible storage media. The terms "disk" and "disc" used herein include Compact Disc (CD), LaserDisc, Optical Disc, Digital Versatile Disc (DVD), Floppy Disc, and Blu-ray Disc. A "disk" typically reproduces data magnetically, while a "disc" reproduces data optically using a laser. Combinations of the above should also be included within the scope of computer-readable media.

[0306] Instructions may be executed by one or more processors, such as digital signal processors (DSPs), general-purpose microprocessors, application-specific integrated circuits (ASICs), field-programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuits. Thus, the term “processor” as used herein may refer to any of the above structures, or any other structure suitable for implementing the technology described herein. Furthermore, in some embodiments, the functionality described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into a composite codec. The technology may also be fully implemented in one or more circuits or logic elements.

[0307] The technology of this disclosure may be implemented in a wide variety of devices or apparatus, including wireless handsets, integrated circuits (ICs), or sets of ICs (e.g., chipsets). While various components, modules, or units are described in this disclosure to highlight the functional aspects of devices configured to perform the disclosed technology, implementation by different hardware units is not necessarily required. Rather, as described above, the various units may be combined into a codec hardware unit, or they may be provided by a collection of interoperable hardware units, including one or more processors as described above, together with appropriate software and / or firmware.

[0308] [Cross-references to related applications] This patent application claims priority to U.S. Provisional Patent Application No. 62 / 955,405, filed December 30, 2019, and U.S. Provisional Patent Application No. 62 / 958,293, filed January 7, 2020, both of which are incorporated herein by reference in their entirety.

[0309] Further embodiments of the present invention are given below. It should be noted that the numbering used in the following sections does not necessarily have to match the numbering used in the previous sections.

[0310] Embodiment 1: A chromablock prediction method, The first step is to parse the first syntax element from the bitstream, A step of processing the rumor sample of the current block based at least on the first syntax element to obtain a filtered rumor sample of the current block, A step of obtaining a predicted value of the chroma sample of the current block based on the filtered chroma sample. It has, The step of processing a luma sample of the current block based at least on the first syntax element is: Processing the luma sample of the current block by using a first set of filtering coefficients when the value of the first syntax element is a first value, or Processing the luma sample of the current block by using a second set of filtering coefficients when the value of the first syntax element is the second value. A method having.

[0311] Embodiment 2: The first syntax element is sps_chroma_vertical_collocated_flag. The method according to Embodiment 1.

[0312] Embodiment 3: Processing the luma sample of the current block by using the first set of filtering coefficients when the value of the first syntax element is a first value is: If sps_chroma_vertical_collocated_flag is equal to 1, then the filtered chroma sample is the following pDsY[x][y]= (F3[1][0]*pY[SubWidthC*x][SubHeightC*y-1] +F3[0][1]*pY[SubWidthC*x-1][SubHeightC*y] +F3[1][1]*pY[SubWidthC*x][SubHeightC*y] +F3[2][1]*pY[SubWidthC*x+1][SubHeightC*y] +F3[1][2]*pY[SubWidthC*x][SubHeightC*y+1] +4)>>3 It can be derived as follows, The first set of filtering coefficients has F3[1][0]=1, F3[0][1]=1, F3[1][1]=4, F3[2][1]=1, F3[1][2]=1, pY[x][y] represents the aforementioned luma sample, pDsY[x][y] represents the filtered luma sample, SubWidthC is the width of the current block, SubHeightC is the current height of the block. The method according to Embodiment 2.

[0313] Embodiment 4: Processing the luma sample of the current block by using the second set of filtering coefficients when the value of the first syntax element is the second value is: If sps_chroma_vertical_collocated_flag is equal to 0, then the filtered chroma sample is the following pDsY[x][y]= (F4[0][1]*pY[SubWidthC*x-1][SubHeightC*y] +F4[0][2]*pY[SubWidthC*x-1][SubHeightC*y+1] +F4[1][1]*pY[SubWidthC*x][SubHeightC*y] +F4[1][2]*pY[SubWidthC*x][SubHeightC*y+1] +F4[2][1]*pY[SubWidthC*x+1][SubHeightC*y] +F4[2][2]*pY[SubWidthC*x+1][SubHeightC*y+1]+4)>>3 It can be derived as follows, The second set of filtering coefficients has F4[0][1]=1, F4[0][2]=1, F4[1][1]=2, F4[1][2]=2, F4[2][1]=1, F4[2][2]=1, pY[x][y] represents the aforementioned luma sample, pDsY[x][y] represents the filtered luma sample, SubWidthC is the width of the current block, SubHeightC is the current height of the block. The method according to Embodiment 2.

[0314] Embodiment 5: The step of obtaining the predicted value of the chroma sample of the current block based on the filtered chroma sample is: The predicted value of the chroma sample is as follows: predSamples[x][y]= Clip1(((pDsY[x][y]*a)>>k)+b) It can be derived as follows, predSamples[x][y] represents the predicted value of the chroma sample in the current block, pDsY[x][y] represents the filtered luma sample, x = 0..nTbW-1, y = 0..nTbH-1, nTbW indicates the width of the conversion block, and nTbH indicates the height of the conversion block. The method according to any one of Embodiments 1 to 4.

[0315] Embodiment 6: The method further comprises the step of parsing the bitstream to obtain a second syntax element, The second syntax element is used to indicate that the intra-prediction mode used for current decoding is one of the INTRA_LT_CCLM, INTRA_L_CCLM, or INTRA_T_CCLM intra-prediction modes. The method according to any one of Embodiments 1 to 5.

[0316] Embodiment 7: This method is used to decode the current image block in the video sequence. The current image block includes the first chroma block and the current chroma block, and the images in the video sequence are in 4:2:0 or 4:2:2 format. The method according to any one of Embodiments 1 to 6.

[0317] Embodiment 8: The step of parsing the first syntax element from the bitstream is: This involves parsing the sequence parameter set (SPS) within the bitstream to obtain the first syntax element. The method according to any one of Embodiments 1 to 7.

[0318] Embodiment 9: The method further comprises the step of applying to a luma sample located at a selected position adjacent to the current block a set of filtering coefficients determined from a first set of filtering coefficients and a second set of filtering coefficients based on the first syntax element, The selected ruma sample located adjacent to the current block is one or more column samples to the left of the current block and / or one or more row samples above the current block. The method according to any one of Embodiments 1 to 8.

[0319] Embodiment 10: The method determines that when both SubWidthC and SubHeightC are equal to 1, the downsampled lumens at the same location in the current block is the next pDsY[x][y]=pY[x][Y] It further has the property of being derived as follows: pY[x][y] represents lumens samples at the same location. pDsY[x][y] represents the downsampled luma sample at the same location, SubWidthC is the width of the current block, SubHeightC is the current height of the block. The method according to any one of Embodiments 1 to 9.

[0320] Embodiment 11: The aforementioned lumens sample pY[x][y] at the same position is set to be equal to the reconstructed lumens sample before the deblocking filter process at position (xTbY+x, yTbY+y), x = 0..nTbW * SubWidthC-1, y = 0..nTbH * SubHeightC-1, (xTbY, yTbY) indicates the current Ruma position. nTbW indicates the width of the conversion block, and nTbH indicates the height of the conversion block. The method according to Embodiment 10.

[0321] Embodiment 12: A method for intra-prediction using a linear model, The steps include determining a filter for the chroma component of the current block based on the chroma format of the picture to which the current block belongs, The steps include: applying the determined filter to the reconstructed lumens sample of the lumens component of the current block and / or to an area of ​​the lumens sample at a selected location adjacent to the current block to obtain a filtered and reconstructed lumens sample; The steps include obtaining linear model coefficients based on the filtered and reconstructed lumens sample, The steps include: performing cross-component prediction based on the acquired linear model coefficients and the filtered reconstructed chroma sample of the current block to obtain predicted values ​​for the chroma component of the current block; A method of having.

[0322] Embodiment 13: The aforementioned filter is as follows: When the first condition, which includes SubWidthC==1 and SubHeightC==1, is not satisfied, the filter belongs to the filter set {F2,F3}: F2[0]=1,F2[1]=2,F2[2]=1; F3[i][j]=F4[i][j]=0, where i=0··2 and j=0··2 When the second condition, which includes SubWidthC==2 and SubHeightC==2, is satisfied, the filter belongs to the filter set {F3,F4}: F3[0][1]=1,F3[1][1]=4,F3[2][1]=1,F3[1][0]=1,F3[1][2]=1,F4[0] [1]=1,F4[1][1]=2,F4[2][1]=1,F4[0][2]=1,F4[1][2]=2,F4[2][2]=1; Alternatively, if the second condition, which includes SubWidthC==2 and SubHeightC==2, is not satisfied, the filter is: F4[0][1]=2,F4[1][1]=4,F4[2][1]=2 Defined as, It is determined conditionally, The method according to Embodiment 12.

[0323] Embodiment 14: The chroma format may be a YCbCr 4:4:4 chroma format, a YCbCr 4:2:0 format, a YCbCr 4:2:2 format, or a monochrome format. The method according to Embodiment 12 or 13.

[0324] Embodiment 15: The method further comprises the step of encoding the syntax elements into a bitstream, The aforementioned syntax element indicates the selection of a filter for the lumens sample belonging to the current block. The method according to any one of Embodiments 12 to 14.

[0325] Embodiment 16: The syntax element is sps_chroma_vertical_collocated_flag, and is included in the sequence parameter set (SPS) in the bitstream. The method according to Embodiment 15.

[0326] Embodiment 17: A method for intra-prediction using a linear model, The steps include determining a set of downsampling filters based on the chroma format of the picture to which the block currently belongs, and When a reconstructed adjacent upper luma sample is unavailable, the step is to obtain two ascending rows of adjacent samples by padding from the reconstructed luma block, When the reconstructed adjacent left lumen sample is unavailable, the step is to obtain three left columns of the adjacent sample by padding from the reconstructed lumen sample, The steps include obtaining a downsampled rumor sample of the reconstructed rumor sample within the rumor block of the current block, The steps include obtaining an upper downsampled luma reference sample by applying each downsampling filter in the set of downsampling filters to a selected sample from the two upper rows of the acquired adjacent samples, wherein when the selected sample is in the upper left position, each downsampling filter is applied to the combination of the reconstructed adjacent sample and the padded adjacent sample; The steps include: obtaining a left-side downsampled lumen reference sample by applying each downsampling filter in the set of downsampling filters to a selected sample from the three left columns of the acquired adjacent samples; The steps include determining one or more linear model coefficients based on the upper downsampled lumar reference sample or the left downsampled lumar reference sample or a combination of the upper downsampled lumar reference sample and the left downsampled lumar reference sample, and the chroma reference sample corresponding to the downsampled lumar reference sample, A step of obtaining a predicted sample of the chroma block corresponding to the chroma block based on the linear model coefficients and the downsampled chroma sample of the reconstructed chroma sample within the chroma block. A method of having.

[0327] Embodiment 18: The linear model is a multidirectional linear model (MDLM), and the linear model coefficients are used to obtain the MDLM. The method described in Embodiment 17.

[0328] Embodiment 19: A coding method implemented by a coding device, Steps include performing intra-prediction using a linear model, The steps include generating a bitstream containing multiple syntax elements and It has, The aforementioned plurality of syntax elements include a syntax element indicating the selection of a filter for a chroma sample belonging to a block, and the syntax element is sps_cclm_colocated_chroma_flag. method.

[0329] Embodiment 20: When the value of the syntax element is 1 or true, the filter is not applied to the lumens sample for determining the linear model and making the prediction. When the value of the syntax element is 0 or false, the filter is applied to the lumens sample for determining the linear model and making the prediction. The method described in Embodiment 19.

[0330] Embodiment 21 A decoding method implemented by a decoding device, A step of parsing multiple syntax elements from a bitstream, wherein the multiple syntax elements include a syntax element indicating the selection of a filter for a chroma sample belonging to a block, and the syntax element is sps_cclm_colocated_chroma_flag, The steps include: performing intra-prediction using a linear model based on the aforementioned syntax elements; A method of having.

[0331] Embodiment 22 When the value of the syntax element is 0 or false, the filter is applied to the lumens sample for determining the linear model and making the prediction. When the value of the syntax element is 1 or true, the filter is not applied to the lumens sample for determining the linear model and making the prediction. The method according to Embodiment 21.

[0332] Embodiment 23: The step of performing intra-prediction using a linear model based on the syntax elements is: If sps_chroma_vertical_collocated_flag is equal to 1, the filtered chroma sample is the following pDsY[x][y]= (F3[1][0]*pY[SubWidthC*x][SubHeightC*y-1] +F3[0][1]*pY[SubWidthC*x-1][SubHeightC*y] +F3[1][1]*pY[SubWidthC*x][SubHeightC*y] +F3[2][1]*pY[SubWidthC*x+1][SubHeightC*y] +F3[1][2]*pY[SubWidthC*x][SubHeightC*y+1] +4)>>3 It can be derived as follows, The aforementioned filter has F3[1][0]=1, F3[0][1]=1, F3[1][1]=4, F3[2][1]=1, F3[1][2]=1, pY[x][y] represents the aforementioned luma sample, pDsY[x][y] represents the filtered luma sample, SubWidthC is the width of the block, SubHeightC is the height of the block. The method according to Embodiment 21.

[0333] Embodiment 24: The step of performing intra-prediction using a linear model based on the syntax elements is: If sps_chroma_vertical_collocated_flag is equal to 0, the filtered chroma sample is the following pDsY[x][y]= (F4[0][1]*pY[SubWidthC*x-1][SubHeightC*y] +F4[0][2]*pY[SubWidthC*x-1][SubHeightC*y+1] +F4[1][1]*pY[SubWidthC*x][SubHeightC*y] +F4[1][2]*pY[SubWidthC*x][SubHeightC*y+1] +F4[2][1]*pY[SubWidthC*x+1][SubHeightC*y] +F4[2][2]*pY[SubWidthC*x+1][SubHeightC*y+1]+4)>>3 It can be derived as follows, The aforementioned filter has F4[0][1]=1, F4[0][2]=1, F4[1][1]=2, F4[1][2]=2, F4[2][1]=1, F4[2][2]=1, pY[x][y] represents the aforementioned luma sample, pDsY[x][y] represents the filtered luma sample, SubWidthC is the width of the block, SubHeightC is the height of the block. The method according to Embodiment 21 or 23.

[0334] Embodiment 25: A method for performing intra-prediction using a linear model, The steps include determining a set of downsampling filters based on chroma format information, wherein the chroma format information indicates the chroma format of the picture to which the block currently belongs, and The steps include applying each of the downsampling filters in the set of downsampling filters to obtain a downsampled rumor sample of the reconstructed rumor sample within the rumor block of the current block, and a downsampled rumor reference sample of a selected adjacent rumor sample outside the rumor block, The steps include determining one or more linear model coefficients based on the downsampled lumern reference sample of the selected adjacent lumern sample and the chroma reference sample corresponding to the downsampled lumern reference sample, A step of obtaining a predicted sample of the chroma block corresponding to the chroma block based on the linear model coefficients and the downsampled chroma sample of the reconstructed chroma sample within the chroma block. A method of having.

[0335] Embodiment 26: The step of determining a set of downsampling filters based on chroma format information is: The steps include determining subsampling ratio information (SubWidthC and SubHeightC) based on the chroma format information, The steps include determining the set of downsampling filters based on the subsampling ratio information (SubWidthC and SubHeightC), and Having, The method according to Embodiment 25.

[0336] Embodiment 27: At a minimum, if bCTUboundary is equal to TRUE, then the following pSelDsY[idx]=(F2[0]*pY[SubWidthC*x-1][-1]+F2[1]*pY[SubWidthC*x][-1]+F2[2]*pY[SubWidthC*x+1][-1]+2)>>2 The following applies: The method according to Embodiment 25 or 26.

[0337] Embodiment 28: A non-temporary computer-readable medium that, when executed by a computer device, carries program code that causes the computer device to execute the method described in any one of Embodiments 1 to 27.

[0338] Embodiment 29: Having a decoder or encoder, One or more processors, A non-temporary computer-readable storage medium coupled to the processor and storing the programming executed by the processor, It has, The programming, when executed by the processor, configures the decoder or encoder to perform the method described in any one of Embodiments 1 to 27. Coding device.

[0339] Embodiment 30: Non-temporary memory storage configured to store videotapers in the form of bitstreams, A video decoder configured to perform any one of embodiments 1 to 18, 21 to 27 and the method described herein A video data decoding device having the following features.

Claims

1. A chromablock prediction method, The steps include: parsing the sequence parameter set (SPS) parameters within the bitstream to obtain the first syntax element; A step of processing the ruma sample of the current block to obtain a filtered ruma sample of the current block, based on a determination of at least the first syntax element and whether the chroma format of the current block is 4:2:0, A step of obtaining a predicted value of the chroma sample of the current block based on the filtered chroma sample. It has, Processing the rumor sample of the current block is Processing the luma sample of the current block by using a first set of filtering coefficients when the value of the first syntax element is a first value, or Processing the luma sample of the current block by using a second set of filtering coefficients when the value of the first syntax element is the second value. A method having

2. The first syntax element is sps_chroma_vertical_collocated_flag. The method according to claim 1.

3. Processing the luma sample of the current block by using the first set of filtering coefficients when the value of the first syntax element is a first value is: If at least sps_chroma_vertical_collocated_flag is equal to 1, then the filtered ruma sample is the following pDsY[x][y]= (F3[1][0]*pY[SubWidthC*x][SubHeightC*y-1] +F3[0][1]*pY[SubWidthC*x-1][SubHeightC*y] +F3[1][1]*pY[SubWidthC*x][SubHeightC*y] +F3[2][1]*pY[SubWidthC*x+1][SubHeightC*y] +F3[1][2]*pY[SubWidthC*x][SubHeightC*y+1] +4)>>3 It can be derived as follows, The first set of filtering coefficients includes F3[1][0]=1, F3[0][1]=1, F3[1][1]=4, F3[2][1]=1, and F3[1][2]=1. pY[x][y] represents the aforementioned luma sample, pDsY[x][y] represents the filtered lumens sample, SubWidthC is the width of the current block, SubHeightC is the current height of the block. The method according to claim 2.

4. Processing the luma sample of the current block by using the second set of filtering coefficients when the value of the first syntax element is the second value is: If at least sps_chroma_vertical_collocated_flag is equal to 0, the filtered ruma sample is the following pDsY[x][y]= (F4[0][1]*pY[SubWidthC*x-1][SubHeightC*y] +F4[0][2]*pY[SubWidthC*x-1][SubHeightC*y+1] +F4[1][1]*pY[SubWidthC*x][SubHeightC*y] +F4[1][2]*pY[SubWidthC*x][SubHeightC*y+1] +F4[2][1]*pY[SubWidthC*x+1][SubHeightC*y] +F4[2][2]*pY[SubWidthC*x+1][SubHeightC*y+1]+4)>>3 It can be derived as follows, The second set of filtering coefficients includes F4[0][1]=1, F4[0][2]=1, F4[1][1]=2, F4[1][2]=2, F4[2][1]=1, and F4[2][2]=1. pY[x][y] represents the aforementioned luma sample, pDsY[x][y] represents the filtered lumens sample, SubWidthC is the width of the current block, SubHeightC is the current height of the block. The method according to claim 2.

5. The step of obtaining the predicted value of the chroma sample of the current block based on the filtered chroma sample is: The predicted value of the chroma sample is as follows: predSamples[x][y]= Clip1(((pDsY[x][y]*a)>>k)+b) It can be derived as follows, predSamples[x][y] represents the predicted value of the chroma sample in the current block, pDsY[x][y] represents the filtered lumens sample, x = 0, nTbW - 1, y = 0, nTbH - 1. nTbW indicates the width of the conversion block, and nTbH indicates the height of the conversion block. The method according to any one of claims 1 to 4.

6. The method further comprises the step of parsing the bitstream to obtain a second syntax element, The second syntax element is used to indicate that the intra-prediction mode currently used for decoding is one of the following intra-prediction modes: INTRA_LT_CCLM, INTRA_L_CCLM, or INTRA_T_CCLM. The method according to any one of claims 1 to 5.

7. The method further comprises the step of applying to a luma sample located at a selected position adjacent to the current block a set of filtering coefficients determined from a first set of filtering coefficients and a second set of filtering coefficients based on the first syntax element, The selected ruma sample located adjacent to the current block is one or more column samples to the left of the current block and / or one or more row samples above the current block. The method according to any one of claims 1 to 6.

8. The method determines that when both SubWidthC and SubHeightC are equal to 1, the downsampled luma sample at the same location in the current block is the next pDsY[x][y]=pY[x][Y] It further has the property of being derived as follows: pY[x][y] represents lumens samples at the same location. pDsY[x][y] represents the downsampled luma sample at the same location, SubWidthC is the width of the current block, SubHeightC is the current height of the block. The method according to any one of claims 1 to 7.

9. The aforementioned lumens sample pY[x][y] at the same position is set to be equal to the reconstructed lumens sample before the deblocking filter process at position (xTbY+x, yTbY+y), x = 0. . nTbW * SubWidthC - 1, y = 0. . nTbH * SubHeightC - 1, (xTbyY, yTbyY) indicates the current Ruma position. nTbW indicates the width of the conversion block, and nTbH indicates the height of the conversion block. The method according to claim 8.

10. A non-temporary computer-readable medium that, when executed by a computer device, carries program code that causes the computer device to execute the method according to any one of claims 1 to 9.