Inheriting cross-component model from rescaled reference picture
The method enhances video coding efficiency by inheriting and applying cross-component prediction models from collocated pictures, even when they are rescaled, addressing challenges in existing video coding standards.
Patent Information
- Application Number
- PCT/CN2024/116730
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-04
- Filing Date
- 2024-09-04
- Publication Date
- 2025-03-13
AI Technical Summary
Existing video coding standards face challenges in efficiently coding pixel blocks using cross-component prediction, particularly when dealing with rescaled reference pictures.
A method for performing cross-component prediction by selecting a collocated picture from multiple previous coded pictures, inheriting a model associated with a position in the selected picture, and applying this model to reconstruct a first component to predict a second component of the current block.
This approach improves coding efficiency by effectively utilizing inherited models from collocated pictures, even when those pictures are rescaled, thereby enhancing prediction accuracy and reducing computational complexity.
Smart Images

Figure CN2024116730_13032025_PF_FP_ABST
Abstract
Description
INHERITING CROSS-COMPONENT MODEL FROM RESCALED REFERENCE PICTURE
[0001] CROSS REFERENCE TO RELATED PATENT APPLICATION (S)
[0002] The present disclosure is part of a non-provisional application that claims the priority benefit of U.S. Provisional Patent Application No. 63 / 580,405 filed on 4 September 2023. Content of above-listed application is herein incorporated by reference.TECHNICAL FIELD
[0003] The present disclosure relates generally to video coding. In particular, the present disclosure relates to methods of coding pixel blocks by cross-component prediction.BACKGROUND
[0004] Unless otherwise indicated herein, approaches described in this section are not prior art to the claims listed below and are not admitted as prior art by inclusion in this section.
[0005] High-Efficiency Video Coding (HEVC) is an international video coding standard developed by the Joint Collaborative Team on Video Coding (JCT-VC) . HEVC is based on the hybrid block-based motion-compensated DCT-like transform coding architecture. The basic unit for compression, termed coding unit (CU) , is a 2Nx2N square block of pixels, and each CU can be recursively split into four smaller CUs until the predefined minimum size is reached. Each CU contains one or multiple prediction units (PUs) .
[0006] Versatile video coding (VVC) is the latest international video coding standard developed by the Joint Video Expert Team (JVET) of ITU-T SG16 WP3 and ISO / IEC JTC1 / SC29 / WG11. The input video signal is predicted from the reconstructed signal, which is derived from the coded picture regions. The prediction residual signal is processed by a block transform. The transform coefficients are quantized and entropy coded together with other side information in the bitstream. The reconstructed signal is generated from the prediction signal and the reconstructed residual signal after inverse transform on the de-quantized transform coefficients. The reconstructed signal is further processed by in-loop filtering for removing coding artifacts. The decoded pictures are stored in the frame buffer for predicting the future pictures in the input video signal.
[0007] In VVC, a coded picture is partitioned into non-overlapped square block regions represented by the associated coding tree units (CTUs) . The leaf nodes of a coding tree correspond to the coding units (CUs) . A coded picture can be represented by a collection of slices, each comprising an integer number of CTUs. The individual CTUs in a slice are processed in raster-scan order. A bi-predictive (B) slice may be decoded using intra prediction or inter prediction with at most two motion vectors (MVs) and reference indices to predict the sample values of each block. A predictive (P) slice is decoded using intra prediction or inter prediction with at most one motion vector and reference index to predict the sample values of each block. An intra (I) slice is decoded using intra prediction only.
[0008] A CTU can be partitioned into one or multiple non-overlapped coding units (CUs) using the quadtree (QT) with nested multi-type-tree (MTT) structure to adapt to various local motion and texture characteristics. A CU can be further split into smaller CUs using one of the five split types: quad-tree partitioning, vertical binary tree partitioning, horizontal binary tree partitioning, vertical center-side triple-tree partitioning, horizontal center-side triple-tree partitioning.
[0009] Each CU contains one or more prediction units (PUs) . The prediction unit, together with the associated CU syntax, works as a basic unit for signaling the predictor information. The specified prediction process is employed to predict the values of the associated pixel samples inside the PU.Each CU may contain one or more transform units (TUs) for representing the prediction residual blocks. A transform unit (TU) is comprised of a transform block (TB) of luma samples and two corresponding transform blocks of chroma samples and each TB correspond to one residual block of samples from one color component. An integer transform is applied to a transform block. The level values of quantized coefficients together with other side information are entropy coded in the bitstream. The terms coding tree block (CTB) , coding block (CB) , prediction block (PB) , and transform block (TB) are defined to specify the 2-D sample array of one-color component associated with CTU, CU, PU, and TU, respectively. Thus, a CTU consists of one luma CTB, two chroma CTBs, and associated syntax elements. A similar relationship is valid for CU, PU, and TU.
[0010] For each inter-predicted CU, motion parameters consisting of motion vectors, reference picture indices and reference picture list usage index, and additional information are used for inter-predicted sample generation. The motion parameter can be signalled in an explicit or implicit manner. When a CU is coded with skip mode, the CU is associated with one PU and has no significant residual coefficients, no coded motion vector delta or reference picture index. A merge mode is specified whereby the motion parameters for the current CU are obtained from neighbouring CUs, including spatial and temporal candidates, and additional schedules introduced in VVC. The merge mode can be applied to any inter-predicted CU. The alternative to merge mode is the explicit transmission of motion parameters, where motion vector, corresponding reference picture index for each reference picture list and reference picture list usage flag and other needed information are signalled explicitly per each CU. In order to improve the coding performance and / or to reduce complexity for a system using cross-component prediction, methods and apparatus for coding pixel blocks by cross-component prediction are disclosed.SUMMARY
[0011] The following summary is illustrative only and is not intended to be limiting in any way. That is, the following summary is provided to introduce concepts, highlights, benefits and advantages of the novel and non-obvious techniques described herein. Select and not all implementations are further described below in the detailed description. Thus, the following summary is not intended to identify essential features of the claimed subject matter, nor is it intended for use in determining the scope of the claimed subject matter.
[0012] Some embodiments of the disclosure provide a method for performing cross-component prediction with reference pictures that may be rescaled. A video coder selects a collocated picture from multiple previous coded pictures. The video coder inherits a model associated with a position in the selected collocated picture. The video coder applies the inherited model to a reconstruction of a first component of the current block to generate a prediction of a second component of the current block. The video coder encodes or decodes the current block based on the prediction of the second component.
[0013] In some embodiments, the video coder selects the collocated picture from multiple previous coded pictures based on a set of pre-defined rules. The previous coded pictures may include at least one rescaled picture. The rescaled picture differs with the current picture in picture size, scaling window offset, or a number of sub-pictures. The set of pre-defined rules may include selecting non-rescaled pictures. Otherwise, if the set of pre-defined rules do not include selecting non-rescaled pictures and the collocated picture selected is a rescaled picture, the model is not inherited or the position associated with the model is scaled based on a scaling ratio derived based on the scaling window of the current picture and the scaling window of the collocated picture.
[0014] In some embodiments, the collocated picture is selected out of un-rescaled pictures in the plurality of reference pictures based on picture order counts (POCs) , quantization parameter (QP) values, a particular reference index for a reference picture list, or a combination thereof. The term “un-rescaled” and “non-rescaled” are used interchangeably in this disclosure.
[0015] In some embodiments, the position of the model in the collocated picture is determined according to a motion vector of a neighboring block, and the neighboring block is selected from a list of pre-defined positions. The neighboring block is selected from the list of pre-defined positions according to a pre-defined checking order. The pre-defined checking order corresponds to L0 motion vectors or L1 motion vectors being checked first, and a target motion vector associated with a non-scaled reference picture first is selected.
[0016] In some embodiments, the model and the position in the selected collocated picture are associated with a reference block, the model is copied from a further position in a further reference picture located by a motion vector of the reference block, and the model is stored for the reference block. In some embodiments, if the further reference picture is rescaled, the model is not stored for the reference block. In some embodiments, if the further reference picture is rescaled, the further position located by the motion vector of the reference block is scaled according to a scaling ratio that is derived based on a scaling window of the selected collocated picture and a corresponding scaling window of the further reference picture. In some embodiments, a further position in the further reference picture located by the motion vector of the reference block is constrained to be in a collocated CTU row of a CTU row in which the reference block is located.
[0017] In some embodiments, when the selected collocated picture is rescaled, the position of the inherited model in the collocated picture is scaled according to a scaling ratio that is derived based on a scaling window of the current picture and a corresponding scaling window of the selected collocated picture.BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings are included to provide a further understanding of the present disclosure, and are incorporated in and constitute a part of the present disclosure. The drawings illustrate implementations of the present disclosure and, together with the description, serve to explain the principles of the present disclosure. It is appreciable that the drawings are not necessarily in scale as some components may be shown to be out of proportion than the size in actual implementation in order to clearly illustrate the concept of the present disclosure.
[0019] FIG. 1 conceptually illustrates chroma and luma samples that are used for derivation of linear model parameters.
[0020] FIG. 2 shows an example of classifying the neighbouring samples into two groups.
[0021] FIG. 3 conceptually illustrates the spatial components of a convolutional filter.
[0022] FIG. 4 illustrates gradient filters enabled for Gradient Linear Model (GLM) .
[0023] FIG. 5 illustrates reconstruction of component samples using cross-component residual model (CCRM) .
[0024] FIG. 6 illustrates the positions of luma samples relative to the chroma sample being predicted by the CCRM filter.
[0025] FIG. 7 illustrates predefined search area for intra template matching.
[0026] FIG. 8 shows luma blocks used to derive direct block vector for corresponding chroma blocks.
[0027] FIG. 9 shows pre-defined positions of spatial neighboring blocks.
[0028] FIG. 10 shows an example of inheriting of temporal neighboring model parameters.
[0029] FIG. 11 illustrates example predefined temporal candidate positions.
[0030] FIG. 12 conceptually illustrates a shifted or scaled position in a rescaled collocated picture from which a model is to be inherited.
[0031] FIGS. 13A-B illustrate a current block and its non-adjacent spatial neighboring blocks, from which model parameters may be inherited.
[0032] FIG. 14 illustrates propagation of cross-component model (CCM) based on block vectors.
[0033] FIG. 15 illustrates a current block having two block vectors identifying two reference blocks and that both have CCM information.
[0034] FIG. 16 illustrates examples of CCM information propagation based on motion vectors.
[0035] FIG. 17 illustrates a current block having two motion vectors identifying two reference blocks and that both have CCM information.
[0036] FIG. 18 illustrates a position located by the motion vector in a reference picture of the current CTU row.
[0037] FIG. 19 illustrates propagating CCM information of a further reference block located by the motion vector or the block vector of the reference block.
[0038] FIG. 20 conceptually illustrates a picture level index buffer for storing indices of a CCM information storage table.
[0039] FIG. 21 illustrates copying CCM information from the indexed table of a collocated picture to the indexed table of the current picture.
[0040] FIG. 22 conceptually illustrates deriving and storing CCM information by copying entries of an index buffer based on block vectors.
[0041] FIG. 23 illustrates deriving and storing CCM information by copying and storing entries of indexed tables based on motion vectors.
[0042] FIG. 24 illustrates an example video encoder that may implement cross-component prediction.
[0043] FIG. 25 illustrates portions of the video encoder that implement cross-component prediction using temporal candidates with rescaled reference pictures.
[0044] FIG. 26 conceptually illustrates a process for performing cross-component prediction using temporal candidates with rescaled reference pictures when encoding a block.
[0045] FIG. 27 illustrates an example video decoder that may implement cross-component prediction.
[0046] FIG. 28 illustrates portions of the video decoder that implement cross-component prediction with rescaled reference pictures.
[0047] FIG. 29 conceptually illustrates a process for performing cross-component prediction using temporal candidates with rescaled reference pictures when decoding a block.
[0048] FIG. 30 conceptually illustrates an electronic system with which some embodiments of the present disclosure are implemented.DETAILED DESCRIPTION
[0049] In the following detailed description, numerous specific details are set forth by way of examples in order to provide a thorough understanding of the relevant teachings. Any variations, derivatives and / or extensions based on teachings described herein are within the protective scope of the present disclosure. In some instances, well-known methods, procedures, components, and / or circuitry pertaining to one or more example implementations disclosed herein may be described at a relatively high level without detail, in order to avoid unnecessarily obscuring aspects of teachings of the present disclosure.
[0050] I. Cross Component Prediction
[0051] a. Cross Component Linear Model (CCLM)
[0052] Cross Component Linear Model (CCLM) or Linear Model (LM) mode is a cross component prediction mode in which chroma components of a block is predicted from the collocated reconstructed luma samples by linear models. The parameters (e.g., scale and offset) of the linear model are derived from already reconstructed luma and chroma samples that are adjacent to the block. For example, in VVC, the CCLM mode makes use of inter-channel dependencies to predict the chroma samples from reconstructed luma samples. This prediction is carried out using a linear model in the form of: P (i, j) =α·rec′L (i, j) +β (1)
[0053] P (i, j) in eq. (1) represents the predicted chroma samples in a CU (or the predicted chroma samples of the current CU) and rec′L (i, j) represents the down-sampled reconstructed luma samples of the same CU (or the corresponding reconstructed luma samples of the current CU) .
[0054] The CCLM model parameters α (scaling parameter) and β (offset parameter) are derived based on at most four neighboring chroma samples and their corresponding down-sampled luma samples. In LM_A mode (also denoted as LM-T mode) , only the above or top-neighboring template is used to calculate the linear model coefficients. In LM_L mode (also denoted as LM-L mode) , only left template is used to calculate the linear model coefficients. In LM-LA mode (also denoted as LM-LT mode) , both left and above templates are used to calculate the linear model coefficients. In this disclosure, the term {LM_LA, LM_A, LM_L} and {CCLM_LT, CCLM_T, CCLM_L} are used interchangeably. The term CCLM_LT, LM_LA and CCLM_LA are also used interchangeably.
[0055] FIG. 1 conceptually illustrates chroma and luma samples that are used for derivation of linear model parameters. The figure illustrates a current block 100 having luma component samples and chroma component samples in 4: 2: 0 format. The luma and chroma samples neighboring the current block are reconstructed samples. These reconstructed samples are used to derive the cross-component linear model (parameters α and β) . Since the current block in in 4: 2: 0 format, the luma samples are down-sampled first before being used for linear model derivation. In the example, there are 16 pairs of reconstructed luma (down-sampled) and chroma samples neighboring the current block. These 16 pairs of luma versus chroma values are used to derive the linear model parameters.
[0056] Suppose the current chroma block dimensions are W×H, then W' and H' are set as
[0057] – W’ = W, H’ = H when LM-LT mode is applied;
[0058] – W’ = W + H when LM-T mode is applied;
[0059] – H’ = H+W when LM-L mode is applied
[0060] The above neighboring positions are denoted as S [0, -1] . . . S [W’ -1, -1] and the left neighboring positions are denoted as S [-1, 0] . . . S [-1, H’ -1] . Then the four samples are selected as
[0061] – S[W’ / 4, -1] , S [3 *W’ / 4, -1] , S [-1, H’ / 4] , S [-1, 3 *H’ / 4] when LM-LT mode is applied (both above and left neighboring samples are available) ;
[0062] – S [W’ / 8, -1] , S [3 *W’ / 8, -1] , S [5 *W’ / 8, -1] , S [7 *W’ / 8, -1] when LM-T mode is applied (only the above neighboring samples are available) ;
[0063] – S [-1, H’ / 8] , S [-1, 3 *H’ / 8] , S [-1, 5 *H’ / 8] , S [-1, 7 *H’ / 8] when LM-L mode is applied (only the left neighboring samples are available) ;
[0064] The four neighboring luma samples at the selected positions are down-sampled and compared four times to find two larger values: x0A and x1A, and two smaller values: x0B and x1B. Their corresponding chroma sample values are denoted as y0A, y1A, y0B and y1B. Then XA, XB, YA and YB are derived as: Xa = (x0A + x1A +1) >>1; Xb = (x0B + x1B +1) >>1; (2) Ya = (y0A + y1A +1) >>1; Yb = (y0B + y1B +1) >>1 (3)
[0065] The linear model parameters α and β are obtained according to the following equations: β=Yb-α·Xb (5)
[0066] In some embodiments, to get more samples for calculating the CCLM model parameters α and β, the above template is extended to contain (W+H) samples for LM-T mode, the left template is extended to contain (H+W) samples for LM-L mode. For LM-LT mode, both the left template and the above templates are used to calculate the linear model coefficients.
[0067] To match the chroma sample locations for 4: 2: 0 video sequences, two types of down-sampling filters are applied to luma samples to achieve 2 to 1 down-sampling ratio in both horizontal and vertical directions. The selection of down-sampling filter is specified by a sequence parameter set (SPS) level flag. The two down-sampling filters are as follows, which correspond to “type-0” and “type-2” content, respectively. rec′L (i, j) = [recL (2i-1, 2j-1) +2*recL (2i, 2j-1) +recL (2i+1, 2j-1) +recL (2i- 1, 2j) +2*recL (2i, 2j) +recL (2i+1, 2j) +4] >>3 (6) rec′L (i, j) = [recL (2i, 2j-1) +recL (2i-1, 2j) +4*recL (2i, 2j) +recL (2i+1, 2j) + recL (2i, 2j+1) +4] >>3 (7)
[0068] b. Multi-Model CCLM (MMLM)
[0069] Multiple model CCLM mode (MMLM) uses two models for predicting the chroma samples from the luma samples for the whole CU. Similar to CCLM, three multiple model CCLM modes (MMLM_LA, MMLM_A, and MMLM_L) are used to indicate if both above and left neighboring samples, only above neighboring samples, or only left neighboring samples are used in model parameters derivation.
[0070] In MMLM, neighbouring luma samples and neighbouring chroma samples of the current block are classified into two groups, each group is used as a training set to derive a linear model (i.e., a particular α and β are derived for a particular group) . Furthermore, the samples of the current luma block are also classified based on the same rule for the classification of neighbouring luma samples.
[0071] FIG. 2 shows an example of classifying the neighbouring samples into two groups. Threshold is calculated as the average value of the neighbouring reconstructed luma samples. A neighbouring sample at [x, y] with Rec′L [x, y] <= Threshold is classified into group 1; while a neighbouring sample at [x, y] with Rec′L [x, y] > Threshold is classified into group 2. Thus, the multi-model CCLM prediction for the chroma samples is:
[0072] Predc [x, y] = α1×RecˊL [x, y] + β1 if Rec′L [x, y] ≤ Threshold
[0073] Predc [x, y] = α2×RecˊL [x, y] + β2 if Rec′L [x, y] > Threshold
[0074] c. Convolutional Cross-Component Model (CCCM)
[0075] In some embodiments, a convolutional cross-component model (CCCM) is applied to improve the cross-component prediction performance. For some embodiment, the convolutional model has 7-tap filter having a 5-tap plus sign shape spatial component, a non-linear term and a bias term. The input to the spatial 5-tap component of the filter includes a center (C) luma sample (which is collocated with the chroma sample to be predicted) and the center luma sample’s above / north (N) , below / south (S) , left / west (W) and right / east (E) neighbors. FIG. 3 conceptually illustrates the spatial components of a convolutional filter. The nonlinear term (denoted as P) is represented as power of two of the center luma sample C and scaled to the sample value range of the content: P = (C*C + midVal) >> bitDepth (8)
[0076] Thus, for 10-bit content the non-linear term P is calculated as: P = (C*C + 512) >> 10
[0077] The bias term (denoted as B) represents a scalar offset between the input and output (similarly to the offset term in CCLM) and is set to middle chroma value (512 for 10-bit content) . Output of the filter is calculated as a convolution between the filter coefficients ci and the input values and clipped to the range of valid chroma samples: predChromaVal = c0C + c1N + c2S + c3E + c4W + c5P + c6B (9)
[0078] d. Gradient Linear Model (GLM)
[0079] For YUV 4: 2: 0 color format, a gradient linear model (GLM) method can be used to predict the chroma samples from luma sample gradients. Two modes are supported: a two-parameter GLM mode and a three-parameter GLM mode.
[0080] Compared with the CCLM, instead of down-sampled luma values, the two-parameter GLM utilizes luma sample gradients to derive the linear model. Specifically, when the two-parameter GLM is applied, the input to the CCLM process, i.e., the down-sampled luma samples L, are replaced by luma sample gradients G. C = αG + β
[0081] The other parts of the CCLM (e.g., parameter derivation, prediction sample linear transform) are kept unchanged. In the three-parameter GLM, a chroma sample can be predicted based on both the luma sample gradients and down-sampled luma values with different parameters: C = α0·G + α1·L + α2·β
[0082] The model parameters of the three-parameter GLM are derived from 6 rows and columns adjacent samples by the LDL decomposition based MSE minimization method as used in the CCCM.
[0083] For signaling, when the CCLM mode is enabled to the current CU, one flag is signaled to indicate whether GLM is enabled for both Cb and Cr components; if the GLM is enabled, another flag is signaled to indicate which of the two GLM modes is selected and one syntax element is further signaled to select one of four gradient filters for the gradient calculation. FIG. 4 illustrates gradient filters enabled for Gradient Linear Model (GLM) , specifically, the figure illustrates four Sobel based gradient patterns 401-404 for GLM. The gray dot in the middle of each gradient pattern represents the chroma position (C) .
[0084] e. Cross-Component Residual Model (CCRM)
[0085] Cross-component residual model (CCRM) may be applied to predict chroma samples from reconstructed luma samples when the block uses inter prediction or intra block copy (IBC, which refers to coding pixel blocks by referencing pixel positions within same current picture as the current block by using block vectors. )
[0086] FIG. 5 illustrates reconstruction of component samples using cross-component residual model (CCRM) . The figure illustrates the decoder side of the method. The cross-component filters are derived using the prediction signals of luma and chroma. The derived filters are applied to the reconstructed luma signal producing the final chroma predictions.
[0087] The derived filter may be an 8-tap filter consist of 6 spatial luma samples, a nonlinear term, and a bias term. FIG. 6 illustrates the positions of luma samples relative to the chroma sample being predicted by the CCRM filter. As illustrated, the spatial luma samples (L0, L1, L2, L3, L4, L5) are obtained from the luma grid by selecting the 6 luma samples closest to the chroma position C without down sampling. The filter predicted chroma value may be obtained as, predChromaVal = c0L0 +c1L1 +c2L2 +c3L3 +c4L4 +c5L5 +c6 nonlinear ( (L0+L3+1) >> 1) + c7 B,
[0088] where “nonlinear” is CCCM’s nonlinear operator and B is bias.
[0089] II. Current Picture Referencing
[0090] a. Intra Block Copy (IBC)
[0091] Intra block copy (IBC) or current picture referencing (CPR) refer to coding pixel blocks by referencing pixel positions within same current picture as the current block by using block vectors.
[0092] b. Intra Template Matching
[0093] Intra template matching prediction (IntraTMP) is a special intra prediction mode that copies the best prediction block from the reconstructed part of the current frame, whose L-shaped template matches the current template. For a predefined search range, the encoder searches for the most similar template to the current template in a reconstructed part of the current frame and uses the corresponding block as a prediction block. The encoder then signals the usage of this mode, and the same prediction operation is performed at the decoder side. The prediction signal is generated by matching the L-shaped, Top-only or Left-Only causal neighbor of the current block with another block in a predefined search area.
[0094] FIG. 7 illustrates predefined search area for intra template matching. As illustrated, for current block 710 having a current template area 520 in a current CTU 705, search is performed in several predefined search areas to search for a matching reference template area 730 (thereby finding the corresponding reference block 735. ) The predefined search areas include R1 (in the current CTU) , R2 (top-left of the current CTU) , R3 (above the current CTU) , and R4 (left of current CTU) . The template matching is based on sum of absolute differences (SAD) as a cost function.
[0095] c. Direct Block Vector for Chroma Block
[0096] A direct block vector may be used for chroma blocks in dual tree slices. When a chroma dual tree is activated, a flag is signaled to indicate whether a chroma block is coded using IBC mode. Specifically, if one of the luma blocks in five predefined locations is coded with IBC or intraTMP mode, its block vector (BV) is scaled and is used as a block vector for the chroma block. Template matching is used to perform block vector scaling (from luma domain to chroma domain. ) FIG. 8 shows luma blocks used to derive direct block vector for corresponding chroma blocks. The figure shows the five predefined locations that are used to determine whether a BV for a luma block is to be scaled and used as a BV for a chroma block.
[0097] III. Reference Picture Resampling (RPR)
[0098] In HEVC, the spatial resolution of pictures cannot change unless a new sequence using a new SPS starts, with an IRAP picture. VVC allows picture resolution change within a sequence at a position without encoding an IRAP picture, which is always intra-coded. This feature is sometimes referred to as reference picture resampling (RPR) , as the feature needs resampling of a reference picture used for inter prediction when that reference picture has a different resolution than the current picture being decoded.
[0099] In order to avoid additional processing steps, the RPR process in VVC is designed to be embedded in the motion compensation process and performed at the block level. In the motion compensation stage, the scaling ratio is used together with motion information to locate the reference samples in the reference picture to be used in the interpolation process.
[0100] In VVC, the scaling ratio is restricted to be larger than or equal to 1 / 2 (2 times downsampling from the reference picture to the current picture) , and less than or equal to 8 (8 times upsampling) . Three sets of resampling filters with different frequency cutoffs are specified to handle various scaling ratios between a reference picture and the current picture. The three sets of resampling filters are applied respectively for the scaling ratio ranging from 1 / 2 to 1 / 1.75, from 1 / 1.75 to 1 / 1.25, and from 1 / 1.25 to 8. Each set of resampling filters has 16 phases for luma and 32 phases for chroma which is same to the case of motion compensation interpolation filters. The filter set of normal MC interpolation is used in the case of scaling ratio ranging from 1 / 1.25 to 8. The normal MC interpolation process is a special case of the resampling process with scaling ratio ranging from 1 / 1.25 to 8. In addition to conventional translational block motion, the affine mode has three sets of 6-tap interpolation filters that are used for the luma component to cover the different scaling ratios in RPR. The horizontal and vertical scaling ratios are derived based on picture width and height, and the left, right, top and bottom scaling offsets specified for the reference picture and the current picture.
[0101] In VVC, the maximum picture resolution and the corresponding conformance cropping window are signaled in the SPS, while in the PPS the picture resolution of each current picture is signaled. Such signaling arrangement can be used to support RPR. When the picture resolution of the current picture (from PPS) is smaller than the maximum picture resolution (from SPS) , it is possible to signal conformance cropping offsets in the PPS that are different from the conformance cropping offsets signaled in the SPS.
[0102] To reduce memory bandwidth, the inter-coded 4x4 size CU is not allowed in VVC. For inter-coded 4x8 / 8x4 CU, only uni-directional mode is allowed. When the motion information from merge mode is bi-directional, it is converted to uni-directional by keeping only the list 0 motion information.
[0103] IV. Inheriting Cross-Component Model Information
[0104] a. Inherit Neighboring Model Parameters for Refining CCM Parameters
[0105] When applying cross-component prediction coding tool on the current block to generate prediction signals, the cross-component model (CCM) information (including model parameters) can be inherited from neighboring blocks.
[0106] In some embodiments, if the inherited neighbor block is coded in CCLM mode, the final scaling parameter of the current block is inherited from the neighboring blocks. Once the final scaling parameter is determined, the offset parameter (e.g., β in CCLM) is derived based on the inherited scaling parameter and the average value of neighboring luma and chroma samples of the current block. In some embodiments, if the inherited neighbor block is coded in CCLM mode, after inheriting model parameters, the offset parameter can be inherited or can be further refined by dB. For example, if the final offset parameter is inherited from a selected neighboring block, and the inherited offset parameter is β′nei, then the final offset parameter is (β′nei + dB) . For example, dB can be signaled or derived based on the neighboring reconstructed samples. For example, dB can be zero.
[0107] In some embodiments, if the inherited neighbor block is coded with CCCM, the filter coefficients ci are inherited. The offset parameter (e.g., c6 × B or c6 in CCCM) can be re-derived based on the inherited parameter and the average value of neighboring corresponding position luma and chroma samples of the current block.
[0108] In some embodiments, if the inherited neighbor block is coded with CCCM, the filter coefficients (ci) are inherited. The offset parameter (e.g., c6 × B or c6 in CCCM) is also inherited and is not re-derived. In some embodiments, if the inherited candidate applies GLM gradient pattern to its luma reconstruction samples, the current block shall also inherit the GLM gradient pattern of the candidate and apply to the current luma reconstruction samples.
[0109] In some embodiments, if the inherited neighbor block is coded with multiple cross-component models (e.g., MMLM, or CCCM with multi-model) , the classification threshold is also inherited to classify the neighboring samples of the current block into multiple groups, and the inherited multiple cross-component model parameters are further assigned to each group.
[0110] b. Inherit CCM information
[0111] In some embodiments, the cross-component model (CCM) information of inherited cross-component model can be stored together with the inherited model parameters. The CCM information can be inherited together with the inherited model parameters. The prediction of the current block can be generated based on the inherited CCM information and / or the inherited model parameters. The CCM information can include but not limited to: prediction mode (e.g., CCLM, MMLM, CCCM, CCCM with multi-models, 2-parameter GLM, 3-parameter GLM (GLM with luma terms) , CCRM) , information indicating whether non-linear terms are used in the model, model index for indicating which model shape is used in convolutional model, classification threshold for multi-model, information indicating whether non-downsampled samples are used in convolutional model, down-sampling filter flag, down-sampling filtering index when multiple down-sampling filters are used, information indicating whether multiple down-sampling filters are used, number of neighboring lines used to derive model, types of templates used to derive model (e.g., top-left, top, left) , multi-model flag, post-filtering flag or model parameters.
[0112] In some embodiments, a mixed CCCM model consisting of various terms (e.g., spatial term, gradient term, location term, non-linear term and bias term) can be inherited. In addition to storing model parameters, a prediction mode can be stored in the CCM information to indicate that the inherited model is a mixed CCCM model consist of various terms. If there are multiple types of mixed CCCM models, a model index can also be stored in the CCM information to indicate which type of mixed CCCM model is inherited. For example, gradient and location based CCCM (GL-CCCM) is a mixed CCCM model which has one spatial term in center position, two gradient terms for horizontal direction and vertical direction, two location terms X and Y for the relative horizontal location and relative vertical location, one non-linear term and one bias term. A prediction mode can be stored in the CCM information to indicate that the inherited model is a GL-CCCM model.
[0113] c. Inherit Spatial Neighboring Model Parameters
[0114] In some embodiments, the inherited model parameters can be from a block that is an immediate neighboring block. The models from blocks at pre-defined positions are added into the candidate list in a pre-defined order. In some embodiments, the pre-defined positions and the pre-defined order can be the same as those of spatial candidates for inter merge mode. In some embodiments, the pre-defined positions can be the positions depicted in FIG. 9, which shows pre-defined positions of spatial neighboring blocks. The pre-defined order may be B0→A0→ B1→ A1→ B2.
[0115] In some embodiments, assuming the position, width, and height of the current block are (x, y) , W, and H respectively, the pre-defined positions may include positions immediate above the current block, such as (x + W >> 1, y–1) or (x + (W+1) >> 1, y–1) , if W is greater than or equal to a threshold TH. The pre-defined positions can also include positions immediate left to the current blocks, such as (x–1, y+H>>1) or (x–1, y+ (H+1) >>1) , if H is greater than or equal to a threshold TH. TH can be 2, 4, 8, 16, 32, or 64. The pre-defined positions include the positions at the immediate above (W >>1) or ( (W >> 1) –1) position if W is greater than or equal to TH, and the positions at the immediate left (H >> 1) or ( (H >> 1) –1) position if H is greater than or equal to TH.
[0116] In some embodiments, a maximum number of inherited models from spatial neighbors are allowed to be added into the candidate list, and the maximum number is smaller than the number of pre-defined positions.
[0117] d. Inherit Temporal Neighboring Model Parameters
[0118] In some embodiments, if the current slice / picture is a non-intra slice / picture, the inherited model parameters can be from a block in a previously coded slice / picture. FIG. 10 shows an example of inheriting temporal neighboring model parameters. As illustrated, the current block position is at (x, y) and the block size is w×h. The inherited model parameters can be from the block at position (x′, y′) , (x′, y′+ h / 2) , (x′+ w / 2, y′) , (x′+ w / 2, y′+ h / 2) , (x′+ w, y′) , (x′, y′+ h) , or (x′+ w, y′+ h) of the previous coded slices / picture, where x′= x + Δx and y′= y + Δy. In some embodiments, if the prediction mode of the current block is intra, Δx and Δy are set to 0. If the prediction mode of the current block is inter, Δx and Δy are set to the horizontal and vertical motion vector of the current block. In some embodiments, if the current block is inter bi-prediction, Δx and Δy are set to the horizontal and vertical motion vector in reference picture list 0. In some embodiments, if the current block is inter bi-prediction, Δx and Δy are set to the horizontal and vertical motion vector in reference picture list 1.
[0119] In some embodiments, if the current slice / picture is a non-intra slice / picture, the inherited model parameters can be from the block in the previous coded slices / pictures. In one embodiment, the current block position is at (x, y) and the block size is w×h. The two value sets αx and αy are defined as: αx = {αx1, αx2, αx3, …αxn} , αxi < αxj if i < j αy = {αy1, αy2, αy3, …αyn} , αyi < αyj if i < j
[0120] All values in αx and αy are positive numbers. Let (xmid, ymid) = (x+w / 2, y+h / 2) . The inherited model parameters can be from the block at predefined positions (xmid ± αxi ×w, ymid ± αyi ×h) , (xmid ± αxi ×w, ymid) , (xmid, ymid ± αyi ×h) of the previous coded slices / picture.
[0121] In some embodiments, αx = αy, e.g., αx = αy = {1, 2, 3, 4, 5} . The inherited model parameters can be from blocks at predefined positions of the previous coded slices and / or pictures. These positions are referred to as temporal candidate positions. FIG. 11 illustrates example predefined temporal candidate positions. In some embodiments, αx ≠ αy, e.g., αx = {0.5, 1, 1.5, 2, 2.5} and αy = {1, 2, 3, 4, 5} .
[0122] In some embodiments, the current block position is at (x, y) and the block size is w×h. The inherited model parameters can be from the block at predefined positions (x + αxi × w, y + αyi × h) , (x + αxi × w, y –αyi × h) , (x –αxi × w, y + αyi × h) , (x –αxi × w, y –αyi × h) , (x + αxi × w, y) , (x –αxi ×w, y) , (x, y + αyi × h) , (x, y –αyi × h) of the previous coded slice or picture.
[0123] In some embodiments, the models from the positions closer to (xmid, ymid) are added into the final merge candidate list first. In some embodiments, the models from the positions closer to (x, y) are added into the final merge candidate list first.
[0124] In some embodiments, let δx and δy be two fixed positive numbers. The inherited model parameters can be from the block at predefined positions (xmid + axi × δx, ymid + αyi × δy) , (xmid +αxi × δx, ymid –αyi × δy) , (xmid –αxi × δx, ymid + αyi × δy) , (xmid –αxi × δx, ymid –αyi × δy) , (xmid + αxi ×δx, ymid) , (xmid –αxi × δx, ymid) , (xmid, ymid + αyi × δy) , (xmid, ymid –αyi × δy) of the previous coded slices or pictures.
[0125] In some embodiments, the current block position is at (x, y) and the block size is w×h. Let δx and δy be two fixed positive numbers The inherited model parameters can be from the block at positions (x + αxi × δx, y + αyi × δy) , (x + αxi × δx, y –αyi × δy) , (x –αxi × δx, y + αyi × δy) , (x –αxi × δx, y –αyi × δy) , (x + αxi × δx, y) , (x –αxi × δx, y) , (x, y + αyi × δy) , (x, y –αyi × δy) of the previous slices / pictures of the previous coded slices / picture.
[0126] In some embodiments, the current block position is at (x, y) and the block size is w×h. The inherited model parameters can be from the block at some pre-defined positions (X, Y) of the previous coded slices / picture. For one example, the positions are inside the corresponding area of the current encoding block, i.e., x ≤ X< x+w and y ≤ Y< y+h. The inherited model parameters can be from the block at predefined positions (x, y) , (x + w –1, y) , (x, y + h –1) , (x + w –1, y + h –1) , (x + w / 2, y+ h / 2) .
[0127] For another example, the positions are outside of the corresponding area of the current encoding block, i.e., X < x or X ≥ x + w, and Y < y or Y ≥ y + h. The inherited model parameters can be from the block at predefined positions (x–1, y) , (x, y–1) , (x–1, y–1) , (x+w, y) , (x+w-1, y–1) , (x+w, y–1) , (x, y+h) , (x–1, y+h–1) , (x–1, y+h) , (x+w, y+h–1) , (x+w–1, y+h) , (x+w, y+h) .
[0128] In some embodiments, the inherited model parameters can be from the block at some pre-defined positions. The pre-defined positions and the inclusion order can be the same as those of inter merge mode. The previous coded picture which the inherited parameter model is from is referred as the collocated picture hereafter.
[0129] In some embodiments, the previous coded picture that the inherited parameter model is from, i.e., the collocated picture, is one of the pictures in the reference lists. In some embodiments, the collocated picture can be the same as the collocated picture of inter merge mode. In some embodiments, the collocated picture is signaled in the picture / slice header. The reference list and the reference index are signaled in the picture / slice header. For example, the video coder may select L0 [0] (first reference picture in reference list L0) as the collocated picture, or select L1 [0] (first reference picture in reference list L1) as the collocated picture.
[0130] In some embodiments, the collocated picture is selected as the picture in the reference lists whose picture order count (POC) difference between it and the current picture is the smallest. For example, if the POC of current picture is 8, the POCs of pictures in reference list 0 are {7, 6, 5, 0} and POCs of pictures in reference list 1 are {7, 6, 5, 4} , then L0 [0] (equivalent to L1 [0] ) is selected since its POC difference is the smallest.
[0131] In some embodiments, if there are two pictures whose POC difference between the respective picture and the current picture are both the smallest, the picture with the smaller POC is selected. In some embodiments, if there are two pictures whose POC difference between the respective picture and the current picture are both the smallest, the picture with the larger POC is selected.
[0132] In some embodiments, if there are two pictures whose POC difference between the respective picture and the current pictures are both the smallest, the picture with smaller QP difference between it and the current picture is selected. In some embodiments, if there are two pictures whose POC difference between the respective picture and the current picture are both the smallest, the picture with the smaller QP is selected.
[0133] In some embodiments, if there are two pictures whose POC difference between the respective picture and the current picture are both the smallest, the picture with the larger QP is selected. In some embodiments, the collocated picture is selected as the picture in the reference lists whose QP difference between the respective picture and the current picture is the smallest. For example, if the QP of current picture is 28, and the QPs of the pictures in reference list 0 are {19, 26, 23} and the QPs of the pictures in reference list 1 are {23, 22, 21} . Then L0 [1] is selected.
[0134] In some embodiments, if there are more than one picture in the reference lists whose QP difference between the respective picture and the current picture are the smallest, the picture with the smaller QP is selected. In some embodiments, if there are more than one picture in the reference lists whose QP difference between the respective picture and the current picture are the smallest, the picture with the smaller QP is selected. In some embodiments, if there are more than one picture whose QP difference between the respective picture and the current picture are the smallest, the picture with the larger QP is selected. In some embodiments, if there are more than one picture whose QP difference between it and the current picture are the smallest, the picture with the smaller POC distance is selected.
[0135] In some embodiments, the collocated picture is selected as the picture in the reference lists whose QP is the smallest. In some embodiments, the collocated picture is selected as the picture in the reference lists whose QP is the largest.
[0136] For some embodiments, the RprConstraintsActiveFlag is used to indicate that a picture is subject to constraints on reference picture resampling. In some embodiments, RprConstraintsActiveFlag = true for a picture is used to indicate the picture as being rescaled. A rescaled picture has one or more of the following seven parameters different than that of the current picture: 1) the picture width in luma samples (pps_pic_width_in_luma_samples) , 2) the picture height in luma samples (pps_pic_height_in_luma_samples) , 3) the scaling window left offset (pps_scaling_win_left_offset) , 4) the scaling window right offset (pps_scaling_win_right_offset) , 5) the scaling window top offset (pps_scaling_win_top_offset) , 6) the scaling window bottom offset (pps_scaling_win_bottom_offset) , and 7) the number of sub pictures -1 (sps_num_subpics_minus1) . In other words, the rescaled picture has at least one geometric property (e.g., picture size, scaling window offset, number of sub pictures) that is different than the current picture due to resampling.
[0137] In some embodiments, when accessing a previous coded picture with RprConstraintsActiveFlag = true, the video coder takes measures to avoid accessing inefficient reference data. For example, the video coder may avoid accessing rescaled pictures, or may perform corresponding scaling to avoid discarding useful information. In some embodiments, if a picture in a reference list is rescaled (RprConstraintsActiveFlag = true) , the picture is not selected as the collocated picture (for purpose of serving as a temporal candidate for providing the inherited model) . In some embodiments, if one picture in the reference list is rescaled, i.e, the RprConstraintsActiveFlag is true, the picture is not selected as the collocated picture.
[0138] In some embodiments, the previous coded picture that the inherited parameter model is from, i.e., the collocated picture, is the most recently coded I-picture. The cross-component model information of the most recently coded I-slice / picture is stored in a long-term reference buffer.
[0139] In some embodiments, the rules to select / not select the collocated pictures described in the paragraphs above can be combined. For example, the collocated picture is selected out of the un-rescaled pictures in the reference lists. The collocated picture is selected as the picture whose POC difference between the respective picture and the current picture is the smallest. In some embodiments, when the collocated picture is rescaled, inheriting CCM information from the collocated picture is disabled.
[0140] In some embodiments, when the collocated picture is rescaled, the positions where the inherited model or CCM information are from can be scaled or shifted according to the scaling ratio. The scaling ratio is derived based on the corresponding scaling windows of the current picture and the collocated picture. Let the position be (x, y) , the scaled position be (x′, y′) and the scaling ratio be R. The scaled position can be (x / R, y / R) or (x / R, y / R) after rounding. The rounding method used can be but not limited to the following methods: rounding toward negative infinity, rounding toward positive infinity, rounding toward zero, or rounding to the nearest integer (e.g., rounding away from zero, rounding half up, rounding half down, …) .
[0141] FIG. 12 conceptually illustrates a shifted or scaled position in a rescaled collocated picture from which a model is to be inherited. The figure illustrates a collocated picture 1201 that is rescaled. To inherit a model, a position (x, y) is located in the collocated picture 1201. Since the collocated picture 1201 is rescaled, a CCM 1220 associated at position (x, y) is not inherited. Instead, a CCM 1221 associated with a shifted or scaled position (x′, y′) is inherited by the current block for cross-component prediction. The scaled position may be (x / R, y / R) , with R being the scaling ratio.
[0142] In some embodiments, the collocated picture and the pre-defined positions where the inherited parameter model is from is determined by the motion vector of a neighboring block. For example, if the current block position is at (x, y) and the block size is w×h. The inherited model parameters can be from the block at position (x′, y′) , (x′, y′+ h / 2) , (x′+ w / 2, y′) , (x′+ w / 2, y′+ h / 2) , (x′+ w, y′) , (x′, y′+ h) , or (x′+ w, y′+ h) of the collocated picture, where x′= x + Δx and y′= y + Δy.
[0143] In some embodiments, Δx and Δy are set to the L0 horizontal and vertical motion vector of the neighboring block, and the collocated picture is the L0 reference picture indicated by the L0 motion vector of the neighboring block.
[0144] In some embodiments, if the neighboring block is inter bi-prediction, Δx and Δy are set to the L1 horizontal and vertical motion vector of the neighboring block, and the collocated picture is the L1 reference picture indicated by the L1 motion vector of the neighboring block. The neighboring block may be the left block of the current block, or the above block of the current block.
[0145] In some embodiments, the pre-defined positions in the previous coded slices / pictures where the inherited parameter model is from is determined by the motion vector of a neighboring block. Let Δx and Δy be the horizontal and vertical displacement determined based on the selected motion vector of the neighboring block, the current block position is at (x, y) and the block size is w×h. The inherited model parameters can be from the block at position (x′, y′) , where x′= x + Δx and y′= y + Δy, or where x′= x + w / 2 +Δx and y′= y + h / 2 +Δy.
[0146] In some embodiments, the inherited model parameters can also be from the block positions in the patterns described in earlier paragraphs, but with the predefined positions shifted by the displacement of the motion vector (Δx, Δy) . Specifically, the positions are centered at (x′, y′) , where x′= x + Δx and y′= y + Δy, or where x′= x + w / 2 +Δx and y′= y + h / 2 +Δy.
[0147] For example, let the current block size be w×h. The two value sets ax and ay are defined as: αx = {αx1, αx2, αx3, …αxn} , αxi < αxj if i < j αy = {αy1, αy2, αy3, …αyn} , αyi < αyj if i < j
[0148] All values in αx and αy are positive numbers. The inherited model parameters can be from the block at positions (x′+ αxi × w, y′+ αyi × h) , (x′+ αxi × w, y′–αyi × h) , (x′–αxi × w, y′+ αyi ×h) , (x′–αxi × w, y′–αyi × h) , (x′+ αxi × w, y′) , (x′–αxi × w, y′) , (x′, y′+ αyi × h) , (x′, y′–αyi × h) of the previous coded slice or picture.
[0149] For another example, let δx and δy be two fixed positive numbers The inherited model parameters can be from the block at positions (x′+ αxi × δx, y′+ αyi × δy) , (x′+ αxi × δx, y′–αyi × δy) , (x′–αxi × δx, y′+ αyi × δy) , (x′–αxi × δx, y′–αyi × δy) , (x′+ αxi × δx, y′) , (x′–αxi × δx, y′) , (x′, y′+αyi × δy) , (x′, y′–αyi × δy) of the previous slices / pictures of the previous coded slices / picture.
[0150] For another example, the inherited model parameters can be from the block at some pre-defined positions relative to (x’ , y’ ) of the previous coded slices / picture. The positions can be (x′, y′) , (x′+ w –1, y′) , (x′, y′+h–1) , (x′+w–1, y′+h–1) , (x′+w / 2, y′+h / 2) . For another example, the positions can be (x′–1, y′) , (x′, y′–1) , (x′–1, y′–1) , (x′+w, y′) , (x′+w-1, y′–1) , (x′+w, y′–1) , (x′, y′+h) , (x′–1, y′+h-1) , (x′–1, y′+h) , (x′+w, y′+h-1) , (x′+w–1, y′+h) , (x′+w, y′+h) .
[0151] In some embodiments, the neighboring block can be at a pre-defined position. For example, the position can be at the A0 position as depicted in FIG. 9. The pre-defined position can also be at A1, B0, B1, B2. If the block at the pre-defined position is not an inter block, no neighboring block is selected. In some embodiments, when selecting the neighboring block, there can be a list of pre-defined positions. The positions are placed according to the checking order. For example, the positions can be B0, A0, B1, A1 and B2 as depicted in FIG. 9. The selected neighboring block can be the first position in the list that is an inter block. The L0 motion vector is selected. If the L0 motion vector is not available, select the L1 motion vector. For another example, the L1 motion vector is selected. If the L1 motion vector is not available, select the L0 motion vector.
[0152] In some embodiments, if the collocated picture has been determined (e.g., it can be determined with the methods described in earlier paragraphs in this section) , the positions in the list of pre-defined positions are checked in the pre-defined checking order. The selected motion vector is the first whose reference picture is the collocated picture. For example, the positions can be B0, A0, B1, A1 and B2 as depicted in FIG. 9. For each position, the L0 motion vector is first checked, and then the L1 motion vector. That is, the checking order is (B0, L0) , (B0, L1) , (A0, L0) , (A0, L1) , …, (B2, L1) . For another example, the L1 motion vector is first checked, and then the L0 motion vector.
[0153] In some embodiments, when selecting the neighboring block, there can be a list of pre-defined positions. The positions in the list are checked in the pre-defined checking order. For each position, the L0 motion vector is first checked, and then the L1 motion vector. For another example, the L1 motion vector is first checked, and then the L0 motion vector. The selected motion vector is the first one whose reference picture is not rescaled.
[0154] In some embodiments, the inherited model parameters can also be from the block positions in the patterns described in earlier paragraphs. The positions are centered at (x′, y′) , where x′= x + Δx and y′= y + Δy. The horizontal and vertical displacement Δx and Δy are determined based on the selected motion vector of the neighboring block. For example, if the reference picture of the selected motion vector and the collocated picture are the same picture, Δx equals to the horizontal part of the selected motion vector and Δy equals to the vertical part of the selected motion vector. If the horizontal part or the vertical part of the selected motion vector is fractional, Δx equals to the horizontal part of the selected motion vector after rounding and Δy equals to the vertical part of the selected motion vector after rounding. The rounding method used can be but not limited to the following methods: rounding toward negative infinity, rounding toward positive infinity, rounding toward zero, or rounding to the nearest integer (e.g., rounding away from zero, rounding half up, rounding half down, …) .
[0155] For another example, if the reference picture of the selected motion vector and the collocated picture are not the same, the reference picture can be one of the pictures in the reference list, while the collocated picture is signaled in the picture / slice header. Let the POC distance between the current picture and the reference picture of the selected motion vector be tb, and the POC distance between the current picture and the collocated picture be td, the selected motion vector be (mv_x, mv_y) . Δx = mv_x * (td / tb) and Δy = mv_y * (td / tb) . If mv_x * (td / tb) or mv_y * (td / tb) is fractional, Δx equals to mv_x * (td / tb) after rounding or the horizontal part of the selected motion vector after rounding and Δy equals to mv_y * (td / tb) after rounding or the vertical part of the selected motion vector after rounding. The rounding method used can be but not limited to the following methods: rounding toward negative infinity, rounding toward positive infinity, rounding toward zero, or rounding to the nearest integer (e.g., rounding away from zero, rounding half up, rounding half down, …) .
[0156] In some embodiments, the cross-component parameter model can be inherited from more than one previous coded pictures.
[0157] e. Inherit Non-Adjacent Spatial Neighboring Models
[0158] In some embodiments, the inherited model parameters can be from blocks that are non-adjacent spatial neighboring blocks (that are not adjacent to the current block) . The models from blocks at pre-defined positions are added into the CCP merge candidate list in a pre-defined order. In some embodiments, the pre-defined positions and the pre-defined order are the same as those of non-adjacent spatial neighboring candidates for inter merge mode.
[0159] FIGS. 13A-B illustrate a current block and its non-adjacent spatial neighboring blocks, from which model parameters may be inherited. The figure also illustrates the pre-defined positions and their pre-defined order. FIG. 13A shows non-adjacent spatial positions in their pre-defined order according to a first pattern (Pattern 1) . FIG. 13B shows non-adjacent spatial positions in their pre-defined order according to a second pattern (Pattern 2) . The positions of the numbered squares are the pre-defined positions. The number inside each square indicates the pre-defined order. Positions in Pattern 1 is added into the CCP merge candidate list before positions in Pattern 2. The distance between each pre-defined positions are proportional to the width and height of the current block.
[0160] In some embodiments, there is a maximum number of inherited models from non-adjacent spatial neighbors that can be added into the CCP merge candidate list, and the maximum number is smaller than the number of pre-defined positions.
[0161] In some embodiments, let the current block position be (x, y) and the block size be w×h. The two value sets αx and αy are defined as: αx= {αx1, αx2, αx3, …, αxn} , αxi<αxj if i<j αy= {αy1, αy2, αy3, …, αyn} , αyi<αyj if i<j
[0162] All values in αx and αy are positive numbers. Let x’ = x + Δx and y’ = y + Δy. The inherited model parameters can be from the positions determined by x’a nd y’ . For example, the inherited model parameters can be from the block at positions (x′+αxi×w, y′+αyi×h) , (x′+αxi×w, y′-αyi×h) , (x′-αxi×w, y′+αyi×h) , (x′-αxi×w, y′-αyi×h) , (x′+αxi×w, 0) , (x′- αxi×w, 0) , (0, y′+αyi×h) , (0, y′-αyi×h) , (x′+αxi×w, y′) , (x′-αxi×w, y′) , (x′, y′+αyi×h) , (x′, y′-αyi×h) . For another example, let δx and δy be two fixed positive numbers. The inherited model parameters can be from the block at positions (x′+αxi×δx, y′+αyi×δy) , (x′+αxi×δx, y′-αyi×δy) , (x′-αxi×δx, y′+αyi×δy) , (x′-αxi×δx, y′-αyi×δy) , (x′+αxi×δx, 0) , (x′-αxi×δx, 0) , (0, y′+αyi×δy) , (0, y′-αyi×δy) , (x′+αxi×δx, y′) , (x′-αxi×δx, y′) , (x′, y′+αyi×δy) , (x′, y′-αyi×δy) . For another example, the inherited model parameters can be from the block at some pre-defined positions relative to (x′, y′) of the previous coded slices / picture. The positions can be (x′, y′) , (x′+w-1, y′) , (x′, y′+h-1) , (x′+w-1, y′+h-1) , For another example, the positions can be (x′-1, y′) , (x′, y′-1) , (x′-1, y′-1) , (x′+w, y′) , (x′+w-1, y′-1) , (x′+w, y′-1) , (x′, y′+h) , (x′-1, y′+h-1) , (x′-1, y′+h) , (x′+w, y′+h-1) , (x′+w-1, y′+h) , (x′+w, y′+h) . For another example, the position can be (x’ , y’ ) , (x’ , y’ + h / 2) , (x’ + w / 2, y’ ) , (x’ + w / 2, y’ + h / 2) , (x’ + w, y’ ) , (x’ , y’ + h) , or (x’ + w, y’ + h) .
[0163] In some embodiments, if the prediction mode of the current block is based on a block vector that references the current picture (e.g., intra-block copy mode (IBC) or IntraTMP) , Δx and Δy can be set according to the horizontal and vertical block vector of the current block. For example, Δx and Δy can be equal to the horizontal and vertical block vector of the current block. In some embodiments, Δx and Δy can be set according to the horizontal and vertical block vector of a neighboring block. For example, Δx and Δy can be equal to the horizontal and vertical block vector of a neighboring block.
[0164] f. Inherit Model Parameters from History Table
[0165] In some embodiments, the inherited model parameters can be from a cross-component model history table. The history table stores CCM information of valid previous coded blocks. The valid previous coded block refers to any blocks containing valid CCM information. The cross-component models in the history table can be added into the candidate list according to a pre-defined order. In some embodiments, the adding order of historical candidate can be from the beginning of the table to the end of the table. In some embodiments, the adding order of historical candidate can be from the end of the table to the beginning of the table.
[0166] In some embodiments, one cross-component model history table can be maintained for storing the previous cross-component model (i.e., CCM information) , and the cross-component model history table can be reset at the start of the current picture, current slice, current tile, every M CTU rows or every N CTUs, where N and M can be any value greater than 0. In some embodiments, the cross-component model history table can be reset at the end of the current picture, current slice, current tile, current CTU row or current CTU.
[0167] In some embodiments, multiple history tables are used for storing different types of cross-component models. For example, the first history table is used for storing single model, and the second history table is used for storing multi-model. For another example, the first history table is used for storing gradient model, and the second history table is used for storing non-gradient model. For another example, the first history table is used for storing simple linear model (e.g., y = αx + β) , and the second history table is used for storing complicated model (e.g., CCCM) .
[0168] In some embodiments, when adding historical candidates from multiple history tables to the candidate list, the adding order can be from the beginning of to the end of a certain table, and then the next history table is added in the same order or in a reversed order.
[0169] g. Inherit from Fusion Mode
[0170] Fusion mode refers to modes that fuse two predictions to generate the final prediction. In the chroma intra fusion mode, a chroma intra prediction that is not generated using a cross-component prediction (CCP) coding tool (e.g., CCLM, MMLM, CCCM) is fused with another chroma intra prediction generated using a cross-component prediction coding tool. For example, a non-CCLM coded intra prediction and a CCLM coded intra prediction are fused together to obtain the final intra prediction.
[0171] In some embodiments, when inheriting the cross-component model parameters from the block / position coded by chroma intra fusion mode, the model parameters for obtaining the CCP coded intra prediction are inherited and further refined.
[0172] In some embodiments, in addition to inheriting and refining the CCP model parameters, the fusion weight, the coding mode of non-CCP coded intra prediction are also inherited. That is, the chroma intra fusion mode is inherited.
[0173] h. Construct a Candidate List
[0174] In some embodiments, the candidate list is constructed by adding candidates in a pre-defined order until the maximum candidate number is reached. The candidates added can include all or some of the forementioned candidates, but not limited to the forementioned candidates. For example, the pre-defined order can be spatial adjacent candidates, temporal candidates, spatial non-adjacent candidates, historical candidates, and then default candidates.
[0175] In some embodiments, if all the pre-defined neighboring and historical candidates are added but the maximum candidate number is not reached, some default candidates are added into the candidate list until the maximum candidate number is reached. In some embodiments, the default candidates can be CCLM models. The scaling parameter α is from the set {0, 1 / 8, –1 / 8, +2 / 8, –2 / 8, …N / 8, –N / 8} , where N is a positive integer. The offset parameter β can be or can be derived based on neighboring luma and chroma samples. For example, if the average value of neighboring luma and chroma samples are lumaAvg and chromaAvg, β=chromaAvg-α·lumaAvg. In some embodiments, the inclusion order of the default candidates can depend on the absolute value and the sign of the scaling parameter α. For example, the default candidates are added into the list in the following order: α= 0, 1 / 8, –1 / 8, +2 / 8, –2 / 8, …+N / 8, –N / 8.
[0176] In some embodiments, a default candidate can be an earlier candidate with a delta scaling parameter refinement. The earlier candidate is a CCLM model. If the scaling parameter of an earlier candidate is α, the scaling parameter of a default candidate is (α+Δα) . For example, Δα can be 0, 1 / 8, –1 / 8, +2 / 8, –2 / 8, …+N / 8, –N / 8, where N is a positive integer. The offset parameter β can be derived based on (α+Δα) and the average values of neighboring luma and chroma samples of the current block. In some embodiments, the earlier candidate is the first CCLM candidate added into the list. In some embodiments, the inclusion order of the default candidates can depend on the absolute value and the sign of the refinement Δα. For example, the default candidates are added into the list in the following order: Δα = 0, 1 / 8, –1 / 8, +2 / 8, –2 / 8, …+N / 8, –N / 8.
[0177] i. Signaling the Inherit Candidate Index
[0178] In some embodiments, an on / off flag is signaled to indicate if the current block inherits the cross-component model parameters from neighboring blocks or not. The flag can be signaled per CU / CB, per PU, per TU / TB, or per color component, or per chroma color component. A high-level syntax can be signaled in SPS, PPS, PH or SH to indicate if inheriting cross-component model parameters from neighboring blocks is allowed for the current sequence, picture, or slice.
[0179] In some embodiments, the maximum allowed candidate number is signaled to indicate the maximum size of the merge candidate list. The number can be signaled per CU / CB, per PU, per TU / TB, or per color component, or per chroma color component. A high-level syntax can be signaled in SPS, PPS, PH or SH to indicate if the proposed method is allowed for the current sequence, picture, or slice. The maximum allowed candidate number of the proposed method can be shared with the maximum allowed candidate number for inter merge mode.
[0180] In some embodiments, if the current block inherits the cross-component model parameters from neighboring blocks, the inherit candidate index is signaled. The index can be signaled (e.g., signaled using truncate unary code, Exp-Golomb code, or fix length code) and shared among both the current Cb and Cr blocks. For example, the index can be signalled per color component. For another example, one inherited index is signaled for Cb component, and another inherited index is signaled for Cr component. For another example, the video coder can use chroma intra prediction syntax (e.g., IntraPredModeC [xCb] [yCb] ) to store the inherited index.
[0181] In some embodiments, if the current block inherits the cross-component model parameters from neighboring blocks, the current chroma intra prediction mode (e.g., IntraPredModeC [xCb] [yCb] as defined in VVC standard) is temporally set to a cross-component mode (e.g., CCLM_LA) at the bitstream syntax parsing stage. Later, at the prediction stage or reconstruction stage, the candidate list is derived, and the inherited candidate model is then determined by the inherit candidate index.
[0182] After obtaining the inherited model, the coding information of the current block is then updated according to the inherit candidate model. The coding information of the current block includes but not limited to the prediction mode (e.g., CCLM_LA or MMLM_LA) , related sub-mode flags (e.g., CCCM mode flag) , prediction pattern (e.g., GLM pattern index) , and the current model parameters. Then, the prediction of the current block is generated according to the updated coding information.
[0183] j. Vector Propagated CCM information
[0184] In some embodiments, after encoding / decoding a block, the cross-component model (CCM) information of the current block is derived and stored in (or for) the current block. The stored CCM information can be referenced by subsequent or following coding blocks. The following coding blocks may inherit CCM information from the current block. The stored CCM information can be inherited by spatial candidates, non-adjacent candidates, temporal candidates, historical candidates, and / or other types of candidates.
[0185] In some embodiments, if the current block is cross-component prediction (CCP) coded, the cross-component model used by the current block can be stored and be referenced by the subsequent or following coding blocks. When a block is CCP coded (i.e., the block uses a cross-component model to generate the prediction of the block) , the block may use (i) a cross-component model inherited from neighboring block, (ii) a cross-component model derived based on neighboring luma and chroma predicted / reconstructed sample values (e.g., CCLM, MMLM, CCCM, CCRM) , (iii) a cross-component model used in chroma fusion (e.g., the chroma prediction is based on adding one or more hypotheses of cross-component prediction to one or more existing hypotheses of prediction of non-cross-component prediction) , or any combination of the above.
[0186] In some embodiments, if the current block is not CCP coded, and there are block vectors available in the current block, (e.g., the current luma block is coded in IBC or IntraTMP mode, the collocated luma block is coded in IBC or IntraTMP mode) , the CCM information of the current block can be derived by copying the CCM information of the reference block located by the block vector.
[0187] FIG. 14 illustrates propagation of cross-component model (CCM) based on block vectors. The figure illustrates blocks A, B, C, D, E, F, G, and H. In the example illustrated, blocks A, E, G are coded in cross-component model (e.g., CCLM, MMLM, GLM, CCCM, Chroma Fusion) . Block B is not CCP coded but there are block vectors available at block B. The reference block A is located by the block vector. The CCM information of the reference block A, which uses cross-component model, is copied and stored in (or for) block B. In some embodiments, if the reference block located by the block vector is also not CCP coded, but there is CCM information stored in the reference block, the CCM information of the current block can be derived by copying the CCM information stored in the reference block. For example, as shown in FIG. 14, the current block C has block vector available, and its reference block B, which is not CCP coded, has CCM information stored. The CCM information of block B is copied and stored in (or for) block C. The CCM information stored in block B was copied from block A. Hence the CCM information of block A is propagated to block C. In some embodiments, if the reference block located by the block vector is not CCP coded and does not have CCM information stored, no CCM information is stored for the current block.
[0188] In some embodiments, when the current block has multiple block vectors available (e.g., the block vector can be bi-directional, the block can have multiple IntraTMP block vectors, or the current chroma block is collocated with multiple luma blocks and more than one of the luma blocks have block vectors) , to derive the CCM information of the current block, if only one of the reference blocks located by the block vectors has CCM information, the CCM information from the reference block which has CCM information is copied to and stored in the current block. For example, as shown in FIG. 14, suppose block F has two block vectors and has two reference blocks G and H. Block G has CCM information and block H does not. The CCM information of block G is copied to and stored in block F.
[0189] In some embodiments, when the current block has multiple block vectors, and more than one of the reference blocks located by the block vectors has CCM information, the video coder determines / derives the CCM information to be stored for the current block based on the CCM information of the more than one reference blocks. FIG. 15 illustrates a current block having two block vectors identifying two reference blocks and that both have CCM information. As illustrated, a current block (block X) has two reference blocks (block Y and block Z) in a same current picture 1500. The reference block Y is identified by block vector BV0 and has CCM information 1515. The reference block Z is identified by block vector BV1 and has CCM information 1525. Block Y and Block Z may or may not be coded by CCP. The video coder determines the CCM information 1505 for the current block X based on the CCM information 1515 and the CCM information 1525.
[0190] The video coder in different embodiments determines the current block CCM information 1505 differently. For example, in some embodiments, the current block CCM information 1505 is derived by combining all or a subset of the CCM models of its reference blocks (e.g., CCM models 1515 and 1525 of reference blocks 1510 and 1520) .
[0191] In some embodiments, when the current block (e.g., current block X of FIG. 15) has multiple block vectors, and more than one of the reference blocks (e.g., reference blocks Y and Z of FIG. 15) located by the block vectors has CCM information, one of the reference blocks is selected based on a set of pre-defined rules. The CCM information of the selected reference block is then copied and stored in the current block. In some embodiments, the reference block which is CCP coded is selected. In some embodiments, the reference block which is intra coded is selected. In some embodiments, the reference block which is inter or IBC coded is selected.
[0192] In some embodiments, the reference block whose distance to the current block is the smallest is selected. The CCM information of the selected reference block is copied to and stored in the current block. The distance between the reference block and the current block, located at (xr, yr) and (xc, yc) respectively, can be computed by Euclidean distance (xr, yr) and (xc, yc) can be the top-left, top-right, bottom-left, bottom-right, or center positions of the reference block and the current block. The distance metric can also be Manhattan distance or Minkowski distance.
[0193] For some embodiments, the reference block which has the smallest horizontal distance, |xr-xc|, is selected. The CCM information of the selected reference block is copied to and stored in the current block. For some embodiments, the reference block which has the smallest vertical distance, |yr -yc|, is selected. The CCM information of the selected reference block is copied to and stored in in the current block.
[0194] For some embodiments, the rules described previously can be combined, and not all the rules described previously need to be applied. For example, the reference block which is CCP coded is selected.
[0195] In some embodiments, if the current block is not CCP coded and there are motion vectors available in the current block (e.g. the current luma block is inter-coded) , the CCM information of the current block can be derived by copying the CCM information of its reference block in a reference picture, located by the motion vectors of the current block.
[0196] FIG. 16 illustrates examples of CCM information propagation based on motion vectors. The figure illustrates several blocks A through H. The blocks A, E, G are coded by using cross-component model (e.g., CCLM, MMLM, GLM, CCCM) . As illustrated, block B is not CCP coded and there are motion vectors available at block B. The reference block A is located by the motion vector. The CCM information of the reference block A, which uses cross-component model, is copied and stored in block B.
[0197] In some embodiments, if the reference block located by the motion vector is also not CCP coded, but there is CCM information stored in the reference block, the CCM information of the current block can be derived by copying the CCM information stored in the reference block. In the example of FIG. 16, the block C has motion vector available, and its reference block B, which is not CCP coded, has CCM information stored. The CCM information of block B is copied and stored in block C. The CCM information stored in block B was copied from block A. Hence the CCM information of block A is propagated to block C. In some embodiments, if the reference block located by the motion vector is not CCP coded and does not have CCM information stored, no CCM information is stored for the current block.
[0198] In some embodiments, when the current block is inter-coded with bi-directional prediction, to derive the CCM information of the current block, if only one of the reference blocks located by the motion vectors has CCM information, the CCM information from the reference block which has CCM information is copied to and stored in the current block. For example, as shown in FIG. 16, block F is inter-coded with bi-directional prediction, the two reference blocks located by the motion vectors (MV0 and MV1) of block F are block G and block H. Block G has stored CCM information and block H does not. The CCM information of block G is copied to and stored in block F.
[0199] In some embodiments, when the current block is inter-coded with bi-directional prediction, and both reference blocks located by the motion vectors have stored CCM information, the video coder determines / derives the CCM information to be stored for the current block based on the CCM information of the more than one reference blocks. FIG. 17 illustrates a current block having two motion vectors identifying two reference blocks and that both have CCM information. As illustrated, a current block (block P) is inter-coded with bi-directional prediction in current picture 1702. The two reference blocks (block Q and block R) are located by motion vectors in different reference pictures 1701 and 1703. The reference block Q is located by block vector MV0 and has CCM information 1715. The reference block R is located by block vector MV1 and has CCM information 1725. Reference blocks Q and R may or may not be coded by CCP. The video coder determines the CCM information 1705 for the current block P based on the CCM information 1715 and the CCM information 1725.
[0200] The video coder in different embodiments determines the current block CCM information 1705 differently. For example, in some embodiments, the current block CCM information 1705 is derived by combining of all or a subset of the CCM models 1715 and 1725 of the reference blocks Q and R. For another example, ins some embodiments, one of the reference blocks is selected based on a set of pre-defined rules. The CCM information of the selected reference block is then copied and stored in the current block.
[0201] In some embodiments, to select from the one or more reference blocks for obtain the CCM information, the reference block which is CCP coded is selected. In some embodiments, the reference block which is intra coded is selected. In some embodiments, the reference block which is inter-or IBC-coded is selected.
[0202] In some embodiments, the reference block whose reference picture (i.e., the picture the reference block is in) has the smaller POC distance to the current picture is selected. The CCM information of the selected reference block is copied to and stored in the current block. In the example of FIG. 17, block P is inter-coded with bi-directional prediction. The two reference blocks Q an R are located by the motion vectors and both have stored CCM information. The reference picture 1701 containing reference block Q has POC = N1, the current picture 1702 has POC = N2, the reference picture 1703 has POC = N3. If |N1-N2| is smaller than |N3-N2|, then block Q is selected, and the CCM information 1715 of block Q is copied to and stored in block P as the current block CCM information 1705.
[0203] In some embodiments, the reference block whose reference picture has the smaller / smallest QP difference from the current picture is selected. The CCM information of the selected reference block is copied to and stored in the current block. In the example of FIG. 16, block F in picture 1601 is inter-coded with bi-directional prediction. The two reference blocks located by the motion vectors are block G in picture 1600 and block H in picture 1602. Assume block G and block H both have stored CCM information. Assume the QPs of the pictures 1600, 1601, and 1602 are 27, 32, 33 respectively. Since |33-32| is smaller than |27-32|, block H is selected, and the CCM information of block H is copied to and stored in block F.
[0204] In some embodiments, the reference block whose reference picture has the smallest QP value is selected (so in the example of FIG. 16, block G would be selected since picture 1600 has the smaller QP value 27. ) In some embodiments, the reference block whose reference picture has the larger QP values is selected (so in the example of FIG. 16, block H would be selected since picture 1602 has the larger QP value 33. )
[0205] In some embodiments, the reference block that is indicated by the L0 motion vector is selected. In some embodiments, the reference block that is indicated by the L1 motion vector is selected. In some embodiments, the rules described previously can be combined, and not all the rules described previously need to be applied.
[0206] In some embodiments, when the reference picture located by a motion vector that is rescaled, no CCM information can be located by this motion vector. In some embodiments, this is indicated by the RprConstraintsActiveFlag of the reference picture being true.
[0207] In some embodiments, when the reference picture located by the motion vector is rescaled, the position of the reference block can be scaled according to the scaling ratio. The scaling ratio is derived based on the corresponding scaling windows of the current picture and the collocated picture. Let the position of the reference block be (x, y) , the scaled position of the reference block be (x′, y′) and the scaling ratio be R. The scaled position can be (x / R, y / R) or (x / R, y / R) after rounding. The rounding method used can be but not limited to the following methods: rounding toward negative infinity, rounding toward positive infinity, rounding toward zero, or rounding to the nearest integer (e.g., rounding away from zero, rounding half up, rounding half down, …) .
[0208] In some embodiments, the position located by the motion vector is constrained to be in the collocated CTU row in the reference picture of the current CTU row. FIG. 18 illustrates a position located by the motion vector in a reference picture of the current CTU row. In some embodiments, if the position located by the motion vector is outside of the collocated CTU row, the vertical-component of the motion vector is clipped. In some embodiments, the position located by the motion vector has to be in the collocated CTU row in the reference picture of the current CTU row. If the position located by the motion vector is above the collocated CTU row, the position is mapped to the top line of the collocated CTU row. If the position located by the motion vector is below the current CTU row, the position is mapped to the bottom line of the collocated CTU row. In the example illustrated in FIG. 18, the minimum and the maximum vertical position of the current CTU row are Y1 and Y2 respectively. Assume the position located by the motion vector is (Xm, Ym) . If Ym < Y1, then the position is changed to (Xm, Y1) . The CCM information at position (Xm, Y1) is copied to current block and stored. If Ym >Y2, then the position is changed to (Xm, Y2) . The CCM information at position (Xm, Y2) is copied to current block and stored.
[0209] In some embodiments, if the current block is inter-coded or there’s block vector available in the current block, the CCM information of the current block can be derived by copying the CCM information of the reference block located by the motion vector or the block vector. FIG. 19 illustrates propagating CCM information of a reference block located by the motion vector or the block vector. As illustrated, the current block C has block vector 1911 available that locates block B, and block B has motion vector 1910 available that locates block A. The CCM information of block B is copied from block A’s CCM information 1920. The CCM information of block B is then copied to block C. Hence the CCM information 1920 of block A is propagated to the current block C.
[0210] k. Storing Temporal Models in an Indexed Table
[0211] In some embodiments, CCM information from previous coded slices / pictures are stored in a table, and a picture-level index buffer is created to store the index of the table. The index buffer has the same size as the picture. When referencing the CCM information at position (x, y) inside the collocated picture, an index value is retrieved from the position (x, y) in the index buffer of the collocated picture. If the index value indicates that no CCM information is available at position (x, y) , no CCM information can be referenced. Otherwise, an item in the table indicated by the index value is obtained as the CCM information to be referenced.
[0212] In some embodiments, the table to store CCM information is a picture-level table. CCM information from each picture is stored in a separate table. FIG. 20 conceptually illustrates a picture level index buffer for storing indices of a CCM information storage table. When a pixel block in a future picture selects the current picture as the collocated picture, a set of CCM information (including the model parameters) from the current picture may be inherited as a temporal candidate to encode the pixel block in the future picture in cross-component merge mode. The current picture is denoted as a CCM picture 2000.
[0213] The CCM picture 2000 has a corresponding index buffer 2020. When referencing the CCM information at position (x, y) (which may be a pixel position or a block position) inside the CCM picture 2000, an index value is retrieved from the position (x, y) in the index buffer 2020. If the index value indicates that no CCM information is available at position (x, y) , no CCM information can be referenced. Otherwise, an item in an indexed CCM table 2030 indicated by the index value is obtained as the CCM information to be referenced. In the example, position (x, y) in the index buffer 2020 has index value ‘2’ , which correspond to index 2 position in the indexed CCM table 2030. The index 2 position in the indexed CCM table 2030 stores a set of CCM information labeled “CCP2” . (Index value ‘0’indicates no CCM information) . For a future picture to be able to reference CCM information from the current picture, after the current picture is encoded or decoded, the CCM information from the current picture are stored into corresponding indexed CCM tables and the corresponding index value are stored at the corresponding location in the index buffer.
[0214] In some embodiments, one table is created to store CCM information from all pictures. In some embodiments, several tables are used to store CCM information from one picture. A picture can be divided into several regions, with each region having its own table.
[0215] In some embodiments, one table is created for each temporal ID such that CCM information from the layer with the same temporal id is stored in the same table. Pictures having different temporal IDs (or in different temporal ID layers) are in different encoding or decoding hierarchy. Specifically, pictures having temporal ID = 0 are coded before pictures having temporal ID = 1, which are coded before pictures having temporal ID = 2, which are coded before pictures having temporal ID = 3, etc., and that pictures having a larger temporal ID may be encoded or decoded based on pictures having a smaller temporal ID.
[0216] In some embodiments, after storing CCM information at position (x, y) of the current encoding / decoding picture into the corresponding table, the table index value of that CCM information is saved in the index buffer of the current encoding / decoding picture at position (x, y) . If no CCM information is available at position (x, y) (e.g., the CU covering position (x, y) is not coded in cross-component prediction modes, such as CCLM, MMLM, CCCM, CCCM multi-models, chroma fusion, or other cross-component models. ) , the value at position (x, y) in the index buffer is set to indicate that no CCM information is available.
[0217] In some embodiments, if CCM information is not available at position (x, y) of the current encoding / decoding picture, the index value at position (x, y) in the index buffer of the collocated picture can be stored at position (x, y) in the index buffer of the current encoding / decoding picture. In some of these embodiments, if the collocated picture is rescaled, the index value at the position (x, y) in the index buffer of the collocated picture is not stored at position (x, y) in the index buffer of the current encoding / decoding picture.
[0218] In some embodiments, if CCM information is not available at position (x, y) of the current encoding / decoding picture, the CCM information retrieved using index value at position (x, y) in the index buffer of the collocated picture can be stored in the indexed table of the current encoding / decoding picture, and the corresponding index value is stored at position (x, y) in the index buffer of the current encoding / decoding picture. In some of these embodiments, if the collocated picture is rescaled, the CCM information retrieved by the index value at the position (x, y) in the index buffer of the collocated picture is not stored in the indexed table of the current encoding / decoding picture.
[0219] FIG. 21 illustrates copying CCM information from the indexed table of a collocated picture to the indexed table of the current picture. The figure illustrates a current picture 2100 having an index buffer 2105 for accessing CCM information. At position (x, y) , the CCM information is not available for current picture 2100, as indicated by index value ‘0’ in the index buffer 2105. On the other hand, a collocated picture 2120 at position (x, y) has CCM information 2133 ( “CCP3” ) stored in an indexed table 2130, as indicated by index value ‘3’ in the index buffer 2125 of the reference picture 2120. To make the CCM information 2133 for use by the current picture 2100, the CCM information 2133 is copied from the indexed table 2130 to the indexed table 2110 for the current picture 2100. The CCM information 2133 in the indexed table 2110 is indicated by an index value ‘2’ in the index buffer 2105 at position (x, y) for the current picture.
[0220] In some embodiments, if CCM information is not available at position (x, y) of the current encoding / decoding picture, and there is a block vector (Δx, Δy) available at the position (x, y) (e.g., the current luma block is coded in IBC or IntraTMP mode, the collocated luma block is coded in IBC or IntraTMP mode) , the index value at position (x+Δx, y+Δy) in the index buffer can be stored at position (x, y) in the index buffer of the current encoding / decoding picture.
[0221] FIG. 22 conceptually illustrates deriving and storing CCM information by copying entries of an index buffer based on block vectors. As illustrated, a CCM picture 2200 (the current picture that has been encoded / decoded or has portions already reconstructed to serve as reference for subsequently coded portions) has an index buffer 2205 for locating CCM information in an indexed table 2210. As illustrated, at position (x, y) , the CCM information is not available for the CCM picture 2200, as indicated by value ‘0’ in corresponding position in the index buffer 2205. However, the position (x, y) is coded in a mode (e.g., IBC, IntraTMP) using a BV (Δx, Δy) that point to another position (x’ , y’) = (x+Δx, y+Δy) in the reference picture 2200. The position (x’ , y’ ) has CCM information, as indicated by a corresponding non-zero index value ( ‘4’ ) in the index buffer 2205 at position (x’ , y’ ) . The index value ( ‘4’ ) at position (x’ , y’ ) is then replicated at the position (x, y) of the index buffer. This allows the block at (x, y) to be coded by using the CCM information pointed to by index value ( ‘4’ ) .
[0222] In some embodiments, if CCM information is not available at position (x, y) of the current encoding / decoding picture, and there are multiple block vectors available, (Δxi, Δyi) , 0 < i ≦N, N ≧1, at the position (x, y) (e.g., the luma block at the position (x, y) can have bi-directional block vector, or the chroma block at the position (x, y) can have multiple collocated luma blocks which have block vectors) , the index value at one of the positions (x+Δxi, y+Δyi) in the index buffer can be stored at position (x, y) in the index buffer of the current encoding / decoding picture. In some embodiments, a set of pre-defined rules may be applied to determine how to select one of the block vectors (i.e., select and store the index value and the corresponding cross-component model located by the block vector (Δxi, Δyi) ) . The rules can be the same as the rules to select one of the reference blocks located by the block vectors described above in Section IV. j “Vector propagated CCM information” .
[0223] In some embodiments, if CCM information is not available at position (x, y) of the current encoding / decoding picture, and the block at position (x, y) is inter-coded and the motion vector is (Δx, Δy) , the index value at position (x+Δx, y+Δy) in the index buffer of the reference picture (also indicated by the motion vector) can be stored at position (x, y) in the index buffer of the current encoding / decoding picture.
[0224] In some embodiments, if CCM information is not available at position (x, y) of the current encoding / decoding picture, and the block at position (x, y) is inter-coded and the motion vector is bi-directional (Δxi, Δyi) , i = 0 or 1. The index value at one of the positions (x+Δxi, y+Δyi) in the index buffer of the reference picture (also indicated by the motion vector) can be stored at position (x, y) in the index buffer of the current encoding / decoding picture.
[0225] In some embodiments, if CCM information is not available at position (x, y) of the current encoding / decoding picture, and the block at position (x, y) is inter-coded and the motion vector is (Δx, Δy) , the index value at position (x+Δx, y+Δy) in the index buffer of the reference picture, which is also indicated by the motion vector, can be used to retrieve CCM information from the table corresponding to the reference picture. The retrieved CCM information is then stored into the table corresponding to the current picture. The table index value of the retrieved CCM information is saved in the index buffer of the current encoding / decoding picture at position (x, y) .
[0226] In some embodiments, if CCM information is not available at position (x, y) of the current encoding / decoding picture, and the block at position (x, y) is inter-coded and the motion vector is bi-directional (Δxi, Δyi) , i = 0 or 1. The index value at one of the positions (x+Δxi, y+Δyi) in the index buffer of the reference picture, which is also indicated by the motion vector, can be used to retrieve CCM information from the table corresponding to the reference picture. The retrieved CCM information is then stored into the table corresponding to the current picture. The table index value of retrieved CCM information is saved in the index buffer of the current encoding / decoding picture at position (x, y) .
[0227] FIG. 23 illustrates deriving and storing CCM information by copying and storing entries of indexed tables based on motion vectors. The figure illustrates a current picture 2300 having an index buffer 2305 for accessing CCM information in an indexed table 2310. At position (x, y) , the CCM information is not available for the current picture 2300, as indicated by index value ‘0’ in the index buffer 2305. The position (x, y) is inter-coded by using an MV 2302 that references a reference picture 2320 at position (x’ , y’ ) = (x+Δx, y+Δy) . The reference picture 2320 at position (x’ , y’ ) has CCM information 2332 stored in an indexed table 2330, as indicated by index value ‘2 in an index buffer 2325. To make the CCM information 2332 for use by the current picture 2300, the CCM information 2332 is copied from the indexed table 2330 to the indexed table 2310 for the current picture 2300. The CCM information 2332 in the indexed table 2310 is indicated by an index value ‘3’ in the index buffer 2305 at position (x, y) for the current picture 2300.
[0228] In some embodiments, there can be a set of pre-defined rules to determine how to select one of the motion vectors (i.e., retrieve the index value located by the motion vector (Δxi, Δyi) and store the corresponding cross-component model in the current table) . The rules can be the same as the rules to select one of the reference blocks located by the motion vectors described in Section IV. j.
[0229] In some embodiments, when deleting a CCM information from a table, all values in the index buffers that indicate to use the to-be-deleted CCM information are reset to indicate that no CCM information is available. Assume the index value of the to-be-deleted CCM information is N, all values in the index buffer that are greater than N will be decreased by 1.
[0230] Any of the foregoing proposed methods can be implemented in encoders and / or decoders. For example, any of the proposed methods can be implemented in an inter / intra / prediction module of an encoder, and / or an inter / intra / prediction module of a decoder. Alternatively, any of the proposed methods can be implemented as a circuit coupled to the inter / intra / prediction module of the encoder and / or the inter / intra / prediction module of the decoder, so as to provide the information needed by the inter / intra / prediction module.
[0231] V. Example Video Encoder
[0232] FIG. 24 illustrates an example video encoder 2400 that may implement cross-component prediction. As illustrated, the video encoder 2400 receives input video signal from a video source 2405 and encodes the signal into bitstream 2495. The video encoder 2400 has several components or modules for encoding the signal from the video source 2405, at least including some components selected from a transform module 2410, a quantization module 2411, an inverse quantization module 2414, an inverse transform module 2415, an intra-picture estimation module 2424, an intra-prediction module 2425, a motion compensation module 2430, a motion estimation module 2435, an in-loop filter 2445, a reconstructed picture buffer 2450, a MV buffer 2465, and a MV prediction module 2475, and an entropy encoder 2490. The motion compensation module 2430 and the motion estimation module 2435 are part of an inter-prediction module 2440. The intra-prediction module 2425 and the intra-prediction estimation module 2424 are part of a current picture prediction module 2420, which uses current picture reconstructed samples as reference samples for prediction of the current block.
[0233] In some embodiments, the modules 2410 –2490 are modules of software instructions being executed by one or more processing units (e.g., a processor) of a computing device or electronic apparatus. In some embodiments, the modules 2410 –2490 are modules of hardware circuits implemented by one or more integrated circuits (ICs) of an electronic apparatus. Though the modules 2410 –2490 are illustrated as being separate modules, some of the modules can be combined into a single module.
[0234] The video source 2405 provides a raw video signal that presents pixel data of each video frame without compression. A subtractor 2408 computes the difference between the raw video pixel data of the video source 2405 and the predicted pixel data 2413 from the motion compensation module 2430 or intra-prediction module 2425 as prediction residual 2409. The transform module 2410 converts the difference (or the residual pixel data or residual signal 2408) into transform coefficients (e.g., by performing Discrete Cosine Transform, or DCT) . The quantization module 2411 quantizes the transform coefficients into quantized data (or quantized coefficients) 2412, which is encoded into the bitstream 2495 by the entropy encoder 2490.
[0235] The inverse quantization module 2414 de-quantizes the quantized data (or quantized coefficients) 2412 to obtain transform coefficients, and the inverse transform module 2415 performs inverse transform on the transform coefficients to produce reconstructed residual 2419. The reconstructed residual 2419 is added with the predicted pixel data 2413 to produce reconstructed pixel data 2417. In some embodiments, the reconstructed pixel data 2417 is temporarily stored in a line buffer 2427 (or intra prediction buffer) for intra-picture prediction and spatial MV prediction. The reconstructed pixels are filtered by the in-loop filter 2445 and stored in the reconstructed picture buffer 2450. In some embodiments, the reconstructed picture buffer 2450 is a storage external to the video encoder 2400. In some embodiments, the reconstructed picture buffer 2450 is a storage internal to the video encoder 2400.
[0236] The intra-picture estimation module 2424 performs intra-prediction based on the reconstructed pixel data 2417 to produce intra prediction data. The intra-prediction data is provided to the entropy encoder 2490 to be encoded into bitstream 2495. The intra-prediction data is also used by the intra-prediction module 2425 to produce the predicted pixel data 2413.
[0237] The motion estimation module 2435 performs inter-prediction by producing MVs to reference pixel data of previously decoded frames stored in the reconstructed picture buffer 2450. These MVs are provided to the motion compensation module 2430 to produce predicted pixel data.
[0238] Instead of encoding the complete actual MVs in the bitstream, the video encoder 2400 uses MV prediction to generate predicted MVs, and the difference between the MVs used for motion compensation and the predicted MVs is encoded as residual motion data and stored in the bitstream 2495.
[0239] The MV prediction module 2475 generates the predicted MVs based on reference MVs that were generated for encoding previously video frames, i.e., the motion compensation MVs that were used to perform motion compensation. The MV prediction module 2475 retrieves reference MVs from previous video frames from the MV buffer 2465. The video encoder 2400 stores the MVs generated for the current video frame in the MV buffer 2465 as reference MVs for generating predicted MVs.
[0240] The MV prediction module 2475 uses the reference MVs to create the predicted MVs. The predicted MVs can be computed by spatial MV prediction or temporal MV prediction. The difference between the predicted MVs and the motion compensation MVs (MC MVs) of the current frame (residual motion data) are encoded into the bitstream 2495 by the entropy encoder 2490.
[0241] The entropy encoder 2490 encodes various parameters and data into the bitstream 2495 by using entropy-coding techniques such as context-adaptive binary arithmetic coding (CABAC) or Huffman encoding. The entropy encoder 2490 encodes various header elements, flags, along with the quantized transform coefficients 2412, and the residual motion data as syntax elements into the bitstream 2495. The bitstream 2495 is in turn stored in a storage device or transmitted to a decoder over a communications medium such as a network.
[0242] The in-loop filter 2445 performs filtering or smoothing operations on the reconstructed pixel data 2417 to reduce the artifacts of coding, particularly at boundaries of pixel blocks. In some embodiments, the filtering or smoothing operations performed by the in-loop filter 2445 include deblock filter (DBF) , sample adaptive offset (SAO) , and / or adaptive loop filter (ALF) . In some embodiments, luma mapping chroma scaling (LMCS) is performed before the loop filters.
[0243] FIG. 25 illustrates portions of the video encoder 2400 that implement cross-component prediction using temporal candidates with rescaled reference pictures. The luma component of the current block may be coded by intra-prediction (intra prediction module 2420) and generate a reconstruction 2515 for the luma component. A cross-component model 2510 is applied to the luma reconstruction 2515 to generate a cross-component predictor 2525 for a chroma component. The cross-component predictor 2525 is included in the predicted pixel data 2413.
[0244] The cross-component model 2510 may be generated by a model constructor 2505 based on samples (in and / or around the current block) retrieved from the reconstructed picture buffer 2450 and / or the line buffer 2427. Section I above describe several types of cross-component models that may be used as the cross-component model 2510.
[0245] The cross-component model 2510 may also be provided by a CCM selection module 2530, which selects a cross-component model (CCM) information or other cross-component prediction (CCP) information that are inherited from one of a plurality of candidates provided by a merge mode module 2520. These candidates may include spatial candidates, temporal candidates, historical candidates, default candidates, etc. CCM information is retrieved from a CCM storage 2535 by the merge mode module 2520 as candidates, such as spatial candidates, temporal candidates, or historical candidates. More specifically, for temporal candidates, CCM information of the temporal candidates are retrieved from the CCM storage 2535 by the Temporal Candidate Selection module 2550.
[0246] A temporal candidate selection module 2550 provides the temporal candidates to the merge mode module 2530. The temporal candidates refer to cross component models that correspond to different positions of a collocated picture. The temporal candidate selection module 2550 selects the collocated picture from a plurality of previous coded pictures based on a set of pre-defined rules. In some embodiments, the set of pre-defined rules are related to information comprising a reference index of a reference list (such as L0 [0] or L1 [0] ) , POC distance between the current picture and the previous coded picture, QP value of the previous coded picture, or a combination thereof.
[0247] As mentioned, some reference pictures may be rescaled pictures that differ with the current picture in picture size, scaling window offset, or a number of sub pictures. The temporal candidate selection module 2550 may use the RprConstraintsActiveFlag to identify which reference pictures are rescaled and to avoid selecting any of them as the collocated picture. In some embodiments, the temporal candidate selection module 2550 selects the collocated picture from the non-rescaled reference pictures using a set of pre-defined rules. In some embodiments, the temporal candidate selection module 2550 selects the non-rescaled reference picture with the lowest QP value or the smallest POC difference with the current block as the collocated picture.
[0248] In some embodiments, the temporal candidate selection module 2550 do not avoid selecting a rescaled picture as the collocated picture. If a rescaled picture is selected as the collocated picture for temporal candidate selection, the positions of the CCMs in the collocated picture are scaled according to a scaling ratio that is derived based on a scaling window of the current picture and a corresponding scaling window of the collocated picture. In some embodiments, the temporal candidate selection module 2550 do not avoid selecting a rescaled picture as the collocated picture. But if a rescaled picture is selected as the collocated picture for temporal candidate selection, the temporal candidates are not provided to the merge mode module 2520.
[0249] In some embodiments, the positions of the temporal candidates are determined according to a motion vector of a neighboring block of the current block (by accessing the MV buffer 2465) , and the neighboring block is selected from a list of pre-defined positions according to a pre-defined checking order. In some embodiments, the pre-defined checking order corresponds to L0 motion vectors or L1 motion vectors being checked first. An example of the predefined order is L0B1 → L1B1 → L0A1 → L1A1 → L0B0 → L1B0 → L0A0 → L1A0 → L0B2 → L1B2. (L0B1 refers to a motion vector of a neighboring block at position B1 that locates a reference block in a L0 reference picture, etc. ) . In some embodiments, the motion vector associated with a non-rescaled reference picture first is selected.
[0250] The CCM storage 2535 stores CCM information and corresponding support data structures. The CCM storage 2535 represents (or is implemented by) any form of storage that is used to store CCM information which includes cross-component models generated by the model constructor 2505.
[0251] A CCM propagation module 2540 operates to propagate CCM information between blocks and / or between pictures. For a position or current block that does not have CCM information and / or CCP information, the CCM propagation module 2540 may follow the current block’s BV or MV to locate the CCM / CCP information of the reference block in a reference picture. The CCM propagation module 2540 may then propagate the CCM / CCP information by copying the CCM information of the reference block to the current block. In some embodiments, if the reference picture is rescaled, the CCM information of the reference block is not copied to the current block. In some embodiments, if the reference picture is rescaled, the position located by the MV of the current block is scaled according to a scaling ratio that is derived based on a scaling window of the current picture and a corresponding scaling window of the reference picture. The CCM information of the reference block located by the scaled position is copied to the current block. In some embodiments, the position located by the MV of the current block is constrained in a collocated CTU row of the current CTU row.
[0252] FIG. 26 conceptually illustrates a process 2600 for performing cross-component prediction using temporal candidates with rescaled reference pictures when encoding a block. In some embodiments, one or more processing units (e.g., a processor) of a computing device implementing the encoder 2400 performs the process 2600 by executing instructions stored in a computer readable medium. In some embodiments, an electronic apparatus implementing the encoder 2400 performs the process 2600.
[0253] The encoder receives (at block 2610) data to be encoded as a current block of pixels in a current picture. The encoder selects (at block 2620) a collocated picture from a plurality of previous coded pictures. The plurality of previous coded pictures may include at least one rescaled picture. The rescaled picture differs with the current picture in at least one of picture size, scaling window offset, and a number of sub-pictures.
[0254] In some embodiments, the collocated picture is selected based on quantization parameter (QP) values of the plurality of previous coded pictures (e.g., the picture with the smallest QP value is selected as the collocated picture. ) In some embodiments, the collocated picture is selected based on picture order counts (POCs) of the plurality of previous coded pictures (e.g., the picture with the smallest POC difference with the current picture is selected as the collocated picture. ) In some embodiments, a particular reference index for a reference picture list (e.g., L0 [0] or L1 [0] ) is used to select the collocated picture. In some embodiments, the rescaled picture is not selected as the collocated picture. In some embodiments, the collocated picture is selected based on a combination of rules, for example, the collocated picture may be selected out of un-rescaled pictures in the plurality of reference pictures based on picture order counts (POCs) and / or quantization parameter (QP) values. In some embodiments, the collocated picture is selected based on a combination of rules that do not consider if the reference picture is rescaled or not, and the selected collocated picture may be a rescaled picture.
[0255] The encoder inherits (at block 2630) a model associated with a position in the selected collocated picture. In some embodiments, when the selected collocated picture is rescaled, the model is not inherited for encoding the current block, or the position of the inherited model in the collocated picture is scaled according to a scaling ratio that is derived based on a scaling window of the current picture and a corresponding scaling window of the selected collocated picture. (The scaled position can be rounded toward negative infinity, toward positive infinity, toward zero, or to the nearest integer. )
[0256] In some embodiments, the position is determined according to a motion vector of a neighboring block of the current block, and the neighboring block is selected from a list of pre-defined positions according to a pre-defined checking order. In some embodiments, the pre-defined checking order corresponds to L0 motion vectors or L1 motion vectors being checked first. An example of the predefined order is L0B1 → L1B1 → L0A1 → L1A1 → L0B0 → L1B0 → L0A0 → L1A0 → L0B2 → L1B2. In some embodiments, the motion vector associated with a non-rescaled reference picture first is selected.
[0257] The model inherited by the encoder may be stored for a reference block associated with the position in the collocated picture. The model may be copied from a further reference block in a further reference picture located by the motion vector of the reference block. In some embodiments, when the further reference picture is rescaled, the model is not copied from the further reference block and not stored for the reference block. In some embodiments, when the further reference picture is rescaled, the position located by the motion vector of the reference block is scaled according to a scaling ration that is derived based on a scaling window of the reference picture and the further reference picture. The scaled position can be rounded toward negative infinity, toward positive infinity, toward zero, or to the nearest integer. The model of the further reference block, located by the scaled position, is copied and stored for the reference block. In some embodiments, the position in the further reference picture located by the motion vector of the reference block is constrained to be in a collocated CTU row of a CTU row in which the reference block is.
[0258] The encoder applies (at block 2640) the inherited model to a reconstruction of a first component of the current block to generate a prediction of a second component of the current block. The encoder encodes (at block 2650) the current block by using the prediction of the second component to generate a residual.
[0259] VI. Example Video Decoder
[0260] In some embodiments, an encoder may signal (or generate) one or more syntax element in a bitstream, such that a decoder may parse said one or more syntax element from the bitstream.
[0261] FIG. 27 illustrates an example video decoder 2700 that may implement cross-component prediction. As illustrated, the video decoder 2700 is an image-decoding or video-decoding circuit that receives a bitstream 2795 and decodes the content of the bitstream into pixel data of video frames for display. The video decoder 2700 has several components or modules for decoding the bitstream 2795, including some components selected from an inverse quantization module 2711, an inverse transform module 2710, an intra-prediction module 2725, a motion compensation module 2730, an in-loop filter 2745, a decoded picture buffer 2750, a MV buffer 2765, a MV prediction module 2775, and a parser 2790. The motion compensation module 2730 is part of an inter-prediction module 2740. The intra-prediction module 2725 is part of a current picture prediction module 2720, which uses current picture reconstructed samples as reference samples for prediction of the current block.
[0262] In some embodiments, the modules 2710 –2790 are modules of software instructions being executed by one or more processing units (e.g., a processor) of a computing device. In some embodiments, the modules 2710 –2790 are modules of hardware circuits implemented by one or more ICs of an electronic apparatus. Though the modules 2710 –2790 are illustrated as being separate modules, some of the modules can be combined into a single module.
[0263] The parser 2790 (or entropy decoder) receives the bitstream 2795 and performs initial parsing according to the syntax defined by a video-coding or image-coding standard. The parsed syntax element includes various header elements, flags, as well as quantized data (or quantized coefficients) 2712. The parser 2790 parses out the various syntax elements by using entropy-coding techniques such as context-adaptive binary arithmetic coding (CABAC) or Huffman encoding.
[0264] The inverse quantization module 2711 de-quantizes the quantized data (or quantized coefficients) 2712 to obtain transform coefficients, and the inverse transform module 2710 performs inverse transform on the transform coefficients 2716 to produce reconstructed residual signal 2719. The reconstructed residual signal 2719 is added with predicted pixel data 2713 from the intra-prediction module 2725 or the motion compensation module 2730 to produce decoded pixel data 2717. The decoded pixels data are filtered by the in-loop filter 2745 and stored in the decoded picture buffer 2750. In some embodiments, the decoded picture buffer 2750 is a storage external to the video decoder 2700. In some embodiments, the decoded picture buffer 2750 is a storage internal to the video decoder 2700.
[0265] The intra-prediction module 2725 receives intra-prediction data from bitstream 2795 and according to which, produces the predicted pixel data 2713 from the decoded pixel data 2717 stored in the decoded picture buffer 2750. In some embodiments, the decoded pixel data 2717 is also stored in a line buffer 2727 (or intra prediction buffer) for intra-picture prediction and spatial MV prediction.
[0266] In some embodiments, the content of the decoded picture buffer 2750 is used for display. A display device 2705 either retrieves the content of the decoded picture buffer 2750 for display directly, or retrieves the content of the decoded picture buffer to a display buffer. In some embodiments, the display device receives pixel values from the decoded picture buffer 2750 through a pixel transport.
[0267] The motion compensation module 2730 produces predicted pixel data 2713 from the decoded pixel data 2717 stored in the decoded picture buffer 2750 according to motion compensation MVs (MC MVs) . These motion compensation MVs are decoded by adding the residual motion data received from the bitstream 2795 with predicted MVs received from the MV prediction module 2775.
[0268] The MV prediction module 2775 generates the predicted MVs based on reference MVs that were generated for decoding previous video frames, e.g., the motion compensation MVs that were used to perform motion compensation. The MV prediction module 2775 retrieves the reference MVs of previous video frames from the MV buffer 2765. The video decoder 2700 stores the motion compensation MVs generated for decoding the current video frame in the MV buffer 2765 as reference MVs for producing predicted MVs.
[0269] The in-loop filter 2745 performs filtering or smoothing operations on the decoded pixel data 2717 to reduce the artifacts of coding, particularly at boundaries of pixel blocks. In some embodiments, the filtering or smoothing operations performed by the in-loop filter 2745 include deblock filter (DBF) , sample adaptive offset (SAO) , and / or adaptive loop filter (ALF) . In some embodiments, luma mapping chroma scaling (LMCS) is performed before the loop filters.
[0270] FIG. 28 illustrates portions of the video decoder 2700 that implement cross-component prediction using temporal candidates with rescaled reference pictures. The luma component of the current block may be coded by intra-prediction (intra prediction module 2720) and generate a reconstruction 2815 for the luma component. A cross-component model 2810 is applied to the luma reconstruction 2815 to generate a cross-component predictor 2825 for a chroma component. The cross-component predictor 2825 is included in the predicted pixel data 2713.
[0271] The cross-component model 2810 may be generated by a model constructor 2805 based on samples (in and / or around the current block) retrieved from the decoded picture buffer 2750 and / or the line buffer 2727. Section I above describe several types of cross-component models that may be used as the cross-component model 2810.
[0272] The cross-component model 2810 may also be provided by a CCM selection module 2830, which selects a cross-component model (CCM) information or other cross-component prediction (CCP) information that are inherited from one of a plurality of candidates provided by a merge mode module 2820. These candidates may include spatial candidates, temporal candidates, historical candidates, default candidates, etc. CCM information is retrieved from a CCM storage 2835 by the merge mode module 2820 as candidates, such as spatial candidates, temporal candidates, or historical candidates. More specifically, for temporal candidates, CCM information of the temporal candidates are retrieved from the CCM storage 2835 by the Temporal Candidate Selection module 2850.
[0273] A temporal candidate selection module 2850 provides the temporal candidates to the merge mode module 2830. The temporal candidates refer to cross component models that correspond to different positions of a collocated picture. The temporal candidate selection module 2850 selects the collocated picture from a plurality of previous coded pictures based on a set of pre-defined rules. In some embodiments, the set of pre-defined rules are related to information comprising a reference index of a reference list (such as L0 [0] or L1 [0] ) , POC distance between the current picture and the previous coded picture, QP value of the previous coded picture, or a combination thereof.
[0274] As mentioned, some reference pictures may be rescaled pictures that differ with the current picture in picture size, scaling window offset, or a number of sub pictures. The temporal candidate selection module 2850 may use the RprConstraintsActiveFlag to identify which reference pictures are rescaled and to avoid selecting any of them as the collocated picture. The temporal candidate selection module 2850 may use the RprConstraintsActiveFlag to determine whether a picture is rescaled. In some embodiments, the temporal candidate selection module 2850 selects the collocated picture from the non-rescaled reference pictures using the set of pre-defined rules. In some embodiments, the temporal candidate selection module 2850 selects the non-rescaled reference picture with the lowest QP value or the smallest POC difference with the current block as the collocated picture. In some embodiments, the temporal candidate selection module 2850 do not avoid selecting a rescaled picture as the collocated picture. If a rescaled picture is selected as the collocated picture for temporal candidate selection, the positions of the CCMs in the collocated picture are scaled according to a scaling ratio that is derived based on a scaling window of the current picture and a corresponding scaling window of the collocated picture. In some embodiments, the temporal candidate selection module 2850 do not avoid selecting a rescaled picture as the collocated picture. But if a rescaled picture is selected as the collocated picture for temporal candidate selection, the temporal candidates are not provided to the merge mode module 2820.
[0275] In some embodiments, the positions of the temporal candidates are determined according to a motion vector of a neighboring block of the current block (by accessing the MV buffer 2765) , and the neighboring block is selected from a list of pre-defined positions according to a pre-defined checking order. In some embodiments, the pre-defined checking order corresponds to L0 motion vectors or L1 motion vectors being checked first. An example of the predefined order is L0B1 → L1B1 → L0A1 → L1A1 → L0B0 → L1B0 → L0A0 → L1A0 → L0B2 → L1B2. (L0B1 refers to a motion vector of a neighboring block at position B1 that locates a reference block in a L0 reference picture, etc. ) . In some embodiments, the motion vector associated with a non-rescaled reference picture first is selected.
[0276] A CCM storage 2835 stores CCM information and corresponding support data structures. The CCM storage 2835 represents (or is implemented by) any form of storage that is used to store CCM information which includes cross-component models generated by the model constructor 2805.
[0277] A CCM propagation module 2840 operates to propagate CCM information between blocks and / or between pictures. For a position or current block that does not have CCM information and / or CCP information, the CCM propagation module 2840 may follow the current block’s BV or MV to locate the CCM / CCP information of the reference block in a reference picture. The CCM propagation module 2840 may then propagate the CCM / CCP information by copying the CCM information of the reference block to the current block. In some embodiments, if the reference picture is rescaled, the CCM information of the reference block is not copied to the current block. In some embodiments, if the reference picture is rescaled, the position located by the MV of the current block is scaled according to a scaling ratio that is derived based on a scaling window of the current picture and a corresponding scaling window of the reference picture. The CCM information of the reference block located by the scaled position is copied to the current block. In some embodiments, the position located by the MV of the current block is constrained in a collocated CTU row of the current CTU row.
[0278] FIG. 29 conceptually illustrates a process 2900 for performing cross-component prediction using temporal candidates with rescaled reference pictures when decoding a block. In some embodiments, one or more processing units (e.g., a processor) of a computing device implementing the decoder 2700 performs the process 2900 by executing instructions stored in a computer readable medium. In some embodiments, an electronic apparatus implementing the decoder 2700 performs the process 2900.
[0279] The decoder receives (at block 2910) data to be decoded as a current block of pixels in a current picture. The decoder selects (at block 2920) a collocated picture from a plurality of previous coded pictures. The plurality of previous coded pictures may include at least one rescaled picture. The rescaled picture differs with the current picture in at least one of picture size, scaling window offset, and a number of sub-pictures.
[0280] In some embodiments, the collocated picture is selected based on quantization parameter (QP) values of the plurality of previous coded pictures (e.g., the picture with the smallest QP value is selected as the collocated picture. ) In some embodiments, the collocated picture is selected based on picture order counts (POCs) of the plurality of previous coded pictures (e.g., the picture with the smallest POC difference with the current picture is selected as the collocated picture. ) In some embodiments, a particular reference index for a reference picture list (e.g., L0 [0] or L1 [0] ) is used to select the collocated picture. In some embodiments, the rescaled picture is not selected as the collocated picture. In some embodiments, the collocated picture is selected based on a combination of rules, for example, the collocated picture may be selected out of un-rescaled pictures in the plurality of reference pictures based on picture order counts (POCs) and / or quantization parameter (QP) values. In some embodiments, the collocated picture is selected based on a combination of rules that do not consider if the reference picture is rescaled or not, and the selected collocated picture may be a rescaled picture.
[0281] The decoder inherits (at block 2930) a model associated with a position in the selected collocated picture. In some embodiments, when the selected collocated picture is rescaled, the model is not inherited for decoding the current block, or the position of the inherited model in the collocated picture is scaled according to a scaling ratio that is derived based on a scaling window of the current picture and a corresponding scaling window of the selected collocated picture. (The scaled position can be rounded toward negative infinity, toward positive infinity, toward zero, or to the nearest integer. )
[0282] In some embodiments, the position is determined according to a motion vector of a neighboring block of the current block, and the neighboring block is selected from a list of pre-defined positions according to a pre-defined checking order. In some embodiments, the pre-defined checking order corresponds to L0 motion vectors or L1 motion vectors being checked first. An example of the predefined order is L0B1 → L1B1 → L0A1 → L1A1 → L0B0 → L1B0 → L0A0 → L1A0 → L0B2 →L1B2. In some embodiments, the motion vector associated with a non-rescaled reference picture first is selected.
[0283] The model inherited by the encoder may be stored for a reference block associated with the position in the collocated picture. The model may be copied from a further reference block in a further reference picture located by the motion vector of the reference block. In some embodiments, when the further reference picture is rescaled, the model is not copied from the further reference block and not stored for the reference block. In some embodiments, when the further reference picture is rescaled, the position located by the motion vector of the reference block is scaled according to a scaling ration that is derived based on a scaling window of the reference picture and the further reference picture. The scaled position can be rounded toward negative infinity, toward positive infinity, toward zero, or to the nearest integer. The model of the further reference block, located by the scaled position, is copied and stored for the reference block. In some embodiments, the position in the further reference picture located by the motion vector of the reference block is constrained to be in a collocated CTU row of a CTU row in which the reference block is.
[0284] The decoder applies (at block 2940) the inherited model to a reconstruction of a first component of the current block to generate a prediction of a second component of the current block. The decoder reconstructs (at block 2950) the current block by using the prediction of the second component and a corresponding residual. The decoder may then provide the reconstructed current block for display as part of the reconstructed current picture.
[0285] VII. Example Electronic System
[0286] Many of the above-described features and applications are implemented as software processes that are specified as a set of instructions recorded on a computer readable storage medium (also referred to as computer readable medium) . When these instructions are executed by one or more computational or processing unit (s) (e.g., one or more processors, cores of processors, or other processing units) , they cause the processing unit (s) to perform the actions indicated in the instructions. Examples of computer readable media include, but are not limited to, CD-ROMs, flash drives, random-access memory (RAM) chips, hard drives, erasable programmable read only memories (EPROMs) , electrically erasable programmable read-only memories (EEPROMs) , etc. The computer readable media does not include carrier waves and electronic signals passing wirelessly or over wired connections.
[0287] In this specification, the term “software” is meant to include firmware residing in read-only memory or applications stored in magnetic storage which can be read into memory for processing by a processor. Also, in some embodiments, multiple software inventions can be implemented as sub-parts of a larger program while remaining distinct software inventions. In some embodiments, multiple software inventions can also be implemented as separate programs. Finally, any combination of separate programs that together implement a software invention described here is within the scope of the present disclosure. In some embodiments, the software programs, when installed to operate on one or more electronic systems, define one or more specific machine implementations that execute and perform the operations of the software programs.
[0288] FIG. 30 conceptually illustrates an electronic system 3000 with which some embodiments of the present disclosure are implemented. The electronic system 3000 may be a computer (e.g., a desktop computer, personal computer, tablet computer, etc. ) , phone, PDA, or any other sort of electronic device. Such an electronic system includes various types of computer readable media and interfaces for various other types of computer readable media. Electronic system 3000 includes a bus 3005, processing unit (s) 3010, a graphics-processing unit (GPU) 3015, a system memory 3020, a network 3025, a read-only memory 3030, a permanent storage device 3035, input devices 3040, and output devices 3045.
[0289] The bus 3005 collectively represents all system, peripheral, and chipset buses that communicatively connect the numerous internal devices of the electronic system 3000. For instance, the bus 3005 communicatively connects the processing unit (s) 3010 with the GPU 3015, the read-only memory 3030, the system memory 3020, and the permanent storage device 3035.
[0290] From these various memory units, the processing unit (s) 3010 retrieves instructions to execute and data to process in order to execute the processes of the present disclosure. The processing unit (s) may be a single processor or a multi-core processor in different embodiments. Some instructions are passed to and executed by the GPU 3015. The GPU 3015 can offload various computations or complement the image processing provided by the processing unit (s) 3010.
[0291] The read-only-memory (ROM) 3030 stores static data and instructions that are used by the processing unit (s) 3010 and other modules of the electronic system. The permanent storage device 3035, on the other hand, is a read-and-write memory device. This device is a non-volatile memory unit that stores instructions and data even when the electronic system 3000 is off. Some embodiments of the present disclosure use a mass-storage device (such as a magnetic or optical disk and its corresponding disk drive) as the permanent storage device 3035.
[0292] Other embodiments use a removable storage device (such as a floppy disk, flash memory device, etc., and its corresponding disk drive) as the permanent storage device. Like the permanent storage device 3035, the system memory 3020 is a read-and-write memory device. However, unlike storage device 3035, the system memory 3020 is a volatile read-and-write memory, such a random access memory. The system memory 3020 stores some of the instructions and data that the processor uses at runtime. In some embodiments, processes in accordance with the present disclosure are stored in the system memory 3020, the permanent storage device 3035, and / or the read-only memory 3030. For example, the various memory units include instructions for processing multimedia clips in accordance with some embodiments. From these various memory units, the processing unit (s) 3010 retrieves instructions to execute and data to process in order to execute the processes of some embodiments.
[0293] The bus 3005 also connects to the input and output devices 3040 and 3045. The input devices 3040 enable the user to communicate information and select commands to the electronic system. The input devices 3040 include alphanumeric keyboards and pointing devices (also called “cursor control devices” ) , cameras (e.g., webcams) , microphones or similar devices for receiving voice commands, etc. The output devices 3045 display images generated by the electronic system or otherwise output data. The output devices 3045 include printers and display devices, such as cathode ray tubes (CRT) or liquid crystal displays (LCD) , as well as speakers or similar audio output devices. Some embodiments include devices such as a touchscreen that function as both input and output devices.
[0294] Finally, as shown in FIG. 30, bus 3005 also couples electronic system 3000 to a network 3025 through a network adapter (not shown) . In this manner, the computer can be a part of a network of computers (such as a local area network ( “LAN” ) , a wide area network ( “WAN” ) , or an Intranet, or a network of networks, such as the Internet. Any or all components of electronic system 3000 may be used in conjunction with the present disclosure.
[0295] Some embodiments include electronic components, such as microprocessors, storage and memory that store computer program instructions in a machine-readable or computer-readable medium (alternatively referred to as computer-readable storage media, machine-readable media, or machine-readable storage media) . Some examples of such computer-readable media include RAM, ROM, read-only compact discs (CD-ROM) , recordable compact discs (CD-R) , rewritable compact discs (CD-RW) , read-only digital versatile discs (e.g., DVD-ROM, dual-layer DVD-ROM) , a variety of recordable / rewritable DVDs (e.g., DVD-RAM, DVD-RW, DVD+RW, etc. ) , flash memory (e.g., SD cards, mini-SD cards, micro-SD cards, etc. ) , magnetic and / or solid state hard drives, read-only and recordable discs, ultra-density optical discs, any other optical or magnetic media, and floppy disks. The computer-readable media may store a computer program that is executable by at least one processing unit and includes sets of instructions for performing various operations. Examples of computer programs or computer code include machine code, such as is produced by a compiler, and files including higher-level code that are executed by a computer, an electronic component, or a microprocessor using an interpreter.
[0296] While the above discussion primarily refers to microprocessor or multi-core processors that execute software, many of the above-described features and applications are performed by one or more integrated circuits, such as application specific integrated circuits (ASICs) or field programmable gate arrays (FPGAs) . In some embodiments, such integrated circuits execute instructions that are stored on the circuit itself. In addition, some embodiments execute software stored in programmable logic devices (PLDs) , ROM, or RAM devices.
[0297] As used in this specification and any claims of this application, the terms “computer” , “server” , “processor” , and “memory” all refer to electronic or other technological devices. These terms exclude people or groups of people. For the purposes of the specification, the terms display or displaying means displaying on an electronic device. As used in this specification and any claims of this application, the terms “computer readable medium, ” “computer readable media, ” and “machine readable medium” are entirely restricted to tangible, physical objects that store information in a form that is readable by a computer. These terms exclude any wireless signals, wired download signals, and any other ephemeral signals.
[0298] While the present disclosure has been described with reference to numerous specific details, one of ordinary skill in the art will recognize that the present disclosure can be embodied in other specific forms without departing from the spirit of the present disclosure. In addition, a number of the figures (including FIG. 26 and FIG. 29) conceptually illustrate processes. The specific operations of these processes may not be performed in the exact order shown and described. The specific operations may not be performed in one continuous series of operations, and different specific operations may be performed in different embodiments. Furthermore, the process could be implemented using several sub-processes, or as part of a larger macro process. Thus, one of ordinary skill in the art would understand that the present disclosure is not to be limited by the foregoing illustrative details, but rather is to be defined by the appended claims.
[0299] Additional Notes
[0300] The herein-described subject matter sometimes illustrates different components contained within, or connected with, different other components. It is to be understood that such depicted architectures are merely examples, and that in fact many other architectures can be implemented which achieve the same functionality. In a conceptual sense, any arrangement of components to achieve the same functionality is effectively "associated" such that the desired functionality is achieved. Hence, any two components herein combined to achieve a particular functionality can be seen as "associated with" each other such that the desired functionality is achieved, irrespective of architectures or intermediate components. Likewise, any two components so associated can also be viewed as being "operably connected" , or "operably coupled" , to each other to achieve the desired functionality, and any two components capable of being so associated can also be viewed as being "operably couplable" , to each other to achieve the desired functionality. Specific examples of operably couplable include but are not limited to physically mateable and / or physically interacting components and / or wirelessly interactable and / or wirelessly interacting components and / or logically interacting and / or logically interactable components.
[0301] Further, with respect to the use of substantially any plural and / or singular terms herein, those having skill in the art can translate from the plural to the singular and / or from the singular to the plural as is appropriate to the context and / or application. The various singular / plural permutations may be expressly set forth herein for sake of clarity.
[0302] Moreover, it will be understood by those skilled in the art that, in general, terms used herein, and especially in the appended claims, e.g., bodies of the appended claims, are generally intended as “open” terms, e.g., the term “including” should be interpreted as “including but not limited to, ” the term “having” should be interpreted as “having at least, ” the term “includes” should be interpreted as “includes but is not limited to, ” etc. It will be further understood by those within the art that if a specific number of an introduced claim recitation is intended, such an intent will be explicitly recited in the claim, and in the absence of such recitation no such intent is present. For example, as an aid to understanding, the following appended claims may contain usage of the introductory phrases "at least one" and "one or more" to introduce claim recitations. However, the use of such phrases should not be construed to imply that the introduction of a claim recitation by the indefinite articles "a" or "an" limits any particular claim containing such introduced claim recitation to implementations containing only one such recitation, even when the same claim includes the introductory phrases "one or more" or "at least one" and indefinite articles such as "a" or "an, " e.g., “a” and / or “an” should be interpreted to mean “at least one” or “one or more; ” the same holds true for the use of definite articles used to introduce claim recitations. In addition, even if a specific number of an introduced claim recitation is explicitly recited, those skilled in the art will recognize that such recitation should be interpreted to mean at least the recited number, e.g., the bare recitation of "two recitations, " without other modifiers, means at least two recitations, or two or more recitations. Furthermore, in those instances where a convention analogous to “at least one of A, B, and C, etc. ” is used, in general such a construction is intended in the sense one having skill in the art would understand the convention, e.g., “a system having at least one of A, B, and C” would include but not be limited to systems that have A alone, B alone, C alone, A and B together, A and C together, B and C together, and / or A, B, and C together, etc. In those instances where a convention analogous to “at least one of A, B, or C, etc. ” is used, in general such a construction is intended in the sense one having skill in the art would understand the convention, e.g., “a system having at least one of A, B, or C” would include but not be limited to systems that have A alone, B alone, C alone, A and B together, A and C together, B and C together, and / or A, B, and C together, etc. It will be further understood by those within the art that virtually any disjunctive word and / or phrase presenting two or more alternative terms, whether in the description, claims, or drawings, should be understood to contemplate the possibilities of including one of the terms, either of the terms, or both terms. For example, the phrase “A or B” will be understood to include the possibilities of “A” or “B” or “A and B. ”
[0303] From the foregoing, it will be appreciated that various implementations of the present disclosure have been described herein for purposes of illustration, and that various modifications may be made without departing from the scope and spirit of the present disclosure. Accordingly, the various implementations disclosed herein are not intended to be limiting, with the true scope and spirit being indicated by the following claims.
Claims
1.A video coding method comprising:receiving data to be encoded or decoded as a current block of pixels of a current picture of a video;selecting a collocated picture from a plurality of previous coded pictures that comprise at least one rescaled picture;inheriting a model associated with a position in the selected collocated picture;applying the inherited model to a reconstruction of a first component of the current block to generate a prediction of a second component of the current block; andencoding or decoding the current block based on the prediction of the second component.2.The video coding method of claim 1, wherein the rescaled picture differs with the current picture in at least one of picture size, scaling window offset, and a number of sub pictures.3.The video coding method of claim 1, wherein the rescaled picture is not selected as the collocated picture.4.The video coding method of claim 1, wherein the collocated picture is selected out of un-rescaled pictures in the plurality of reference pictures based on picture order counts (POCs) , quantization parameter (QP) values, a particular reference index for a reference picture list, or a combination thereof.5.The video coding method of claim 1, wherein the position is determined according to a motion vector of a neighboring block, and the neighboring block is selected from a list of pre-defined positions.6.The video coding method of claim 5, wherein the neighboring block is selected from the list of pre-defined positions according to a pre-defined checking order.7.The video coding method of claim 6, wherein the pre-defined checking order corresponds to L0 motion vectors or L1 motion vectors being checked first, and a target motion vector associated with a non-scaled reference picture first is selected.8.The video coding method of claim 1, wherein the model and the position in the selected collocated picture are associated with a reference block, the model is copied from a further position in a further reference picture located by a motion vector of the reference block, and the model is stored for the reference block.9.The video coding method of claim 8, wherein the further reference picture is rescaled, the model is not stored for the reference block.10.The video coding method of claim 8, wherein the further reference picture is rescaled, the further position located by the motion vector of the reference block is scaled according to a scaling ratio that is derived based on a scaling window of the selected collocated picture and a corresponding scaling window of the further reference picture.11.The video coding method of claim 8, wherein a further position in the further reference picture located by the motion vector of the reference block is constrained to be in a collocated CTU row of a CTU row in which the reference block is located.12.The video coding method of claim 1, wherein when the selected collocated picture is rescaled, the model is not inherited for encoding or decoding the current block.13.The video coding method of claim 1, wherein when the selected collocated picture is rescaled, the position of the inherited model in the collocated picture is scaled according to a scaling ratio that is derived based on a scaling window of the current picture and a corresponding scaling window of the selected collocated picture.14.An electronic apparatus comprising:a video coder circuit configured to perform operations comprising:receiving data to be encoded or decoded as a current block of pixels of a current picture of a video;selecting a collocated picture from a plurality of previous coded pictures that comprise at least one rescaled picture;inheriting a model associated with a position in the selected collocated picture;applying the inherited model to a reconstruction of a first component of the current block to generate a prediction of a second component of the current block; andencoding or decoding the current block based on the prediction of the second component.15.A video decoding method comprising:receiving data to be decoded as a current block of pixels of a current picture of a video;selecting a collocated picture from a plurality of previous coded pictures that comprise at least one rescaled picture;inheriting a model associated with a position in the selected collocated picture;applying the inherited model to a reconstruction of a first component of the current block to generate a prediction of a second component of the current block; andreconstructing the current block based on the prediction of the second component.
Citation Information
Patent Citations
History-based motion vector prediction with default parameters
US20220086484A1
Video encoding and decoding using reference picture resampling
WO2023072554A1
Method and apparatus of cross-component linear model prediction with refined parameters in video coding system
WO2023138627A1