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

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

CN120416484BActive Publication Date: 2026-11-24GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510826576.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-03-18
Filing Date
2019-10-28
Publication Date
2026-11-24
Estimated Expiration
2039-10-28

AI Technical Summary

Technical Problem

In image component prediction for the H.266/VVC video coding standard, existing prediction models suffer from high computational complexity and the presence of outlier sample points, leading to inaccurate model construction and failing to meet the requirements of efficient video coding.

Method used

By filtering the neighboring reference pixels of the current block in the image, a subset of neighboring reference pixels is constructed, reducing the number of reference pixels. Multiple prediction sub-models are then used for cross-component prediction, reducing computational complexity and improving the accuracy of the prediction model.

Benefits of technology

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

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120416484B_ABST
    Figure CN120416484B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses an image component prediction method, an encoder, a decoder and a storage medium, and 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 contains part of the adjacent reference pixels; calculating model parameters of a prediction model according to the adjacent reference pixel subset; 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 a to-be-predicted image component 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] Case Analysis

[0002] This application is a divisional application of Chinese Patent No. 201980088761.8, filed on October 28, 2019, entitled "Image Component Prediction Method, Encoder, Decoder and Storage Medium". Technical Field

[0003] This application relates to the field of image processing technology, and in particular to an image component prediction method, an encoder, a decoder, and a storage medium. Background Technology

[0004] As people's demands for video display quality increase, new video application forms such as high-definition and ultra-high-definition video have emerged. H.265 / High Efficiency Video Coding (HEVC) can no longer meet the needs of the rapidly developing video applications. The Joint Video Exploration Team (JVET) proposed the next-generation video coding standard H.266 / Versatile Video Coding (VVC), and its corresponding test model is the VVC Reference Software Test Model (VTM).

[0005] In VTM, a prediction model-based image component prediction method has been integrated, which can predict the chrominance component 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 nonlinear model or a multi-model model (such as composed of multiple linear models), the number of sample points used for model parameter derivation is currently large, resulting in high computational complexity and memory bandwidth. At the same time, there may be outlier sample points among these sample points, leading to inaccurate prediction model construction. Summary of the Invention

[0006] This application provides an image component prediction method, encoder, decoder, and storage medium. By reducing the number of pixels in the adjacent reference pixel set, not only can the computational complexity be reduced, but the accuracy of the prediction model can also be improved, thereby enhancing the prediction accuracy of the image components to be processed.

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

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

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

[0010] Based on the adjacent reference pixels, a subset of adjacent reference pixels is constructed; wherein, the subset of adjacent reference pixels includes some pixels among the adjacent reference pixels;

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

[0012] Secondly, embodiments of this application provide an image component prediction method, applied to an encoder or decoder, the method comprising:

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

[0014] Using the first reference pixel set, construct N first reference pixel subsets, wherein each first reference pixel subset contains some pixels from the first reference pixel set, and N is equal to the number of prediction models;

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

[0016] Thirdly, embodiments of this application provide an encoder, which includes: a first determining unit, a first constructing unit, and a first calculating unit, wherein,

[0017] The first determining unit is configured to determine the adjacent reference pixels of the current block in the image;

[0018] The first construction unit is configured to construct a subset of adjacent reference pixels based on the adjacent reference pixels; wherein the subset of adjacent reference pixels includes some pixels among the adjacent reference pixels;

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

[0020] Fourthly, embodiments of this application provide an encoder, which includes a first memory and a first processor, wherein,

[0021] A first memory is used to store computer programs that can run on the first processor;

[0022] A first processor is configured to execute the method described in the first or second aspect when running the computer program.

[0023] Fifthly, embodiments of this application provide a decoder, which includes a second determining unit, a second constructing unit, and a second computing unit, wherein...

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

[0025] The second construction unit is configured to construct a subset of adjacent reference pixels based on the adjacent reference pixels; wherein the subset of adjacent reference pixels includes some pixels among the adjacent reference pixels;

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

[0027] Sixthly, embodiments of this application provide a decoder, which includes a second memory and a second processor, wherein...

[0028] The second memory is used to store computer programs that can run on the second processor;

[0029] A second processor is configured to execute the method described in the first or second aspect when running the computer program.

[0030] In a seventh aspect, embodiments of this application provide a computer storage medium storing an image component prediction program, which, when executed by a first processor or a second processor, implements the method described in the first or second aspect.

[0031] This application provides an image component prediction method, encoder, decoder, and storage medium. The method determines the neighboring reference pixels of the current block in an image; constructs a subset of neighboring reference pixels based on these pixels; the subset includes some pixels from the neighboring reference pixels; and calculates model parameters for a prediction model based on the subset. The prediction model includes N prediction sub-models, each corresponding to N sets of model parameters. The prediction sub-models are used to perform cross-component prediction processing on the image components to be predicted using their corresponding model parameters, where N is a positive integer greater than or equal to 2. By filtering the neighboring reference pixels of the current block, unimportant or anomalous reference pixels can be removed, reducing the number of pixels in the neighboring reference pixel set and resulting in a smaller subset. This not only reduces computational complexity and memory bandwidth but also improves the accuracy of the prediction model. Furthermore, by using at least two prediction sub-models to perform cross-component prediction processing on the image components to be processed, the prediction accuracy of the image components to be processed is improved, thereby increasing the prediction efficiency of video images. Attached Figure Description

[0032] Figure 1 This application provides a schematic block diagram of a video encoding system.

[0033] Figure 2 This application provides a schematic block diagram of a video decoding system according to an embodiment of the present application.

[0034] Figure 3 A flowchart illustrating an image component prediction method provided in an embodiment of this application;

[0035] Figure 4 This application provides a schematic diagram of a structure for selecting a subset of adjacent reference pixels on the side of the current block, as provided in an embodiment of the present application.

[0036] Figure 5 This is a schematic diagram illustrating another structure for selecting a subset of adjacent reference pixels on the upper side of the current block, provided in an embodiment of this application.

[0037] Figure 6 This application provides a schematic diagram of grouping adjacent reference pixels of a coding block according to an embodiment of the present application.

[0038] Figure 7 A flowchart illustrating another image component prediction method provided in an embodiment of this application;

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

[0040] Figure 9This is a schematic diagram of the specific hardware structure of an encoder provided in an embodiment of this application;

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

[0042] Figure 11 This is a schematic diagram of the specific hardware structure of a decoder provided in an embodiment of this application. Detailed Implementation

[0043] In order to gain a more detailed understanding of the features and technical content of the embodiments of this application, the implementation of the embodiments of this application will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for reference and illustration only and are not intended to limit the embodiments of this application.

[0044] In order to gain a more detailed understanding of the features and technical content of the embodiments of this application, the implementation of the embodiments of this application will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for reference and illustration only and are not intended to limit the embodiments of this application.

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

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

[0047] In the next-generation video coding standard H.266, to further improve coding performance and efficiency, cross-component prediction (CCP) has been extended and improved, introducing cross-component linear model prediction (CCLM). In H.266, CCLM can not only predict from the first image component to the second image component, but also from the first image component to the third image component, or from the third image component to the first image component, and even from the second image component to the third image component or from the third image component to the second image component. The following description uses the prediction from the first image component to the second image component as an example; however, the technical solutions of this application embodiment are also applicable to the prediction of other image components.

[0048] In VTM, there are currently two prediction modes for CCLM: single-model CCLM and multiple-model CCLM (MMLM). As the name suggests, single-model CCLM uses only one prediction model to predict from the first image component to the second; while MMLM uses multiple prediction models to achieve the same prediction. For example, in MMLM, neighboring reference pixels can be grouped into a set of neighboring reference pixels, and this set can be divided into two groups. Each group can be used independently as a training set for deriving model parameters; that is, each group can derive a set of model parameters α and β.

[0049] To ensure the accuracy of the model parameters used in each prediction model within the MMLM prediction mode, the reference pixel set constructed to derive the model parameters needs to be more accurate. Based on this, this application provides an image component prediction method, which involves determining the neighboring reference pixels of the current block in the image; constructing a subset of neighboring reference pixels based on the neighboring reference pixels; wherein the subset of neighboring reference pixels contains some pixels from the neighboring reference pixels; and then calculating the model parameters of the prediction model based on the subset of neighboring reference pixels; wherein the prediction model includes N prediction sub-models, the N prediction sub-models correspond to N sets of model parameters, and the prediction sub-models are used to perform cross-component prediction processing on the image components to be predicted using the corresponding model parameters, where N is a positive integer greater than or equal to 2; in this way, by filtering the neighboring reference pixels of the current block, unimportant reference pixels or reference pixels with abnormalities can be removed, thereby reducing the number of pixels in the set of neighboring reference pixels, resulting in a smaller number of pixels in the subset of neighboring reference pixels, which not only reduces computational complexity and memory bandwidth, but also improves the accuracy of the prediction model; in addition, by performing cross-component prediction processing on the image components to be processed using at least two prediction sub-models, the prediction accuracy of the image components to be processed is also improved, while improving the prediction efficiency of video images.

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

[0051] See Figure 1 It illustrates an example block diagram of a video encoding system provided in an embodiment of this application; as shown Figure 1As shown, the video coding system 100 includes a transform and quantization unit 101, an intra-frame estimation unit 102, an intra-frame prediction unit 103, a motion compensation unit 104, a motion estimation unit 105, an inverse transform and inverse quantization unit 106, a filter control and analysis unit 107, a filtering unit 108, an encoding unit 109, and a decoded image buffer unit 110. The filtering unit 108 can implement deblocking filtering and Sample Adaptive Offset (SAO) filtering, while the encoding unit 109 can implement header information encoding and Context-based Adaptive Binary Arithmetic Coding (CABAC). For the input raw video signal, the system uses coding tree blocks (Coding Tree Blocks) to perform the encoding of the raw video signal. The partitioning of a TreeUnit (CTU) yields a video coding block. The residual pixel information obtained after intra- or inter-frame prediction is then transformed by the transform and quantization unit 101. This transformation involves converting the residual information from the pixel domain to the transform domain and quantizing the resulting transform coefficients to further reduce the bit rate. Intra-frame estimation unit 102 and intra-frame prediction unit 103 perform intra-frame prediction on the video coding block. Specifically, intra-frame estimation unit 102 and intra-frame prediction unit 103 determine the intra-frame prediction mode to be used to encode the video coding block. Motion compensation unit 104 and motion estimation unit 105 perform inter-frame prediction coding of the received video coding block relative to one or more blocks in one or more reference frames to provide temporal prediction information. The motion estimation performed by motion estimation unit 105 is a process of generating motion vectors, which can estimate the motion of the video coding block. Then, motion compensation unit 104 uses the motion vectors determined by motion estimation unit 105 to generate motion vectors. Motion vectors perform motion compensation; after determining the intra-prediction mode, the intra-prediction unit 103 is also used to provide the selected intra-prediction data to the coding unit 109, and the motion estimation unit 105 also sends the calculated motion vector data to the coding unit 109; in addition, the inverse transform and inverse quantization unit 106 is used to reconstruct the video coding block, reconstructing the residual block in the pixel domain, the reconstructed residual block is removed by the filter control analysis unit 107 and the filtering unit 108 to remove block artifacts, and then the reconstructed residual block is added to a predictive block in the frame of the decoding image buffer unit 110 to generate the reconstructed video coding block; the coding unit 109 is used to encode various coding parameters and quantized transform coefficients. In the CABAC-based coding algorithm, the context content can be based on adjacent coding blocks and can be used to encode information indicating the determined intra-prediction mode, outputting the bitstream of the video signal; and the decoding image buffer unit 110 is used to store the reconstructed video coding block for prediction reference.As video image encoding proceeds, new reconstructed video encoding blocks are continuously generated, and these reconstructed video encoding blocks are stored in the decoding image buffer unit 110.

[0052] See Figure 2 It illustrates an example block diagram of a video decoding system provided in an embodiment of this application; as shown Figure 2 As shown, the video decoding system 200 includes a decoding unit 201, an inverse transform and inverse quantization unit 202, an intra-frame prediction unit 203, a motion compensation unit 204, a filtering unit 205, and a decoding image buffer unit 206. The decoding unit 201 can perform header information decoding and CABAC decoding, while the filtering unit 205 can perform deblocking filtering and SAO filtering. The input video signal is processed... Figure 1 After encoding, the video signal bitstream is output. This bitstream is input into the video decoding system 200, first passing through the decoding unit 201 to obtain the decoded transform coefficients. These transform coefficients are then processed by the inverse transform and inverse quantization unit 202 to generate residual blocks in the pixel domain. The intra-frame prediction unit 203 can generate prediction data for the current video decoding block based on the determined intra-frame prediction mode and data from previously decoded blocks in the current frame or image. The motion compensation unit 204 determines the prediction information for the video decoding block by analyzing motion vectors and other associated syntax elements, and uses this prediction information... The information is used to generate a predictive block of the video block being decoded; the decoded video block is formed by summing the residual block from the inverse transform and inverse quantization unit 202 with the corresponding predictive block generated by the intra-frame prediction unit 203 or the motion compensation unit 204; the decoded video signal is passed through the filtering unit 205 to remove block artifacts, which can improve video quality; then the decoded video block is stored in the decoding image buffer unit 206, which stores reference images for subsequent intra-frame prediction or motion compensation, and is also used for the output of the video signal, thus obtaining the recovered original video signal.

[0053] The image component prediction method in this application embodiment is mainly applied in, for example, Figure 1 The intra-prediction unit 103 shown and as follows Figure 2The intra-prediction unit 203 shown is specifically applied to the CCLM prediction part of intra-prediction. That is, the image component prediction method in this embodiment can be applied to both video coding and video decoding systems, and even simultaneously, but this embodiment does not impose specific limitations. When the method is applied to the intra-prediction unit 103 in a video coding system, "current block" specifically refers to the current coding block in intra-prediction; when the method is applied to the intra-prediction unit 203 in a video decoding system, "current block" specifically refers to the current decoding block in intra-prediction.

[0054] Based on the above Figure 1 or Figure 2 For application scenario examples, see Figure 3 This illustrates a flowchart of an image component prediction method provided in an embodiment of this application. Figure 3 As 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 image block to be encoded can be called a coding block. Each coding block can include a first image component, a second image component, and a third image component; the current block is the coding block in the video image for which the prediction of the first, second, or third image component is currently needed. Specifically, when the prediction model needs to predict the first image component, the image component to be predicted is the first image component; when the prediction model needs to predict the second image component, the image component to be predicted is the second image component; and when the prediction model needs to predict the third image component, 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 adjacent reference pixels in the left and upper adjacent regions of the current block, or they can be composed of adjacent reference pixels in the left and lower left adjacent regions of the current block, or they can be composed of adjacent reference pixels in the upper and upper right adjacent regions of the current block. This application embodiment does not make specific limitations.

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

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

[0060] The adjacent reference pixels are obtained based on the acquired reference pixels.

[0061] It should be noted that at least one edge of the current block may include at least one of the following: top row (also known as top edge), top right row (also known as top right edge), left column (also known as left edge), or bottom left column (also known as bottom left edge).

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

[0063] Obtain reference pixels adjacent to at least one edge of the current block; wherein the at least one edge includes the left edge of the current block and / or the top edge of the current block;

[0064] The adjacent reference pixels are obtained based on the acquired reference pixels.

[0065] It should be noted that at least one edge of the current block may include the left edge and / or the top edge of the current block; that is, at least one edge of the current block may refer to the top edge of the current block, or the left edge of the current block, or even the top edge and the left edge of the current block. This application embodiment does not make specific limitations.

[0066] Thus, when both the left and top adjacent regions are valid regions, the adjacent reference pixels can be composed of reference pixels adjacent to the left edge and the top edge of the current block. When the left adjacent region is a valid region and the top adjacent region is an invalid region, the adjacent reference pixels can be composed of reference pixels adjacent to the left edge of the current block. When the left adjacent region is an invalid region and the top adjacent region is a valid region, the adjacent reference pixels can be composed of reference pixels adjacent to the top edge of the current block.

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

[0068] Obtain reference pixels in reference rows or reference columns adjacent to the current block; wherein, the reference row is composed of the rows adjacent to the top and top right sides of the current block, and the reference column is composed of the columns adjacent to the left and bottom left sides of the current block;

[0069] The adjacent reference pixels are obtained based on the acquired 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 top and top right sides of the current block, and the reference column adjacent to the current block can be composed of the columns adjacent to the left and bottom left sides of the current block. The reference row or column adjacent to the current block can refer to the reference row adjacent to the top side of the current block, the reference column adjacent to the left side of the current block, or even the reference row or column adjacent to other sides of the current block; this embodiment does not impose specific limitations. For ease of description, in this embodiment, the reference rows adjacent to the current block will be described using the reference rows adjacent to the top side as an example, and the reference columns adjacent to the current block will be described using the reference columns adjacent to the left side as an example.

[0071] The reference pixels in the reference row adjacent to the current block may include reference pixels adjacent to the top edge and the top right edge (also referred to as the adjacent reference pixels corresponding to the top edge and the top right edge), where the top edge refers to the top edge of the current block, and the top right edge refers to the side length that extends horizontally to the right from the top edge of the current block, which is the same as the height of the current block; the reference pixels in the reference column adjacent to the current block may also include reference pixels adjacent to the left edge and the bottom left edge (also referred to as the adjacent reference pixels corresponding to the left edge and the bottom left edge), where the left edge refers to the left edge of the current block, and the bottom left edge refers to the side length that extends vertically downward from the left edge of the current block, which is the same as the width of the current decoded block; however, this embodiment of the application does not impose specific limitations.

[0072] Thus, when the left-side adjacent region and the lower-left adjacent region are valid regions, the adjacent reference pixels can be composed of reference pixels in the reference column adjacent to the current block; when the upper-side adjacent region and the upper-right adjacent region are valid regions, the adjacent reference pixels can be composed of reference pixels in the reference row adjacent to the current block.

[0073] S302: Construct a subset of adjacent reference pixels based on the adjacent reference pixels; wherein, the subset of adjacent reference pixels includes some pixels among the adjacent reference pixels;

[0074] It should be noted that adjacent reference pixels are the reference pixels used to construct the prediction model in the current related technical solutions. Typically, to avoid transmitting model parameters from the video encoding system to the video decoding system, adjacent reference pixels can be formed using one or more of the four edges (top, top right, left, and bottom left) of the current block to derive model parameters. However, using so many reference pixels as sample points for multi-model construction is complex, and some reference pixels with outliers can degrade the quality of the prediction model.

[0075] In other words, among the adjacent reference pixels, there may be some unimportant reference pixels (such as those with poor correlation) or some abnormal reference pixels. In order to ensure the accuracy of the model parameter derivation, these reference pixels need to be removed, thus obtaining a subset of adjacent reference pixels. In this way, based on the subset of adjacent reference pixels, the accuracy of the prediction model can be guaranteed, making the prediction efficiency of the image components to be processed high.

[0076] The adjacent reference pixel subset contains a preset number of reference pixels. Here, the preset number can be N, where N is a positive integer greater than 1. In practical applications, N can be 4, but this embodiment does not impose a specific limitation.

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

[0078] Based on at least one edge of the current block, determine the candidate position of the candidate pixel;

[0079] Select a reference pixel corresponding to the candidate position from the adjacent reference pixels, and form the adjacent reference pixel subset by selecting the parameter pixels.

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

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

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

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

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

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

[0086] It should be noted that the image component intensity can be represented by the image component value, such as the luminance value, chrominance value, etc.; here, the larger the image component value, the higher the image component intensity. The reference pixel selected in the embodiments of this application can be selected through the candidate position of the candidate pixel; wherein, the candidate position can be determined based on the pixel position, or it can be determined based on the image component intensity value (such as the luminance value, chrominance value, etc.), and the embodiments of this application do not make specific limitations.

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

[0088] It should be noted that multiple sets of model parameters can be calculated based on a subset of adjacent reference pixels; a prediction sub-model can be constructed based on each set of model parameters; thus, if N sets of model parameters are calculated, N prediction sub-models can be obtained.

[0089] It should also be noted that the prediction model can be a nonlinear model or a complex model. A complex model can be a nonlinear model of a quadratic curve or other nonlinear form, or a multi-model composed of multiple linear models. Thus, for complex models, since unimportant or anomalous reference pixels have been removed from the adjacent reference pixel subsets, the N sets of model parameters determined based on the adjacent reference pixel subsets are more accurate, thereby improving the accuracy of the complex model and enhancing the prediction accuracy of the image components to be processed.

[0090] This embodiment provides an image component prediction method. It involves determining the neighboring reference pixels of the current block in an image; constructing a subset of neighboring reference pixels based on these pixels; wherein the subset contains some pixels from the neighboring reference pixels; and calculating model parameters for a prediction model based on the subset. The prediction model includes N prediction sub-models, each corresponding to N sets of model parameters. The prediction sub-models are used to perform cross-component prediction processing on the image components to be predicted using their corresponding model parameters, where N is a positive integer greater than or equal to 2. By filtering the neighboring reference pixels of the current block, unimportant or anomalous reference pixels can be removed, thereby reducing the number of pixels in the neighboring reference pixel set and resulting in a smaller number of pixels in the neighboring reference pixel subset. This not only reduces computational complexity and memory bandwidth but also improves the accuracy of the prediction model. Furthermore, by using at least two prediction sub-models to perform cross-component prediction processing on the image components to be processed, the prediction accuracy of the image components to be processed is improved, and the prediction efficiency of video images is also increased.

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

[0092] It should be noted that the reference pixels selected in this application embodiment can be selected based on the pixel position corresponding to the reference pixel, or based on the image component intensity value (such as luminance value, chrominance value, etc.) corresponding to the reference pixel. This application embodiment does not impose specific limitations. Whether selecting suitable reference pixels by filtering adjacent reference pixels based on the pixel position or the image component intensity value corresponding to the reference pixel, thus forming a subset of adjacent reference pixels, the model parameters derived from the subset of adjacent reference pixels are more accurate, making the prediction model constructed based on these model parameters more precise.

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

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

[0095] The candidate position is determined based on the preset number of candidate pixels and the length of at least one edge of the current block; wherein the length of at least one edge of the current block is equal to the number of pixels contained in at least one edge of the current block.

[0096] It should be noted that the preset candidate pixel count represents the number of pixels to be sampled in advance, that is, the number of pixels contained in the adjacent reference pixel subset. Taking pixel position as an example, after determining the preset candidate pixel count, the candidate position of the candidate pixel can be calculated based on the side length of at least one edge and the preset candidate pixel count; then, based on the candidate position, suitable reference pixels are selected from the adjacent reference pixels to form the adjacent reference pixel subset. In this way, the model parameters calculated based on the adjacent reference pixel subset are more accurate, and the constructed prediction model can also be more accurate, thereby improving the prediction accuracy of the image components to be predicted and improving the prediction efficiency of video images.

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

[0098] The first sampling interval is calculated based on the preset number of candidate pixels and the length of at least one side of the current block;

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

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

[0101] Specifically, the midpoint of the at least one edge can be determined based on its length, and then the midpoint of the at least one edge can be used as the reference point. The reference point can be the midpoint of the at least one edge, the first reference pixel position slightly to the left of the midpoint of the at least one edge, the first reference pixel position slightly to the right of the midpoint of the at least one edge, or even other reference pixel positions of the at least one edge; this embodiment does not impose specific limitations.

[0102] It should be noted that, considering the importance of reference pixels adjacent to at least one edge of the current block is related to their corresponding positions, in order to ensure that the reference pixels in the adjacent reference pixel subset can represent the characteristics of the entire adjacent edge, it is necessary to select reference pixels located at the center of the edge as much as possible, so as to eliminate points with lower importance (such as reference pixels on the two edges of the edge). In the embodiments of this application, if the top edge of the current block is taken as an example, the position of the first reference pixel slightly to the right or left of the middle position can be used as the reference point of the edge; if the left edge of the current block is taken as an example, the position of the first reference pixel slightly below or above the middle position can be used as the reference point of the edge.

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

[0104] In practical applications, since the length of the left or top edge of the current block is always a multiple of 2, the middle position of the left or top edge of the current block is always between two points. Figure 4 In the example, the first pixel slightly to the left of the center is used as the midpoint of the side; however, in this embodiment, the first pixel slightly to the right of the center can also be used as the midpoint of the side, such as... Figure 5 As shown. In Figure 4 In the middle, the first pixel slightly to the left of the center position (e.g.) Figure 4 3) is taken as the midpoint of this side. Since the preset sampling number is 2, the position of the reference pixel to be selected can be determined (e.g., Figure 4 (Examples of gray dots) are 1 and 5. Based on the positions of these reference pixels, corresponding reference pixels can also be selected to form a subset of adjacent reference pixels. Therefore, in this embodiment, for the upper edge of the current block, either the first pixel slightly to the right of the center can be used as the midpoint of the edge, or the first pixel slightly to the left of the center can be used as the midpoint of the edge; this embodiment does not impose a specific limitation. Similarly, for the left edge of the current block, either the first pixel slightly below the center can be used as the midpoint of the edge, or the first pixel slightly above the center can be used as the midpoint of the edge; this embodiment also does not impose a specific limitation.

[0105] Unless otherwise specified, the following description will take the top edge of the current block as an example. However, the image component prediction method of this application embodiment is also applicable to the left edge of the current block, or even the right edge or the bottom edge of the reconstructed block. This application embodiment does not make specific limitations.

[0106] Understandably, if the existence of reference pixels adjacent to the left or top edge of the current block is not considered, then the second reference pixel set can still be constructed according to equations (1) and (2).

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

[0108] shift=Δ / 2 (2)

[0109] Where Δ represents the sampling interval, length represents the number of reference pixels in a row adjacent to the top edge of the current block or the number of reference pixels in a column adjacent to the left edge of the current block, N2 represents the number of reference pixels expected to constitute the adjacent reference pixel subset of the current block (generally, the left and top edges are each half, but this application embodiment does not specifically limit this), and shift represents the starting position of the selected reference pixel. Here, when the middle position of the left or top edge of the current block is between two points, if the first pixel slightly to the right of the middle position is taken as the midpoint of the edge, then the starting position shift = Δ / 2; if the first pixel slightly to the left of the middle position is taken as the midpoint of the edge, then the starting position shift = Δ / 2 - 1.

[0110] For example, with Figure 4 Taking the top side as an example, length equals 8 and N2 equals 4. Assuming that the left side and the top side are each half, that is, the preset sampling number of the top side is 2, then according to equations (1) and (2), we can calculate Δ = length / (N2 / 2) = 4 and shift = Δ / 2 = 2 respectively. That is, with 1 as the starting point and 4 as the sampling interval, we can first determine the position of the reference pixel to be selected, such as 1 and 5, and then select the corresponding reference pixel to form a subset of adjacent reference pixels. Here, it should be noted that the preset sampling number corresponding to the left side and the preset sampling number corresponding to the top side can be the same or different. This application embodiment does not make specific limitations.

[0111] It should also be noted that the first sampling interval corresponding to the edge can be calculated based on the preset number of candidate pixels and the length of one edge of the current block. Furthermore, since the length of the left or top edge of the current block is always a multiple of 2, the middle position of the left or top edge of the current block is between two points. In this case, the calculated midpoint value is non-integer, and the calculated reference pixel position is also non-integer. However, if the length of the left or top edge of the current block is not a multiple of 2, the middle position of the left or top edge of the current block will not be between two points. In this case, the calculated midpoint value is an integer, and the calculated reference pixel position is also an integer. That is, the calculated midpoint value can be an integer or a non-integer; correspondingly, the calculated reference pixel position can also be an integer or a non-integer. This application embodiment does not impose specific limitations.

[0112] Thus, when the calculated midpoint value is an integer, the calculated reference pixel position is also an integer, and the calculated reference pixel position can be directly used as a candidate position; when the calculated midpoint value is not an integer, the calculated reference pixel position is also not an integer, and the candidate position can be determined by rounding up or down.

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

[0114] The first sampling interval is adjusted to obtain the second sampling interval;

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

[0116] It should be noted that after the first sampling interval is calculated, it can be fine-tuned, such as by adding or subtracting 1, to obtain the second sampling interval. For example, if the first sampling interval is 4, the adjusted second sampling interval can be 3 or 5. In this embodiment, the adjustment of the first sampling interval can be made by a small amount (e.g., adding or subtracting 1), but the specific setting of the adjustment range is not specifically limited in this embodiment.

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

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

[0119] In other words, once the reference point of at least one edge of the current block is determined, uniform sampling can be performed according to the first sampling interval or the second sampling interval; non-uniform sampling can also be performed according to the first sampling interval and the second sampling interval. Moreover, 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 this application do not make specific limitations.

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

[0121] Table 1

[0122] The side length of at least one edge 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] Furthermore, for the filtering of adjacent parameter pixels, a skipping process can be performed on the reference pixels of at least one edge, that is, skipping unimportant or abnormal reference pixels (which can also be regarded as deletion), thereby obtaining a subset of adjacent reference pixels; or, based on this, after skipping some reference pixels of at least one edge, the remaining reference pixels can be filtered to obtain a subset of adjacent reference pixels. Therefore, in some embodiments, determining the candidate position of the candidate pixel based on at least one edge of the current block may include:

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

[0125] Starting from the start and / or end position of at least one edge 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, start from the start position and / or end position of at least one edge of the current block and skip K pixels to be skipped consecutively to obtain at least one new edge of the current block;

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

[0128] It should be noted that the preset number of skipped pixels refers to the pre-set number of pixels to be deleted or skipped. In addition, the starting position of at least one edge indicates the leftmost edge of the top edge of the current block or the topmost edge of the left edge of the current block, and the ending position of at least one edge indicates the rightmost edge of the top edge of the current block or the bottommost edge of the left edge of the current block.

[0129] It should also be noted that the value of K can be a pre-set number of reference pixels, such as 1, 2, or 4; or it can be calculated based on the side length of the current block and its corresponding preset ratio. However, in practical applications, it is still set according to the actual situation, and this application embodiment does not impose specific limitations. The preset ratio corresponding to the top edge of the current block can be represented by a first preset ratio, and the preset ratio corresponding to the left edge 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 this application embodiment does not impose specific limitations.

[0130] Thus, assuming starting from the beginning position of at least one edge, if at least one edge is the top edge of the current block (also known as the reference row of the current block), then the positions of K pixels to be skipped can be determined starting from the leftmost edge of at least one edge; if at least one edge is the left edge of the current block (also known as the reference column of the current block), then the positions of K pixels to be skipped can be determined starting from the top edge of at least one edge; assuming starting from the end position of at least one edge, if at least one edge is the top edge of the current block, then the positions of K pixels to be skipped can be determined starting from the rightmost edge of at least one edge; if at least one edge is the left edge of the current block, then the positions of K pixels to be skipped can be determined starting from the bottom edge of at least one edge. In practical applications, the settings are made according to the actual situation, and this application embodiment does not impose specific limitations.

[0131] After determining the positions of K pixels to be skipped, assuming starting from the beginning of at least one edge, if at least one edge is the top edge of the current block, then starting from the leftmost edge of that top edge, determine the positions of K consecutive pixels to be skipped to the right, and then skip these K pixels consecutively to obtain a new top edge. At this point, based on the length of the new top edge and the preset number of candidate pixels, determine the candidate positions corresponding to the new top edge, thus forming a subset of adjacent reference pixels. If at least one edge is the left edge of the current block, then starting from the top edge of that left edge, determine the positions of K consecutive pixels to be skipped downwards, and then skip these K pixels consecutively to obtain a new left edge. At this point, based on the length of the new left edge and the preset number of candidate pixels, determine the candidate positions corresponding to the new left edge, thus forming a subset of adjacent reference pixels. Alternatively, assuming starting from the end of at least one edge, if at least one edge is the top edge of the current block, then starting from the rightmost edge of that top edge, determine the positions corresponding to K consecutive pixels to be skipped to the left, and then skip these K pixels consecutively to obtain a new top edge. At this point, based on the length of the new top edge and the preset number of candidate pixels, determine the candidate positions corresponding to the new top edge, and thus form a subset of adjacent reference pixels. If at least one edge is the left edge of the current block, then starting from the bottom edge of that left edge, determine the positions corresponding to K consecutive pixels to be skipped upwards, and then skip these K pixels consecutively to obtain a new left edge. At this point, based on the length of the new left edge and the preset number of candidate pixels, determine the candidate positions corresponding to the new left edge, and thus form a subset of adjacent reference pixels.

[0132] Thus, in this embodiment, a subset of pixels (i.e., a subset of adjacent reference pixels) obtained from the adjacent reference pixels of the current block are used to derive the model parameters corresponding to complex models (such as nonlinear models or multiple models). Since unimportant or anomalous reference pixels have been removed from the obtained subset (i.e., the subset of adjacent reference pixels), the number of reference pixels is reduced. This not only reduces computational complexity and memory bandwidth but also improves the accuracy of complex models, thereby achieving the goal of improving the prediction accuracy of the image components to be processed and the prediction efficiency of video images.

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

[0134] Based on the aforementioned adjacent reference pixel subsets, construct N first adjacent reference pixel subsets;

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

[0136] Further, constructing N first neighboring reference pixel subsets based on the neighboring reference pixel subsets may include:

[0137] Based on the adjacent subset of reference pixels, at least one threshold is determined;

[0138] Based on the at least one threshold, the adjacent reference pixel subset is divided into the N first adjacent reference pixel subsets.

[0139] It should be noted that the threshold is used as the basis for classifying reference pixels contained in the adjacent reference pixel subset, and it is also the basis for classifying the first image component reconstruction value of the current block. In addition, the threshold is also used to indicate the setting value on which multiple prediction sub-models are based, and the value of the threshold is related to the first image component reconstruction values ​​corresponding to all pixels in the current block.

[0140] Specifically, the threshold value can be obtained by calculating the average value of the first image component reconstruction values ​​corresponding to all pixels in the current block, or by calculating the median value of the first image component reconstruction values ​​of all pixels in the current block. This application embodiment does not make specific limitations.

[0141] In this embodiment of the application, firstly, the mean value (Mean) can be calculated based on the reconstructed values ​​of the first image components corresponding to all pixels in the current block and equation (3):

[0142]

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

[0144] Secondly, the calculated mean is directly used as the threshold. This threshold can be used to divide the second reference pixel set into two groups, thereby establishing two prediction sub-models. However, the embodiments of this application are not limited to establishing only two prediction sub-models.

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

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

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

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

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

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

[0151] The reconstructed value of the first image component corresponding to each pixel in the current block is compared with the at least one threshold.

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

[0153] It should be noted that grouping adjacent reference pixel subsets according to at least one threshold can yield at least two sets of reference pixel subsets, from which at least two sets of model parameters can be determined. Specifically, the mean (Mean) can be directly used as the threshold. Then, the adjacent reference values ​​of the first image component corresponding to each reference pixel in the adjacent reference pixel subsets are compared with the Mean. For example, reference pixels whose adjacent reference values ​​of the first image component are greater than the Mean form the first reference pixel subset, and reference pixels whose adjacent reference values ​​of the first image component are not greater than the Mean form the second reference pixel subset, thus obtaining two sets of reference pixel subsets. Based on the reference pixels in the first reference pixel subset, the first set of model parameters α1 and β1 are determined; and based on the reference pixels in the second reference pixel subset, 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 be compared with at least one threshold. Based on the comparison result, the prediction sub-model corresponding to each pixel is selected from the at least two prediction sub-models. Then, the image component to be predicted is predicted according to the selected prediction sub-model to obtain the predicted value of the image component to be predicted.

[0155] For example, assume that the neighboring reference value of the first image component corresponding to the reference pixel adjacent to the current block is represented by L(n), the neighboring 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; Figure 6 As shown, it illustrates a grouping diagram of adjacent reference pixels in the current block provided by an embodiment of this application. Figure 6 In this approach, using a threshold as a dividing point, all adjacent reference pixels in the current block can be divided into two parts, such as a first reference pixel subset and a second reference pixel subset. The mean of the reconstructed first image component values ​​(Mean) of all pixels in the current block is used as the threshold, i.e., Threshold = Mean. Thus, if L(n) ≤ Threshold, the reference pixels corresponding to L(n) can be identified as the first reference pixel subset, resulting in the first image component adjacent reference value L(m) and the second image component adjacent reference value C(m) for all reference pixels in the first reference pixel subset. If L(n) > Threshold, the reference pixels corresponding to L(n) can be identified as the second reference pixel subset, resulting in the first image component adjacent reference value L(k) and the second image component adjacent reference value C(k) for all reference pixels in the second reference pixel subset.

[0156] Thus, after obtaining the first image component neighbor reference value L(m) and the second image component neighbor reference value C(m) corresponding to all reference pixels in the first reference pixel subset, they can be used as a separate training set to train the first set of model parameters α1 and β1; after obtaining the first image component neighbor reference value L(k) and the second image component neighbor reference value C(k) corresponding to all reference pixels in the second reference pixel subset, they can also be used as a separate training set to train the second set of model parameters α2 and β2; specifically, the first set of model parameters α1 and β1 are calculated according to L(m), C(m) and equation (4), as shown below.

[0157]

[0158] Based on 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, the first prediction sub-model Pred can be established according to equation (6). 1C [i,j] and the second prediction sub-model Pred 2C [i,j], as shown below.

[0161]

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

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

[0164] Thus, pixel m can use the prediction model shown in equation (7) to obtain the chromaticity prediction value.

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

[0166] Where α1 and β1 are a set of model parameters, Y m C' is the reconstructed brightness value corresponding to pixel m. m It is the predicted chromaticity value corresponding to pixel m.

[0167] The chromaticity prediction value of pixel n can be obtained using the prediction model shown in equation (8).

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

[0169] Where α2 and β2 are a set of model parameters, Y n C' is the reconstructed brightness value corresponding to pixel n. n It is the predicted chromaticity value corresponding to pixel n.

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

[0171] This embodiment provides an image component prediction method, and elaborates on the specific implementation of the aforementioned embodiments. As can be seen from the technical solutions of the aforementioned embodiments, by filtering the adjacent reference pixels of the current block, unimportant reference pixels or reference pixels with abnormalities can be removed, thereby reducing the number of samples required for model parameter derivation in cross-component prediction. This not only reduces computational complexity and memory bandwidth, but also optimizes the prediction model and improves its accuracy. In addition, this application mainly optimizes the derivation process of model parameters in complex models (nonlinear models or multiple models), and uses at least two prediction sub-models to realize the prediction processing of the image components to be predicted, thereby improving the prediction accuracy of the image components to be predicted and improving the prediction efficiency of video images.

[0172] See Figure 7 This illustrates a flowchart of another image component prediction method provided in an embodiment of this application. Figure 7 As shown, the method may include:

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

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

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

[0176] It should be noted that a video image can be divided into multiple image blocks, and each image block to be encoded can be called a coding block. Each coding block may include a first image component, a second image component, and a third image component; the current block is the coding block in the video image for which the prediction of the first, second, or third image component is currently needed. Specifically, when the prediction model needs to predict the first image component, the image component to be predicted is the first image component; when the prediction model needs to predict the second image component, the image component to be predicted is the second image component; and when the prediction model needs to predict the third image component, the image component to be predicted is the third image component. In this embodiment, the image component to be predicted is described using the second image component as an example. The prediction model can 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.

[0177] It should also be noted that the prediction model can be a nonlinear model or a complex model. Complex models can be nonlinear models of a quadratic curve or other nonlinear forms, or multiple models composed of several linear models. For complex models, since some unimportant reference pixels (e.g., those with poor correlation) or anomalous reference pixels may exist among the adjacent reference pixels of the current block, these reference pixels need to be removed to ensure the accuracy of the model parameter derivation. This creates a subset of reference pixels, and the model parameters determined based on this subset are more accurate, improving not only the precision of the complex model but also the prediction accuracy of the image components being processed.

[0178] This embodiment provides an image component prediction method. It determines a first set of reference pixels for a first image component of a current block in an image, wherein the first set of reference pixels includes pixels adjacent to the current block. Using the first set of reference pixels, N subsets of first reference pixels are constructed, each subset containing some pixels from the first set of reference pixels, where N equals the number of prediction models. Then, using the N subsets of first reference pixels, model parameters for each of the N prediction models are calculated. Each prediction model maps the value of the first image component of the current block to the predicted value of a second image component of the current block, where the second image component is different from the first image component. By filtering the adjacent reference pixels of the current block, unimportant or anomalous reference pixels can be removed, thereby reducing the number of pixels in the adjacent reference pixel set and resulting in fewer pixels in the adjacent reference pixel subsets. This not only reduces computational complexity and memory bandwidth but also improves the accuracy of the prediction models. Furthermore, 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 improved, thus increasing the prediction efficiency of video images.

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

[0180] Based on the first set of reference pixels, at least one threshold is determined;

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

[0182] It should be noted that 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 reference pixels contained in the adjacent reference pixel subset, and it is also the basis for classifying the first image component reconstruction value of the current block. Furthermore, the threshold is also used to indicate the set value on which multiple prediction sub-models are based; the value of the threshold is related to the first image component reconstruction values ​​corresponding to all pixels in the current block. Specifically, the value of the threshold can be obtained by calculating the average value of the first image component reconstruction values ​​corresponding to all pixels in the current block, or by calculating the median value of the first image component reconstruction values ​​of all pixels in the current block; this embodiment does not impose a specific limitation.

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

[0185] The first reference pixel set is obtained based on some or all of the pixels on the edges of the current block; wherein the edges of the current block include at least one of the following: upper adjacent row, upper right adjacent row, left adjacent column and 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: top row (also called top side edge), top right row (also called top right side edge), left column (also called left side edge), or bottom left column (also called bottom left side edge). The first reference pixel set can be formed based on some or all of the pixels on these edges.

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

[0188] On the edge of the current block, determine the candidate position of the candidate pixel;

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

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

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

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

[0193] The candidate position is determined based on 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] The candidate position is determined based on 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 image component intensity of a pixel, such as luminance value and chrominance value; 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 this application embodiment can be selected through the candidate positions of candidate pixels. The candidate positions can be determined based on pixel positions, first image component values ​​(such as luminance values, chrominance values, etc.), or a combination of pixel positions and first image component values. This application embodiment does not impose specific limitations. In other words, some reference pixels selected in this application embodiment can be selected based on the pixel positions corresponding to the reference pixels, or based on the image component intensity values ​​(such as luminance values, chrominance values, etc.) corresponding to the reference pixels. Whether selecting suitable reference pixels by filtering adjacent reference pixels based on the pixel positions or the image component intensity values ​​corresponding to the reference pixels, a first reference pixel set is formed. Thus, 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, making the prediction model constructed based on these model parameters more precise.

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

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

[0200] The candidate position is determined based on the preset number of pixels and the length of the edge of the current block; wherein 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 candidate pixel count represents the number of pixels to be sampled in advance, that is, the number of pixels contained in the adjacent reference pixel subset. Taking pixel position as an example, after determining the preset candidate pixel count, the candidate position of the candidate pixel can be calculated based on the side length of at least one side and the preset candidate pixel count; then, based on the candidate position, suitable reference pixels are selected from the adjacent reference pixels to form the adjacent reference pixel subset.

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

[0203] The first sampling interval is calculated based on the length of the edge of the current block and the preset number of candidate pixels.

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

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

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

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

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

[0209] It should also be noted that after the first sampling interval is calculated, it can be fine-tuned, such as by adding or subtracting 1 to obtain the second sampling interval. For example, if the first sampling interval is 4, the adjusted second sampling interval can be 3 or 5. In this embodiment, the adjustment of the first sampling interval can be made by a small amount (e.g., adding or subtracting 1), but the specific setting of the adjustment range is not specifically limited in this embodiment.

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

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

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

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

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

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

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

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

[0218] It should be noted that after determining the reference point of at least one edge of the current block, uniform sampling can be performed according to the first sampling interval or the second sampling interval; non-uniform sampling can also be performed according to the first sampling interval and the second sampling interval. Moreover, 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 this application do not make specific limitations.

[0219] Furthermore, for the filtering of adjacent parameter pixels, at least one edge's reference pixels can be skipped, that is, unimportant or abnormal reference pixels are skipped (which can also be regarded as deletion), thereby obtaining a subset of adjacent reference pixels; or, based on this, after skipping some reference pixels of at least one edge, the remaining reference pixels are filtered to obtain a subset of adjacent reference pixels. Therefore, in some embodiments, the method may further include:

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

[0221] Starting from the end position of the edge of the current block, the position of the Kth pixel is set as the reference point; wherein, the end position of the edge of the current block is the beginning 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 refers to the pre-set number of pixels to be deleted or skipped. In addition, the starting position of at least one edge indicates the leftmost edge of the top edge of the current block or the topmost edge of the left edge of the current block, and the ending position of at least one edge indicates the rightmost edge of the top edge of the current block or the bottommost edge of the left edge of the current block.

[0223] It should also be noted that the value of K can be a pre-set number of reference pixels, such as 1, 2, or 4; or it can be calculated based on the side length of the current block and its corresponding preset ratio. However, in practical applications, it is still set according to the actual situation, and this application embodiment does not impose specific limitations. The preset ratio corresponding to the top edge of the current block can be represented by a first preset ratio, and the preset ratio corresponding to the left edge 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 this application embodiment does not impose specific limitations.

[0224] Further, after determining the N first reference pixel subsets, model parameters of the prediction model can be calculated based on the N first reference pixel subsets to construct the prediction model; wherein the prediction model may include N prediction sub-models, where N is a positive integer greater than or equal to 2. Therefore, in some embodiments, after calculating the model parameters of the N prediction models 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 pixel in the current block;

[0226] Select one 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 pixel in the current block, the predicted value of the second image component corresponding to the pixel in the current block is calculated.

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

[0229] The reconstructed value of the first image component corresponding to the pixel in the current block is compared with the at least one threshold.

[0230] Based on the comparison results, the prediction model used by the pixels in the current block is selected from the N prediction models.

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

[0232] It should also be noted that the prediction model can be a nonlinear model or a complex model. A complex model can be a nonlinear model of a quadratic curve or other nonlinear form, or a multi-model composed of multiple linear models. Thus, for complex models, since unimportant or anomalous reference pixels have been removed from the adjacent reference pixel subsets, the N sets of model parameters determined based on the adjacent reference pixel subsets are more accurate, thereby improving the accuracy of the complex model and enhancing the prediction accuracy of the image components to be processed.

[0233] In addition, in this embodiment, when the image component prediction method is applied to the encoder side, a subset of adjacent reference pixels can be constructed based on adjacent reference pixels, and then the model parameters of the prediction model can be calculated based on the subset of adjacent reference pixels. The calculated model parameters are then written into the bitstream. The bitstream is transmitted from the encoder side to the decoder side. Correspondingly, when the image component prediction method is applied to the decoder side, the model parameters of the prediction model can be directly obtained by parsing the bitstream. Alternatively, on the decoder side, a subset of adjacent reference pixels can be constructed based on adjacent reference pixels, and then the model parameters of the prediction model can be calculated based on the subset of adjacent reference pixels to construct a prediction model. The prediction model is then 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, and elaborates on the specific implementation of the aforementioned embodiments. As can be seen from the technical solutions of the aforementioned embodiments, by filtering the adjacent reference pixels of the current block, unimportant or abnormal reference pixels can be removed, thereby reducing the number of pixels in the adjacent reference pixel set. This results in a smaller number of pixels in the adjacent reference pixel subset, which not only reduces computational complexity and memory bandwidth, but also improves the accuracy of the prediction model. In addition, by performing cross-component prediction processing on the image components to be processed through at least two prediction sub-models, the prediction accuracy of the image components to be processed is further improved, while also increasing the prediction efficiency of video images.

[0235] Based on the same inventive concept as the foregoing embodiments, see [link to previous document]. Figure 8This diagram illustrates the structural composition of an encoder 80 according to an embodiment of this application. The encoder 80 may include: a first determining unit 801, a first constructing unit 802, and a first calculating unit 803, wherein...

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

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

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

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

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

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

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

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

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

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

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

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

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

[0249] In the above scheme, see [reference] 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 determining unit 801 is further configured to determine the candidate position based on the reference point and according to the second sampling interval.

[0251] In the above scheme, the first determining unit 801 is further configured to 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.

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

[0253] In the above scheme, the first construction unit 802 is configured to construct N first adjacent reference pixel subsets based on 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 scheme, see [reference] Figure 8 The encoder 80 may further include a first partitioning unit 807, wherein,

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

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

[0258] In the above scheme, the first determining 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 one prediction sub-model from the N prediction sub-models;

[0260] The first calculation unit 803 is further configured to calculate the predicted value of the second image component corresponding to each pixel in the current block based on 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.

[0261] In the above scheme, see [reference] Figure 8 The encoder 80 may further include a first comparison unit 808, configured to compare the reconstructed value of a first image component 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, based on the comparison result, the prediction sub-model corresponding to each pixel in the current block from the N prediction sub-models.

[0263] Understandably, in the embodiments of this application, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and can also be a module or a non-modular one. Furthermore, the components in this embodiment can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit described above can be implemented in hardware or as a software functional module.

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

[0265] Therefore, embodiments of this application provide a computer storage medium storing an image component prediction program, which, when executed by at least one processor, implements the method described in any of the foregoing embodiments.

[0266] Based on the composition of the encoder 80 and the computer storage medium described above, see [link to documentation]. Figure 9 This illustrates a specific hardware structure example of the encoder 80 provided in this application embodiment, which may include: a first communication interface 901, a first memory 902, and a first processor 903; the various components are coupled together through a first bus system 904. It is understood that the first bus system 904 is used to implement the connection and communication between these components. In addition to a data bus, the first bus system 904 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 9 The general designated all buses 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 sending and receiving information with other external network elements;

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

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

[0270] Determine the neighboring reference pixels of the current block in the image;

[0271] Based on the adjacent reference pixels, a subset of adjacent reference pixels is constructed; wherein, the subset of adjacent reference pixels includes some pixels among the adjacent reference pixels;

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

[0273] It is understood that the first memory 902 in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be 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 DRAM (SDRAM), Double Data Rate Synchronous DRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The first memory 902 of the system and method described in this application is intended to include, but is not limited to, these and any other suitable types of memory.

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

[0275] It is understood that the embodiments described in this 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), DSP 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 this application, or combinations thereof. For software implementation, the technology described in this application can be implemented through modules (e.g., procedures, functions, etc.) that perform the functions described in this application. Software code can be stored in memory and executed by a processor. The memory can be implemented in the processor or external to the processor.

[0276] Alternatively, as another embodiment, the first processor 903 is further configured to perform the method described in any of the foregoing embodiments when running the computer program.

[0277] This embodiment provides an encoder, which may include a first determining unit, a first constructing unit, and a first calculating unit. The first determining unit is configured to determine the neighboring reference pixels of the current block in an image. The first constructing unit is configured to construct a subset of neighboring reference pixels based on the neighboring reference pixels. The subset of neighboring reference pixels includes some pixels from the neighboring reference pixels. The first calculating unit is configured to calculate model parameters of a prediction model based on the subset of neighboring reference pixels. The prediction model includes N prediction sub-models, each corresponding to N sets of model parameters. The prediction sub-models are used to perform cross-component prediction processing on the image components to be predicted using their corresponding model parameters. N is a positive integer greater than or equal to 2. This reduces the number of pixels in the set of neighboring reference pixels, resulting in a smaller number of pixels in the subset of neighboring reference pixels. This not only reduces 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, see [link to previous document]. Figure 10 This illustration shows a schematic diagram of the composition structure of a decoder 100 provided in an embodiment of this application. The decoder 100 may include: a second determining unit 1001, a second constructing unit 1002, and a second computing unit 1003, wherein...

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

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

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

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

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

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

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

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

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

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

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

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

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

[0292] In the above scheme, see [reference] 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 determining unit 1001 is further configured to determine the candidate position based on the reference point and according to the second sampling interval.

[0294] In the above scheme, the second determining unit 1001 is further configured to 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.

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

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

[0297] The second calculation unit 1003 is configured to calculate N 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.

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

[0299] The second determining unit 1001 is further configured to determine at least one threshold based on 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 scheme, the second determining 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 sub-model from the N prediction sub-models;

[0303] The second calculation unit 1003 is further configured to calculate the predicted value of the second image component corresponding to each pixel in the current block based on the selected prediction sub-model and the reconstruction 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 scheme, see [reference] 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, based on the comparison result, the prediction sub-model corresponding to each pixel in the current block from the N prediction sub-models.

[0306] Understandably, in this embodiment, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and can also be a module or a non-modular component. Furthermore, the components in this embodiment can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional module.

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

[0308] Based on the composition of the decoder 100 and the computer storage medium described above, see [link to documentation]. Figure 11 This illustrates the specific hardware structure of the decoder 100 provided in this embodiment, which may include: a second communication interface 1101, a second memory 1102, and a second processor 1103; the various components are coupled together through a second bus system 1104. It is understood that the second bus system 1104 is used to implement communication between these components. In addition to a data bus, the second bus system 1104 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 11 The various buses are all 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 sending and receiving information with other external network elements;

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

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

[0312] Determine the neighboring reference pixels of the current block in the image;

[0313] Based on the adjacent reference pixels, a subset of adjacent reference pixels is constructed; wherein, the subset of adjacent reference pixels includes some pixels among the adjacent reference pixels;

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

[0315] Alternatively, as another embodiment, the second processor 1103 is also configured to perform the method described in any of the foregoing embodiments when running the computer program.

[0316] It is understood that the second memory 1102 has similar hardware functions to the first memory 902, and the second processor 1103 has similar hardware functions to the first processor 903; these will not be described in detail here.

[0317] This embodiment provides a decoder, which may include a second determining unit, a second constructing unit, and a second computing unit. The second determining unit is configured to determine the neighboring reference pixels of the current block in the image. The second constructing unit is configured to construct a subset of neighboring reference pixels based on the neighboring reference pixels. The subset of neighboring reference pixels includes some pixels from the neighboring reference pixels. The second computing unit is configured to calculate model parameters of a prediction model based on the subset of neighboring reference pixels. The prediction model includes N prediction sub-models, each corresponding to N sets of model parameters. The prediction sub-models are used to perform cross-component prediction processing on the image components to be predicted using their corresponding model parameters. N is a positive integer greater than or equal to 2. This reduces the number of pixels in the set of neighboring reference pixels, resulting in a smaller number of pixels in the subset of neighboring reference pixels. This not only reduces 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 "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0319] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

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

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

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

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

[0324] Industrial applicability

[0325] In this embodiment, the adjacent reference pixels of the current block in the image are first determined; then, a subset of adjacent reference pixels is constructed based on the adjacent reference pixels; wherein, the subset of adjacent reference pixels contains some pixels from the adjacent reference pixels; then, the model parameters of the prediction model are calculated based on the subset of adjacent reference pixels; wherein, the prediction model includes N prediction sub-models, the N prediction sub-models correspond to N sets of model parameters, and the prediction sub-models are used to perform cross-component prediction processing on the image components to be predicted using the corresponding model parameters, where N is a positive integer greater than or equal to 2; thus, by filtering the adjacent reference pixels of the current block, unimportant reference pixels or reference pixels with abnormalities can be removed, thereby reducing the number of pixels in the set of adjacent reference pixels, resulting in a smaller number of pixels in the subset of adjacent reference pixels, which not only reduces computational complexity and memory bandwidth, but also improves the accuracy of the prediction model; in addition, by performing cross-component prediction processing on the image components to be processed using at least two prediction sub-models, the prediction accuracy of the image components to be processed is also improved, while the prediction efficiency of video images is also improved.

Claims

1. An image component prediction method, applied to an encoder, characterized in that, The method includes: Determine the neighboring reference samples of the current block in the image; Based on the adjacent reference samples, a subset of adjacent reference samples is constructed; wherein, the subset of adjacent reference samples contains some samples from the adjacent reference samples; The adjacent reference sample subset is divided into N first adjacent reference sample subsets; based on the N first adjacent reference sample subsets, N sets of model parameters corresponding to the N prediction sub-models included in the prediction model are calculated; each prediction sub-model corresponds to a set of model parameters; N is a positive integer greater than or equal to 2; wherein, the prediction sub-model is used to perform cross-component prediction processing on the image components to be predicted through the corresponding model parameters; the prediction model includes a nonlinear model or a complex model, and the complex model includes a multi-model composed of multiple linear models; Wherein, constructing a subset of adjacent reference samples based on the adjacent reference samples includes: Based on at least one edge of the current block, determine the candidate position of the candidate sample; Select a reference sample corresponding to the candidate position from the adjacent reference samples, and form the adjacent reference sample subset by the selected reference samples; Wherein, determining the candidate position of the candidate sample based on at least one edge of the current block includes: The first sampling interval is calculated based on the preset number of candidate samples and the length of at least one edge of the current block; A starting point position is determined from at least one edge of the current block, and the candidate position is determined based on the starting point position according to the first sampling interval.

2. The method according to claim 1, characterized in that, The process of determining the neighboring reference samples of the current block in the image includes: Obtain a reference sample that is adjacent to at least one edge of the current block; wherein at least one edge of the current block includes at least one of the following: top edge, top right edge, left edge, and bottom left edge; Based on the obtained reference samples, the adjacent reference samples of the current block are obtained.

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

4. The method according to claim 1, characterized in that, Determining the candidate position of the candidate sample based on at least one edge of the current block includes: The candidate position is determined based on the image component intensity value corresponding to the reference sample adjacent to at least one edge of the current block.

5. The method according to claim 1, characterized in that, Determining the candidate position of the candidate sample based on at least one edge of the current block includes: The candidate position is determined based on the sample position and image component intensity value corresponding to the reference sample adjacent to at least one edge of the current block.

6. The method according to claim 1, characterized in that, The candidate positions of the candidate samples are determined according to the following formula: in, Indicates the sampling interval. length This indicates the number of reference sample points in a row adjacent to the top edge of the current block, or the number of reference sample points in a column adjacent to the left edge of the current block. N 2 represents the number of reference sample points that the current block is expected to constitute the adjacent reference sample subset. shift This indicates the starting point position for selecting the reference sample point.

7. An image component prediction method, applied to a decoder, characterized in that, The method includes: Determine the neighboring reference samples of the current block in the image; Based on the adjacent reference samples, a subset of adjacent reference samples is constructed; wherein, the subset of adjacent reference samples contains some samples from the adjacent reference samples; The adjacent reference sample subset is divided into N first adjacent reference sample subsets; based on the N first adjacent reference sample subsets, N sets of model parameters corresponding to the N prediction sub-models included in the prediction model are calculated; each prediction sub-model corresponds to a set of model parameters; N is a positive integer greater than or equal to 2; wherein, the prediction sub-model is used to perform cross-component prediction processing on the image components to be predicted through the corresponding model parameters; the prediction model includes a nonlinear model or a complex model, and the complex model includes a multi-model composed of multiple linear models; Wherein, constructing a subset of adjacent reference samples based on the adjacent reference samples includes: Based on at least one edge of the current block, determine the candidate position of the candidate sample; Select a reference sample corresponding to the candidate position from the adjacent reference samples, and form the adjacent reference sample subset by the selected reference samples; Wherein, determining the candidate position of the candidate sample based on at least one edge of the current block includes: The first sampling interval is calculated based on the preset number of candidate samples and the length of at least one edge of the current block; A starting point position is determined from at least one edge of the current block, and the candidate position is determined based on the starting point position according to the first sampling interval.

8. The method according to claim 7, characterized in that, The process of determining the neighboring reference samples of the current block in the image includes: Obtain a reference sample that is adjacent to at least one edge of the current block; wherein at least one edge of the current block includes at least one of the following: top edge, top right edge, left edge, and bottom left edge; Based on the obtained reference samples, the adjacent reference samples of the current block are obtained.

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

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

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

12. The method according to claim 7, wherein, The candidate positions of the candidate samples are determined according to the following formula: in, Indicates the sampling interval. length This indicates the number of reference sample points in a row adjacent to the top edge of the current block, or the number of reference sample points in a column adjacent to the left edge of the current block. N 2 represents the number of reference sample points that the current block is expected to constitute the adjacent reference sample subset. shift This indicates the starting point position for selecting the reference sample point.

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

14. A decoder, the decoder comprising a second memory and a second processor, wherein: The second memory is used to store computer programs that can run on the second processor; The second processor is configured to perform the method as described in 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 as described in any one of claims 1 to 6 and outputs a bitstream.

16. A method for transmitting a code stream, characterized in that, Generate a bitstream by performing the method as described in any one of claims 1 to 6; and transmit the bitstream.