Image component prediction method and apparatus, and computer storage medium
By optimizing the derivation of model parameters, adjacent reference pixels of the coded block in the video image are obtained, and a more accurate prediction model is constructed. This solves the problem of inaccurate models in the existing technology and improves the encoding and decoding performance of video images.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
- Filing Date
- 2019-06-25
- Publication Date
- 2026-06-26
AI Technical Summary
In image component prediction of the H.266/VVC video coding standard, existing technologies suffer from inaccurate prediction models due to unreasonable selection of adjacent reference pixels, which reduces the encoding and decoding prediction performance of video images.
By optimizing the model parameter derivation process, N adjacent reference pixels of the coded block in the video image are obtained, the image component values of these points are compared, the first and second reference pixel subsets are determined, the mean point is calculated, and the model parameters are determined based on the fitted points to build a more accurate prediction model.
It improves the robustness of image component prediction and the encoding/decoding performance of video images, ensuring the accuracy of the prediction model under different distribution conditions.
Smart Images

Figure CN119520818B_ABST
Abstract
Description
[0001] Case Analysis
[0002] This application is a divisional application of the patent application filed on June 25, 2019, with application number 201980084801.1 and entitled "Image Component Prediction Method, Apparatus and Computer Storage Medium". Technical Field
[0003] This application relates to the field of video encoding and decoding technology, and in particular to an image component prediction method, apparatus, and computer 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 (CB). However, during the construction of the prediction model, the selection of neighboring reference pixels used for model parameter derivation is unreasonable, leading to inaccurate prediction models and reducing the encoding and decoding prediction performance of video images. Summary of the Invention
[0006] This application provides an image component prediction method, apparatus, and computer storage medium. By optimizing the fitting points used in the derivation of model parameters, the robustness of the prediction is improved, thereby making the constructed prediction model more accurate and improving the encoding and decoding prediction performance of video images.
[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, the method comprising:
[0009] Obtain N neighboring reference pixels corresponding to the image component to be predicted of the coded block in the video image; wherein, the N neighboring reference pixels are reference pixels adjacent to the coded block, and N is a preset integer value;
[0010] By comparing the N first image component values corresponding to the N adjacent reference pixels, a first reference pixel subset and a second reference pixel subset are determined; wherein, a preset number of adjacent reference pixels correspond to a preset number of first image component values, the first reference pixel subset includes: two adjacent reference pixels corresponding to the smallest and second smallest first image component values among the preset number of first image component values, and the second reference pixel subset includes: two adjacent reference pixels corresponding to the largest and second largest first image component values among the preset number of first image component values;
[0011] Calculate the mean value of the N adjacent reference pixels to obtain the first mean point;
[0012] By comparing the first image component values of the first reference pixel subset and / or the second reference pixel subset using the first mean point, two fitting points are determined.
[0013] Based on the two fitting points, model parameters are determined, and a prediction model corresponding to the image component to be predicted is obtained according to the model parameters; wherein, the prediction model is used to perform prediction processing on the image component to be predicted in order to obtain the predicted value corresponding to the image component to be predicted.
[0014] Secondly, embodiments of this application provide an image component prediction apparatus, which includes: an acquisition unit, a comparison unit, a calculation unit, and a prediction unit, wherein...
[0015] The acquisition unit is configured to acquire N adjacent reference pixels corresponding to the image component to be predicted of the coded block in the video image; wherein, the N adjacent reference pixels are reference pixels adjacent to the coded block, and N is a preset integer value.
[0016] The comparison unit is configured to compare the N first image component values corresponding to the N adjacent reference pixels to determine a first reference pixel subset and a second reference pixel subset; wherein, a preset number of adjacent reference pixels correspond to a preset number of first image component values, the first reference pixel subset includes: two adjacent reference pixels corresponding to the smallest and second smallest first image component values among the preset number of first image component values, and the second reference pixel subset includes: two adjacent reference pixels corresponding to the largest and second largest first image component values among the preset number of first image component values;
[0017] The calculation unit is configured to calculate the mean of the N adjacent reference pixels to obtain a first mean point;
[0018] The comparison unit is further configured to compare the first image component values of the first reference pixel subset and / or the second reference pixel subset using the first mean point to determine two fitting points;
[0019] The prediction unit is configured to determine model parameters based on the two fitting points, and obtain a prediction model corresponding to the image component to be predicted according to the model parameters; wherein, the prediction model is used to perform prediction processing on the image component to be predicted in order to obtain the predicted value corresponding to the image component to be predicted.
[0020] Thirdly, embodiments of this application provide an image component prediction device, the image component prediction device comprising: a memory and a processor;
[0021] The memory is used to store computer programs that can run on the processor;
[0022] The processor is configured to execute the method described in the first aspect when running the computer program.
[0023] Fourthly, 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 the first aspect.
[0024] This application provides an image component prediction method, apparatus, and computer storage medium. First, for the image component to be predicted in a coded block of a video image, N adjacent reference pixels are obtained. Here, N adjacent reference pixels are reference pixels adjacent to the coded block, and N is a preset integer value. Then, the N first image component values corresponding to the N adjacent reference pixels are compared to determine a first reference pixel subset and a second reference pixel subset. The first reference pixel subset includes two adjacent reference pixels corresponding to the smallest and second smallest first image component values among a preset number of first image component values. The second reference pixel subset includes two adjacent reference pixels corresponding to the largest and second largest first image component values among a preset number of first image component values. The process involves: calculating the mean of N adjacent reference pixels to obtain a first mean point; comparing the first image component values of a first subset of reference pixels and / or a second subset of reference pixels using the first mean point to determine two fitting points; determining model parameters based on the two fitting points; obtaining a prediction model corresponding to the image component to be predicted based on the model parameters; and thus obtaining the predicted value corresponding to the image component to be predicted. After the second comparison process, a preset number of adjacent reference pixels can be divided into multiple cases. Different two fitting points are used to construct prediction models for these multiple cases, which can improve the robustness of CCLM prediction. In other words, by optimizing the fitting points used in the derivation of model parameters, the constructed prediction model becomes more accurate, and the encoding and decoding prediction performance of video images is improved. Attached Figure Description
[0025] Figure 1 A schematic diagram of the distribution of effective adjacent areas provided for related technical solutions;
[0026] Figure 2 A schematic diagram illustrating the distribution of the selection area under three modes, providing a basis for related technical solutions;
[0027] Figure 3 A flowchart illustrating the traditional method for deriving model parameters for related technical solutions;
[0028] Figure 4A A schematic diagram of a prediction model under a traditional approach provided for related technical solutions;
[0029] Figure 4B A schematic diagram of a prediction model under another traditional approach provided for the relevant technical solution;
[0030] Figure 5 This application provides a schematic block diagram of a video encoding system.
[0031] Figure 6This application provides a schematic block diagram of a video decoding system according to an embodiment of the present application.
[0032] Figure 7 A flowchart illustrating an image component prediction method provided in an embodiment of this application;
[0033] Figure 8A This application provides a schematic diagram of the structure for selecting adjacent reference pixels in INTRA_LT_CCLM mode.
[0034] Figure 8B This application provides a schematic diagram of the structure for selecting adjacent reference pixels in INTRA_L_CCLM mode.
[0035] Figure 8C This application provides a schematic diagram of the structure for selecting adjacent reference pixels in INTRA_T_CCLM mode.
[0036] Figure 9 A flowchart illustrating another image component prediction method provided in an embodiment of this application;
[0037] Figure 10 A flowchart illustrating a model parameter derivation scheme provided in an embodiment of this application;
[0038] Figure 11 A schematic diagram comparing the prediction model of the present application's solution with that of a traditional solution, provided as an embodiment of this application;
[0039] Figure 12 A schematic diagram comparing the prediction model of another solution provided in this application with that of a traditional solution;
[0040] Figure 13 A schematic diagram comparing another prediction model of this application with a traditional solution, provided for an embodiment of this application;
[0041] Figure 14 This is a schematic diagram of a structure for determining a fitting point, provided in an embodiment of this application.
[0042] Figure 15 This is a schematic diagram of the structure of a prediction model provided in an embodiment of this application;
[0043] Figure 16 This is a schematic diagram of the composition structure of an image component prediction device provided in an embodiment of this application;
[0044] Figure 17 A schematic diagram of the specific hardware structure of an image component prediction device provided in an embodiment of this application;
[0045] Figure 18A schematic diagram of the composition structure of an encoder provided in an embodiment of this application;
[0046] Figure 19 This is a schematic diagram of the composition structure of a decoder provided in an embodiment of this application. Detailed Implementation
[0047] 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.
[0048] In video images, a first image component, a second image component, and a third image component are generally used to represent a coded block. 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.
[0049] 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.
[0050] In current video image or video encoding and decoding processes, cross-component prediction techniques mainly include Cross-component Linear Model Prediction (CCLM) mode and Multi-Directional Linear Model Prediction (MDLM) mode. Regardless of whether the model parameters are derived from CCLM mode or MDLM mode, the corresponding prediction models can achieve prediction between image components such as first image component to second image component, second image component to first image component, first image component to third image component, third image component to first image component, second image component to third image component, or third image component to second image component.
[0051] Taking the prediction from the first image component to the second image component as an example, in order to reduce the redundancy between the first image component and the second image component, the CCLM mode is used in VVC. At this time, the first image component and the second image component are in the same coding block. That is, the predicted value of the second image component is constructed based on the reconstructed value of the first image component in the same coding block, as shown in Equation (1).
[0052] PredC [i,j]=α·Rec L [i,j]+β (1)
[0053] Where i,j represent the position coordinates of a pixel in the coded block, i represents the horizontal direction, j represents the vertical direction, and Pred C [i,j] represents the predicted value of the second image component corresponding to the pixel with position coordinates [i,j] in the coding block. L [i,j] represents the reconstructed value of the first image component corresponding to the pixel with position coordinates [i,j] in the same coding block (after downsampling), and α and β represent the model parameters.
[0054] For a coded block, its adjacent regions can include the left adjacent region, the top adjacent region, the bottom left adjacent region, and the top right adjacent region. In VVC, three cross-component linear model prediction modes can be included: the intra-CCLM mode with left and top adjacent regions (represented by INTRA_LT_CCLM mode), the intra-CCLM mode with left and bottom left adjacent regions (represented by INTRA_L_CCLM mode), and the intra-CCLM mode with top and top right adjacent regions (represented by INTRA_T_CCLM mode). In each of these three modes, a preset number (e.g., 4) of adjacent reference pixels can be selected for the derivation of model parameters α and β. The biggest difference between these three modes lies in the different selection regions corresponding to the adjacent reference pixels used to derive model parameters α and β.
[0055] Specifically, for the coding block size corresponding to the second image component being W×H, it is assumed that the upper selection region corresponding to the adjacent reference pixel is W', and the left selection region corresponding to the adjacent reference pixel is H'; thus...
[0056] For INTRA_LT_CCLM mode, adjacent reference pixels can be selected from the upper adjacent region and the left adjacent region, i.e., W' = W, H' = H;
[0057] For INTRA_L_CCLM mode, adjacent reference pixels can be selected from the left adjacent region and the lower left adjacent region, i.e., H' = W + H, and W' = 0;
[0058] For INTRA_T_CCLM mode, adjacent reference pixels can be selected from the upper adjacent region and the upper right adjacent region, i.e., W' = W + H, and H = 0.
[0059] It's important to note that in the latest VVC reference software, VTM 5.0, only pixels within the range of W are stored in the upper right adjacent region, and pixels within the range of H are stored in the lower left adjacent region. Therefore, although the selection area for INTRA_L_CCLM and INTRA_T_CCLM modes is defined as W+H, in practice, the selection area for INTRA_L_CCLM mode will be limited to H+H, and the selection area for INTRA_T_CCLM mode will be limited to W+W.
[0060] For INTRA_L_CCLM mode, adjacent reference pixels can be selected from the left adjacent region and the lower left adjacent region, H' = min{W+H,H+H};
[0061] For INTRA_T_CCLM mode, adjacent reference pixels can be selected from the upper adjacent region and the upper right adjacent region, W' = min{W+H,W+W}.
[0062] See Figure 1 It illustrates a schematic diagram of the distribution of an effective adjacent area provided by the relevant technical solution. Figure 1 In the middle, the adjacent areas on the left, bottom left, top, and top right are all valid. Figure 1 Based on this, the selection area for the three modes is as follows: Figure 2 As shown. Among them, in Figure 2 In the diagram, (a) represents the selection area for the INTRA_LT_CCLM mode, including the left and upper adjacent regions; (b) represents the selection area for the INTRA_L_CCLM mode, including the left and lower left adjacent regions; and (c) represents the selection area for the INTRA_T_CCLM mode, including the upper and upper right adjacent regions. After determining the selection areas for the three modes, reference points for model parameter derivation can be selected within these areas. These selected reference points are called adjacent reference pixels, and typically, the number of adjacent reference pixels is at most four. Furthermore, for a W×H coded block of a fixed size, the positions of its adjacent reference pixels are generally predetermined.
[0063] After obtaining adjacent reference pixels, based on the number of valid pixels, it is currently done according to... Figure 3 The flowchart shown illustrates the traditional method for deriving model parameters to determine the model parameters. Based on... Figure 3 The illustrated process, assuming the image component to be predicted is a chromaticity component, may include:
[0064] S301: Obtain adjacent reference pixels from the selected area;
[0065] S302: Determine the number of valid pixels among adjacent reference pixels;
[0066] S303: Set the first model parameter to 0 and the second model parameter to the default value;
[0067] S304: Chromaticity prediction values are filled with default values;
[0068] S305: Obtain four valid pixels by "copying";
[0069] S306: After four comparisons, the two pixels with the larger luminance component value and the two pixels with the smaller luminance component value are obtained;
[0070] S307: Calculate the two mean points;
[0071] S308: Use the two mean points as fitting points to derive the parameters of the first and second models;
[0072] S309: Perform chromaticity component prediction processing based on the constructed prediction model.
[0073] It should be noted that when the number of valid pixels is 0, steps S303 and S304 will be executed; when the number of valid pixels is 2, step S305 will be executed, and then steps S306-S309 will be executed sequentially; when the number of valid pixels is 4, steps S306-S309 will be executed sequentially.
[0074] It should also be noted that when there are 0 valid pixels, the predicted values Pred corresponding to the chroma components of all pixels in the current coding block can be used. C The values [i,j] are all filled with the default values for the chroma components; in this embodiment, the default value is the median value of the chroma components. Assuming the bit depth of the chroma components is represented by BitDepthC, the median value can be calculated as 1 << (BitDepthC-1). For example, assuming the current video image is an 8-bit video, the range of the chroma components is 0–255, and the median value is 128; therefore, the preset component value can be 128. Assuming the current video image is a 10-bit video, the range of the chroma components is 0–1023, and the median value is 512; therefore, the preset component value can be 512.
[0075] Understandably, the "two points determine a straight line" principle is used to construct the prediction model; these two points can be called fitting points. In current traditional methods, after obtaining four valid pixels, four comparisons are performed to obtain two adjacent reference pixels with the larger luminance component value and two adjacent reference pixels with the smaller value; then, based on the two adjacent reference pixels with the larger luminance component value, a mean point is calculated (which can be represented by the mean value). max (Represented by) Based on two adjacent reference pixels with the smaller luminance component value, another mean point is calculated (using the mean value). min (represented by), to obtain two mean points. max and mean min Then mean max and mean min Two fitting points are used to derive model parameters (which can be represented by α and β). Finally, a prediction model is constructed based on the model parameters, and the chromaticity component is predicted based on the prediction model.
[0076] In other words, when deriving model parameters, taking four adjacent reference pixels as an example, the mean values obtained from the two larger adjacent reference pixels and the mean values obtained from the two smaller adjacent reference pixels are currently used as two fitting points to derive the model parameters. When these four adjacent reference pixels are relatively evenly distributed, such as... Figure 4A The diagram illustrates the prediction model under the traditional scheme. The horizontal axis represents the luminance value (which can be represented by Luma), and the vertical axis represents the chrominance value (which can be represented by Chroma). Four black dots represent four adjacent reference pixels, and two gray dots represent the mean points of the two larger and two smaller adjacent reference pixels (i.e., two fitting points). The gray diagonal line represents the prediction model constructed based on these two fitting points. The gray dotted line represents the prediction model fitted using the Least Mean Square (LMS) algorithm to these four adjacent reference pixels. Figure 4A As can be seen, the gray diagonal line is quite similar to the gray dotted line, meaning that the prediction model constructed by the traditional scheme can accurately fit the distribution of these four adjacent reference pixels.
[0077] However, when these four adjacent reference pixels are non-uniformly distributed, the prediction model constructed by traditional methods cannot accurately fit the distribution of these four adjacent reference pixels, such as... Figure 4B A schematic diagram of the prediction model under another traditional scheme is shown; from Figure 4BAs can be seen, there is a certain deviation between the gray diagonal line and the gray dotted line, meaning that the prediction model constructed by the traditional method cannot fit the distribution of these four adjacent reference pixels well. In other words, the current traditional method lacks robustness in the derivation of model parameters and cannot fit well when the four adjacent reference pixels are unevenly distributed.
[0078] To improve the robustness of CCLM prediction and enhance encoding / decoding performance, this application provides an image component prediction method. For the image component to be predicted in a coded block of a video image, N adjacent reference pixels are obtained. Here, N adjacent reference pixels are reference pixels adjacent to the coded block, and N is a preset integer value. The N first image component values corresponding to the N adjacent reference pixels are compared to determine a first reference pixel subset and a second reference pixel subset. The first reference pixel subset includes two adjacent reference pixels corresponding to the smallest and second smallest first image component values among a preset number of first image component values. The second reference pixel subset includes two adjacent reference pixels corresponding to the largest and second largest first image component values among a preset number of first image component values. Two adjacent reference pixels are used; the mean of the N adjacent reference pixels is calculated to obtain a first mean point; the first image component values of the first reference pixel subset and / or the second reference pixel subset are compared using the first mean point to determine two fitting points; model parameters are determined based on the two fitting points, and a prediction model corresponding to the image component to be predicted is obtained according to the model parameters to obtain the predicted value corresponding to the image component to be predicted; in this way, after the second comparison process, a preset number of adjacent reference pixels can be divided into multiple cases, and different two fitting points are used to construct the prediction model for these multiple cases, which can improve the robustness of CCLM prediction; that is, by optimizing the fitting points used in the derivation of model parameters, the constructed prediction model is more accurate, and the encoding and decoding prediction performance of video images is improved.
[0079] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0080] See Figure 5 It illustrates an example block diagram of a video encoding system provided in an embodiment of this application; as shown Figure 7As shown, the video coding system 500 includes a transform and quantization unit 501, an intra-frame estimation unit 502, an intra-frame prediction unit 503, a motion compensation unit 504, a motion estimation unit 505, an inverse transform and inverse quantization unit 506, a filter control and analysis unit 507, a filtering unit 508, an encoding unit 509, and a decoded image buffer unit 510. The filtering unit 508 can implement deblocking filtering and Sample Adaptive Offset (SAO) filtering, while the encoding unit 509 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. A video coding block is obtained by partitioning the TreeUnit (CTU). Then, the residual pixel information obtained after intra-frame or inter-frame prediction is transformed by the transform and quantization unit 501. This transformation includes transforming 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 502 and intra-frame prediction unit 503 are used to perform intra-frame prediction on the video coding block. Specifically, intra-frame estimation unit 502 and intra-frame prediction unit 503 are used to determine the intra-frame prediction mode to be used to encode the video coding block. Motion compensation unit 504 and motion estimation unit 505 are used to perform inter-frame prediction coding of the received video coding block relative to one or more blocks in one or more reference frames to provide temporal prediction information. The motion estimation performed by motion estimation unit 505 is a process of generating motion vectors, which can estimate the motion of the video coding block. Then, motion compensation unit 504 uses the motion vectors determined by motion estimation unit 505 to generate motion vectors. Motion vectors are used to perform motion compensation. After determining the intra-prediction mode, the intra-prediction unit 503 provides the selected intra-prediction data to the coding unit 509, and the motion estimation unit 505 also sends the calculated motion vector data to the coding unit 509. In addition, the inverse transform and inverse quantization unit 506 is used to reconstruct the video coding block, reconstructing the residual block in the pixel domain. The reconstructed residual block is processed by the filter control analysis unit 507 and the filtering unit 508 to remove block artifacts. Then, the reconstructed residual block is added to a predictive block in the frame of the decoding image buffer unit 510 to generate the reconstructed video coding block. The coding unit 509 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. The decoding image buffer unit 510 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 510.
[0081] See Figure 6 It illustrates an example block diagram of a video decoding system provided in an embodiment of this application; as shown Figure 6 As shown, the video decoding system 600 includes a decoding unit 601, an inverse transform and inverse quantization unit 602, an intra-frame prediction unit 603, a motion compensation unit 604, a filtering unit 605, and a decoding image buffer unit 606. The decoding unit 601 can perform header information decoding and CABAC decoding, while the filtering unit 605 can perform deblocking filtering and SAO filtering. The input video signal is processed... Figure 7 After encoding, the video signal bitstream is output. This bitstream is input into the video decoding system 600, first passing through the decoding unit 601 to obtain the decoded transform coefficients. These transform coefficients are then processed by the inverse transform and inverse quantization unit 602 to generate residual blocks in the pixel domain. The intra-frame prediction unit 603 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 604 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 602 with the corresponding predictive block generated by the intra-frame prediction unit 603 or the motion compensation unit 604; the decoded video signal is passed through the filtering unit 605 to remove block artifacts, which can improve video quality; then the decoded video block is stored in the decoding image buffer unit 606, 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.
[0082] The image component prediction method in this application embodiment is mainly applied in, for example, Figure 5 The intra-prediction unit 503 shown and as follows Figure 6The intra-prediction unit 603 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 503, "coded block in video image" specifically refers to the current coded block in intra-prediction; when the method is applied to the intra-prediction unit 603, "coded block in video image" specifically refers to the current decoded block in intra-prediction.
[0083] Based on the above Figure 5 or Figure 6 For application scenario examples, see Figure 7 This illustrates a flowchart of an image component prediction method provided in an embodiment of this application. Figure 7 As shown, the method may include:
[0084] S701: Obtain N adjacent reference pixels corresponding to the image component to be predicted in the coded block of the video image;
[0085] It should be noted that the N adjacent reference pixels here are reference pixels adjacent to the coded block, and N is a preset integer value, also known as a preset number. The video image can be divided into multiple coded blocks, each of which may include a first image component, a second image component, and a third image component. In this embodiment, the coded block is the current block in the video image to be encoded. When the first image component needs to be predicted using a prediction model, the image component to be predicted is the first image component; when the second image component needs to be predicted using a prediction model, the image component to be predicted is the second image component; and when the third image component needs to be predicted using a prediction model, the image component to be predicted is the third image component.
[0086] In this way, a predetermined number of adjacent reference pixels can be obtained from the reference pixels adjacent to the coded block to determine the fitting points used for model parameter derivation. Furthermore, the value of N is generally 4, but this embodiment does not impose a specific limitation.
[0087] In some embodiments, for S701, obtaining N neighboring reference pixels corresponding to the image component to be predicted of the coded block in the video image may include:
[0088] S701-1: Obtain the first reference pixel set corresponding to the image component to be predicted in the coded block of the video image;
[0089] It should 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, for the INTRA_LT_CCLM mode, the first reference pixel set is composed of adjacent reference pixels in the left and upper adjacent regions of the coding block, such as... Figure 2 As shown in (a); for INTRA_L_CCLM mode, the first set of reference pixels consists of adjacent reference pixels in the left and lower left adjacent regions of the coding block, as shown in (a). Figure 2 As shown in (b); for INTRA_T_CCLM mode, the first set of reference pixels consists of adjacent reference pixels in the upper and upper right adjacent regions of the coding block, as shown in (b). Figure 2 As shown in (c).
[0090] In some embodiments, optionally, for S701-1, obtaining the first reference pixel set corresponding to the image component to be predicted of the coded block in the video image may include:
[0091] Obtain reference pixels adjacent to at least one edge of the coded block; wherein, the at least one edge includes the left edge of the coded block and / or the top edge of the coded block;
[0092] Based on the reference pixels, a first set of reference pixels corresponding to the image component to be predicted is formed.
[0093] It should be noted that at least one edge of the coded block can refer to the top edge of the coded block, the left edge of the coded block, or even both the top edge and the left edge of the coded block. This application embodiment does not make specific limitations.
[0094] Thus, for the INTRA_LT_CCLM mode, when both the left and top adjacent regions are valid regions, the first reference pixel set can be composed of reference pixels adjacent to the left edge of the coding block and reference pixels adjacent to the top edge of the coding block. When the left adjacent region is a valid region and the top adjacent region is an invalid region, the first reference pixel set can be composed of reference pixels adjacent to the left edge of the coding block. When the left adjacent region is an invalid region and the top adjacent region is a valid region, the first reference pixel set can be composed of reference pixels adjacent to the top edge of the coding block.
[0095] In some embodiments, optionally, for S701-1, obtaining the first reference pixel set corresponding to the image component to be predicted of the coded block in the video image may include:
[0096] Obtain reference pixels in reference rows or reference columns adjacent to the coded block; wherein, the reference row is composed of the rows adjacent to the top and top right sides of the coded block, and the reference column is composed of the columns adjacent to the left and bottom left sides of the coded block;
[0097] Based on the reference pixels, a first set of reference pixels corresponding to the image component to be predicted is formed.
[0098] It should be noted that the reference row or reference column adjacent to the coding block can refer to the reference row adjacent to the top edge of the coding block, the reference column adjacent to the left edge of the coding block, or even the reference row or reference column adjacent to other edges of the coding block. This application embodiment does not impose specific limitations. For ease of description, in this application embodiment, the reference rows adjacent to the coding block will be described using the reference rows adjacent to the top edge as an example, and the reference columns adjacent to the coding block will be described using the reference columns adjacent to the left edge as an example.
[0099] The reference pixels in the reference row adjacent to the coding 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 represents the top edge of the coding block, and the top right edge represents the side length that extends horizontally to the right from the top edge of the coding block, which is the same as the height of the current coding block; the reference pixels in the reference column adjacent to the coding 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 represents the left edge of the coding block, and the bottom left edge represents the side length that extends vertically downward from the left edge of the coding block, which is the same as the width of the current decoding block; however, this embodiment of the application does not impose specific limitations.
[0100] Thus, in INTRA_L_CCLM mode, when the left adjacent region and the lower left adjacent region are valid regions, the first reference pixel set can be composed of reference pixels in the reference column adjacent to the coding block; in INTRA_T_CCLM mode, when the upper adjacent region and the upper right adjacent region are valid regions, the first reference pixel set can be composed of reference pixels in the reference row adjacent to the coding block.
[0101] S701-2: The first reference pixel set is filtered to obtain a second reference pixel set; wherein, the second reference pixel set includes N adjacent reference pixels;
[0102] It should be noted that in the first parameter pixel set, 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 prediction model, these reference pixels need to be removed to obtain the second reference pixel set. In practice, the number of effective pixels contained in the second reference pixel set is usually selected as 4, but this application embodiment does not make a specific limitation.
[0103] In some embodiments, for S701-2, the filtering process of the first reference pixel set to obtain the second reference pixel set may include:
[0104] The position of the pixel to be selected is determined based on the pixel position and / or image component intensity of each adjacent reference pixel in the first reference pixel set.
[0105] Based on the determined position of the pixel to be selected, adjacent reference pixels corresponding to the position of the pixel to be selected are selected from the first reference pixel set, and the selected adjacent reference pixels are combined to form a second reference pixel set; wherein, the second reference pixel set includes N adjacent reference pixels.
[0106] It should be noted that image component intensity can be represented by image component values, such as luminance and chrominance values; here, the larger the image component value, the higher the image component intensity. Thus, the selection of the first reference pixel set can be based on the position of the candidate reference pixels or on the image component intensity (such as luminance and chrominance values), thereby forming the selected candidate reference pixels into a second reference pixel set. The following description will use the position of the candidate reference pixels as an example.
[0107] For example, assuming the positions of the reference pixels in the upper selection area W' are S[0,-1], ..., S[W'-1,-1], and the positions of the reference pixels in the left selection area H' are S[-1,0], ..., S[-1,H'-1], the filtering method that selects a maximum of 4 adjacent reference pixels is as follows:
[0108] In INTRA_LT_CCLM mode, when both the upper and left adjacent regions are valid, two candidate adjacent reference pixels can be selected within the upper selection region W', with corresponding positions S[W' / 4,-1] and S[3W' / 4,-1]; two candidate adjacent reference pixels can be selected within the left selection region H', with corresponding positions S[-1,H' / 4] and S[-1,3H' / 4]; these four candidate adjacent reference pixels are then combined to form a second reference pixel set, as follows: Figure 8AAs shown. In Figure 8A In the coding block, the left and top adjacent regions are both valid. In order to maintain the same resolution for the luminance and chrominance components, the luminance component needs to be downsampled so that the downsampled luminance and chrominance components have the same resolution.
[0109] In INTRA_L_CCLM mode, when only the left and lower left adjacent regions are valid, four candidate adjacent reference pixels can be selected within the left selection region H', with corresponding positions S[-1,H' / 8], S[-1,3H' / 8], S[-1,5H' / 8], and S[-1,7H' / 8], respectively. These four candidate adjacent reference pixels are then combined to form a second reference pixel set, as follows: Figure 8B As shown. In Figure 8B In the coding block, the left and lower left adjacent regions are both valid. In order to maintain the same resolution for the luminance and chrominance components, it is still necessary to downsample the luminance component so that the downsampled luminance and chrominance components have the same resolution.
[0110] In INTRA_T_CCLM mode, when only the upper and upper right adjacent regions are valid, four candidate adjacent reference pixels can be selected within the upper selection region W', with corresponding positions S[W' / 8,-1], S[3W' / 8,-1], S[5W' / 8,-1], and S[7W' / 8,-1]. These four candidate adjacent reference pixels are then combined to form a second reference pixel set, as follows: Figure 8C As shown. In Figure 8C In the coding block, the upper and upper right adjacent regions are both valid. In order to maintain the same resolution for the luminance and chrominance components, it is still necessary to downsample the luminance component so that the downsampled luminance and chrominance components have the same resolution.
[0111] In this way, by filtering the first set of reference pixels, a second set of reference pixels can be obtained. The second set of reference pixels generally includes a preset number of adjacent reference pixels, such as 4 adjacent reference pixels. Then, these preset number of adjacent reference pixels are grouped by comparison so that the two fitting points determined later are more accurate.
[0112] S702: Compare the N first image component values corresponding to the N adjacent reference pixels to determine the first reference pixel subset and the second reference pixel subset;
[0113] It should be noted that each adjacent reference pixel corresponds to a first image component value and a second image component value; thus, a preset number of adjacent reference pixels correspond to a preset number of first image component values. After the first comparison process, the first reference pixel subset and the second reference pixel subset can be determined based on the magnitude of the first image component values.
[0114] In some embodiments, for S702, comparing the N first image component values corresponding to the N adjacent reference pixels to determine the first reference pixel subset and the second reference pixel subset may include:
[0115] Based on the preset number of adjacent reference pixels, obtain a preset number of first image component values;
[0116] The preset number of first image component values are compared multiple times to obtain a first array consisting of the minimum first image component value and the second minimum first image component value, and a second array consisting of the maximum first image component value and the second maximum first image component value.
[0117] The first reference pixel subset is obtained by placing two adjacent reference pixels corresponding to the first array into the first reference pixel subset.
[0118] The two adjacent reference pixels corresponding to the second array are placed into the second reference pixel subset to obtain the second reference pixel subset.
[0119] It should be noted that after obtaining a preset number of first image component values, a first reference pixel subset and a second reference pixel subset are obtained by comparing the preset number of first image component values multiple times (for example, four comparisons are required for four adjacent reference pixels). The first reference pixel subset includes two adjacent reference pixels corresponding to the smallest and second smallest first image component values among the preset number of first image component values, and the second reference pixel subset includes two adjacent reference pixels corresponding to the largest and second largest first image component values among the preset number of first image component values.
[0120] Specifically, the process can begin by numbering a preset number of adjacent reference pixels, then initially grouping these pixels into two arrays: the first array stores the first image component value corresponding to the i-th number, and the second array stores the first image component value corresponding to the (i+1)-th number, where i is a positive integer greater than or equal to 0. Then, the first image component values in the first array and the second array are compared multiple times, resulting in the first array storing the minimum and second minimum first image component values, and the second array storing the maximum and second maximum first image component values, thus obtaining the first and second reference pixel subsets.
[0121] Furthermore, after obtaining the first and second reference pixel subsets, a second mean point of the first reference pixel subset and a third mean point of the second reference pixel subset can be calculated. Therefore, in some embodiments, see... Figure 9 This illustrates a flowchart of another image component prediction method provided in an embodiment of this application. Figure 9 As shown, after S702, the method may further include:
[0122] S901: Based on the first image component value and the second image component value corresponding to each adjacent reference pixel in the first reference pixel subset, obtain the second mean value corresponding to the first image component and the second mean value corresponding to the second image component, and obtain the second mean value point.
[0123] S902: Based on the first image component value and the second image component value corresponding to each adjacent reference pixel point in the second reference pixel subset, obtain the third mean value corresponding to the first image component and the third mean value corresponding to the second image component, and obtain the third mean value point.
[0124] In other words, by calculating the average of the first image component values corresponding to each adjacent reference pixel in the first reference pixel subset, we obtain the average of the first image components corresponding to multiple first image components, which can be called the second average of the first image components (which can be represented by Luma). min (Representation); The mean value of the second image component corresponding to each adjacent reference pixel in the first reference pixel subset is calculated to obtain the mean value of the second image components corresponding to multiple second image components, which can be called the second mean value of the second image components (can be represented by Chroma). min (This is represented by the expression), where the second mean point can be represented by the mean. min Indicated here, the first image component of the second mean point is luma. min The second image component of the second mean point is chroma. min .
[0125] Similarly, by averaging the first image component values corresponding to each adjacent reference pixel in the second reference pixel subset, we obtain the average of the first image components corresponding to multiple first image components, which can be called the third average of the first image components (using Luma). max (Representation); The mean value of the second image component corresponding to each adjacent reference pixel in the second reference pixel subset is calculated to obtain the mean value of the second image components corresponding to multiple second image components, which can be called the third mean value of the second image components (which can be represented by Chroma). max (This is represented by the expression "mean"). Here, the third mean point can be represented by "mean". max Indicated here, the first image component of the third mean point is luma. max The second image component of the third mean point is chroma. max .
[0126] S703: Calculate the average value of the N adjacent reference pixels to obtain the first average point;
[0127] It should be noted that the first mean point is obtained by averaging N neighboring reference pixels. Therefore, in some embodiments, such as... Figure 9 As shown, for S703, this step may include:
[0128] S903: Based on the first image component value and the second image component value corresponding to each of the preset number of adjacent reference pixels, obtain the first mean value corresponding to the first image component and the first mean value corresponding to the second image component, and obtain the first mean value point.
[0129] In other words, the mean value of the first image component corresponding to each of the N adjacent reference pixels is calculated to obtain the mean value of the N first image components, which can be called the first mean value of the first image components (denoted by meanL). The mean value of the second image component corresponding to each of the N adjacent reference pixels is calculated to obtain the mean value of the N first image components, which can be called the first mean value of the first image components (denoted by meanC). Here, the first mean point can be represented by mean; the first image component of the first mean point is meanL, and the second image component of the first mean point is meanC. It should be noted that the first mean point can also be obtained by averaging the second and third mean points. For example, meanL can be calculated based on luma. min and Luma max The mean is obtained by taking the average; for meanC, it can be based on chroma. min and chroma maxIt is obtained by taking the mean.
[0130] S704: Compare the first image component values of the first reference pixel subset and / or the second reference pixel subset using the first mean point to determine two fitting points;
[0131] It should be noted that the two fitting points include a first fitting point and a second fitting point. By performing a second comparison process on the first reference pixel subset and / or the second reference pixel subset using the first mean point, three cases can occur: the first image component corresponding to the first mean point is less than the second smallest first image component value in the first reference pixel subset; the first image component corresponding to the first mean point is greater than the second largest first image component value in the second reference pixel subset; or the first image component corresponding to the first mean point is less than or equal to the second largest first image component value in the second reference pixel subset. For these three cases, the determined first fitting point and second fitting point are different, thereby improving the robustness of CCLM prediction.
[0132] Furthermore, in some embodiments, prior to S704, the method may further include:
[0133] Compare the first image component values corresponding to each of two adjacent reference pixels in the first reference pixel subset;
[0134] Based on the comparison results, the minimum first image component value and the second minimum first image component value are determined, and the pixel corresponding to the minimum first image component value is taken as the first adjacent reference pixel, and the pixel corresponding to the second minimum first image component value is taken as the second adjacent reference pixel.
[0135] Furthermore, in some embodiments, the method may further include:
[0136] Compare the first image component values corresponding to each of two adjacent reference pixels in the second reference pixel subset;
[0137] Based on the comparison results, the second largest first image component value and the largest first image component value among the two first image component values are determined, and the pixel corresponding to the second largest first image component value is taken as the third adjacent reference pixel, and the pixel corresponding to the largest first image component value is taken as the fourth adjacent reference pixel.
[0138] In this way, by comparing the first image component values corresponding to two adjacent reference pixels in the first reference pixel subset, the minimum first image component value and the second minimum first image component value can be determined, and the pixel corresponding to the minimum first image component value is taken as the first adjacent reference pixel, and the pixel corresponding to the second minimum first image component value is taken as the second adjacent reference pixel. By comparing the first image component values corresponding to two adjacent reference pixels in the second reference pixel subset, the maximum first image component value and the second maximum first image component value can be determined, and the pixel corresponding to the second maximum first image component value is taken as the third adjacent reference pixel, and the pixel corresponding to the maximum first image component value is taken as the fourth adjacent reference pixel.
[0139] Furthermore, in some embodiments, such as Figure 9 As shown, for S704, the step of comparing the first image component values of the first reference pixel subset and / or the second reference pixel subset using the first mean point to determine two fitting points may include:
[0140] S904: Compare the first image component of the first mean point with the second smallest first image component value in the first reference pixel subset;
[0141] S905: When the first image component of the first mean point is greater than or equal to the second smallest first image component value in the first reference pixel subset, the first image component of the first mean point is compared with the second largest first image component value in the second reference pixel subset.
[0142] S906: When the first image component of the first mean point is less than or equal to the second largest first image component value in the second reference pixel subset, the second mean point is used as the first fitting point and the third mean point is used as the second fitting point; wherein, the two fitting points include the first fitting point and the second fitting point.
[0143] Furthermore, following S904, the method may further include:
[0144] S907: When the first image component of the first mean point is less than the second smallest first image component value, the first adjacent reference pixel point is taken as the first fitting point, and the third mean point is taken as the second fitting point.
[0145] Furthermore, following S905, the method may further include:
[0146] S908: When the first image component of the first mean point is greater than the second largest first image component value, the second mean point is used as the first fitting point, and the fourth adjacent reference pixel is used as the second fitting point.
[0147] It should be noted that for steps S904 and S905, the first image component of the first mean point can be compared with the second smallest first image component value in the first reference pixel subset first, and then the first image component of the first mean point can be compared with the second largest first image component value in the second reference pixel subset; alternatively, the first image component of the first mean point can be compared with the second largest first image component value in the second reference pixel subset first, and then the first image component of the first mean point can be compared with the second smallest first image component value in the first reference pixel subset. The order of comparison is not specifically limited in this embodiment.
[0148] It should also be noted that the first image component of the first mean point is the first mean corresponding to the first image component. For step S904, if the first image component of the first mean point is greater than or equal to the second smallest first image component value in the first reference pixel subset, then step S905 will be executed; otherwise, step S907 will be executed, where the first fitting point is the first adjacent reference pixel point, and the second fitting point is the third mean point. For step S905, if the first image component of the first mean point is less than or equal to the second largest first image component value in the second reference pixel subset, then step S906 will be executed, where the first fitting point is the second mean point, and the second fitting point is the third mean point; otherwise, step S908 will be executed, where the first fitting point is the second mean point, and the second fitting point is the fourth adjacent reference pixel point. It can be seen that after the second comparison process, a preset number of adjacent reference pixels can be divided into three cases. Using two different fitting points for these three cases to construct the prediction model can improve the robustness of CCLM prediction.
[0149] It should also be noted that the determination of the "equal to" case is not limited. For example, it could also be that when the first image component of the first mean point is greater than the second smallest first image component value in the first reference pixel subset, step S905 is executed; when the first image component of the first mean point is less than or equal to the second smallest first image component value in the first reference pixel subset, step S907 is executed; or when the first image component of the first mean point is less than the second largest first image component value in the second reference pixel subset, step S906 is executed; when the first image component of the first mean point is greater than or equal to the second largest first image component value in the second reference pixel subset, step S908 is executed.
[0150] S705: Based on the two fitting points, determine the model parameters, and obtain the prediction model corresponding to the image component to be predicted according to the model parameters; wherein, the prediction model is used to perform prediction processing on the image component to be predicted in order to obtain the prediction value corresponding to the image component to be predicted.
[0151] It should be noted that after obtaining the first fitting point and the second fitting point, the model parameters can be determined based on the first fitting point and the second fitting point; here, the model parameters include the first model parameter (which can be represented by α) and the second model parameter (which can be represented by β). Assuming that the image component to be predicted is the chromaticity component, the prediction model corresponding to the chromaticity component can be obtained according to the model parameters α and β as shown in equation (1).
[0152] In some embodiments, for S705, the model parameters include a first model parameter and a second model parameter, and determining the model parameters based on the two fitting points may include:
[0153] S705-1: Based on the first fitting point and the second fitting point, the first model parameters are obtained by calculating the model using the first preset factor;
[0154] S705-2: Based on the first model parameters and the first fitting point, the second model parameters are obtained by calculating the model using the second preset factor;
[0155] Furthermore, in some embodiments, after S705-1, the method may further include:
[0156] S705-3: Based on the first model parameters and the first mean point, the second model parameters are obtained by calculating the model using the second preset factor.
[0157] It should be noted that after obtaining the first fitting point (luma1, chroma1) and the second fitting point (luma2, chroma2), the first model parameter α can be calculated according to the first preset factor calculation model, as shown in equation (2).
[0158]
[0159] After obtaining the first model parameter α, the second model parameter β can be calculated by combining the first fitting point (luma1, chroma1) and the second preset factor calculation model, as shown in equation (3).
[0160] β=chroma1-α×luma1 (3)
[0161] The second model parameter β is calculated based on the first mean point (meanL, meanC) and the second preset factor calculation model, as shown in equation (4).
[0162] β=meanC-α×meanL (4)
[0163] Thus, after obtaining the first model parameter α and the first model parameter β, a preset model can be constructed. Assuming that the image component to be predicted is a chromaticity component, the prediction model corresponding to the chromaticity component can be obtained according to the model parameters (α and β), as shown in Equation (1); then the chromaticity component is predicted using this prediction model to obtain the predicted value corresponding to the chromaticity component.
[0164] Furthermore, in some embodiments, after S705, the method may further include:
[0165] Based on the prediction model, the image component to be predicted for each pixel in the coding block is predicted to obtain the predicted value corresponding to the image component to be predicted for each pixel.
[0166] It should be noted that after performing a second comparison process on the first reference pixel subset and / or the second reference pixel subset using the first mean point, two fitting points can be determined. Thus, according to the principle of "two points determine a straight line", the slope (i.e., the first model parameter) and the intercept (i.e., the second model parameter) of the straight line can be determined. Based on these two model parameters, the prediction model corresponding to the image component to be predicted can be obtained, so as to obtain the predicted value corresponding to the image component to be predicted for each pixel in the coding block. For example, assuming that the image component to be predicted is a chroma component, according to the first model parameter α and the second model parameter β, the prediction model corresponding to the chroma component as shown in Equation (1) can be obtained. Then, the prediction model shown in Equation (1) is used to perform prediction processing on the chroma component of each pixel in the coding block, so as to obtain the predicted value corresponding to the chroma component of each pixel.
[0167] This embodiment provides an image component prediction method. For the image component to be predicted in a coded block of a video image, N adjacent reference pixels are obtained. Here, N adjacent reference pixels are reference pixels adjacent to the coded block, and N is a preset integer value. Then, the N first image component values corresponding to the N adjacent reference pixels are compared to determine a first reference pixel subset and a second reference pixel subset. The first reference pixel subset includes two adjacent reference pixels corresponding to the smallest and second smallest first image component values among a preset number of first image component values. The second reference pixel subset includes two adjacent reference pixels corresponding to the largest and second largest first image component values among a preset number of first image component values. The process involves identifying neighboring reference pixels; calculating the mean of the N neighboring reference pixels to obtain a first mean point; comparing the first image component values of a first subset of reference pixels and / or a second subset of reference pixels using the first mean point to determine two fitting points; determining model parameters based on the two fitting points; and obtaining a prediction model corresponding to the image component to be predicted based on the model parameters to obtain the predicted value corresponding to the image component to be predicted. Thus, after the second comparison process, a preset number of neighboring reference pixels can be divided into multiple cases, and different two fitting points are used to construct prediction models for these multiple cases, thereby improving the robustness of CCLM prediction. In other words, by optimizing the fitting points used in the derivation of model parameters, the constructed prediction model can be made more accurate, and the encoding and decoding prediction performance of video images can be improved.
[0168] In another embodiment of this application, in practical applications, the number of adjacent reference pixels used in the derivation of model parameters is generally four; that is, the preset number can be four. The following will describe in detail the example of a preset number of four.
[0169] like Figure 3 The illustrated process assumes the image component to be predicted is a chroma component. When zero adjacent reference pixels are obtained, the first model parameter α can be directly set to 0, and the second model parameter β can be set to its default value (or an intermediate value of the chroma component). When two adjacent reference pixels are obtained, these two adjacent reference pixels can be copied to obtain four adjacent reference pixels. Then, the prediction model can be constructed based on the operations of these four adjacent reference pixels. In other words, after obtaining four adjacent reference pixels, two fitting points can be determined by four comparisons and averaging, thereby deriving the model parameters using the principle of "two points determine a straight line". Based on these model parameters, a prediction model corresponding to the image component to be predicted can be constructed to obtain the predicted value of the image component to be predicted.
[0170] Specifically, it is assumed that the image component to be predicted is the chromaticity component, and the chromaticity component is predicted through the luminance component. Assume that the four adjacent reference pixels are numbered 0, 1, 2, and 3 respectively. By comparing these four adjacent reference pixels, based on four comparisons, two adjacent reference pixels with larger luminance values (which may include the pixel with the largest luminance value and the pixel with the second largest luminance value) and two adjacent reference pixels with smaller luminance values (which may include the pixel with the smallest luminance value and the pixel with the second smallest luminance value) can be further selected. Furthermore, two arrays, minIdx[2] and maxIdx[2], can be set to store two sets of adjacent reference pixels respectively. Initially, the adjacent reference pixels numbered 0 and 2 are placed in minIdx[2], and the adjacent reference pixels numbered 1 and 3 are placed in maxIdx[2], as shown below.
[0171] Init:minIdx[2]={0,2},maxIdx[2]={1,3}
[0172] After this, through four comparisons, it can be determined that minIdx[2] stores two adjacent reference pixels with smaller brightness values, and maxIdx[2] stores two adjacent reference pixels with larger brightness values, as shown below.
[0173] Step1:if(L[minIdx[0]]>L[minIdx[1]],swap(minIdx[0],minIdx[1])
[0174] Step2:if(L[maxIdx[0]]>L[maxIdx[1]],swap(maxIdx[0],maxIdx[1])
[0175] Step3:if(L[minIdx[0]]>L[maxIdx[1]],swap(minIdx,maxIdx)
[0176] Step4:if(L[minIdx[1]]>L[maxIdx[0]],swap(minIdx[1],maxIdx[0])
[0177] In this way, we can obtain two adjacent reference pixels with smaller brightness values, and their corresponding brightness values can be represented by luma. 0 min and Luma 1 min This indicates that the corresponding chroma values are represented by chroma. 0 min and chroma 1 minThis indicates that the two adjacent reference pixels with larger brightness values can also be obtained, and their corresponding brightness values are represented by luma. 0 max and Luma 1 max This indicates that the corresponding chroma values are represented by chroma. 0 max and chroma 1 max This is represented as follows. Further, by averaging the values of two smaller adjacent reference pixels, we can obtain the mean point. min This indicates that the mean point is... min The corresponding value is the brightness value represented by luma. min The chroma value is chroma min ; by averaging two larger adjacent reference pixels, we can obtain the second mean point. max This indicates that the mean point is... max The corresponding brightness value is luma max The chroma value is chroma max The details are as follows:
[0178] luma min =(luma 0 min +luma 1 min +1)>>1
[0179] luma max =(luma 0 max +luma 1 max +1)>>1
[0180] chroma min =(chroma 0 min +chroma 1 min +1)>>1
[0181] chroma max =(chroma 0 max +chroma 1 max +1)>>1
[0182] In other words, after obtaining the two mean points... min (luma min chroma min ) and mean max(luma max chroma max After that, these two mean points can be used as two fitting points, and the model parameters can be obtained from these two fitting points using the "two points determine a straight line" calculation method. Specifically, the model parameters α and β can be calculated using equation (5).
[0183]
[0184] Wherein, the model parameter α is the slope in the prediction model, and the model parameter β is the intercept in the prediction model. Thus, after deriving the model parameters, the prediction model corresponding to the chromaticity component can be obtained based on the model parameters, as shown in Equation (1); then, the chromaticity component is predicted using this prediction model to obtain the predicted value corresponding to the chromaticity component.
[0185] Thus, because the current traditional method uniformly uses the mean of the two larger and two smaller adjacent reference pixels out of four as two fitting points to construct the prediction model, this prediction model lacks robustness. Therefore, when the four adjacent reference pixels are unevenly distributed, the constructed prediction model will not be able to accurately fit the distribution of these four adjacent reference pixels. For example... Figure 4B The diagram shows a comparison of the prediction models.
[0186] In this embodiment of the application, two mean points are derived while retaining the traditional method. min and mean max Based on this, the average brightness of the four adjacent reference pixels is first calculated. After obtaining the average brightness of the four adjacent reference pixels, the first reference pixel subset and / or the second reference pixel subset can be compared using the average brightness to divide the preset number of adjacent reference pixels into multiple cases. For these multiple cases, two different fitting points are used to construct a prediction model.
[0187] See Figure 10 This illustrates a flowchart of a model parameter derivation scheme provided in an embodiment of this application. Figure 10 As shown, the process may include:
[0188] S1001: Obtain 4 adjacent reference pixels;
[0189] S1002: After four comparisons, the two pixels with the larger luminance component value and the two pixels with the smaller luminance component value are obtained;
[0190] S1003: Calculate the mean of two points. min and mean max ;
[0191] S1004: Calculate the mean L of the brightness corresponding to 4 adjacent reference pixels;
[0192] S1005: Determine the first pixel corresponding to the minimum brightness value and the second pixel corresponding to the second minimum brightness value through a single comparison;
[0193] S1006: Determine whether meanL is greater than or equal to the second minimum brightness value;
[0194] S1007: When meanL is less than the second minimum brightness value, the first pixel corresponding to the minimum brightness value and the mean value are... max Construct a prediction model using two fitting points;
[0195] S1008: When meanL is greater than or equal to the second minimum brightness value, determine the third pixel corresponding to the second maximum brightness value and the fourth pixel corresponding to the maximum brightness value through a single comparison.
[0196] S1009: Determine whether meanL is less than or equal to the second maximum brightness value;
[0197] S1010: When meanL is greater than the second maximum brightness value, the fourth pixel corresponding to the maximum brightness value and the mean value will be... min Construct a prediction model using two fitting points;
[0198] S1011: When meanL is less than or equal to the second maximum brightness value, the mean point is... min and mean max Construct a prediction model using two fitting points;
[0199] S1012: Perform chromaticity component prediction processing based on the constructed prediction model.
[0200] It should be noted that the comparisons in steps S1006 and S1009 are not sequential; that is, the comparison in step S1006 can be performed first, followed by the comparison in step S1009, or vice versa. This application does not impose specific limitations on this. For example, if the comparison in step S1009 is performed first, the process is modified as follows: after determining the third pixel corresponding to the second-highest brightness value and the fourth pixel corresponding to the highest brightness value through a single comparison, it is determined whether meanL is less than or equal to the second-highest brightness value; when meanL is greater than the second-highest brightness value, the fourth pixel corresponding to the highest brightness value and the mean point are compared. minThe prediction model is constructed using two fitted points. When meanL is less than or equal to the second-lowest brightness value, the first pixel corresponding to the minimum brightness value and the second pixel corresponding to the second-lowest brightness value are determined through a single comparison. Then, it is determined whether meanL is greater than or equal to the second-lowest brightness value. When meanL is less than the second-lowest brightness value, the first pixel corresponding to the minimum brightness value and the mean point are used as the reference points. max The prediction model is constructed using two fitting points; when meanL is greater than or equal to the second minimum brightness value, the mean point is used as the reference point. min and mean max The two fitting points are used to construct a prediction model; finally, the chromaticity component is predicted based on the constructed prediction model.
[0201] It should also be noted that the prediction model is constructed using the principle of "two points determine a straight line"; these two points can be called fitting points. After obtaining four adjacent reference pixels, the mean of these four adjacent reference pixels (which can be represented by the mean) can be calculated, and then this mean can be used for a second comparison to determine the fitting points under different conditions.
[0202] Specifically, assuming the image component to be predicted is the chroma component, and the chroma component is predicted using the luminance component, the following steps will be performed:
[0203] First, assuming the four adjacent reference pixels are numbered 0, 1, 2, and 3, compare these four adjacent reference pixels four times. Select the two adjacent reference pixels with the larger brightness value (which may include the pixel with the largest brightness value and the pixel with the second largest brightness value) and the two adjacent reference pixels with the smaller brightness value (which may include the pixel with the smallest brightness value and the pixel with the second smallest brightness value). Further, set up two arrays, minIdx[2] and maxIdx[2], to store two sets of adjacent reference pixels respectively. Initially, place the adjacent reference pixels numbered 0 and 2 into minIdx[2], and the adjacent reference pixels numbered 1 and 3 into maxIdx[2], as shown below.
[0204] Init:minIdx[2]={0,2},maxIdx[2]={1,3}
[0205] The second step involves four comparisons to ensure that minIdx[2] stores two adjacent reference pixels with smaller brightness values, and maxIdx[2] stores two adjacent reference pixels with larger brightness values, as shown below.
[0206] Step1:if(L[minIdx[0]]>L[minIdx[1]],swap(minIdx[0],minIdx[1])
[0207] Step2:if(L[maxIdx[0]]>L[maxIdx[1]],swap(maxIdx[0],maxIdx[1])
[0208] Step3:if(L[minIdx[0]]>L[maxIdx[1]],swap(minIdx,maxIdx)
[0209] Step4:if(L[minIdx[1]]>L[maxIdx[0]],swap(minIdx[1],maxIdx[0])
[0210] The third step yields two adjacent reference pixels with smaller brightness values, whose corresponding brightness values are represented by luma. 0 min and Luma 1 min This indicates that the corresponding chroma values are represented by chroma. 0 min and chroma 1 min This indicates that the two adjacent reference pixels with larger brightness values can also be obtained, and their corresponding brightness values are represented by luma. 0 max and Luma 1 max This indicates that the corresponding chroma values are represented by chroma. 0 max and chroma 1 max This is represented as follows. Further, by averaging the values of two smaller adjacent reference pixels, we can obtain the mean point. min This indicates that the mean point is... min The corresponding value is the brightness value represented by luma. min The chroma value is chroma min ; by averaging two larger adjacent reference pixels, we can obtain the second mean point. max This indicates that the mean point is... max The corresponding brightness value is luma max The chroma value is chroma max The details are as follows:
[0211] luma min =(luma 0 min +luma 1 min +1)>>1
[0212] luma max =(luma 0 max +luma 1 max +1)>>1
[0213] chroma min =(chroma 0 min +chroma 1 min +1)>>1
[0214] chroma max =(chroma 0 max +chroma 1 max +1)>>1
[0215] The fourth step is to obtain the two mean points. min (luma min chroma min ) and mean max (luma max chroma max After that, you can continue to execute the following modules:
[0216] I. Calculate the mean luminance L of four adjacent reference pixels numbered 0, 1, 2, and 3. Note that this can be obtained by adding the luminance values of the four adjacent reference pixels and dividing by four, or by using (luma... min +luma max +1)>>1 to get;
[0217] II. Comparison of Luma 0 min and Luma 1 min Determine the minimum point and the second minimum point (first comparison);
[0218] III. Compare the mean brightness value (meanL) of four adjacent reference pixels with the brightness value of the second minimum pixel (second comparison):
[0219] If meanL is greater than or equal to the brightness value of the second minimum point;
[0220] Jump to IV;
[0221] otherwise
[0222] The first fitted point is determined as the minimum point, and the second fitted point is determined as the mean point. max (lumamax chroma max At the same time, exit this module.
[0223] Jump to step five;
[0224] IV. Comparison of Luma 0 max and Luma 1 max Determine the maximum and second-maximum points (third comparison);
[0225] V. Compare the mean brightness value (meanL) of four adjacent reference pixels with the brightness value of the second-largest pixel (fourth comparison):
[0226] If meanL is less than or equal to the brightness value of the second maximum point;
[0227] The first fitted point is determined to be the mean. min (luma min chroma min The second fitted point is the mean. max (luma max chroma max ),
[0228] Exit this module and skip to step five;
[0229] otherwise
[0230] The first fitted point is determined to be the mean. min (luma min chroma min The second fitted point is the maximum point. At this point, exit this module and jump to step five.
[0231] Fifth, the model parameters can be derived from these two fitting points using the "two points determine a straight line" method. Assuming the first fitting point (luma1, chroma1) and the second fitting point (luma2, chroma2), the model parameters α and β can be calculated using equation (6).
[0232]
[0233] The sixth step is to predict the chroma value of the current coded block using the prediction model after deriving the model parameters.
[0234] In other words, after deriving the two model parameters (α and β), the prediction model corresponding to the chromaticity component can be obtained based on the model parameters, as shown in Equation (1); then the chromaticity component is predicted using the prediction model to obtain the predicted value corresponding to the chromaticity component.
[0235] Before deriving the two fitting points, compared with the traditional approach, this embodiment of the application adds an averaging operation and a minimum of two and a maximum of four comparison operations, thereby dividing the four adjacent reference pixels into three cases. Different two fitting points are used to construct the prediction model for these three cases, thereby improving the robustness of CCLM prediction.
[0236] In another embodiment of this application, the preset number is 4. Thus, these 4 adjacent reference pixels may have 3 situations, such as the mean brightness L being between the brightness values of the second maximum point and the second minimum point, or the mean brightness L being less than the brightness value of the second minimum point, or the mean brightness L being greater than the brightness value of the second maximum point. That is to say, these 4 adjacent reference pixels may have a uniform distribution trend or a non-uniform distribution trend. The following will describe these three situations in detail.
[0237] Optionally, in some embodiments, when the mean brightness L is between the brightness values of the second-maximum and second-minimum points, these four adjacent reference pixels are uniformly distributed. See also Figure 11 This illustration shows a comparison diagram between a prediction model provided by an embodiment of this application and a traditional method. Figure 11 As shown, the four black dots represent four adjacent reference pixels, and the two gray dots represent the mean points of the two larger and two smaller adjacent reference pixels (i.e., the two fitting points obtained by the traditional method). Thus, the gray diagonal line represents the prediction model constructed according to the traditional method; the thick black dashed line represents the average brightness of the four adjacent reference pixels, and the two thick black circles represent two fitting points. Thus, the thick black diagonal line represents the prediction model constructed according to the method of this application embodiment; the gray dotted line represents the prediction model fitted by the LMS algorithm using these four adjacent reference pixels; from Figure 11 As can be seen from the data, the two fitted points are mean. min (luma min chroma min ) and mean max (luma max chroma max In this way, the gray diagonal line and the thickened black diagonal line coincide, and are quite close to the gray dotted line. That is, the scheme of this application embodiment is the same as the prediction model constructed by the traditional scheme, and both can accurately fit the distribution of these 4 adjacent reference pixels.
[0238] Optionally, in some embodiments, when the mean brightness L is less than the brightness value of the second minimum point, these four adjacent reference pixels are non-uniformly distributed. See also Figure 12This illustration shows a comparison diagram between another prediction model provided by an embodiment of this application and a traditional prediction model. Figure 12 As shown, the four black dots represent four adjacent reference pixels, and the two gray dots represent the mean points of the two larger and two smaller adjacent reference pixels (i.e., the two fitting points obtained by the traditional method). Thus, the gray diagonal line represents the prediction model constructed according to the traditional method; the thick black dashed line represents the average brightness of the four adjacent reference pixels, and the two thick black circles represent two fitting points. Thus, the thick black diagonal line represents the prediction model constructed according to the method of this application embodiment; the gray dotted line represents the prediction model fitted by the LMS algorithm using these four adjacent reference pixels; from Figure 12 As can be seen from the data, the two fitted points are the minimum point and the mean. max (luma max chroma max The bolded black diagonal line and the gray dotted line are closer together, meaning that the prediction model constructed by the embodiment of this application is more consistent with the distribution of these four adjacent reference pixels than the traditional solution.
[0239] Optionally, in some embodiments, when the mean brightness L is greater than the brightness value of the second-maximum point, these four adjacent reference pixels are non-uniformly distributed. See also Figure 13 This illustration shows a comparison diagram between another prediction model provided by this application and a traditional solution. Figure 13 As shown, the four black dots represent four adjacent reference pixels, and the two gray dots represent the mean points of the two larger and two smaller adjacent reference pixels (i.e., the two fitting points obtained by the traditional method). Thus, the gray diagonal line represents the prediction model constructed according to the traditional method; the thick black dashed line represents the average brightness of the four adjacent reference pixels, and the two thick black circles represent two fitting points. Thus, the thick black diagonal line represents the prediction model constructed according to the method of this application embodiment; the gray dotted line represents the prediction model fitted by the LMS algorithm using these four adjacent reference pixels; from Figure 13 As can be seen from the data, the two fitted points are mean. min (luma min chroma min The bold black diagonal line and the gray dotted line are closer together, meaning that the prediction model constructed by the embodiment of this application is more consistent with the distribution of these four adjacent reference pixels than the traditional solution.
[0240] from Figure 12 or Figure 13It can be seen that when the four adjacent reference pixels are unevenly distributed, the linear model constructed by the current traditional scheme lacks robustness and cannot fit these four adjacent reference pixels well, thus resulting in inaccurate prediction performance. However, in the embodiments of this application, by optimizing the fitting points used in the derivation of model parameters, the CCLM prediction can be made more robust. Specifically, under the premise of increased complexity due to one mean calculation and at least two to at most four comparisons, the embodiments of this application divide the distribution of the four adjacent reference points into three cases and use different fitting points to construct prediction models for these three cases, thereby improving the robustness of CCLM prediction. Moreover, by using different fitting points to derive model parameters for different distribution cases of these four adjacent reference pixels, the "division by 3" operation can be avoided. At the same time, other division operations, such as "division by 2" and "division by 4", can be completely replaced by shifting, thereby saving computational complexity. For example, based on the latest VVC reference software VTM5.0, under All intra conditions, the test sequence required by JVET is tested according to the general test conditions. Thus, the average changes in BD-rate on the Y component, Cb component, and Cr component are -0.03%, -0.18%, and -0.17%, respectively. This shows that the solution of the embodiment of this application brings a certain improvement in prediction performance with very little increase in complexity.
[0241] In another embodiment of this application, after obtaining four adjacent reference pixels according to the latest VVC reference software VTM5.0, these four adjacent reference pixels can be divided into two categories according to the average brightness of the four adjacent reference pixels, for example, the left category is represented by L and the right category is represented by R. After classification, when there are three pixels in category L or category R, calculating the average of this category will involve a "division by 3" operation. In this embodiment of the application, the fitting point of this category may no longer be the average of the three pixels, but rather the average of any two pixels selected from the three pixels. This operation can eliminate the "division" operation in the process of determining the fitting point (more precisely, it can avoid the "division by 3" operation, while the "division by 2" and "division by 4" operations can be replaced by shifting), thereby saving computational complexity. Therefore, in some embodiments, after S701, the method may further include:
[0242] The preset number of adjacent reference pixels are grouped using the first mean point to obtain a third reference pixel subset and a fourth reference pixel subset.
[0243] The first fitting point is determined based on the third reference pixel subset; the second fitting point is determined based on the fourth reference pixel subset.
[0244] Based on the first fitting point and the second fitting point, model parameters are determined, and a prediction model corresponding to the image component to be predicted is obtained according to the model parameters; wherein, the prediction model is used to perform prediction processing on the image component to be predicted in order to obtain the predicted value corresponding to the image component to be predicted.
[0245] Further, determining the first fitting point based on the third reference pixel subset and determining the second fitting point based on the fourth reference pixel subset may include:
[0246] Select a portion of adjacent reference pixels from the third reference pixel subset, calculate the mean of the portion of adjacent reference pixels, and use the calculated mean point as the first fitting point.
[0247] Select a portion of adjacent reference pixels from the fourth reference pixel subset, calculate the mean of the portion of adjacent reference pixels, and use the calculated mean point as the second fitting point.
[0248] Further, determining the first fitting point based on the third reference pixel subset and determining the second fitting point based on the fourth reference pixel subset may include:
[0249] Select one of the adjacent reference pixels from the third reference pixel subset as the first fitting point;
[0250] One of the adjacent reference pixels in the fourth reference pixel subset is selected as the second fitting point.
[0251] Further, assuming the preset number is 4, the process of determining the first fitting point based on the third reference pixel subset and determining the second fitting point based on the fourth reference pixel subset includes:
[0252] If the third reference pixel subset includes 3 adjacent reference pixels and the fourth reference pixel subset includes 1 adjacent reference pixel, then 2 adjacent reference pixels are selected from the third reference pixel subset, the mean of the 2 selected adjacent reference pixels is calculated, the calculated mean is used as the first fitting point, and the 1 adjacent reference pixel in the fourth reference pixel subset is used as the second fitting point.
[0253] If the third reference pixel subset includes one adjacent reference pixel and the fourth reference pixel subset includes three adjacent reference pixels, then two adjacent reference pixels are selected from the fourth reference pixel subset, the mean of the two selected adjacent reference pixels is calculated, the calculated mean is used as the second fitting point, and one adjacent reference pixel in the third reference pixel subset is used as the first fitting point.
[0254] It should be noted that the selected reference pixels here can be a power of 2. For example, after dividing four adjacent reference pixels into two categories (such as category L and category R) according to their average brightness, if there are 3 pixels in category L or category R, the operation of arbitrarily selecting 2 pixels from these 3 pixels to calculate the average can also be as follows: if there are 3 pixels in category L, select the 2 pixels with the smaller brightness value; if there are 3 pixels in category R, select the 2 pixels with the larger brightness value.
[0255] In addition, after classifying four adjacent reference pixels into two categories (e.g., L-class and R-class) based on their average brightness, one pixel can be arbitrarily selected from the L-class as the first fitting point, and one pixel from the R-class as the second fitting point. This allows the construction of model parameters α and β using these two fitting points; alternatively, the first model parameter α can be derived using these two fitting points, and the second model parameter β can be derived using the average of the four pixels. This process eliminates the need to calculate the average points for the L-class and R-class pixels separately.
[0256] See Figure 14 This illustrates a structural schematic diagram of a method for determining a fitting point according to an embodiment of this application. Figure 14 As shown, after obtaining all adjacent reference pixels, the average brightness L of these adjacent reference pixels can be calculated. mean Then use this L mean These adjacent reference pixels are divided into classes L and R, and the mean point of each class (L) Lmean C Lmean ) and (L Rmean C Rmean These two points can be used as fitting points to derive the first model parameter α, while simultaneously utilizing the mean point (L... mean C mean To derive the second model parameter β:
[0257]
[0258] It should also be noted that the above method can also be applied to the case of a maximum of four valid adjacent reference pixels in VTM 5.0. For example, after obtaining four adjacent reference pixels through VTM 5.0, the average luminance of the four pixels is first obtained. These four pixels are then divided into two classes using the average values. The average values of the two classes are then used as two fitting points to derive the model parameters α and β. When these four pixels cannot be divided into two classes based on the average luminance (i.e., the number of pixels in class L is 0 or the number of pixels in class R is 0), the average chrominance of these four pixels can be directly used as the chrominance prediction value. Furthermore, the average values of these two classes can be used as two fitting points to derive the first model parameter α, and the average values of the four pixels can be used to derive the second model parameter β.
[0259] In another embodiment of this application, based on the derivation of the first model parameter α from the two already obtained fitting points, the second model parameter β can also be directly derived using the mean of the two already obtained mean points. Since VTM5.0 rounds down to integers, calculating the mean again from these two mean points may yield a different result than directly calculating the mean from four adjacent reference pixels, resulting in a slight difference in prediction performance.
[0260] See Figure 15 This illustrates a schematic diagram of the structure of a prediction model provided in an embodiment of this application. Figure 15 As shown, the gray diagonal line represents the slope calculated based on two fitting points, i.e., the first model parameter α. Then, the gray diagonal line is shifted by the amount of shift, which is the second model parameter β. The resulting bold black diagonal line is the final prediction model. Specifically, based on the JVET-N0524 proposal, in VTM4.0, the two points with the largest and smallest luminance values among all adjacent reference points corresponding to the coded block can be used as two fitting points to derive the first model parameter α. Simultaneously, the mean of all adjacent reference pixels can be used to derive the second model parameter β. In addition, the JVET-N0524 proposal can also be applied to VTM5.0 with a maximum of four valid adjacent reference pixels. In this case, the mean of the two larger and two smaller pixels among the four pixels can be used as two fitting points to derive the first model parameter α, and then the mean of these four pixels can be used to derive the second model parameter β.
[0261] This embodiment provides an image component prediction method. Through this technical solution, after the second comparison process, a preset number of adjacent reference pixels can be divided into three cases. For each of these three cases, two different fitting points are used to construct a prediction model, thereby improving the robustness of CCLM prediction. In other words, by optimizing the fitting points used in the model parameter derivation, the constructed prediction model can be made more accurate, and the encoding / decoding prediction performance of video images can also be improved.
[0262] Based on the same inventive concept as the foregoing embodiments, see [link to previous document]. Figure 16 This diagram illustrates the structural composition of an image component prediction device 160 according to an embodiment of this application. The image component prediction device 160 may include: an acquisition unit 1601, a comparison unit 1602, a calculation unit 1603, and a prediction unit 1604, wherein...
[0263] The acquisition unit 1601 is configured to acquire N adjacent reference pixels corresponding to the image component to be predicted of the coded block in the video image; wherein, the N adjacent reference pixels are reference pixels adjacent to the coded block, and N is a preset integer value.
[0264] The comparison unit 1602 is configured to compare the N first image component values corresponding to the N adjacent reference pixels to determine a first reference pixel subset and a second reference pixel subset; wherein, a preset number of adjacent reference pixels correspond to a preset number of first image component values, the first reference pixel subset includes: two adjacent reference pixels corresponding to the smallest and second smallest first image component values among the preset number of first image component values, and the second reference pixel subset includes: two adjacent reference pixels corresponding to the largest and second largest first image component values among the preset number of first image component values;
[0265] The calculation unit 1603 is configured to calculate the average value of the N adjacent reference pixels to obtain a first average point;
[0266] The comparison unit 1602 is further configured to compare the first image component values of the first reference pixel subset and / or the second reference pixel subset using the first mean point to determine two fitting points;
[0267] The prediction unit 1604 is configured to determine model parameters based on the two fitting points, and obtain a prediction model corresponding to the image component to be predicted according to the model parameters; wherein, the prediction model is used to perform prediction processing on the image component to be predicted in order to obtain the predicted value corresponding to the image component to be predicted.
[0268] In the above scheme, see [reference] Figure 16The image component prediction device 160 may further include a filtering unit 1605.
[0269] The acquisition unit 1601 is further configured to acquire a first reference pixel set corresponding to the image component to be predicted of the coded block in the video image;
[0270] The filtering unit 1605 is configured to perform filtering processing on the first reference pixel set to obtain a second reference pixel set; wherein the second reference pixel set includes N adjacent reference pixels.
[0271] In the above scheme, the acquisition unit 1601 is specifically configured to acquire reference pixels adjacent to at least one side of the coding block; wherein, the at least one side includes the left side of the coding block and / or the top side of the coding block; and based on the reference pixels, to form a first reference pixel set corresponding to the image component to be predicted.
[0272] In the above scheme, the acquisition unit 1601 is specifically configured to acquire reference pixels in reference rows or reference columns adjacent to the coding block; wherein, the reference row is composed of the rows adjacent to the upper side and the upper right side of the coding block, and the reference column is composed of the columns adjacent to the left side and the lower left side of the coding block; and based on the reference pixels, to form a first reference pixel set corresponding to the image component to be predicted.
[0273] In the above scheme, the filtering unit 1605 is specifically configured to determine the position of the pixel to be selected based on the pixel position and / or image component intensity corresponding to each adjacent reference pixel in the first reference pixel set; and to select adjacent reference pixels corresponding to the position of the pixel to be selected from the first reference pixel set according to the determined position of the pixel to be selected, and to form a second reference pixel set by the selected adjacent reference pixels; wherein, the second reference pixel set includes N adjacent reference pixels.
[0274] In the above scheme, the acquisition unit 1601 is further configured to acquire a preset number of first image component values based on the preset number of adjacent reference pixels.
[0275] The comparison unit 1602 is specifically configured to perform multiple comparisons on a preset number of first image component values to obtain a first array composed of the minimum first image component value and the second minimum first image component value, and a second array composed of the maximum first image component value and the second maximum first image component value; and to place two adjacent reference pixels corresponding to the first array into a first reference pixel subset to obtain the first reference pixel subset; and to place two adjacent reference pixels corresponding to the second array into a second reference pixel subset to obtain the second reference pixel subset.
[0276] In the above scheme, the acquisition unit 1601 is further configured to obtain the average value of the first image component corresponding to the N first image components and the average value of the second image component corresponding to the N second image components based on the first image component value and the second image component value corresponding to each of the N adjacent reference pixels, and thus obtain the first average value point.
[0277] In the above scheme, the acquisition unit 1601 is further configured to obtain the average value of the first image components corresponding to multiple first image components and the average value of the second image components corresponding to multiple second image components in the first reference pixel subset based on the first image component value and the second image component value corresponding to each adjacent reference pixel in the first reference pixel subset, thereby obtaining a second average point; and to obtain the average value of the first image components corresponding to multiple first image components and the average value of the second image components corresponding to multiple second image components in the second reference pixel subset based on the first image component value and the second image component value corresponding to each adjacent reference pixel in the second reference pixel subset, thereby obtaining a third average point.
[0278] In the above scheme, the comparison unit 1602 is specifically configured to compare the first image component of the first mean point with the second smallest first image component value in the first reference pixel subset; and when the first image component of the first mean point is greater than or equal to the second smallest first image component value in the first reference pixel subset, compare the first image component of the first mean point with the second largest first image component value in the second reference pixel subset; and when the first image component of the first mean point is less than or equal to the second largest first image component value in the second reference pixel subset, use the second mean point as the first fitting point and the third mean point as the second fitting point; wherein, the two fitting points include the first fitting point and the second fitting point.
[0279] In the above scheme, the comparison unit 1602 is further configured to compare the first image component values corresponding to two adjacent reference pixels in the first reference pixel subset; and to determine the minimum first image component value and the second minimum first image component value among the two first image component values based on the comparison result, and to take the pixel corresponding to the minimum first image component value as the first adjacent reference pixel and the pixel corresponding to the second minimum first image component value as the second adjacent reference pixel.
[0280] The comparison unit 1602 is further configured to compare the first image component values corresponding to two adjacent reference pixels in the second reference pixel subset; and, based on the comparison result, determine the second largest first image component value and the largest first image component value among the two first image component values, and take the pixel corresponding to the second largest first image component value as the third adjacent reference pixel and the pixel corresponding to the largest first image component value as the fourth adjacent reference pixel.
[0281] In the above scheme, the comparison unit 1602 is further configured to take the first adjacent reference pixel as the first fitting point and the third mean point as the second fitting point when the first image component of the first mean point is less than the second minimum first image component value.
[0282] In the above scheme, the comparison unit 1602 is further configured to take the second mean point as the first fitting point and the fourth adjacent reference pixel point as the second fitting point when the first image component of the first mean point is greater than the second largest first image component value.
[0283] In the above scheme, the calculation unit 1603 is further configured to obtain the first model parameters based on the first fitting point and the second fitting point through a first preset factor calculation model; and to obtain the second model parameters based on the first model parameters and the first fitting point through a second preset factor calculation model.
[0284] In the above scheme, the calculation unit 1603 is further configured to obtain the second model parameters based on the first model parameters and the first mean point through a second preset factor calculation model.
[0285] In the above scheme, see [reference] Figure 16 The image component prediction device 160 may further include a grouping unit 1606 and a determining unit 1607, wherein,
[0286] The grouping unit 1606 is configured to group the N adjacent reference pixels using a first mean point to obtain a third reference pixel subset and a fourth reference pixel subset.
[0287] The determining unit 1607 is configured to determine a first fitting point based on a third reference pixel subset; and to determine a second fitting point based on a fourth reference pixel subset.
[0288] The prediction unit 1604 is specifically configured to determine model parameters based on the first fitting point and the second fitting point, and obtain a prediction model corresponding to the image component to be predicted according to the model parameters; wherein, the prediction model is used to perform prediction processing on the image component to be predicted in order to obtain the predicted value corresponding to the image component to be predicted.
[0289] In the above scheme, the determining unit 1607 is specifically configured to select a portion of adjacent reference pixels from the third reference pixel subset, perform mean calculation on the portion of adjacent reference pixels, and use the calculated mean point as the first fitting point; and to select a portion of adjacent reference pixels from the fourth reference pixel subset, perform mean calculation on the portion of adjacent reference pixels, and use the calculated mean point as the second fitting point.
[0290] In the above scheme, the determining unit 1607 is specifically configured to select one of the adjacent reference pixels from the third reference pixel subset as the first fitting point; and to select one of the adjacent reference pixels from the fourth reference pixel subset as the second fitting point.
[0291] In the above scheme, N is 4; the determining unit 1607 is specifically configured as follows: if the third reference pixel subset includes 3 adjacent reference pixels and the fourth reference pixel subset includes 1 adjacent reference pixel, then 2 adjacent reference pixels are selected from the third reference pixel subset, the mean of the selected 2 adjacent reference pixels is calculated, the calculated mean is used as the first fitting point, and the 1 adjacent reference pixel in the fourth reference pixel subset is used as the second fitting point; and if the third reference pixel subset includes 1 adjacent reference pixel and the fourth reference pixel subset includes 3 adjacent reference pixels, then 2 adjacent reference pixels are selected from the fourth reference pixel subset, the mean of the selected 2 adjacent reference pixels is calculated, the calculated mean is used as the second fitting point, and the 1 adjacent reference pixel in the third reference pixel subset is used as the first fitting point.
[0292] In the above scheme, the prediction unit 1604 is specifically configured to perform prediction processing on the image component to be predicted for each pixel in the coding block based on the prediction model, so as to obtain the prediction value corresponding to the image component to be predicted for each pixel.
[0293] 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.
[0294] 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.
[0295] Therefore, this embodiment provides 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.
[0296] Based on the composition of the image component prediction device 160 and the computer storage medium described above, see [link to relevant documentation]. Figure 17 This illustrates the specific hardware structure of the image component prediction device 160 provided in this embodiment, which may include: a network interface 1701, a memory 1702, and a processor 1703; the various components are coupled together through a bus system 1704. It is understood that the bus system 1704 is used to realize the connection and communication between these components. In addition to a data bus, the bus system 1704 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 19 The various buses are all labeled as Bus System 1704. Among them, Network Interface 1701 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;
[0297] Memory 1702 is used to store computer programs that can run on processor 1703;
[0298] Processor 1703, when running the computer program, performs the following:
[0299] Obtain N neighboring reference pixels corresponding to the image component to be predicted of the coded block in the video image; wherein, the N neighboring reference pixels are reference pixels adjacent to the coded block, and N is a preset integer value;
[0300] By comparing the N first image component values corresponding to the N adjacent reference pixels, a first reference pixel subset and a second reference pixel subset are determined; wherein, a preset number of adjacent reference pixels correspond to a preset number of first image component values, the first reference pixel subset includes: two adjacent reference pixels corresponding to the smallest and second smallest first image component values among the preset number of first image component values, and the second reference pixel subset includes: two adjacent reference pixels corresponding to the largest and second largest first image component values among the preset number of first image component values;
[0301] Calculate the mean value of the N adjacent reference pixels to obtain the first mean point;
[0302] By comparing the first image component values of the first reference pixel subset and / or the second reference pixel subset using the first mean point, two fitting points are determined.
[0303] Based on the two fitting points, model parameters are determined, and a prediction model corresponding to the image component to be predicted is obtained according to the model parameters; wherein, the prediction model is used to perform prediction processing on the image component to be predicted in order to obtain the predicted value corresponding to the image component to be predicted.
[0304] It is understood that the memory 1702 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 memory 1702 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0305] The processor 1703 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 processor 1703 or by instructions in software form. The processor 1703 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 can be 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 memory 1702. Processor 1703 reads the information in memory 1702 and, in conjunction with its hardware, completes the steps of the above method.
[0306] It is understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described herein, or combinations thereof.
[0307] For software implementation, the techniques described herein can be achieved through modules (e.g., procedures, functions, etc.) that perform the functions described herein. The software code can be stored in memory and executed by a processor. The memory can be implemented within the processor or externally.
[0308] Alternatively, as another embodiment, the processor 1703 is also configured to perform the method described in any of the foregoing embodiments when running the computer program.
[0309] See Figure 18 This illustrates a schematic diagram of the composition structure of an encoder provided in an embodiment of this application. Figure 18 As shown, the encoder 180 may include at least the image component prediction device 160 described in any of the foregoing embodiments.
[0310] See Figure 19 This illustrates a schematic diagram of the composition structure of a decoder provided in an embodiment of this application. Figure 19 As shown, the decoder 190 may include at least the image component prediction device 160 as described in any of the foregoing embodiments.
[0311] 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.
[0312] 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.
[0313] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0314] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0315] 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.
[0316] 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.
[0317] Industrial applicability
[0318] In this embodiment, firstly, for the image component to be predicted in the coded block of the video image, N adjacent reference pixels are obtained. Here, N adjacent reference pixels are reference pixels adjacent to the coded block, and N is a preset integer value. Then, the N first image component values corresponding to the N adjacent reference pixels are compared to determine a first reference pixel subset and a second reference pixel subset. The first reference pixel subset includes two adjacent reference pixels corresponding to the smallest and second smallest first image component values among a preset number of first image component values. The second reference pixel subset includes two adjacent reference pixels corresponding to the largest and second largest first image component values among a preset number of first image component values. The N phase... The average value of neighboring reference pixels is used to obtain the first mean point. The first image component values of the first reference pixel subset and / or the second reference pixel subset are compared using the first mean point to determine two fitting points. Model parameters are then determined based on these two fitting points, and a prediction model corresponding to the image component to be predicted is obtained based on the model parameters to obtain the predicted value for the image component to be predicted. Thus, after the second comparison process, a preset number of neighboring reference pixels can be divided into multiple cases. Different two fitting points are used to construct prediction models for these multiple cases, which can improve the robustness of CCLM prediction. In other words, by optimizing the fitting points used in the derivation of model parameters, the constructed prediction model becomes more accurate, and the encoding and decoding prediction performance of video images is improved.
Claims
1. An image component prediction method, applied to a decoder, the method comprising: Determine the first set of reference pixels corresponding to the image components to be predicted in the current block; Based on the first set of reference pixels, a second set of reference pixels is determined, wherein the second set of reference pixels includes N adjacent reference pixels; The first image component values corresponding to the N adjacent reference pixels are compared multiple times to obtain a first reference pixel subset corresponding to the smallest and second smallest first image component values, and a second reference pixel subset corresponding to the largest and second largest first image component values; wherein, the first reference pixel subset includes adjacent reference pixels corresponding to the smallest and second smallest first image component values, and the second reference pixel subset includes adjacent reference pixels corresponding to the largest and second largest first image component values. The first image component of the first mean point is determined based on the first image component values corresponding to the N adjacent reference pixels. The first image component values of the first reference pixel subset and the second reference pixel subset are compared using the first image component of the first mean point to determine two fitting points. Based on the two fitting points, the model parameters of the prediction model are determined. The predicted value of the image component to be predicted is determined based on the prediction model and the reconstructed value of the first image component corresponding to the image component to be predicted.
2. The method according to claim 1, characterized in that, The step of determining the first reference pixel set corresponding to the image component to be predicted in the current block includes: Obtain reference pixels in reference rows and / or reference columns adjacent to the current block, wherein the reference rows and / or reference columns adjacent to the current block include: The rows adjacent to the top and top right edges of the current block; The columns adjacent to the left and lower left sides of the current block; or The row adjacent to the top edge and the column adjacent to the left edge of the current block; Based on the reference pixels, a first set of reference pixels corresponding to the image component to be predicted in the current block is determined.
3. The method according to claim 2, characterized in that, Determining the second reference pixel set based on the first reference pixel set includes: The position of the pixel to be selected is determined based on the pixel positions corresponding to adjacent reference pixels in the first reference pixel set; Based on the position of the pixel to be selected and the first set of reference pixels, adjacent reference pixels corresponding to the position of the pixel to be selected are determined to form a second set of reference pixels.
4. The method according to claim 3, characterized in that, The step of determining the position of the pixel to be selected based on the pixel positions of adjacent reference pixels in the first reference pixel set includes: If the pixel positions of adjacent reference pixels in the first reference pixel set include the positions of the rows adjacent to the top and top right sides of the current block, then four positions are determined from the positions of the rows adjacent to the top and top right sides of the current block as the positions of the pixel to be selected. If the pixel positions of adjacent reference pixels in the first reference pixel set include the positions of the columns adjacent to the left side and the lower left side of the current block, then four positions are determined from the positions of the columns adjacent to the left side and the lower left side of the current block as the positions of the pixel to be selected. If the pixel positions of adjacent reference pixels in the first reference pixel set include the positions of the row adjacent to the top edge and the column adjacent to the left edge of the current block, then two positions are determined from the positions of the row adjacent to the top edge of the current block and two positions are determined from the positions of the column adjacent to the left edge of the current block, as the positions of the pixel to be selected.
5. The method according to any one of claims 1 to 4, characterized in that, The step of comparing the first image component values of the first reference pixel subset and the second reference pixel subset using the first image component of the first mean point to determine two fitting points includes: Compare the first image component of the first mean point with the second smallest first image component value in the first reference pixel subset; When the first image component of the first mean point is greater than or equal to the second smallest first image component value in the first reference pixel subset, the first image component of the first mean point is compared with the second largest first image component value in the second reference pixel subset. When the first image component of the first mean point is less than or equal to the second largest first image component value in the second reference pixel subset, a second mean of the first image component is determined based on the first image component values corresponding to adjacent reference pixels in the first reference pixel subset; a second mean of the second image component is determined based on the second image component values corresponding to adjacent reference pixels in the first reference pixel subset; a first fitting point is determined based on the second mean of the first image component and the second mean of the second image component; a third mean of the first image component is determined based on the first image component values corresponding to adjacent reference pixels in the second reference pixel subset; a third mean of the second image component is determined based on the second image component values corresponding to adjacent reference pixels in the second reference pixel subset; and a second fitting point is determined based on the third mean of the first image component and the third mean of the second image component; wherein the two fitting points include the first fitting point and the second fitting point.
6. An image component prediction method applied to an encoder, the method comprising: Determine the first set of reference pixels corresponding to the image components to be predicted in the current block; Based on the first set of reference pixels, a second set of reference pixels is determined, wherein the second set of reference pixels includes N adjacent reference pixels; The first image component values corresponding to the N adjacent reference pixels are compared multiple times to obtain a first reference pixel subset corresponding to the smallest and second smallest first image component values, and a second reference pixel subset corresponding to the largest and second largest first image component values; wherein, the first reference pixel subset includes adjacent reference pixels corresponding to the smallest and second smallest first image component values, and the second reference pixel subset includes adjacent reference pixels corresponding to the largest and second largest first image component values. The first image component of the first mean point is determined based on the first image component values corresponding to the N adjacent reference pixels. The first image component values of the first reference pixel subset and the second reference pixel subset are compared using the first image component of the first mean point to determine two fitting points. Based on the two fitting points, the model parameters of the prediction model are determined. The predicted value of the image component to be predicted is determined based on the prediction model and the reconstructed value of the first image component corresponding to the image component to be predicted.
7. The method according to claim 6, characterized in that, The step of determining the first reference pixel set corresponding to the image component to be predicted in the current block includes: Obtain reference pixels in reference rows and / or reference columns adjacent to the current block, wherein the reference rows and / or reference columns adjacent to the current block include: The rows adjacent to the top and top right edges of the current block; The columns adjacent to the left and lower left sides of the current block; or The row adjacent to the top edge and the column adjacent to the left edge of the current block; Based on the reference pixels, a first set of reference pixels corresponding to the image component to be predicted in the current block is determined.
8. The method according to claim 7, characterized in that, Determining the second reference pixel set based on the first reference pixel set includes: The position of the pixel to be selected is determined based on the pixel position corresponding to the adjacent reference pixel in the first reference pixel set; Based on the position of the pixel to be selected and the first set of reference pixels, adjacent reference pixels corresponding to the position of the pixel to be selected are determined to form a second set of reference pixels.
9. The method according to claim 8, characterized in that, The step of determining the position of the pixel to be selected based on the pixel positions of adjacent reference pixels in the first reference pixel set includes: If the pixel positions of adjacent reference pixels in the first reference pixel set include the positions of the rows adjacent to the top and top right sides of the current block, then four positions are determined from the positions of the rows adjacent to the top and top right sides of the current block as the positions of the pixel to be selected. If the pixel positions of adjacent reference pixels in the first reference pixel set include the positions of the columns adjacent to the left side and the lower left side of the current block, then four positions are determined from the positions of the columns adjacent to the left side and the lower left side of the current block as the positions of the pixel to be selected. If the pixel positions of adjacent reference pixels in the first reference pixel set include the positions of the row adjacent to the top edge and the column adjacent to the left edge of the current block, then two positions are determined from the positions of the row adjacent to the top edge of the current block and two positions are determined from the positions of the column adjacent to the left edge of the current block, as the positions of the pixel to be selected.
10. The method according to any one of claims 6 to 9, characterized in that, The step of comparing the first image component values of the first reference pixel subset and the second reference pixel subset using the first image component of the first mean point to determine two fitting points includes: Compare the first image component of the first mean point with the second smallest first image component value in the first reference pixel subset; When the first image component of the first mean point is greater than or equal to the second smallest first image component value in the first reference pixel subset, the first image component of the first mean point is compared with the second largest first image component value in the second reference pixel subset. When the first image component of the first mean point is less than or equal to the second largest first image component value in the second reference pixel subset, a second mean of the first image component is determined based on the first image component values corresponding to adjacent reference pixels in the first reference pixel subset; a second mean of the second image component is determined based on the second image component values corresponding to adjacent reference pixels in the first reference pixel subset; a first fitting point is determined based on the second mean of the first image component and the second mean of the second image component; a third mean of the first image component is determined based on the first image component values corresponding to adjacent reference pixels in the second reference pixel subset; a third mean of the second image component is determined based on the second image component values corresponding to adjacent reference pixels in the second reference pixel subset; and a second fitting point is determined based on the third mean of the first image component and the third mean of the second image component; wherein the two fitting points include the first fitting point and the second fitting point.
11. An image component prediction device applied to an encoder, the image component prediction device comprising an acquisition unit, a filtering unit, a comparison unit, a calculation unit, and a prediction unit, wherein: The acquisition unit is configured to determine the first reference pixel set corresponding to the image component to be predicted in the current block; The filtering unit is configured to determine a second reference pixel set based on the first reference pixel set, wherein the second reference pixel set includes N adjacent reference pixel points; The comparison unit is configured to perform multiple comparisons on the first image component values corresponding to the N adjacent reference pixels to obtain a first reference pixel subset corresponding to the smallest and second smallest first image component values, and a second reference pixel subset corresponding to the largest and second largest first image component values; wherein, the first reference pixel subset includes adjacent reference pixels corresponding to the smallest and second smallest first image component values, and the second reference pixel subset includes adjacent reference pixels corresponding to the largest and second largest first image component values. The acquisition unit is further configured to: determine a first mean value of a first image component based on the first image component values corresponding to adjacent reference pixels in the first reference pixel subset; determine a first mean value of a second image component based on the second image component values corresponding to adjacent reference pixels in the first reference pixel subset; determine a second mean value of a first image component based on the first image component values corresponding to adjacent reference pixels in the second reference pixel subset; and determine a second mean value of a second image component based on the second image component values corresponding to adjacent reference pixels in the second reference pixel subset. The calculation unit is configured to determine the first image component of the first mean point based on the first image component values corresponding to the N adjacent reference pixels. The comparison unit is further configured to compare the first image component values of the first reference pixel subset and the second reference pixel subset using the first image component of the first mean point to determine two fitting points. The prediction unit is configured to determine the model parameters of the prediction model based on the two fitting points; and to determine the predicted value of the image component to be predicted based on the prediction model and the reconstructed value of the first image component corresponding to the image component to be predicted.
12. An encoder, the encoder comprising a memory and a processor, wherein: The memory is used to store computer programs that can run on the processor; The processor is configured to perform the method as described in any one of claims 6 to 10 when running the computer program.
13. An image component prediction device applied to a decoder, the image component prediction device comprising an acquisition unit, a filtering unit, a comparison unit, a calculation unit, and a prediction unit, wherein: The acquisition unit is configured to determine the first reference pixel set corresponding to the image component to be predicted in the current block; The filtering unit is configured to determine a second reference pixel set based on the first reference pixel set, wherein the second reference pixel set includes N adjacent reference pixel points; The comparison unit is configured to perform multiple comparisons on the first image component values corresponding to the N adjacent reference pixels to obtain a first reference pixel subset corresponding to the smallest and second smallest first image component values, and a second reference pixel subset corresponding to the largest and second largest first image component values; wherein, the first reference pixel subset includes adjacent reference pixels corresponding to the smallest and second smallest first image component values, and the second reference pixel subset includes adjacent reference pixels corresponding to the largest and second largest first image component values. The acquisition unit is further configured to determine a first mean value of the first image component based on the first image component values corresponding to adjacent reference pixels in the first reference pixel subset; determine a first mean value of the second image component based on the second image component values corresponding to adjacent reference pixels in the first reference pixel subset; determine a second mean value of the first image component based on the first image component values corresponding to adjacent reference pixels in the first reference pixel subset; and determine a second mean value of the second image component based on the second image component values corresponding to adjacent reference pixels in the first reference pixel subset. The calculation unit is configured to determine the first image component of the first mean point based on the first image component values corresponding to the N adjacent reference pixels. The comparison unit is further configured to compare the first image component values of the first reference pixel subset and the second reference pixel subset using the first image component of the first mean point to determine two fitting points. The prediction unit is configured to determine the model parameters of the prediction model based on the two fitting points; and to determine the predicted value of the image component to be predicted based on the prediction model and the reconstructed value of the first image component corresponding to the image component to be predicted.
14. A decoder, characterized in that, The decoder includes a memory and a processor, wherein: The memory is used to store computer programs that can run on the processor; The processor is configured to perform the method as described in any one of claims 1 to 5 when running the computer program.
15. A computer storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 5, or the method as described in any one of claims 6 to 10.
16. A computer-readable storage medium storing a bitstream thereon, characterized in that, The bitstream is generated by performing the steps of the method as described in any one of claims 6 to 10.