Image component prediction method, encoder, decoder, and storage medium

By filtering and constructing adjacent reference pixel subsets in the video encoding standard H.266/VVC, and using multiple prediction submodels to predict image components, the problems of high computational complexity and inaccurate prediction are solved, and more efficient image component prediction is achieved.

CN120455686APending Publication Date: 2025-08-08GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510826529.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2019-03-18
Filing Date
2019-10-28
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

In the video encoding standard H.266/VVC, the existing image component prediction methods have high computational complexity and insufficient prediction model accuracy. Especially when building nonlinear or multi-modes, there are many sample points and abnormal sample points, resulting in inaccurate prediction.

Method used

By filtering adjacent reference pixels of the current block in the image, constructing a subset of adjacent reference pixels, reducing the number of reference pixels, and using multiple prediction submodels to predict across components, calculating model parameters, and eliminating unimportant or abnormal reference pixel points.

Benefits of technology

It reduces the computational complexity and memory bandwidth, improves the accuracy of the prediction model and the prediction efficiency of video images, and improves the prediction accuracy of image components.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120455686A_ABST
    Figure CN120455686A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an image component prediction method, an encoder, a decoder and a storage medium. The method comprises the following steps: determining adjacent reference pixels of a current block in an image; constructing an adjacent reference pixel subset according to the adjacent reference pixels; wherein the adjacent reference pixel subset comprises a part of pixels in the adjacent reference pixels; calculating model parameters of a prediction model according to the adjacent reference pixel subsets; wherein the prediction model comprises N prediction sub-models, the N prediction sub-models correspond to N groups of model parameters, the prediction sub-models are used for performing cross-component prediction processing on to-be-predicted image components through the corresponding model parameters, and N is a positive integer greater than or equal to 2.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Description of the case

[0002] This application is a divisional application based on the Chinese patent with application date of October 28, 2019, application number 201980088761.8, and invention name “Image component prediction method, encoder, decoder and storage medium”. Technical Field

[0003] The embodiments of the present application relate to the field of image processing technology, and in particular to an image component prediction method, an encoder, a decoder, and a storage medium. Background Art

[0004] As demand for video display quality increases, new video applications such as HD and UHD video have emerged. H.265 / High Efficiency Video Coding (HEVC) is no longer able to meet the demands of rapidly evolving video applications. The Joint Video Exploration Team (JVET) has proposed the next-generation video coding standard, H.266 / Versatile Video Coding (VVC), and its corresponding test model, the VVC Test Model (VTM).

[0005] VTM currently integrates a method for predicting image components based on a prediction model. This prediction model can predict the chrominance component from the luminance component of the current coding block. However, when constructing a prediction model, especially when the prediction model is nonlinear or multi-model (e.g., composed of multiple linear models), the number of sample points currently used for model parameter derivation is large, resulting in high computational complexity and memory bandwidth. Furthermore, these sample points may contain abnormal samples, leading to inaccurate prediction model construction. Summary of the Invention

[0006] The embodiments of the present application provide an image component prediction method, an encoder, a decoder, and a storage medium. By reducing the number of pixels in a set of adjacent reference pixels, not only can the computational complexity be reduced, but also the accuracy of the prediction model can be improved, thereby improving the prediction accuracy of the image component to be processed.

[0007] The technical solution of the embodiment of the present application can be implemented as follows:

[0008] In a first aspect, an embodiment of the present application provides an image component prediction method, applied to an encoder or a decoder, the method comprising:

[0009] determining neighboring reference pixels of a current block in an image;

[0010] Constructing a subset of adjacent reference pixels according to the adjacent reference pixels; wherein the subset of adjacent reference pixels includes some pixels of the adjacent reference pixels;

[0011] The model parameters of the prediction model are calculated based on the adjacent reference pixel subset; wherein the prediction model includes N prediction sub-models, the N prediction sub-models correspond to N groups of model parameters, and the prediction sub-models are used to perform cross-component prediction processing on the image components to be predicted through the corresponding model parameters, and N is a positive integer greater than or equal to 2.

[0012] In a second aspect, an embodiment of the present application provides an image component prediction method, applied to an encoder or a decoder, the method comprising:

[0013] Determining a first set of reference pixels for a first image component of a current block in an image, wherein the first set of reference pixels includes pixels adjacent to the current block;

[0014] Constructing N first reference pixel subsets using the first reference pixel set, wherein the first reference pixel subsets include some pixels in the first reference pixel set, and N is equal to the number of prediction models;

[0015] Using the N first reference pixel subsets, model parameters of N prediction models are respectively calculated, wherein the prediction model is used to map the first image component value of the current block to the predicted value of the second image component of the current block, and the second image component is different from the first image component.

[0016] In a third aspect, an embodiment of the present application provides an encoder, comprising: a first determining unit, a first constructing unit, and a first calculating unit, wherein:

[0017] a first determining unit configured to determine adjacent reference pixels of a current block in an image;

[0018] A first construction unit is configured to construct an adjacent reference pixel subset based on the adjacent reference pixels; wherein the adjacent reference pixel subset includes some pixels of the adjacent reference pixels;

[0019] The first computing unit is configured to calculate the model parameters of the prediction model based on the adjacent reference pixel subset; wherein the prediction model includes N prediction sub-models, the N prediction sub-models correspond to N groups of model parameters, and the prediction sub-models are used to perform cross-component prediction processing on the image components to be predicted through the corresponding model parameters, and N is a positive integer greater than or equal to 2.

[0020] In a fourth aspect, an embodiment of the present application provides an encoder, comprising a first memory and a first processor, wherein:

[0021] a first memory, configured to store a computer program capable of running on the first processor;

[0022] The first processor is configured to execute the method according to the first aspect or the second aspect when running the computer program.

[0023] In a fifth aspect, an embodiment of the present application provides a decoder, comprising a second determining unit, a second constructing unit, and a second calculating unit, wherein:

[0024] a second determining unit configured to determine adjacent reference pixels of a current block in the image;

[0025] A second construction unit is configured to construct an adjacent reference pixel subset based on the adjacent reference pixels; wherein the adjacent reference pixel subset includes some pixels of the adjacent reference pixels;

[0026] The second computing unit is configured to calculate the model parameters of the prediction model based on the adjacent reference pixel subset; wherein the prediction model includes N prediction sub-models, the N prediction sub-models correspond to N groups of model parameters, and the prediction sub-models are used to perform cross-component prediction processing on the image components to be predicted through the corresponding model parameters, and N is a positive integer greater than or equal to 2.

[0027] In a sixth aspect, an embodiment of the present application provides a decoder, comprising a second memory and a second processor, wherein:

[0028] a second memory, configured to store a computer program capable of running on the second processor;

[0029] The second processor is configured to execute the method according to the first aspect or the second aspect when running the computer program.

[0030] In a seventh aspect, an embodiment of the present application provides a computer storage medium storing an image component prediction program. When the image component prediction program is executed by a first processor or a second processor, the method described in the first aspect or the second aspect is implemented.

[0031] Embodiments of the present application provide an image component prediction method, encoder, decoder, and storage medium, which determine adjacent reference pixels of a current block in an image; construct an adjacent reference pixel subset based on the adjacent reference pixels; wherein the adjacent reference pixel subset includes some pixels of the adjacent reference pixels; and calculate model parameters of a prediction model based on the adjacent reference pixel subset; wherein the prediction model includes N prediction sub-models, each of the N prediction sub-models corresponds to N groups of model parameters, and the prediction sub-models are used to perform cross-component prediction processing on the image component to be predicted using the corresponding model parameters, where N is a positive integer greater than or equal to 2. In this way, since the adjacent reference pixels of the current block are screened, unimportant reference pixels or abnormal reference pixels can be removed, thereby reducing the number of pixels in the adjacent reference pixel set, resulting in a smaller number of pixels in the adjacent reference pixel subset, which not only reduces computational complexity and memory bandwidth but also improves the accuracy of the prediction model. In addition, cross-component prediction processing is performed on the image component to be processed using at least two prediction sub-models, thereby improving the prediction accuracy of the image component to be processed and improving the prediction efficiency of the video image. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 A schematic block diagram of a video encoding system according to an embodiment of the present application;

[0033] Figure 2 A schematic block diagram of a video decoding system according to an embodiment of the present invention;

[0034] Figure 3 A schematic diagram of a flow chart of an image component prediction method provided in an embodiment of the present application;

[0035] Figure 4 A schematic diagram of a structure for selecting a subset of adjacent reference pixels on the side of a current block provided by an embodiment of the present application;

[0036] Figure 5 A schematic diagram of another structure for selecting a subset of adjacent reference pixels on the side of a current block provided by an embodiment of the present application;

[0037] Figure 6 A schematic diagram of grouping adjacent reference pixels of a coding block provided in an embodiment of the present application;

[0038] Figure 7 A schematic flow chart of another image component prediction method provided in an embodiment of the present application;

[0039] Figure 8 A schematic diagram of the structure of an encoder provided in an embodiment of the present application;

[0040] Figure 9A schematic diagram of the specific hardware structure of an encoder provided in an embodiment of the present application;

[0041] Figure 10 A schematic diagram of the structure of a decoder provided in an embodiment of the present application;

[0042] Figure 11 A schematic diagram of the specific hardware structure of a decoder provided in an embodiment of the present application. DETAILED DESCRIPTION

[0043] In order to enable a more detailed understanding of the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application is described in detail below with reference to the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application.

[0044] In order to enable a more detailed understanding of the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application is described in detail below with reference to the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application.

[0045] In a video image, a first image component, a second image component, and a third image component are generally used to represent a coding block (CB); wherein the three image components are a luminance component, a blue chrominance component, and a red chrominance component, respectively. Specifically, the luminance component is usually represented by the symbol Y, the blue chrominance component is usually represented by the symbol Cb or U, and the red chrominance component is usually represented by the symbol Cr or V; thus, the video image can be represented in either the YCbCr format or the YUV format.

[0046] In the embodiment of the present application, the first image component may be a luminance component, the second image component may be a blue chrominance component, and the third image component may be a red chrominance component, but this embodiment of the present application does not specifically limit this.

[0047] In the next generation video coding standard H.266, in order to further improve the coding performance and coding efficiency, the cross-component prediction (Cross-component Prediction, CCP) was extended and improved, and the cross-component linear model prediction (Cross-component Linear Model Prediction, CCLM) was proposed. In H.266, CCLM can not only realize the prediction from the first image component to the second image component, but also realize the prediction from the first image component to the third image component or from the third image component to the first image component, and even realize the prediction from the second image component to the third image component or from the third image component to the second image component. The following description will take the prediction from the first image component to the second image component as an example, but the technical solution of the embodiment of the present application can also be applied to the prediction of other image components.

[0048] In VTM, there are currently two CCLM prediction modes: one is the single-model CCLM prediction mode; the other is the multiple-model CCLM (MMLM) prediction mode, also known as the MMLM prediction mode. As the name implies, the single-model CCLM prediction mode uses only one prediction model to achieve the prediction from the first image component to the second image component; while the MMLM prediction mode uses multiple prediction models to achieve the prediction from the first image component to the second image component. For example, in the MMLM prediction mode, the reference pixels adjacent to the coding block can be grouped into an adjacent reference pixel set, and the adjacent reference pixel set can be divided into two groups, each of which can be used as a separate training set for deriving model parameters in the prediction model, that is, each group can derive a set of model parameters α and β.

[0049] In order to ensure the accuracy of the model parameters used by each prediction model in the MMLM prediction mode, the reference pixel set constructed for deriving the model parameters needs to be more accurate. Based on this, an embodiment of the present application provides an image component prediction method, which determines the adjacent reference pixels of a current block in an image; constructs an adjacent reference pixel subset based on the adjacent reference pixels; wherein the adjacent reference pixel subset includes some pixels of the adjacent reference pixels; and then calculates model parameters of a prediction model based on the adjacent reference pixel subset; wherein the prediction model includes N prediction sub-models, the N prediction sub-models correspond to N groups of model parameters, and the prediction sub-models are used to perform cross-component prediction processing on the image component to be predicted using the corresponding model parameters, where N is a positive integer greater than or equal to 2; in this way, since the adjacent reference pixels of the current block are screened, unimportant reference pixels or abnormal reference pixels can be removed, thereby reducing the number of pixels in the adjacent reference pixel set, so that the number of pixels in the adjacent reference pixel subset is smaller, which not only reduces the computational complexity and memory bandwidth, but also improves the accuracy of the prediction model; in addition, cross-component prediction processing of the image component to be processed is performed through at least two prediction sub-models, thereby improving the prediction accuracy of the image component to be processed and improving the prediction efficiency of the video image.

[0050] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0051] See also Figure 1 , which shows an example of a block diagram of a video encoding system provided by an embodiment of the present application; Figure 1As shown, the video coding system 100 includes a transform and quantization unit 101, an intra-frame estimation unit 102, an intra-frame prediction unit 103, a motion compensation unit 104, a motion estimation unit 105, an inverse transform and inverse quantization unit 106, a filter control analysis unit 107, a filtering unit 108, a coding unit 109 and a decoded image cache unit 110, etc., wherein the filtering unit 108 can implement deblocking filtering and sample adaptive offset (Sample Adaptive Offset, SAO) filtering, and the coding unit 109 can implement header information coding and context-based adaptive binary arithmetic coding (Context-based Adaptive Binary Arithmatic Coding, CABAC). For the input original video signal, through the coding tree block (Coding A video coding block can be obtained by dividing the video coding block into a plurality of blocks (CTUs) by a plurality of frames. Then, the residual pixel information obtained after intra-frame or inter-frame prediction is transformed by a transform and quantization unit 101, including transforming the residual information from the pixel domain to the transform domain and quantizing the obtained transform coefficients to further reduce the bit rate. The intra-frame estimation unit 102 and the intra-frame prediction unit 103 are used to perform intra-frame prediction on the video coding block. Specifically, the intra-frame estimation unit 102 and the intra-frame prediction unit 103 are used to determine the intra-frame prediction mode to be used to encode the video coding block. The motion compensation unit 104 and the motion estimation unit 105 are used to perform inter-frame prediction coding of the received video coding block relative to one or more blocks in one or more reference frames to provide temporal prediction information. The motion estimation performed by the motion estimation unit 105 is a process of generating a motion vector, which can estimate the motion of the video coding block. The motion compensation unit 104 then uses the motion vector determined by the motion estimation unit 105 to generate a motion vector. The motion vector is used to perform motion compensation; after determining the intra-frame prediction mode, the intra-frame prediction unit 103 is also used to provide the selected intra-frame prediction data to the encoding unit 109, and the motion estimation unit 105 also sends the calculated motion vector data to the encoding unit 109; in addition, the inverse transform and inverse quantization unit 106 is used to reconstruct the video coding block, reconstruct the residual block in the pixel domain, and remove the block effect artifacts of the reconstructed residual block through the filter control analysis unit 107 and the filtering unit 108. The reconstructed residual block is then added to a predictive block in the frame of the decoded image buffer unit 110 to generate a reconstructed video coding block; the encoding unit 109 is used to encode various coding parameters and quantized transform coefficients. In the CABAC-based coding algorithm, the context content can be based on adjacent coding blocks and can be used to encode information indicating the determined intra-frame prediction mode, and output the code stream of the video signal; and the decoded image buffer unit 110 is used to store the reconstructed video coding block for prediction reference.As the video image encoding proceeds, new reconstructed video encoding blocks are continuously generated, and these reconstructed video encoding blocks are stored in the decoded image buffer unit 110 .

[0052] See also Figure 2 , which shows an example of a block diagram of a video decoding system provided by an embodiment of the present application; Figure 2 As shown, the video decoding system 200 includes a decoding unit 201, an inverse transform and inverse quantization unit 202, an intra-frame prediction unit 203, a motion compensation unit 204, a filtering unit 205 and a decoded image buffer unit 206, etc., wherein the decoding unit 201 can implement header information decoding and CABAC decoding, and the filtering unit 205 can implement deblocking filtering and SAO filtering. The input video signal is processed by Figure 1 After the encoding process, the code stream of the video signal is output; the code stream is input into the video decoding system 200, and first passes through the decoding unit 201 to obtain the decoded transform coefficients; the transform coefficients are processed by the inverse transform and inverse quantization unit 202 to generate a residual block in the pixel domain; the intra-frame prediction unit 203 can be used to generate prediction data for the current video decoding block based on the determined intra-frame prediction mode and the data of the previously decoded block from the current frame or picture; the motion compensation unit 204 determines the prediction information for the video decoding block by analyzing the motion vector and other associated syntax elements, and uses the prediction information to generate the prediction data for the current video decoding block. The decoded video block is formed by summing the residual block from the inverse transform and inverse quantization unit 202 with the corresponding predictive block generated by the intra-frame prediction unit 203 or the motion compensation unit 204. The decoded video signal passes through the filtering unit 205 to remove blocking artifacts, thereby improving the video quality. The decoded video block is then stored in the decoded image buffer unit 206, which stores reference images for subsequent intra-frame prediction or motion compensation and is also used for outputting the video signal, thereby obtaining the restored original video signal.

[0053] The image component prediction method in the embodiment of the present application is mainly used in Figure 1 The intra-frame prediction unit 103 shown in FIG. Figure 2The intra-frame prediction unit 203 shown is specifically applied to the CCLM prediction part in the intra-frame prediction. That is to say, the image component prediction method in the embodiment of the present application can be applied to both the video encoding system and the video decoding system, and can even be applied to both the video encoding system and the video decoding system at the same time, but the embodiment of the present application does not specifically limit it. When the method is applied to the intra-frame prediction unit 103 in the video encoding system, the "current block" specifically refers to the current encoding block in the intra-frame prediction; when the method is applied to the intra-frame prediction unit 203 in the video decoding system, the "current block" specifically refers to the current decoding block in the intra-frame prediction.

[0054] Based on the above Figure 1 or Figure 2 For an example of an application scenario, see Figure 3 , which shows a flow chart of an image component prediction method provided by an embodiment of the present application. Figure 3 As shown, the method may include:

[0055] S301: Determine adjacent reference pixels of a current block in an image;

[0056] It should be noted that a video image can be divided into multiple image blocks, and each image block currently to be encoded can be called a coding block. Each coding block may include a first image component, a second image component, and a third image component; and the current block is a coding block in the video image for which prediction of the first image component, the second image component, or the third image component is currently being performed. When the first image component needs to be predicted using a prediction model, the image component to be predicted is the first image component; when the second image component needs to be predicted using a prediction model, the image component to be predicted is the second image component; and when the third image component needs to be predicted using a prediction model, the image component to be predicted is the third image component.

[0057] It should also be noted that when the left adjacent area, the lower left adjacent area, the upper adjacent area and the upper right adjacent area are all valid areas, the adjacent reference pixels can be composed of adjacent reference pixel points in the left adjacent area and the upper adjacent area of the current block, or can be composed of adjacent reference pixel points in the left adjacent area and the lower left adjacent area of the current block, or can be composed of adjacent reference pixel points in the upper adjacent area and the upper right adjacent area of the current block. This embodiment of the present application does not make specific limitations.

[0058] In some embodiments, optionally, for S301, determining adjacent reference pixels of the current block in the image may include:

[0059] Acquire reference pixels adjacent to at least one side of the current block; wherein the at least one side of the current block includes at least one of the following: an upper row, an upper right row, a left column, and a lower left column;

[0060] The adjacent reference pixels are obtained according to the acquired reference pixels.

[0061] It should be noted that at least one edge of the current block may include at least one of the following: the upper row (also called the upper side), the upper right row (also called the upper right side), the left column (also called the left side) or the lower left column (also called the lower left side).

[0062] Optionally, in some embodiments, if at least one side of the current block is a left side and / or a top side, for S301, determining adjacent reference pixels of the current block in the image may include:

[0063] Obtaining reference pixel points adjacent to at least one side of the current block; wherein the at least one side includes a left side of the current block and / or an upper side of the current block;

[0064] The adjacent reference pixels are obtained according to the acquired reference pixels.

[0065] It should be noted that at least one edge of the current block may include the left edge of the current block and / or the upper edge of the current block; that is, at least one edge of the current block may refer to the upper edge of the current block, or the left edge of the current block, or even the upper and left edges of the current block, which is not specifically limited in the embodiments of the present application.

[0066] In this way, when the left adjacent area and the upper adjacent area are all valid areas, the adjacent reference pixels can be composed of reference pixels adjacent to the left side of the current block and reference pixels adjacent to the upper side of the current block. When the left adjacent area is a valid area and the upper adjacent area is an invalid area, the adjacent reference pixels can be composed of reference pixels adjacent to the left side of the current block; when the left adjacent area is an invalid area and the upper adjacent area is a valid area, the adjacent reference pixels can be composed of reference pixels adjacent to the upper side of the current block.

[0067] Optionally, if at least one side of the current block is adjacent columns consisting of a left side and a lower left side, and / or adjacent rows consisting of an upper side and an upper right side, for S301, determining adjacent reference pixels of the current block in the image may include:

[0068] Obtaining reference pixels in a reference row or reference column adjacent to the current block; wherein the reference row is composed of rows adjacent to the upper side and upper right side of the current block, and the reference column is composed of columns adjacent to the left side and lower left side of the current block;

[0069] The adjacent reference pixels are obtained according to the acquired reference pixels.

[0070] It should be noted that the reference rows adjacent to the current block may be composed of rows adjacent to the upper side and upper right side of the current block, and the reference columns adjacent to the current block may be composed of columns adjacent to the left side and lower left side of the current block; the reference rows or reference columns adjacent to the current block may refer to reference rows adjacent to the upper side of the current block, or may refer to reference columns adjacent to the left side of the current block, or even to reference rows or reference columns adjacent to other sides of the current block, and this is not specifically limited in the embodiments of the present application. For the convenience of description, in the embodiments of the present application, the reference rows adjacent to the current block will be described as reference rows adjacent to the upper side, and the reference columns adjacent to the current block will be described as reference columns adjacent to the left side.

[0071] Among them, the reference pixel points in the reference row adjacent to the current block may include reference pixel points adjacent to the upper side and the upper right side (also referred to as adjacent reference pixel points corresponding to the upper side and the upper right side), wherein the upper side represents the upper side of the current block, and the upper right side represents the side length that is horizontally extended to the right by the upper side of the current block and is the same as the height of the current block; the reference pixel points in the reference column adjacent to the current block may also include reference pixel points adjacent to the left side and the lower left side (also referred to as adjacent reference pixel points corresponding to the left side and the lower left side), wherein the left side represents the left side of the current block, and the lower left side represents the side length that is vertically extended downward by the left side of the current block and is the same as the width of the current decoding block; however, the embodiments of the present application do not make specific limitations.

[0072] In this way, when the left adjacent area and the lower left adjacent area are valid areas, the adjacent reference pixels can be composed of reference pixel points in the reference column adjacent to the current block; when the upper adjacent area and the upper right adjacent area are valid areas, the adjacent reference pixels can be composed of reference pixel points in the reference row adjacent to the current block.

[0073] S302: Constructing a subset of adjacent reference pixels according to the adjacent reference pixels; wherein the subset of adjacent reference pixels includes some pixels of the adjacent reference pixels;

[0074] It should be noted that adjacent reference pixels are the reference pixels corresponding to the prediction models constructed in the current related technical solutions. Generally, in order to avoid transmitting model parameters from the video encoding system to the video decoding system, adjacent reference pixels of one or more of the four sides of the current block, such as the top side, the upper right side, the left side, and the lower left side, can be used to form adjacent reference pixels to derive model parameters. However, using so many reference pixels as sample points for multi-model construction is more complex, and some reference pixels with outliers will also reduce the quality of the prediction model.

[0075] That is to say, among the adjacent reference pixels, there may be some unimportant reference pixels (for example, these reference pixels have poor correlation) or some abnormal reference pixels. In order to ensure the accuracy of the model parameter derivation, these reference pixels need to be eliminated, thereby obtaining a subset of adjacent reference pixels; in this way, based on the subset of adjacent reference pixels, the accuracy of the prediction model can be guaranteed, so that the prediction efficiency of the image component to be processed is high.

[0076] The adjacent reference pixel subset includes a preset number of reference pixels. Here, the preset number may be N, where N is a positive integer greater than 1. In practical applications, the value of N may be 4, but this embodiment of the present application does not specifically limit this.

[0077] In some embodiments, for S302, constructing a subset of adjacent reference pixels according to the adjacent reference pixels may include:

[0078] determining a candidate position of the candidate pixel based on at least one edge of the current block;

[0079] The reference pixels corresponding to the candidate position are selected from the adjacent reference pixels, and the selected parameter pixels are used to form the adjacent reference pixel subset.

[0080] Furthermore, determining the candidate position of the candidate pixel based on at least one edge of the current block may include:

[0081] The candidate position is determined based on a pixel position corresponding to a reference pixel adjacent to at least one side of the current block.

[0082] Furthermore, determining the candidate position of the candidate pixel based on at least one edge of the current block may include:

[0083] The candidate position is determined based on an image component intensity value corresponding to a reference pixel adjacent to at least one side of the current block.

[0084] Furthermore, determining the candidate position of the candidate pixel based on at least one edge of the current block may include:

[0085] The candidate position is determined based on a pixel position and an image component intensity value corresponding to at least one side-adjacent reference pixel of the current block.

[0086] It should be noted that image component intensity can be represented by image component values, such as brightness values, chrominance values, etc. Here, a larger image component value indicates a higher image component intensity. The reference pixels selected in the embodiments of the present application can be selected based on the candidate positions of the candidate pixels; wherein the candidate positions can be determined based on the pixel positions or based on the image component intensity values (such as brightness values, chrominance values, etc.), which are not specifically limited in the embodiments of the present application.

[0087] S303: Calculate the model parameters of the prediction model based on the adjacent reference pixel subset; wherein the prediction model includes N prediction sub-models, the N prediction sub-models correspond to N groups of model parameters, and the prediction sub-models are used to perform cross-component prediction processing on the image components to be predicted through the corresponding model parameters, and N is a positive integer greater than or equal to 2.

[0088] It should be noted that, based on the subsets of adjacent reference pixels, multiple groups of model parameters can be calculated; based on each group of model parameters, a prediction sub-model can be constructed; in this way, if N groups of model parameters are calculated, then N prediction sub-models can be obtained.

[0089] It should also be noted that the prediction model can be a nonlinear model or a complex model. Among them, the complex model can be a nonlinear model in a nonlinear form such as a quadratic curve, or a multi-model composed of multiple linear models. In this way, for the complex model, since unimportant reference pixels or some abnormal reference pixels have been eliminated from the adjacent reference pixel subsets, the N groups of model parameters determined based on the adjacent reference pixel subsets are more accurate, thereby improving the accuracy of the complex model and enhancing the prediction accuracy of the image component to be processed.

[0090] This embodiment provides an image component prediction method, which comprises determining adjacent reference pixels of a current block in an image; constructing an adjacent reference pixel subset based on the adjacent reference pixels; wherein the adjacent reference pixel subset includes some pixels of the adjacent reference pixels; and calculating model parameters of a prediction model based on the adjacent reference pixel subset; wherein the prediction model comprises N prediction sub-models, each of the N prediction sub-models corresponding to N groups of model parameters, and the prediction sub-models are used to perform cross-component prediction processing on the image component to be predicted using the corresponding model parameters, where N is a positive integer greater than or equal to 2. In this way, due to the screening processing of the adjacent reference pixels of the current block, unimportant reference pixels or abnormal reference pixels can be removed, thereby reducing the number of pixels in the adjacent reference pixel set, resulting in a smaller number of pixels in the adjacent reference pixel subset, which not only reduces computational complexity and memory bandwidth but also improves the accuracy of the prediction model. In addition, cross-component prediction processing of the image component to be processed is performed using at least two prediction sub-models, thereby improving the prediction accuracy of the image component to be processed and improving the prediction efficiency of the video image.

[0091] Furthermore, the obtained adjacent reference pixels may contain some unimportant or abnormal reference pixels, which may affect the calculation of model parameters and thus the accuracy of the prediction model. In this case, some reference pixels can be selected from the adjacent reference pixels to form an adjacent reference pixel subset, and the model parameters can be calculated based on this adjacent reference pixel subset.

[0092] It should be noted that the selected reference pixels in the embodiments of the present application may be selected based on the pixel positions corresponding to the reference pixels, or based on the intensity values of the image components corresponding to the reference pixels (such as brightness values, chrominance values, etc.), which are not specifically limited in the embodiments of the present application. Whether the selection is based on the pixel positions corresponding to the reference pixels or the intensity values of the image components corresponding to the reference pixels, the adjacent reference pixels are screened to select appropriate reference pixels to form a subset of adjacent reference pixels. In this way, the model parameters derived from the subset of adjacent reference pixels are more accurate, so that the prediction model constructed based on the model parameters can also be more accurate.

[0093] In some embodiments, determining the candidate position of the candidate pixel based on at least one edge of the current block may include:

[0094] Determining a preset number of candidate pixels; wherein the preset number of candidate pixels represents the number of pixels sampled from reference pixels adjacent to at least one side of the current block;

[0095] The candidate position is determined according to the preset number of candidate pixels and the length of at least one side of the current block; wherein the length of at least one side of the current block is equal to the number of pixels included in at least one side of the current block.

[0096] It should be noted that the preset number of candidate pixels represents the pre-set number of pixels to be sampled, that is, the number of pixels included in the adjacent reference pixel subset. Taking the pixel position as an example, after determining the preset number of candidate pixels, the candidate position of the candidate pixel can be calculated based on the length of at least one side and the preset number of candidate pixels. Then, based on the candidate position, appropriate reference pixels are selected from the adjacent reference pixels to form the adjacent reference pixel subset. In this way, the model parameters calculated based on the adjacent reference pixel subset are more accurate, and the constructed prediction model can also be more precise, thereby improving the prediction accuracy of the image component to be predicted and the prediction efficiency of the video image.

[0097] Furthermore, to determine the candidate position, a first sampling interval may be calculated first, and then sampling may be performed on the at least one edge according to the first sampling interval to determine the candidate position of the candidate pixel corresponding to the at least one edge. Therefore, in some embodiments, determining the candidate position of the candidate pixel based on the at least one edge of the current block may include:

[0098] Calculating a first sampling interval according to the preset number of candidate pixels and the length of at least one side of the current block;

[0099] A reference point is determined from at least one side of the current block, and the candidate position is determined according to the first sampling interval.

[0100] It should be noted that the reference point can be the midpoint of at least one edge, or the first reference pixel position to the left of the midpoint of at least one edge, or the first reference pixel position to the right of the midpoint of at least one edge, or even other reference pixel positions of at least one edge, and the embodiments of the present application do not make specific limitations.

[0101] Specifically, the midpoint of the at least one side can be determined based on the length of the at least one side, and then the midpoint of the at least one side can be used as the reference point. The reference point can be the midpoint of the at least one side, or the first reference pixel position to the left of the midpoint of the at least one side, or the first reference pixel position to the right of the midpoint of the at least one side, or even other reference pixel positions of the at least one side, and this embodiment of the application does not specifically limit this.

[0102] It should be noted that, considering that the importance of the reference pixels adjacent to at least one side of the current block is related to their corresponding positions, in order to make the reference pixels in the adjacent reference pixel subset represent the characteristics of the entire adjacent side, it is necessary to select the reference pixels at the center of the side as much as possible to eliminate the less important points (such as the reference pixels on both sides of the side). In the embodiment of the present application, if the upper side of the current block is used as an example, the first reference pixel position to the right or left of the middle position can be used as the reference point of the side; if the left side of the current block is used as an example, the first reference pixel position below or above the middle position can be used as the reference point of the side.

[0103] In addition, before determining the reference point, you can first delete a preset number of reference pixel points corresponding to the end position of one of the edges of the current block, or perform an initial offset from the end position of the edge according to a preset offset, and use the offset reference pixel position as the starting point to obtain a new edge, and then use the middle position corresponding to the new edge as the reference point; accordingly, you can first delete a preset number of reference pixel points corresponding to the starting position of one of the edges of the current block, or perform an initial offset from the starting position of the edge according to a preset offset, and use the offset reference pixel position as the starting point to obtain a new edge, and then use the middle position corresponding to the new edge as the reference point.

[0104] In practical applications, since the length of the left side or the top side of the current block is an integer multiple of 2, the middle position of the left side or the top side of the current block is between the two points. Figure 4 In the example, the first pixel point to the left of the middle position is used as the midpoint of the edge; however, in the embodiment of the present application, the first pixel point to the right of the middle position can also be used as the midpoint of the edge, such as Figure 5 As shown. Figure 4 In order to shift the first pixel to the left of the middle position (such as Figure 4 3) as the midpoint of the edge, since the preset number of samples is 2, the position of the reference pixel to be selected can be determined (such as Figure 4 The middle gray point example) is 1 and 5. Based on the positions of these reference pixels, corresponding reference pixels can also be selected to form a subset of adjacent reference pixels. Therefore, in the embodiment of the present application, for the upper side of the current block, either the first pixel to the right of the middle position can be used as the midpoint of the side, or the first pixel to the left of the middle position can be used as the midpoint of the side, and the embodiment of the present application does not make specific restrictions. In addition, for the left side of the current block, either the first pixel below the middle position can be used as the midpoint of the side, or the first pixel above the middle position can be used as the midpoint of the side, and the embodiment of the present application does not make specific restrictions.

[0105] Unless otherwise specified, the following description will use the upper side of the current block as an example, but the image component prediction method of the embodiment of the present application is also applicable to the left side of the current block, or even the right side of the reconstructed block or the lower side of the reconstructed block, and the embodiment of the present application does not make specific limitations.

[0106] It can be understood that if the existence of the reference pixel points adjacent to the left side or the upper side of the current block is not considered, the second reference pixel set can also be constructed according to equations (1) and (2):

[0107] Δ=length / (N2 / 2) (1)

[0108] shift=Δ / 2 (2)

[0109] Wherein, Δ represents the sampling interval, length represents the number of reference pixels in a row adjacent to the upper side of the current block, or the number of reference pixels in a column adjacent to the left side of the current block, N2 represents the number of reference pixels in the adjacent reference pixel subset expected by the current block (generally speaking, the left side and the upper side are each half, but this is not specifically limited in the embodiments of the present application), and shift represents the starting point position for selecting the reference pixel points. Here, when the middle position of the left side or the upper side of the current block is between two points, if the first pixel to the right of the middle position is used as the midpoint of the side, then the starting point position shift = Δ / 2; if the first pixel to the left of the middle position is used as the midpoint of the side, then the starting point position shift = Δ / 2-1.

[0110] For example, Figure 4 Taking the upper side shown as an example, length is equal to 8, N2 is equal to 4, assuming that the left side and the upper side are each half, that is, the preset number of samples of the upper side is 2, then according to formula (1) and formula (2), Δ=length / (N2 / 2)=4, shift=Δ / 2=2 are calculated respectively, that is, with 1 as the starting point position and 4 as the sampling interval, the position of the reference pixel to be selected can be determined first, such as 1 and 5, and then the corresponding reference pixel points can be selected to form a subset of adjacent reference pixels. Here, it should be noted that the preset number of samples corresponding to the left side and the preset number of samples corresponding to the upper side can be the same or different, and the embodiments of the present application do not make specific limitations.

[0111] It should also be noted that, based on the preset number of candidate pixels and the length of one side of the current block, the first sampling interval corresponding to the side can be calculated. In addition, since the length of the left side or the upper side of the current block is an integer multiple of 2, the middle position of the left side or the upper side of the current block is between two points. In this case, the calculated midpoint value is a non-integer, and the calculated reference pixel position is also a non-integer; however, if the length of the left side or the upper side of the current block is not an integer multiple of 2, the middle position of the left side or the upper side of the current block will not be between the two points. In this case, the calculated midpoint value is an integer, and the calculated reference pixel position is also an integer; that is, the calculated midpoint value can be an integer or a non-integer; correspondingly, the calculated reference pixel position can also be an integer or a non-integer; this is not specifically limited in the embodiments of the present application.

[0112] In this way, when the calculated midpoint value is an integer, the corresponding calculated reference pixel position is also an integer. At this time, the calculated reference pixel position can be directly used as the candidate position; when the calculated midpoint value is a non-integer, the corresponding calculated reference pixel position is also a non-integer. At this time, the candidate position can be determined by rounding up or down.

[0113] Furthermore, in some embodiments, after calculating the first sampling interval, the method may further include:

[0114] Adjusting the first sampling interval to obtain a second sampling interval;

[0115] The candidate position is determined based on the reference point according to the second sampling interval.

[0116] It should be noted that after calculating the first sampling interval, the first sampling interval can be fine-tuned, such as by adding 1 or subtracting 1 from the first sampling interval to obtain the second sampling interval. For example, if the first sampling interval is 4, the adjusted second sampling interval can be 3 or 5. In the embodiment of the present application, the adjustment of the first sampling interval can be a small adjustment (for example, adding 1 or subtracting 1), but the embodiment of the present application does not specifically limit the specific setting of the adjustment amplitude.

[0117] Furthermore, in some embodiments, after obtaining the second sampling interval, the method may further include:

[0118] Based on the reference point, a candidate position corresponding to one side of the reference point is determined according to the first sampling interval, and a candidate position corresponding to the other side of the reference point is determined according to the second sampling interval.

[0119] That is to say, after determining the reference point of at least one edge of the current block, uniform sampling can be performed according to the first sampling interval or the second sampling interval; or non-uniform sampling can be performed according to the first sampling interval and the second sampling interval, and the candidate positions determined after sampling can be symmetrically distributed on both sides of the reference point, or asymmetrically distributed on both sides of the reference point; the embodiments of the present application do not make specific limitations.

[0120] Furthermore, since the reference pixel point located in the middle of at least one side is more relevant to the image component to be predicted of the current block among the adjacent reference pixels, the reference pixel point positions of a preset number of consecutive samples near the middle position can be used as the reference pixel point positions to be selected. This method can be called a continuous point selection scheme at the middle position. Specifically, assuming that the reference pixel point positions on a row / column adjacent to the upper side or left side of the current block are numbered starting from 0, the number of adjacent reference pixels and the corresponding reference pixel point positions to be selected in the adjacent reference pixel subset formed in this embodiment are shown in Table 1. At this time, the reference pixel point positions of a preset number of consecutive samples near the middle position can be used as candidate positions to form an adjacent reference pixel subset.

[0121] Table 1

[0122] The length of at least one side of the current block Candidate location Preset number of candidate pixels 2 0,1 2 4 1,2 2 8 2,3,4 (or 3,4,5) 3 16 6,7,8,9 4 32 13,14,15,16,17,18,19,20 8

[0123] Furthermore, for the screening process of adjacent parameter pixels, reference pixel points of at least one side may be skipped, i.e., unimportant reference pixel points or abnormal reference pixel points are skipped (which can also be regarded as deletion process), thereby obtaining a subset of adjacent reference pixels; on this basis, i.e., after skipping some reference pixel points of at least one side, the remaining reference pixel points may be screened to obtain a subset of adjacent reference pixels. Therefore, in some embodiments, determining the candidate position of the candidate pixel based on at least one side of the current block may include:

[0124] Determine a preset number K of skipped pixels corresponding to at least one side of the current block, where K is a positive integer greater than or equal to 1;

[0125] Starting from a starting position and / or an end position of at least one side of the current block, determining positions corresponding to K pixels to be skipped;

[0126] Based on positions corresponding to the K to-be-skipped pixels, continuously skipping K to-be-skipped pixels from a starting position and / or an end position of at least one edge of the current block to obtain at least one new edge of the current block;

[0127] The candidate position is determined based on at least one new edge of the current block and the preset number of candidate pixels.

[0128] It should be noted that the preset number of skipped pixels represents a preset number of pixels to be deleted or skipped. In addition, the starting position of at least one edge represents the leftmost edge position of the upper edge of the current block or the uppermost edge position of the left edge of the current block, and the ending position of at least one edge represents the rightmost edge position of the upper edge of the current block or the lowermost edge position of the left edge of the current block.

[0129] It should also be noted that the value of K can be a preset number of reference pixels, such as 1, 2, or 4; it can also be calculated based on the side length of the current block and the corresponding preset ratio; however, in actual applications, it is still set according to actual conditions and is not specifically limited in the embodiments of this application. Among them, the preset ratio corresponding to the upper side of the current block can be represented by a first preset ratio, and the preset ratio corresponding to the left side of the current block can be represented by a second preset ratio. The values of the first preset ratio and the second preset ratio can be the same or different, and are not specifically limited in the embodiments of this application.

[0130] In this way, assuming that starting from the starting position of at least one edge, if at least one edge is the upper side of the current block (also known as the reference row of the current block), then starting from the leftmost edge position of at least one edge, the positions corresponding to the K pixels to be skipped can be determined; if at least one edge is the left side of the current block (also known as the reference column of the current block), then starting from the uppermost edge position of at least one edge, the positions corresponding to the K pixels to be skipped can be determined; assuming that starting from the end position of at least one edge, if at least one edge is the upper side of the current block, then starting from the rightmost edge position of at least one edge, the positions corresponding to the K pixels to be skipped can be determined; if at least one edge is the left side of the current block, then starting from the lowermost edge position of at least one edge, the positions corresponding to the K pixels to be skipped can be determined; in actual applications, the settings are made according to actual conditions, and the embodiments of the present application do not make specific limitations.

[0131] After determining the positions corresponding to the K pixels to be skipped, assuming that starting from the starting position of at least one edge, if at least one edge is the upper edge of the current block, then starting from the leftmost edge position of the upper edge, the positions corresponding to K consecutive pixels to be skipped can be determined to the right, and then these K pixels to be skipped can be skipped continuously to obtain a new upper edge; at this time, the candidate position corresponding to the new upper edge can be determined based on the side length of the new upper edge and the preset number of candidate pixels, so that the selected candidate pixels are formed into a subset of adjacent reference pixels; if at least one edge is the left edge of the current block, then starting from the top edge position of the left edge, the positions corresponding to K consecutive pixels to be skipped can be determined downward, and then these K pixels to be skipped can be skipped continuously to obtain a new left edge; at this time, the candidate position corresponding to the new left edge can be determined based on the side length of the new left edge and the preset number of candidate pixels, so that the selected candidate pixels are formed into a subset of adjacent reference pixels. Alternatively, assuming that starting from the end position of at least one edge, if at least one edge is the upper side of the current block, then starting from the rightmost edge position of the upper side, the positions corresponding to K consecutive pixels to be skipped can be determined to the left, and then these K pixels to be skipped can be skipped continuously to obtain a new upper side; at this time, the candidate position corresponding to the new upper side can be determined based on the length of the new upper side and the preset number of candidate pixels, so that the selected candidate pixels are formed into a subset of adjacent reference pixels; if at least one edge is the left side of the current block, then starting from the lowermost edge position of the left side, the positions corresponding to K consecutive pixels to be skipped can be determined upward, and then these K pixels to be skipped can be skipped continuously to obtain a new left side; at this time, the candidate position corresponding to the new left side can be determined based on the length of the new left side and the preset number of candidate pixels, so that the selected candidate pixels are formed into a subset of adjacent reference pixels.

[0132] In this way, the embodiment of the present application uses a portion of the adjacent reference pixels (i.e., a subset of adjacent reference pixels) obtained from the adjacent reference pixels of the current block to derive model parameters corresponding to a complex model (such as a nonlinear model or a multi-model). Since the obtained subset (i.e., the subset of adjacent reference pixels) has been eliminated from unimportant reference pixels or reference pixels with abnormalities, it has a smaller number of reference pixels. This not only reduces the computational complexity and memory bandwidth, but also improves the accuracy of the complex model, thereby achieving the purpose of improving the prediction accuracy of the image component to be processed and the prediction efficiency of the video image.

[0133] Furthermore, after determining the adjacent reference pixel subset, model parameters of the prediction model may be calculated based on the adjacent reference pixel subset to construct the prediction model; wherein the prediction model may include N prediction sub-models, where N is a positive integer greater than or equal to 2. Therefore, in some embodiments, for S303, the calculation of the model parameters of the prediction model based on the adjacent reference pixel subset may include:

[0134] Constructing N first adjacent reference pixel subsets according to the adjacent reference pixel subsets;

[0135] Based on the N first adjacent reference pixel subsets, N groups of model parameters corresponding to the N prediction sub-models are calculated; wherein each prediction sub-model corresponds to a group of model parameters.

[0136] Furthermore, constructing N first adjacent reference pixel subsets according to the adjacent reference pixel subsets may include:

[0137] determining at least one threshold value based on the subset of adjacent reference pixels;

[0138] The adjacent reference pixel subset is divided into the N first adjacent reference pixel subsets according to the at least one threshold.

[0139] It should be noted that the threshold serves as the basis for classifying the reference pixels included in the adjacent reference pixel subset and also serves as the basis for classifying the reconstructed value of the first image component of the current block. Furthermore, the threshold serves as a setting for establishing multiple prediction sub-models. The threshold's magnitude is related to the reconstructed value of the first image component corresponding to all pixels in the current block.

[0140] Specifically, the size of the threshold can be obtained by calculating the mean of the first image component reconstruction values corresponding to all pixels in the current block, or by calculating the median of the first image component reconstruction values of all pixels in the current block, which is not specifically limited in the embodiments of the present application.

[0141] In the embodiment of the present application, first, the mean value Mean can be calculated based on the first image component reconstruction values corresponding to all pixels in the current block and formula (3):

[0142]

[0143] Among them, Mean represents the mean of the reconstructed brightness values corresponding to all pixels in the current block, ∑Rec L [i, j] represents the sum of the reconstructed brightness values corresponding to all pixels in the current block, and M represents the number of samples of the reconstructed brightness values corresponding to all pixels in the current block.

[0144] Secondly, the calculated mean value Mean is directly used as a threshold, and the second reference pixel set can be divided into two groups using the threshold, so that two prediction sub-models can be established. However, the embodiment of the present application is not limited to establishing only two prediction sub-models.

[0145] In this way, after the mean Mean is calculated based on the first image component reconstruction value corresponding to all pixels in the current block, if two prediction sub-models need to be established, then the Mean can be directly used as a threshold, and the reference pixels in the adjacent reference pixel subset can be divided into two groups based on the threshold, indicating that two prediction sub-models can be established subsequently; if three prediction sub-models need to be established, then (minimum reconstruction value of the first image component + Mean + 1) >> 1 can be used as the first threshold, and (maximum reconstruction value of the first image component + Mean + 1) >> 1 can be used as the second threshold, and the reference pixels in the second reference pixel set can be divided into three groups based on these two thresholds, indicating that three prediction sub-models can be established subsequently.

[0146] Furthermore, in some embodiments, after calculating the model parameters of the prediction model based on the adjacent reference pixel subset, the method may further include:

[0147] Determining a first image component reconstruction value corresponding to each pixel in the current block;

[0148] Selecting a prediction sub-model from the N prediction sub-models;

[0149] According to the selected prediction sub-model and the first image component reconstruction value corresponding to each pixel in the current block, the second image component prediction value corresponding to each pixel in the current block is calculated; wherein the image component to be predicted is the second image component.

[0150] Furthermore, selecting a prediction sub-model from the N prediction sub-models may include:

[0151] comparing a first image component reconstruction value corresponding to each pixel in the current block with the at least one threshold;

[0152] According to the comparison result, a prediction sub-model corresponding to each pixel in the current block is selected from the N prediction sub-models.

[0153] It should be noted that by grouping adjacent reference pixel subsets according to at least one threshold, at least two groups of reference pixel subsets can be obtained, and then at least two groups of model parameters can be determined. Specifically, the mean value Mean can be directly used as the threshold, and then the adjacent reference values of the first image component corresponding to each reference pixel point in the adjacent reference pixel subset are compared with Mean. For example, the reference pixels whose adjacent reference values of the first image component are greater than Mean form the first reference pixel subset, and the reference pixels whose adjacent reference values of the first image component are not greater than Mean form the second reference pixel subset, so as to obtain two groups of reference pixel subsets; then, based on the reference pixels in the first reference pixel subset, the first group of model parameters α1 and β1 are determined; and based on the reference pixels in the second reference pixel subset, the second group of model parameters α2 and β2 are determined.

[0154] It should also be noted that after establishing at least two prediction sub-models, the reconstruction value of the first image component corresponding to each pixel point in the current block can be compared with at least one threshold value, and based on the comparison result, the prediction sub-model corresponding to each pixel point is selected from the at least two prediction sub-models; then, the image component to be predicted is predicted according to the selected prediction sub-model to obtain the predicted value of the image component to be predicted.

[0155] Exemplarily, assuming that the adjacent reference value of the first image component corresponding to the reference pixel point adjacent to the current block is represented by L(n), the adjacent reference value of the second image component corresponding to the reference pixel point adjacent to the current block is represented by C(n), and the threshold is represented by Threshold; Figure 6 As shown in FIG, it shows a schematic diagram of grouping adjacent reference pixels of a current block provided by an embodiment of the present application. Figure 6 In the method, all reference pixels adjacent to the current block can be divided into two parts, such as a first reference pixel subset and a second reference pixel subset, using a threshold as a dividing point. The mean value Mean of the reconstructed values of the first image component of all pixels in the current block is used as the threshold, that is, Threshold = Mean. Thus, if L(n) ≤ Threshold, the reference pixel corresponding to L(n) can be determined as the first reference pixel subset, and then the first image component adjacent reference values L(m) and the second image component adjacent reference values C(m) corresponding to all reference pixels in the first reference pixel subset are obtained. If L(n) > Threshold, the reference pixel corresponding to L(n) can be determined as the second reference pixel subset, and then the first image component adjacent reference values L(k) and the second image component adjacent reference values C(k) corresponding to all reference pixels in the second reference pixel subset are obtained.

[0156] In this way, after obtaining the first image component adjacent reference values L(m) and the second image component adjacent reference values C(m) corresponding to all reference pixels in the first reference pixel subset, they can be used as a separate training set to train the first set of model parameters α1 and β1; after obtaining the first image component adjacent reference values L(k) and the second image component adjacent reference values C(k) corresponding to all reference pixels in the second reference pixel subset, they can also be used as a separate training set to train the second set of model parameters α2 and β2; specifically, according to L(m), C(m) and formula (4), the first set of model parameters α1 and β1 are calculated as follows:

[0157]

[0158] According to L(k), C(k) and formula (5), the second set of model parameters α2 and β2 are calculated as follows:

[0159]

[0160] After obtaining the first set of model parameters α1 and β1 and the second set of model parameters α2 and β2, we can also establish the first prediction sub-model Pred according to formula (6): 1C [i,j] and the second prediction sub-model Pred 2C [i,j], as shown below,

[0161]

[0162] Wherein, M represents the number of reference pixels in the first reference pixel subset, K represents the number of reference pixels in the second reference pixel subset, i and j represent the position coordinates of each pixel in the current block, i represents the horizontal direction, and j represents the vertical direction; Threshold represents the threshold value, which can be obtained by averaging the reconstructed values of the first image component corresponding to all pixels in the current block; Rec L [i, j] represents the first image component reconstruction value corresponding to the pixel point with the position coordinates [i, j] in the current block; Pred 1C [i, j] represents the predicted value of the second image component obtained by the first prediction sub-model for the pixel point with the position coordinate [i, j] in the current block, 2C [i, j] represents the second image component prediction value obtained by using the second prediction sub-model for the pixel point with the position coordinates [i, j] in the current block.

[0163] Specifically, for complex models (e.g., including two or more linear models), the MMLM prediction mode can be used to predict the image components to be predicted. For the current block, pixels at different position coordinates can select prediction sub-model pairs corresponding to different model parameters to construct prediction values. For example, assume there are two linear models, and there are two pixels m and n in the current block. These two pixels have two different reconstructed brightness values, and these two reconstructed brightness values are within two different intervals.

[0164] In this way, the pixel m can use the prediction model shown in formula (7) to obtain the chrominance prediction value,

[0165] C' m =α1×Y m +β1 (7)

[0166] Among them, α1 and β1 are a set of model parameters, Y m is the brightness reconstruction value corresponding to pixel m, C' m is the chroma prediction value corresponding to pixel m.

[0167] The chrominance prediction value of pixel n can be obtained using the prediction model shown in formula (8):

[0168] C' n =α2×Y n +β2 (8)

[0169] Among them, α2 and β2 are a set of model parameters, Y n is the brightness reconstruction value corresponding to pixel n, C' n is the chroma prediction value corresponding to pixel n.

[0170] In addition, the embodiments of the present application can also construct more complex prediction models (such as more complex nonlinear models or more complex multi-models) to achieve the purpose of cross-component prediction or cross-component prediction. For example, the chrominance value can be predicted based on the reconstructed luminance value that has been obtained, or the luminance value can be predicted based on the reconstructed chrominance value that has been obtained, and even prediction can be made between different chrominance values.

[0171] This embodiment provides an image component prediction method, and elaborates on the specific implementation of the aforementioned embodiment. It can be seen from the technical scheme of the aforementioned embodiment that due to the screening of adjacent reference pixels of the current block, unimportant reference pixels or abnormal reference pixels can be removed, thereby reducing the number of samples required for model parameter derivation in cross-component prediction, which not only reduces the computational complexity and memory bandwidth, but also optimizes the prediction model and improves the accuracy of the prediction model; in addition, the present application mainly optimizes the derivation process of model parameters in complex models (nonlinear models or multi-models), and uses at least two prediction sub-models to realize the prediction processing of the image component to be predicted, thereby improving the prediction accuracy of the image component to be predicted, and at the same time improving the prediction efficiency of the video image.

[0172] See also Figure 7 , which shows a flow chart of another image component prediction method provided by an embodiment of the present application. Figure 7 As shown, the method may include:

[0173] S701: Determine a first reference pixel set of a first image component of a current block in an image, wherein the first reference pixel set includes pixels adjacent to the current block;

[0174] S702: Constructing N first reference pixel subsets using the first reference pixel set, wherein the first reference pixel subsets include some pixels in the first reference pixel set, and N is equal to the number of prediction models;

[0175] S703: Using the N first reference pixel subsets, respectively calculate model parameters of N prediction models, wherein the prediction model is used to map the first image component value of the current block to the predicted value of the second image component of the current block, and the second image component is different from the first image component.

[0176] It should be noted that the video image can be divided into multiple image blocks, and each image block currently to be encoded can be called a coding block. Each coding block may include a first image component, a second image component, and a third image component; and the current block is a coding block in the video image that is currently to be predicted for the first image component, the second image component, or the third image component. When it is necessary to predict the first image component through a prediction model, the image component to be predicted is the first image component; when it is necessary to predict the second image component through a prediction model, the image component to be predicted is the second image component; when it is necessary to predict the third image component through a prediction model, the image component to be predicted is the third image component. In the embodiment of the present application, the image component to be predicted is described by taking the second image component as an example, and the prediction model can be used to map the first image component value of the current block to the predicted value of the second image component of the current block.

[0177] It should also be noted that the prediction model can be a nonlinear model or a complex model. Among them, the complex model can be a nonlinear model of nonlinear form such as a quadratic curve, or a multi-model composed of multiple linear models. In this way, for the complex model, since there may be some unimportant reference pixels (for example, these reference pixels have poor correlation) or some abnormal reference pixels in the adjacent reference pixels of the current block, in order to ensure the accuracy of the model parameter derivation, these reference pixels need to be removed, thereby constructing a reference pixel subset. In this way, the model parameters determined according to the reference pixel subset are more accurate, which not only improves the accuracy of the complex model, but also improves the prediction accuracy of the image component to be processed.

[0178] This embodiment provides an image component prediction method, comprising: determining a first reference pixel set corresponding to a first image component of a current block in an image, wherein the first reference pixel set includes pixels adjacent to the current block; constructing N first reference pixel subsets using the first reference pixel set, wherein the first reference pixel subsets include some pixels in the first reference pixel set, where N is equal to the number of prediction models; and calculating model parameters of N prediction models using the N first reference pixel subsets, wherein the prediction models are used to map a value of the first image component of the current block to a predicted value of a second image component of the current block, the second image component being different from the first image component. In this way, by filtering the adjacent reference pixels of the current block, unimportant reference pixels or abnormal reference pixels can be removed, thereby reducing the number of pixels in the adjacent reference pixel set, resulting in a smaller number of pixels in the adjacent reference pixel subsets, which not only reduces computational complexity and memory bandwidth but also improves the accuracy of the prediction model. In addition, by performing cross-component prediction processing on the image component to be processed using at least two prediction sub-models, the prediction accuracy of the image component to be processed is improved, while also improving the prediction efficiency of the video image.

[0179] Furthermore, in some embodiments, for S702, constructing N first reference pixel subsets using the first reference pixel set may include:

[0180] determining at least one threshold value based on the first reference pixel set;

[0181] The first reference pixel set is divided into the N first reference pixel subsets according to the at least one threshold.

[0182] It should be noted that the value of N is a positive integer greater than or equal to 2.

[0183] It should also be noted that the threshold value is the basis for classifying the reference pixels included in the adjacent reference pixel subset, and is also the basis for classifying the first image component reconstruction value of the current block. In addition, the threshold value is also used to indicate the set value based on which multiple prediction sub-models are established. The size of the threshold value is related to the first image component reconstruction value corresponding to all pixels in the current block. Specifically, the size of the threshold value can be obtained by calculating the mean value of the first image component reconstruction value corresponding to all pixels in the current block, or by calculating the median value of the first image component reconstruction value of all pixels in the current block. This embodiment of the present application does not specifically limit this.

[0184] In some embodiments, for S701, determining a first reference pixel set corresponding to a first image component of a current block in an image may include:

[0185] The first reference pixel set is obtained based on part or all of the pixels on the edge of the current block; wherein the edge of the current block includes at least one of the following: an upper adjacent row, an upper right adjacent row, a left adjacent column, and a lower left adjacent column.

[0186] It should be noted that the at least one edge of the current block may include at least one of the following: an upper row (also referred to as an upper side edge), an upper right row (also referred to as an upper right side edge), a left column (also referred to as a left side edge), or a lower left column (also referred to as a lower left side edge). Part or all of the pixels on these edges may form a first reference pixel set.

[0187] Furthermore, since some unimportant reference pixels (e.g., those reference pixels have poor correlation) or some abnormal reference pixels may exist among the adjacent reference pixels of the current block, it is necessary to screen the adjacent reference pixels and form the first reference pixel set with the screened candidate pixels. Therefore, in some embodiments, obtaining the first reference pixel set based on some or all pixels on the edge of the current block may include:

[0188] Determining candidate positions of the candidate pixels on an edge of the current block;

[0189] The first reference pixel set is obtained according to the pixels at the candidate positions.

[0190] Furthermore, determining the candidate position of the candidate pixel on the edge of the current block may include:

[0191] The candidate position is determined according to pixel positions corresponding to pixels on the edge of the current block.

[0192] Furthermore, determining the candidate position of the candidate pixel on the edge of the current block may include:

[0193] The candidate position is determined according to first image component values corresponding to pixels on the edge of the current block.

[0194] Furthermore, determining the candidate position of the candidate pixel on the edge of the current block may include:

[0195] The candidate position is determined according to pixel positions corresponding to pixels on the edge of the current block and first image component values corresponding to pixels on the edge of the current block.

[0196] It should be noted that the first image component value is mainly used to represent the image component intensity of the pixel, such as brightness value, chrominance value, etc. Here, the larger the image component value, the higher the image component intensity.

[0197] It should also be noted that the reference pixels selected in the embodiment of the present application can be selected through the candidate positions of the candidate pixels; wherein the candidate positions can be determined based on the pixel positions, or based on the first image component values (such as brightness values, chromaticity values, etc.), or can be jointly determined based on the pixel positions and the first image component values, which are not specifically limited in the embodiment of the present application. In other words, some of the reference pixels selected in the embodiment of the present application can be selected based on the pixel positions corresponding to the reference pixels, or based on the image component intensity values corresponding to the reference pixels (such as brightness values, chromaticity values, etc.); whether it is through the pixel positions corresponding to the reference pixels or the image component intensity values corresponding to the reference pixels, the adjacent reference pixels are screened to select suitable reference pixels, and then form a first reference pixel set; in this way, after the first reference pixel set is divided into N first reference pixel subsets, the model parameters derived based on the N first reference pixel subsets are more accurate, so that the prediction model constructed based on the model parameters can also be more accurate.

[0198] Furthermore, to determine the candidate position, a first sampling interval may be calculated first, and then sampling may be performed on the at least one edge according to the first sampling interval to determine the candidate position of the candidate pixel corresponding to the at least one edge. Therefore, in some embodiments, determining the candidate position of the candidate pixel on the edge of the current block may include:

[0199] Determining a preset number of candidate pixels, wherein the preset number of candidate pixels indicates the number of pixels selected from the edge of the current block;

[0200] The candidate position is determined according to the preset number of pixels and the length of the side of the current block, wherein the length of the side of the current block is equal to the number of pixels on the side of the current block.

[0201] It should be noted that the preset number of candidate pixels represents the pre-set number of pixels to be sampled, i.e., the number of pixels included in the adjacent reference pixel subset. Taking pixel positions as an example, after determining the preset number of candidate pixels, the candidate positions of the candidate pixels can be calculated based on the length of at least one side and the preset number of candidate pixels. Based on the candidate positions, appropriate reference pixels are then selected from the adjacent reference pixels to form the adjacent reference pixel subset.

[0202] Furthermore, to determine the candidate position, a first sampling interval may be calculated first, and then sampling may be performed on the at least one edge according to the first sampling interval to determine the candidate position of the candidate pixel corresponding to the at least one edge. Therefore, in some embodiments, after determining the preset number of candidate pixels, the method may further include:

[0203] A first sampling interval is calculated according to the length of the side of the current block and the preset number of candidate pixels.

[0204] Furthermore, after calculating the first sampling interval, the method may further include:

[0205] The first sampling interval is adjusted to obtain a second sampling interval.

[0206] Furthermore, determining the candidate position of the candidate pixel on the edge of the current block may include:

[0207] A reference point is determined on an edge of the current block, and the candidate position is determined starting from the reference point at the first sampling interval.

[0208] It should be noted that the reference point can be the midpoint of at least one edge, or the first reference pixel position to the left of the midpoint of at least one edge, or the first reference pixel position to the right of the midpoint of at least one edge, or even other reference pixel positions of at least one edge, and the embodiments of the present application do not make specific limitations.

[0209] It should also be noted that after calculating the first sampling interval, the first sampling interval can be fine-tuned, such as adding 1 or subtracting 1 from the first sampling interval to obtain the second sampling interval. For example, if the first sampling interval is 4, the adjusted second sampling interval can be 3 or 5. In the embodiment of the present application, the adjustment of the first sampling interval can be a small adjustment (for example, adding 1 or subtracting 1), but the embodiment of the present application does not specifically limit the specific setting of the adjustment amplitude.

[0210] Furthermore, in some embodiments, determining the candidate position of the candidate pixel on the edge of the current block may include:

[0211] A reference point is determined on an edge of the current block, and the candidate positions on both sides of the reference point are determined at the first sampling interval.

[0212] Furthermore, in some embodiments, determining the candidate position of the candidate pixel on the edge of the current block may include:

[0213] A reference point is determined on an edge of the current block, and the candidate position is determined starting from the reference point at the second sampling interval.

[0214] Furthermore, in some embodiments, determining the candidate position of the candidate pixel on the edge of the current block may include:

[0215] A reference point is determined on an edge of the current block, and the candidate positions on both sides of the reference point are determined at the second sampling interval.

[0216] Furthermore, in some embodiments, determining the candidate position of the candidate pixel on the edge of the current block may include:

[0217] A reference point is determined on an edge of the current block, a candidate position corresponding to one side of the reference point is determined at the first sampling interval, and a candidate position corresponding to the other side of the reference point is determined at the second sampling interval.

[0218] It should be noted that after determining the reference point of at least one edge of the current block, uniform sampling can be performed according to the first sampling interval or the second sampling interval; or non-uniform sampling can be performed according to the first sampling interval and the second sampling interval, and the candidate positions determined after sampling can be symmetrically distributed on both sides of the reference point, or asymmetrically distributed on both sides of the reference point; the embodiments of the present application do not make specific limitations.

[0219] Furthermore, for the screening process of adjacent parameter pixels, the reference pixels of at least one side may be skipped, that is, unimportant reference pixels or abnormal reference pixels are skipped (which can also be regarded as deletion process), thereby obtaining an adjacent reference pixel subset; on this basis, after skipping some reference pixels of at least one side, the remaining reference pixels may be screened to obtain an adjacent reference pixel subset. Therefore, in some embodiments, the method may further include:

[0220] Determine a preset number K of skipped pixels of an edge of the current block, where K is a non-negative integer;

[0221] Starting from the end position of the side of the current block, the Kth pixel position is set as the reference point; wherein the end position of the side of the current block is the head pixel position or the end pixel position of the side of the current block.

[0222] It should be noted that the preset number of skipped pixels represents a preset number of pixels to be deleted or skipped. In addition, the starting position of at least one edge represents the leftmost edge position of the upper edge of the current block or the uppermost edge position of the left edge of the current block, and the ending position of at least one edge represents the rightmost edge position of the upper edge of the current block or the lowermost edge position of the left edge of the current block.

[0223] It should also be noted that the value of K can be a preset number of reference pixels, such as 1, 2, or 4; it can also be calculated based on the side length of the current block and the corresponding preset ratio; however, in actual applications, it is still set according to actual conditions and is not specifically limited in the embodiments of this application. Among them, the preset ratio corresponding to the upper side of the current block can be represented by a first preset ratio, and the preset ratio corresponding to the left side of the current block can be represented by a second preset ratio. The values of the first preset ratio and the second preset ratio can be the same or different, and are not specifically limited in the embodiments of this application.

[0224] Furthermore, after determining the N first reference pixel subsets, model parameters of a prediction model may be calculated based on the N first reference pixel subsets to construct a prediction model; wherein the prediction model may include N prediction sub-models, where N is a positive integer greater than or equal to 2. Therefore, in some embodiments, after calculating the model parameters of the N prediction models using the N first reference pixel subsets, the method may further include:

[0225] Determining a first image component reconstruction value corresponding to a pixel in the current block;

[0226] Selecting a prediction model from the N prediction models;

[0227] The second image component prediction value corresponding to the pixel in the current block is calculated using the selected prediction model and the first image component reconstruction value corresponding to the pixel in the current block.

[0228] Furthermore, selecting a prediction model from the N prediction models may include:

[0229] Comparing a first image component reconstruction value corresponding to a pixel in the current block with the at least one threshold value;

[0230] According to the comparison result, a prediction model used by the pixels in the current block is selected from the N prediction models.

[0231] It should be noted that after establishing N prediction models, the reconstruction value of the first image component corresponding to each pixel point in the current block can be compared with at least one threshold value, and based on the comparison result, a prediction model corresponding to each pixel point is selected from the N prediction models; then, the image component to be predicted is predicted according to the selected prediction model to obtain the predicted value of the image component to be predicted.

[0232] It should also be noted that the prediction model can be a nonlinear model or a complex model. Among them, the complex model can be a nonlinear model in a nonlinear form such as a quadratic curve, or a multi-model composed of multiple linear models. In this way, for the complex model, since unimportant reference pixels or some abnormal reference pixels have been eliminated from the adjacent reference pixel subsets, the N groups of model parameters determined based on the adjacent reference pixel subsets are more accurate, thereby improving the accuracy of the complex model and enhancing the prediction accuracy of the image component to be processed.

[0233] In addition, in an embodiment of the present application, when the image component prediction method is applied to the encoder side, a subset of adjacent reference pixels can be constructed based on the adjacent reference pixels, and then the model parameters of the prediction model can be calculated based on the adjacent reference pixel subset, and the calculated model parameters can be written into the bitstream; the bitstream is transmitted from the encoder side to the decoder side; correspondingly, when the image component prediction method is applied to the decoder side, the model parameters of the prediction model can be directly obtained by parsing the bitstream; or on the decoder side, a subset of adjacent reference pixels can be constructed based on the adjacent reference pixels, and then the model parameters of the prediction model can be calculated based on the adjacent reference pixel subset, thereby constructing a prediction model, and using the prediction model to perform cross-component prediction processing on at least one image component of the current block.

[0234] This embodiment provides an image component prediction method, and elaborates on the specific implementation of the aforementioned embodiment. It can be seen from the technical solution of the aforementioned embodiment that due to the screening processing of the adjacent reference pixels of the current block, unimportant reference pixels or abnormal reference pixels can be removed, thereby reducing the number of pixels in the adjacent reference pixel set, so that the number of pixels in the adjacent reference pixel subset is smaller, which not only reduces the computational complexity and memory bandwidth, but also improves the accuracy of the prediction model; in addition, cross-component prediction processing is performed on the image components to be processed through at least two prediction sub-models, thereby also improving the prediction accuracy of the image components to be processed, and at the same time improving the prediction efficiency of the video image.

[0235] Based on the same inventive concept as the above embodiments, see Figure 8, which shows a schematic diagram of the structure of an encoder 80 provided in an embodiment of the present application. The encoder 80 may include: a first determining unit 801, a first constructing unit 802 and a first calculating unit 803, wherein,

[0236] The first determining unit 801 is configured to determine adjacent reference pixels of a current block in an image;

[0237] The first construction unit 802 is configured to construct an adjacent reference pixel subset based on the adjacent reference pixels; wherein the adjacent reference pixel subset includes some pixels of the adjacent reference pixels;

[0238] The first calculation unit 803 is configured to calculate the model parameters of the prediction model based on the adjacent reference pixel subset; wherein the prediction model includes N prediction sub-models, the N prediction sub-models correspond to N groups of model parameters, and the prediction sub-models are used to perform cross-component prediction processing on the image components to be predicted through the corresponding model parameters, and N is a positive integer greater than or equal to 2.

[0239] In the above scheme, see Figure 8 The encoder 80 may further include a first acquisition unit 804, configured to acquire reference pixels adjacent to at least one side of the current block; wherein the at least one side of the current block includes at least one of the following: an upper row, an upper right row, a left column, and a lower left column; and obtaining the adjacent reference pixels based on the acquired reference pixels.

[0240] In the above scheme, see Figure 8 , the encoder 80 may further include a first selection unit 805, wherein,

[0241] The first determining unit 801 is further configured to determine a candidate position of the candidate pixel based on at least one edge of the current block;

[0242] The first selection unit 805 is configured to select reference pixels corresponding to the candidate position from the adjacent reference pixels, and form the selected parameter pixels into the adjacent reference pixel subset.

[0243] In the above solution, the first determining unit 801 is further configured to determine the candidate position based on a pixel position corresponding to a reference pixel adjacent to at least one side of the current block.

[0244] In the above solution, the first determining unit 801 is further configured to determine the candidate position based on the image component intensity value corresponding to the reference pixel adjacent to at least one side of the current block.

[0245] In the above solution, the first determining unit 801 is further configured to determine the candidate position based on the pixel position and image component intensity value corresponding to at least one side-adjacent reference pixel of the current block.

[0246] In the above scheme, the first determination unit 801 is further configured to determine a preset number of candidate pixels; wherein the preset number of candidate pixels represents the number of pixels sampled from reference pixels adjacent to at least one side of the current block; and determine the candidate position based on the preset number of candidate pixels and the length of at least one side of the current block; wherein the length of at least one side of the current block is equal to the number of pixels contained in at least one side of the current block.

[0247] In the above solution, the first calculation unit 803 is further configured to calculate a first sampling interval according to the preset number of candidate pixels and the length of at least one side of the current block;

[0248] The first determining unit 801 is further configured to determine a reference point from at least one side of the current block, and determine the candidate position according to the first sampling interval.

[0249] In the above scheme, see Figure 8 , the encoder 80 may further include a first adjusting unit 806 configured to adjust the first sampling interval to obtain a second sampling interval;

[0250] The first determining unit 801 is further configured to determine the candidate position based on the reference point and according to the second sampling interval.

[0251] In the above solution, the first determining unit 801 is further configured to determine, based on the reference point, the candidate position corresponding to one side of the reference point according to the first sampling interval, and determine the candidate position corresponding to the other side of the reference point according to the second sampling interval.

[0252] In the above scheme, the first determination unit 801 is further configured to determine a preset number of skipped pixels K corresponding to at least one side of the current block, where K is a positive integer greater than or equal to 1; and starting from the starting position and / or end position of at least one side of the current block, determine the positions corresponding to K pixels to be skipped; and based on the positions corresponding to the K pixels to be skipped, continuously skip K pixels to be skipped starting from the starting position and / or end position of at least one side of the current block to obtain at least one new side of the current block; and determine the candidate position based on the at least one new side of the current block and the preset number of candidate pixels.

[0253] In the above solution, the first construction unit 802 is configured to construct N first adjacent reference pixel subsets according to the adjacent reference pixel subsets;

[0254] The first calculation unit 803 is configured to calculate N groups of model parameters corresponding to the N prediction sub-models based on the N first adjacent reference pixel subsets; wherein each prediction sub-model corresponds to a group of model parameters.

[0255] In the above scheme, see Figure 8 , the encoder 80 may further include a first dividing unit 807, wherein,

[0256] The first determining unit 801 is further configured to determine at least one threshold value based on the adjacent reference pixel subset;

[0257] The first division unit 807 is configured to divide the adjacent reference pixel subset into the N first adjacent reference pixel subsets according to the at least one threshold.

[0258] In the above solution, the first determining unit 801 is further configured to determine a first image component reconstruction value corresponding to each pixel in the current block;

[0259] The first selection unit 805 is further configured to select a prediction sub-model from the N prediction sub-models;

[0260] The first calculation unit 803 is further configured to calculate the second image component prediction value corresponding to each pixel in the current block based on the selected prediction sub-model and the first image component reconstruction value corresponding to each pixel in the current block; wherein the image component to be predicted is the second image component.

[0261] In the above scheme, see Figure 8 , the encoder 80 may further include a first comparing unit 808 configured to compare the first image component reconstruction value corresponding to each pixel in the current block with the at least one threshold;

[0262] The first selection unit 805 is further configured to select a prediction sub-model corresponding to each pixel in the current block from the N prediction sub-models according to a result of the comparison.

[0263] It is understandable that in the embodiments of the present application, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and of course it can also be a module, or it can be non-modular. Moreover, the various components in this embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into a single unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional modules.

[0264] If the integrated unit is implemented as a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment, or the portion that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0265] Therefore, an embodiment of the present application provides a computer storage medium, which stores an image component prediction program. When the image component prediction program is executed by at least one processor, the method described in any one of the aforementioned embodiments is implemented.

[0266] Based on the composition of the encoder 80 and the computer storage medium, see Figure 9 , which shows a specific hardware structure example of the encoder 80 provided in an embodiment of the present application, which may include: a first communication interface 901, a first memory 902 and a first processor 903; each component is coupled together via a first bus system 904. It is understood that the first bus system 904 is used to achieve connection and communication between these components. In addition to the data bus, the first bus system 904 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, Figure 9 In FIG, various buses are labeled as a first bus system 904.

[0267] The first communication interface 901 is used to receive and send signals during the process of sending and receiving information with other external network elements;

[0268] A first memory 902 is used to store computer programs that can be run on the first processor 903;

[0269] The first processor 903 is configured to, when running the computer program, execute:

[0270] determining neighboring reference pixels of a current block in an image;

[0271] Constructing a subset of adjacent reference pixels according to the adjacent reference pixels; wherein the subset of adjacent reference pixels includes some pixels of the adjacent reference pixels;

[0272] The model parameters of the prediction model are calculated based on the adjacent reference pixel subset; wherein the prediction model includes N prediction sub-models, the N prediction sub-models correspond to N groups of model parameters, and the prediction sub-models are used to perform cross-component prediction processing on the image components to be predicted through the corresponding model parameters, and N is a positive integer greater than or equal to 2.

[0273] It is understood that the first memory 902 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM). The first memory 902 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0274] The first processor 903 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits or software instructions in the first processor 903. The above-mentioned first processor 903 can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the first memory 902 , and the first processor 903 reads the information in the first memory 902 and completes the steps of the above method in combination with its hardware.

[0275] It is understood that these embodiments described in the present application can be implemented with hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing equipment (DSP Device, DSPD), programmable logic device (Programmable Logic Device, PLD), field programmable gate array (Field-Programmable Gate Array, FPGA), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing functions described in the present application or a combination thereof. For software implementation, the technology described in the present application can be realized by the module (such as process, function etc.) that performs functions described in the present application. The software code can be stored in a memory and executed by a processor. The memory can be implemented in a processor or outside a processor.

[0276] Optionally, as another embodiment, the first processor 903 is further configured to execute the method described in any one of the aforementioned embodiments when running the computer program.

[0277] This embodiment provides an encoder, which may include a first determination unit, a first construction unit and a first calculation unit, wherein the first determination unit is configured to determine adjacent reference pixels of a current block in an image; the first construction unit is configured to construct an adjacent reference pixel subset based on the adjacent reference pixels; wherein the adjacent reference pixel subset includes some pixels of the adjacent reference pixels; the first calculation unit is configured to calculate model parameters of a prediction model based on the adjacent reference pixel subset; wherein the prediction model includes N prediction sub-models, the N prediction sub-models correspond to N groups of model parameters, and the prediction sub-models are used to perform cross-component prediction processing on the predicted image components through the corresponding model parameters, and N is a positive integer greater than or equal to 2; in this way, the number of pixels in the adjacent reference pixel set is reduced, so that the number of pixels in the adjacent reference pixel subset is smaller, which not only reduces the computational complexity and memory bandwidth, but also improves the accuracy of the prediction model.

[0278] Based on the same inventive concept as the above embodiments, see Figure 10 , which shows a schematic diagram of the structure of a decoder 100 provided in an embodiment of the present application. The decoder 100 may include: a second determining unit 1001, a second constructing unit 1002, and a second calculating unit 1003, wherein,

[0279] The second determining unit 1001 is configured to determine adjacent reference pixels of a current block in an image;

[0280] The second construction unit 1002 is configured to construct an adjacent reference pixel subset based on the adjacent reference pixels; wherein the adjacent reference pixel subset includes some pixels of the adjacent reference pixels;

[0281] The second calculation unit 1003 is configured to calculate the model parameters of the prediction model based on the adjacent reference pixel subset; wherein the prediction model includes N prediction sub-models, the N prediction sub-models correspond to N groups of model parameters, and the prediction sub-models are used to perform cross-component prediction processing on the image components to be predicted through the corresponding model parameters, and N is a positive integer greater than or equal to 2.

[0282] In the above scheme, see Figure 10 The decoder 100 may further include a second acquisition unit 1004, configured to acquire reference pixels adjacent to at least one side of the current block; wherein the at least one side of the current block includes at least one of the following: an upper row, an upper right row, a left column, and a lower left column; and obtaining the adjacent reference pixels based on the acquired reference pixels.

[0283] In the above scheme, see Figure 10 , the decoder 100 may further include a second selection unit 1005, wherein,

[0284] The second determining unit 1001 is further configured to determine a candidate position of the candidate pixel based on at least one edge of the current block;

[0285] The second selection unit 1005 is configured to select reference pixels corresponding to the candidate position from the adjacent reference pixels, and form the selected parameter pixels into the adjacent reference pixel subset.

[0286] In the above solution, the second determining unit 1001 is further configured to determine the candidate position based on a pixel position corresponding to a reference pixel adjacent to at least one side of the current block.

[0287] In the above solution, the second determining unit 1001 is further configured to determine the candidate position based on the image component intensity value corresponding to the reference pixel adjacent to at least one side of the current block.

[0288] In the above solution, the second determining unit 1001 is further configured to determine the candidate position based on the pixel position and image component intensity value corresponding to at least one side-adjacent reference pixel of the current block.

[0289] In the above scheme, the second determination unit 1001 is further configured to determine a preset number of candidate pixels; wherein the preset number of candidate pixels represents the number of pixels sampled from reference pixels adjacent to at least one side of the current block; and determine the candidate position based on the preset number of candidate pixels and the length of at least one side of the current block; wherein the length of at least one side of the current block is equal to the number of pixels contained in at least one side of the current block.

[0290] In the above solution, the second calculation unit 1003 is further configured to calculate a first sampling interval according to the preset number of candidate pixels and the length of at least one side of the current block;

[0291] The second determining unit 1001 is further configured to determine a reference point from at least one side of the current block, and determine the candidate position according to the first sampling interval.

[0292] In the above scheme, see Figure 10 , the decoder 100 may further include a second adjusting unit 1006 configured to adjust the first sampling interval to obtain a second sampling interval;

[0293] The second determining unit 1001 is further configured to determine the candidate position based on the reference point and according to the second sampling interval.

[0294] In the above solution, the second determining unit 1001 is further configured to determine, based on the reference point, the candidate position corresponding to one side of the reference point according to the first sampling interval, and determine the candidate position corresponding to the other side of the reference point according to the second sampling interval.

[0295] In the above scheme, the second determination unit 1001 is further configured to determine a preset number of skipped pixels K corresponding to at least one side of the current block, where K is a positive integer greater than or equal to 1; and starting from the starting position and / or end position of at least one side of the current block, determine the positions corresponding to K pixels to be skipped; and based on the positions corresponding to the K pixels to be skipped, continuously skip K pixels to be skipped starting from the starting position and / or end position of at least one side of the current block to obtain at least one new side of the current block; and determine the candidate position based on the at least one new side of the current block and the preset number of candidate pixels.

[0296] In the above solution, the second construction unit 1002 is configured to construct N first adjacent reference pixel subsets based on the adjacent reference pixel subsets;

[0297] The second calculation unit 1003 is configured to calculate N groups of model parameters corresponding to the N prediction sub-models based on the N first adjacent reference pixel subsets; wherein each prediction sub-model corresponds to a group of model parameters.

[0298] In the above scheme, see Figure 10 , the decoder 100 may further include a second dividing unit 1007, wherein,

[0299] The second determining unit 1001 is further configured to determine at least one threshold value based on the adjacent reference pixel subset;

[0300] The second division unit 1007 is configured to divide the adjacent reference pixel subset into the N first adjacent reference pixel subsets according to the at least one threshold.

[0301] In the above solution, the second determining unit 1001 is further configured to determine a first image component reconstruction value corresponding to each pixel in the current block;

[0302] The second selection unit 1005 is further configured to select a prediction sub-model from the N prediction sub-models;

[0303] The second calculation unit 1003 is further configured to calculate the second image component prediction value corresponding to each pixel in the current block based on the selected prediction sub-model and the first image component reconstruction value corresponding to each pixel in the current block; wherein the image component to be predicted is the second image component.

[0304] In the above scheme, see Figure 10 , the decoder 100 may further include a second comparing unit 1008 configured to compare the first image component reconstruction value corresponding to each pixel in the current block with the at least one threshold;

[0305] The second selection unit 1005 is further configured to select a prediction sub-model corresponding to each pixel in the current block from the N prediction sub-models according to a result of the comparison.

[0306] It is understood that in this embodiment, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and can also be a module or a non-modular system. Furthermore, the various components in this embodiment can be integrated into a single processing unit, or each unit can exist physically separately, or two or more units can be integrated into a single unit. The aforementioned integrated units can be implemented in the form of hardware or software functional modules.

[0307] If the integrated unit is implemented as a software functional module and not sold or used as a standalone product, it can be stored in a computer-readable storage medium. Based on this understanding, this embodiment provides a computer storage medium that stores an image component prediction program. When executed by a second processor, the image component prediction program implements any of the methods described in the aforementioned embodiments.

[0308] Based on the above-mentioned components of the decoder 100 and the computer storage medium, see Figure 11 , which shows the specific hardware structure of the decoder 100 provided in the embodiment of the present application, which may include: a second communication interface 1101, a second memory 1102, and a second processor 1103; each component is coupled together via a second bus system 1104. It is understood that the second bus system 1104 is used to achieve connection and communication between these components. In addition to the data bus, the second bus system 1104 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Figure 11 In FIG, various buses are labeled as a second bus system 1104.

[0309] The second communication interface 1101 is used for sending and receiving signals during the process of sending and receiving information between other external network elements;

[0310] The second memory 1102 is used to store computer programs that can be run on the second processor 1103;

[0311] The second processor 1103 is configured to, when running the computer program, execute:

[0312] determining neighboring reference pixels of a current block in an image;

[0313] Constructing a subset of adjacent reference pixels according to the adjacent reference pixels; wherein the subset of adjacent reference pixels includes some pixels of the adjacent reference pixels;

[0314] The model parameters of the prediction model are calculated based on the adjacent reference pixel subset; wherein the prediction model includes N prediction sub-models, the N prediction sub-models correspond to N groups of model parameters, and the prediction sub-models are used to perform cross-component prediction processing on the image components to be predicted through the corresponding model parameters, and N is a positive integer greater than or equal to 2.

[0315] Optionally, as another embodiment, the second processor 1103 is further configured to execute any one of the methods described in the foregoing embodiments when running the computer program.

[0316] It can be understood that the hardware functions of the second memory 1102 and the first memory 902 are similar, and the hardware functions of the second processor 1103 and the first processor 903 are similar; they are not described in detail here.

[0317] This embodiment provides a decoder, which may include a second determination unit, a second construction unit and a second calculation unit, wherein the second determination unit is configured to determine the adjacent reference pixels of the current block in the image; the second construction unit is configured to construct an adjacent reference pixel subset based on the adjacent reference pixels; wherein the adjacent reference pixel subset includes some pixels of the adjacent reference pixels; the second calculation unit is configured to calculate the model parameters of the prediction model based on the adjacent reference pixel subset; wherein the prediction model includes N prediction sub-models, the N prediction sub-models correspond to N groups of model parameters, and the prediction sub-models are used to perform cross-component prediction processing on the predicted image components through the corresponding model parameters, and N is a positive integer greater than or equal to 2; in this way, the number of pixels in the adjacent reference pixel set is reduced, so that the number of pixels in the adjacent reference pixel subset is smaller, which not only reduces the computational complexity and memory bandwidth, but also improves the accuracy of the prediction model.

[0318] It should be noted that, in this application, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0319] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0320] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0321] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0322] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.

[0323] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

[0324] Industrial Applicability

[0325] In an embodiment of the present application, adjacent reference pixels of a current block in an image are first determined; then, based on the adjacent reference pixels, a subset of adjacent reference pixels is constructed; wherein the subset of adjacent reference pixels includes some pixels of the adjacent reference pixels; and then, based on the subset of adjacent reference pixels, model parameters of a prediction model are calculated; wherein the prediction model includes N prediction sub-models, the N prediction sub-models correspond to N groups of model parameters, and the prediction sub-models are used to perform cross-component prediction processing on the image components to be predicted using the corresponding model parameters, where N is a positive integer greater than or equal to 2; in this way, since the adjacent reference pixels of the current block are screened, unimportant reference pixels or abnormal reference pixels can be removed, thereby reducing the number of pixels in the adjacent reference pixel set, so that the number of pixels in the adjacent reference pixel subset is smaller, which not only reduces the computational complexity and memory bandwidth, but also improves the accuracy of the prediction model; in addition, cross-component prediction processing is performed on the image components to be processed by at least two prediction sub-models, thereby improving the prediction accuracy of the image components to be processed and improving the prediction efficiency of the video image.

Claims

1. A method for predicting image components, applied to an encoder, characterized in that: The method comprises: Determining neighboring reference samples of a current block in an image; Constructing an adjacent reference sample subset according to the adjacent reference samples; wherein the adjacent reference sample subset includes some samples in the adjacent reference samples; Calculating model parameters of a prediction model based on the adjacent reference sample subset; wherein the prediction model is used to perform cross-component prediction processing on the image component to be predicted using the corresponding model parameters; The step of constructing a subset of adjacent reference samples based on the adjacent reference samples includes: Determining candidate positions of candidate samples based on at least one edge of the current block; Selecting a reference sample corresponding to the candidate position from the adjacent reference samples, and forming the selected reference samples into the adjacent reference sample subset; The determining of the candidate position of the candidate sample based on at least one edge of the current block includes: Calculating a first sampling interval according to a preset number of candidate samples and a length of at least one side of the current block; A starting point position is determined from at least one side of the current block, and the candidate position is determined based on the starting point position and according to the first sampling interval.

2. The method according to claim 1, characterized in that The determining of adjacent reference samples of the current block in the image includes: Acquire reference samples adjacent to at least one side of the current block; wherein the at least one side of the current block includes at least one of the following: an upper row, an upper right row, a left column, and a lower left column; The adjacent reference samples are obtained according to the acquired reference samples.

3. The method according to claim 1, characterized in that The determining, based on at least one edge of the current block, a candidate position of the candidate sample, includes: The candidate position is determined based on a sample position corresponding to a reference sample adjacent to at least one side of the current block.

4. The method according to claim 1, wherein The determining, based on at least one edge of the current block, a candidate position of the candidate sample, includes: The candidate position is determined based on image component intensity values corresponding to reference samples adjacent to at least one side of the current block.

5. The method according to claim 1, wherein The determining, based on at least one edge of the current block, a candidate position of the candidate sample, includes: The candidate position is determined based on a sample position and an image component intensity value corresponding to a reference sample adjacent to at least one side of the current block.

6. The method according to claim 1, characterized in that The candidate position of the candidate sample is determined according to the following formula: Δ=length / (N2 / 2) shift = Δ / 2 Wherein, Δ represents the sampling interval, length represents the number of reference sample points in a row adjacent to the upper side of the current block, or the number of reference sample points in a column adjacent to the left side of the current block, N2 represents the number of reference sample points in the adjacent reference sample subset expected by the current block, and shift represents the starting point position for selecting reference sample points.

7. A method for predicting image components, applied to a decoder, characterized in that: The method comprises: Determining neighboring reference samples of a current block in an image; Constructing an adjacent reference sample subset according to the adjacent reference samples; wherein the adjacent reference sample subset includes some samples in the adjacent reference samples; Calculating model parameters of a prediction model based on the adjacent reference sample subset; wherein the prediction model is used to perform cross-component prediction processing on the image component to be predicted using the corresponding model parameters; The step of constructing a subset of adjacent reference samples based on the adjacent reference samples includes: Determining a candidate position of a candidate sample based on at least one edge of the current block; Selecting a reference sample corresponding to the candidate position from the adjacent reference samples, and forming the selected reference samples into the adjacent reference sample subset; The determining of the candidate position of the candidate sample based on at least one edge of the current block includes: Calculating a first sampling interval according to a preset number of candidate samples and a length of at least one side of the current block; A starting point position is determined from at least one side of the current block, and the candidate position is determined based on the starting point position and according to the first sampling interval.

8. The method according to claim 7, characterized in that The determining of adjacent reference samples of the current block in the image includes: Acquire reference samples adjacent to at least one side of the current block; wherein the at least one side of the current block includes at least one of the following: an upper row, an upper right row, a left column, and a lower left column; The adjacent reference samples are obtained according to the acquired reference samples.

9. The method according to claim 7, wherein: The determining, based on at least one edge of the current block, a candidate position of the candidate sample, includes: The candidate position is determined based on a sample position corresponding to a reference sample adjacent to at least one side of the current block.

10. The method according to claim 7, wherein: The determining, based on at least one edge of the current block, a candidate position of the candidate sample, includes: The candidate position is determined based on image component intensity values corresponding to reference samples adjacent to at least one side of the current block.

11. The method according to claim 7, wherein: The determining, based on at least one edge of the current block, a candidate position of the candidate sample, includes: The candidate position is determined based on a sample position and an image component intensity value corresponding to a reference sample adjacent to at least one side of the current block.

12. The method according to claim 7, wherein: The candidate position of the candidate sample is determined according to the following formula: Δ=length / (N2 / 2) shift = Δ / 2 Wherein, Δ represents the sampling interval, length represents the number of reference sample points in a row adjacent to the upper side of the current block, or the number of reference sample points in a column adjacent to the left side of the current block, N2 represents the number of reference sample points in the adjacent reference sample subset expected by the current block, and shift represents the starting point position for selecting reference sample points.

13. An encoder comprising a first memory and a first processor, wherein: The first memory is used to store a computer program that can be run on the first processor; The first processor is configured to execute the method according to any one of claims 1 to 6 when running the computer program.

14. A decoder comprising a second memory and a second processor, wherein: The second memory is used to store a computer program that can be run on the second processor; The second processor is configured to execute the method according to any one of claims 7 to 12 when running the computer program.

15. A computer storage medium, characterized in that The computer storage medium stores an image component prediction program, which, when executed by a processor, implements the method according to any one of claims 1 to 6 and outputs a code stream.

Citation Information

Patent Citations

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

    WO2017190288A1

  • Image encoder, image decoder, image encoding method, and image decoding method

    WO2019039323A1