Methods and apparatus of cross-component prediction refinement by prediction offsets from template region in video coding systems
By deriving refined chroma predictions using prediction offsets from a template area within a coding unit through a learning process, the method addresses inefficiencies in existing video coding technologies, enhancing coding efficiency and accuracy in cross-component prediction.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- MEDIATEK INC
- Filing Date
- 2026-01-06
- Publication Date
- 2026-07-16
AI Technical Summary
Existing video coding technologies face challenges in efficiently predicting chroma samples from luma samples, particularly in versatile video coding (VVC), where current methods like CCCM and its counterparts do not fully optimize coding gain due to limitations in refining prediction accuracy.
A method and apparatus are introduced to derive refined chroma predictions using prediction offsets from a template area within a coding unit (CU), employing a learning process to calculate weighting coefficients for L-shape template areas, which refine chroma predictions by adjusting differences between reconstructed and predicted samples.
This approach enhances coding efficiency by reducing prediction errors and improving coding gain, particularly in cross-component prediction methods such as CCLM, MMLM, and CCCM, by generating more accurate chroma predictions.
Smart Images

Figure CN2026070799_16072026_PF_FP_ABST
Abstract
Description
METHODS AND APPARATUS OF CROSS-COMPONENT PREDICTION REFINEMENT BY PREDICTION OFFSETS FROM TEMPLATE REGION IN VIDEO CODING SYSTEMSCROSS REFERENCE TO RELATED APPLICATIONS
[0001] The present invention is a non-Provisional Application of and claims priority to U.S. Provisional Patent Application No. 63 / 742,912, filed on January 8, 2025. The U.S. Provisional Patent Application is hereby incorporated by reference in its entirety.FIELD OF THE INVENTION
[0002] The present invention relates to video coding. In particular, the present invention relates to deriving refined prediction using sample differences or reconstructed samples in a template area of the current block with position-related weighting.BACKGROUND
[0003] Versatile video coding (VVC) is the latest international video coding standard developed by the Joint Video Experts Team (JVET) of the ITU-T Video Coding Experts Group (VCEG) and the ISO / IEC Moving Picture Experts Group (MPEG) . The standard has been published as an ISO standard: ISO / IEC 23090-3: 2021, Information technology -Coded representation of immersive media -Part 3: Versatile video coding, published Feb. 2021. VVC is developed based on its predecessor HEVC (High Efficiency Video Coding) by adding more coding tools to improve coding efficiency and also to handle various types of video sources including 3-dimensional (3D) video signals.
[0004] Fig. 1A illustrates an exemplary adaptive Inter / Intra video encoding system incorporating loop processing. For Intra Prediction 110, the prediction data is derived based on previously coded video data in the current picture. For Inter Prediction 112, Motion Estimation (ME) is performed at the encoder side and Motion Compensation (MC) is performed based on the result of ME to provide prediction data derived from other picture (s) and motion data. Switch 114 selects Intra Prediction 110 or Inter Prediction 112 and the selected prediction data is supplied to Adder 116 to form prediction errors, also called residues. The prediction error is then processed by Transform (T) 118 followed by Quantization (Q) 120. The transformed and quantized residues are then coded by Entropy Encoder 122 to be included in a video bitstream corresponding to the compressed video data. The bitstream associated with the transform coefficients is then packed with side information such as motion and coding modes associated with Intra prediction and Inter prediction, and other information such as parameters associated with loop filters applied to underlying image area. The side information associated with Intra Prediction 110, Inter prediction 112 and in-loop filter 130, is provided to Entropy Encoder 122 as shown in Fig. 1A. When an Inter-prediction mode is used, a reference picture or pictures have to be reconstructed at the encoder end as well. Consequently, the transformed and quantized residues are processed by Inverse Quantization (IQ) 124 and Inverse Transformation (IT) 126 to recover the residues. The residues are then added back to prediction data 136 at Reconstruction (REC) 128 to reconstruct video data. The reconstructed video data may be stored in Reference Picture Buffer 134 and used for prediction of other frames.
[0005] As shown in Fig. 1A, incoming video data undergoes a series of processing in the encoding system. The reconstructed video data from REC 128 may be subject to various impairments due to a series of processing. Accordingly, in-loop filter 130 is often applied to the reconstructed video data before the reconstructed video data are stored in the Reference Picture Buffer 134 in order to improve video quality. For example, deblocking filter (DF) , Sample Adaptive Offset (SAO) and Adaptive Loop Filter (ALF) may be used. The loop filter information may need to be incorporated in the bitstream so that a decoder can properly recover the required information. Therefore, loop filter information is also provided to Entropy Encoder 122 for incorporation into the bitstream. In Fig. 1A, Loop filter 130 is applied to the reconstructed video before the reconstructed samples are stored in the reference picture buffer 134. The system in Fig. 1A is intended to illustrate an exemplary structure of a typical video encoder. It may correspond to the High Efficiency Video Coding (HEVC) system, VP8, VP9, H. 264 or VVC.
[0006] The decoder, as shown in Fig. 1B, can use some of the functional blocks as the encoder. For example, the decoder can reuse Inverse Quantization 124 and Inverse Transform 126; however, Transform 118 and Quantization 120 are not needed at the decoder. Instead of Entropy Encoder 122, the decoder uses an Entropy Decoder 140 to decode the video bitstream into quantized transform coefficients and needed coding information (e.g. ILPF information, Intra prediction information and Inter prediction information) . The Intra prediction 150 at the decoder side does not need to perform the mode search. Instead, the decoder only needs to generate Intra prediction according to Intra prediction information received from the Entropy Decoder 140. Furthermore, for Inter prediction, the decoder only needs to perform motion compensation (MC 152) according to Inter prediction information received from the Entropy Decoder 140 without the need for motion estimation.
[0007] Some related coding tools for VVC and HEVC are viewed as follows.
[0008] I. RELATED ART
[0009] I. 1 CCP / CCCM
[0010] Cross-Component Prediction (CCP) is an effective method where luma samples are used to predict chroma samples. CCP has been realized in coding tools like CCLM (cross-component linear mode) and MMLM (multi-mode linear model) . A formula with slope and bias of CCLM is used to predict chroma samples from luma samples. MMLM further divides the luma samples into two groups based on the average luma value and get two linear models from the two groups. For further boosting the coding gain by CCP concept, a tool called CCCM (Convolutional Cross-Component Model) was proposed in JVET-AA0057 where a 7-tap model is proposed to predict chroma from luma. The 7 taps include 5 spatial luma samples, a nonlinear term (square value of cantering luma sample) and a bias term as shown in the following formula: PredCCCM=c0×C+c1×N+c2×S+c3×E+c4×W+c5×P+c6×B. where P is a nonlinear term such as C2 and B is a bias term. The spatial luma samples are depicted as Fig. 2.
[0011] The CCCM process receives the luma samples from neighbouring area and applies a down-sampling process to obtain a down-sampled version of luma to be used for solving the 7-tap model. The down-sampled luma area is aligned the chroma area as shown in Fig. 3. columnsLeft = 6 extWidth = pu [Cb] . width rowsAbove = 6 extHeight = pu [Cb] . height.
[0012] The CCCM model can be rewritten as below: PredCCCM = cfT c = [c0, c1, c2, c3, c4, c5, c6] f = [C, N, S, E, W, P, B] , down-sampled luma samples.
[0013] To obtain the optimal parameter c, we must minimize the SSD (Sum Of Square Difference) of (y-cfT) for all samples in reference areas, where y is the target which is the chroma sample for certain location. The SSD minimization is equivalent to solving a matrix equation Ac=b, where A is an auto-correlation matrix of feature vector f and b is a cross-correlation vector of feature vector f and target y. To solve the parameters, all luma chroma sample pairs are used to accumulate the auto-correlation matrix and cross-correlation vector to form the items as shown below:
[0014] A is an auto-correlation of feature vector f = [C, N, S, E, W, P, B] and b is a cross-correlation vector of feature vector f and target y as follows:
[0015] A Method like Gaussian Elimination can be used to solve the matrix equations to get coefficients c0 to c6. After CCCM is proposed, other CCCM-like methods are proposed to increase the coding gain in ECM (Enhanced Compression Model) reference software. These counterparts are GL-CCCM (Gradient and Location based Convolutional Cross-Component Model) , NoSubCCCM (No Subsampled Convolutional Cross-Component Model) , CCCM-MDF (Convolutional Cross-Component Model with Multiple Down-sampling Filters) , LBCCP (Local-Boosting Cross-Component Prediction) , and DDCCP (Decoder Derived Cross-Component Prediction) . The detailed description of the counterparts can be found in JVET-AI2025.
[0016] Matrix Based Intra Prediction
[0017] In JVET AH meeting, matrix based intra prediction is proposed in JVET-AH0209 to replace the original angular prediction for even angular modes. Every position can have its own coefficients multiplying the template which is the nearest L-shape area composed by reconstruction samples to generate the prediction sample for that position. The coefficients for each position are obtained by a learning or training process. Description of matrix based intra prediction can also be found in JVET-AI2025.
[0018] In the present invention, methods and apparatus using an L-shape template area to derive prediction offsets for refining the cross-component prediction are disclosed, where either the differences between reconstructed samples and prediction samples derived from a cross-component model or the reconstructed samples along are used to derive the prediction offset. BRIEF SUMMARY OF THE INVENTION
[0019] A method and apparatus of video coding using refined prediction for cross-component prediction are disclosed. According to the method, input data associated with a current block comprising a luma component and a chroma component is received, wherein the input data comprise pixel data to be encoded at an encoder side or data associated with the current block to be decoded at a decoder side. A first chroma prediction is derived for a target chroma position in the current block based on one or more chroma prediction samples in the current block, wherein each of said one or more chroma prediction samples is derived by using one or more collocated luma samples according to a cross-component model. A prediction offset is derived for the target chroma position based on template samples at one or more positions in a template area of the current block. A refined chroma prediction is generated for the target chroma position by using the first chroma prediction and the prediction offset. A target chroma sample at the target chroma position is encoded or decoded using the refined chroma prediction.
[0020] In one embodiment, the prediction offset for the target chroma position is derived based on differences between reconstructed samples and predicted samples at said one or more positions in the template area of the current block. In one embodiment, the predicted samples at said one or more positions in the template area of the current block are derived using collocated luma samples in the template area of the current block according to the cross-component model. In one embodiment, the first chroma prediction is derived as a first weighted sum of said one or more chroma prediction samples and the prediction offset is derived as a second weighted sum of the differences between the reconstructed samples and the predicted samples at said one or more positions in the template area of the current block. In one embodiment, first coefficients for the first weighted sum and second coefficients for the second weighted sum are derived using a learning or training process.
[0021] In one embodiment, said one or more chroma prediction samples correspond to a single chroma prediction sample, 3x3 chroma prediction samples, or 5x5 chroma prediction samples.
[0022] In one embodiment, the prediction offset for the target chroma position is derived based on reconstructed samples at said one or more positions in the template area of the current block.
[0023] In one embodiment, the template area of the current block comprises an above template, a left template, an above-left template, or a combination therefore. In one embodiment, wherein three prediction offsets including above-only prediction offset, left-only prediction offset, and above and left prediction offset are derived using the above template only, the left template only, and both the above template and left template respectively, and a target prediction offset is selected from the three prediction offsets to generate the refined chroma prediction. In one embodiment, an index or syntax element is signalled or parsed to indicate the target prediction offset selected.
[0024] In one embodiment, an above template cost is calculated from the above template and a left template cost is calculated from the left template, the above template cost and the left template cost are used to determine whether to enable the refined chroma prediction. In one embodiment, if a sum of the above template cost and the left template cost is smaller than a first threshold, then the above and left prediction offset is used. In one embodiment, if a sum of the above template cost and the left template cost is larger than a first threshold, then the above-only prediction offset or the left-only prediction offset is used depending on which of the above template cost and the left template cost is smaller.
[0025] In one embodiment, the refined chroma prediction is enabled for the current block when the current block is coded in CCLM (Cross-Component Linear Mode) , MMLM (Multi-Mode Linear Model) and other counterparts of CCCM.BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Fig. 1A illustrates an exemplary adaptive Inter / Intra video encoding system incorporating loop processing.
[0027] Fig. 1B illustrates a corresponding decoder for the encoder in Fig. 1A.
[0028] Fig. 2 illustrates the spatial luma samples for CCCM.
[0029] Fig. 3 illustrates an example of chroma area used to solve CCCM model.
[0030] Fig. 4A to Fig. 4D show typical examples with three-by-three group size for different positions of the current block.
[0031] Fig. 5 illustrates a flowchart of an exemplary video coding system that derives refined prediction from the L-shape template area for chroma prediction according to a cross-component model.DETAILED DESCRIPTION OF THE INVENTION
[0032] It will be readily understood that the components of the present invention, as generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following more detailed description of the embodiments of the systems and methods of the present invention, as represented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. References throughout this specification to “one embodiment, ” “an embodiment, ” or similar language mean that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present invention. Thus, appearances of the phrases “in one embodiment” or “in an embodiment” in various places throughout this specification are not necessarily all referring to the same embodiment.
[0033] Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. One skilled in the relevant art will recognize, however, that the invention can be practiced without one or more of the specific details, or with other methods, components, etc. In other instances, well-known structures, or operations are not shown or described in detail to avoid obscuring aspects of the invention. The illustrated embodiments of the invention will be best understood by reference to the drawings, wherein like parts are designated by like numerals throughout. The following description is intended only by way of example, and simply illustrates certain selected embodiments of apparatus and methods that are consistent with the invention as claimed herein.
[0034] For this invention, we introduce a different template composed of prediction samples inside a CU (coding unit) and prediction offset which is calculated by reconstructed sample subtracting prediction sample from projected nearest L-shape positions. A learning or training process is invoked to get weighting coefficients multiplying the template to get a refined prediction samples for each position inside a CU. The refining target is the original chroma sample and a successful refinement can provide smaller prediction error compared to the prediction error before refinement.
[0035] II. PROPOSED METHOD
[0036] In this disclosure, several schemes using position dependent matrix coefficients for prediction refinement of CCP / CCCM are proposed. Each scheme can be applied equally to CCLM, MMLM and other counterparts of CCCM. One skilled in the art would understand that any of the following proposed methods (for example, in the Sections II. 1 to II. 2) or their combination can be implemented individually or jointly in a video coding system.
[0037] II. 1 Cross-component Prediction Refinement with Prediction Offsets from Neighbouring L-shape Area
[0038] After the prediction generated by cross-component prediction is obtained, for every position, a group of prediction samples and position projected prediction offsets from the L-shape template area are used to refine the prediction. The group of prediction samples can be three-by-three samples centring around a certain position inside a CU. Other group size such as five-by-five or one-by-one (just one centring prediction sample) is also a possible choice. The prediction offset in the L-shape template area is calculated as: (Trec -Tpred) where Trec is the reconstruction sample and Tpred is the prediction sample of the L-shape template area. The prediction samples of the L-shape template area are required to get the prediction offsets. Fig. 4A to Fig. 4D show typical examples with three-by-three group size for different positions of the current block.
[0039] Template as in Fig. 4A to Fig. 4D can be regarded as a 15-tap filtering where a refinement filter with coefficients cx, y0 to cx, y14 convolves with nine cross-component prediction samples and six projected prediction offsets values. The cross-component prediction samples are from the position marked 0 to 8 as in Fig. 4A to Fig. 4D. The position projected prediction offsets are marked 9 to 14 as in Fig. 4A to Fig. 4D. In this specific example, six taps of the position projected prediction offsets are adopted. Other number of position projected prediction offset taps is possible. For example, only offsets from 10 and 13 are used and only 2 taps of position projected prediction offsets are put into the template. The cross-component prediction at the position 4 (i.e., the centre position of the 3x3 group of prediction samples) in Fig. 4A to Fig. 4D is refined by the following formula: -Ppred’ = ∑k: 0.. 8 (cx, yk *Ppredk) + ∑k: 9.. 14 [cx, yk * (Treck -Tpredk) ] -Ppred is prediction from cross-component prediction (inside CU) -Trec is reconstruction for the L-shape template area -Tpred is prediction for the L-shape template area (also generated by cross-component prediction model with collocated luma samples of the L-shape template area) -Ppred’ is the refined prediction of location (x, y) or a delta value to refine prediction of location (x, y) by predicted by CCCM
[0040] The coefficients cx, y0 to cx, y14 can be obtained by a learning or training process as that used for getting coefficients for matrix-based intra prediction. The learning goal is to make the refined prediction more like the original chroma samples. We propose several schemes based on the concept used in the above-described example for boosting coding gain of cross-component prediction.
[0041] For one embodiment, prediction refinement is generated by multiplying two position dependent vectors. The first vector is composed of a group of prediction samples from the CU and prediction offsets from above and left L-shape template areas. The second vector is coefficients for individual positions. The group of prediction samples can be 1x1 (i.e., a single sample) , 3x3, or 5x5 window centring at the prediction sample of that position. Prediction offset is calculated by using the reconstruction samples in the L-shape template area subtracting the generated prediction samples respectively by the derived cross-component model from the L-shape template area. Collocated luma samples of the L-shape template area are used to generate the chroma prediction of the L-shape template just as the cross-component model is used to generate the prediction of the current CU. The number for involved prediction offsets for each side can be one, three (three is the example in Fig. 4A to Fig. 4D) , or five or more where the centre of the offsets is aligned with the centre of the group of prediction samples. With the multiplication operations, the output value is used as the refined prediction for the current CU. For another embodiment, the output value is a delta value (e.g., zero, positive or negative values) used to adjust the original prediction. Final prediction is obtained by adding the delta value to the original prediction sample.
[0042] For another embodiment, above-only or left-only or both above and left prediction offsets are used in the first input vector. The usage is explicitly signalled or implicitly determined. For explicit methods, refined three predictors are generated and RDO (LCRDO (Low-Complexity RDO) or HCRDO (High-Complexity RDO) ) process is invoked to decide which is the best choice as the selection index to be signalled by a certain syntax element. For implicit methods, template costs from above area and from left area are used for making decision. For one embodiment, the total template cost as the sum of template costs from the above and left areas is checked against a threshold. If the total cost is smaller than the threshold, prediction offset refinement is enabled. As for conditions of using the prediction offset related to the sides, the following conditions are used sequentially: Prediction refinement enabled when COSTabove + COSTleft < REFINE_COST_THRESHOLD. (a) Diff (COSTabove, COSTleft) < COST_DIFF_THRESHOLD, use above and left prediction offsets (b) COSTabove < COSTleft, use above-only prediction offsets (c) Use left-only prediction offsets.
[0043] Parameters REFINE_COST_THRESHOLD and COST_DIFF_THRESHOLD are CU size dependent values. For another embodiment, prediction refinement is always enabled while usage of the sides is checked against the conditions (a) , (b) , and (c) listed above.
[0044] For another embodiment, positions from a certain row or column of a CU share coefficients as the second vector for prediction refinement.
[0045] For another embodiment, above mentioned methods are applied to CU coded with CCLM, MMLM and other counterparts of CCCM. The prediction samples of the L-shape template area are generated with the model used to generate the prediction of the current CU for calculating the prediction offset.
[0046] For another embodiment, above mentioned methods are applied to CU coded with CCLM, MMLM, CCCM and other counterparts of CCCM except that the prediction samples of the L-shape template area are generated with another model derived from the L-shape templates from luma and chroma. Therefore, the prediction of the L-shape template can be generated by a derived CCLM model even the current CU is predicted by CCCM model.
[0047] II. 2 Prediction Refinement with Reconstruction Samples from Neighbouring L-shape Area
[0048] The prediction refinement methods described in Section II. 1 adopt prediction offsets as the input to calculate the refined prediction. In this section, we propose to use the reconstruction samples as the input to calculate the refined prediction. Take the 15-tap example as in Fig. 4, the prediction refinement formula is changed as follows: Ppred’ = ∑k: 0.. 8 (cx, yk *Ppredk) + ∑k: 9.. 14 (cx, yk *Treck) .
[0049] With offsets replaced by reconstruction samples, description of the methods in Section II. 1 are updated along with this change. For one embodiment, prediction refinement is generated by multiplying two position dependent vectors. The first vector is formed from a set of prediction and reconstruction samples located in the above and left template regions. The second vector represents the coefficients corresponding to each sample position. The group of prediction samples may consist of a 1×1 (single sample) , 3×3, or 5×5 window centred on the prediction sample of a specific position. The number for involved reconstruction samples for each side can be one, three (as shown in Fig. 4A to Fig. 4D) , or five or more where the centre of the reconstruction samples is aligned with the centre of the group of prediction samples inside the CU. With the multiplication operations, the output value is used as the refined prediction for the current CU. For another embodiment, the output value is a delta value (e.g., zero, positive or negative values) used to adjust the original prediction. The final prediction is obtained by adding the delta value to original prediction samples.
[0050] For another embodiment, above-only, left-only, or both above and left reconstruction samples are used in the first input vector. The usage is explicitly signalled or implicitly determined. For explicit methods, refined three predictors are generated and RDO (LCRDO or HCRDO) process is invoked to decide which is the best choice as the selection index to be signalled by a certain syntax element. For implicit methods, template costs from above area and from left area are used for making decision. For one embodiment, the total template cost as the sum of template costs from above and left areas is checked against a threshold. If the total cost is smaller than the threshold, prediction offset refinement is enabled. As for usage of the reconstruction samples relating to the sides, the following conditions are used sequentially: Prediction refinement enabled when COSTabove + COSTleft < REFINE_COST_THRESHOLD (a) Diff (COSTabove, COSTleft) < COST_DIFF_THRESHOLD, use above and left reconstruction samples (b) COSTabove < COSTleft, use above-only reconstruction samples (c) Use left-only reconstruction samples.
[0051] Parameters REFINE_COST_THRESHOLD and COST_DIFF_THRESHOLD are CU size dependent values. For another embodiment, prediction refinement is always enabled while usage of the sides is checked against the conditions (a) , (b) , and (c) listed above.
[0052] For another embodiment, positions from a certain row or column of a CU share coefficients as the second vector for prediction refinement.
[0053] Methods in this section do not require the prediction of the L-shape template area. Only the reconstruction of the L-shape template area is used. Therefore, the proposed methods can be used to refine all the prediction modes including luma or chroma coding modes.
[0054] Any of the foregoing proposed methods of CCP refinement using prediction offsets from a template region or Prediction Refinement with Reconstruction Samples from Neighbouring L-shape area can be implemented in encoders and / or decoders. For example, any of the proposed methods or combination thereof can be implemented in an intra prediction module of an encoder and / or decoder. Alternatively, any of the proposed methods or combination thereof can be implemented as a circuit coupled to an intra prediction module of the encoders and / or decoder, so as to provide the information needed by the intra prediction module used in encoders and / or decoder. The proposed aspects, methods, related embodiments, and combination thereof can be implemented individually or jointly in a video coding system.
[0055] With reference to Fig. 1A and Fig. 1B, any of the proposed methods can be implemented in an Intra / Inter coding module (e.g. Intra Pred. 150 / MC 152 in Fig. 1B) in a decoder or an Intra / Inter coding module in an encoder (e.g. Intra Pred. 110 / Inter Pred. 112 in Fig. 1A) . Any of the proposed methods can also be implemented as circuits coupled to the intra coding module at the decoder or the encoder. While the Intra / Inter Pred. units (e.g. units 110 / 112 in Fig. 1A and units 150 / 152 in Fig. 1B) are shown as individual processing units, they may correspond to executable software or firmware codes stored on a media, such as hard disk or flash memory, for a CPU (Central Processing Unit) or programmable devices (e.g. DSP (Digital Signal Processor) or FPGA (Field Programmable Gate Array) ) .
[0056] Fig. 5 illustrates a flowchart of an exemplary video coding system that derives refined prediction from the L-shape template area for chroma prediction according to a cross-component model. The steps shown in the flowchart may be implemented as program codes executable on one or more processors (e.g., one or more CPUs) at the encoder side. The steps shown in the flowchart may also be implemented based on hardware such as one or more electronic devices or processors arranged to perform the steps in the flowchart. According to the method, input data associated with a current block comprising a luma component and a chroma component is received in step 510, wherein the input data comprise pixel data to be encoded at an encoder side or data associated with the current block to be decoded at a decoder side. A first chroma prediction is derived for a target chroma position in the current block based on one or more chroma prediction samples in the current block in step 520, wherein each of said one or more chroma prediction samples is derived by using one or more collocated luma samples according to a cross-component model. A prediction offset is derived for the target chroma position based on template samples at one or more positions in a template area of the current block in step 530. A refined chroma prediction is generated for the target chroma position by using the first chroma prediction and the prediction offset in step 540. A target chroma sample at the target chroma position is encoded or decoded using the refined chroma prediction in step 550.
[0057] The flowchart shown is intended to illustrate an example of video coding according to the present invention. A person skilled in the art may modify each step, re-arranges the steps, split a step, or combine steps to practice the present invention without departing from the spirit of the present invention. In the disclosure, specific syntax and semantics have been used to illustrate examples to implement embodiments of the present invention. A skilled person may practice the present invention by substituting the syntax and semantics with equivalent syntax and semantics without departing from the spirit of the present invention.
[0058] The above description is presented to enable a person of ordinary skill in the art to practice the present invention as provided in the context of a particular application and its requirement. Various modifications to the described embodiments will be apparent to those with skill in the art, and the general principles defined herein may be applied to other embodiments. Therefore, the present invention is not intended to be limited to the particular embodiments shown and described, but is to be accorded the widest scope consistent with the principles and novel features herein disclosed. In the above detailed description, various specific details are illustrated in order to provide a thorough understanding of the present invention. Nevertheless, it will be understood by those skilled in the art that the present invention may be practiced.
[0059] Embodiment of the present invention as described above may be implemented in various hardware, software codes, or a combination of both. For example, an embodiment of the present invention can be one or more circuit circuits integrated into a video compression chip or program code integrated into video compression software to perform the processing described herein. An embodiment of the present invention may also be program code to be executed on a Digital Signal Processor (DSP) to perform the processing described herein. The invention may also involve a number of functions to be performed by a computer processor, a digital signal processor, a microprocessor, or field programmable gate array (FPGA) . These processors can be configured to perform particular tasks according to the invention, by executing machine-readable software code or firmware code that defines the particular methods embodied by the invention. The software code or firmware code may be developed in different programming languages and different formats or styles. The software code may also be compiled for different target platforms. However, different code formats, styles and languages of software codes and other means of configuring code to perform the tasks in accordance with the invention will not depart from the spirit and scope of the invention.
[0060] The invention may be embodied in other specific forms without departing from its spirit or essential characteristics. The described examples are to be considered in all respects only as illustrative and not restrictive. The scope of the invention is therefore, indicated by the appended claims rather than by the foregoing description. All changes which come within the meaning and range of equivalency of the claims are to be embraced within their scope.
Claims
1.A method of coding colour pictures, the method comprising:receiving input data associated with a current block comprising a luma component and a chroma component, wherein the input data comprise pixel data to be encoded at an encoder side or data associated with the current block to be decoded at a decoder side;deriving a first chroma prediction for a target chroma position in the current block based on one or more chroma prediction samples in the current block, wherein each of said one or more chroma prediction samples is derived by using one or more collocated luma samples according to a cross-component model;deriving a prediction offset for the target chroma position based on template samples at one or more positions in a template area of the current block;generating a refined chroma prediction for the target chroma position by using the first chroma prediction and the prediction offset; andencoding or decoding a target chroma sample at the target chroma position using the refined chroma prediction.2.The method of Claim 1, wherein the prediction offset for the target chroma position is derived based on differences between reconstructed samples and predicted samples at said one or more positions in the template area of the current block.3.The method of Claim 2, wherein the predicted samples at said one or more positions in the template area of the current block are derived using collocated luma samples in the template area of the current block according to the cross-component model.4.The method of Claim 2, wherein the first chroma prediction is derived as a first weighted sum of said one or more chroma prediction samples and the prediction offset is derived as a second weighted sum of the differences between the reconstructed samples and the predicted samples at said one or more positions in the template area of the current block.5.The method of Claim 4, wherein first coefficients for the first weighted sum and second coefficients for the second weighted sum are derived using a learning or training process.6.The method of Claim 1, wherein said one or more chroma prediction samples correspond to a single chroma prediction sample, 3x3 chroma prediction samples, or 5x5 chroma prediction samples.7.The method of Claim 1, wherein the prediction offset for the target chroma position is derived based on reconstructed samples at said one or more positions in the template area of the current block.8.The method of Claim 1, wherein the template area of the current block comprises an above template, a left template, an above-left template, or a combination therefore.9.The method of Claim 8, wherein three prediction offsets including above-only prediction offset, left-only prediction offset, and above and left prediction offset are derived using the above template only, the left template only, and both the above template and left template respectively, and a target prediction offset is selected from the three prediction offsets to generate the refined chroma prediction.10.The method of Claim 8, wherein an index or syntax element is signalled or parsed to indicate the target prediction offset selected.11.The method of Claim 8, wherein an above template cost is calculated from the above template and a left template cost is calculated from the left template, the above template cost and the left template cost are used to determine whether to enable the refined chroma prediction.12.The method of Claim 11, wherein if a sum of the above template cost and the left template cost is smaller than a first threshold, then the above and left prediction offset is used.13.The method of Claim 11, wherein if a sum of the above template cost and the left template cost is larger than a first threshold, then the above-only prediction offset or the left-only prediction offset is used depending on which of the above template cost and the left template cost is smaller.14.The method of Claim 1, wherein the the refined chroma prediction is enabled for the current block when the current block is coded in CCLM (Cross-Component Linear Model) , MMLM (Multi-Mode Linear Model) and other counterparts of CCCM.15.An apparatus for video coding, the apparatus comprising one or more electronics or processors arranged to:receive input data associated with a current block comprising a luma component and a chroma component, wherein the input data comprise pixel data to be encoded at an encoder side or data associated with the current block to be decoded at a decoder side;derive a first chroma prediction for a target chroma position in the current block based on one or more chroma prediction samples in the current block, wherein each of said one or more chroma prediction samples is derived by using one or more collocated luma samples according to a cross-component model;deriving a prediction offset for the target chroma position based on template samples at one or more positions in a template area of the current block;generate a refined chroma prediction for the target chroma position by using the first chroma prediction and the prediction offset; andencode or decode a target chroma sample at the target chroma position using the refined chroma prediction.