Regression-based blending for improving intra prediction with neighboring template

Regression-based blending of intra-predictions using template regions addresses the challenge of predicting pixel blocks in VVC, enhancing compression and decoding efficiency by minimizing sample differences.

WO2025148956A1PCT designated stage expired Publication Date: 2025-07-17MEDIATEK INC
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/071414
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-01-09
Filing Date
2025-01-09
Publication Date
2025-07-17

AI Technical Summary

Technical Problem

Existing video coding technologies face challenges in accurately predicting pixel blocks due to the complexity of natural video edges and the need for efficient intra-prediction methods, particularly in versatile video coding (VVC), which can lead to suboptimal compression and decoding performance.

Method used

Implementing regression-based blending of multiple intra-predictions using a template region and a reference sample region to derive a weight factor for blending, incorporating methods like position-dependent intra prediction (PDPC), template-based intra mode derivation (TIMD), and decoder-side intra mode derivation (DIMD), to enhance intra-prediction accuracy.

Benefits of technology

Improves the accuracy and efficiency of intra-prediction by minimizing differences between reconstructed and predicted samples, leading to better compression and decoding performance in video coding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025071414_17072025_PF_FP_ABST
    Figure CN2025071414_17072025_PF_FP_ABST
Patent Text Reader

Abstract

A method of coding a current block of a current picture of a video by regression-based blending of multiple intra-predictions is provided. A video coder generates two or more intra-predictions of the current block by applying an intra-prediction coding tool. The video coder derives a weight factor for blending the two or more intra-predictions for the current block. The weighting factor is derived by regression of samples from a template region of the current block and from a reference sample region of the template region to minimize a difference between (i) reconstructed samples of the template region and (ii) predicted samples of the template region generated by applying the intra-prediction coding tool to samples of the reference sample region. The video coder blends the two or more generated intra-predictions according to the derived weighting factor. The video coder encodes or decodes the current block by using the blended prediction.
Need to check novelty before this filing date? Find Prior Art

Description

REGRESSION-BASED BLENDING FOR IMPROVING INTRA PREDICTION WITH NEIGHBORING TEMPLATECROSS REFERENCE TO RELATED PATENT APPLICATION (S)The present disclosure is part of a non-provisional application that claims the priority benefit of U.S. Provisional Patent Application No. 63 / 618,933, filed on 9 January 2024. Content of above-listed applications is herein incorporated by reference.TECHNICAL FIELDThe present disclosure relates generally to video coding. In particular, the present disclosure relates to methods of coding pixel blocks by intra-prediction, specifically by using regression-based blending.BACKGROUNDUnless 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.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) .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.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.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.SUMMARYThe 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.Some embodiments of the disclosure provide a method of coding a current block of a current picture of a video by regression-based blending of multiple intra-predictions. A video coder generates two or more intra-predictions of the current block by applying an intra-prediction coding tool. The video coder derives a weight factor for blending the two or more intra-predictions for the current block. The weighting factor is derived by regression of samples from a template region of the current block and from a reference sample region of the template region. The video coder blends the two or more generated intra-predictions according to the derived weighting factor. The video coder encodes or decodes the current block by using the blended prediction.The intra-prediction coding tool may be position dependent intra prediction (PDPC) , such that the two or more intra-predictions are two corresponding reference samples identified by an intra-prediction angular mode. The intra-prediction coding tool may be template-based intra mode derivation (TIMD) , such that the two or more intra-prediction are generated according to two or more intra-prediction modes identified by a TIMD process of the current block. The intra-prediction coding tool may be decoder side intra mode derivation (DIMD) , such that the two or more intra-prediction are generated according to two or more intra-prediction modes identified by a DIMD process of the current block. The two or more intra-predictions may also refer to horizontal planar prediction and vertical planar prediction.The samples for the regression for the horizontal planar prediction may be from a template region that is above the current block and a reference sample region that is left of the template region. The samples for the regression for the vertical planar prediction may be from a template region that is left of the current block and a reference sample region that is above the template region.The regression may be to minimize a difference between (i) reconstructed samples of the template region and (ii) predicted samples of the template region generated by applying the intra-prediction coding tool to samples of the reference sample region with intra-prediction blending. In some embodiments, the regression is used to determine in a set of model parameters, and the weighting factor is computed by applying the set of model parameters to spatial coordinates of the most left-top position inside the current block. In some embodiments, the regression may be used to determine multiple sets of model parameters based on sample that are classified into two or more regions by threshold value or classification conditions. The threshold value can be determined by the average, median, average of the maximum and minimum of the prediction values inside the template region or the reference samples of template.In some embodiments, the reference sample region comprises multiple neighboring L-shape reference lines, and the L-shape reference line most far from the current block is used to provide the reference sample to derive the prediction of template region.BRIEF DESCRIPTION OF THE DRAWINGSThe 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.FIG. 1 illustrates 67 intra predictions modes, including 65 directional or angular intra prediction modes (from 2 to 66) .FIGS. 2A-D illustrate corresponding reference samples for PDPC applied over various angular intra-prediction modes.FIG. 3 illustrates using template-based intra mode derivation (TIMD) to implicitly derive an intra prediction mode for a current block.FIG. 4 illustrates a reference area that is used to derive filter coefficients for a convolution model for a current block.FIG. 5 shows the neighboring template used in training the model for PDPC with regression-based blending.FIGS. 6A-B show the templates used in training model for horizontal planar prediction and vertical planar prediction.FIG. 7 illustrates an example video encoder that may implement regression-based blending of intra-predictions.FIG. 8 illustrates portions of the video encoder that implement regression-based intra-prediction blending.FIG. 9 conceptually illustrates a process for encoding a pixel block by regression-based blending of intra-predictions.FIG. 10 illustrates an example video decoder that may implement regression-based blending of intra-predictions.FIG. 11 illustrates portions of the video decoder that implement regression-based intra-prediction blending.FIG. 12 conceptually illustrates a process for decoding a pixel block by regression-based blending of intra-predictions.FIG. 13 conceptually illustrates an electronic system with which some embodiments of the present disclosure are implemented.DETAILED DESCRIPTIONIn 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.I. Intra PredictionA. Intra mode coding with 67 intra prediction modesTo capture the arbitrary edge directions presented in natural video, the number of directional intra modes in VVC is extended from 33, as used in HEVC, to 65. The planar and DC modes remain the same. These denser directional intra prediction modes apply for all block sizes and for both luma and chroma intra predictions. FIG. 1 illustrates 67 intra predictions modes, including 65 directional or angular intra prediction modes (from 2 to 66) .In VVC, several conventional angular intra prediction modes are adaptively replaced with wide-angle intra prediction modes for the non-square blocks. In HEVC, every intra-coded block has a square shape and the length of each of its side is a power of 2. Thus, no division operations are required to generate an intra-predictor using DC mode. In VVC, blocks can have a rectangular shape that necessitates the use of a division operation per block in the general case. To avoid division operations for DC prediction, only the longer side is used to compute the average for non-square blocks.B. Position Dependent Intra Prediction Combination (PDPC)In VVC, the results of intra prediction of DC, planar and several angular modes may be further modified by a position dependent intra prediction combination (PDPC) method. PDPC is an intra prediction method which invokes a combination of the boundary reference samples and HEVC style intra prediction with filtered boundary reference samples. PDPC may be applied to the following intra modes without signaling: planar, DC, intra angles less than or equal to horizontal, and intra angles greater than or equal to vertical and less than or equal to 80. If the current block is Bdpcm mode or multi-reference line (MRL) index is larger than 0, PDPC is not applied.The prediction sample pred (x’ , y’ ) is predicted using an intra prediction mode (DC, planar, angular) and a linear combination of reference samples according to the following:pred (x’ , y’ ) = Clip (0, (1<<BitDepth) –1, (wL×R-1, y’ + wT×Rx’ , -1 + (64-wL-wT) × pred (x’ , y’ ) + 32) >>6)where Rx, -1, R-1, y represent the corresponding reference samples (which can be taken as predictions) located at the top and left boundaries of current sample (x, y) , respectively by an intra-prediction angular mode. wL and wT are weighting factors. The pred (x’ , y’ ) at the right side of the equation is the value of the prediction sample generated by the equation, and pred (x’ , y’ ) at the left side of the equation is its modified value.If PDPC is applied to DC, planar, horizontal, and vertical intra modes, additional boundary filters are not needed, as required in the case of HEVC DC mode boundary filter or horizontal / vertical mode edge filters. PDPC process for DC and Planar modes is identical. For angular intra prediction modes, if the current angular mode is HOR_IDX or VER_IDX, left or top reference samples is not used, respectively. The PDPC weights and scale factors are dependent on prediction modes and the block sizes. PDPC is applied to the block with both width and height greater than or equal to 4.FIGS. 2A-D illustrate corresponding reference samples (Rx, -1 and R-1, y) for PDPC applied over various angular intra-prediction modes. FIG. 2A shows the reference samples for diagonal top-right mode. FIG. 2B shows the reference samples for diagonal bottom-left mode. FIG. 2C shows the reference samples for adjacent diagonal top-right mode. FIG. 2D shows the reference samples for adjacent diagonal bottom-left mode.The prediction sample pred (x’ , y’ ) is located at (x’ , y’ ) within the prediction block. As an example, the coordinate x of the reference sample Rx, -1 is given by: x = x’ + y’ + 1, and the coordinate y of the reference sample R-1, y is similarly given by: y = x’ + y’ + 1 for the diagonal modes. For the other angular mode, the reference samples Rx, -1 and R-1, y can be located in fractional sample position. In this case, the sample value of the nearest integer sample location is used.C. Template-based Intra Mode Derivation (TIMD)For intra prediction mode selection, template matching method can be applied by computing the cost between reconstructed samples and predicting samples on the template. One of the examples is template-based intra mode derivation (TIMD) . TIMD is a coding method in which the intra prediction mode of a CU is implicitly derived by using a neighboring template at both encoder and decoder, instead of the encoder signaling the exact intra prediction mode to the decoder.FIG. 3 illustrates using template-based intra mode derivation (TIMD) to implicitly derive an intra prediction mode for a current block 300. As illustrated, the neighboring pixels of the current block 300 is used as template 310. For each candidate intra prediction mode, prediction samples of the template 310 are generated using the reference samples, which are in a L-shape reference region 320 above and left of the template 310. A TM cost for a candidate intra prediction mode is calculated based on a difference (e.g., SATD) between reconstructed samples of the template and the prediction samples of the template generated by the candidate intra prediction mode. The candidate intra prediction mode with the minimum cost is selected (as the TIMD mode similar to the implicit mode derivation in the DIMD mode) and used for intra prediction of the CU. The candidate intra prediction modes may include 67 intra prediction modes (as in VVC) or extended to 131 intra prediction modes. MPMs may be used to indicate the directional information of a CU. Thus, to reduce the intra mode search space and utilize the characteristics of a CU, the intra prediction mode is implicitly derived from the MPM list.In some embodiments, for each intra prediction mode in the MPM list, the SATD between the prediction and reconstructed samples of the template is calculated as the TM cost of the intra prediction mode. First two intra prediction modes with the minimum SATD are selected as the TIMD modes. These two TIMD modes are fused with the weights after applying PDPC process, and such weighted intra prediction is used to code the current CU. Position dependent intra prediction combination (PDPC) is included in the derivation of the TIMD modes.The costs of two selected intra prediction modes (mode1 and mode2) are compared with a threshold, for example, the cost factor of 2 is applied as follows:costMode2 < 2*costMode1If this condition is true, the prediction fusion is applied, otherwise only mode1 is used. Weights of the modes are computed from their SATD costs as follows:weight1 = costMode2 /  (costMode1+ costMode2)weight2 = 1 -weight1D. Decoder Side Intra Mode Derivation (DIMD)When DIMD is applied, up to five intra modes may be derived from the reconstructed neighbor samples, and those five predictors are combined with the planar mode predictor with the weights derived from the histogram of gradients. The division operations in weight derivation may be performed utilizing the same lookup table (LUT) . For example, the division operation in the orientation (Orient) calculation:Orient = Gy  / Gx is computed by the following LUT-based scheme:x = Floor (Log2 (Gx) )normDiff = ( (Gx<< 4) >> x) &15x += (3 + (normDiff ! = 0) ? 1: 0)Orient = (Gy* (DivSigTable [normDiff ] | 8) + (1<< (x-1) ) ) >> xwhere DivSigTable

[0016] = {0, 7, 6, 5 , 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0 } . For a block of size W×H, the weight for each of the five derived modes is modified if the one the above or left histogram magnitudes is twice larger than the other one. In this case, the weights are location dependent and computed as follows:If the above histogram is twice the left, then:If the left histogram is twice the above, then:where wDimdi is the unmodified uniform weight of the DIMD, Δi is pre-defined and set to 10.Derived intra modes are included into the primary list of intra most probable modes (MPM) , so the DIMD process is performed before the MPM list is constructed. The primary derived intra mode of a DIMD block is stored with a block and is used for MPM list construction of the neighboring blocks.Note the region of neighboring reconstructed samples used for computing the histogram of gradients may be modified depending on reconstructed samples availability. The region of decoded reference samples of current WxH luma CB is extended towards the above-right side if available, up to W additional columns. It is extended towards the bottom-left side if available, up to H additional rows.E. Intra Prediction FusionThe intra prediction fusion method derives predicted samples as a weighted combination of multiple predictors generated from different reference lines. In this process multiple intra predictors are generated and then fused by weighted averaging. The process of deriving the predictors to be used in the fusion process is described as follows:(1) For angular intra prediction modes including the single mode case of TIMD and DIMD, the intra prediction fusion method derives intra prediction by weighting intra predictions obtained from multiple reference lines represented as pfusion=w0pline+w1pline+1, where pline is the intra prediction from the default reference line and pline+1 is the prediction from the line above the default reference line. The weights are set as w0=3 / 4 and w1=1 / 4.(2) For TIMD mode with blending, pline is used for the first mode (w0=1, w1=0) and pline+1 is used for the second mode (w0=0, w1=1) .(3) For DIMD mode with blending, the number of predictors selected for a weighted average is increased from 3 to 6.Intra prediction fusion may be applied to luma blocks when angular intra mode has non-integer slope (required reference samples interpolation) and the block size is greater than 16, it is used with MRL and not applied for ISP coded blocks. PDPC may be applied to the intra prediction mode using the closest to the current block reference line.II. Convolutional Cross-Component Model (CCCM)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. 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   (9)Thus, for 10-bit content the non-linear term P is calculated as:P = (C*C + 512) >> 10The bias term (denoted as B) represents a scalar offset between the input and output Mand 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 (10)The filter coefficients ci are calculated by minimizing MSE between the reconstructed (or target) chroma samples in a reference area and their corresponding predicted chroma samples. Each predicted chroma sample is generated from a collocated luma sample and its surrounding luma samples using a derived component prediction model such as Eq. (10) . Eq. (10) is a convolution model based on taps for the center sample and four surrounding samples (C, N, S, E, W) . More generally, eq. (10) can be expanded to include taps for the center sample and 8 surrounding samples (C, N, S, E, W, NE, NW, SE, SW. ) Eq. (10) and its expanded form can more generally be referred to as a component prediction model (as it can be used for cross-component prediction or intra-component prediction) .FIG. 4 illustrates a reference area that is used to derive filter coefficients for a convolution model for a current block. The reference area includes (reference) lines of (chroma) samples above and left of the current block 400. (The current block 400 is a PU in this example) . The reference area extends one PU width to the right and one PU height below the PU boundaries. The reference area may be adjusted to include only available samples. An extension area to the reference area is used to support the “side samples” of the plus shaped spatial filter (e.g., N, E, W, S samples, and in addition, NW, NE, SW, SE samples) and are padded when in unavailable areas.The MSE minimization may be performed by calculating an autocorrelation matrix for the luma input and a cross-correlation vector between the luma input and chroma output. The autocorrelation matrix is LDL decomposed and the final filter coefficients are calculated using back-substitution. The process is similar to the calculation of the ALF filter coefficients in ECM, however, in some embodiments, LDL decomposition was chosen instead of Cholesky decomposition to avoid using square root operations.III. Regression-Based BlendingSeveral methods are proposed to improve the luma / chroma intra coding prediction accuracy or coding performance. In one embodiment, whether to allow or apply the following proposed methods can depend on SPS / PPS / SH / PH syntax, or CTU or CU / PU / TU level syntax or semantic. In another embodiment, whether to allow or apply the following proposed methods can also depend on implicit conditions. For example, the following proposed methods can be applied based on block width, block height, or block area. In another embodiment, the following proposed improvements of regression-based blending can be conditionally applied to partial positions / sub-block of the current block. In another embodiment, the term “block” in this invention can refer to TU / TB, CU / CB, PU / PB, pre-defined region, or CTU / CTB. Any combination of the following proposed methods in this invention can be applied.A. Regression-based GPM blendingRegression-based GPM blending mode is designed as an additional GPM implicit mode, where the two integer blending matrices (W0 and W1) are derived from the template (e.g., 1 line above, 1 column left) . The blending matrices are modelled as an affine linear function of the sample positions (x, y) in the current CU:W0 (x, y) = a·x + b·y + c and W1 (x, y) = 1 -W0 (x, y)The parameters (a, b, c) are derived from the reference template using the same solver (MSE minimization) as the one used for deriving CCCM parameters. A list of pair of candidates is built from the regular GPM candidates and re-ordered with the template cost.The GPM implicit mode is signaled by a CU-level flag (gpm_implicit_flag) . If gpm_implicit_flag is true, a merge-idx is coded to signal the pair of GPM candidates to be used. If gpm_implicit_flag is false, the regular GPM syntax elements are signaled.B. PDPC with regression-based blendingWhen applying position dependent intra prediction combination (PDPC) process, the PDPC weightings (e.g., wL, and wT) can be derived by using convolutional model (e.g., model parameter is derived using the solver for CCCM) . In some embodiments, wL is defined as (a1·x + b1·y + c1) , wT is defined as (a2·x + b2·y + c2) , where x and y are spatial coordinates corresponding to the most left-top position inside the current block, and ai, bj, ck are model parameters. The prediction applying PDPC with regression-based blending can be formulated as:pred (x’ , y’ ) = Clip (0, (1 << BitDepth) –1, ( (a1·x + b1·y + c1) ×R-1, y + (64 - (a1·x + b1·y + c1) ) ×pred (x’ , y’ ) + 32) >>6)for vertical intra prediction modes (e.g., intra prediction mode number ≥ 50 or intra prediction mode number ≥ 34) , and / orpred (x’ , y’ ) = Clip (0, (1 << BitDepth) –1, ( (a2·x + b2·y + c2) ×Rx, -1 + (64 - (a2·x + b2·y + c2) ) ×pred (x’ , y’ ) + 32) >>6)for horizontal intra prediction modes (e.g., intra prediction mode number ≤ 17 or intra prediction mode number < 34) .Or, the prediction applying PDPC with regression-based blending can be formulated as:pred (x’ , y’ ) = Clip (0, (1 << BitDepth) –1, (a1·x + b1·y + c1) ×R-1, y + (a4·x + b4·y + c4) ×pred (x’ , y’ ) + c5× (1 << (BitDepth –1) ) )for vertical intra prediction modes (e.g., intra prediction mode number ≥ 50 or intra prediction mode number ≥ 34) , and / orpred (x’ , y’ ) = Clip (0, (1 << BitDepth) –1, (a2·x + b2·y + c2) ×Rx, -1 + (a4·x + b4·y + c4) ×pred (x’ , y’ ) + c5× (1<< (BitDepth –1) ) )for horizontal intra prediction modes (e.g., intra prediction mode number ≤ 17 or intra prediction mode number < 34) .In some embodiments, the neighboring top-left reconstruction sample (i.e., R-1, -1) can also be used in refining the current intra prediction if the top-left reconstruction sample is available or allowed to be used. The weighting of R-1, -1 is defined as wTL = a3·x + b3·y + c3) . The prediction applying PDPC with regression-based blending can be formulated as:pred (x’ , y’ ) = Clip (0, (1 << BitDepth ) –1, ( (a1·x + b1·y + c1) ×R-1, y + (a3·x + b3·y + c3) ×R-1, -1 + (64 - (a1·x + b1·y + c1) - (a3·x + b3·y + c3) ) ×pred (x’ , y’ ) + 32 ) >>6)for vertical intra prediction modes (e.g., intra prediction mode number ≥ 50 or intra prediction mode number ≥ 34) , and / orpred (x’ , y’ ) = Clip (0, (1 << BitDepth ) –1, ( (a2·x + b2·y + c2) ×Rx, -1 + (a3·x + b3·y + c3) ×R-1, -1 + (64 - (a2·x + b2·y + c2) - (a3·x + b3·y + c3) ) ×pred (x’ , y’ ) + 32 ) >>6)for horizontal intra prediction modes (e.g., intra prediction mode number ≤ 17 or intra prediction mode number < 34) .Or, the prediction applying PDPC with regression-based blending can be formulated as:pred (x’ , y’ ) = Clip (0, (1 << BitDepth ) –1, (a1·x + b1·y + c1) ×R-1, y + (a3·x + b3·y + c3) ×R-1, -1 + (a4·x + b4·y + c4) ×pred (x’ , y’ ) + c5× (1 << (BitDepth –1) ) )for vertical intra prediction modes (e.g., intra prediction mode number ≥ 50 or intra prediction mode number ≥ 34) , and / orpred (x’ , y’ ) = Clip (0, (1 << BitDepth ) –1, (a2·x + b2·y + c2) ×Rx, -1 + (a3·x + b3·y + c3) ×R-1, -1 + (a4·x + b4·y + c4) ×pred (x’ , y’ ) + c5× (1 << (BitDepth –1) ) )for horizontal intra prediction modes (e.g., intra prediction mode number ≤ 17 or intra prediction mode number < 34) .When deriving model parameters for PDPC with regression-based blending, the neighboring template is used. FIG. 5 shows the neighboring template used in training the model for PDPC with regression-based blending. The figure illustrates a template region 510 and the reference samples in a reference sample region 520 used to derive a prediction for the template region. The reference sample region 520 be one reference line selected from multiple reference lines (MRL) .In some embodiments, if the current intra prediction mode is a vertical intra prediction mode (e.g., intra prediction mode number ≥ 50 or intra prediction mode number ≥ 34) , when performing model training or deriving model parameters, the model inputs are the reference samples of the left-side template (e.g., T-1, -1, T-1, y at the left-side of reference sample region 520 in FIG. 5) , and the intra angular prediction samples (e.g., prediction at Tx’ , y’ ) . The training target or objective function is to minimize the distortion between the output prediction and the reconstruction inside the template region, that is:minimize (J (recT (x’ , y’ ) –predT (x’ , y’ ) ) ) → minimize (J (recT (x’ , y’ ) – ( (a1·x + b1·y + c1) ×T-1, y + (a3·x + b3·y + c3) ×T-1, -1 + (64 - (a1·x + b1·y + c1) - (a3·x + b3·y + c3) ) ×predT (x’ , y’ ) + 32 ) >>6) ) )Or, minimize (J (recT (x’ , y’ ) – ( (a1·x + b1·y + c1) ×T-1, y + (a3·x + b3·y + c3) ×T-1, -1 + (a4·x + b4·y + c4) ×predT (x’ , y’ ) + c5× (1 << (BitDepth –1) ) ) )Similarly, suppose the current intra prediction mode is a horizontal intra prediction mode (e.g., intra prediction mode number ≤ 17 or intra prediction mode number < 34) , when doing model training or deriving model parameters, the model inputs are the reference samples of the above-side template (e.g., T-1, -1, Tx, -1 at the above-side of reference sample region 520 in FIG. 5) , and the intra angular prediction samples (e.g., prediction at Tx’ , y’ ) . The training target or objective function is to minimize the distortion between the output prediction and the reconstruction inside the template region, that is,minimize (J (recT (x’ , y’ ) –predT (x’ , y’ ) ) ) → minimize (J (recT (x’ , y’ ) – ( (a2·x + b2·y + c2) ×Tx, -1 + (a3·x + b3·y + c3) ×T-1, -1 + (64 - (a2·x + b2·y + c2) - (a3·x + b3·y + c3) ) ×pred (x’ , y’ ) + 32 ) >>6) ) )Or, minimize (J (recT (x’ , y’ ) – ( (a2·x + b2·y + c2) ×Tx, -1 + (a3·x + b3·y + c3) ×T-1, -1 + (a4·x + b4·y + c4) ×predT (x’ , y’ ) + c5× (1 << (BitDepth –1) ) ) )recT (x’ , y’ ) and pred (x’ , y’ ) are the reconstruction and the intra angular prediction samples at position (x’ , y’ ) inside the template region. T-1, -1 are the reference samples of the neighboring top-left position of the template region. T-1, y is a reference sample of a neighboring left position at (-1, y) of the template region. Tx, -1 is a reference sample of a neighboring top position at (x, -1) of the template region.J (. ) is the cost function to measure the distortion between the output prediction and the reconstruction inside the template region, and sum of absolute difference (SAD) or sum of squared difference (SSD) can be used as the cost function.In some embodiments, when performing model training or deriving model parameters, the model inputs can from multiple neighboring L-shape reference lines, and the L-shape reference line most far from the current block is used as the reference samples to derive the prediction of template region.In some embodiments, multiple models can be used in model training or deriving model parameters. For example, samples are classified into two or more regions by threshold values or classification conditions. For still the same example, the threshold value can be determined by the average, median, average of the maximum and minimum of the prediction values inside the template region 510 of FIG. 5 or the reference samples of the template in the reference sample region 520.In some embodiments, the weighting sum can be other values in power of 2 (i.e., other power of 2 value but not 64) . For example, the other values in power of 2 can be 32, 128, 256, 512, 1024, and so on. After model training or deriving model parameters, the PDPC weightings (e.g., wL, wT, and wTL) shall be clipped between 1 to maximum allowed weighting. For example, if the weighting sum is 128, the PDPC weightings shall be between 1 to (128 –1) .C. Planar Mode with Regression-based BlendingIn conventional planar mode, the intra prediction is the average of the horizontal planar prediction and the vertical planar prediction. In some embodiments, the horizontal planar prediction can be formulated based on the left reference sample and the top-right reference sample to predict the current sample as:predH (x, y) = ( (W-1-x) × rec (-1, y) + (x+1) × rec (W, -1) ) << log2 (H)The vertical planar prediction can be formulated based on the above reference sample and the bottom-left reference sample to predict the current sample as:predV (x, y) = ( (H-1-y) × rec (x, -1) + (y+1) × rec (-1, H) ) << log2 (W)The final planar prediction can be formulated as:pred (x, y) = (predH (x, y) + predV (x, y) + W×H) >> (log2 (W×H) +1)The blending weight of intra prediction can be extended by using regression-based blending, the weight can be derived by using convolutional model (e.g., model parameter is derived using the solver for CCCM) . In some embodiments, the weight for rec (W, -1) can be defined as (a1·x + b1·y + c1) , and the weight for rec (-1, H) can be defined as as (a2·x + b2·y + c2) , where x and y are spatial coordinates corresponding to the most left-top position inside the current block, and ai, bj, ck are model parameters. The horizontal planar prediction and the vertical planar prediction with regression-based blending can be formulated as:predH (x, y) = (1- (a1x + b1y + c1) ) × rec (-1, y) + (a1x + b1y + c1) × rec (W, -1)predV (x, y) = (1- (a2x + b2y + c2) ) × rec (x, -1) + (a2x + b2y + c2) × rec (-1, H)pred (x, y) = (predH (x, y) + predV (x, y) + 1) >> 1Or, the horizontal planar prediction and the vertical planar prediction with regression-based blending can be formulated as:predH (x, y) = (1- (a3x + b3y + c3) ) × rec (-1, y) + (a1x + b1y + c1) × rec (W, -1) + c5 × (1 << (BitDepth -1) )predV (x, y) = (1- (a4x + b4y + c4) ) × rec (x, -1) + (a2x + b2y + c2) × rec (-1, H) + c5 × (1 << (BitDepth -1) )FIGS. 6A-B show the templates used in training model for horizontal planar prediction and vertical planar prediction. When deriving model parameters for planar mode with regression-based blending, the neighboring templates are used. Reference samples neighboring the template region are used to derive the prediction of the template region. In some embodiments, when performing model training or deriving model parameters of horizontal planar prediction, the model inputs are the reference samples of the left-side template (e.g., T-1, y at the left-side of reference sample region 615 in FIG. 6A) , and the planar prediction samples (e.g., prediction at Tx, y) . The training target or objective function is to minimize the distortion between the output prediction and the reconstruction inside the template region 610, that is, minimize (J (recT (x, y) –predT (x, y) ) ) → minimize (J (recT (x, y) – ( (a1·x + b1·y + c1) ×T-1, y + (64 - (a1·x + b1·y + c1) ×predT (x, y) + 32 ) >>6) ) )Or, minimize (J (recT (x, y) – ( (a1·x + b1·y + c1) ×T-1, y + (a3·x + b3·y + c3) ×predT (x, y) + c5× (1 << (BitDepth –1) ) ) )Similarly, when performing model training or deriving model parameters of vertical planar prediction, the model inputs are the reference samples of the above-side template (e.g., Tx, -1 at the above-side of reference sample region 625 in FIG. 6B) , and the planar prediction samples (e.g., prediction at Tx, y) . The training target or objective function is to minimize the distortion between the output prediction and the reconstruction inside the template region 620, that is,minimize (J (recT (x, y) –predT (x, y) ) ) → minimize (J (recT (x, y) – ( (a2·x + b2·y + c2) ×Tx, -1 + (64 - (a2·x + b2·y + c2) ) ×pred (x, y) + 32 ) >>6) ) )Or, minimize (J (recT (x, y) – ( (a2·x + b2·y + c2) ×Tx, -1 + (a4·x + b4·y + c4) ×predT (x’ , y’ ) + c5× (1 << (BitDepth –1) ) ) )recT (x, y) and pred (x, y) are the reconstruction and the intra angular prediction samples at position (x, y) inside the template region 620. T-1, y is a reference sample of a neighboring left position at (-1, y) of the template region. Tx, -1 is a reference sample of a neighboring top position at (x, -1) of the template region.J (. ) is the cost function to measure the distortion between the output prediction and the reconstruction inside the template region, and sum of absolute difference (SAD) or sum of squared difference (SSD) can be used as the cost function. In some embodiments, when performing model training or deriving model parameters, the model inputs can from multiple neighboring L-shape reference lines, and the L-shape reference line most far from the current block is used as the reference samples to derive the prediction of template region.In some embodiments, the weighting sum can be other values in power of 2 (i.e., other power of 2 value but not 64) . For example, the other values in power of 2 can be 32, 128, 256, 512, 1024, and so on. After model training or deriving model parameters, the weightings for rec (-1, y) , rec (W, -1) , rec (x, -1) , and (-1, H) shall be clipped between 1 to maximum allowed weighting. For example, if the weighting sum is 128, the weightings shall be between 1 to (128 –1) .D. TIMD with Regression-based BlendingThe blending weight of two candidate TIMD modes can be extended by using regression-based blending, the weight can be derived by using convolutional model (e.g., model parameter is derived using the solver for CCCM) . Similar to the method in Section III. B (i.e., PDPC with regression-based blending) , in one embodiment, the weight for the prediction of the first and the second candidate TIMD modes can be defined as (a1·x + b1·y + c1) and (a2·x + b2·y + c2) , where x and y are spatial coordinates corresponding to the most left-top position inside the current block, and ai, bj, ck are model parameters. The prediction of the first and the second candidate TIMD modes at position (x, y) inside the current block is denoted as pred1 (x, y) and pred2 (x, y) . The final blended TIMD prediction can be formulated as:pred (x, y) = ( (a1·x + b1·y + c1) × pred1 (x, y)+ (64- (a1·x + b1·y + c1) ) × pred2 (x, y) +32)Or, the final blended TIMD prediction can be formulated as:pred (x, y) = ( (a1·x + b1·y + c1) × pred1 (x, y)+ (a2·x + b2·y + c2) ) × pred2 (x, y) +c3× (1<< (BitDepth -1) )When deriving model parameters for planar mode with regression-based blending, the neighboring template is used. In some embodiment, when performing model training or deriving model parameters, the model inputs are the prediction samples of two candidate TIMD modes at Tx, y. The training target or objective function is to minimize the distortion between the output prediction and the reconstruction inside the template region, that is,minimize (J (recT (x, y) –predT (x, y) ) ) → minimize (J (recT (x, y) – ( (a1·x + b1·y + c1) ×pred1T (x, y) + (64 - (a1·x + b1·y + c1) ×pred2T (x, y) + 32 ) >>6) ) )Or, minimize (J (recT (x, y) – ( (a1·x + b1·y + c1) ×pred1T (x, y) + (a2·x + b2·y + c2) ×pred2T (x, y) + c3× (1 << (BitDepth –1) ) ) )recT (x, y) and predT (x, y) are the reconstruction and the blended TIMD prediction samples at position (x, y) inside the template region. pred1T (x, y) and pred2T (x, y) are the prediction of the first and the second candidate TIMD modes at position (x, y) inside the template region. J (. ) is the cost function to measure the distortion between the output prediction and the reconstruction inside the template region, and sum of absolute difference (SAD) or sum of squared difference (SSD) can be used as the cost function.In some embodiments, when doing model training or deriving model parameters, the model inputs can from multiple neighboring L-shape reference lines, and the L-shape reference line most far from the current block is used as the reference sample to derive the prediction of template region.In some embodiments, the weighting sum can be other values in power of 2 (i.e., other power of 2 value but not 64) . For example, the other values in power of 2 can be 32, 128, 256, 512, 1024, and so on. After model training or deriving model parameters, the weightings for pred1 (x, y) and pred2 (x, y) shall be clipped between 1 to maximum allowed weighting. For example, if the weighting sum is 128, the weightings shall be between 1 to (128 –1) .E. DIMD with Regression-based BlendingThe blending weight of more than one candidate DIMD modes can be extended by using regression-based blending. Suppose there are N candidate DIMD modes, similar to the method in Section III. D (i.e., TIMD with regression-based blending) , in some embodiments, the weight for the prediction of the i-th candidate DIMD modes can be defined as (ai × x + bi × y + ci) , where x and y are spatial coordinates corresponding to the most left-top position inside the current block, and ai, bj, ck are model parameters. The prediction of the i-th candidate DIMD modes at position (x, y) inside the current block is denoted as predi (x, y) . The final blended DIMD prediction can be formulated as:Or, the final blended DIMD prediction can be formulated as:In some embodiments, when deriving model parameters for planar mode with regression-based blending, the neighboring template is used. In some embodiment, when performing model training or deriving model parameters, the model inputs are the prediction samples of candidate DIMD modes at Tx, y. The training target or objective function is to minimize the distortion between the output prediction and the reconstruction inside the template region, that is,Or, recT (x, y) and predT (x, y) are the reconstruction and the blended DIMD prediction samples at position (x, y) inside the template region. predT (x, y) i is the prediction of the i-th candidate DIMD modes at position (x, y) inside the template region. J (. ) is the cost function to measure the distortion between the output prediction and the reconstruction inside the template region, and sum of absolute difference (SAD) or sum of squared difference (SSD) can be used as the cost function.In some embodiments, when performing model training or deriving model parameters, the model inputs can be from multiple neighboring L-shape reference lines, and the L-shape reference line most far from the current block is used as the reference sample to derive the prediction of template region.In some embodiments, the weighting sum can be other values in power of 2 (i.e., other power of 2 value but not 64) . For example, the other values in power of 2 can be 32, 128, 256, 512, 1024, and so on. After model training or deriving model parameters, the weightings for predT (x, y) i shall be clipped between 1 to maximum allowed weighting. For example, if the weighting sum is 128, the weightings shall be between 1 to (128 –1) .IV. Example Video EncoderFIG. 7 illustrates an example video encoder 700 that may implement regression-based blending of intra-predictions. As illustrated, the video encoder 700 receives input video signal from a video source 705 and encodes the signal into bitstream 795. The video encoder 700 has several components or modules for encoding the signal from the video source 705, at least including some components selected from a transform module 710, a quantization module 711, an inverse quantization module 714, an inverse transform module 715, an intra-picture estimation module 724, an intra-prediction module 725, a motion compensation module 730, a motion estimation module 735, an in-loop filter 745, a reconstructed picture buffer 750, a MV buffer 765, and a MV prediction module 775, and an entropy encoder 790. The motion compensation module 730 and the motion estimation module 735 are part of an inter-prediction module 740. The intra-prediction module 725 and the intra-prediction estimation module 724 are part of a current picture prediction module 720, which uses current picture reconstructed samples as reference samples for prediction of the current block.In some embodiments, the modules 710 –790 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 710 –790 are modules of hardware circuits implemented by one or more integrated circuits (ICs) of an electronic apparatus. Though the modules 710 –790 are illustrated as being separate modules, some of the modules can be combined into a single module.The video source 705 provides a raw video signal that presents pixel data of each video frame without compression. A subtractor 708 computes the difference between the raw video pixel data of the video source 705 and the predicted pixel data 713 from the motion compensation module 730 or intra-prediction module 725 as prediction residual 709. The transform module 710 converts the difference (or the residual pixel data or residual signal 708) into transform coefficients (e.g., by performing Discrete Cosine Transform, or DCT) . The quantization module 711 quantizes the transform coefficients into quantized data (or quantized coefficients) 712, which is encoded into the bitstream 795 by the entropy encoder 790.The inverse quantization module 714 de-quantizes the quantized data (or quantized coefficients) 712 to obtain transform coefficients 718, and the inverse transform module 715 performs inverse transform on the transform coefficients 718 to produce reconstructed residual 719. The reconstructed residual 719 is added with the predicted pixel data 713 to produce reconstructed pixel data 717. In some embodiments, the reconstructed pixel data 717 is temporarily stored in a line buffer 727 (or intra prediction buffer) for intra-picture prediction and spatial MV prediction. The reconstructed pixels are filtered by the in-loop filter 745 and stored in the reconstructed picture buffer 750. In some embodiments, the reconstructed picture buffer 750 is a storage external to the video encoder 700. In some embodiments, the reconstructed picture buffer 750 is a storage internal to the video encoder 700.The intra-picture estimation module 724 performs intra-prediction based on the reconstructed pixel data 717 to produce intra prediction data. The intra-prediction data is provided to the entropy encoder 790 to be encoded into bitstream 795. The intra-prediction data is also used by the intra-prediction module 725 to produce the predicted pixel data 713.The motion estimation module 735 performs inter-prediction by producing MVs to reference pixel data of previously decoded frames stored in the reconstructed picture buffer 750. These MVs are provided to the motion compensation module 730 to produce predicted pixel data.Instead of encoding the complete actual MVs in the bitstream, the video encoder 700 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 795.The MV prediction module 775 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 775 retrieves reference MVs from previous video frames from the MV buffer 765. The video encoder 700 stores the MVs generated for the current video frame in the MV buffer 765 as reference MVs for generating predicted MVs.The MV prediction module 775 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 795 by the entropy encoder 790.The entropy encoder 790 encodes various parameters and data into the bitstream 795 by using entropy-coding techniques such as context-adaptive binary arithmetic coding (CABAC) or Huffman encoding. The entropy encoder 790 encodes various header elements, flags, along with the quantized transform coefficients 712, and the residual motion data as syntax elements into the bitstream 795. The bitstream 795 is in turn stored in a storage device or transmitted to a decoder over a communications medium such as a network.The in-loop filter 745 performs filtering or smoothing operations on the reconstructed pixel data 717 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 745 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.FIG. 8 illustrates portions of the video encoder 700 that implement regression-based intra-prediction blending. Specifically, the figure illustrates the components of the intra-prediction module 725 of the video encoder 700. The intra-prediction module 725 uses the content of the reconstructed picture buffer 750 and the line buffer 727 to generate the predicted pixel data 713 using intra-prediction.As illustrated, the intra-prediction module 725 may include a regression model generation module 810, a weighting generation module 820, a prediction blending module 830, a collection of various intra prediction coding tools 840, or any combination thereof.The regression model generation module 810 uses samples in a template region near the current block (e.g., the template region 510 of FIG. 5) and in a reference sample region (e.g., the reference sample region 520 of FIG. 5) as corresponding training data to train a model by regression. The reference sample region may be chosen from multiple reference lines (MRL) .In some embodiments, the regression method may be similar to that used for generating the convolution model of CCCM. In some embodiments, the regression is performed by minimizing the cost of an objective function J (. ) , i.e., minimize (J (recT (x’ , y’ ) –predT (x’ , y’ ) ) ) , where recT (x’ , y’ ) refers to the reconstructed samples of the template region, and predT (x’ , y’ ) refers to a blended predicted samples of the template region (before adding residual) . Each blended predicted sample predT (x’ , y’ ) is generated using two or more intra-predictions based on the samples of the reference sample region. The two or more intra-predictions are generated by a specific intra-prediction coding tool 840 (e.g., PDPC, DIMD, TIMD, or planar mode) , which may generate the two or more intra-predictions according to one or more of the 67 intra-prediction modes. The minimized J (. ) function provides a set of model parameters that, when applied to the position of the current block (e.g., the top-left most position of the CU) by the weighting generation module 820, provides the respective weighting factors for the two or more predictions, respectively.The objective function for different intra-prediction modes may be defined differently. For example, Section III. B describes the objective function when the two or more intra-prediction to be blended are based on modes identified by PDPC. Section III. C describes the objective function when the two or more intra-predictions to be blended are vertical and horizontal planar intra predictions. Section III. D describes the objective function when the two or more intra-predictions to be blended are based on modes identified by TIMD. Section III. E describes the objective function when the two or more intra-predictions to be blended are based on modes identified by DIMD.The prediction blending module 830 blends two or more predictions generated by one of the intra-prediction coding tools 840 (e.g., PDPC, Planar, TIMD, DIMD) by applying the two or more weighting factors provided by the weighting generation module 820 to the two or more predictions. The blending operations for various intra-prediction coding tools are described in Section III. The result of the intra-prediction blending are provided as the predicted pixel data 713.FIG. 9 conceptually illustrates a process 900 for encoding a pixel block by regression-based blending of intra-predictions. In some embodiments, one or more processing units (e.g., a processor) of a computing device implementing the encoder 700 performs the process 900 by executing instructions stored in a computer readable medium. In some embodiments, an electronic apparatus implementing the encoder 700 performs the process 900.The encoder receives (at block 910) data to be encoded as a current block of pixels in a current picture of a video.The encoder generates (at block 920) two or more intra-predictions of the current block by applying an intra-prediction coding tool. The intra-prediction coding tool may be position dependent intra prediction (PDPC) , such that the two or more intra-predictions are two corresponding reference samples identified by an intra-prediction angular mode. The intra-prediction coding tool may be template-based intra mode derivation (TIMD) , such that the two or more intra-prediction are generated according to two or more intra-prediction modes identified by a TIMD process of the current block. The intra-prediction coding tool may be decoder side intra mode derivation (DIMD) , such that the two or more intra-prediction are generated according to two more intra-prediction modes identified by a DIMD process of the current block. The two or more intra-predictions may also refer to horizontal planar prediction and vertical planar prediction.The encoder derives (at block 930) a weight factor for blending the two or more intra-predictions for the current block. The weighting factor is derived by regression of samples from a template region of the current block and from a reference sample region of the template region to minimize a difference between (i) reconstructed samples of the template region and (ii) predicted samples of the template region generated by applying the intra-prediction coding tool to samples of the reference sample region with intra-prediction blending. The predicted samples of the template region are calculated according to objective functions provided in Section III for various intra-prediction coding tools.The samples for the regression for the horizontal planar prediction may be from a template region that is above the current block and a reference sample region that is left of the template region (e.g., template region 610 and reference sample region 615) . The samples for the regression for the vertical planar prediction may be from a template region that is left of the current block and a reference sample region that is above the template region (e.g., template region 620 and reference template region 625) .In some embodiments, the regression is used to determine in a set of model parameters, and the weighting factor is computed by applying the set of model parameters to spatial coordinates of the most left-top position inside the current block. In some embodiments, the regression may be used to determine multiple sets of model parameters based on sample that are classified into two or more regions by threshold value or classification conditions. The threshold value can be determined by the average, median, average of the maximum and minimum of the prediction values inside the template region or the reference samples of template.In some embodiments, the reference sample region comprises multiple neighboring L-shape reference lines, and the L-shape reference line most far from the current block is used to provide the reference sample to derive the prediction of template region.The encoder blends (at block 940) the two or more generated intra-predictions according to the derived weighting factor. The encoder encodes (at block 950) the current block by using the blended prediction to produce prediction residuals.V. Example Video DecoderIn 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.FIG. 10 illustrates an example video decoder 1000 that may implement regression-based blending of intra-predictions. As illustrated, the video decoder 1000 is an image-decoding or video-decoding circuit that receives a bitstream 1095 and decodes the content of the bitstream into pixel data of video frames for display. The video decoder 1000 has several components or modules for decoding the bitstream 1095, including some components selected from an inverse quantization module 1014, an inverse transform module 1015, an intra-prediction module 1025, a motion compensation module 1030, an in-loop filter 1045, a decoded picture buffer 1050, a MV buffer 1065, a MV prediction module 1075, and a parser 1090. The motion compensation module 1030 is part of an inter-prediction module 1040. The intra-prediction module 1025 is part of a current picture prediction module 1020, which uses current picture reconstructed samples as reference samples for prediction of the current block.In some embodiments, the modules 1014 –1090 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 1014 –1090 are modules of hardware circuits implemented by one or more ICs of an electronic apparatus. Though the modules 1014 –1090 are illustrated as being separate modules, some of the modules can be combined into a single module.The parser 1090 (or entropy decoder) receives the bitstream 1095 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) 1012. The parser 1090 parses out the various syntax elements by using entropy-coding techniques such as context-adaptive binary arithmetic coding (CABAC) or Huffman encoding.The inverse quantization module 1014 de-quantizes the quantized data (or quantized coefficients) 1012 to obtain transform coefficients, and the inverse transform module 1015 performs inverse transform on the transform coefficients 1018 to produce reconstructed residual signal 1019. The reconstructed residual signal 1019 is added with predicted pixel data 1013 from the intra-prediction module 1025 or the motion compensation module 1030 to produce decoded pixel data 1017. The decoded pixels data are filtered by the in-loop filter 1045 and stored in the decoded picture buffer 1050. In some embodiments, the decoded picture buffer 1050 is a storage external to the video decoder 1000. In some embodiments, the decoded picture buffer 1050 is a storage internal to the video decoder 1000.The intra-prediction module 1025 receives intra-prediction data from bitstream 1095 and according to which, produces the predicted pixel data 1013 from the decoded pixel data 1017 stored in the decoded picture buffer 1050. In some embodiments, the decoded pixel data 1017 is also stored in a line buffer 1027 (or intra prediction buffer) for intra-picture prediction and spatial MV prediction.In some embodiments, the content of the decoded picture buffer 1050 is used for display. A display device 1005 either retrieves the content of the decoded picture buffer 1050 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 1050 through a pixel transport.The motion compensation module 1030 produces predicted pixel data 1013 from the decoded pixel data 1017 stored in the decoded picture buffer 1050 according to motion compensation MVs (MC MVs) . These motion compensation MVs are decoded by adding the residual motion data received from the bitstream 1095 with predicted MVs received from the MV prediction module 1075.The MV prediction module 1075 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 1075 retrieves the reference MVs of previous video frames from the MV buffer 1065. The video decoder 1000 stores the motion compensation MVs generated for decoding the current video frame in the MV buffer 1065 as reference MVs for producing predicted MVs.The in-loop filter 1045 performs filtering or smoothing operations on the decoded pixel data 1017 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 1045 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.FIG. 11 illustrates portions of the video decoder 1000 that implement regression-based intra-prediction blending. Specifically, the figure illustrates the components of the intra-prediction module 1025 of the video decoder 1000. The intra-prediction module 1025 uses the content of the reconstructed picture buffer 1050 and the line buffer 1027 to generate the predicted pixel data 1013 using intra-prediction.As illustrated, the intra-prediction module 1025 includes a regression model generation module 1110, a weighting generation module 1120, a prediction blending module 1130, and a collection of various intra prediction coding tools 1140.The regression model generation module 1110 uses samples in a template region near the current block (e.g., the template region 510 of FIG. 5) and in a reference sample region (e.g., the reference sample region 520 of FIG. 5) as corresponding training data to train a model by regression. The reference sample region may be chosen from multiple reference lines (MRL) .In some embodiments, the regression method may be similar to that used for generating the convolution model of CCCM. In some embodiments, the regression is performed by minimizing the cost of an objective function J (. ) , i.e., minimize (J (recT (x’ , y’ ) –predT (x’ , y’ ) ) ) , where recT (x’ , y’ ) refers to the reconstructed samples of the template region, and predT (x’ , y’ ) refers to a blended predicted samples of the template region (before adding residual) . Each blended predicted sample predT (x’ , y’ ) is generated using two or more intra-predictions based on the samples of the reference sample region. The two or more intra-predictions are generated by a specific intra-prediction coding tool 1140 (e.g., PDPC, DIMD, TIMD, or planar mode) , which may generate the two or more intra-predictions according to one or more of the 67 intra-prediction modes. The minimized J (. ) function provides a set of model parameters that, when applied to the position of the current block (e.g., the top-left most position of the CU) by the weighting generation module 1120, provides the respective weighting factors for the two or more predictions, respectively.The objective function for different intra-prediction modes may be defined differently. For example, Section III. B describes the objective function when the two or more intra-prediction to be blended are based on modes identified by PDPC. Section III. C describes the objective function when the two or more intra-predictions to be blended are vertical and horizontal planar intra predictions. Section III. D describes the objective function when the two or more intra-predictions to be blended are based on modes identified by TIMD. Section III. E describes the objective function when the two or more intra-predictions to be blended are based on modes identified by DIMD.The prediction blending module 1130 blends two or more predictions generated by one of the intra-prediction coding tools 1140 (e.g., PDPC, Planar, TIMD, DIMD) by applying the two or more weighting factors provided by the weighting generation module 1120 to the two or more predictions. The blending operations for various intra-prediction coding tools are described in Section III. The result of the intra-prediction blending are provided as the predicted pixel data 1013.FIG. 12 conceptually illustrates a process 1200 for decoding a pixel block by regression-based blending of intra-predictions. In some embodiments, one or more processing units (e.g., a processor) of a computing device implementing the decoder 1000 performs the process 1200 by executing instructions stored in a computer readable medium. In some embodiments, an electronic apparatus implementing the decoder 1000 performs the process 1200.The decoder receives (at block 1210) data to be decoded as a current block of pixels in a current picture of a video.The decoder generates (at block 1220) two or more intra-predictions of the current block by applying an intra-prediction coding tool. The intra-prediction coding tool may be position dependent intra prediction (PDPC) , such that the two or more intra-predictions are two corresponding reference samples identified by an intra-prediction angular mode. The intra-prediction coding tool may be template-based intra mode derivation (TIMD) , such that the two or more intra-prediction are generated according to two or more intra-prediction modes identified by a TIMD process of the current block. The intra-prediction coding tool may be decoder side intra mode derivation (DIMD) , such that the two or more intra-prediction are generated according to two more intra-prediction modes identified by a DIMD process of the current block. The two or more intra-predictions may also refer to horizontal planar prediction and vertical planar prediction.The decoder derives (at block 1230) a weight factor for blending the two or more intra-predictions for the current block. The weighting factor is derived by regression of samples from a template region of the current block and from a reference sample region of the template region to minimize a difference between (i) reconstructed samples of the template region and (ii) predicted samples of the template region generated by applying the intra-prediction coding tool to samples of the reference sample region with intra-prediction blending. The predicted samples of the template region are calculated according to objective functions provided in Section III for various intra-prediction coding tools.The samples for the regression for the horizontal planar prediction may be from a template region that is above the current block and a reference sample region that is left of the template region (e.g., template region 610 and reference sample region 615) . The samples for the regression for the vertical planar prediction may be from a template region that is left of the current block and a reference sample region that is above the template region (e.g., template region 620 and reference template region 625) .In some embodiments, the regression is used to determine in a set of model parameters, and the weighting factor is computed by applying the set of model parameters to spatial coordinates of the most left-top position inside the current block. In some embodiments, the regression may be used to determine multiple sets of model parameters based on sample that are classified into two or more regions by threshold value or classification conditions. The threshold value can be determined by the average, median, average of the maximum and minimum of the prediction values inside the template region or the reference samples of template.In some embodiments, the reference sample region comprises multiple neighboring L-shape reference lines, and the L-shape reference line most far from the current block is used to provide the reference sample to derive the prediction of template region.The decoder blends (at block 1240) the two or more generated intra-predictions according to the derived weighting factor. The decoder reconstructs (at block 1250) the current block by using the blended prediction and corresponding prediction residuals. The decoder may then provide the reconstructed current block for display as part of the reconstructed current picture.VI. Example Electronic SystemMany 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.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.FIG. 13 conceptually illustrates an electronic system 1300 with which some embodiments of the present disclosure are implemented. The electronic system 1300 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 1300 includes a bus 1305, processing unit (s) 1310, a graphics-processing unit (GPU) 1315, a system memory 1320, a network 1325, a read-only memory 1330, a permanent storage device 1335, input devices 1340, and output devices 1345.The bus 1305 collectively represents all system, peripheral, and chipset buses that communicatively connect the numerous internal devices of the electronic system 1300. For instance, the bus 1305 communicatively connects the processing unit (s) 1310 with the GPU 1315, the read-only memory 1330, the system memory 1320, and the permanent storage device 1335.From these various memory units, the processing unit (s) 1310 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 1315. The GPU 1315 can offload various computations or complement the image processing provided by the processing unit (s) 1310.The read-only-memory (ROM) 1330 stores static data and instructions that are used by the processing unit (s) 1310 and other modules of the electronic system. The permanent storage device 1335, 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 1300 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 1335.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 1335, the system memory 1320 is a read-and-write memory device. However, unlike storage device 1335, the system memory 1320 is a volatile read-and-write memory, such a random access memory. The system memory 1320 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 1320, the permanent storage device 1335, and / or the read-only memory 1330. 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) 1310 retrieves instructions to execute and data to process in order to execute the processes of some embodiments.The bus 1305 also connects to the input and output devices 1340 and 1345. The input devices 1340 enable the user to communicate information and select commands to the electronic system. The input devices 1340 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 1345 display images generated by the electronic system or otherwise output data. The output devices 1345 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.Finally, as shown in FIG. 13, bus 1305 also couples electronic system 1300 to a network 1325 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 1300 may be used in conjunction with the present disclosure.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 recordablediscs, 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.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.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.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. 9 and FIG. 12) 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.Additional NotesThe 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.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.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., “asystem 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., “asystem 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 “Aor B” will be understood to include the possibilities of “A” or “B” or “Aand B. ”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;generating two or more intra-predictions of the current block by applying an intra-prediction coding tool;deriving a weight factor for blending the two or more intra-predictions for the current block, wherein the weighting factor is derived by regression of samples from a template region of the current block and from a reference sample region of the template region;blending the two or more generated intra-predictions according to the derived weighting factor; andencoding or decoding the current block by using the blended prediction.2.The video coding method of claim 1, wherein the regression is used to determine in a set of model parameters, where the weighting factor is computed by applying the set of model parameters to spatial coordinates of the most left-top position inside the current block.3.The video coding method of claim, 1, wherein the regression is to minimize a difference between (i) reconstructed samples of the template region and (ii) predicted samples of the template region generated by applying the intra-prediction coding tool to samples of the reference sample region with intra-prediction blending.4.The video coding method of claim 1, wherein the regression is used to determine multiple sets of model parameters based on sample that are classified into two or more regions by threshold value or classification conditions.5.The video coding method of claim 4, the threshold value can be determined by the average, median, average of the maximum and minimum of the prediction values inside the template region or the reference samples of template.6.The video coding method of claim 1, wherein the reference sample region comprises multiple neighboring L-shape reference lines, and the L-shape reference line most far from the current block is used to provide the reference sample to derive the prediction of template region.7.The video coding method of claim 1, wherein the intra-prediction coding tool is position dependent intra prediction (PDPC) , wherein the two or more intra-predictions are two corresponding reference samples identified by an intra-prediction angular mode.8.The video coding method of claim 1, wherein the intra-prediction coding tool is template-based intra mode derivation (TIMD) , wherein the two or more intra-prediction are generated according to two or more intra-prediction modes identified by a TIMD process of the current block.9.The video coding method of claim 1, wherein the intra-prediction coding tool is decoder side intra mode derivation (DIMD) , wherein the two or more intra-prediction are generated according to two or more intra-prediction modes identified by a DIMD process of the current block.10.The video coding method of claim 1, wherein the two or more intra-predictions comprise horizontal planar prediction and vertical planar prediction.11.The video coding method of claim 10, wherein the samples for the regression for the horizontal planar prediction is from a template region that is above the current block and a reference sample region that is left of the template region.12.The video coding method of claim 10, wherein the samples for the regression for the vertical planar prediction is from a template region that is left of the current block and a reference sample region that is above the template region.13.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;generating two or more intra-predictions of the current block by applying an intra-prediction coding tool;deriving a weight factor for blending the two or more intra-predictions for the current block, wherein the weighting factor is derived by regression of samples from a template region of the current block and from a reference sample region of the template region;blending the two or more generated intra-predictions according to the derived weighting factor; andencoding or decoding the current block by using the blended prediction.14.A video decoding method comprising:receiving data to be decoded as a current block of pixels of a current picture of a video;generating two or more intra-predictions of the current block by applying an intra-prediction coding tool;deriving a weight factor for blending the two or more intra-predictions for the current block, wherein the weighting factor is derived by regression of samples from a template region of the current block and from a reference sample region of the template region;blending the two or more generated intra-predictions according to the derived weighting factor; andreconstructing the current block by using the blended prediction.15.A video encoding method comprising:receiving data to be encoded as a current block of pixels of a current picture of a video;generating two or more intra-predictions of the current block by applying an intra-prediction coding tool;deriving a weight factor for blending the two or more intra-predictions for the current block, wherein the weighting factor is derived by regression of samples from a template region of the current block and from a reference sample region of the template region;blending the two or more generated intra-predictions according to the derived weighting factor; andencoding the current block by using the blended prediction.

Citation Information

Patent Citations

  • Intra-picture prediction using non-adjacent reference lines of sample values

    CN109076241A

  • Method and apparatus for intra prediction with multiple weighted references

    US20220159296A1

  • Video Compression Using Template-Based Determination of Intra Prediction Mode

    US20230336718A1

  • Derived intra prediction modes and most probable modes in video coding

    WO2022256825A1