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

By filtering adjacent reference pixels in the video encoding standard H.266, constructing a subset of adjacent reference pixels and using multiple predictive sub-models, the problems of high computational complexity and inaccurate prediction models in the prior art are solved, and more efficient image component prediction is achieved.

CN120416484APending Publication Date: 2025-08-01GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510826576.1
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-01

AI Technical Summary

Technical Problem

In the video encoding standard H.266, the existing image component prediction method has too many sample points in the reference pixel set, resulting in high computational complexity and memory bandwidth, and the existence of abnormal sample points affects the accuracy of the prediction model.

Method used

By filtering adjacent reference pixels of the current block, constructing a subset of adjacent reference pixels, reducing the number of pixels in the reference pixel set, and using multiple prediction sub-models to perform cross-component prediction, reducing the computational complexity and improving the accuracy of the prediction model.

Benefits of technology

The computational complexity and memory bandwidth are reduced, while improving the accuracy of image component prediction and the prediction efficiency of video images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120416484A_ABST
    Figure CN120416484A_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] Division Case Explanation

[0002] This application is a divisional application of a Chinese patent with an application date of October 28, 2019, an application number of 201980088761.8, and an invention title of "Image Component Prediction Method, Encoder, Decoder, and Storage Medium". Technical Field

[0003] Embodiments of this application relate to the field of image processing technologies, and in particular, to an image component prediction method, an encoder, a decoder, and a storage medium. Background Art

[0004] With the improvement of people's requirements for video display quality, new video application forms such as high-definition and ultra-high-definition videos have emerged as the times require. H.265 / High Efficiency Video Coding (HEVC) can no longer meet the rapidly developing needs of 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 is the VVC Test Model (VTM) of the reference software test platform for VVC.

[0005] In VTM, an image component prediction method based on a prediction model has been integrated. Through the prediction model, the chrominance component can be predicted from the luminance component of the current coding block. However, in the process of constructing the prediction model, especially when the prediction model is a non-linear model or a multi-model (such as composed of multiple linear models), the number of sample points currently used for model parameter derivation is large, and the computational complexity and memory bandwidth are relatively high; at the same time, there may be abnormal sample points among these sample points, resulting in inaccurate construction of the prediction model. Summary of the Invention

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

[0007] The technical solution of the embodiments of this application can be implemented as follows:

[0008] In a first aspect, embodiments of this application provide an image component prediction method, which is applied to an encoder or a decoder, and the method includes:

[0009] Determine the adjacent reference pixels of the current block in the image;

[0010] Construct an adjacent reference pixel subset according to the adjacent reference pixels, where the adjacent reference pixel subset includes some of the adjacent reference pixels.

[0011] Calculate the model parameters of the prediction model according to the adjacent reference pixel subset, where the prediction model includes N prediction sub-models, the N prediction sub-models correspond to N groups of model parameters, the prediction sub-model is used to perform cross-component prediction processing on the image component 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, which is applied to an encoder or a decoder. The method includes:

[0013] Determine a first reference pixel set of a first image component of a current block in an image, where the first reference pixel set includes pixels adjacent to the current block.

[0014] Construct N first reference pixel subsets by using the first reference pixel set, where the first reference pixel subset includes some of the first reference pixel set, and N is equal to the number of prediction models.

[0015] Calculate the model parameters of the N prediction models respectively by using the N first reference pixel subsets, where the prediction model is used to map the value of the first image component of the current block to a predicted value of a 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, which includes: a first determination unit, a first construction unit, and a first calculation unit, where

[0017] The first determination unit is configured to determine adjacent reference pixels of a current block in an image.

[0018] The first construction unit is configured to construct an adjacent reference pixel subset according to the adjacent reference pixels, where the adjacent reference pixel subset includes some of the adjacent reference pixels.

[0019] The first calculation unit is configured to calculate the model parameters of the prediction model according to the adjacent reference pixel subset, where the prediction model includes N prediction sub-models, the N prediction sub-models correspond to N groups of model parameters, the prediction sub-model is used to perform cross-component prediction processing on the image component 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, which includes a first memory and a first processor, where

[0021] A first memory for storing a computer program capable of running on the first processor;

[0022] A first processor for, when running the computer program, executing the method described in the first aspect or the second aspect.

[0023] In a fifth aspect, an embodiment of the present application provides a decoder, which includes a second determination unit, a second construction unit, and a second calculation unit, where

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

[0025] The second construction unit is configured to construct a subset of adjacent reference pixels according to the adjacent reference pixels; wherein, the subset of adjacent reference pixels contains some of the adjacent reference pixels;

[0026] The second calculation unit is configured to calculate model parameters of a prediction model according to the subset of adjacent reference pixels; 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-model is used to perform cross-component prediction processing on an image component 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, which includes a second memory and a second processor, where

[0028] The second memory is for storing a computer program capable of running on the second processor;

[0029] The second processor is for, when running the computer program, executing the method described in the first aspect or the second aspect.

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

[0031] The embodiments of the present application provide an image component prediction method, an encoder, a decoder, and a storage medium, which determine adjacent reference pixels of a current block in an image; construct an adjacent reference pixel subset according to the adjacent reference pixels, where the adjacent reference pixel subset includes some of the adjacent reference pixels; calculate model parameters of a prediction model according to the adjacent reference pixel subset, where the prediction model includes N prediction sub-models, the N prediction sub-models correspond to N groups of model parameters, and the prediction sub-model is used to perform cross-component prediction processing on an image component to be predicted through the corresponding model parameters, and 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 pixel points or abnormal reference pixel points can be removed, thereby reducing the number of pixels in the adjacent reference pixel set and making the number of pixels in the adjacent reference pixel subset small. This not only reduces the computational complexity and memory bandwidth, but also improves the accuracy of the prediction model. In addition, by using at least two prediction sub-models to perform cross-component prediction processing on the image component to be processed, the prediction accuracy of the image component to be processed is improved, and at the same time, the prediction efficiency of the video image is increased. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 It is a schematic block diagram of the composition of a video coding system provided by an embodiment of the present application;

[0033] Figure 2 It is a schematic block diagram of the composition of a video decoding system provided by an embodiment of the present application;

[0034] Figure 3 It is a schematic flowchart of an image component prediction method provided by an embodiment of the present application;

[0035] Figure 4 It is a schematic structural diagram of the selection of an adjacent reference pixel subset on the upper side of a current block provided by an embodiment of the present application;

[0036] Figure 5 It is another schematic structural diagram of the selection of an adjacent reference pixel subset on the upper side of a current block provided by an embodiment of the present application;

[0037] Figure 6 It is a schematic diagram of the grouping of adjacent reference pixel points of a coding block provided by an embodiment of the present application;

[0038] Figure 7 It is another schematic flowchart of an image component prediction method provided by an embodiment of the present application;

[0039] Figure 8 It is a schematic structural diagram of the composition of an encoder provided by an embodiment of the present application;

[0040] Figure 9Schematic diagram of the specific hardware structure of an encoder provided by an embodiment of the present application;

[0041] Figure 10 Schematic diagram of the composition structure of a decoder provided by an embodiment of the present application;

[0042] Figure 11 Schematic diagram of the specific hardware structure of a decoder provided by an embodiment of the present application. Detailed implementation manners

[0043] In order to more comprehensively understand the features and technical content of the embodiments of the present application, the implementation of the embodiments of the present application will be described in detail below with reference to the accompanying drawings. The accompanying drawings are only for reference and explanation purposes and are not used to limit the embodiments of the present application.

[0044] In order to more comprehensively understand the features and technical content of the embodiments of the present application, the implementation of the embodiments of the present application will be described in detail below with reference to the accompanying drawings. The accompanying drawings are only for reference and explanation purposes and are not used to limit the embodiments of the present application.

[0045] In video images, generally, the first image component, the second image component, and the third image component are used to represent a coding block (CB); among them, these three image components are respectively a luminance component, a blue chrominance component, and a red chrominance component. 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, video images can be represented in the YCbCr format or the YUV format.

[0046] In the embodiments of the present application, the first image component can be a luminance component, the second image component can be a blue chrominance component, and the third image component can be a red chrominance component, but the embodiments of the present application do not make specific limitations.

[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 (CCP) has been extended and improved, and the cross-component linear model prediction (CCLM) has been proposed. In H.266, CCLM can not only implement the prediction from the first image component to the second image component, but also implement the prediction between the first image component and the third image component or from the third image component to the first image component. Even the prediction from the second image component to the third image component or from the third image component to the second image component can be implemented. The following will take the prediction from the first image component to the second image component as an example for description, but the technical solutions of the embodiments of the present application can also be applied to the prediction of other image components.

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

[0049] To ensure the accuracy of the model parameters used by each prediction model in the prediction mode of MMLM, the reference pixel set constructed for deriving the model parameters needs to be more accurate. Based on this, the embodiments of the present application provide an image component prediction method, which determines the adjacent reference pixels of the current block in the image; constructs an adjacent reference pixel subset according to the adjacent reference pixels; wherein, the adjacent reference pixel subset contains some of the adjacent reference pixels; then calculates the model parameters of the prediction model according to 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-model is used to perform cross-component prediction processing on the image component to be predicted through the corresponding model parameters, and 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 pixel points or abnormal reference pixel points can be removed, thereby reducing the number of pixels in the adjacent reference pixel set, making the number of pixels in the adjacent reference pixel subset smaller, which not only reduces the computational complexity and memory bandwidth, but also improves the accuracy of the prediction model; in addition, the cross-component prediction processing of the image component to be processed is performed by at least two prediction sub-models, thereby improving the prediction accuracy of the image component to be processed and at the same time improving the prediction efficiency of the video image.

[0050] The following will describe each embodiment of the present application in detail with reference to the drawings.

[0051] See Figure 1 , which shows an example of the composition block diagram of a video coding system provided by the embodiments of the present application; as Figure 1As shown, the video encoding system 100 includes a transform and quantization unit 101, an intra prediction estimation unit 102, an intra 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, an encoding unit 109, a decoded image buffer unit 110, etc. Among them, the filtering unit 108 can implement deblocking filtering and sample adaptive offset (SAO) filtering, and the encoding unit 109 can implement header information encoding and context-based adaptive binary arithmetic coding (CABAC). For the input original video signal, a video coding block can be obtained through the division of a coding tree unit (CTU). Then, the residual pixel information obtained after intra-frame or inter-frame prediction is transformed by the transform and quantization unit 101 for the video coding block, 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 prediction estimation unit 102 and the intra prediction unit 103 are used for intra-frame prediction of the video coding block; specifically, the intra prediction estimation unit 102 and the intra prediction unit 103 are used to determine the intra-frame prediction mode to be used for encoding the video coding block; the motion compensation unit 104 and the motion estimation unit 105 are used to perform inter-frame predictive 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, and the motion vector can estimate the motion of the video coding block, and then the motion compensation unit 104 performs motion compensation based on the motion vector determined by the motion estimation unit 105; after determining the intra-frame prediction mode, the intra 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 and determined motion vector data to the encoding unit 109; in addition, the inverse transform and inverse quantization unit 106 is used for the reconstruction of the video coding block, reconstructing the residual block in the pixel domain, and the reconstructed residual block removes block effect artifacts through the filter control analysis unit 107 and the filtering unit 108, and then adds the reconstructed residual block 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 the quantized transform coefficients. In the CABAC-based coding algorithm, the context can be based on adjacent coding blocks and can be used to encode information indicating the determined intra-frame prediction mode, and output the bitstream of the video signal; while the decoded image buffer unit 110 is used to store the reconstructed video coding block for prediction reference.As the video image encoding progresses, new reconstructed video coding blocks are continuously generated, and these reconstructed video coding blocks are all stored in the decoded picture buffer unit 110.

[0052] See Figure 2 , which shows an example of a block diagram of a video decoding system provided by an embodiment of the present application; as Figure 2 shown, the video decoding system 200 includes a decoding unit 201, an inverse transform and inverse quantization unit 202, an intra prediction unit 203, a motion compensation unit 204, a filtering unit 205, a decoded picture buffer unit 206, etc. Among them, the decoding unit 201 can implement header information decoding and CABAC decoding, and the filtering unit 205 can implement deblocking filtering and SAO filtering. After the input video signal undergoes Figure 1 encoding processing, the bitstream of the video signal is output; this bitstream is input into the video decoding system 200, and first passes through the decoding unit 201 to obtain the decoded transform coefficients; the inverse transform and inverse quantization unit 202 processes the transform coefficients to generate a residual block in the pixel domain; the intra prediction unit 203 can be used to generate prediction data for the current video decoding block based on the determined intra prediction mode and data from previously decoded blocks in the current frame or picture; the motion compensation unit 204 determines prediction information for the video decoding block by analyzing motion vectors and other associated syntax elements, and uses this prediction information to generate a predictive block for the video decoding block being decoded; by summing the residual block from the inverse transform and inverse quantization unit 202 and the corresponding predictive block generated by the intra prediction unit 203 or the motion compensation unit 204, a decoded video block is formed; the decoded video signal passes through the filtering unit 205 to remove block effect artifacts, which can improve the video quality; then the decoded video block is stored in the decoded picture buffer unit 206, and the decoded picture buffer unit 206 stores reference images for subsequent intra prediction or motion compensation, and is also used for the output of the video signal, that is, the original video signal is restored.

[0053] The image component prediction method in the embodiments of the present application is mainly applied to the intra prediction unit 103 part as shown in Figure 1 and as shown in Figure 2The intra prediction unit 203 part shown is specifically applied to the CCLM prediction part in intra prediction. That is to say, the image component prediction method in the embodiments of the present application can be applied to a video coding system, a video decoding system, or even both a video coding system and a video decoding system at the same time, but the embodiments of the present application do not make specific limitations. When this method is applied to the intra prediction unit 103 part in a video coding system, the "current block" specifically refers to the current coding block in intra prediction; when this method is applied to the intra prediction unit 203 part in a video decoding system, the "current block" specifically refers to the current decoding block in intra prediction.

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

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

[0056] It should be noted that a video image can be divided into multiple image blocks, and each currently to-be-encoded image block can be called a coding block. Among them, each coding block can 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 currently needs to perform prediction on the first image component, the second image component, or the third image component. Among them, 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.

[0057] It should also be noted that when the left adjacent region, the lower left adjacent region, the upper adjacent region, and the upper right adjacent region are all valid regions, the adjacent reference pixels can be composed of the adjacent reference pixel points in the left adjacent region and the upper adjacent region of the current block, or can be composed of the adjacent reference pixel points in the left adjacent region and the lower left adjacent region of the current block, or can be composed of the adjacent reference pixel points in the upper adjacent region and the upper right adjacent region of the current block. The embodiments of the present application do not make specific limitations.

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

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

[0060] Obtain the adjacent reference pixels based on the obtained reference pixels.

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

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

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

[0064] Obtain the adjacent reference pixels based on the obtained reference pixels.

[0065] It should be noted that at least one side of the current block may include the left side edge of the current block and / or the upper side edge of the current block; that is, at least one side of the current block may refer to the upper side edge of the current block, or may refer to the left side edge of the current block, or even may refer to the upper side edge and the left side edge of the current block. The embodiments of the present application do not make specific limitations.

[0066] In this way, when both the left adjacent region and the upper adjacent region are valid regions, at this time, the adjacent reference pixels may be composed of the reference pixel points adjacent to the left side edge of the current block and the reference pixel points adjacent to the upper side edge of the current block. When the left adjacent region is a valid region and the upper adjacent region is an invalid region, at this time, the adjacent reference pixels may be composed of the reference pixel points adjacent to the left side edge of the current block; when the left adjacent region is an invalid region and the upper adjacent region is a valid region, at this time, the adjacent reference pixels may be composed of the reference pixel points adjacent to the upper side edge of the current block.

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

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

[0069] Obtain the adjacent reference pixels according to the obtained reference pixels.

[0070] It should be noted that the reference row adjacent to the current block can be composed of the rows adjacent to the upper side and the upper right side of the current block, and the reference column adjacent to the current block can be composed of the columns adjacent to the left side and the lower left side of the current block; the reference row or reference column adjacent to the current block can refer to the reference row adjacent to the upper side of the current block, or can refer to the reference column adjacent to the left side of the current block, or even can refer to the reference row or reference column adjacent to other sides of the current block, and the embodiments of the present application do not make specific limitations. For the convenience of description, in the embodiments of the present application, the reference row adjacent to the current block will be described by taking the reference row adjacent to the upper side as an example, and the reference column adjacent to the current block will be described by taking the reference column adjacent to the left side as an example.

[0071] Among them, the reference pixel points in the reference row adjacent to the current block may include the reference pixel points adjacent to the upper side and the upper right side (also referred to as the 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 extends horizontally to the right from the upper side of the current block and has the same height as the current block; the reference pixel points in the reference column adjacent to the current block may further include the reference pixel points adjacent to the left side and the lower left side (also referred to as the 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 extends vertically downward from the left side of the current block and has the same width as the current decoded block; however, the embodiments of the present application do not make specific limitations either.

[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 the reference pixel points in the reference column adjacent to the current block at this time; when the upper adjacent area and the upper right adjacent area are valid areas, the adjacent reference pixels can be composed of the reference pixel points in the reference row adjacent to the current block at this time.

[0073] S302: Construct an adjacent reference pixel subset according to the adjacent reference pixels; wherein, the adjacent reference pixel subset contains some of the adjacent reference pixels;

[0074] It should be noted that the adjacent reference pixels are the reference pixels corresponding to the construction of the prediction model in the current related technical solution. Usually, in order to avoid transmitting model parameters from the video encoding system to the video decoding system, one or more reference pixel points adjacent to the upper side, upper right side, left side, lower left side, etc. of the current block can be used to form adjacent reference pixels to deduce the model parameters. However, using so many reference pixel points as sample points for multi-model construction has a high complexity, and some reference pixel points 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 pixel points (for example, the correlation of these reference pixel points is poor) or some abnormal reference pixel points. In order to ensure the accuracy of model parameter derivation, these reference pixel points need to be removed, thus obtaining an adjacent reference pixel subset; in this way, according to the adjacent reference pixel subset, the accuracy of the prediction model can be ensured, and the prediction efficiency of the image component to be processed is high.

[0076] Among them, the adjacent reference pixel subset contains a preset number of reference pixel points. Here, the preset number can be N, and N is a positive integer greater than 1. In practical applications, the value of N can be 4, but the embodiments of the present application do not make specific limitations.

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

[0078] Based on at least one side of the current block, determining the candidate positions of the candidate pixels;

[0079] Selecting the reference pixels corresponding to the candidate positions from the adjacent reference pixels, and forming the selected parameter pixels into the adjacent reference pixel subset.

[0080] Further, the determining the candidate positions of the candidate pixels based on at least one side of the current block may include:

[0081] Based on the pixel positions corresponding to the reference pixels adjacent to at least one side of the current block, determining the candidate positions.

[0082] Further, the determining the candidate positions of the candidate pixels based on at least one side of the current block may include:

[0083] Based on the image component intensity values corresponding to the reference pixels adjacent to at least one side of the current block, determining the candidate positions.

[0084] Further, the determining the candidate positions of the candidate pixels based on at least one side of the current block may include:

[0085] Determine the candidate position based on the pixel positions and image component intensity values corresponding to at least one edge-adjacent reference pixel of the current block.

[0086] It should be noted that the image component intensity can be represented by an image component value, such as a luminance value, a chrominance value, etc.; here, the larger the image component value, the higher the image component intensity. The reference pixels selected in the embodiments of the present application can be selected through the candidate positions of the candidate pixels; among them, the candidate positions can be determined according to the pixel positions or according to the image component intensity values (such as luminance values, chrominance values, etc.), and the embodiments of the present application do not make specific limitations.

[0087] S303: Calculate the model parameters of the prediction model according to 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-model is used to perform cross-component prediction processing on the image component 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 according to the adjacent reference pixel subset, multiple groups of model parameters can be calculated; according to 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 non-linear model or a complex model. Among them, the complex model can be a non-linear model in a non-linear form such as a quadratic curve, or a multi-model composed of multiple linear models. In this way, for the complex model, since the unimportant reference pixel points or some abnormal reference pixel points have been removed from the adjacent reference pixel subset, the N groups of model parameters determined according to the adjacent reference pixel subset 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 determines adjacent reference pixels of a current block in an image; constructs an adjacent reference pixel subset according to the adjacent reference pixels, where the adjacent reference pixel subset contains some of the adjacent reference pixels; calculates model parameters of a prediction model according to the adjacent reference pixel subset, where 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 an image component to be predicted through the corresponding model parameters, and 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 pixel points or abnormal reference pixel points can be removed, thereby reducing the number of pixel points in the adjacent reference pixel set, making the number of pixel points in the adjacent reference pixel subset small, not only reducing the computational complexity and memory bandwidth, but also improving the accuracy of the prediction model. In addition, by using at least two prediction sub-models to perform cross-component prediction processing on the image component to be processed, the prediction accuracy of the image component to be processed is improved, and at the same time, the prediction efficiency of the video image is improved.

[0091] Further, among the obtained adjacent reference pixels, there may be some unimportant reference pixel points or abnormal reference pixel points, which will affect the calculation of the model parameters and thus affect the accuracy of the prediction model. At this time, some reference pixel points can be selected from the adjacent reference pixels to form an adjacent reference pixel subset, and the model parameters are calculated according to this adjacent reference pixel subset.

[0092] It should be noted that the partial reference pixel points selected in the embodiments of the present application can be selected by the pixel positions corresponding to the reference pixels, or can be selected according to the image component intensity values (such as luminance values, chrominance values, etc.) corresponding to the reference pixels. The embodiments of the present application do not make specific limitations. Among them, whether the adjacent reference pixels are screened by the pixel positions corresponding to the reference pixels or by the image component intensity values corresponding to the reference pixels to select appropriate reference pixel points, and then form an adjacent reference pixel subset. In this way, the model parameters derived according to the adjacent reference pixel subset are more accurate, and the prediction model constructed according to the model parameters can also be more accurate.

[0093] In some embodiments, determining the candidate positions of the candidate pixels based on at least one side of the current block may include:

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

[0095] Determine the candidate position 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 number of pixel points to be sampled set in advance, 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 pixels can be calculated according to the side length of at least one side and the preset number of candidate pixels; then, according to the candidate position, appropriate reference pixel points are selected from the adjacent reference pixels to form an adjacent reference pixel subset. In this way, the model parameters calculated according to the adjacent reference pixel subset are more accurate, so that the constructed prediction model can also be more accurate, thereby improving the prediction accuracy of the image component to be predicted and the prediction efficiency of the video image.

[0097] Furthermore, for the determination of the candidate position, the first sampling interval can be calculated first, and then the at least one side is sampled according to the first sampling interval to determine the candidate position of the candidate pixels corresponding to the at least one side. Therefore, in some embodiments, determining the candidate position of the candidate pixels based on at least one side of the current block may include:

[0098] 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;

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

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

[0101] Specifically, the midpoint of the at least one side can be determined according to the length of the at least one side, and then the midpoint of the at least one side is used as the reference point. The reference point may be the midpoint of the at least one side, or the position of the first reference pixel point to the left of the midpoint of the at least one side, or the position of the first reference pixel point to the right of the midpoint of the at least one side, or even the position of other reference pixel points of the at least one side. The embodiments of the present application do not make specific limitations.

[0102] It should be noted that considering that the importance of the reference pixel points adjacent to at least one side of the current block is related to their corresponding positions, in order to enable the reference pixel points in the adjacent reference pixel subset to represent the characteristics of the entire adjacent side, it is necessary to select as many reference pixel points as possible at the central position of the side to eliminate the points with relatively low importance (such as the reference pixel points at both sides of the side). In the embodiments of the present application, if the upper side of the current block is taken as an example for illustration, then the position of the first reference pixel point slightly to the right or left of the middle position can be used as the reference point of this side; if the left side of the current block is taken as an example for illustration, then the position of the first reference pixel point slightly below or above the middle position can be used as the reference point of this side.

[0103] In addition, before determining the reference point, it is also possible to first delete a preset number of reference pixel points corresponding to the end position of one of the sides of the current block, or perform an initial offset from the end position of this side according to a preset offset amount, and use the position of the reference pixel point after offset as the starting point to obtain a new side, and then use the middle position corresponding to the new side as the reference point; correspondingly, it is also possible to first delete a preset number of reference pixel points corresponding to the starting position of one of the sides of the current block, or perform an initial offset from the starting position of this side according to a preset offset amount, and use the position of the reference pixel point after offset as the starting point to obtain a new side, and then use the middle position corresponding to the new side as the reference point.

[0104] In practical applications, since the side lengths of the left side or the upper side of the current block are both integer multiples of 2, the middle positions of the left side or the upper side of the current block are both between two points. In Figure 4 's example, the first pixel point slightly to the left of the middle position is used as the midpoint of this side; however, in the embodiments of the present application, the first pixel point slightly to the right of the middle position can also be used as the midpoint of this side, as shown in Figure 5 . In Figure 4 , the first pixel point slightly to the left of the middle position (such as 3 in Figure 4 ) is used as the midpoint of this side. Since the preset sampling number is 2, the positions of the reference pixel points to be selected (such as the gray point examples in Figure 4 ) can be determined to be 1 and 5. According to these reference pixel point positions, the corresponding reference pixel points can also be selected to form an adjacent reference pixel subset. Therefore, in the embodiments of the present application, for the upper side of the current block, either the first pixel point slightly to the right of the middle position or the first pixel point slightly to the left of the middle position can be used as the midpoint of this side, and the embodiments of the present application do not make specific limitations; in addition, for the left side of the current block, either the first pixel point slightly below the middle position or the first pixel point slightly above the middle position can be used as the midpoint of this side, and the embodiments of the present application also do not make specific limitations.

[0105] Unless otherwise specified, the upper side of the current block will be taken as an example for description hereinafter. However, the image component prediction method of the embodiments of the present application is equally applicable to the left side of the current block, and even to the right side or the lower side of the reconstructed block. The embodiments of the present application do not make specific limitations in this regard.

[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, then the second reference pixel set can also be constructed according to formulas (1) and (2).

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

[0108] shift = Δ / 2 (2)

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

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

[0111] It should also be noted that, according to the preset number of candidate pixels and the length of one side of the current block, the first sampling interval corresponding to this side can be calculated. Additionally, since the lengths of the left side or the upper side of the current block are both integer multiples of 2, the middle positions of the left side or the upper side of the current block are both between two points. At this time, the calculated midpoint value is non-integer, and the calculated reference pixel point position is also 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, then the middle position of the left side or the upper side of the current block is not between two points. At this time, the calculated midpoint value is an integer, and the calculated reference pixel point position is also an integer. That is to say, the calculated midpoint value can be an integer or a non-integer; correspondingly, the calculated reference pixel point position can also be an integer or a non-integer; the embodiments of the present application do not make specific limitations.

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

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

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

[0115] Based on the reference point, determine the candidate position according to the second sampling interval.

[0116] It should be noted that after calculating the first sampling interval, the first sampling interval can also be finely adjusted, 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, then the adjusted second sampling interval can be 3 or 5. In the embodiments of the present application, for the adjustment of the first sampling interval, a small adjustment (such as adding 1 or subtracting 1) can be made, but the specific setting of the adjustment amplitude is not specifically limited in the embodiments of the present application.

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

[0118] Based on the reference point, determine 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.

[0119] That is to say, after determining the reference points of at least one side of the current block, uniform sampling can be performed at the first sampling interval or the second sampling interval; non-uniform sampling can also be performed at 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] Further, since the reference pixel points located at the middle positions of at least one side are more relevant to the image component to be predicted of the current block among adjacent reference pixels, the positions of a preset number of consecutive reference pixel points near the middle position can be used as the positions of the reference pixel points to be selected. This method can be called the middle position continuous sampling scheme. Specifically, assuming that the reference pixel points on a row / column adjacent to the upper side or the left side of the current block are numbered starting from 0, the number of adjacent reference pixel points and the corresponding positions of the reference pixel points to be selected in the adjacent reference pixel subset formed in this embodiment are shown in Table 1. At this time, the positions of a preset number of consecutive reference pixel points near the middle position can be used as candidate positions to form an adjacent reference pixel subset.

[0121] Table 1

[0122] The side length of at least one side of the current block Candidate position 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] Further, for the screening process of adjacent parameter pixels, skip point processing can also be performed on the reference pixel points of at least one side, that is, skip unimportant reference pixel points or abnormal reference pixel points (which can also be regarded as deletion processing) to obtain an adjacent reference pixel subset; on this basis, that is, after skipping some reference pixel points on at least one side, screening processing is performed on the remaining reference pixel points to obtain an adjacent reference pixel subset. Therefore, in some embodiments, determining the candidate positions of the candidate pixels based on at least one side of the current block may include:

[0124] 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;

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

[0126] 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 the end position of at least one side of the current block to obtain at least one new side of the current block;

[0127] Based on at least one new side of the current block and the preset number of candidate pixels, determine the candidate positions.

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

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

[0130] In this way, assuming starting from the starting position of at least one side, if at least one side is the upper side of the current block (which can also be called the reference row of the current block), then starting from the leftmost edge position of at least one side, the positions corresponding to K pixels to be skipped can be determined; if at least one side is the left side of the current block (which can also be called the reference column of the current block), then starting from the uppermost edge position of at least one side, the positions corresponding to K pixels to be skipped can be determined; assuming starting from the ending position of at least one side, if at least one side is the upper side of the current block, then starting from the rightmost edge position of at least one side, the positions corresponding to K pixels to be skipped can be determined; if at least one side is the left side of the current block, then starting from the lowermost edge position of at least one side, the positions corresponding to K pixels to be skipped can be determined; in practical applications, it is set according to the actual situation, and the embodiments of this application do not make specific limitations.

[0131] After determining the positions corresponding to the K pixels to be skipped, assuming starting from the starting position of at least one side, if at least one side is the upper side of the current block, then starting from the leftmost edge position of the upper side, the positions corresponding to the consecutive K pixels to be skipped can be determined to the right, and then these K pixels to be skipped are consecutively skipped to obtain a new upper side; at this time, according to the side length of the new upper side and the preset number of candidate pixels, the candidate position corresponding to the new upper side can be determined, so as to form an adjacent reference pixel subset from the selected candidate pixels; if at least one side is the left side of the current block, then starting from the uppermost edge position of the left side, the positions corresponding to the consecutive K pixels to be skipped can be determined downward, and then these K pixels to be skipped are consecutively skipped to obtain a new left side; at this time, according to the side length of the new left side and the preset number of candidate pixels, the candidate position corresponding to the new left side can be determined, so as to form an adjacent reference pixel subset from the selected candidate pixels. Or, assuming starting from the end position of at least one side, if at least one side is the upper side of the current block, then starting from the rightmost edge position of the upper side, the positions corresponding to the consecutive K pixels to be skipped can be determined to the left, and then these K pixels to be skipped are consecutively skipped to obtain a new upper side; at this time, according to the side length of the new upper side and the preset number of candidate pixels, the candidate position corresponding to the new upper side can be determined, so as to form an adjacent reference pixel subset from the selected candidate pixels; if at least one side is the left side of the current block, then starting from the lowermost edge position of the left side, the positions corresponding to the consecutive K pixels to be skipped can be determined upward, and then these K pixels to be skipped are consecutively skipped to obtain a new left side; at this time, according to the side length of the new left side and the preset number of candidate pixels, the candidate position corresponding to the new left side can be determined, so as to form an adjacent reference pixel subset from the selected candidate pixels.

[0132] In this way, some pixels (i.e., adjacent reference pixel subset) in the adjacent reference pixels obtained by using the reference pixels adjacent to the current block in the embodiments of the present application are used to deduce the model parameters corresponding to complex models (such as non-linear models or multi-models). Since the unimportant reference pixels or the abnormal reference pixels have been removed from the obtained subset (i.e., adjacent reference pixel subset), it has fewer reference pixel numbers, which not only reduces the computational complexity and memory bandwidth, but also improves the accuracy of the complex model, so as to achieve the purpose of improving the prediction accuracy of the image component to be processed and the prediction efficiency of the video image.

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

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

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

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

[0137] Determine at least one threshold according to the adjacent reference pixel subset;

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

[0139] It should be noted that the threshold is the basis for classifying the reference pixel points included in the adjacent reference pixel subset, and at the same time is also the basis for classifying the reconstructed value of the first image component of the current block. In addition, the threshold is also a set value used to indicate the basis for establishing multiple prediction sub-models, and the size of the threshold is related to the reconstructed values of the first image components corresponding to all pixel points in the current block.

[0140] Specifically, the size of the threshold can be obtained by calculating the mean value of the reconstructed values of the first image components corresponding to all pixel points in the current block, or can be obtained by calculating the median value of the reconstructed values of the first image components corresponding to all pixel points in the current block. The embodiments of the present application do not make specific limitations.

[0141] In the embodiments of the present application, first, the mean value Mean can be calculated according to the reconstructed values of the first image components corresponding to all pixel points in the current block and Equation (3):

[0142]

[0143] wherein, Mean represents the mean value of the reconstructed luminance values corresponding to all pixel points in the current block, ∑Rec L [i,j] represents the sum of the reconstructed luminance values corresponding to all pixel points in the current block, and M represents the sampling number of the reconstructed luminance values corresponding to all pixel points in the current block.

[0144] Secondly, directly use the calculated mean value Mean as the threshold. With this threshold, the second set of reference pixels can be divided into two groups, and thus two prediction sub-models can be established. However, the embodiments of this application are not limited to only establishing two prediction sub-models.

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

[0146] Further, in some embodiments, after calculating the model parameters of the prediction model according to the adjacent subset of reference pixels, the method may further include:

[0147] Determine the reconstructed value of the first image component corresponding to each pixel in the current block;

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

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

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

[0151] Compare the reconstructed value of the first image component corresponding to each pixel in the current block with the at least one threshold;

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

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

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

[0155] Exemplarily, it is assumed that the adjacent reference value of the first image component corresponding to the reference pixel adjacent to the current block is represented by L(n), the adjacent reference value of the second image component corresponding to the reference pixel adjacent to the current block is represented by C(n), and the threshold is represented by Threshold; as Figure 6 shown, which shows a schematic diagram of grouping adjacent reference pixels of a current block provided by an embodiment of the present application. In Figure 6 , taking the threshold as the demarcation point, all the reference pixels adjacent to the current block can be divided into two parts, such as the first subset of reference pixels and the second subset of reference pixels. Among them, the mean value Mean of the reconstructed values of the first image components of all the pixels in the current block is used as the threshold, that is, Threshold = Mean; in this way, if L(n) ≤ Threshold, then the reference pixels corresponding to L(n) can be determined as the first subset of reference pixels, and then the adjacent reference value L(m) of the first image component and the adjacent reference value C(m) of the second image component corresponding to all the reference pixels in the first subset of reference pixels are obtained; if L(n) > Threshold, then the reference pixels corresponding to L(n) can be determined as the second subset of reference pixels, and then the adjacent reference value L(k) of the first image component and the adjacent reference value C(k) of the second image component corresponding to all the reference pixels in the second subset of reference pixels 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 pixel points 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 pixel points 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 Equation (4), the first set of model parameters α1 and β1 are calculated as follows,

[0157]

[0158] According to L(k), C(k) and Equation (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 respectively, the first prediction sub-model Pred 1C [i,j] and the second prediction sub-model Pred 2C [i,j] can be established according to Equation (6) as follows,

[0161]

[0162] where M represents the number of reference pixel points in the first reference pixel subset, K represents the number of reference pixel points in the second reference pixel subset, i and j represent the position coordinates of each pixel point in the current block, i represents the horizontal direction, and j represents the vertical direction; Threshold represents the threshold, which can be obtained by taking the average of the first image component reconstruction values corresponding to all pixel points in the current block; Rec L [i,j] represents the first image component reconstruction value of 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 of the pixel point with the position coordinates [i,j] in the current block obtained by using the first prediction sub-model, and Pred 2C [i,j] represents the predicted value of the second image component of the pixel point with the position coordinates [i,j] in the current block obtained by using the second prediction sub-model.

[0163] Specifically, for complex models (such as those including two or more linear models), the prediction mode of MMLM can be utilized to perform prediction processing on the image components to be predicted. Among them, for the current block, pixel points with different position coordinates can select different pairs of prediction sub-models corresponding to model parameters to construct predicted values. For example, assume that there are two linear models, and there are two pixel points m and n in the current block. These two pixel points have two different reconstructed luminance values, and these two reconstructed luminance values are within two different intervals.

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

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

[0166] where α1 and β1 are a set of model parameters, and Y m is the luminance reconstruction value corresponding to pixel point m, and C' m is the chrominance prediction value corresponding to pixel point m.

[0167] Pixel n can use the prediction model shown in Equation (8) to obtain the chrominance prediction value,

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

[0169] where α2 and β2 are a set of model parameters, and Y n is the luminance reconstruction value corresponding to pixel point n, and C' n is the chrominance prediction value corresponding to pixel point n.

[0170] In addition, the embodiments of the present application can also construct more complex prediction models (such as more complex non-linear models or more complex multi-models) for the purpose of achieving cross-component prediction or cross-component prediction. For example, the chrominance value can be predicted based on the already obtained reconstructed luminance value, the luminance value can be predicted based on the already obtained reconstructed chrominance value, and even prediction can be performed between different chrominance values.

[0171] This embodiment provides an image component prediction method, which elaborates in detail on the specific implementation of the foregoing embodiment. From the technical solutions of the foregoing embodiment, it can be seen that by screening the adjacent reference pixels of the current block, unimportant reference pixel points or abnormal reference pixel points can be removed, thereby reducing the number of samples required for model parameter derivation in cross-component prediction. This 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, this application mainly optimizes the derivation process of model parameters in complex models (non-linear models or multi-models), and uses at least two prediction sub-models to implement the prediction processing of the image component to be predicted, improving the prediction accuracy of the image component to be predicted and at the same time improving the prediction efficiency of video images.

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

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

[0174] S702: Use the first reference pixel set to construct N first reference pixel subsets, where 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: Use the N first reference pixel subsets to calculate the model parameters of the N prediction models respectively, where the prediction model is used to map the value of the first image component 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 a video image can be divided into multiple image blocks, and each currently to-be-encoded image block can be called an encoding block. Among them, each encoding block can include a first image component, a second image component, and a third image component; and the current block is an encoding block in the video image for which the first image component, the second image component, or the third image component is to be predicted currently. Among them, when the first image component needs to be predicted through a prediction model, the image component to be predicted is the first image component; when the second image component needs to be predicted through a prediction model, the image component to be predicted is the second image component; when the third image component needs to be predicted through a prediction model, the image component to be predicted is the third image component. In the embodiments of the present application, the image component to be predicted is described by taking the second image component as an example. Through the prediction model, the value of the first image component of the current block can be mapped 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 non - linear model or a complex model. Among them, the complex model can be a non - linear model in a non - linear form such as a quadratic curve, or a multi - model composed of multiple linear models. In this way, for a complex model, since there may be some unimportant reference pixel points (such as those with poor correlation) or some abnormal reference pixel points among the adjacent reference pixels of the current block, in order to ensure the accuracy of model parameter derivation at this time, these reference pixel points need to be removed, so as to construct 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 enhances the prediction accuracy of the image component to be processed.

[0178] This embodiment provides an image component prediction method. By determining a first reference pixel set for a first image component of a current block in an image, where the first reference pixel set includes pixels adjacent to the current block; using the first reference pixel set to construct N first reference pixel subsets, where each first reference pixel subset includes some pixels in the first reference pixel set, and N is equal to the number of prediction models; then using the N first reference pixel subsets to calculate the model parameters of the N prediction models respectively, where the prediction model is used to map the value of the first image component 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; in this way, since the adjacent reference pixels of the current block are screened, unimportant reference pixel points or abnormal reference pixel points can be removed, thereby reducing the number of pixels in the adjacent reference pixel set and making the number of pixels in the adjacent reference pixel subset smaller. This not only reduces the 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 through at least two prediction sub - models, the prediction accuracy of the image component to be processed is further enhanced, and at the same time, the prediction efficiency of the video image is improved.

[0179] Further, in some embodiments, for S702, the step of using the first reference pixel set to construct N first reference pixel subsets may include:

[0180] Determine at least one threshold according to the first reference pixel set;

[0181] Divide the first reference pixel set 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 is the basis for classifying the reference pixel points included in the adjacent reference pixel subset, and is also the basis for classifying the reconstructed value of the first image component of the current block. In addition, the threshold is also a set value used to indicate the basis for establishing multiple prediction sub-models, and the size of the threshold is related to the reconstructed values of the first image components corresponding to all pixel points in the current block. Specifically, the size of the threshold can be obtained by calculating the mean value of the reconstructed values of the first image components corresponding to all pixel points in the current block, or can be obtained by calculating the median value of the reconstructed values of the first image components of all pixel points in the current block. The embodiments of the present application do not make specific limitations.

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

[0185] Obtaining the first reference pixel set according to some 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: the upper adjacent row, the upper right adjacent row, the left adjacent column, and the lower left adjacent column.

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

[0187] Further, since there may be some unimportant reference pixel points (such as poor correlation of these reference pixel points) or some abnormal reference pixel points among the adjacent reference pixels of the current block, at this time, it is necessary to screen the adjacent reference pixels, and the selected candidate pixels are formed into the first reference pixel set. Therefore, in some embodiments, the obtaining of the first reference pixel set according to some or all of the pixels on the edge of the current block may include:

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

[0189] Obtaining the first reference pixel set according to the pixels at the candidate positions.

[0190] Further, the determining of the candidate positions of the candidate pixels on the edge of the current block may include:

[0191] Determining the candidate positions according to the pixel positions corresponding to the pixels on the edge of the current block.

[0192] Further, the determining of the candidate positions of the candidate pixels on the edge of the current block may include:

[0193] Determine the candidate position according to the first image component value corresponding to the pixel on the edge of the current block.

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

[0195] Determine the candidate position according to the pixel position corresponding to the pixel on the edge of the current block and the first image component value corresponding to the pixel on the edge of the current block.

[0196] It should be noted that the first image component value is mainly used to characterize the intensity of the image component of the pixel, such as the luminance 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 embodiments of the present application may be selected through the candidate positions of the candidate pixels; among them, the candidate positions may be determined according to the pixel positions, or may be determined according to the first image component values (such as luminance values, chrominance values, etc.), or may be jointly determined according to the pixel positions and the first image component values, which are not specifically limited in the embodiments of the present application. That is to say, some of the reference pixel points selected in the embodiments of the present application may be selected through the pixel positions corresponding to the reference pixels, or may be selected according to the image component intensity values (such as luminance values, chrominance values, etc.) corresponding to the reference pixels; whether it is through the pixel positions corresponding to the reference pixels or through the image component intensity values corresponding to the reference pixels to screen adjacent reference pixels to select appropriate reference pixel points, and then form the first reference pixel set; in this way, after dividing the first reference pixel set into N first reference pixel subsets, the model parameters derived from the N first reference pixel subsets are more accurate, so that the prediction model constructed according to the model parameters can also be more accurate.

[0198] Further, for the determination of the candidate position, the first sampling interval may be calculated first, and then the at least one edge may be sampled 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] Determine a preset number of candidate pixels, where the preset number of candidate pixels indicates the number of pixels selected from the edge of the current block;

[0200] Determine the candidate position according to the preset number of pixels and the length of the edge of the current block; where the length of the edge of the current block is equal to the number of pixels on the edge of the current block.

[0201] It should be noted that the preset number of candidate pixels represents the number of pixels to be sampled preset in advance, 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 positions of the candidate pixels can be calculated according to the side length of at least one side and the preset number of candidate pixels; then, according to the candidate positions, appropriate reference pixel points are selected from the adjacent reference pixels to form the adjacent reference pixel subset.

[0202] Further, for the determination of the candidate positions, the first sampling interval can be calculated first, and then the at least one side is sampled according to the first sampling interval to determine the candidate positions of the candidate pixels corresponding to the at least one side. Therefore, in some embodiments, after determining the preset number of candidate pixels, the method may further include:

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

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

[0205] Adjust the first sampling interval to obtain a second sampling interval.

[0206] Further, determining the candidate positions of the candidate pixels on the side of the current block may include:

[0207] Determine a reference point on the side of the current block, and starting from the reference point, determine the candidate positions at the first sampling interval.

[0208] It should be noted that the reference point may be the midpoint of the at least one side, or the position of the first reference pixel point to the left of the midpoint of the at least one side, or the position of the first reference pixel point to the right of the midpoint of the at least one side, or even the positions of other reference pixel points of the at least one side. 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 also be finely adjusted, 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, then the adjusted second sampling interval can be 3 or 5. In the embodiments of the present application, for the adjustment of the first sampling interval, a small adjustment (such as adding 1 or subtracting 1) can be made, but the specific setting of the adjustment range is not specifically limited in the embodiments of the present application.

[0210] Further, in some embodiments, determining the candidate positions of the candidate pixels on the side of the current block may include:

[0211] Determine a reference point on the edge of the current block, and determine the candidate positions on both sides of the reference point at the first sampling interval.

[0212] Further, in some embodiments, determining the candidate positions of the candidate pixels on the edge of the current block may include:

[0213] Determine a reference point on the edge of the current block, and starting from the reference point, determine the candidate positions at the second sampling interval.

[0214] Further, in some embodiments, determining the candidate positions of the candidate pixels on the edge of the current block may include:

[0215] Determine a reference point on the edge of the current block, and determine the candidate positions on both sides of the reference point at the second sampling interval.

[0216] Further, in some embodiments, determining the candidate positions of the candidate pixels on the edge of the current block may include:

[0217] Determine a reference point on the edge of the current block, determine the corresponding candidate position on one side of the reference point at the first sampling interval, and determine the corresponding candidate position on the other side of the reference point at the second sampling interval.

[0218] It should be noted that after determining the reference points of at least one edge of the current block, uniform sampling can be performed at the first sampling interval or the second sampling interval; non-uniform sampling can also be performed at 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] Further, for the screening process of adjacent parameter pixels, the reference pixel points of at least one edge can also be skipped, that is, the unimportant reference pixel points or the abnormal reference pixel points are skipped (which can also be regarded as a deletion process), so as to obtain an adjacent reference pixel subset; on this basis, that is, after skipping some reference pixel points of at least one edge, the remaining reference pixel points are further screened to obtain an adjacent reference pixel subset. Therefore, in some embodiments, the method may further include:

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

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

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

[0223] It should also be noted that the value of K can be the preset number of reference pixels, such as 1, 2, or 4, etc.; 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 the actual situation, and the embodiments of the present application do not make specific limitations. 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 the embodiments of the present application also do not make specific limitations.

[0224] Furthermore, after determining the N first reference pixel subsets, the model parameters of the prediction model can be calculated based on these N first reference pixel subsets to construct the prediction model; wherein, the prediction model can include N prediction sub-models, and 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 respectively using the N first reference pixel subsets, the method may further include:

[0225] Determine the reconstructed value of the first image component corresponding to the pixels in the current block;

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

[0227] Using the selected prediction model and the reconstructed value of the first image component corresponding to the pixels in the current block, calculate the predicted value of the second image component corresponding to the pixels in the current block.

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

[0229] Compare the reconstructed value of the first image component corresponding to the pixels in the current block with the at least one threshold;

[0230] According to the comparison result, select the prediction model used for the pixels in the current block from the N prediction models.

[0231] It should be noted that after establishing N prediction models, the reconstructed value of the first image component corresponding to each pixel point in the current block can be compared with at least one threshold. According to the comparison results, one prediction model corresponding to each pixel point is selected from the N prediction models; then, the prediction model selected is used to perform prediction processing on the image component to be predicted, so as 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 non-linear model or a complex model. Among them, the complex model can be a non-linear model in the form of a quadratic curve or other non-linear forms, or a multi-model composed of multiple linear models. In this way, for the complex model, since unimportant reference pixel points or some abnormal reference pixel points have been removed from the adjacent reference pixel subset, the N groups of model parameters determined according to the adjacent reference pixel subset 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 the embodiment of the present application, when the image component prediction method is applied to the encoder side, an adjacent reference pixel subset can be constructed according to adjacent reference pixels, and then the model parameters of the prediction model are calculated according to the adjacent reference pixel subset, and the calculated model parameters are written into the code stream; the code stream 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 code stream; or on the decoder side, an adjacent reference pixel subset can also be constructed according to adjacent reference pixels, and then the model parameters of the prediction model are calculated according to the adjacent reference pixel subset, so as to construct a prediction model, and the prediction model is used 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, which elaborates on the specific implementation of the foregoing embodiment in detail. It can be seen from the technical solutions of the foregoing embodiment that, since the adjacent reference pixels of the current block are screened, unimportant reference pixel points or abnormal reference pixel points can be removed, thereby reducing the number of pixel points in the adjacent reference pixel set, making the number of pixel points in the adjacent reference pixel subset smaller, not only reducing the computational complexity and memory bandwidth, but also improving the accuracy of the prediction model; in addition, by using at least two prediction sub-models to perform cross-component prediction processing on the image component to be processed, the prediction accuracy of the image component to be processed is further enhanced, and at the same time, the prediction efficiency of the video image is improved.

[0235] Based on the same inventive concept as the foregoing embodiment, see Figure 8, which shows a schematic structural diagram of an encoder 80 provided by an embodiment of the present application. The encoder 80 may include: a first determination unit 801, a first construction unit 802, and a first calculation unit 803, where,

[0236] The first determination 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 according to the adjacent reference pixels; where, the adjacent reference pixel subset includes some of the adjacent reference pixels;

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

[0239] In the above solution, referring to 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; where, at least one side of the current block includes at least one of the following: the upper row, the upper right row, the left column, and the lower left column; and obtain the adjacent reference pixels according to the acquired reference pixels.

[0240] In the above solution, referring to Figure 8 , the encoder 80 may further include a first selection unit 805, where,

[0241] The first determination unit 801 is further configured to determine candidate positions of the candidate pixels based on at least one side of the current block;

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

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

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

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

[0246] In the above solution, the first determination unit 801 is further configured to determine a preset number of candidate pixels; where the preset number of candidate pixels represents the number of pixels sampled from the reference pixels adjacent to at least one side of the current block; and determine the candidate position according to the preset number of candidate pixels and the length of at least one side of the current block; where 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.

[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 determination 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 solution, referring to Figure 8 , the encoder 80 may further include a first adjustment unit 806 configured to adjust the first sampling interval to obtain a second sampling interval.

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

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

[0252] In the above solution, 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 determine the positions corresponding to K pixels to be skipped starting from the starting position and / or the end position of at least one side of the current block; and continuously skip K pixels to be skipped starting from the starting position and / or the end position of at least one side of the current block based on the positions corresponding to the K pixels to be skipped, to obtain at least one new side of the current block; and determine the candidate position based on 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 sets 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 set of model parameters.

[0255] In the above solution, referring to Figure 8 , the encoder 80 may further include a first partitioning unit 807, wherein,

[0256] The first determination unit 801 is further configured to determine at least one threshold according to the adjacent reference pixel subsets;

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

[0258] In the above solution, the first determination unit 801 is further configured to determine the 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 according to 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 solution, referring to Figure 8 , the encoder 80 may further include a first comparison 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 the prediction sub-model corresponding to each pixel in the current block from the N prediction sub-models according to the comparison result.

[0263] Understandably, in the embodiments of the present application, a "unit" may be a part of a circuit, a part of a processor, a part of a program or software, etc. Of course, it may also be a module or non-modular. Moreover, the components in this embodiment may be integrated in a processing unit, may exist separately physically for each unit, or two or more units may be integrated in one unit. The above integrated unit may be implemented in the form of hardware or in the form of a software functional module.

[0264] If the integrated unit is implemented in the form of a software functional module and is not sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment, in essence, or the part that contributes to the prior art, or all or part of this technical solution, may 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 may be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the method described in this embodiment. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc that can store program codes.

[0265] Therefore, the embodiments of the present application provide a computer storage medium that stores an image component prediction program. When the image component prediction program is executed by at least one processor, it implements the method described in any one of the foregoing embodiments.

[0266] Based on the composition of the above encoder 80 and the computer storage medium, refer to Figure 9 , which shows a specific hardware structure example of the encoder 80 provided by the embodiments of the present application. It may include: a first communication interface 901, a first memory 902, and a first processor 903; each component is coupled together through a first bus system 904. It can be understood that the first bus system 904 is used to realize the connection and communication between these components. The first bus system 904 includes, in addition to a data bus, a power bus, a control bus, and a status signal bus. However, for the sake of clear description, in Figure 9 all kinds of buses are labeled as the first bus system 904. Among them,

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

[0268] The first memory 902 is used for storing a computer program that can run on the first processor 903;

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

[0270] Determine adjacent reference pixels of a current block in an image;

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

[0272] Calculate model parameters of a prediction model according to the subset of adjacent reference pixels; wherein, the prediction model includes N prediction sub-models, the N prediction sub-models correspond to N groups of model parameters, the prediction sub-model is configured to perform cross-component prediction processing on an image component to be predicted through the corresponding model parameters, and N is a positive integer greater than or equal to 2.

[0273] It can be understood that the first memory 902 in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may 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 may be a random access memory (RAM), which is used as an external cache. By way of example but 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 (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus random access memory (DRRAM). The first memory 902 of the systems and methods described in the present application is intended to include, but not be limited to, these and any other suitable types of memories.

[0274] The first processor 903 may be an integrated circuit chip with the ability to process signals. In the implementation process, each step of the above method can be completed by the integrated logic circuit in the hardware of the first processor 903 or instructions in the form of software. The above-mentioned first processor 903 may 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, discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed and completed by a hardware decoding processor, or implemented and completed by a combination of hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. This storage medium is located in the first memory 902, and the first processor 903 reads the information in the first memory 902 and combines its hardware to complete the steps of the above method.

[0275] It can be understood that these embodiments described in the present application can be implemented using 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 (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in the present application, or a combination thereof. For software implementation, the technologies described in the present application can be implemented by executing modules (such as procedures, functions, etc.) that perform the 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 inside or outside the processor.

[0276] Optionally, as another embodiment, the first processor 903 is further configured to execute the method described in any one of the foregoing 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. Among them, 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 a subset of adjacent reference pixels according to the adjacent reference pixels, where the subset of adjacent reference pixels includes some of the adjacent reference pixels; the first calculation unit is configured to calculate model parameters of a prediction model according to the subset of adjacent reference pixels, where the prediction model includes N prediction sub-models, the N prediction sub-models correspond to N sets of model parameters, and the prediction sub-model is used to perform cross-component prediction processing on an image component to be predicted 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 set of adjacent reference pixels is reduced, so that the number of pixels in the subset of adjacent reference pixels is small, 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 foregoing embodiments, refer to Figure 10 , which shows a schematic structural diagram of a decoder 100 provided in an embodiment of the present application. The decoder 100 may include: a second determination unit 1001, a second construction unit 1002, and a second calculation unit 1003. Among them,

[0279] The second determination 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 a subset of adjacent reference pixels according to the adjacent reference pixels, where the subset of adjacent reference pixels includes some of the adjacent reference pixels;

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

[0282] In the above solution, refer to 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, where at least one side of the current block includes at least one of the following: upper row, upper right row, left column, and lower left column; and obtain the adjacent reference pixels according to the acquired reference pixels.

[0283] In the above solution, referring to Figure 10 , the decoder 100 may further include a second selection unit 1005, where

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

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

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

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

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

[0289] In the above solution, the second determination unit 1001 is further configured to determine a preset number of candidate pixels; where the preset number of candidate pixels represents the number of pixels sampled from the reference pixels adjacent to at least one side of the current block; and determine the candidate position according to the preset number of candidate pixels and the length of at least one side of the current block; where 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.

[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 determination 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 solution, referring to Figure 10 , the decoder 100 may further include a second adjustment unit 1006, configured to adjust the first sampling interval to obtain a second sampling interval;

[0293] The second determination unit 1001 is further configured to determine the candidate positions based on the reference point at the second sampling interval.

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

[0295] In the above solution, the second determination unit 1001 is further configured to determine at least one preset number of skipped pixels K corresponding to the edges of the current block, where K is a positive integer greater than or equal to 1; and determine the positions corresponding to K pixels to be skipped starting from the starting position and / or the ending position of at least one edge of the current block; 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 the ending position of at least one edge of the current block to obtain at least one new edge of the current block; and determine the candidate positions based on the at least one new edge 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 according to the adjacent reference pixel subset.

[0297] The second calculation unit 1003 is configured to calculate N sets of model parameters corresponding to the N prediction submodels based on the N first adjacent reference pixel subsets; where each prediction submodel corresponds to a set of model parameters.

[0298] In the above solution, referring to Figure 10 , the decoder 100 may further include a second partitioning unit 1007, where

[0299] The second determination unit 1001 is further configured to determine at least one threshold according to the adjacent reference pixel subset.

[0300] The second partitioning unit 1007 is configured to partition 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 determination unit 1001 is further configured to determine the first image component reconstruction value corresponding to each pixel in the current block.

[0302] The second selection unit 1005 is further configured to select one prediction submodel from the N prediction submodels.

[0303] The second computing unit 1003 is further configured to calculate the predicted value of the second image component corresponding to each pixel in the current block according to the selected prediction sub-model and the reconstructed value of the first image component corresponding to each pixel in the current block; wherein, the image component to be predicted is the second image component.

[0304] In the above solution, referring to Figure 10 , the decoder 100 may further include a second comparison unit 1008, configured to compare the reconstructed value of the first image component 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 the prediction sub-model corresponding to each pixel in the current block from the N prediction sub-models according to the comparison result.

[0306] It can be understood that, in this embodiment, a "unit" may be a part of a circuit, a part of a processor, a part of a program or software, etc. Of course, it may also be a module or non-modular. Moreover, the components in this embodiment may be integrated in one processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit. The above integrated unit may be implemented in the form of hardware or in the form of a software functional module.

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

[0308] Based on the composition of the above decoder 100 and the computer storage medium, referring to Figure 11 , it 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 through a second bus system 1104. It can be understood that the second bus system 1104 is used to realize the connection and communication between these components. The second bus system 1104 includes not only a data bus, but also a power bus, a control bus, and a status signal bus. However, for the sake of clear description, in Figure 11 all kinds of buses are labeled as the second bus system 1104. Among them,

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

[0310] A second memory 1102 for storing a computer program that can run on a second processor 1103;

[0311] A second processor 1103 for, when running the computer program, performing:

[0312] Determining adjacent 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 contains some of the adjacent reference pixels;

[0314] Calculating model parameters of a prediction model according to the subset of adjacent reference pixels; 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-model is used to perform cross-component prediction processing on an image component 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, when running the computer program, perform the method described in any one of the foregoing embodiments.

[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; details are not described herein again.

[0317] This embodiment provides a decoder, which may include a second determination unit, a second construction unit, and a second calculation unit. Among them, the second determination unit is configured to determine adjacent reference pixels of a current block in an image; the second construction unit is configured to construct a subset of adjacent reference pixels according to the adjacent reference pixels; wherein, the subset of adjacent reference pixels contains some of the adjacent reference pixels; the second calculation unit is configured to calculate model parameters of a prediction model according to the subset of adjacent reference pixels; 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-model is used to perform cross-component prediction processing on an image component to be predicted 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 set of adjacent reference pixels is reduced, so that the number of pixels in the subset of adjacent reference pixels is small, 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 "include", "comprise" or any other variant thereof are intended to cover 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 expressly listed, or elements inherent to such process, method, article or apparatus. Without further limitation, an element defined by the phrase "comprising a..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising such element.

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

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

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

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

[0323] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed in the present application can easily think of changes or substitutions, which should all be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

[0324] Industrial applicability

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

Claims

1. An image component prediction method, applied to an encoder, characterized in that, The method includes: Determining a reference sample of a current block in an image; Constructing a reference sample subset according to the reference sample; wherein, the reference sample subset contains some samples in the reference sample; Calculating N groups of model parameters corresponding to N prediction sub-models according to the reference sample subset; wherein, the prediction sub-model is used to perform cross-component prediction processing on an image component to be predicted through corresponding model parameters, and N is a positive integer greater than or equal to 2; Wherein, the constructing the reference sample subset according to the reference sample includes: Determining candidate positions of candidate samples based on at least one side of the current block; Selecting reference samples corresponding to the candidate positions from the reference sample, and forming the selected reference samples into the reference sample subset; Wherein, the determining the candidate positions of the candidate samples based on at least one side of the current block includes: Calculating a first sampling interval according to a preset number of candidate samples and the length of at least one side of the current block; Determining a starting point position from at least one side of the current block, and determining the candidate positions based on the starting point position according to the first sampling interval.

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

3. The method according to claim 1, characterized in that, The determining the candidate positions of the candidate samples based on at least one side of the current block includes: Determining the candidate positions based on the sample positions corresponding to the reference samples adjacent to at least one side of the current block.

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

5. The method according to claim 1, characterized in that, The determining the candidate positions of the candidate samples based on at least one side of the current block includes: Determining the candidate positions based on the sample positions and the image component intensity values corresponding to the reference samples adjacent to at least one side of the current block.

6. The method according to claim 1, wherein Determine the candidate positions of the candidate samples 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 expected to form the reference sample subset of the current block, and shift represents the starting point position for selecting reference sample points.

7. An image component prediction method, applied to a decoder, characterized in that, The method includes: Determining a reference sample of a current block in an image; Constructing a reference sample subset according to the reference sample; wherein, the reference sample subset contains some samples in the reference sample; Based on the subset of reference samples, calculate N sets of model parameters corresponding to N prediction sub-models; wherein the prediction sub-models are used to perform cross-component prediction processing on the image component to be predicted through the corresponding model parameters, and N is a positive integer greater than or equal to 2; Wherein, constructing the subset of reference samples according to the reference samples includes: Based on at least one side of the current block, determine the candidate positions of candidate samples; Select reference samples corresponding to the candidate positions from the reference samples, and form the subset of reference samples with the selected reference samples; Wherein, based on at least one side of the current block, determining the candidate positions of the candidate samples includes: According to the preset number of candidate samples and the length of at least one side of the current block, calculate the first sampling interval; Determine a starting point position from at least one side of the current block, and based on the starting point position, determine the candidate positions according to the first sampling interval.

8. The method according to claim 7, wherein Determining the reference samples of the current block in the image includes: Obtain reference samples adjacent to at least one side of the current block; wherein at least one side of the current block includes at least one of the following: the upper row, the upper right row, the left column, and the lower left column; According to the obtained reference samples, obtain the reference samples of the current block.

9. The method according to claim 7, wherein Based on at least one side of the current block, determining the candidate positions of the candidate samples includes: Based on the sample positions corresponding to the reference samples adjacent to at least one side of the current block, determine the candidate positions.

10. The method according to claim 7, wherein Based on at least one side of the current block, determining the candidate positions of the candidate samples includes: Based on the image component intensity values corresponding to the reference samples adjacent to at least one side of the current block, determine the candidate positions.

11. The method according to claim 7, wherein Based on at least one side of the current block, determining the candidate positions of the candidate samples includes: Based on the sample positions and image component intensity values corresponding to the reference samples adjacent to at least one side of the current block, determine the candidate positions.

12. The method according to claim 7, wherein, Determine the candidate positions of the candidate samples 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 expected to form the subset of reference samples for the current block, and shift represents the starting point position for selecting reference sample points.

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

14. A decoder, the decoder includes a second memory and a second processor, wherein: The second memory is used to store a computer program that can run on the second processor; The second processor is used 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 bitstream.

Citation Information

Patent Citations

  • Method and apparatus of video coding

    CN108781297A

  • Method for generating high dynamic range image, mobile terminal and storage medium

    CN109005368A

  • Coding video data using derived chroma mode

    US20180205946A1

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

    WO2017190288A1