Coding method, decoding method, apparatus, and device
By introducing a nonlinear activation function into the video encoding and decoding technology to deal with the nonlinear correlation between brightness and chroma, the problem of poor compression effect of the chroma prediction method in the existing technology under nonlinear conditions is solved, and the performance is improved. Compression effect and applicability of video coding.
Patent Information
- Application Number
- PCT/CN2024/086304
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-12
- Filing Date
- 2024-04-07
- Publication Date
- 2024-10-17
AI Technical Summary
In existing video encoding and decoding technology, the chroma prediction method based on the cross-branch linear model assumes a linear relationship between brightness and chroma, resulting in poor compression results in non-linear correlation situations and affecting the compression effect of video coding.
The nonlinear activation function is introduced into the construction of the target model, so that the target model can handle the nonlinear correlation between brightness and chroma, and improve the accuracy and applicability of chroma prediction.
By improving the accuracy and applicability of chroma prediction, the compression effect of video coding is improved, the applicable scope of video coding is expanded, and a better compression rate is achieved.
Smart Images

Figure CN2024086304_17102024_PF_FP_ABST
Abstract
Description
Coding method, decoding method, device and equipment
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This disclosure claims priority to Chinese patent application number 202310390826.2, filed with the China Patent Office on April 12, 2023, entitled “A Coding Method, Decoding Method, Device and Equipment,” the entire contents of which are incorporated by reference into this disclosure. Technical Field
[0003] The present application belongs to the field of video coding and decoding technology, and specifically relates to an encoding method, a decoding method, an apparatus and a device. Background Art
[0004] In video coding and decoding, since luminance and chrominance have a certain correlation, in order to remove the redundancy between different luminance and chrominance components, Versatile Video Coding (VVC) proposes an intra-frame prediction mode based on the Cross-Component Linear Model (CCLM).
[0005] However, since CCLM assumes that the chrominance pixel values and their corresponding luminance pixel values of the same coding unit (CU) have a linear relationship, and uses a linear model to generate the predicted values of the corresponding chrominance pixels from the reconstructed values of the luminance pixels, the chrominance prediction method based on CCLM has low applicability, which affects the compression effect of video coding.
[0006] Summary of the Invention
[0007] The embodiments of the present application provide an encoding method, a decoding method, an apparatus, and a device, which are conducive to improving the applicability of the chrominance prediction method and improving the compression effect of video encoding.
[0008] In a first aspect, a decoding method is provided, comprising:
[0009] 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 luminance downsampled reconstructed value of the target coding block, and a target difference value;
[0010] Determining a target model according to the index information of the target model, where the target model is constructed according to the activation parameter and a first model, where the first model is used to characterize a mapping relationship between a luma downsampled reconstructed value and a chroma prediction value;
[0011] Determining a chrominance prediction value of the target coding block according to the target model, the values of the parameters, and the luma downsampled reconstructed value of the target coding block;
[0012] A chroma reconstruction value of the target coding block is determined according to the chroma prediction value of the target coding block and the target difference value.
[0013] In a second aspect, an encoding method is provided, comprising:
[0014] 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 downsampled reconstruction value and a chroma prediction value;
[0015] Determining the values of various parameters in the target model according to the true chrominance value and the luma downsampled reconstruction value of the target coding block;
[0016] Determining a chrominance prediction value of the target coding block according to the target model, the values of the parameters, and the luma downsampled reconstructed value of the target coding block;
[0017] 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;
[0018] The coding 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 luminance down-sampling reconstruction value of the target coding block, and the target difference value.
[0019] According to a third aspect, a decoding device is provided, the device comprising:
[0020] An information acquisition module is configured to acquire coding information corresponding to a target coding block and a luminance downsampled reconstructed value of the target coding block, wherein the coding information includes at least: index information of a target model, values of various parameters, a luminance downsampled reconstructed value of the target coding block, and a target difference value;
[0021] a model determination module, configured to determine a target model based on the index information of the target model, wherein the target model is constructed based on the activation parameters and a first model, wherein the first model is configured to characterize a mapping relationship between a luma downsampled reconstructed value and a chroma prediction value;
[0022] a chroma prediction module, configured to determine a chroma prediction value of the target coding block based on the target model, the values of the parameters, and the luma downsampled reconstruction value of the target coding block;
[0023] A chroma reconstruction module is used to determine a chroma reconstruction value of the target coding block according to the chroma prediction value of the target coding block and the target difference value.
[0024] In a fourth aspect, an encoding device is provided, the device comprising:
[0025] A first construction module is configured to construct a target model based on the activation function and the first model, wherein the first model is configured to characterize a mapping relationship between a luma downsampled reconstruction value and a chroma prediction value;
[0026] A first processing module is used to determine the value of each parameter in the target model according to the chrominance true value and the luminance down-sampled reconstructed value of the target coding block;
[0027] 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 downsampled reconstruction value of the target coding block;
[0028] 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;
[0029] The first generation module is used to 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 downsampling reconstruction value of the target coding block, and the target difference value.
[0030] In a fifth aspect, a computing and processing device is provided, comprising:
[0031] a memory having computer readable code stored therein; and
[0032] One or more processors, when the computer-readable code is executed by the one or more processors, the computing processing device performs the decoding method as described in the first aspect or performs the encoding method as described in the second aspect.
[0033] In a sixth aspect, a computer program is provided, comprising a computer-readable code, which, when executed on a computing and processing device, causes the computing and processing device to execute the decoding method according to the first aspect or the encoding method according to the second aspect.
[0034] According to a seventh aspect, a computer-readable medium stores the computer program according to the seventh aspect.
[0035] In an eighth 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.
[0036] In the ninth 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.
[0037] In the tenth 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.
[0038] In the eleventh 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.
[0039] In the twelfth aspect, a chip is provided, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the encoding method as described in the second aspect, or to implement the decoding method as described in the third aspect.
[0040] In the thirteenth aspect, a computer program / program product is provided, which is stored in a storage medium and 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.
[0041] 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.
[0042] The above description is only an overview of the technical solution of the present disclosure. In order to more clearly understand the technical means of the present disclosure, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present disclosure more obvious and easy to understand, the specific implementation methods of the present disclosure are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or related technologies, the following is a brief introduction to the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0044] FIG1 is a schematic diagram of a luminance sample block in an embodiment of the present application;
[0045] FIG2 is a schematic diagram of a chroma sample block in an embodiment of the present application;
[0046] FIG3 is a schematic diagram of a luminance and chromaticity value distribution in an embodiment of the present application;
[0047] FIG4 is a schematic diagram of another luminance and chromaticity value distribution in an embodiment of the present application;
[0048] FIG5 is a schematic diagram of each segmented region in the multimodal linear model in an embodiment of the present application;
[0049] FIG6 is a schematic diagram of pixel grouping in an embodiment of the present application;
[0050] FIG7 is a schematic diagram of a filter in an embodiment of the present application;
[0051] FIG8 is a schematic diagram of another filter in an embodiment of the present application;
[0052] FIG9 is a schematic diagram of another filter in an embodiment of the present application;
[0053] FIG10 is a schematic diagram of another filter in an embodiment of the present application;
[0054] FIG11 is a flowchart of a decoding method according to an embodiment of the present application;
[0055] FIG12 is a flowchart of an encoding method according to an embodiment of the present application;
[0056] FIG13 is a structural block diagram of a decoding device according to an embodiment of the present application;
[0057] FIG14 is a structural block diagram of an encoding device according to an embodiment of the present application;
[0058] FIG15 schematically shows a block diagram of a computing processing device for executing the method according to the present disclosure; and
[0059] FIG16 schematically shows a storage unit for holding or carrying program codes for implementing the method according to the present disclosure. Specific embodiments
[0060] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present disclosure without making any creative efforts shall fall within the scope of protection of the present disclosure.
[0061] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first" and "second" are generally of the same type, and do not limit the number of objects. For example, the first object can be one or at least two. In addition, the term "and / or" in the specification and claims refers to at least one of the connected objects, and the character " / " generally indicates that the objects connected are in an "or" relationship.
[0062] Compared to the previous generation video codec standard HEVC (H.265), VVC (H.266) adds CCLM. CCLM technology can be divided into the following seven technologies.
[0063] 1. CCLM (in a narrow sense):
[0064] This technology assumes that the chrominance pixel values and their corresponding luminance pixel values of the same coding block (i.e., 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.
[0065] The luminance samples are reconstructed using a 6-tap filter using the following formula to obtain the reconstructed luminance samples: L (x, y) = (2×Rec L (2x,2y)+2×Rec L (2x,2y+1) +Rec L (2x-1, 2y)+Rec L (2x+1,2y) +Rec L (2x-1,2y+1)+Rec L (2x+1,2y+1)+4)>>3
[0066] 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.
[0067] Then the chrominance samples are predicted by the reconstructed luminance samples: Pred C (x, y) = α × Rec′ L (x, y)+β
[0068] 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:
[0069] Among them, Rec′ L (i) is the brightness down-sampled 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 selected from the sample blocks indicated by the gray dots as shown in FIG1 or FIG2 .
[0070] It can be seen that the linear model defined by CCLM can only have a high coverage rate for CUs corresponding to the luminance and chrominance value distributions with strong linear correlation (as shown in Figure 3 or Figure 4), and can achieve high-precision prediction from luminance to chrominance.
[0071] 2. Slope adjustment of CCLM:
[0072] The Enhanced Compression Model (ECM) optimizes the traditional CCLM by introducing a slope adjustment parameter, 'u', to the traditional CCLM: chromaVal = a*lumaVal + b. This results in the ECM: chromaVal = a'*lumaVal + b', where a' = a + u, and b' = bu*yr. Here, chromaVal is the predicted chroma value, lumaVal is the downsampled luminance reconstructed value, a and b are CCLM parameters, yr is the average luminance value, and u is any integer between -4 and 4. As can be seen, ECM implements rotation correction around the yr point in the linear model.
[0073] 3. Multi-Model Linear Model (MM-CCLM), also referred to as MMLM:
[0074] In order to better improve the situation where the model coverage is low in certain luminance and chrominance value distributions, MM-CCLM uses a piecewise linear regression method to divide the luminance and chrominance value distribution into n regions, and different linear model parameters are used for different regions:
[0075] Among them, y is the chroma prediction value, x is the luminance downsampling reconstruction value, t1, ..., t n-1 is the segmentation threshold, a1,…,a nand b1, ..., b n are the linear model parameters.
[0076] Since segmented calculations increase computational complexity, fewer segments are advantageous. To minimize complexity, MM-CCLM is typically divided into two segments, with a breakpoint (i.e., threshold) selected to separate x. As shown in Figure 5, the segmentation is based on the average value of the downsampled luminance samples, which is 108. After performing segmented linear regression, the mean square error (MSE) is reduced from 88.44 to 45.69.
[0077] As shown in Figure 6, region P is the two adjacent rows to the left and above the current chrominance block (or downsampled luminance block). The threshold (i.e., the average of the downsampled luminance values in region P) is 17. When the downsampled luminance value of a 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 value of a pixel in region P is less than the threshold, it is classified as group 0 and marked as a black dot. The linear model parameters corresponding to each region in each group are then calculated.
[0078] 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 MMLM flag parameter indicates the application of the multi-mode cross-component linear prediction model technology, so that the encoding and decoding ends can correctly select the model for chrominance prediction.
[0079] 4. Multi sampling filter linear model (MF-CCLM):
[0080] MF-CCLM optimizes the reconstructed luminance values, and this reconstruction optimization is based on the default 4:2:0 chroma downsampling position. In the new generation of codec standards (AVC / HEVC), due to the supplementary VUI high-level syntax support, the chroma downsampling position can be customized based on the color display effect.
[0081] Depending on the location, a special downsampling filter can be formulated for brightness downsampling:
[0082] Downsampling filter 1 (Filter-North): S′ Y (x,y)=(S Y (2x,2y)+S Y(2x+1,2y)+1)>>1
[0083] Downsampling filter 2 (Filter-East): S′ Y (x,y)=(S Y (2x+1,2y)+S Y (2x+1,2y+1)+1)>>1
[0084] Downsampling filter 3 (Filter-South): S′ Y (x,y)=(S Y (2x,2y+1)+S Y (2x+1,2y+1)+1)>>1
[0085] Downsampling filter 4 (Filter-West): S′ Y (x,y)=(S Y (2x,2y)+S Y (2x,2y+1)+1)>>1
[0086] Downsampling filter 5 (Filter-Center): 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
[0087] Among them, S′ Y (x, y) is the brightness down-sampled 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 the downsampling filters in five different modes, and >> is the displacement operation.
[0088] 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.
[0089] 5. Linear model combined with angle (LAP, LM-Angular Prediction):
[0090] The general environment proposed by LAP is that there are only two options for a block: using CCLM or not using CCLM (using traditional angular intra prediction). LAP is based on the concept of multi-hypothesis motion compensation, combining angular intra prediction and CCLM, which becomes: syn (x, y) = ωP LM (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 chroma 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 plus-shaped spatial element data, plus a nonlinear element P and a basis element B: predChromaVal = c0C + c1N + c2S + c3E + c4W + c5P + c6B
[0094] 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, 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.
[0095] 7. Gradient Linear Model (GLM)
[0096] This is a technique used in ECM, which replaces the downsampled luminance sample L with the luminance gradient G: C = α·G + β; where C is the chrominance prediction value, G is the luminance gradient value, and α and β are linear model parameters.
[0097] Compared to CCLM, GLM does not downsample luma values, but instead uses the gradient of luma samples to infer a linear model. That is, when inferring parameters, it uses the gradient G of luma samples instead of downsampled ones to infer a linear model. However, the other design aspects of CCLM (e.g., parameter inference and linear transformation of predicted samples) remain unchanged. Gradient calculation can be implemented using any of the filters shown in Figures 7 to 10.
[0098] Based on the above CCLM technology, it can be seen that CCLM assumes that the chroma pixel values and corresponding luma pixel values of the same CU have a linear relationship. Therefore, CCLM uses a linear model to generate the predicted values of the corresponding chroma pixels from the reconstructed luma pixel values. However, for CUs where the luma and chroma values are nonlinearly correlated or have a poor linear correlation, the residual error of the CCLM prediction is large, resulting in low compression effect.
[0099] In response to the problems existing in the related art, this 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.
[0100] In the first aspect, referring to FIG11 , which is a flowchart of a decoding method provided in an embodiment of the present application, the method may include the following steps:
[0101] Step S101: Obtain coding information corresponding to a target coding block, where the coding information at least includes: index information of a target model, values of various parameters, a luminance down-sampled reconstructed value of the target coding block, and a target difference value.
[0102] In specific implementation, the encoding end can determine the values of various parameters of the target model when the prediction error 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.
[0103] As a possible implementation method, in order to reduce the amount of calculation, the same number of reference pixels associated with the target coding block (such as 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 point.
[0104] Step S102: Determine the target model according to the index information of the target model.
[0105] The target model is constructed based on the activation parameters and a first model, wherein the first model is used to characterize the mapping relationship between the luma downsampled reconstructed value and the chroma prediction value. The first model can be a chroma prediction model such as a curve model, a linear model related to CCLM technology, or the like. Specifically, the linear model related to CCLM technology can be any of the following: CCLM (in the narrow sense); slope-adjusted CCLM; MM-CCLM; MF-CCLM; LAP; CCCM; or GLM.
[0106] In the specific implementation, after the encoding end determines the first model used for chrominance prediction of each pixel in the current CU block (i.e., the target coding block), the first model is corrected by the activation function, that is, the target model is able to use 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 the intra-frame coding of the video.
[0107] 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 includes 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 (that is, the activation function sets all multiple terms associated with the luminance downsampling reconstruction values to zero) through the activation function, so that the target model can achieve higher chrominance prediction accuracy for CU blocks with linear and nonlinear correlation between luminance and chrominance.
[0108] 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 down-sampling reconstruction value of the target coding block.
[0109] In specific implementation, after determining the values of each parameter of the target model, the brightness downsampled reconstruction value of each pixel point 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 point output by the target model.
[0110] It is understandable that the target model proposed in this application is a cross-branch universal model and also a cross-branch non-linear model (CCnLM). By introducing an activation function, this target model can better solve the CU chroma prediction problem when there is a nonlinear correlation between luminance and chroma, while ensuring the accuracy of CU chroma prediction for the linear correlation between luminance and chroma.
[0111] Step S104: Determine a chroma reconstruction value of the target coding block according to the chroma prediction value of the target coding block and the target difference value.
[0112] In a specific implementation, after determining the target model corresponding to the target coding block and the values of the various parameters in the target model, the encoding end can determine the chrominance prediction value of the target coding block based on the target model, the values of the various variable parameters, and the luminance downsampling reconstruction value of the target coding block, and then determine the target difference value based on 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 based on the index information of the target model, the values of the various parameters, and the target difference value. The luminance downsampling reconstruction value can be obtained by downsampling the luminance pixels of the video encoding (such as luminance pixels with a sampling format of YUV420).
[0113] After obtaining the encoding information corresponding to the target coding block and the luminance downsampled 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 based on the activation function and the first model according to 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 luminance downsampled 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 value, thereby completing the decoding of the chrominance component information of the target coding block.
[0114] It can be understood that since the target model has good applicability for CU blocks with linear and nonlinear correlation between luminance 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.
[0115] 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 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.
[0116] Implementation Method 1
[0117] This embodiment describes an example of target model construction.
[0118] In this embodiment, the first model used to construct the target model can be divided into the following two cases.
[0119] Case 1: The first model is used to characterize the linear mapping (straight line correlation) relationship between the luma downsampled reconstruction value and the chroma prediction value.
[0120] In a specific implementation, the first model may be a linear model related to CCLM technology.
[0121] It is understandable 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 cross redundancy. The predicted value of the chrominance pixel is calculated as follows: pred C (i, j) = α0·rec′ L (i,j)+α1
[0122] 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 of the luminance pixel after downsampling in the same CU, and the linear model parameter values α0 and α1 are determined based on the chrominance prediction error value (such as the linear minimum square error value) of a linearly reconstructed current adjacent sampling block.
[0123] 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.
[0124] As shown in the corresponding relationship between brightness, chromaticity and RGB, the linear correlation between brightness and chromaticity is poor, making it difficult to accurately represent the correlation between brightness and chromaticity through a linear model: Y = 0.299R + 0.587G + 0.114BU = -0.1687R - 0.3313G + 0.5B + 128 V = 0.5R - 0.4187G - 0.0813B + 128
[0125] 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.
[0126] 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 luminance 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 luminance downsampling reconstruction value is located in the third formula, 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 being able to achieve higher-precision chroma prediction for CUs with poor linear correlation between luminance and chroma, thereby expanding the application scope of CCLM and improving the compression rate of video encoding.
[0127] Case 2: The first model is used to characterize the nonlinear mapping (non-linear correlation) relationship between the luma down-sampled reconstructed value and the chroma predicted value.
[0128] 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.
[0129] It can be understood that since the curve model can better represent the correlation between brightness and chromaticity, the target model is constructed in combination with 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, and a better approximation fit can be achieved for discrete points outside the curve fitted by the curve model, which can further improve the chromaticity prediction accuracy of the target model for CUs with poor linear correlation between brightness and chromaticity.
[0130] For example, in case 2, the target model can be used to represent the following two nonlinear mapping relationships:
[0131] Nonlinear mapping relationship 1: pred C (i,j)=α0·((rec′ L (i,j)) 2 +midValue>>bitDepth)+σ(α1·rec′ L (i,j)+α2·midValue) +α3·midValue
[0132] Among them, σ() is the 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, and α3 are the values of the parameters; >> is a shift operation.
[0133] Nonlinear mapping relationship 2: pred C (i,j)=σ(α0·(((rec′ L (i,j)) 2 +α1·midValue)>>bitDepth)+σ(α2·rec′ L (i,j)+α3·midValue))
[0134] 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, and α3 are the values of the parameters, and >> is a shift operation.
[0135] It is understandable that, since the quadratic term associated with the luma downsampled reconstruction value in the nonlinear mapping relationship 2 is modified 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 achieving flexible switching of the target model between the linear model and the nonlinear model. The median of the bit depth is primarily used to ensure that the obtained chroma prediction value does not overflow, while the median of the bit depth in the activation function is also used to implement rounding operations on the independent variables in the activation function.
[0136] As a possible implementation, σ() can be a ReLU function, that is, Among them, x is the independent variable in the ReLU function.
[0137] 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.
[0138] Implementation Method 2
[0139] This embodiment describes an example of parameters in the target model.
[0140] In this embodiment, the values of the various variable parameters in the target model when the chroma prediction error of the target model for the target coding block is minimized can be determined based on the true chroma value and luminance downsampling reconstruction value of the target coding block, the values of the various parameters in the target model, and the chroma prediction error of the target model for the target coding block.
[0141] 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 downsampling reconstruction value of the reference pixel points corresponding to the target coding block (such as the adjacent pixel points of the target coding block).
[0142] The first formula is as follows: Loss = ∑(y(i,j)-(σ((α0x(i,j) 2 +midValue)>>bitDepth)+σ(α1x(i,j)+α2midValue)+α3midValue)) 2
[0143] 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 luminance downsampled and reconstructed value of the pixel at coordinate (i, j), α0, α1, α2, α3 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 shift operation.
[0144] The second formula is as follows: Loss = ∑(y(i,j)-(σ(α0((x(i,j) 2 +α1midValue)>>bitDepth)+σ(α2x(i,j)+α3midValue)) 2 ))
[0145] 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 luminance downsampled and reconstructed value of the pixel at coordinate (i, j), α0, α1, α2, α3 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 shift operation.
[0146] It is understandable that the first and second formulas described above are actually based on the linear minimum mean square error (LMMSE), which sums the chrominance prediction error of each reference pixel of the target model to estimate the chrominance prediction error of the target model for the target coding block. The chrominance prediction error estimate for 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.
[0147] Since the number of variable parameters of the above target model is 4, at least the true chromaticity values and luminance downsampled reconstruction values of 4 reference pixels 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.
[0148] Taking the first formula above as an example, the Loss function is used to derive the parameter values α0, α1, α2, and α3 respectively:
[0149] Taking the second formula above as an example, the Loss function is used to derive the parameter values α0, α1, α2, and α3 respectively:
[0150] In the above equations 6.1 to 6.4 and 7.1 to 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); α0, α1, α2, α3 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; >> is a shift operation.
[0151] In the above equations 6.1 to 6.4 or 7.1 to 7.4: The gradient of the Loss function in the direction of any variable parameter ai (such as α1) is taken to estimate the minimum value, and the values of α0, α1, α2, and α3 in the first or second formula can be determined by solving the system of equations simultaneously.
[0152] 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.
[0153] In a specific implementation, the values of the various 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 luminance down-sampled 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 various parameters in the third formula can be determined based on the true chrominance value and the luminance down-sampled reconstruction value of the target coding block (such as determining the third mapping relationship through a criterion function), and then the values of the various 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 terms, and the variable parameters of the third formula should at least include: all parameters associated with the activation function related terms.
[0154] After obtaining the values of the parameters in the third formula, the final values of the parameters in the target model are determined based on the true chrominance value and the luminance down-sampling reconstruction value of the target coding block, as well as 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 based on the true chrominance value and the luminance down-sampling reconstruction value of the target coding block, as well as the values of the target parameter items.
[0155] As a possible implementation method, the second mapping relationship between the error estimate corresponding to the target model and the value of each parameter in the target model can be determined based on the chrominance true value and the luminance downsampled reconstruction value of the target coding block, as well as 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 based on the second mapping relationship, the value of each parameter in the target model is determined. Optionally, the error estimate corresponding to the target model can be a linear minimum mean square error estimate, in which case the above-mentioned second mapping relationship can be determined based on LMMSE.
[0156] Exemplarily, the nonlinear mapping relationships 1 and 2 described in the first embodiment are taken as an example to illustrate the determination of the parameter values in the target model.
[0157] For the nonlinear mapping relationship 1, a third mapping relationship between the error estimate 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 the fourth formula according to the true chrominance value and the luminance down-sampled reconstructed value of the reference pixel point corresponding to the target coding block, where:
[0158] The third formula associated with the nonlinear mapping relationship 1 is as follows: pred C (i,j)=(α0x(i,j)) 2 +midValue) >>bitDepth)+(α1x(i,j))+α2midValue)+α3midValue
[0159] 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, and >> is the shift operation;
[0160] The fourth formula is as follows: Loss = Σ(y(i, j)-(((a0x(i, j) 2+mid Value)>>bitDepth)+(a1x(i,j)+a2mid Value)+a3mid Value)) 2
[0161] 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 luminance downsampled and reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 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 shift operation.
[0162] For the nonlinear mapping relationship 2, a third mapping relationship between the error estimate 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 the fifth formula according to the true chrominance value and the luminance down-sampled reconstructed value of the reference pixel corresponding to the target coding block, where:
[0163] The third formula associated with the nonlinear mapping relationship 2 is as follows: pred C (i,j)=((α0x(i,j) 2 +α1midValue) >>bitDepth)+(α2·x(i,j)+α3·midValue)
[0164] 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, and >> is the shift operation;
[0165] The fifth formula is as follows: Loss = Σ(y(i, j)-(((a0x(i, j) 2 +a1midValue)>>bitDepth)+(a2·x(i,j)+a3midValue))) 2
[0166] 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 luminance downsampled and reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 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 shift operation.
[0167] Taking the fourth formula as an example, based on the Loss function, we can derive α0, α1, α2, and α3 respectively:
[0168] 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 luminance downsampled and reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 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 shift operation.
[0169] In formulas (8.1) to (8.4): α0, α1, α2, and α3 can be determined through a set of simultaneous equations.
[0170] 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, then: α 23 midValue=α2midValue+α3midValue. Now simplify equations (8.1) to (8.4) and take the minimum value to get: Σ(x(i,j) 2 >>bitDepth)(y(i,j)-(((a0x(i,j) 2 +mid Value)>>bitDepth)+ a1x(i,j)+a 23 mid Value))=0 (9.1) Σx(i,j)(y(i,j)-(((a0x(i,j) 2 +mid Value)>>bitDepth)+a1x(i,j)+a 23mid Value))=0 (9.2) Σ(y(i,j)-(((a0x(i,j) 2 +mid Value)>>bitDepth)+a1x(i,j)+a 23 mid Value))=0 (9.3)
[0171] According to the above formulas (9.1) to (9.3), we can get α0, α1 and α 23 Then let α2=(α 23 >>1), α3=α 23 -α2, we can get α0, α1, α2, α3 (i.e., initial estimated values). Then, we can substitute α1 and α2 into equations (6.1) and (6.4) to approximate α0′ and α3′, and use α2′=α 23 +α3′, to obtain α2′.
[0172] For nonlinear function related terms, such as ReLU function terms σ(a1x(i,j)+a2mid Value) and σ′(a1x(i,j)+a2mid Value), since α1 and α2 have been determined, and the true chromaticity value and luminance downsampled reconstruction value of the reference pixel are known, the value of the ReLU function term determined by the joint α1 and α2 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 approximate α1′.
[0173] According to the above-determined α0′, α1′, α2′, α3′ and the constructed target model, α0′, α1′, α2′, α3′ are brought into the target model that represents the nonlinear mapping relationship 1 to realize the chrominance prediction of the target coding block in the video image, thereby improving the applicability of the chrominance prediction and the compression rate of the coded chrominance block with a small amount of computing power.
[0174] In a second aspect, as shown in FIG12 , an embodiment of the present application provides an encoding method, which includes at least the following steps:
[0175] Step S201: constructing a target model according to the activation function and the first model, where the first model is used to characterize the mapping relationship between the luma downsampled reconstruction value and the chroma prediction value;
[0176] Step S202: Determine the values of various parameters in the target model according to the true chrominance value and the downsampled luminance reconstructed value of the target coding block;
[0177] Step S203: determining 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;
[0178] 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;
[0179] Step S205: Generate coding information corresponding to the target coding block according to the index information of the target model, the values of the variable parameters, the luminance down-sampling reconstruction value of the target coding block, and the target difference value.
[0180] 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.
[0181] As a possible implementation, the target model is used to represent 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
[0182] 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, and α3 are the values of the parameters, and >> is a shift operation.
[0183] As a possible implementation, determining the values of the parameters in the target model according to the chrominance true value and the luminance downsampled reconstructed value of the target coding block includes:
[0184] Determining the values of various parameters in the target model using a first formula according to the true chrominance value and the luminance downsampled reconstructed value of the reference pixel corresponding to the target coding block;
[0185] The first formula is as follows: Loss = ∑(y(i,j)-(σ((α0x(i,j) 2 +midValue)>>bitDepth)+σ(α1x(i,j)+α2midValue)+α3midValue)) 2
[0186] 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 luminance downsampled and reconstructed value of the pixel at coordinate (i, j), α0, α1, α2, α3 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 shift operation.
[0187] As a possible implementation, the target model is used to represent the following mapping relationship: pred C (i,j)=σ(α0·(((rec′ L (i,j)) 2 +α1·midValue)>>bitDepth)+σ(α2·rec′ L (i,j)+α3·midValue))
[0188] 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, and α3 are the values of the parameters, and >> is a shift operation.
[0189] As a possible implementation, determining the values of the parameters in the target model according to the chrominance true value and the luminance downsampled reconstructed value of the target coding block includes:
[0190] Determine the values of the parameters in the target model using a second formula according to the true chrominance value and the luminance downsampled reconstructed value of the reference pixel corresponding to the target coding block;
[0191] The second formula is as follows: Loss = ∑(y(i,j)-(σ(α0((x(i,j) 2 +α1midValue)>>bitDepth)+σ(α2x(i,j)+α3midValue)) 2 ))
[0192] 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 luminance downsampled and reconstructed value of the pixel at coordinate (i, j), α0, α1, α2, α3 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 shift operation.
[0193] As a possible implementation, the first model is characterized by the third formula; and constructing a target model according to the activation function and the first model includes:
[0194] At least one parameter item in the third formula is corrected by the activation function to obtain the target model.
[0195] As a possible implementation, determining the values of the parameters in the target model according to the chrominance true value and the luminance downsampled reconstructed value of the target coding block includes:
[0196] Determining values of the parameters in the third formula according to the true chrominance value and the luma downsampled reconstructed value of the target coding block;
[0197] The values of the parameters in the target model are determined according to the true chrominance value and the luminance down-sampled reconstructed value of the target coding block, and the values of the parameters in the third formula.
[0198] As a possible implementation manner, determining the values of the parameters in the target model according to the chrominance true value and the luminance downsampled reconstructed value of the target coding block, and the values of the parameters in the third formula includes:
[0199] Determine the value of the target parameter item in the target model by using the values of the parameters in the third formula, wherein the target parameter item is: the parameter item corrected by the activation function;
[0200] The values of the various parameters in the target model are determined according to the true chrominance value and the luminance down-sampled reconstructed value of the target coding block and the values of the target parameter items in the target model.
[0201] As a possible implementation manner, determining the values of the parameters in the target model according to the chrominance true value and the luminance downsampled reconstructed value of the target coding block, and the value of the target parameter item in the target model includes:
[0202] Determining, according to the chrominance true value and the luma downsampled reconstructed 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 corresponding to the target model and the value of each parameter in the target model;
[0203] According to the second mapping relationship, the value of each parameter in the target model is determined.
[0204] As a possible implementation, the error estimate corresponding to the target model is a linear minimum mean square error estimate.
[0205] As a possible implementation manner, determining the values of the parameters in the third formula according to the chrominance true value and the luminance downsampled reconstructed value of the target coding block includes:
[0206] Determining, according to the true chrominance value and the luma downsampled reconstructed value of the target coding block, a third mapping relationship between the error estimate corresponding to the third formula and the values of each parameter in the third formula;
[0207] According to the third mapping relationship, the values of the parameters in the third formula are determined.
[0208] As a possible implementation manner, determining a third mapping relationship between the error estimate corresponding to the third formula and the values of each parameter in the third formula according to the chrominance true value and the luminance downsampled reconstructed value of the target coding block includes:
[0209] Determine, by a fourth formula, a third mapping relationship between the error estimate corresponding to the third formula and the values of each parameter in the third formula, based on the true chrominance value and the luminance downsampled reconstructed value of the reference pixel corresponding to the target coding block;
[0210] Wherein, the third formula is as follows: pred C (i,j)=(α0x(i,j)) 2 +midValue) >>bitDepth)+(α1x(i,j))+α2midValue)+α3midValue
[0211] 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, and >> is the shift operation;
[0212] The fourth formula is as follows: Loss = Σ(y(i, j)-(((a0x(i, j) 2+mid Value)>>bitDepth)+(a1x(i,j)+a2mid Value)+a3mid Value)) 2
[0213] 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 luminance downsampled and reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 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 shift operation.
[0214] As a possible implementation manner, determining a third mapping relationship between the error estimate corresponding to the third formula and the values of each parameter in the third formula according to the chrominance true value and the luminance downsampled reconstructed value of the target coding block includes:
[0215] Determine, by a fifth formula, a third mapping relationship between the error estimate corresponding to the third formula and the values of each parameter in the third formula, based on the true chrominance value and the luminance downsampled reconstructed value of the reference pixel corresponding to the target coding block;
[0216] Wherein, the third formula is as follows: pred C (i,j)=((α0x(i,j) 2 +α1midValue) >>bitDepth)+(α2·x(i,j)+α3·midValue)
[0217] 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, and >> is the shift operation;
[0218] The fifth formula is as follows: Loss = Σ(y(i, j)-(((a0x(i, j) 2 +a1midValue)>>bitDepth)+(a2·x(i,j)+a3midValue))) 2
[0219] 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 luminance downsampled and reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 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 shift operation.
[0220] As a possible implementation, the activation function is any one of the following:
[0221] ReLU function;
[0222] Sigmoid function;
[0223] Tanh function;
[0224] Leaky ReLU function;
[0225] ELU function;
[0226] PReLU function;
[0227] Softmax function;
[0228] Swish function;
[0229] Maxout function;
[0230] Softplus function.
[0231] 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 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.
[0232] It is understood that the encoding method and decoding method provided in the embodiments of the present application can be executed by an encoding device and a decoding device. In the embodiments of the present application, the encoding method and the decoding method are respectively executed by an encoding device and a decoding device as an example to illustrate the encoding device and the decoding device provided in the embodiments of the present application.
[0233] In a third aspect, an embodiment of the present application provides a decoding device, as shown in FIG13 , the decoding device 100 includes:
[0234] An information acquisition module 101 is configured to acquire coding information corresponding to a target coding block and a luminance downsampled reconstructed value of the target coding block, wherein the coding information includes at least: index information of a target model, values of various parameters, a luminance downsampled reconstructed value of the target coding block, and a target difference value;
[0235] A model determination module 102 is configured to determine a target model based on the index information of the target model, where the target model is constructed based on the activation parameters and a first model, where the first model is configured to represent a mapping relationship between a luma downsampled reconstructed value and a chroma prediction value;
[0236] a chroma prediction module 103, configured to determine a chroma prediction value of the target coding block based on the target model, the values of the various parameters, and the luma downsampled reconstructed value of the target coding block;
[0237] The chroma reconstruction module 104 is configured to determine a chroma reconstruction value of the target coding block according to the chroma prediction value of the target coding block and the target difference value.
[0238] Optionally, the first model is used to characterize the nonlinear mapping relationship between the luma downsampling reconstruction value and the chroma prediction value.
[0239] Optionally, the target model is used to represent 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
[0240] 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, and α3 are the values of the parameters, and >> is a shift operation.
[0241] Optionally, the values of the parameters in the target model are determined by a first formula based on the true chrominance value and the luminance down-sampled reconstructed value of the reference pixel corresponding to the target coding block;
[0242] The first formula is as follows: Loss = ∑(y(i,j)-(σ((α0x(i,j) 2+midValue)>>bitDepth)+σ(α1x(i,j)+α2midValue)+α3midValue)) 2
[0243] 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 luminance downsampled and reconstructed value of the pixel at coordinate (i, j), α0, α1, α2, α3 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 shift operation.
[0244] Optionally, the target model is used to represent the following mapping relationship: pred C (i,j)=σ(α0·(((rec′ L (i,j)) 2 +α1·midValue)>>bitDepth)+σ(α2·rec′ L (i,j)+α3·midValue))
[0245] 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, and α3 are the values of the parameters, and >> is a shift operation.
[0246] Optionally, the values of the parameters in the target model are determined by a second formula based on the true chrominance value and the luminance down-sampled reconstructed value of the reference pixel corresponding to the target coding block;
[0247] The second formula is as follows: Loss = ∑(y(i,j)-(σ(α0((x(i,j) 2 +α1midValue)>>bitDepth)+σ(α2x(i,j)+α3midValue)) 2 ))
[0248] 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 luminance downsampled and reconstructed value of the pixel at coordinate (i, j), α0, α1, α2, α3 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 shift operation.
[0249] Optionally, the first model is represented 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.
[0250] Optionally, the values of each parameter in the target model are determined based on the true chrominance value and the luminance down-sampled 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 luminance down-sampled reconstruction value of the target coding block.
[0251] 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.
[0252] Optionally, the values of each parameter in the target model are determined based on 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 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.
[0253] Optionally, the error estimate corresponding to the target model is a linear minimum mean square error estimate.
[0254] Optionally, the values of each parameter in the third formula are determined according to a third mapping relationship, and the third mapping relationship 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 based on the true chrominance value and the luminance downsampling reconstruction value of the target coding block.
[0255] 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;
[0256] Wherein, the third formula is as follows: predC (i,j)=(α0x(i,j)) 2 +midValue) >>bitDepth)+(α1x(i,j))+α2midValue)+α3midValue
[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, and >> is the shift operation;
[0258] The fourth formula is as follows: Loss = Σ(y(i, j)-(((a0x(i, j) 2 +mid Value)>>bitDepth)+(a1x(i,j)+a2mid Value)+a3mid Value)) 2
[0259] 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 luminance downsampled and reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 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 shift operation.
[0260] Optionally, the third mapping relationship is determined by a fifth formula according to a true chrominance value and a down-sampled luminance reconstructed value of a reference pixel corresponding to the target coding block;
[0261] Wherein, the third formula is as follows: pred C (i,j)=((α0x(i,j) 2 +α1midValue) >>bitDepth)+(α2·x(i,j)+α3·midValue)
[0262] 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, and >> is the shift operation;
[0263] The fifth formula is as follows: Loss = Σ(y(i, j)-(((a0x(i, j) 2 +a1midValue)>>bitDepth)+(a2·x(i,j)+a3midValue))) 2
[0264] 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 luminance downsampled and reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 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 shift operation.
[0265] Optionally, the activation function is any one of the following:
[0266] ReLU function;
[0267] Sigmoid function;
[0268] Tanh function;
[0269] Leaky ReLU function;
[0270] ELU function;
[0271] PReLU function;
[0272] Softmax function;
[0273] Swish function;
[0274] Maxout function;
[0275] Softplus function.
[0276] 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.
[0277] In a fourth aspect, an embodiment of the present application provides an encoding device, as shown in FIG14 , wherein the encoding device 200 includes:
[0278] A first construction module 201 is configured to construct a target model based on an activation function and a first model, wherein the first model is configured to represent a mapping relationship between a luma downsampled reconstruction value and a chroma prediction value;
[0279] A first processing module 202 is configured to determine the values of various parameters in the target model according to the true chrominance value and the luma downsampled reconstruction value of the target coding block;
[0280] A second processing module 203 is 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 downsampled reconstructed value of the target coding block;
[0281] A third processing module 204 is configured to determine a target difference value based on the chrominance prediction value of the target coding block and the chrominance true value of the target coding block;
[0282] The first generating module 205 is configured to generate coding information corresponding to the target coding block according to the index information of the target model, the values of the variable parameters, the luminance down-sampled reconstruction value of the target coding block, and the target difference value.
[0283] Optionally, the first model is used to characterize the nonlinear mapping relationship between the luma downsampling reconstruction value and the chroma prediction value.
[0284] Optionally, the target model is used to represent 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
[0285] 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, and α3 are the values of the parameters, and >> is a shift operation.
[0286] Optionally, the first processing module 202 includes:
[0287] A first processing submodule, configured to determine the values of various parameters in the target model using a first formula according to the true chrominance value and the luminance down-sampled reconstructed value of the reference pixel corresponding to the target coding block;
[0288] The first formula is as follows: Loss = ∑(y(i,j)-(σ((α0x(i,j) 2+midValue)>>bitDepth)+σ(α1x(i,j)+α2midValue)+α3midValue)) 2
[0289] 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 luminance downsampled and reconstructed value of the pixel at coordinate (i, j), α0, α1, α2, α3 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 shift operation.
[0290] Optionally, the target model is used to represent the following mapping relationship: pred C (i,j)=σ(α0·(((rec′ L (i,j)) 2 +α1·midValue)>>bitDepth)+σ(α2·rec′ L (i,j)+α3·midValue))
[0291] 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, and α3 are the values of the parameters, and >> is a shift operation.
[0292] Optionally, the first processing module 202 includes:
[0293] A second processing submodule is configured to determine the values of various parameters in the target model using a second formula according to the true chrominance value and the luminance down-sampled reconstructed value of the reference pixel corresponding to the target coding block;
[0294] The second formula is as follows: Loss = Σ(y(i,j)-(σ(α0((x(i,j) 2 +α1midValue)>>bitDepth)+σ(α2x(i,j)+α3midValue)) 2 ))
[0295] 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 luminance downsampled and reconstructed value of the pixel at coordinate (i, j), α0, α1, α2, α3 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 shift operation.
[0296] Optionally, the first model is characterized by a third formula; the first building module 201 includes:
[0297] The first construction submodule is used to correct at least one parameter item in the third formula through the activation function to obtain the target model.
[0298] Optionally, the first processing module 202 includes:
[0299] A third processing submodule, configured to determine the values of the parameters in the third formula according to the true chrominance value and the luma downsampled reconstruction value of the target coding block;
[0300] The fourth processing submodule is used to determine the values of various parameters in the target model according to the chrominance true value and the luminance down-sampled reconstructed value of the target coding block and the values of various parameters in the third formula.
[0301] Optionally, the fourth processing submodule includes:
[0302] a fifth processing submodule, configured to determine a value of a target parameter item in the target model according to the values of the parameters in the third formula, wherein the target parameter item is a parameter item corrected by the activation function;
[0303] 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-sampled reconstructed value of the target coding block and the value of the target parameter item in the target model.
[0304] Optionally, the sixth processing submodule includes:
[0305] a seventh processing submodule, configured to determine, based on the true chrominance value and the luma downsampled reconstructed 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 corresponding to the target model and the value of each parameter in the target model;
[0306] An eighth processing submodule is configured to determine the values of the parameters in the target model according to the second mapping relationship.
[0307] Optionally, the error estimate corresponding to the target model is a linear minimum mean square error estimate.
[0308] Optionally, the third processing submodule includes:
[0309] a ninth processing submodule, configured to determine, based on the true chrominance value and the luma downsampled reconstructed value of the target coding block, a third mapping relationship between the error estimate corresponding to the third formula and the values of each parameter in the third formula;
[0310] The tenth processing submodule is configured to determine the values of the parameters in the third formula according to the third mapping relationship.
[0311] Optionally, the ninth processing submodule includes:
[0312] an eleventh processing submodule, configured to determine, by a fourth formula, a third mapping relationship between the error estimate corresponding to the third formula and the values of each parameter in the third formula based on the true chrominance value and the luminance downsampled reconstructed value of the reference pixel corresponding to the target coding block;
[0313] Wherein, the third formula is as follows: pred C (i,j)=(α0x(i,j)) 2 +midValue) >>bitDepth)+(α1x(i,j))+α2midValue)+α3midValue
[0314] 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, and >> is the shift operation;
[0315] The fourth formula is as follows: Loss = Σ(y(i, j)-(((a0x(i, j) 2 +mid Value)>>bitDepth)+(a1x(i,j)+a2mid Value)+a3mid Value)) 2
[0316] 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 luminance downsampled and reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 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 shift operation.
[0317] Optionally, the ninth processing submodule includes:
[0318] A twelfth processing submodule is configured to determine, by a fifth formula, a third mapping relationship between the error estimate corresponding to the third formula and the values of each parameter in the third formula based on the true chrominance value and the luminance downsampled reconstructed value of the reference pixel corresponding to the target coding block;
[0319] Wherein, the third formula is as follows: pred C (i,j)=((α0x(i,j) 2 +α1midValue) >>bitDepth)+(α2·x(i,j)+α3·midValue)
[0320] 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, and >> is the shift operation;
[0321] The fifth formula is as follows: Loss = Σ(y(i, j)-(((a0x(i, j) 2 +a1midValue)>>bitDepth)+(a2·x(i,j)+a3midValue))) 2
[0322] 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 luminance downsampled and reconstructed value of the pixel at coordinate (i,j), α0, α1, α2, α3 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 shift operation.
[0323] Optionally, the activation function is any one of the following:
[0324] ReLU function;
[0325] Sigmoid function;
[0326] Tanh function;
[0327] Leaky ReLU function;
[0328] ELU function;
[0329] PReLU function;
[0330] Softmax function;
[0331] Swish function;
[0332] Maxout function;
[0333] Softplus function.
[0334] The encoding device provided in the embodiment of the present application can implement the various processes implemented in the encoding method embodiment described in the second aspect and achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0335] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0336] The various component embodiments of the present disclosure can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all of the functions of some or all of the components in the computing processing equipment according to the embodiments of the present disclosure. The present disclosure can also be implemented as a device or apparatus program (e.g., computer program and computer program product) for executing part or all of the methods described herein. Such a program implementing the present disclosure can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0337] For example, FIG15 illustrates a computing processing device that can implement the methods of the present disclosure. The computing processing device conventionally includes a processor 1010 and a computer program product or computer-readable medium in the form of a memory 1020. Memory 1020 can be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Memory 1020 has storage space 1030 for program code 1031 for executing any of the method steps described above. For example, the storage space 1030 for program code can include individual program codes 1031 for implementing various steps in the above method. These program codes can be read from or written to one or more computer program products. These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards, or floppy disks. Such computer program products are typically portable or fixed storage units, as described with reference to FIG16. The storage unit can have storage segments, storage space, etc. arranged similarly to memory 1020 in the computing processing device of FIG15. The program code can, for example, be compressed in a suitable form. Typically, the storage unit includes computer-readable codes 1031 ′, ie, codes that can be read by a processor such as 1010 , which, when executed by a computing processing device, cause the computing processing device to perform the steps of the method described above.
[0338] 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. 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 will not be repeated here.
[0339] 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. 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 will not be repeated here.
[0340] 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.
[0341] 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.
[0342] 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.
[0343] 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.
[0344] An embodiment of the present application further provides 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.
[0345] 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.
[0346] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be noted 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 the opposite 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.
[0347] 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 the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this 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 enabling 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.
[0348] 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 this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.
[0349] References herein to "one embodiment," "an embodiment," or "one or more embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present disclosure. Furthermore, please note that instances of the phrase "in one embodiment" do not necessarily all refer to the same embodiment.
[0350] In the description provided herein, numerous specific details are described. However, it is understood that embodiments of the present disclosure may be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.
[0351] In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in the claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present disclosure may be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.
[0352] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present disclosure.
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: 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 brightness downsampled reconstruction value of the pixel at coordinate (i,j), α0, α1, α2, α3 are parameters The value of the coordinate (i, j) is the coordinate value range of the reference pixel point 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: 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: before 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 parameter values, and >> is a shift operation; The fourth formula is as follows: Loss=Σ(y(i,j)-(((a0x(i,j) 2 +midValue)>>bitDepth)+(a1x(i,j)+a2midValue)+a3midValue)) 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 parameter values, and >> is a shift operation; The fifth formula is as follows: Loss=Σ(y(i,j)-(((a0x(i,j) 2 +a1midValue)>>bitDepth)+(a2·x(i,j)+a3midValue))) 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; Determine the target model according to the chrominance true value and the brightness down-sampling reconstruction value of the target coding block The values of each parameter in; 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: 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: 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 parameter values, and >> is a shift operation; The fourth formula is as follows: Loss=Σ(y(i,j)-(((a0x(i,j) 2 +midValue)>>bitDepth)+(a1x(i,j)+a2midValue)+a3midValue)) 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 parameter values, and >> is a shift operation; The fifth formula is as follows: Loss=Σ(y(i,j)-(((a0x(i,j) 2 +a1midValue)>>bitDepth)+(a2·x(i,j)+a3midValue))) 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 target model according to the index information of the target model, the values of the variable parameters, the brightness down-sampling reconstruction value of the target coding block, and the target difference value. The encoding information corresponding to the target encoding block.
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.
35. A computing device, characterized in that: include: a memory having computer readable code stored therein; as well as One or more processors, when the computer-readable code is executed by the one or more processors, the computing processing device performs the decoding method according to any one of claims 1 to 15 or performs the encoding method according to any one of claims 16 to 30.
36. A computer program comprising computer readable code, characterized in that When the computer readable code is executed on a computing and processing device, the computing and processing device is caused to execute the decoding method according to any one of claims 1 to 15 or the encoding method according to any one of claims 16 to 30.
37. A computer readable medium, characterized in that A computer program as claimed in claim 36 is stored therein.
Citation Information
Patent Citations
Chrominance linear prediction method and device based on position weighting, equipment and medium
CN113365067A
Intra-frame cross-component prediction method and system applicable to VVC coding standard
CN113992913A
Cross-component chrominance prediction method and device based on neural network
CN115190312A
Image encoding and decoding method and device using prediction network
US20210084290A1
Chroma from Luma Prediction Model Selection
US20230041999A1
