Coding method, decoding method, device and equipment
By introducing a nonlinear activation function into video encoding and decoding technology to build a target model, the problem of low applicability of chroma prediction methods in the existing technology is solved, and the compression effect and chroma prediction accuracy of video coding are improved.
Patent Information
- Application Number
- CN202310390826.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-12
- Publication Date
- 2024-10-18
AI Technical Summary
In the existing video encoding and decoding technology, the chroma prediction method based on the cross-branch linear model has low applicability, which affects the compression effect of video coding.
The nonlinear activation function is introduced to build the target model, improve the mapping relationship between brightness and chroma, is suitable for linear and nonlinear related coding blocks, and enhances the accuracy of chroma prediction.
The applicability of the chroma prediction method and the compression effect of video coding are improved, the difference of the target coding block is reduced, and the data size of the coding information is reduced.
Smart Images

Figure CN118803259A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of video coding and decoding technology, and specifically relates to a coding method, a decoding method, a device and an apparatus. Background Art
[0002] In video coding and decoding, since brightness and chrominance have a certain correlation, in order to remove the redundancy between different brightness and chrominance components, Versatile Video Coding (VVC) proposes an intra-frame prediction mode based on the Cross-Component Linear Model (CCLM).
[0003] However, since CCLM assumes that the chrominance pixel value and its corresponding luminance pixel value of the same coding unit (CU) have a linear relationship, and uses a linear model to generate the predicted value of the corresponding chrominance pixel from the reconstructed value of the luminance pixel, the chrominance prediction method based on CCLM has low applicability, which affects the compression effect of video coding. Summary of the invention
[0004] The embodiments of the present application provide an encoding method, a decoding method, an apparatus and a device, which are beneficial to improving the applicability of the chrominance prediction method and improving the compression effect of video encoding.
[0005] In a first aspect, a decoding method is provided, comprising:
[0006] Obtaining encoding information corresponding to a target coding block, the encoding information including at least: index information of a target model, values of various parameters, a brightness down-sampled reconstruction value of the target coding block, and a target difference value;
[0007] Determining a target model according to the index information of the target model, wherein the target model is constructed according to the activation parameter and the first model, wherein the first model is used to characterize a mapping relationship between a luma down-sampling reconstruction value and a chroma prediction value;
[0008] Determine a chrominance prediction value of the target coding block according to the target model, the values of the parameters, and the luma downsampling reconstruction value of the target coding block;
[0009] A chrominance reconstruction value of the target coding block is determined according to the chrominance prediction value of the target coding block and the target difference value.
[0010] In a second aspect, a coding method is provided, comprising:
[0011] Constructing a target model according to the activation function and the first model, wherein the first model is used to characterize a mapping relationship between a luma down-sampling reconstruction value and a chroma prediction value;
[0012] Determining the values of each parameter in the target model according to the chrominance true value and the luminance down-sampled reconstruction value of the target coding block;
[0013] Determine a chrominance prediction value of the target coding block according to the target model, the values of the parameters, and the luma downsampling reconstruction value of the target coding block;
[0014] Determining a target difference value according to a chrominance prediction value of the target coding block and a chrominance true value of the target coding block;
[0015] The encoding information corresponding to the target coding block is generated according to the index information of the target model, the values of the various variable parameters, the brightness down-sampling reconstruction value of the target coding block, and the target difference value.
[0016] According to a third aspect, a decoding device is provided, the device comprising:
[0017] An information acquisition module, used to acquire encoding information corresponding to a target coding block and a brightness down-sampled reconstruction value of the target coding block, wherein the encoding information at least includes: index information of a target model, values of various parameters, a brightness down-sampled reconstruction value of the target coding block, and a target difference value;
[0018] A model determination module, used to determine a target model according to the index information of the target model, wherein the target model is constructed according to the activation parameter and the first model, wherein the first model is used to characterize a mapping relationship between a luma down-sampling reconstruction value and a chroma prediction value;
[0019] A chrominance prediction module, configured to determine a chrominance prediction value of the target coding block according to the target model, the values of the various parameters, and the luminance down-sampling reconstruction value of the target coding block;
[0020] The chrominance reconstruction module is used to determine the chrominance reconstruction value of the target coding block according to the chrominance prediction value of the target coding block and the target difference value.
[0021] In a fourth aspect, a coding device is provided, the device comprising:
[0022] A first construction module is used to construct a target model according to the activation function and the first model, wherein the first model is used to characterize the mapping relationship between the luma down-sampling reconstruction value and the chroma prediction value;
[0023] A first processing module, used to determine the values of various parameters in the target model according to the chrominance true value and the luminance down-sampling reconstruction value of the target coding block;
[0024] A second processing module, configured to determine a chrominance prediction value of the target coding block according to the target model, the values of the parameters, and the luma down-sampling reconstruction value of the target coding block;
[0025] A third processing module, configured to determine a target difference value according to the chrominance prediction value of the target coding block and the chrominance true value of the target coding block;
[0026] The first generating module is used to generate the encoding information corresponding to the target coding block according to the index information of the target model, the values of the various variable parameters, the brightness downsampling reconstruction value of the target coding block, and the target difference value.
[0027] In a fifth aspect, a decoding device is provided, comprising a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the decoding method described in the first aspect are implemented.
[0028] In a sixth aspect, a coding device is provided, comprising a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the coding method described in the second aspect are implemented.
[0029] In a seventh aspect, a coding and decoding system is provided, comprising: a coding device and a decoding device, wherein the decoding device is used to execute the steps of the decoding method as described in the first aspect above, and the coding device is used to execute the steps of the coding method as described in the second aspect above.
[0030] In an eighth aspect, a readable storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the decoding method described in the first aspect are implemented, or the steps of the encoding method described in the second aspect are implemented.
[0031] In the ninth aspect, a chip is provided, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the encoding method as described in the second aspect, or to implement the decoding method as described in the third aspect.
[0032] In the tenth aspect, a computer program / program product is provided, wherein the computer program / program product is stored in a storage medium, and the computer program / program product is executed by at least one processor to implement the steps of the decoding method as described in the first aspect, or to implement the steps of the encoding method as described in the second aspect.
[0033] In an embodiment of the present application, a nonlinear activation function is introduced into the construction of the target model, so that the target model can have a higher chroma prediction accuracy for target coding blocks with good or poor linear correlation between luminance and chroma, thereby improving the applicability of the chroma prediction method and improving the compression effect of video coding. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0035] Figure 1 is a schematic diagram of a brightness sample block in an embodiment of the present application;
[0036] Figure 2 is a schematic diagram of a chroma sample block in an embodiment of the present application;
[0037] Figure 3 is a schematic diagram of a brightness and chromaticity value distribution in an embodiment of the present application;
[0038] Figure 4 is a schematic diagram of another brightness and chromaticity value distribution in an embodiment of the present application;
[0039] Figure 5 is a schematic diagram of each segmented region in the multi-modal linear model in the embodiment of the present application;
[0040] Figure 6 is a schematic diagram of pixel grouping in an embodiment of the present application;
[0041] Figure 7 is a schematic diagram of a filter in an embodiment of the present application;
[0042] Figure 8 is a schematic diagram of another filter in an embodiment of the present application;
[0043] Fig. 9 is a schematic diagram of another filter in an embodiment of the present application;
[0044] Fig.10 is a schematic diagram of another filter in an embodiment of the present application;
[0045] Fig.11 is a flowchart of a decoding method in an embodiment of the present application;
[0046] Fig.12 is a flowchart of an encoding method in an embodiment of the present application;
[0047] Fig.13 is a structural block diagram of a decoding device in an embodiment of the present application;
[0048] Fig.14 It is a structural block diagram of a coding device in an embodiment of the present application. DETAILED DESCRIPTION
[0049] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of this application.
[0050] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first" and "second" are generally of the same type, and the number of objects is not limited. For example, the first object can be one or at least two. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally represents that the objects associated with each other are in an "or" relationship.
[0051] Compared with the previous generation video codec technology standard HEVC (H.265), VVC (H.266) adds CCLM content. CCLM technology can be divided into the following seven technologies.
[0052] 1. CCLM (in a narrow sense):
[0053] This technology assumes that the chrominance pixel value and its corresponding luminance pixel value of the same coding block (ie, coding unit) have a linear relationship, so CCLM uses a linear (including curve) model to generate the predicted value of the corresponding chrominance pixel based on the reconstructed value of the luminance pixel.
[0054] The luminance samples are reconstructed using a 6-tap filter using the following formula, thus obtaining the reconstructed luminance samples:
[0055] ReC′ L (x, y) = (2×Rec L (2x,2y)+2×Rec L (2x,2y+1)+Rec L (2X1,2y)+Eec L (2x+1,2y)+Rec L (2X-1,2y+1)+RecL (2X+1,2y+1)+4)>>3
[0056] Among them, Rec′ L (x, y) is the reconstructed brightness sample value (i.e., the brightness down-sampling reconstruction value), Rec L (x, y) is the brightness sample value, (x, y) is the sample coordinate, and >> is the displacement operation.
[0057] The reconstructed luminance samples are then used to predict the chrominance samples:
[0058] Pred C (x, y) = α × Rec′ L (x,y)+β
[0059] Among them, Rec′ L (x, y) is the reconstructed brightness sample value, Pred c (x, y) is the predicted chrominance sample value, (x, y) is the sample coordinate, α and β are the parameters of the linear model, which are derived according to the following formula:
[0060]
[0061]
[0062] Among them, Rec′ L (i) is the brightness downsampled reconstruction value of the i-th adjacent sample, Rec c (i) is the chromaticity value of the i-th adjacent sample, I represents the number of adjacent samples, and the adjacent samples can be obtained from Figure 1 or Figure 2 The grey dots shown indicate the samples selected from the block.
[0063] It can be seen that the linear model defined by CCLM can only be used for linear correlations with strong linear correlations (such as Figure 3 or Figure 4 The CU corresponding to the luminance and chrominance value distribution (as shown in FIG) has a higher coverage rate, and can achieve a higher precision prediction from luminance to chrominance.
[0064] 2. Slope adjustment of CCLM:
[0065] Enhanced Compression Model (ECM) optimizes the traditional CCLM. It introduces the parameter u for adjusting the slope of the traditional CCLM: chromaVal = a*lumaVal + b, thus obtaining ECM: chromaVal = a'*lumaVal + b', a' = a+u, b' = bu*yr; where chromaVal is the chroma prediction value, lumaVal is the luminance downsampling reconstruction value, a and b are CCLM parameters, yr is the luminance average value, and u is any integer between -4 and 4. It can be seen that ECM implements the rotation correction around the yr point for the linear model.
[0066] 3. Multi-Model Linear Model (MM-CCLM), also known as MMLM:
[0067] In order to better improve the situation where the model coverage is low in some brightness and chromaticity value distributions, MM-CCLM uses a piecewise linear regression method to divide the brightness and chromaticity value distribution into n regions, and different linear model parameters are used in different regions:
[0068]
[0069] Among them, y is the chrominance prediction value, x is the luminance downsampling reconstruction value, t1, ..., t n-1 is the segmentation threshold, a1,…,a n and b1, ..., b n are the linear model parameters.
[0070] Since segmented calculation will lead to increased computational complexity, fewer segments are more advantageous for computational complexity. In order to reduce computational complexity, MM-CCLM is generally divided into two segments, and a breakpoint (i.e., threshold) is selected to separate x. Figure 5 As shown, the segmentation is performed according to the average value of the downsampled brightness samples, and its average value is 108. After piecewise linear regression, the mean square error (MSE) is reduced from 88.44 to 45.69.
[0071] like Figure 6As shown, region P is the two adjacent rows on the left and top of the current chrominance block (or downsampled luminance block), and the threshold (i.e., the average value of the downsampled luminance reconstruction value in region P) is 17. When the downsampled luminance reconstruction value of a certain pixel in region P is greater than the threshold, it is classified as group 1 and marked as a white dot; when the downsampled luminance reconstruction value of a certain pixel in region P is less than the threshold, it is classified as group 0 and marked as a black dot. Then, in each group, the linear model parameters corresponding to each region are calculated.
[0072] It should be noted that in VVC, there is a parameter (ie, LM flag) used to indicate whether to apply the cross-component linear prediction model technology. If the LM flag is equal to 1, it means that the cross-component linear prediction model technology is applied. Then check whether the MMLMflag parameter indicates the application of the multi-mode cross-component linear prediction model technology, so that the encoder and decoder can correctly select the model for chrominance prediction.
[0073] 4. Multi sampling filter linear model (MF-CCLM):
[0074] MF-CCLM optimizes the reconstructed luminance value, and this reconstruction optimization is based on the default 4:2:0 chroma downsampling position. In the new generation of codec standards (AVC / HEVC), because there is supplementary VUI high-level syntax support, the chroma downsampling position can be defined according to the color display effect.
[0075] Depending on the location, a special downsampling filter can be formulated for brightness downsampling:
[0076] Downsampling filter 1 (Filter-North):
[0077] S' Y (x,y)=(S Y (2x,2y)+S Y (2x+1,2y)+1)>>1
[0078] Downsampling filter 2 (Filter-East):
[0079] S' Y (x,y)=(S Y (2x+1,2y)+S Y (2x+1,2y+1)+1)>>1
[0080] Downsampling filter 3 (Filter-South):
[0081] S' Y (x,y)=(S Y (2x,2y+1)+S Y (2x+1,2y+1)+1)>>1
[0082] Downsampling filter 4 (Filter-West):
[0083] S' Y (x,y)=(S Y (2x,2y)+S Y (2x,2y+1)+1)>>1
[0084] Downsampling filter 5 (Filter-Center):
[0085] S' Y (x,y)=(S Y (2x,2y)+S Y (2x+1,2y)+S Y (2x+1,2y+1)+S Y (2x+1,2y+1)+2)>>2
[0086] Among them, S' Y (x, y) is the brightness downsampling reconstruction value, S Y (x, y) is the brightness reconstruction value, (x, y) is the sample coordinate, Filter-North, Filter-East, Filter-South, Filter-West and Filter-Center are downsampling filters in five different modes, >> is a displacement operation.
[0087] In the MF-CCLM mode, four new modes are added: MFLM-North, MFLM-East, MFLM-South and MFLM-Center. For example, when MFLM-North is selected, the Filter-North downsampling filter will be used when reconstructing the chroma samples.
[0088] 5. Linear model combined with angle (LAP, LM-Angular Prediction):
[0089] The general environment proposed by LAP is that there are only two options for a block: use CCLM or do not use CCLM (use traditional angular intra prediction). Choose one of the two options. LAP is based on the concept of multi-hypothesis motion compensation, combining angular intra prediction and CCLM, and becomes:
[0090] P syn (x, y) = ωPLM (x,y)+(1-ω)P ang (x, y)
[0091] Among them, P syn (x, y) is the chrominance prediction value output by LAP, P LM (x, y) is the chromaticity prediction value output by CCLM, P ang (x, y) is the chrominance prediction value output by the traditional angular intra prediction, ω is the weight value, and (x, y) is the sample coordinate.
[0092] 6. Convolutional Cross-Component Model (CCCM):
[0093] This is a technique used in ECM, which uses a 7-tap filter, where 5 taps are the plus-shaped spatial element data, plus a nonlinear element P and a basis element B:
[0094] predChromaVal=c0C+c1N+c2S+c3E+c4W+c5P+c6B
[0095] Among them, P = (C*C+midVal)>>bitDepth, bitDepth is the bit depth, midVal is the median of the bit depth, C represents the luma sample value at the corresponding position of the current chroma sample, N, S, E, and W are the adjacent sample values of the current luma sample, respectively, predChromaVal is the predicted value of the current chroma sample, B is the scalar offset between input and output, >> is a bit shift operation, and c0, c1, c2, c3, c4, c5, and c6 are filter coefficients.
[0096] 7. Gradient Linear Model (GLM)
[0097] This is a technique used in ECM, which uses the brightness gradient G to replace the downsampled brightness sample L: C = α·G+β; where C is the chrominance prediction value, G is the brightness gradient value, and α and β are linear model parameters.
[0098] Compared with CCLM, GLM does not downsample the brightness value, but uses the gradient of the brightness sample to derive the linear model. That is, when deriving parameters, it does not use the downsampled brightness sample, but uses the gradient G of the brightness sample to derive the linear model, but the other designs of CCLM (for example, parameter derivation, linear transformation of prediction samples) remain unchanged. Among them, the gradient calculation can be used as follows Figures 7 to 10 Any of the filter implementations shown.
[0099] Based on the above CCLM technology, it can be seen that CCLM assumes that the chrominance pixel value and the corresponding luminance pixel value of the same CU have a linear relationship, so CCLM uses a linear model to generate the prediction value of the corresponding chrominance pixel from the reconstructed value of the luminance pixel. However, for CUs with nonlinear correlation or poor linear correlation between luminance and chrominance, the residual error predicted by CCLM is large, resulting in low compression effect.
[0100] In response to the problems existing in the related art, the present application proposes a more widely applicable coding and decoding method based on cross-component general model (CCGM) prediction to expand the scope of application of video coding and achieve better compression rate.
[0101] First, see Fig.11 FIG. 1 is a flowchart of a decoding method provided in an embodiment of the present application. The method may include the following steps:
[0102] Step S101: Obtain coding information corresponding to a target coding block, wherein the coding information at least includes: index information of a target model, values of various parameters, a brightness down-sampling reconstruction value of the target coding block, and a target difference value.
[0103] In specific implementation, the encoding end can determine the values of various parameters when the prediction error of the target model meets the set conditions (such as the prediction error is less than the error threshold) based on the true chromaticity value, the luminance downsampling reconstruction value, the prediction error of the target model, and the mapping relationship between the various parameters of the target model, thereby ensuring the chromaticity prediction accuracy of the target model for the target coding block.
[0104] As a possible implementation, in order to reduce the amount of calculation, the same number of reference pixels associated with the target coding block (such as in the target coding block or the adjacent target coding block of the target coding block) can be selected according to the number of parameters whose values need to be determined, and the value of each parameter can be determined based on the true chromaticity value and the luminance down-sampled reconstructed value of the reference pixel.
[0105] Step S102: Determine the target model according to the index information of the target model.
[0106] The target model is constructed according to the activation parameters and the first model, and the first model is used to characterize the mapping relationship between the luminance down-sampling reconstruction value and the chrominance prediction value. The first model can be a chrominance prediction model such as a curve model, a CCLM technology-related linear model, etc. Specifically, the CCLM technology-related linear model can be any of the following: CCLM (in a narrow sense); CCLM with slope adjustment; MM-CCLM; MF-CCLM; LAP; CCCM; GLM.
[0107] In a specific implementation, after determining the first model used for chrominance prediction of each pixel in the current CU block (i.e., the target coding block), the encoding end modifies the first model through an activation function, that is, enables the target model to utilize the nonlinear properties of the activation function to handle the general correlation (i.e., linear and nonlinear) problem between the brightness and chrominance of the CU block in intra-frame coding of the video.
[0108] For example, an activation function term can be introduced to correct the chrominance prediction value determined by the first model. When the introduced activation function term contains multiple terms associated with the luminance downsampling reconstruction value, the target model can also flexibly switch between different curve models and / or straight line models (i.e., the activation function sets all multiple terms associated with the luminance downsampling reconstruction value to zero) through the activation function, so that the target model can achieve a higher chrominance prediction accuracy for CU blocks with linear and nonlinear correlations between luminance and chrominance.
[0109] Step S103: Determine the chrominance prediction value of the target coding block according to the target model, the values of the various parameters, and the luminance downsampling reconstruction value of the target coding block.
[0110] In specific implementation, after determining the values of each parameter of the target model, the brightness downsampled reconstruction value of each pixel in the target coding block can be input into the target model with determined parameter values to obtain the chrominance prediction value of each pixel output by the target model.
[0111] It can be understood that the target model proposed in this application is a cross-branch general model and also a cross-branch nonlinear model (CCnLM). By introducing an activation function, the target model can better solve the CU chromaticity prediction problem when the luminance and chromaticity are nonlinearly related, while ensuring the CU chromaticity prediction accuracy of the linear correlation between luminance and chromaticity.
[0112] Step S104: Determine the chrominance reconstruction value of the target coding block according to the chrominance prediction value of the target coding block and the target difference value.
[0113] In a specific implementation, after determining the target model corresponding to the target coding block and the values of each parameter in the target model, the encoding end can determine the chrominance prediction value of the target coding block according to the target model, the values of each variable parameter, and the brightness down-sampling reconstruction value of the target coding block, and then determine the target difference value according to the chrominance prediction value of the target coding block and the chrominance true value of the target coding block, and generate the encoding information corresponding to the target coding block according to the index information of the target model, the values of each parameter, and the target difference value. Among them, the brightness down-sampling reconstruction value can be obtained by downsampling the brightness pixels of the video encoding (such as the brightness pixels with the sampling format of YUV420).
[0114] After the decoding end obtains the encoding information corresponding to the above-mentioned target coding block and the brightness down-sampling reconstruction value of the target coding block, the decoding end can know the target model established by the encoding end for the target coding block according to the activation function and the first model based on the index information of the target model. The encoding end then restores the chrominance prediction value of the target coding block determined by the encoding end based on the target model, the values of the various parameters, and the brightness down-sampling reconstruction value of the target coding block, and then determines the chrominance reconstruction value of the target coding block based on the chrominance prediction value of the target coding block and the target difference, thereby completing the decoding of the chrominance component information of the target coding block.
[0115] It can be understood that since the target model has good applicability to CU blocks with linear and non-linear correlation between brightness and chrominance, the encoding end can reduce the target difference (such as residual value) generated for the target coding block through the target model, and the data size of the coding information generated by the encoding end is also reduced, thereby improving the compression rate of video coding.
[0116] From the above steps, it can be seen that introducing the activation function into the construction of the target model enables the target model to have a higher chrominance prediction accuracy for target coding blocks with good or poor linear correlation between luminance and chrominance, thereby improving the applicability of the chrominance prediction method and improving the compression effect of video coding.
[0117] Implementation Method 1
[0118] This embodiment describes an example of target model construction.
[0119] In this embodiment, the first model used to construct the target model can be divided into the following two cases.
[0120] Case 1: The first model is used to characterize the linear mapping (linear correlation) relationship between the luma down-sampling reconstruction value and the chroma prediction value.
[0121] In a specific implementation, the first model may be a linear model related to CCLM technology.
[0122] It can be understood that CCLM technology uses a linear model to generate the predicted value of the corresponding chrominance pixel from the reconstructed value of the luminance pixel to reduce the cross redundancy. The predicted value of the chrominance pixel is calculated as follows:
[0123] pred C (i,j)=α0·rec' L (i,j)+α1
[0124] Among them, pred C (i, j) represents the predicted value of the chroma pixel at coordinate (i, j) in the CU, rec' L (i, j) represents the reconstructed value after downsampling of the luminance pixel in the same CU, and the linear model parameter values α0 and α1 are determined based on a chrominance prediction error value (such as a linear minimum square error value) of a linearly reconstructed current adjacent sampling block.
[0125] CCLM assumes that brightness and chromaticity have a linear correlation in local texture. However, sometimes the linear model cannot accurately represent the correlation between brightness and chromaticity, which makes CCLM less applicable.
[0126] From the corresponding relationship between brightness, chromaticity and RGB shown below, it can be seen that the linear correlation between brightness and chromaticity is poor at this time, and it is difficult to accurately represent the correlation between brightness and chromaticity through a linear model:
[0127] Y=0.299R+0.587G+0.114B
[0128] U=-0.1687R-0.3313G+0.5B+128
[0129] V=0.5R-0.4187G-0.0813B+128
[0130] Among them, Y represents brightness (i.e. grayscale value); U and V represent chromaticity, which is used to describe the color and saturation of the image; R, G, and B represent the colors of the red, green, and blue channels.
[0131] For the above situation 1, the present application optimizes the CCLM technology related model by introducing an activation function, such as adding an activation function term with the brightness downsampling reconstruction value as the independent variable to the CCLM technology related model (i.e., the third formula representing the first model), and / or using the activation function term to correct the parameter term where at least one brightness downsampling reconstruction value in the third formula is located, so that the optimized CCLM technology related model (i.e., the target model) can also achieve better approximation fitting for discrete points outside the straight line fitted by the above linear model, thereby achieving higher-precision chroma prediction for CUs with poor linear correlation between brightness and chroma, thereby expanding the application scope of CCLM and improving the compression rate of video encoding.
[0132] Case 2: The first model is used to characterize the nonlinear mapping (non-linear correlation) relationship between the luma down-sampling reconstruction value and the chroma prediction value.
[0133] In a specific implementation, the first model can be used to characterize the nonlinear mapping relationship between the luminance down-sampling reconstruction value and the chrominance prediction value in the curve model related to chrominance prediction.
[0134] It can be understood that, since the curve model can better represent the correlation between brightness and chromaticity, the target model is constructed by combining the activation function and the curve model. For example, at least one parameter item in the third formula representing the first model can be corrected through the activation function, so that the discrete points outside the curve fitted by the curve model can also be better approximated and fitted, which can further improve the chromaticity prediction accuracy of the target model for CUs with poor linear correlation between brightness and chromaticity.
[0135] For example, in case 2, the target model can be used to characterize the following two nonlinear mapping relationships:
[0136] Nonlinear mapping relationship 1:
[0137] pred C (i,j)=α0·((rec' L (i,j)) 2 +midValue>>bitDepth)+σ(α1·rec' L (i,j)+α2·midValue)+α3·midValue
[0138] Among them, σ() is an activation function used to correct and reduce errors; bitDepth is the bit depth, midValue is the median of the bit depth, if the bit depth is 10 bits, midValue is 512, if it is 8 bits, midValue is 128; pred C (i, j) is the chromaticity prediction value of the pixel at coordinate (i, j); rec'L (i, j) is the brightness downsampled and reconstructed value of the pixel at coordinate (i, j), α0, α1, α2, α3 are the values of the parameters; >> is a displacement operation.
[0139] Nonlinear mapping relationship 2:
[0140] pred C (i,j)=σ(α0·(((rec' L (i,j)) 2 +α1·midValue)>>bitDepth)+σ(α2·rec' L (i,j)+α3·midValue))
[0141] Among them, σ() is the activation function, bitDepth is the bit depth, midValue is the median of the bit depth, pred C (i, j) is the chromaticity prediction value of the pixel at coordinate (i, j), rec' L (i, j) is the brightness downsampled and reconstructed value of the pixel at coordinate (i, j), α0, α1, α2, α3 are the values of the parameters, and >> is a displacement operation.
[0142] It can be understood that, since the quadratic term associated with the luminance down-sampling reconstruction value in the nonlinear mapping relationship 2 is corrected using an activation function, when the activation function is zero, the nonlinear mapping relationship 2 will degenerate into a corresponding linear mapping (linear correlation) relationship, thereby realizing flexible switching of the target model between the linear model and the nonlinear model. Among them, the median of the above-mentioned bit depth is mainly used to ensure that the obtained chrominance prediction value does not overflow, and the median of the bit depth in the activation function is also used to implement the rounding operation of the independent variable in the activation function.
[0143] As a possible implementation, σ() can be a ReLU function, that is Among them, x is the independent variable in the ReLU function.
[0144] In the above-mentioned embodiment 1, the activation function is not limited to the ReLU function. In a specific implementation, the activation function can be any one of the following: ReLU function; Sigmoid function; Tanh function; Leaky ReLU function; ELU function; PReLU function; Softmax function; Swish function; Maxout function; Softplus function.
[0145] Implementation Method 2
[0146] This embodiment describes an example of parameters in the target model.
[0147] In this embodiment, the values of various variable parameters in the target model when the chrominance prediction error of the target model for the target coding block is minimized can be determined based on the true chrominance value and luminance downsampling reconstruction value of the target coding block, the values of various parameters in the target model, and the chrominance prediction error of the target model for the target coding block.
[0148] Taking target model 1 and target model 2 in the above-mentioned embodiment 2 as examples, which respectively represent nonlinear mapping relationship 1 and nonlinear mapping relationship 2, the values of each variable parameter in target models 1 and 2 can be determined respectively by the first formula and the second formula based on the true chromaticity value and the luminance down-sampling reconstruction value of the reference pixel points corresponding to the target coding block (such as the adjacent pixel points of the target coding block).
[0149] The first formula is as follows:
[0150] Loss=∑(y(i,j)-(σ((α0x(i,j) 2 +midValue)>>bitDepth)+σ(α1x(i,j)+α2midValue)+α3midValue)) 2
[0151] Among them, Loss is the linear minimum mean square error estimate, σ() is the activation function, bitDepth is the bit depth, midValue is the median of the bit depth, y(i,j) is the true chromaticity value of the pixel at coordinate (i,j), x(i,j) is the downsampled brightness reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 are parameter values, the value range of coordinate (i,j) is the coordinate value range of the reference pixel corresponding to the target coding block, and >> is a displacement operation.
[0152] The second formula is as follows:
[0153] Loss=∑(y(i,j)-(σ(α0((x(i,j) 2 +α1midValue)>>bitDepth)+σ(α2x(i,j)+α3midValue)) 2 ))
[0154] Among them, Loss is the linear minimum mean square error estimate, σ() is the activation function, bitDepth is the bit depth, midValue is the median of the bit depth, y(i,j) is the true chromaticity value of the pixel at coordinate (i,j), x(i,j) is the downsampled brightness reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 are parameter values, the value range of coordinate (i,j) is the coordinate value range of the reference pixel corresponding to the target coding block, and >> is a displacement operation.
[0155] It can be understood that the first formula and the second formula are actually based on the linear minimum mean square error (LMMSE), and the chrominance prediction error of each reference pixel point of the target model is summed to estimate the chrominance prediction error of the target model for the target coding block. Among them, the chrominance prediction error estimation of the target coding block can also be determined by other forms of criterion functions (i.e., Loss functions), which is not limited in this application.
[0156] Since the number of variable parameters of the above target model is 4, at least the true chromaticity values of 4 reference pixels and the downsampled luminance reconstruction values are required to determine the values of the 4 variable parameters d. The minimum size of the VVC video chromaticity block (i.e., the adjacent coding block used to select adjacent pixels of the target coding block) is 4x4, so it can meet the minimum number of pixels required to determine the parameters in the target model.
[0157] Taking the first formula above as an example, the parameter values a0, a1, a2, and a3 (i.e., the parameter values α0, α1, α2, and α3 mentioned above) are derived through the Loss function to obtain:
[0158]
[0159]
[0160]
[0161]
[0162] Taking the second formula above as an example, the Loss function is used to derive the parameter values a0, a1, a2, and a3 respectively to obtain:
[0163]
[0164]
[0165]
[0166]
[0167]
[0168] Among them, in the above equations 6.1~6.4 and 7.1~7.4, Loss is the linear minimum mean square error estimate; x is the independent variable; bitDepth is the bit depth, midValue is the median of the bit depth; y(i,j) is the true chromaticity value of the pixel at coordinate (i,j); x(i,j) is the downsampled brightness reconstructed value of the pixel at coordinate (i,j); a0, a1, a2, a3 are parameter values; the value range of coordinate (i,j) is the coordinate value range of the reference pixel corresponding to the target coding block; >> is a displacement operation.
[0169] In the above formulas 6.1 to 6.4 or 7.1 to 7.4: Take the Loss function at any variable parameter a i The minimum value can be estimated by the gradient in the direction (such as a1), and the values of α0, α1, α2, and α3 in the first formula or the second formula can be determined by solving the system of equations simultaneously.
[0170] In one embodiment, considering that the function values of some activation function terms require multiple parameters to be jointly determined, the initial estimated values of the multiple parameters can be determined first by using relevant formulas without introducing the activation function terms.
[0171] In a specific implementation, the values of the parameters in the third formula used to characterize the first model (i.e., initial estimated values) can be determined based on the true chrominance value and the downsampled luminance reconstruction value of the target coding block. For example, the third mapping relationship between the error estimate corresponding to the third formula and the values of the parameters in the third formula can be determined based on the true chrominance value and the downsampled luminance reconstruction value of the target coding block (such as determining the third mapping relationship through a criterion function), and then the values of the parameters in the third formula can be determined based on the third mapping relationship. It can be understood that at this time, the third formula can be regarded as the target model without the activation function related items, and the variable parameters of the third formula should at least include: all parameters associated with the activation function related items.
[0172] After obtaining the values of the parameters in the third formula, the final values of the parameters in the target model are determined according to the true chrominance value and the down-sampled luminance reconstruction value of the target coding block, and the values of the parameters in the third formula. For example, the values of the target parameter items in the target model can be determined first through the initial estimated values of the parameters, that is, the values of the parameter items corrected by the activation function are determined, and then the values of the parameters in the target model are determined according to the true chrominance value and the down-sampled luminance reconstruction value of the target coding block, and the values of the target parameter items.
[0173] As a possible implementation, the second mapping relationship between the error estimate corresponding to the target model and the values of each parameter in the target model can be determined according to the true chrominance value and the luminance downsampled reconstruction value of the target coding block, and the value of the target parameter item (such as by bringing the value of the target parameter item into the criterion function corresponding to the target model to determine the second mapping relationship), and then according to the second mapping relationship, the values of each parameter in the target model are determined. Optionally, the error estimate corresponding to the target model can be a linear minimum mean square error estimate, in which case the second mapping relationship can be determined based on LMMSE.
[0174] Exemplarily, the nonlinear mapping relationships 1 and 2 described in the first embodiment are taken as an example to illustrate the determination of parameter values in the target model.
[0175] For the nonlinear mapping relationship 1, a third mapping relationship between the error estimation value corresponding to the third formula associated with the nonlinear mapping relationship 1 and the values of each parameter in the third formula can be determined by a fourth formula according to the chrominance true value and the luminance down-sampling reconstruction value of the reference pixel point corresponding to the target coding block, wherein:
[0176] The third formula associated with the nonlinear mapping relationship 1 is as follows:
[0177] pred C (i,j)=(α0x(i,j)) 2 +midValue)>>bitDepth)+(α1x(i,j))+α2midValue)+α3midValue
[0178] Among them, pred C (i,j) is the chroma prediction value of the pixel at coordinate (i,j), bitDepth is the bit depth, midValue is the median of the bit depth, x(i,j) is the downsampled brightness reconstruction value of the pixel at coordinate (i,j), α0, α1, α2, α3 are the values of the parameters, >> is the shift operation;
[0179] The fourth formula is as follows:
[0180] Loss = Σ(y(i,j)-(((α0x(i,j)) 2 +midValue)>>bitDepth)+(α1x(i,j)+α2midValue)+α3midValue)) 2
[0181] Among them, Loss is the linear minimum mean square error estimate, bitDepth is the bit depth, midValue is the median of the bit depth, y(i,j) is the true chromaticity value of the pixel at coordinate (i,j), x(i,j) is the brightness downsampled and reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 (i.e., a0, a1, a2, a3) are the values of the parameters, the value range of the coordinate (i, j) is the coordinate value range of the reference pixel corresponding to the target coding block, and >> is a displacement operation.
[0182] For the nonlinear mapping relationship 2, a third mapping relationship between the error estimation value corresponding to the third formula associated with the nonlinear mapping relationship 2 and the values of each parameter in the third formula may be determined by a fifth formula according to the true chrominance value and the luminance down-sampling reconstruction value of the reference pixel point corresponding to the target coding block, wherein:
[0183] The third formula associated with the nonlinear mapping relationship 2 is as follows:
[0184] pred C (i,j)=((α0x(i,j) 2 +α1midValue)>>bitDepth)+(α2·x(i,j)+α3·midValue)
[0185] Among them, pred C (i,j) is the chroma prediction value of the pixel at coordinate (i,j), bitDepth is the bit depth, midValue is the median of the bit depth, x(i,j) is the downsampled brightness reconstruction value of the pixel at coordinate (i,j), α0, α1, α2, α3 are the values of the parameters, >> is the shift operation;
[0186] The fifth formula is as follows:
[0187] Loss=∑(y(i,j)-(((α0x(i,j) 2 +α1midValue)>>bitDepth)+(α2·x(i,j)+α3midValue))) 2
[0188] Among them, Loss is the linear minimum mean square error estimate, bitDepth is the bit depth, midValue is the median of the bit depth, y(i,j) is the true chromaticity value of the pixel at coordinate (i,j), x(i,j) is the brightness downsampled and reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 (i.e., a0, a1, a2, a3) are the values of the parameters, the value range of the coordinate (i, j) is the coordinate value range of the reference pixel corresponding to the target coding block, and >> is a displacement operation.
[0189] Taking the fourth formula as an example, based on the Loss function, a0, a1, a2, a3 (i.e., the parameter values α0, α1, α2, α3 mentioned above) are derived respectively:
[0190]
[0191]
[0192]
[0193]
[0194] Among them, Loss is the linear minimum mean square error estimate, bitDepth is the bit depth, midValue is the median of the bit depth, y(i,j) is the true chromaticity value of the pixel at coordinate (i,j), x(i,j) is the downsampled brightness reconstructed value of the pixel at coordinate (i,j), a0, a1, a2, a3 are parameter values, the value range of coordinate (i,j) is the coordinate value range of the reference pixel corresponding to the target coding block, and >> is a displacement operation.
[0195] In formulas (8.1) to (8.4): a0, a1, a2, and a3 can be determined through the set of simultaneous equations.
[0196] In this embodiment, considering that the coefficients of the two parameter values α2 and α3 in equations (8.1) to (8.4) are the same, and equations (8.3) and (8.4) are equivalent, the sum of α2midValue+α3midValue can be regarded as a parameter variable to simplify the calculation, that is, let: α 23 =α2+α3 (i.e. a 23 =a2+a3), then: α 23 midValue=α2midValue+α3midValue. Now simplifying equations (8.1) to (8.4) and taking the minimum value yields:
[0197] Σ(x(i,j) 2 >>bitDepth)(y(i,j)-(((a0x(i,j) 2 +midValue)>>bitDepth)+
[0198] a1x(i,j)+a 23 midValue))=0 (9.1)
[0200] Σx(i,j)(y(i,j)-(((a0x(i,j) 2+midValue)>>bitDepth)+a1x(i,j)+a 23 midValue))=0 (9.2)
[0202] Σ(y(i,j)-(((a0x(i,j) 2 +midValue)>>bitDepth)+a1x(i,j)+a 23 midValue))=0 (9.3)
[0204] According to the above formulas (9.1) to (9.3), we can get a0, a1 and a 23 . Let a2=(a 23 >>1), a3=a 23 -a2, we can get a0, a1, a2, a3 (i.e., initial estimated values). Then, we can substitute a1 and a2 into equations (6.1) and (6.4) to approximate a'0 and a'3 (i.e., α'0 and α'3), and use a'2 = a 23 +a'3 (i.e. α'2 = α 23 +α'3), to obtain a'2.
[0205] For nonlinear function related terms, such as ReLU function terms σ(a1x(i,j)+a2midValue) and σ'(a1x(i,j)+a2midValue), since a1 and a2 have been determined, and the true chromaticity value and the downsampled luminance reconstruction value of the reference pixel are known, the value of the ReLU function term determined by a1 and a2 can be known, and then the determined σ(a1x(i,j)+a2) can be substituted into formula (6.3) to determine the second mapping relationship between the error estimate corresponding to the target model and the values of each variable parameter in the target model, and then obtain the approximated a'2.
[0206] According to the a'0, a'1, a'2, a'3 (i.e., α'0, α'1, α'2, α3') determined above and the constructed target model, α'0, α'1, α'2, α'3 are introduced into the target model that characterizes the nonlinear mapping relationship 1 to realize the chrominance prediction of the target coding block in the video image, thereby improving the scope of application of chrominance prediction and the compression rate of the coded chrominance block with a small amount of computing power.
[0207] Second, as Fig.12 As shown, an embodiment of the present application provides an encoding method, which includes at least the following steps:
[0208] Step S201: constructing a target model according to the activation function and the first model, wherein the first model is used to characterize the mapping relationship between the luma down-sampling reconstruction value and the chroma prediction value;
[0209] Step S202: Determine the values of various parameters in the target model according to the true chrominance value and the down-sampled luminance reconstruction value of the target coding block;
[0210] Step S203: determining a chrominance prediction value of the target coding block according to the target model, the values of the parameters, and the luminance down-sampling reconstruction value of the target coding block;
[0211] Step S204: determining a target difference value according to the chrominance prediction value of the target coding block and the chrominance true value of the target coding block;
[0212] Step S205: Generate coding information corresponding to the target coding block according to the index information of the target model, the values of the various variable parameters, the brightness down-sampling reconstruction value of the target coding block, and the target difference value.
[0213] As a possible implementation, the first model is used to characterize the nonlinear mapping relationship between the luma down-sampling reconstruction value and the chroma prediction value.
[0214] As a possible implementation, the target model is used to represent the following mapping relationship:
[0215] pred C (i,j)=α0·((rec' L (i,j)) 2 +midValue>>bitDepth)+σ(α1·rec' L (i,j)+α2·midValue)+α3·midValue
[0216] Among them, σ() is the activation function, bitDepth is the bit depth, midValue is the median of the bit depth, pred C (i, j) is the chromaticity prediction value of the pixel at coordinate (i, j), rec' L (i, j) is the brightness downsampled and reconstructed value of the pixel at coordinate (i, j), α0, α1, α2, α3 are the values of the parameters, and >> is a displacement operation.
[0217] As a possible implementation manner, determining the values of each parameter in the target model according to the chrominance true value and the luminance down-sampling reconstruction value of the target coding block includes:
[0218] Determine the values of each parameter in the target model by a first formula according to the true chrominance value and the down-sampled luminance reconstruction value of the reference pixel corresponding to the target coding block;
[0219] The first formula is as follows:
[0220] Loss=∑(y(i,j)-(σ((α0x(i,j) 2 +midValue)>>bitDepth)+σ(α1x(i,j)+α2midValue)+α3midValue)) 2
[0221] Among them, Loss is the linear minimum mean square error estimate, σ() is the activation function, bitDepth is the bit depth, midValue is the median of the bit depth, y(i,j) is the true chromaticity value of the pixel at coordinate (i,j), x(i,j) is the downsampled brightness reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 are parameter values, the value range of coordinate (i,j) is the coordinate value range of the reference pixel corresponding to the target coding block, and >> is a displacement operation.
[0222] As a possible implementation, the target model is used to represent the following mapping relationship:
[0223] pred C (i,j)=σ(α0·(((rec' L (i,j)) 2 +α1·midValue)>>bitDepth)+σ(α2·rec' L (i,j)+α3·midValue))
[0224] Among them, σ() is the activation function, bitDepth is the bit depth, midValue is the median of the bit depth, pred C (i, j) is the chromaticity prediction value of the pixel at coordinate (i, j), rec' L (i, j) is the brightness downsampled and reconstructed value of the pixel at coordinate (i, j), α0, α1, α2, α3 are the values of the parameters, and >> is a displacement operation.
[0225] As a possible implementation manner, determining the values of each parameter in the target model according to the chrominance true value and the luminance down-sampling reconstruction value of the target coding block includes:
[0226] Determine the values of each parameter in the target model by a second formula according to the true chrominance value and the down-sampled luminance reconstruction value of the reference pixel corresponding to the target coding block;
[0227] The second formula is as follows:
[0228] Loss=Σ(y(i,j)-(σ(α0((x(i,j) 2 +α1midValue)>>bitDepth)+σ(α2x(i,j)+α3midValue)) 2 ))
[0229] Among them, Loss is the linear minimum mean square error estimate, σ() is the activation function, bitDepth is the bit depth, midValue is the median of the bit depth, y(i,j) is the true chromaticity value of the pixel at coordinate (i,j), x(i,j) is the downsampled brightness reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 are parameter values, the value range of coordinate (i,j) is the coordinate value range of the reference pixel corresponding to the target coding block, and >> is a displacement operation.
[0230] As a possible implementation manner, the first model is characterized by a third formula; and constructing a target model according to the activation function and the first model includes:
[0231] At least one parameter item in the third formula is corrected by the activation function to obtain the target model.
[0232] As a possible implementation manner, determining the values of each parameter in the target model according to the chrominance true value and the luminance down-sampling reconstruction value of the target coding block includes:
[0233] Determine the values of the parameters in the third formula according to the chrominance true value and the luminance down-sampling reconstruction value of the target coding block;
[0234] The values of the various parameters in the target model are determined according to the true chrominance value and the down-sampled luminance reconstruction value of the target coding block and the values of the various parameters in the third formula.
[0235] As a possible implementation manner, determining the values of the parameters in the target model according to the chrominance true value and the luminance down-sampling reconstruction value of the target coding block, and the values of the parameters in the third formula includes:
[0236] Determine the value of the target parameter item in the target model by the value of each parameter in the third formula, wherein the target parameter item is: the parameter item corrected by the activation function;
[0237] The values of the various parameters in the target model are determined according to the true chrominance value and the down-sampled luminance reconstruction value of the target coding block and the values of the target parameter items in the target model.
[0238] As a possible implementation manner, determining the values of each parameter in the target model according to the chrominance true value and the luminance down-sampling reconstruction value of the target coding block, and the value of the target parameter item in the target model includes:
[0239] Determine, according to the chrominance true value and the luminance down-sampled reconstruction value of the target coding block, and the value of the target parameter item in the target model, a second mapping relationship between the error estimate value corresponding to the target model and the value of each parameter in the target model;
[0240] According to the second mapping relationship, the value of each parameter in the target model is determined.
[0241] As a possible implementation, the error estimate corresponding to the target model is a linear minimum mean square error estimate.
[0242] As a possible implementation manner, determining the values of the parameters in the third formula according to the chrominance true value and the luminance down-sampling reconstruction value of the target coding block includes:
[0243] Determine, according to the chrominance true value and the luminance down-sampling reconstruction value of the target coding block, a third mapping relationship between the error estimation value corresponding to the third formula and the values of each parameter in the third formula;
[0244] According to the third mapping relationship, the values of the parameters in the third formula are determined.
[0245] As a possible implementation manner, determining a third mapping relationship between the error estimate value corresponding to the third formula and the values of each parameter in the third formula according to the chrominance true value and the luminance down-sampling reconstruction value of the target coding block includes:
[0246] Determine, by a fourth formula, a third mapping relationship between the error estimate value corresponding to the third formula and the values of each parameter in the third formula according to the true chrominance value and the luminance down-sampled reconstruction value of the reference pixel point corresponding to the target coding block;
[0247] Wherein, the third formula is as follows:
[0248] pred C (i,j)=(α0x(i,j)) 2 +midValue)>>bitDepth)+(α1x(i,j))+α2midValue)+α3midValue
[0249] Among them, pred C(i,j) is the chroma prediction value of the pixel at coordinate (i,j), bitDepth is the bit depth, midValue is the median of the bit depth, x(i,j) is the downsampled brightness reconstruction value of the pixel at coordinate (i,j), α0, α1, α2, α3 are the values of the parameters, >> is the shift operation;
[0250] The fourth formula is as follows:
[0251] Loss = Σ(y(i,j)-(((α0x(i,j)) 2 +midValue)>>bitDepth)+(α1x(i,j)+α2midValue)+α3midValue)) 2
[0252] Among them, Loss is the linear minimum mean square error estimate, bitDepth is the bit depth, midValue is the median of the bit depth, y(i,j) is the true chromaticity value of the pixel at coordinate (i,j), x(i,j) is the downsampled brightness reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 are parameter values, the value range of coordinate (i,j) is the coordinate value range of the reference pixel corresponding to the target coding block, and >> is a displacement operation.
[0253] As a possible implementation manner, determining a third mapping relationship between the error estimate value corresponding to the third formula and the values of each parameter in the third formula according to the chrominance true value and the luminance down-sampling reconstruction value of the target coding block includes:
[0254] Determine, by a fifth formula, a third mapping relationship between the error estimate value corresponding to the third formula and the values of each parameter in the third formula according to the true chrominance value and the luminance down-sampled reconstruction value of the reference pixel point corresponding to the target coding block;
[0255] Wherein, the third formula is as follows:
[0256] pred C (i,j)=((α0x(i,j) 2 +α1midValue)>>bitDepth)+(α2·x(i,j)+α3·midValue)
[0257] Among them, pred C (i,j) is the chroma prediction value of the pixel at coordinate (i,j), bitDepth is the bit depth, midValue is the median of the bit depth, x(i,j) is the downsampled brightness reconstruction value of the pixel at coordinate (i,j), α0, α1, α2, α3 are the values of the parameters, >> is the shift operation;
[0258] The fifth formula is as follows:
[0259] Loss=∑(y(i,j)-(((α0x(i,j) 2 +α1midValue)>>bitDepth)+(α2·x(i,j)+α3midValue))) 2
[0260] Among them, Loss is the linear minimum mean square error estimate, bitDepth is the bit depth, midValue is the median of the bit depth, y(i,j) is the true chromaticity value of the pixel at coordinate (i,j), x(i,j) is the downsampled brightness reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 are parameter values, the value range of coordinate (i,j) is the coordinate value range of the reference pixel corresponding to the target coding block, and >> is a displacement operation.
[0261] As a possible implementation, the activation function is any one of the following:
[0262] ReLU function;
[0263] Sigmoid function;
[0264] Tanh function;
[0265] Leaky ReLU function;
[0266] ELU function;
[0267] PReLU function;
[0268] Softmax function;
[0269] Swish function;
[0270] Maxout function;
[0271] Softplus function.
[0272] From the above steps, it can be seen that introducing the activation function into the construction of the target model enables the target model to have a higher chrominance prediction accuracy for target coding blocks with good or poor linear correlation between luminance and chrominance, thereby improving the applicability of the chrominance prediction method and improving the compression effect of video coding.
[0273] It is understandable that the encoding method and decoding method provided in the embodiments of the present application may be executed by an encoding device and a decoding device. In the embodiments of the present application, the encoding device and the decoding device are taken as examples to respectively execute the encoding method and the decoding method to illustrate the encoding device and the decoding device provided in the embodiments of the present application.
[0274] In a third aspect, an embodiment of the present application provides a decoding device, such as Fig.13 As shown, the decoding device 100 includes:
[0275] An information acquisition module 101 is used to acquire coding information corresponding to a target coding block and a brightness down-sampled reconstruction value of the target coding block, wherein the coding information at least includes: index information of a target model, values of various parameters, a brightness down-sampled reconstruction value of the target coding block, and a target difference value;
[0276] A model determination module 102, configured to determine a target model according to index information of the target model, wherein the target model is constructed according to activation parameters and a first model, wherein the first model is used to characterize a mapping relationship between a luma downsampled reconstruction value and a chroma prediction value;
[0277] A chrominance prediction module 103, configured to determine a chrominance prediction value of the target coding block according to the target model, the values of the various parameters, and the luminance down-sampling reconstruction value of the target coding block;
[0278] The chrominance reconstruction module 104 is used to determine the chrominance reconstruction value of the target coding block according to the chrominance prediction value of the target coding block and the target difference value.
[0279] Optionally, the first model is used to characterize the nonlinear mapping relationship between the luma downsampling reconstruction value and the chroma prediction value.
[0280] Optionally, the target model is used to represent the following mapping relationship:
[0281] pred C (i,j)=α0·((rec' L (i,j)) 2 +midValue>>bitDepth)+σ(α1·rec' L (i,j)+α2·midValue)+α3·midValue
[0282] Among them, σ() is the activation function, bitDepth is the bit depth, midValue is the median of the bit depth, pred C (i, j) is the chromaticity prediction value of the pixel at coordinate (i, j), rec' L (i, j) is the brightness downsampled and reconstructed value of the pixel at coordinate (i, j), α0, α1, α2, α3 are the values of the parameters, and >> is a displacement operation.
[0283] Optionally, the values of the parameters in the target model are determined by a first formula according to the true chromaticity value and the down-sampled luminance reconstructed value of the reference pixel corresponding to the target coding block;
[0284] The first formula is as follows:
[0285] Loss=∑(y(i,j)-(σ((α0x(i,j) 2 +midValue)>>bitDepth)+σ(α1x(i,j)+α2midValue)+α3midValue)) 2
[0286] Among them, Loss is the linear minimum mean square error estimate, σ() is the activation function, bitDepth is the bit depth, midValue is the median of the bit depth, y(i,j) is the true chromaticity value of the pixel at coordinate (i,j), x(i,j) is the downsampled brightness reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 are parameter values, the value range of coordinate (i,j) is the coordinate value range of the reference pixel corresponding to the target coding block, and >> is a displacement operation.
[0287] Optionally, the target model is used to represent the following mapping relationship:
[0288] pred C (i,j)=σ(α0·(((rec' L (i,j)) 2 +α1·midValue)>>bitDepth)+σ(α2·rec' L (i,j)+α3·midValue))
[0289] Among them, σ() is the activation function, bitDepth is the bit depth, midValue is the median of the bit depth, pred C (i, j) is the chromaticity prediction value of the pixel at coordinate (i, j), rec' L (i, j) is the brightness downsampled and reconstructed value of the pixel at coordinate (i, j), α0, α1, α2, α3 are the values of the parameters, and >> is a displacement operation.
[0290] Optionally, the values of the parameters in the target model are determined by a second formula according to the true chromaticity value and the luminance down-sampled reconstructed value of the reference pixel corresponding to the target coding block;
[0291] The second formula is as follows:
[0292] Loss=∑(y(i,j)-(σ(α0((x(i,j) 2 +α1midValue)>>bitDepth)+σ(α2x(i,j)+α3midValue)) 2 ))
[0293] Among them, Loss is the linear minimum mean square error estimate, σ() is the activation function, bitDepth is the bit depth, midValue is the median of the bit depth, y(i,j) is the true chromaticity value of the pixel at coordinate (i,j), x(i,j) is the downsampled brightness reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 are parameter values, the value range of coordinate (i,j) is the coordinate value range of the reference pixel corresponding to the target coding block, and >> is a displacement operation.
[0294] Optionally, the first model is characterized by a third formula; and the target model is obtained by modifying at least one parameter item in the third formula by using the activation function.
[0295] Optionally, the values of each parameter in the target model are determined based on the true chrominance value and the down-sampled luminance reconstruction value of the target coding block, and the values of each parameter in the third formula, and the values of each parameter in the third formula are determined based on the true chrominance value and the down-sampled luminance reconstruction value of the target coding block.
[0296] Optionally, the values of each parameter in the target model are determined based on the true chrominance value and the luminance downsampling reconstruction value of the target coding block, and the value of the target parameter item in the target model. The value of the target parameter item in the target model is determined by the values of each parameter in the third formula, and the target parameter item is: the parameter item corrected by the activation function.
[0297] Optionally, the values of each parameter in the target model are determined according to a second mapping relationship, wherein the second mapping relationship is: a mapping relationship between the error estimation value corresponding to the target model and the values of each parameter in the target model determined according to the true chrominance value and the luminance downsampling reconstruction value of the target coding block, and the value of the target parameter item in the target model.
[0298] Optionally, the error estimate corresponding to the target model is a linear minimum mean square error estimate.
[0299] Optionally, the values of each parameter in the third formula are determined according to a third mapping relationship, which is: a mapping relationship between the error estimation value corresponding to the third formula and the values of each parameter in the third formula determined according to the true chrominance value and the luminance downsampling reconstruction value of the target coding block.
[0300] Optionally, the third mapping relationship is determined by a fourth formula according to a true chrominance value and a luminance down-sampled reconstructed value of a reference pixel corresponding to the target coding block;
[0301] Wherein, the third formula is as follows:
[0302] pred C (i,j)=(α0x(i,j)) 2 +midValue)>>bitDepth)+(α1x(i,j))+α2midValue)+α3midValue
[0303] Among them, pred C (i,j) is the chroma prediction value of the pixel at coordinate (i,j), bitDepth is the bit depth, midValue is the median of the bit depth, x(i,j) is the downsampled brightness reconstruction value of the pixel at coordinate (i,j), α0, α1, α2, α3 are the values of the parameters, >> is the shift operation;
[0304] The fourth formula is as follows:
[0305] Loss = Σ(y(i,j)-(((α0x(i,j)) 2 +midValue)>>bitDepth)+(α1x(i,j)+α2midValue)+α3midValue)) 2
[0306] Among them, Loss is the linear minimum mean square error estimate, bitDepth is the bit depth, midValue is the median of the bit depth, y(i,j) is the true chromaticity value of the pixel at coordinate (i,j), x(i,j) is the downsampled brightness reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 are parameter values, the value range of coordinate (i,j) is the coordinate value range of the reference pixel corresponding to the target coding block, and >> is a displacement operation.
[0307] Optionally, the third mapping relationship is determined by a fifth formula according to a true chrominance value and a luminance down-sampled reconstructed value of a reference pixel corresponding to the target coding block;
[0308] Wherein, the third formula is as follows:
[0309] pred C (i,j)=((α0x(i,j) 2 +α1midValue)>>bitDepth)+(α2·x(i,j)+α3·midValue)
[0310] Among them, pred C(i,j) is the chroma prediction value of the pixel at coordinate (i,j), bitDepth is the bit depth, midValue is the median of the bit depth, x(i,j) is the downsampled brightness reconstruction value of the pixel at coordinate (i,j), α0, α1, α2, α3 are the values of the parameters, >> is the shift operation;
[0311] The fifth formula is as follows:
[0312] Loss=∑(y(i,j)-(((α0x(i,j) 2 +α1midValue)>>bitDepth)+(α2·x(i,j)+α3midValue))) 2
[0313] Among them, Loss is the linear minimum mean square error estimate, bitDepth is the bit depth, midValue is the median of the bit depth, y(i,j) is the true chromaticity value of the pixel at coordinate (i,j), x(i,j) is the downsampled brightness reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 are parameter values, the value range of coordinate (i,j) is the coordinate value range of the reference pixel corresponding to the target coding block, and >> is a displacement operation.
[0314] Optionally, the activation function is any one of the following:
[0315] ReLU function;
[0316] Sigmoid function;
[0317] Tanh function;
[0318] Leaky ReLU function;
[0319] ELU function;
[0320] PReLU function;
[0321] Softmax function;
[0322] Swish function;
[0323] Maxout function;
[0324] Softplus function.
[0325] The decoding device provided in the embodiment of the present application can implement the various processes implemented by the decoding method embodiment described in the first aspect and achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0326] In a fourth aspect, an embodiment of the present application provides a coding device, such as Fig.14As shown, the encoding device 200 includes:
[0327] A first construction module 201 is used to construct a target model according to an activation function and a first model, wherein the first model is used to characterize a mapping relationship between a luma down-sampling reconstruction value and a chroma prediction value;
[0328] A first processing module 202 is used to determine the values of various parameters in the target model according to the chrominance true value and the luminance down-sampled reconstruction value of the target coding block;
[0329] A second processing module 203 is used to determine a chrominance prediction value of the target coding block according to the target model, the values of the various parameters, and the luma down-sampling reconstruction value of the target coding block;
[0330] A third processing module 204 is used to determine a target difference value according to the chrominance prediction value of the target coding block and the chrominance true value of the target coding block;
[0331] The first generating module 205 is used to generate the encoding information corresponding to the target coding block according to the index information of the target model, the values of the various variable parameters, the brightness down-sampling reconstruction value of the target coding block, and the target difference value.
[0332] Optionally, the first model is used to characterize the nonlinear mapping relationship between the luma downsampling reconstruction value and the chroma prediction value.
[0333] Optionally, the target model is used to represent the following mapping relationship:
[0334] pred C (i,j)=α0·((rec' L (i,j)) 2 +midValue>>bitDepth)+σ(α1·rec' L (i,j)+α2·midValue)+α3·midValue
[0335] Among them, σ() is the activation function, bitDepth is the bit depth, midValue is the median of the bit depth, pred C (i, j) is the chromaticity prediction value of the pixel at coordinate (i, j), rec' L (i, j) is the brightness downsampled and reconstructed value of the pixel at coordinate (i, j), α0, α1, α2, α3 are the values of the parameters, and >> is a displacement operation.
[0336] Optionally, the first processing module 202 includes:
[0337] A first processing submodule, configured to determine the values of various parameters in the target model by a first formula according to the true chromaticity value and the down-sampled brightness reconstruction value of the reference pixel corresponding to the target coding block;
[0338] The first formula is as follows:
[0339] Loss=∑(y(i,j)-(σ((α0x(i,j) 2 +midValue)>>bitDepth)+σ(α1x(i,j)+α2midValue)+α3midValue)) 2
[0340] Among them, Loss is the linear minimum mean square error estimate, σ() is the activation function, bitDepth is the bit depth, midValue is the median of the bit depth, y(i,j) is the true chromaticity value of the pixel at coordinate (i,j), x(i,j) is the downsampled brightness reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 are parameter values, the value range of coordinate (i,j) is the coordinate value range of the reference pixel corresponding to the target coding block, and >> is a displacement operation.
[0341] Optionally, the target model is used to represent the following mapping relationship:
[0342] pred C (i,j)=σ(α0·(((rec' L (i,j)) 2 +α1·midValue)>>bitDepth)+σ(α2·rec' L (i,j)+α3·midValue))
[0343] Among them, σ() is the activation function, bitDepth is the bit depth, midValue is the median of the bit depth, pred C (i, j) is the chromaticity prediction value of the pixel at coordinate (i, j), rec' L (i, j) is the brightness downsampled and reconstructed value of the pixel at coordinate (i, j), α0, α1, α2, α3 are the values of the parameters, and >> is a displacement operation.
[0344] Optionally, the first processing module 202 includes:
[0345] A second processing submodule, configured to determine the values of various parameters in the target model by a second formula according to the true chrominance value and the down-sampled luminance reconstruction value of the reference pixel corresponding to the target coding block;
[0346] The second formula is as follows:
[0347] Loss=∑(y(i,j)-(σ(α0((x(i,j) 2 +α1midValue)>>bitDepth)+σ(α2x(i,j)+α3midValue)) 2 ))
[0348] Among them, Loss is the linear minimum mean square error estimate, σ() is the activation function, bitDepth is the bit depth, midValue is the median of the bit depth, y(i,j) is the true chromaticity value of the pixel at coordinate (i,j), x(i,j) is the downsampled brightness reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 are parameter values, the value range of coordinate (i,j) is the coordinate value range of the reference pixel corresponding to the target coding block, and >> is a displacement operation.
[0349] Optionally, the first model is characterized by a third formula; the first building module 201 includes:
[0350] The first construction submodule is used to modify at least one parameter item in the third formula through the activation function to obtain the target model.
[0351] Optionally, the first processing module 202 includes:
[0352] A third processing submodule, configured to determine the values of the parameters in the third formula according to the chrominance true value and the luminance down-sampling reconstruction value of the target coding block;
[0353] The fourth processing submodule is used to determine the values of each parameter in the target model according to the chrominance true value and the luminance down-sampling reconstruction value of the target coding block and the values of each parameter in the third formula.
[0354] Optionally, the fourth processing submodule includes:
[0355] A fifth processing submodule, used to determine the value of a target parameter item in the target model according to the values of each parameter in the third formula, wherein the target parameter item is: a parameter item corrected by an activation function;
[0356] The sixth processing submodule is used to determine the values of each parameter in the target model according to the chrominance true value and the luminance down-sampling reconstruction value of the target coding block and the value of the target parameter item in the target model.
[0357] Optionally, the sixth processing submodule includes:
[0358] a seventh processing submodule, configured to determine a second mapping relationship between an error estimate corresponding to the target model and values of each parameter in the target model according to the true chrominance value and the luminance down-sampled reconstruction value of the target coding block and the value of the target parameter item in the target model;
[0359] An eighth processing submodule is used to determine the value of each parameter in the target model according to the second mapping relationship.
[0360] Optionally, the error estimate corresponding to the target model is a linear minimum mean square error estimate.
[0361] Optionally, the third processing submodule includes:
[0362] a ninth processing submodule, configured to determine, according to the chrominance true value and the luminance down-sampling reconstruction value of the target coding block, a third mapping relationship between the error estimation value corresponding to the third formula and the values of each parameter in the third formula;
[0363] The tenth processing submodule is used to determine the value of each parameter in the third formula according to the third mapping relationship.
[0364] Optionally, the ninth processing submodule includes:
[0365] an eleventh processing submodule, configured to determine, by a fourth formula, a third mapping relationship between the error estimate value corresponding to the third formula and the values of each parameter in the third formula according to the true chrominance value and the luminance down-sampled reconstruction value of the reference pixel point corresponding to the target coding block;
[0366] Wherein, the third formula is as follows:
[0367] pred C (i,j)=(α0x(i,j)) 2 +midValue)>>bitDepth)+(α1x(i,j))+α2midValue)+α3midValue
[0368] Among them, pred C (i,j) is the chroma prediction value of the pixel at coordinate (i,j), bitDepth is the bit depth, midValue is the median of the bit depth, x(i,j) is the downsampled brightness reconstruction value of the pixel at coordinate (i,j), α0, α1, α2, α3 are the values of the parameters, >> is the shift operation;
[0369] The fourth formula is as follows:
[0370] Loss = Σ(y(i,j)-(((α0x(i,j)) 2+midValue)>>bitDepth)+(α1x(i,j)+α2midValue)+α3midValue)) 2
[0371] Among them, Loss is the linear minimum mean square error estimate, bitDepth is the bit depth, midValue is the median of the bit depth, y(i,j) is the true chromaticity value of the pixel at coordinate (i,j), x(i,j) is the downsampled brightness reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 are parameter values, the value range of coordinate (i,j) is the coordinate value range of the reference pixel corresponding to the target coding block, and >> is a displacement operation.
[0372] Optionally, the ninth processing submodule includes:
[0373] A twelfth processing submodule is used to determine, according to the chrominance true value and the luminance down-sampled reconstruction value of the reference pixel point corresponding to the target coding block, a third mapping relationship between the error estimation value corresponding to the third formula and the values of each parameter in the third formula through a fifth formula;
[0374] Wherein, the third formula is as follows:
[0375] pred C (i,j)=((α0x(i,j) 2 +α1midValue)>>bitDepth)+(α2·x(i,j)+α3·midValue)
[0376] Among them, pred C (i,j) is the chroma prediction value of the pixel at coordinate (i,j), bitDepth is the bit depth, midValue is the median of the bit depth, x(i,j) is the downsampled brightness reconstruction value of the pixel at coordinate (i,j), α0, α1, α2, α3 are the values of the parameters, >> is the shift operation;
[0377] The fifth formula is as follows:
[0378] Loss=∑(y(i,j)-(((α0x(i,j) 2 +α1midValue)>>bitDepth)+(α2·x(i,j)+α3midValue))) 2
[0379] Among them, Loss is the linear minimum mean square error estimate, bitDepth is the bit depth, midValue is the median of the bit depth, y(i,j) is the true chromaticity value of the pixel at coordinate (i,j), x(i,j) is the downsampled brightness reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 are parameter values, the value range of coordinate (i,j) is the coordinate value range of the reference pixel corresponding to the target coding block, and >> is a displacement operation.
[0380] Optionally, the activation function is any one of the following:
[0381] ReLU function;
[0382] Sigmoid function;
[0383] Tanh function;
[0384] Leaky ReLU function;
[0385] ELU function;
[0386] PReLU function;
[0387] Softmax function;
[0388] Swish function;
[0389] Maxout function;
[0390] Softplus function.
[0391] The encoding device provided in the embodiment of the present application can implement the various processes implemented by the encoding method embodiment described in the second aspect and achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0392] An embodiment of the present application also provides a decoding device, including a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the various processes of the above-mentioned decoding method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not repeated here.
[0393] An embodiment of the present application also provides an encoding device, including a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the various processes of the above-mentioned encoding method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not repeated here.
[0394] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned encoding method embodiment or the above-mentioned decoding method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0395] The processor is the processor in the terminal device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0396] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned encoding method embodiment or the above-mentioned decoding method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0397] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0398] The embodiments of the present application further provide a computer program / program product, which is stored in a storage medium, and is executed by at least one processor to implement the various processes of the above-mentioned encoding method embodiment or the above-mentioned decoding method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0399] An embodiment of the present application also provides a coding and decoding system, including: a coding device and a decoding device, wherein the coding device is used to execute the steps of the coding method described in the second aspect above, and the decoding device is used to execute the steps of the decoding method described in the first aspect above.
[0400] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0401] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0402] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A decoding method, characterized in that: The method comprises: Obtaining encoding information corresponding to a target coding block, the encoding information including at least: index information of a target model, values of various parameters, a brightness down-sampled reconstruction value of the target coding block, and a target difference value; Determining a target model according to the index information of the target model, wherein the target model is constructed according to the activation parameter and the first model, wherein the first model is used to characterize a mapping relationship between a luma down-sampling reconstruction value and a chroma prediction value; Determine a chrominance prediction value of the target coding block according to the target model, the values of the parameters, and the luma downsampled reconstruction value of the target coding block; A chrominance reconstruction value of the target coding block is determined according to the chrominance prediction value of the target coding block and the target difference value.
2. The method according to claim 1, characterized in that: The first model is used to characterize the nonlinear mapping relationship between the luminance downsampling reconstruction value and the chrominance prediction value.
3. The method according to claim 2, characterized in that The target model is used to characterize the following mapping relationship: pred C (i,j)=α0·((rec' L (i,j)) 2 +midValue>>bitDepth)+σ(α1·rec' L (i,j)+α2·midValue)+α3·midValue Among them, σ() is the activation function, bitDepth is the bit depth, midValue is the median of the bit depth, pred C (i, j) is the chromaticity prediction value of the pixel at coordinate (i, j), rec' L (i, j) is the brightness downsampled and reconstructed value of the pixel at coordinate (i, j), α0, α1, α2, α3 are the values of the parameters, and >> is a displacement operation.
4. The method according to claim 3, characterized in that The values of the parameters in the target model are determined by a first formula according to the true chrominance value and the down-sampled luminance reconstruction value of the reference pixel corresponding to the target coding block; The first formula is as follows: Loss=∑(y(i,j)-(σ((α0x(i,j) 2 +midValue)>>bitDepth)+σ(α1x(i,j)+α2midValue)+α3midValue)) 2 Among them, Loss is the linear minimum mean square error estimate, σ() is the activation function, bitDepth is the bit depth, midValue is the median of the bit depth, y(i,j) is the true chromaticity value of the pixel at coordinate (i,j), x(i,j) is the downsampled brightness reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 are parameter values, the value range of coordinate (i,j) is the coordinate value range of the reference pixel corresponding to the target coding block, and >> is a displacement operation.
5. The method according to claim 2, characterized in that: The target model is used to characterize the following mapping relationship: pred C (i,j)=σ(α0·(((rec' L (i,j)) 2 +α1·midValue)>>bitDepth)+σ(α2·rec' L (i,j)+α3·midValue)) Among them, σ() is the activation function, bitDepth is the bit depth, midValue is the median of the bit depth, pred C (i, j) is the chromaticity prediction value of the pixel at coordinate (i, j), rec' L (i, j) is the brightness downsampled and reconstructed value of the pixel at coordinate (i, j), α0, α1, α2, α3 are the values of the parameters, and >> is a displacement operation.
6. The method according to claim 5, characterized in that The values of the parameters in the target model are determined by a second formula according to the true chrominance value and the luminance down-sampled reconstruction value of the reference pixel corresponding to the target coding block; The second formula is as follows: Loss=∑(y(i,j)-(σ(α0((x(i,j) 2 +α1midValue)>>bitDepth)+σ(α2x(i,j)+α3midValue)) 2 )) Among them, Loss is the linear minimum mean square error estimate, σ() is the activation function, bitDepth is the bit depth, midValue is the median of the bit depth, y(i,j) is the true chromaticity value of the pixel at coordinate (i,j), x(i,j) is the downsampled brightness reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 are parameter values, the value range of coordinate (i,j) is the coordinate value range of the reference pixel corresponding to the target coding block, and >> is a displacement operation.
7. The method according to claim 1, characterized in that The first model is characterized by a third formula; the target model is obtained by modifying at least one parameter item in the third formula by using the activation function.
8. The method according to claim 7, characterized in that The values of each parameter in the target model are determined based on the true chrominance value and the down-sampled luminance reconstruction value of the target coding block, and the values of each parameter in the third formula, and the values of each parameter in the third formula are determined based on the true chrominance value and the down-sampled luminance reconstruction value of the target coding block.
9. The method according to claim 8, characterized in that The values of each parameter in the target model are determined based on the true chrominance value and the luminance downsampling reconstruction value of the target coding block, and the value of the target parameter item in the target model. The value of the target parameter item in the target model is determined by the values of each parameter in the third formula, and the target parameter item is: the parameter item corrected by the activation function.
10. The method according to claim 9, characterized in that The values of each parameter in the target model are determined according to a second mapping relationship, which is: a mapping relationship between the error estimation value corresponding to the target model and the values of each parameter in the target model determined according to the true chrominance value and the luminance downsampling reconstruction value of the target coding block, and the value of the target parameter item in the target model.
11. The method according to claim 10, characterized in that The error estimate corresponding to the target model is a linear minimum mean square error estimate.
12. The method according to claim 8, characterized in that The values of each parameter in the third formula are determined according to a third mapping relationship, which is: a mapping relationship between the error estimation value corresponding to the third formula and the values of each parameter in the third formula determined according to the true chrominance value and the luminance downsampling reconstruction value of the target coding block.
13. The method according to claim 12, characterized in that The third mapping relationship is determined by a fourth formula according to the chrominance true value and the luminance down-sampled reconstruction value of the reference pixel corresponding to the target coding block; Wherein, the third formula is as follows: pred C (i,j)=(α0x(i,j)) 2 +midValue)>>bitDepth)+(α1x(i,j))+α2midValue)+α3midValue Among them, pred C (i,j) is the chroma prediction value of the pixel at coordinate (i,j), bitDepth is the bit depth, midValue is the median of the bit depth, x(i,j) is the downsampled brightness reconstruction value of the pixel at coordinate (i,j), α0, α1, α2, α3 are the values of the parameters, >> is the shift operation; The fourth formula is as follows: Loss=Σ(y(i,j)-(((α0x(i,j) 2 +midValue)>>bitDepth)+(α1x(i,j)+α2midValue)+α3midValue)) 2 Among them, Loss is the linear minimum mean square error estimate, bitDepth is the bit depth, midValue is the median of the bit depth, y(i,j) is the true chromaticity value of the pixel at coordinate (i,j), x(i,j) is the downsampled brightness reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 are parameter values, the value range of coordinate (i,j) is the coordinate value range of the reference pixel corresponding to the target coding block, and >> is a displacement operation.
14. The method according to claim 12, characterized in that The third mapping relationship is determined by the fifth formula according to the chrominance true value and the luminance down-sampled reconstruction value of the reference pixel corresponding to the target coding block; Wherein, the third formula is as follows: pred C (i,j)=((α0x(i,j) 2 +α1midValue)>>bitDepth)+(α2·x(i,j)+α3·midValue) Among them, pred C (i,j) is the chroma prediction value of the pixel at coordinate (i,j), bitDepth is the bit depth, midValue is the median of the bit depth, x(i,j) is the downsampled brightness reconstruction value of the pixel at coordinate (i,j), α0, α1, α2, α3 are the values of the parameters, >> is the shift operation; The fifth formula is as follows: Loss=∑(y(i,j)-(((α0x(i,j) 2 +α1midValue)>>bitDepth)+(α2·x(i,j)+α3midValue))) 2 Among them, Loss is the linear minimum mean square error estimate, bitDepth is the bit depth, midValue is the median of the bit depth, y(i,j) is the true chromaticity value of the pixel at coordinate (i,j), x(i,j) is the downsampled brightness reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 are parameter values, the value range of coordinate (i,j) is the coordinate value range of the reference pixel corresponding to the target coding block, and >> is a displacement operation.
15. The method according to any one of claims 1 to 14, characterized in that: The activation function is any of the following: ReLU function; Sigmoid function; Tanh function; Leaky ReLU function; ELU function; PReLU function; Softmax function; Swish function; Maxout function; Softplus function.
16. A coding method, characterized in that: The method comprises: Constructing a target model according to the activation function and the first model, wherein the first model is used to characterize a mapping relationship between a luma down-sampling reconstruction value and a chroma prediction value; Determining the values of each parameter in the target model according to the chrominance true value and the luminance down-sampled reconstruction value of the target coding block; Determine a chrominance prediction value of the target coding block according to the target model, the values of the parameters, and the luma downsampled reconstruction value of the target coding block; Determining a target difference value according to a chrominance prediction value of the target coding block and a chrominance true value of the target coding block; The encoding information corresponding to the target coding block is generated according to the index information of the target model, the values of the various variable parameters, the brightness down-sampling reconstruction value of the target coding block, and the target difference value.
17. The method according to claim 16, characterized in that The first model is used to characterize the nonlinear mapping relationship between the luminance downsampling reconstruction value and the chrominance prediction value.
18. The method according to claim 17, characterized in that The target model is used to characterize the following mapping relationship: pred C (i,j)=α0·((rec' L (i,j)) 2 +midValue>>bitDepth)+σ(α1·rec' L (i,j)+α2·midValue)+α3·midValue Among them, σ() is the activation function, bitDepth is the bit depth, midValue is the median of the bit depth, pred C (i, j) is the chromaticity prediction value of the pixel at coordinate (i, j), rec' L (i, j) is the brightness downsampled and reconstructed value of the pixel at coordinate (i, j), α0, α1, α2, α3 are the values of the parameters, and >> is a displacement operation.
19. The method according to claim 18, characterized in that According to the chrominance true value and the luminance down-sampling reconstruction value of the target coding block, the values of the parameters in the target model are determined, including: Determine the values of each parameter in the target model by a first formula according to the true chrominance value and the down-sampled luminance reconstruction value of the reference pixel corresponding to the target coding block; The first formula is as follows: Loss=Σ(y(i,j)-(σ((α0x(i,j) 2 +midValue)>>bitDepth)+σ(α1x(i,j)+α2midValue)+α3midValue)) 2 Among them, Loss is the linear minimum mean square error estimate, σ() is the activation function, bitDepth is the bit depth, midValue is the median of the bit depth, y(i,j) is the true chromaticity value of the pixel at coordinate (i,j), x(i,j) is the downsampled brightness reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 are parameter values, the value range of coordinate (i,j) is the coordinate value range of the reference pixel corresponding to the target coding block, and >> is a displacement operation.
20. The method according to claim 17, characterized in that The target model is used to characterize the following mapping relationship: pred C (i,j)=σ(α0·(((rec' L (i,j)) 2 +α1·midValue)>>bitDepth)+σ(α2·rec' L (i,j)+α3·midValue)) Among them, σ() is the activation function, bitDepth is the bit depth, midValue is the median of the bit depth, pred C (i, j) is the chromaticity prediction value of the pixel at coordinate (i, j), rec' L (i, j) is the brightness downsampled and reconstructed value of the pixel at coordinate (i, j), α0, α1, α2, α3 are the values of the parameters, and >> is a displacement operation.
21. The method according to claim 20, characterized in that According to the chrominance true value and the luminance down-sampling reconstruction value of the target coding block, the values of the parameters in the target model are determined, including: Determine the values of each parameter in the target model by a second formula according to the true chrominance value and the down-sampled luminance reconstruction value of the reference pixel corresponding to the target coding block; The second formula is as follows: Loss=∑(y(i,j)-(σ(α0((x(i,j) 2 +α1midValue)>>bitDepth)+σ(α2x(i,j)+α3midValue)) 2 )) Among them, Loss is the linear minimum mean square error estimate, σ() is the activation function, bitDepth is the bit depth, midValue is the median of the bit depth, y(i,j) is the true chromaticity value of the pixel at coordinate (i,j), x(i,j) is the downsampled brightness reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 are parameter values, the value range of coordinate (i,j) is the coordinate value range of the reference pixel corresponding to the target coding block, and >> is a displacement operation.
22. The method according to claim 16, characterized in that The first model is characterized by a third formula; and a target model is constructed according to the activation function and the first model, including: At least one parameter item in the third formula is corrected by the activation function to obtain the target model.
23. The method according to claim 22, characterized in that According to the chrominance true value and the luminance down-sampling reconstruction value of the target coding block, the values of the parameters in the target model are determined, including: Determine the values of the parameters in the third formula according to the chrominance true value and the luminance down-sampling reconstruction value of the target coding block; The values of the various parameters in the target model are determined according to the true chrominance value and the down-sampled luminance reconstruction value of the target coding block and the values of the various parameters in the third formula.
24. The method according to claim 23, characterized in that Determining the values of the parameters in the target model according to the chrominance true value and the luminance down-sampling reconstruction value of the target coding block and the values of the parameters in the third formula includes: Determine the value of the target parameter item in the target model by the value of each parameter in the third formula, wherein the target parameter item is: the parameter item corrected by the activation function; The values of the various parameters in the target model are determined according to the true chrominance value and the down-sampled luminance reconstruction value of the target coding block and the values of the target parameter items in the target model.
25. The method according to claim 24, characterized in that Determining the values of each parameter in the target model according to the chrominance true value and the luminance down-sampled reconstruction value of the target coding block and the value of the target parameter item in the target model, including: Determine, according to the chrominance true value and the luminance down-sampled reconstruction value of the target coding block, and the value of the target parameter item in the target model, a second mapping relationship between the error estimate value corresponding to the target model and the value of each parameter in the target model; According to the second mapping relationship, the value of each parameter in the target model is determined.
26. The method according to claim 25, characterized in that The error estimate corresponding to the target model is a linear minimum mean square error estimate.
27. The method according to claim 23, characterized in that Determining the values of the parameters in the third formula according to the chrominance true value and the luminance down-sampling reconstruction value of the target coding block includes: Determine, according to the chrominance true value and the luminance down-sampling reconstruction value of the target coding block, a third mapping relationship between the error estimation value corresponding to the third formula and the values of each parameter in the third formula; According to the third mapping relationship, the values of the parameters in the third formula are determined.
28. The method according to claim 27, characterized in that Determining, according to the chrominance true value and the luminance down-sampling reconstruction value of the target coding block, a third mapping relationship between the error estimation value corresponding to the third formula and the values of each parameter in the third formula, comprising: Determine, by a fourth formula, a third mapping relationship between the error estimate value corresponding to the third formula and the values of each parameter in the third formula according to the true chrominance value and the luminance down-sampled reconstruction value of the reference pixel point corresponding to the target coding block; Wherein, the third formula is as follows: pred C (i,j)=(α0x(i,j)) 2 +midValue)>>bitDepth)+(α1x(i,j))+α2midValue)+α3midValue Among them, pred C (i,j) is the chroma prediction value of the pixel at coordinate (i,j), bitDepth is the bit depth, midValue is the median of the bit depth, x(i,j) is the downsampled brightness reconstruction value of the pixel at coordinate (i,j), α0, α1, α2, α3 are the values of the parameters, >> is the shift operation; The fourth formula is as follows: Loss=Σ(y(i,j)-(((α0x(i,j) 2 +midValue)>>bitDepth)+(α1x(i,j)+α2midValue)+α3midValue)) 2 Among them, Loss is the linear minimum mean square error estimate, bitDepth is the bit depth, midValue is the median of the bit depth, y(i,j) is the true chromaticity value of the pixel at coordinate (i,j), x(i,j) is the downsampled brightness reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 are parameter values, the value range of coordinate (i,j) is the coordinate value range of the reference pixel corresponding to the target coding block, and >> is a displacement operation.
29. The method according to claim 27, characterized in that Determining, according to the chrominance true value and the luminance down-sampling reconstruction value of the target coding block, a third mapping relationship between the error estimation value corresponding to the third formula and the values of each parameter in the third formula, comprising: Determine, by a fifth formula, a third mapping relationship between the error estimate value corresponding to the third formula and the values of each parameter in the third formula according to the true chrominance value and the luminance down-sampled reconstruction value of the reference pixel point corresponding to the target coding block; Wherein, the third formula is as follows: pred C (i,j)=((α0x(i,j) 2 +α1midValue)>>bitDepth)+(α2·x(i,j)+α3·midValue) Among them, pred C (i,j) is the chroma prediction value of the pixel at coordinate (i,j), bitDepth is the bit depth, midValue is the median of the bit depth, x(i,j) is the downsampled brightness reconstruction value of the pixel at coordinate (i,j), α0, α1, α2, α3 are the values of the parameters, >> is the shift operation; The fifth formula is as follows: Loss=∑(y(i,j)-(((α0x(i,j) 2 +α1midValue)>>bitDepth)+(α2·x(i,j)+α3midValue))) 2 Among them, Loss is the linear minimum mean square error estimate, bitDepth is the bit depth, midValue is the median of the bit depth, y(i,j) is the true chromaticity value of the pixel at coordinate (i,j), x(i,j) is the downsampled brightness reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 are parameter values, the value range of coordinate (i,j) is the coordinate value range of the reference pixel corresponding to the target coding block, and >> is a displacement operation.
30. The method according to any one of claims 16 to 29, characterized in that: The activation function is any of the following: ReLU function; Sigmoid function; Tanh function; Leaky ReLU function; ELU function; PReLU function; Softmax function; Swish function; Maxout function; Softplus function.
31. A decoding device, characterized in that: The device comprises: An information acquisition module, used to acquire encoding information corresponding to a target coding block and a brightness down-sampled reconstruction value of the target coding block, wherein the encoding information at least includes: index information of a target model, values of various parameters, a brightness down-sampled reconstruction value of the target coding block, and a target difference value; A model determination module, used to determine a target model according to the index information of the target model, wherein the target model is constructed according to the activation parameter and the first model, wherein the first model is used to characterize a mapping relationship between a luma down-sampling reconstruction value and a chroma prediction value; A chrominance prediction module, configured to determine a chrominance prediction value of the target coding block according to the target model, the values of the various parameters, and the luminance down-sampling reconstruction value of the target coding block; The chrominance reconstruction module is used to determine the chrominance reconstruction value of the target coding block according to the chrominance prediction value of the target coding block and the target difference value.
32. A coding device, characterized in that: The device comprises: A first construction module is used to construct a target model according to the activation function and the first model, wherein the first model is used to characterize the mapping relationship between the luma down-sampling reconstruction value and the chroma prediction value; A first processing module, used to determine the values of various parameters in the target model according to the chrominance true value and the luminance down-sampling reconstruction value of the target coding block; A second processing module, configured to determine a chrominance prediction value of the target coding block according to the target model, the values of the parameters, and the luma down-sampling reconstruction value of the target coding block; A third processing module, configured to determine a target difference value according to the chrominance prediction value of the target coding block and the chrominance true value of the target coding block; The first generating module is used to generate the encoding information corresponding to the target coding block according to the index information of the target model, the values of the various variable parameters, the brightness downsampling reconstruction value of the target coding block, and the target difference value.
33. A decoding device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the decoding method according to any one of claims 1 to 15 are implemented.
34. A coding device, characterized in that It comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the encoding method according to any one of claims 16 to 30 are implemented.
Citation Information
Cited By
Coding method, decoding method, apparatus, and device
EP4697713A1
