Image component prediction method and device and computer storage medium
By optimizing the selection of fit points in the image component prediction model and determining more accurate model parameters, the problem of inaccurate image component prediction model in the prior art is solved, and the encoding and codec performance of video images is improved.
Patent Information
- Application Number
- CN202411681711.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2019-06-25
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2039-06-25
AI Technical Summary
In the existing video encoding technology, the accuracy of the image component prediction model is affected by the unreasonable selection of adjacent reference pixels, resulting in a degradation of the video image encoding and decoding performance.
By optimizing the fitting points used in model parameter derivation, obtain N adjacent reference pixel points corresponding to the image components to be predicted in the encoded block in the video image, compare the image component values of these pixel points, and determine different subsets of reference pixels. And compare the mean points to determine the two fit points, thereby determining more accurate model parameters.
This improves the robustness of image component prediction, makes the constructed prediction model more accurate, and improves the encoding and decoding prediction performance of video images.
Smart Images

Figure CN119520818A_ABST
Abstract
Description
[0001] Description of the case
[0002] This application is a divisional application based on a patent application with an application date of June 25, 2019, application number 201980084801.1, and invention name “Image component prediction method, device and computer storage medium”. Technical Field
[0003] The embodiments of the present application relate to the field of video coding and decoding technology, and in particular, to an image component prediction method, device and computer storage medium. Background Art
[0004] As people's requirements for video display quality increase, new video applications 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 rapid development of video applications. The Joint Video Exploration Team (JVET) has proposed the next-generation video coding standard H.266 / Versatile Video Coding (VVC), and its corresponding test model is the VVC reference software test platform (VVC Test Model, VTM).
[0005] In VTM, a prediction model-based image component prediction method has been integrated, through which the chrominance component can be predicted from the luminance component of the current coding block (CB). However, when constructing the prediction model, the selection of adjacent reference pixels for model parameter derivation is unreasonable, resulting in an inaccurate prediction model, which reduces the encoding and decoding prediction performance of the video image. Summary of the invention
[0006] The embodiments of the present application provide an image component prediction method, device and computer storage medium, which improve the robustness of the prediction by optimizing the fitting points used for deriving model parameters, thereby making the constructed prediction model more accurate and improving the encoding and decoding prediction performance of the video image.
[0007] The technical solution of the embodiment of the present application can be implemented as follows:
[0008] In a first aspect, an embodiment of the present application provides an image component prediction method, the method comprising:
[0009] Obtaining N adjacent reference pixel points corresponding to the image component to be predicted of the coding block in the video image; wherein the N adjacent reference pixel points are reference pixel points adjacent to the coding block, and N is a preset integer value;
[0010] Comparing the N first image component values corresponding to the N adjacent reference pixels, determining a first reference pixel subset and a second reference pixel subset; wherein a preset number of adjacent reference pixels corresponds to a preset number of first image component values, the first reference pixel subset includes: two adjacent reference pixels corresponding to a minimum first image component value and a second minimum first image component value among the preset number of first image component values, and the second reference pixel subset includes: two adjacent reference pixels corresponding to a maximum first image component value and a second maximum first image component value among the preset number of first image component values;
[0011] Calculate the mean of the N adjacent reference pixel points to obtain a first mean point;
[0012] Comparing the first image component values of the first reference pixel subset and / or the second reference pixel subset by using the first mean point to determine two fitting points;
[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 implement prediction processing of the image component to be predicted to obtain a prediction value corresponding to the image component to be predicted.
[0014] In a second aspect, an embodiment of the present application provides an image component prediction device, the image component prediction device comprising: 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 pixel points corresponding to the image component to be predicted of the coding block in the video image; wherein the N adjacent reference pixel points are reference pixel points adjacent to the coding 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 corresponds to a preset number of first image component values, the first reference pixel subset includes: two adjacent reference pixels corresponding to a minimum first image component value and a second minimum first image component value among the preset number of first image component values, and the second reference pixel subset includes: two adjacent reference pixels corresponding to a maximum first image component value and a second maximum first image component value among the preset number of first image component values;
[0017] The calculation unit is configured to calculate the average of the N adjacent reference pixel points to obtain a first average 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 through 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 implement prediction processing of the image component to be predicted to obtain a prediction value corresponding to the image component to be predicted.
[0020] In a third aspect, an embodiment of the present application provides an image component prediction device, the image component prediction device comprising: a memory and a processor;
[0021] The memory is used to store a computer program that can be run on the processor;
[0022] The processor is used to execute the method described in the first aspect when running the computer program.
[0023] In a fourth aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores an image component prediction program, and when the image component prediction program is executed by at least one processor, the method described in the first aspect is implemented.
[0024] The embodiment of the present application provides an image component prediction method, device and computer storage medium. First, for the image component to be predicted of a coding block in a video image, N adjacent reference pixels are obtained, where the N adjacent reference pixels are reference pixels adjacent to the coding block, and N is a preset integer value; then, 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, wherein the first reference pixel subset includes: two adjacent reference pixels corresponding to the minimum first image component value and the second minimum first image component value among a preset number of first image component values, and the second reference pixel subset includes: two adjacent reference pixels corresponding to the maximum first image component value and the second maximum first image component value among a preset number of first image component values. pixel points; calculating the mean of the N adjacent reference pixel points to obtain a first mean point; comparing the first image component value of the first reference pixel subset and / or the second reference pixel subset through the first mean point to determine two fitting points; then determining the model parameters based on the two fitting points, and obtaining the prediction model corresponding to the image component to be predicted according to the model parameters to obtain the prediction value corresponding to the image component to be predicted; in this way, after the second comparison processing, the preset number of adjacent reference pixel points can be divided into multiple situations, and the prediction model is constructed using two different fitting points for these multiple situations, which can improve the robustness of CCLM prediction; that is, by optimizing the fitting points used for deriving the model parameters, the constructed prediction model is more accurate and the encoding and decoding prediction performance of the video image is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 A schematic diagram of the distribution of effective adjacent areas provided for the relevant technical solution;
[0026] Figure 2 A distribution diagram of selected areas in three modes provided for a related technical solution;
[0027] Figure 3 A flow chart of a traditional solution for deriving model parameters provided for related technical solutions;
[0028] Figure 4A A schematic diagram of a prediction model under a traditional solution provided for a related technical solution;
[0029] Figure 4B A schematic diagram of a prediction model under another traditional solution provided for the related technical solution;
[0030] Figure 5 A schematic block diagram of a video encoding system provided in an embodiment of the present application;
[0031] Figure 6A schematic block diagram of a video decoding system provided in an embodiment of the present application;
[0032] Figure 7 A schematic diagram of a flow chart of an image component prediction method provided in an embodiment of the present application;
[0033] Fig. 8A A schematic diagram of a structure for selecting adjacent reference pixels in the INTRA_LT_CCLM mode provided in an embodiment of the present application;
[0034] Figure 8B A schematic diagram of a structure for selecting adjacent reference pixels in an INTRA_L_CCLM mode provided in an embodiment of the present application;
[0035] Figure 8C A schematic diagram of a structure for selecting adjacent reference pixels in an INTRA_T_CCLM mode provided in an embodiment of the present application;
[0036] Fig. 9 A schematic diagram of a flow chart of another image component prediction method provided in an embodiment of the present application;
[0037] Fig.10 A schematic diagram of a flow chart of a model parameter derivation solution provided in an embodiment of the present application;
[0038] Fig.11 A schematic diagram comparing the prediction models of the present application scheme and the traditional scheme provided in the embodiment of the present application;
[0039] Fig.12 A schematic diagram comparing the prediction models of another solution of the present application and the traditional solution provided in the embodiment of the present application;
[0040] Fig.13 A schematic diagram comparing prediction models under another embodiment of the present application and a traditional solution;
[0041] Fig.14 A schematic diagram of a structure for determining a fitting point provided in an embodiment of the present application;
[0042] Fig.15 A schematic diagram of the structure of a prediction model provided in an embodiment of the present application;
[0043] Fig.16 A schematic diagram of the structure of an image component prediction device provided in an embodiment of the present application;
[0044] Fig.17 A schematic diagram of a specific hardware structure of an image component prediction device provided in an embodiment of the present application;
[0045] Fig.18A schematic diagram of the structure of an encoder provided in an embodiment of the present application;
[0046] Fig.19 A schematic diagram of the composition structure of a decoder provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] In order to enable a more detailed understanding of the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application.
[0048] In a video image, a first image component, a second image component and a third image component are generally used to represent a coding block; wherein the three image components are a brightness component, a blue chrominance component and a red chrominance component, respectively. Specifically, the brightness 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; in this way, the video image can be represented in the YCbCr format or in the YUV format.
[0049] In the embodiment of the present application, the first image component may be a brightness component, the second image component may be a blue chrominance component, and the third image component may be a red chrominance component, but the embodiment of the present application does not make any specific limitation.
[0050] In the current video image or video encoding and decoding process, the cross-component prediction technology mainly includes the cross-component linear model prediction (CCLM) mode and the multi-directional linear model prediction (MDLM) mode. Regardless of the model parameters derived according to the CCLM mode or the model parameters derived according to the MDLM mode, the corresponding prediction models can realize the prediction between image components such as the first image component to the second image component, the second image component to the first image component, the first image component to the third image component, the third image component to the first image component, the second image component to the third image component, or the third image component to the 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 of the same coding block, that is, the prediction value of the second image component is constructed according to the reconstruction value of the first image component of the same coding block, as shown in formula (1):
[0052] PredC [i,j]=α·Rec L [i,j]+β (1)
[0053] Among them, i, j represent the position coordinates of the pixel point in the coding block, i represents the horizontal direction, j represents the vertical direction, Pred C [i,j] represents the predicted value of the second image component corresponding to the pixel point with the position coordinates [i,j] in the coding block, Pred L [i, j] represents the reconstructed value of the first image component corresponding to the pixel point with the position coordinates [i, j] (after downsampling) in the same coding block, and α and β represent model parameters.
[0054] For a coding block, its adjacent areas may include a left adjacent area, an upper adjacent area, a lower left adjacent area, and an upper right adjacent area. In VVC, three cross-component linear model prediction modes may be included, namely: an intra-frame CCLM mode adjacent to the left and upper sides (which may be represented by the INTRA_LT_CCLM mode), an intra-frame CCLM mode adjacent to the left and lower left sides (which may be represented by the INTRA_L_CCLM mode), and an intra-frame CCLM mode adjacent to the upper and upper right sides (which may be represented by the INTRA_T_CCLM mode). In these three modes, each mode may select a preset number (for example, 4) of adjacent reference pixels for the derivation of model parameters α and β, and the biggest difference between these three modes is that the selected areas corresponding to the adjacent reference pixels used to derive the model parameters α and β are different.
[0055] Specifically, for the encoding block size corresponding to the second image component is W×H, assuming that the upper selection area corresponding to the adjacent reference pixel points is W', and the left selection area corresponding to the adjacent reference pixel points is H'; thus,
[0056] For INTRA_LT_CCLM mode, adjacent reference pixels can be selected from the upper adjacent area and the left adjacent area, that is, W'=W, H'=H;
[0057] For the INTRA_L_CCLM mode, the adjacent reference pixels can be selected from the left adjacent area and the lower left adjacent area, that is, H'=W+H, and W'=0;
[0058] For the INTRA_T_CCLM mode, adjacent reference pixels may be selected from the upper adjacent region and the upper right adjacent region, that is, W'=W+H, and H=0 is set.
[0059] It should be noted that in VVC's latest reference software VTM5.0, only pixels in the W range are stored in the upper right adjacent area, and only pixels in the H range are stored in the lower left adjacent area; therefore, although the range of the selection area of the INTRA_L_CCLM mode and the INTRA_T_CCLM mode is defined as W+H, in actual applications, the selection area of the INTRA_L_CCLM mode will be limited to H+H, and the selection area of the INTRA_T_CCLM mode will be limited to W+W; in this way,
[0060] For the INTRA_L_CCLM mode, adjacent reference pixels can be selected from the left adjacent area and the lower left adjacent area, H' = min{W+H,H+H};
[0061] For the INTRA_T_CCLM mode, adjacent reference pixels can be selected from the upper adjacent area and the upper right adjacent area, W'=min{W+H,W+W}.
[0062] See also Figure 1 , which shows a schematic diagram of the distribution of effective adjacent areas provided by the relevant technical solution. Figure 1 In , the left adjacent area, the lower left adjacent area, the upper adjacent area, and the upper right adjacent area are all valid. Figure 1 Based on the selection area for the three modes, Figure 2 As shown. Figure 2 In the figure, (a) represents the selection area of the INTRA_LT_CCLM mode, including the left adjacent area and the upper adjacent area; (b) represents the selection area of the INTRA_L_CCLM mode, including the left adjacent area and the lower left adjacent area; (c) represents the selection area of the INTRA_T_CCLM mode, including the upper adjacent area and the upper right adjacent area. In this way, after determining the selection areas of the three modes, reference points for model parameter derivation can be selected in the selection areas. The reference points selected in this way can be called adjacent reference pixel points. Usually, the number of adjacent reference pixel points is at most 4; and for a W×H coding block of a certain size, the positions of its adjacent reference pixel points are generally determined.
[0063] After obtaining the adjacent reference pixels, according to the number of valid pixels, the current method is to Figure 3 The flow chart of the traditional scheme for deriving model parameters is shown in FIG. Figure 3 The process shown, assuming that the image component to be predicted is a chrominance component, the process may include:
[0064] S301: Acquire adjacent reference pixels from the selected area;
[0065] S302: Determine the number of valid pixels among adjacent reference pixels;
[0066] S303: setting the first model parameter to 0 and the second model parameter to a default value;
[0067] S304: Fill the chromaticity prediction value with a default value;
[0068] S305: Obtain four valid pixel points by “copying”;
[0069] S306: After four comparisons, two pixel points with larger brightness components and two pixel points with smaller brightness components are obtained;
[0070] S307: Calculate two mean points;
[0071] S308: Using the two mean points as fitting points to derive first model parameters and second model parameters;
[0072] S309: Perform prediction processing of chrominance components according to 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 the number of valid pixels is 0, the predicted value Pred corresponding to the chrominance component of all pixels in the current coding block can be C [i,j] are all filled with the default value of the chroma component; in the embodiment of the present application, the default value is the middle value of the chroma component. Assuming that the bit depth of the chroma component is represented by BitDepthC, it can be obtained that the calculation method of the middle value is 1<<(BitDepthC-1). Exemplarily, assuming that the current video image is an 8-bit video, then the component range corresponding to the chroma component is 0 to 255, and the middle value is 128 at this time. At this time, the preset component value can be 128; assuming that the current video image is a 10-bit video, then the component range corresponding to the chroma component is 0 to 1023, and the middle value is 512 at this time. At this time, the preset component value can be 512.
[0075] It can be understood that the prediction model is constructed using the principle of "two points determine a straight line"; the two points here can be called fitting points. In the current traditional scheme, after obtaining four valid pixels, two adjacent reference pixels with larger brightness components and two adjacent reference pixels with smaller brightness components are obtained through four comparisons; then a mean point is calculated based on the two adjacent reference pixels with larger brightness components (which can be expressed as mean max According to the two adjacent reference pixels with smaller brightness components, another mean point is obtained (which can be represented by mean min Indicates), get two mean points mean max and mean min ; then mean max and mean min As two fitting points, model parameters (which can be represented by α and β) are derived, and finally a prediction model is constructed according to the model parameters, and the prediction processing of the chrominance component is performed according to the prediction model.
[0076] That is to say, when deriving model parameters, taking 4 adjacent reference pixels as an example, the mean of the 2 larger adjacent reference pixels and the mean of the 2 smaller adjacent reference pixels are used as two fitting points to derive model parameters. Figure 4A Schematic diagram of the prediction model under the traditional scheme shown in FIG. 1 ; wherein the abscissa of the coordinate axis represents the brightness value (which can be represented by Luma), the ordinate of the coordinate axis represents the chromaticity value (which can be represented by chroma), the four black dots are four adjacent reference pixels, the two gray dots are the mean points corresponding to the two larger adjacent reference pixels and the mean points corresponding to the two smaller adjacent reference pixels (i.e., two fitting points) among the four adjacent reference pixels, and the gray oblique line represents the prediction model constructed based on the two fitting points; the gray dotted line is the prediction model fitted by the least mean square algorithm (LMS) for the four adjacent reference pixels; from Figure 4A It can be seen that the gray oblique line is close to the gray dotted line, that is, the prediction model constructed by the traditional scheme can accurately fit the distribution of these four adjacent reference pixels.
[0077] However, when the four adjacent reference pixels are non-uniformly distributed, the prediction model constructed by the traditional scheme cannot accurately fit the distribution of the four adjacent reference pixels. Figure 4B A schematic diagram of a prediction model under another traditional scheme is shown; Figure 4BIt can be seen that there is a certain deviation between the gray oblique line and the gray dotted line, that is, the prediction model constructed by the traditional scheme cannot fit the distribution of the four adjacent reference pixels well. In other words, the current traditional scheme lacks robustness in the process of model parameter derivation and cannot fit well when the four adjacent reference pixels are unevenly distributed.
[0078] In order to improve the robustness of CCLM prediction and improve the encoding and decoding performance, an embodiment of the present application provides an image component prediction method, for the image component to be predicted of a coding block in a video image, N adjacent reference pixel points are obtained, where the N adjacent reference pixel points are reference pixel points adjacent to the coding block, and N is a preset integer value; N first image component values corresponding to the N adjacent reference pixel points are compared to determine a first reference pixel subset and a second reference pixel subset, wherein the first reference pixel subset includes: two adjacent reference pixel points corresponding to the minimum first image component value and the second minimum first image component value among a preset number of first image component values, and the second reference pixel subset includes: two adjacent reference pixel points corresponding to the maximum first image component value and the second maximum first image component value among a preset number of first image component values. two adjacent reference pixel points; calculating the mean of the N adjacent reference pixel points to obtain a first mean point; comparing the first image component value of the first reference pixel subset and / or the second reference pixel subset through 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 according to the model parameters to obtain a prediction value corresponding to the image component to be predicted; in this way, after the second comparison process, a preset number of adjacent reference pixel points can be divided into multiple situations, and two different fitting points are used to construct a prediction model for these multiple situations, which can improve the robustness of CCLM prediction; that is, by optimizing the fitting points used for deriving the model parameters, the constructed prediction model is more accurate and the encoding and decoding prediction performance of the video image is improved.
[0079] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0080] See also Figure 5 , which shows an example of a block diagram of a video encoding system provided by an embodiment of the present application; 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 analysis unit 507, a filtering unit 508, a coding unit 509 and a decoded image cache unit 510, etc., wherein the filtering unit 508 can implement deblocking filtering and sample adaptive offset (Sample Adaptive 0ffset, SAO) filtering, and the coding unit 509 can implement header information encoding and context-based adaptive binary arithmetic coding (Context-based Adaptive Binary Arithmatic Coding, CABAC). For the input original video signal, through the coding tree block (Coding A video coding block can be obtained by dividing the video coding block into a plurality of blocks (CTUs) by a plurality of tree units (CTUs). Then, the residual pixel information obtained after intra-frame or inter-frame prediction is transformed by a transform and quantization unit 501, including transforming the residual information from a pixel domain to a transform domain, and quantizing the obtained transform coefficients to further reduce the bit rate. An intra-frame estimation unit 502 and an intra-frame prediction unit 503 are used to perform intra-frame prediction on the video coding block. Specifically, the intra-frame estimation unit 502 and the intra-frame prediction unit 503 are used to determine an intra-frame prediction mode to be used for encoding the video coding block. A motion compensation unit 504 and a 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 the motion estimation unit 505 is a process of generating a motion vector, which can estimate the motion of the video coding block. Then, the motion compensation unit 504 calculates the motion vector based on the motion vector determined by the motion estimation unit 505. The motion vector performs motion compensation; after determining the intra-frame prediction mode, the intra-frame prediction unit 503 is also used to provide the selected intra-frame prediction data to the encoding unit 509, and the motion estimation unit 505 also sends the calculated motion vector data to the encoding unit 509; in addition, the inverse transform and inverse quantization unit 506 is used to reconstruct the video coding block, reconstruct the residual block in the pixel domain, and the reconstructed residual block is removed by the filter control analysis unit 507 and the filtering unit 508. The block effect artifacts are then removed, and the reconstructed residual block is then added to a predictive block in the frame of the decoded image cache unit 510 to generate a reconstructed video coding block; the encoding 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-frame prediction mode and output the code stream of the video signal; and the decoded image cache unit 510 is used to store the reconstructed video coding block for prediction reference.As the video image encoding proceeds, new reconstructed video encoding blocks are continuously generated, and these reconstructed video encoding blocks are stored in the decoded image buffer unit 510 .
[0081] See also Figure 6 , which shows an example of a block diagram of a video decoding system provided by an embodiment of the present application; 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 decoded image buffer unit 606, etc., wherein the decoding unit 601 can implement header information decoding and CABAC decoding, and the filtering unit 605 can implement deblocking filtering and SAO filtering. The input video signal is Figure 7 After the encoding process, the code stream of the video signal is output; the code stream is input into the video decoding system 600, and first passes through the decoding unit 601 to obtain the decoded transform coefficients; the transform coefficients are 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 be used to generate prediction data of the current video decoding block based on the determined intra-frame prediction mode and the data of the previously decoded blocks from the current frame or picture; the motion compensation unit 604 determines the prediction information for the video decoding block by analyzing the motion vector and other associated syntax elements, and uses the prediction information The decoded video block is formed by summing the residual block from the inverse transform and inverse quantization unit 602 and the corresponding predictive block generated by the intra-frame prediction unit 603 or the motion compensation unit 604; the decoded video signal passes through the filtering unit 605 to remove the block effect artifacts, which can improve the video quality; and then the decoded video block is stored in the decoded image buffer unit 606, which stores the reference image used for subsequent intra-frame prediction or motion compensation, and is also used for the output of the video signal, that is, the restored original video signal is obtained.
[0082] The image component prediction method in the embodiment of the present application is mainly used in Figure 5 The intra-frame prediction unit 503 shown in FIG. Figure 6The intra-frame prediction unit 603 part shown is specifically applied to the CCLM prediction part in the intra-frame prediction. That is to say, the image component prediction method in the embodiment of the present application can be applied to both the video encoding system and the video decoding system, and can even be applied to both the video encoding system and the video decoding system at the same time, but the embodiment of the present application does not make specific limitations. When the method is applied to the intra-frame prediction unit 503 part, the "encoded block in the video image" specifically refers to the current encoded block in the intra-frame prediction; when the method is applied to the intra-frame prediction unit 603 part, the "encoded block in the video image" specifically refers to the current decoded block in the intra-frame prediction.
[0083] Based on the above Figure 5 or Figure 6 For an example of an application scenario, see Figure 7 , which shows a schematic flow chart of an image component prediction method provided by an embodiment of the present application. Figure 7 As shown, the method may include:
[0084] S701: Obtain N adjacent reference pixel points corresponding to the image component to be predicted of the coding block in the video image;
[0085] It should be noted that the N adjacent reference pixels here are reference pixel points adjacent to the coding block, and N is a preset integer value, which can also be called a preset number. Among them, the video image can be divided into multiple coding blocks, each coding block can include a first image component, a second image component and a third image component, and the coding block in the embodiment of the present application is the current block to be encoded in the video image. When the first image component needs to be predicted by a prediction model, the image component to be predicted is the first image component; when the second image component needs to be predicted by a prediction model, the image component to be predicted is the second image component; when the third image component needs to be predicted by a prediction model, the image component to be predicted is the third image component.
[0086] In this way, a preset number of adjacent reference pixels can be obtained from the reference pixels adjacent to the coding block to determine the fitting points used for model parameter derivation. In addition, the value of N can generally be 4, but this embodiment of the present application does not specifically limit it.
[0087] In some embodiments, for S701, obtaining N adjacent reference pixel points corresponding to the image component to be predicted of the coding block in the video image may include:
[0088] S701-1: Obtain a first reference pixel set corresponding to a to-be-predicted image component of a coding block in a video image;
[0089] It should be noted that when the left adjacent area, the lower left adjacent area, the upper adjacent area and the upper right adjacent area are all valid areas, for the INTRA_LT_CCLM mode, the first reference pixel set is composed of adjacent reference pixel points in the left adjacent area and the upper adjacent area of the coding block, such as Figure 2 As shown in (a); for the INTRA_L_CCLM mode, the first reference pixel set is composed of adjacent reference pixel points in the left adjacent area and the lower left adjacent area of the coding block, such as Figure 2 As shown in (b); for the INTRA_T_CCLM mode, the first reference pixel set is composed of adjacent reference pixel points in the upper adjacent area and the upper right adjacent area of the coding block, such as Figure 2 As shown in (c).
[0090] In some embodiments, optionally, for S701-1, obtaining a first reference pixel set corresponding to a to-be-predicted image component of a coding block in a video image may include:
[0091] Acquire a reference pixel point adjacent to at least one edge of the coding block; wherein the at least one edge includes a left edge of the coding block and / or an upper edge of the coding block;
[0092] Based on the reference pixels, a first reference pixel set corresponding to the image component to be predicted is formed.
[0093] It should be noted that at least one edge of the coding block may refer to the upper side of the coding block, or the left side of the coding block, or even the upper and left sides of the coding block, which is not specifically limited in the embodiments of the present application.
[0094] In this way, for the INTRA_LT_CCLM mode, when the left adjacent area and the upper adjacent area are all valid areas, the first reference pixel set can be composed of reference pixel points adjacent to the left side of the coding block and the reference pixel points adjacent to the upper side of the coding block. When the left adjacent area is a valid area and the upper adjacent area is an invalid area, the first reference pixel set can be composed of reference pixel points adjacent to the left side of the coding block; when the left adjacent area is an invalid area and the upper adjacent area is a valid area, the first reference pixel set can be composed of reference pixel points adjacent to the upper side of the coding block.
[0095] In some embodiments, optionally, for S701-1, obtaining a first reference pixel set corresponding to a to-be-predicted image component of a coding block in a video image may include:
[0096] Obtain reference pixel points in a reference row or reference column adjacent to the coding block; wherein the reference row is composed of rows adjacent to the upper side and the upper right side of the coding block, and the reference column is composed of columns adjacent to the left side and the lower left side of the coding block;
[0097] Based on the reference pixels, a first reference pixel set 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 may refer to a reference row adjacent to the upper side of the coding block, or may refer to a reference column adjacent to the left side of the coding block, or may even refer to a reference row or reference column adjacent to other sides of the coding block, and the embodiment of the present application does not specifically limit this. For the convenience of description, in the embodiment of the present application, the reference row adjacent to the coding block will be described by taking the reference row adjacent to the upper side as an example, and the reference column adjacent to the coding block will be described by taking the reference column adjacent to the left side as an example.
[0099] Among them, the reference pixel points in the reference row adjacent to the coding block may include reference pixel points adjacent to the upper side and the upper right side (also referred to as adjacent reference pixel points corresponding to the upper side and the upper right side), wherein the upper side represents the upper side of the coding block, and the upper right side represents the side length that is horizontally extended to the right by the upper side of the coding block and is the same as the height of the current coding block; the reference pixel points in the reference column adjacent to the coding block may also include reference pixel points adjacent to the left side and the lower left side (also referred to as adjacent reference pixel points corresponding to the left side and the lower left side), wherein the left side represents the left side of the coding block, and the lower left side represents the side length that is vertically extended downward by the left side of the coding block and is the same as the width of the current decoding block; however, the embodiments of the present application do not make specific limitations.
[0100] In this way, for the INTRA_L_CCLM mode, when the left adjacent area and the lower left adjacent area are valid areas, the first reference pixel set can be composed of reference pixel points in the reference column adjacent to the coding block; for the INTRA_T_CCLM mode, when the upper adjacent area and the upper right adjacent area are valid areas, the first reference pixel set can be composed of reference pixel points in the reference row adjacent to the coding block.
[0101] S701-2: Screening the first reference pixel set to obtain a second reference pixel set; wherein the second reference pixel set includes N adjacent reference pixel points;
[0102] It should be noted that in the first parameter pixel set, there may be some unimportant reference pixels (for example, these reference pixels have poor correlation) or some abnormal reference pixels. In order to ensure the accuracy of the prediction model, these reference pixels need to be eliminated to obtain the second reference pixel set; among them, the number of valid pixels contained in the second reference pixel set is usually selected as 4 in actual applications, but this is not specifically limited in the embodiments of the present application.
[0103] In some embodiments, for S701-2, the screening the first reference pixel set to obtain the second reference pixel set may include:
[0104] Determine a position of a pixel to be selected based on a pixel position and / or an image component intensity corresponding to each adjacent reference pixel in the first reference pixel set;
[0105] According to 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 formed into a second reference pixel set; wherein the second reference pixel set includes N adjacent reference pixels.
[0106] It should be noted that the intensity of the image component can be represented by an image component value, such as a brightness value, a chromaticity value, etc. Here, the larger the image component value, the higher the image component intensity. In this way, the first reference pixel set can be screened according to the position of the reference pixel to be selected, or according to the image component intensity (such as a brightness value, a chromaticity value, etc.), so that the screened reference pixel points to be selected form the second reference pixel set. The following description will be taken as an example of the position of the reference pixel point to be selected.
[0107] Exemplarily, assuming that 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 screening method for selecting up to 4 adjacent reference pixels is as follows:
[0108] For the INTRA_LT_CCLM mode, when both the upper adjacent area and the left adjacent area are valid, two adjacent reference pixels to be selected can be screened out in the upper selection area W', and their corresponding positions are S[W' / 4,-1] and S[3W' / 4,-1] respectively; two adjacent reference pixels to be selected can be screened out in the left selection area H', and their corresponding positions are S[-1,H' / 4] and S[-1,3H' / 4] respectively; these four adjacent reference pixels to be selected form a second reference pixel set, such as Fig. 8AAs shown. Fig. 8A In the encoding block, the left adjacent area and the upper adjacent area are both valid, and in order to keep the brightness component and the chrominance component with the same resolution, it is also necessary to downsample the brightness component so that the downsampled brightness component and the chrominance component have the same resolution.
[0109] For the INTRA_L_CCLM mode, when only the left adjacent area and the lower left adjacent area are valid, 4 adjacent reference pixels to be selected can be screened out in the left selection area H', and their corresponding positions are S[-1,H' / 8], S[-1,3H' / 8], S[-1,5H' / 8] and S[-1,7H' / 8] respectively; these 4 adjacent reference pixels to be selected form the second reference pixel set, such as Figure 8B As shown. Figure 8B In the example, the left adjacent area and the lower left adjacent area of the coding block are both valid, and in order to keep the luminance component and the chrominance component having the same resolution, it is still necessary to downsample the luminance component so that the downsampled luminance component and the chrominance component have the same resolution.
[0110] For the INTRA_T_CCLM mode, when only the upper adjacent area and the upper right adjacent area are valid, four adjacent reference pixels to be selected can be screened out in the upper selection area W', and their corresponding positions are S[W' / 8,-1], S[3W' / 8,-1], S[5W' / 8,-1] and S[7W' / 8,-1] respectively; these four adjacent reference pixels to be selected form the second reference pixel set, as shown in Figure 8C As shown. Figure 8C In the above example, the upper adjacent area and the upper right adjacent area of the coding block are both valid, and in order to keep the luminance component and the chrominance component having the same resolution, it is still necessary to downsample the luminance component so that the downsampled luminance component and the chrominance component have the same resolution.
[0111] In this way, by screening the first reference pixel set, a second reference pixel set can be obtained, and the second reference pixel set generally includes a preset number of adjacent reference pixel points, such as 4 adjacent reference pixel points; then this preset number of adjacent reference pixel points are grouped by comparison to make the two fitting points determined subsequently more accurate.
[0112] S702: Compare 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;
[0113] It should be noted that each adjacent reference pixel point corresponds to a first image component value and a second image component value; in this way, a preset number of adjacent reference pixel points corresponds to a preset number of first image component values, and after the first comparison processing, the first reference pixel subset and the second reference pixel subset can be determined according to the size of the first image component value.
[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 pixel points, obtaining a preset number of first image component values;
[0116] Comparing the preset number of first image component values for multiple times to obtain a first array consisting of a minimum first image component value and a second minimum first image component value and a second array consisting of a maximum first image component value and a second maximum first image component value;
[0117] Putting two adjacent reference pixel points corresponding to the first array into a first reference pixel subset to obtain the first reference pixel subset;
[0118] The two adjacent reference pixel points corresponding to the second array are placed into a 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 performing multiple comparisons on the preset number of first image component values (for example, four adjacent reference pixels need to be compared four times); wherein the first reference pixel subset includes two adjacent reference pixel points corresponding to the minimum first image component value and the second minimum first image component value among the preset number of first image component values, and the second reference pixel subset includes two adjacent reference pixel points corresponding to the maximum first image component value and the second maximum first image component value among the preset number of first image component values.
[0120] Specifically, a preset number of adjacent reference pixel points may be numbered first, and then the preset number of adjacent reference pixel points may be initially grouped, with the first image component value corresponding to the i-th number stored in the first array and the first image component value corresponding to the i+1-th number stored in the second array, where i is a positive integer greater than or equal to 0; then the first image component values in the first array may be compared with the first image component values in the second array for multiple times, so that the minimum first image component value and the second minimum first image component value are stored in the first array, and the maximum first image component value and the second maximum first image component value are stored in the second array, thereby obtaining a first reference pixel subset and a second reference pixel subset.
[0121] Further, after obtaining the first reference pixel subset and the second reference pixel subset, the second mean value point of the first reference pixel subset and the third mean value point of the second reference pixel subset may be obtained. Fig. 9 , which shows a flow chart of another image component prediction method provided by an embodiment of the present application. Fig. 9 As shown, after S702, the method may further include:
[0122] S901: Obtain a second mean value corresponding to the first image component and a second mean value corresponding to the second image component based on a first image component value and a second image component value corresponding to each adjacent reference pixel point in the first reference pixel subset, and obtain a 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 a third mean value corresponding to the first image component and a third mean value corresponding to the second image component to obtain a third mean point.
[0124] That is, the first image component values corresponding to each adjacent reference pixel point in the first reference pixel subset are averaged to obtain the first image component means corresponding to the plurality of first image components, which can be called the second mean of the first image component (which can be expressed by luma min denoted by ); the second image component values corresponding to each adjacent reference pixel point in the first reference pixel subset are averaged to obtain the second image component means corresponding to the plurality of second image components, which can be called the second mean of the second image component (which can be represented by chroma min Here, the second mean point can be represented by mean min 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, the first image component values corresponding to each adjacent reference pixel point in the second reference pixel subset are averaged to obtain the first image component means corresponding to the plurality of first image components, which can be called the third mean of the first image component (can be expressed as luma max denoted by ); calculating the mean of the second image component values corresponding to each adjacent reference pixel in the second reference pixel subset, and obtaining the second image component means corresponding to the plurality of second image components, which can be called the third mean of the second image component (which can be represented by chroma max Here, the third mean point can be represented by mean max 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 of the N adjacent reference pixel points to obtain a first average point;
[0127] It should be noted that the first mean value point is obtained by averaging N adjacent reference pixel points. Fig. 9 As shown, for S703, this step may include:
[0128] S903: Obtaining a first mean value corresponding to the first image component and a first mean value corresponding to the second image component based on the first image component value and the second image component value corresponding to each adjacent reference pixel point of the preset number of adjacent reference pixel points, and obtaining the first mean value point;
[0129] That is to say, the first image component value corresponding to each adjacent reference pixel point among N adjacent reference pixels is averaged to obtain the first image component mean corresponding to the N first image components, which can be called the first mean of the first image component (which can be represented by meanL); the second image component value corresponding to each adjacent reference pixel point among a preset number of adjacent reference pixels is averaged to obtain the first image component mean corresponding to the N first image components, which can be called the first mean of the first image component (which can be represented by meanC), where the first mean point can be represented by mean; here, 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 calculation of the first mean point can also be obtained by averaging the second mean point and the third mean point. For example, for meanL, it can be calculated based on luma min and luma max The mean is obtained; for meanC, it can be obtained based on chroma min and chroma maxObtained by finding the mean.
[0130] S704: Compare the first image component values of the first reference pixel subset and / or the second reference pixel subset by 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. The first reference pixel subset and / or the second reference pixel subset are subjected to a second comparison process by means of the first mean point. There may be three situations, such as 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, or 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 situations, the determined first fitting point and the second fitting point are different, thereby improving the robustness of CCLM prediction.
[0132] Furthermore, in some embodiments, before S704, the method may further include:
[0133] Comparing first image component values corresponding to two adjacent reference pixels in the first reference pixel subset;
[0134] According to the comparison result, the minimum first image component value and the second minimum first image component value of the two first image component values are determined, and the pixel point corresponding to the minimum first image component value is used as the first adjacent reference pixel point, and the pixel point corresponding to the second minimum first image component value is used as the second adjacent reference pixel point.
[0135] Furthermore, in some embodiments, the method may also include:
[0136] Comparing first image component values corresponding to two adjacent reference pixels in the second reference pixel subset;
[0137] According to the comparison result, the second largest first image component value and the maximum first image component value among the two first image component values are determined, and the pixel point corresponding to the second largest first image component value is used as the third adjacent reference pixel point, and the pixel point corresponding to the maximum first image component value is used as the fourth adjacent reference pixel point.
[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 used as the first adjacent reference pixel, and the pixel corresponding to the second minimum first image component value is used 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 used as the third adjacent reference pixel, and the pixel corresponding to the maximum first image component value is used as the fourth adjacent reference pixel.
[0139] Furthermore, in some embodiments, Fig. 9 As shown, for S704, comparing the first image component values of the first reference pixel subset and / or the second reference pixel subset through the first mean point to determine two fitting points may include:
[0140] S904: Compare the first image component of the first mean value 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, compare the first image component of the first mean point 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, 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.
[0143] Further, after S904, the method may further include:
[0144] S907: When the first image component of the first mean value point is less than the second minimum first image component value, the first adjacent reference pixel point is used as the first fitting point, and the third mean value point is used as the second fitting point.
[0145] Further, after S905, the method may further include:
[0146] S908: When the first image component of the first mean value point is greater than the second largest first image component value, the second mean value point is used as the first fitting point, and the fourth adjacent reference pixel point 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 may 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 may be compared with the second largest first image component value in the second reference pixel subset; or the first image component of the first mean point may 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 may 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 the embodiment of the present application.
[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, and the first fitting point at this time 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, and the first fitting point at this time is the second mean point, and the second fitting point is the third mean point; otherwise, step S908 will be executed, and the first fitting point at this time 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, the preset number of adjacent reference pixel points can be divided into three cases, and using two different fitting points to construct a prediction model for these three cases can improve the robustness of CCLM prediction.
[0149] It should also be noted that there is no limitation on the judgment of the "equal" situation. For example, 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, and 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, and 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: 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 implement prediction processing on the image component to be predicted to obtain a 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 according to 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 chrominance component, according to the model parameters α and β, the prediction model corresponding to the chrominance component as shown in formula (1) can be obtained.
[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, obtain the first model parameter through a first preset factor calculation model;
[0154] S705-2: Based on the first model parameters and the first fitting points, obtain the second model parameters through a second preset factor calculation model;
[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, obtain the second model parameters through a second preset factor calculation model.
[0157] It should be noted that after obtaining the first fitting point (luma 1 ,chroma 1 ) and the second fitting point (luma 2 ,chroma 2 ), the first model parameter α can be calculated according to the first preset factor calculation model, as shown in formula (2),
[0158]
[0159] After obtaining the first model parameter α, the first fitting point (luma 1 ,chroma 1 ) and the second preset factor calculation model to calculate the second model parameter β, as shown in formula (3),
[0160] β=chroma 1 -α×luma 1 (3)
[0161] The second model parameter β is calculated by combining the first mean point (meanL, meanC) and the second preset factor calculation model, as shown in formula (4):
[0162] β=meanC-α×meanL (4)
[0163] In this way, 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 chrominance component, a prediction model corresponding to the chrominance component can be obtained according to the model parameters (α and β), as shown in formula (1); then the chrominance component is predicted using the prediction model to obtain a prediction value corresponding to the chrominance component.
[0164] Furthermore, in some embodiments, after S705, the method may further include:
[0165] Based on the prediction model, prediction processing is performed on the image component to be predicted of each pixel in the coding block to obtain a prediction value corresponding to the image component to be predicted of each pixel.
[0166] It should be noted that after the second comparison processing is performed on the first reference pixel subset and / or the second reference pixel subset through the first mean point, two fitting points can be determined; thus, according to the principle of "two points determine a straight line", the slope of the straight line (i.e., the first model parameter) and the intercept of the straight line (i.e., the second model parameter) can be determined, so that the prediction model corresponding to the image component to be predicted can be obtained according to these two model parameters, so as to obtain the prediction 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 chrominance component, according to the first model parameter α and the second model parameter β, the prediction model corresponding to the chrominance component as shown in formula (1) can be obtained; then the prediction model shown in formula (1) is used to predict the chrominance component of each pixel in the coding block, so that the prediction value corresponding to the chrominance component of each pixel can be obtained.
[0167] The present embodiment provides an image component prediction method, by obtaining N adjacent reference pixel points for the image component to be predicted of the coding block in the video image, where the N adjacent reference pixel points are reference pixel points adjacent to the coding block, and N is a preset integer value; then comparing N first image component values corresponding to the N adjacent reference pixel points to determine a first reference pixel subset and a second reference pixel subset, the first reference pixel subset including: two adjacent reference pixel points corresponding to the minimum first image component value and the second minimum first image component value among a preset number of first image component values, and the second reference pixel subset including: two adjacent reference pixel points corresponding to the maximum first image component value and the second maximum first image component value among a preset number of first image component values. neighboring reference pixel points; calculating the mean of the N neighboring reference pixel points to obtain a first mean point; comparing the first image component value of the first reference pixel subset and / or the second reference pixel subset through 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 according to the model parameters to obtain a prediction value corresponding to the image component to be predicted; in this way, after the second comparison processing, a preset number of neighboring reference pixel points can be divided into multiple situations, and two different fitting points are used to construct a prediction model for these multiple situations, thereby improving the robustness of CCLM prediction; that is, by optimizing the fitting points used for deriving the model parameters, the constructed prediction model can be made more accurate and the encoding and decoding prediction performance of the video image can be improved.
[0168] In another embodiment of the present application, in actual applications, since the number of adjacent reference pixels used for model parameter derivation is generally 4, that is, the preset number may be 4. The following will be described in detail by taking the preset number equal to 4 as an example.
[0169] like Figure 3 In the process shown, it is assumed that the image component to be predicted is the chrominance component. When 0 adjacent reference pixels are obtained, the first model parameter α can be directly set to 0, and the second model parameter β can be set to the default value (which can also be the middle value of the chrominance component); when 2 adjacent reference pixels are obtained, the 2 adjacent reference pixels can be copied to obtain 4 adjacent reference pixels, and then the prediction model can be constructed based on the operation of the 4 adjacent reference pixels. In other words, after obtaining 4 adjacent reference pixels, two fitting points can be determined by comparing and averaging 4 times, so as to derive the model parameters using the principle of "two points determine a straight line"; in this way, the prediction model corresponding to the image component to be predicted can be constructed according to the model parameters to obtain the prediction value corresponding to the image component to be predicted.
[0170] Specifically, it is assumed that the image component to be predicted is the chrominance component, and the chrominance component is predicted by 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, the two arrays minIdx[2] and maxIdx[2] can be set to store two groups 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 that, through four comparisons, minIdx[2] can store the two adjacent reference pixels with smaller brightness values, and maxIdx[2] can store the 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, two adjacent reference pixels with smaller brightness values can be obtained, and their corresponding brightness values are represented by luma 0 min and luma 1 min Indicates that the corresponding chromaticity values are chroma 0 min and chroma 1 minAt the same time, we can also get two adjacent reference pixels with larger brightness values, and their corresponding brightness values are represented by luma 0 max and luma 1 max Indicates that the corresponding chromaticity values are chroma 0 max and chroma 1 max Furthermore, by taking the average of two smaller adjacent reference pixels, we can get the mean point, which is represented by mean min Indicates that the mean point mean min The corresponding brightness value is luma min , the chromaticity value is chroma min ; For the two larger adjacent reference pixels, we can find the average value and use mean max Indicates that the mean point mean max The corresponding brightness value is luma max , the chromaticity 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] That is to say, after getting two mean points mean min (luma min ,chroma min ) and mean max(luma max ,chroma max ), the two mean points can be used as two fitting points, and the model parameters can be obtained from the two fitting points by the calculation method of "two points determine a straight line". Specifically, the model parameters α and β can be calculated by formula (5):
[0183]
[0184] Among them, the model parameter α is the slope in the prediction model, and the model parameter β is the intercept in the prediction model. In this way, after the model parameters are derived, the prediction model corresponding to the chrominance component can be obtained according to the model parameters, as shown in formula (1); then the chrominance component is predicted using the prediction model to obtain the prediction value corresponding to the chrominance component.
[0185] In this way, since the current traditional scheme uniformly uses the mean point of the larger two adjacent reference pixels and the mean point of the smaller two adjacent reference pixels among the four adjacent reference pixels as two fitting points to construct the prediction model, the 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 the four adjacent reference pixels. For example, Figure 4B Schematic diagram of the comparison of the prediction models shown.
[0186] In the embodiment of the present application, two mean points mean are derived while retaining the traditional solution min and mean max On this basis, the brightness mean of the four adjacent reference pixels is first calculated. After the brightness mean of the four adjacent reference pixels is obtained, the second comparison processing can be performed on the first reference pixel subset and / or the second reference pixel subset through the brightness mean to divide a preset number of adjacent reference pixel points into multiple situations, and two different fitting points are used to construct a prediction model for these multiple situations.
[0187] See also Fig.10 , which shows a flow chart of a model parameter derivation solution provided in an embodiment of the present application. Fig.10 As shown, the process may include:
[0188] S1001: Obtain 4 adjacent reference pixels;
[0189] S1002: After four comparisons, two pixels with larger brightness components and two pixels with smaller brightness components are obtained;
[0190] S1003: Calculate two mean points mean min and mean max ;
[0191] S1004: Calculate the brightness meanL corresponding to four adjacent reference pixels;
[0192] S1005: Determine, through a comparison, a first pixel point corresponding to a minimum brightness value and a second pixel point corresponding to a second minimum brightness value;
[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 point mean max As two fitting points to construct a prediction model;
[0195] S1008: when meanL is greater than or equal to the next minimum brightness value, determine the third pixel point corresponding to the next maximum brightness value and the fourth pixel point corresponding to the maximum brightness value through a 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 point mean min As two fitting points to construct a prediction model;
[0198] S1011: When meanL is less than or equal to the second maximum brightness value, the mean point mean min and mean max As two fitting points to construct a prediction model;
[0199] S1012: Perform prediction processing of chrominance components according to the constructed prediction model.
[0200] It should be noted that for steps S1006 and S1009, there is no order for the comparison of these two steps; that is, the comparison of step S1006 may be performed first, and then the comparison of step S1009; or the comparison of step S1009 may be performed first, and then the comparison of step S1006; the present application embodiment does not make specific limitations. For example, if the comparison of step S1009 is performed first, the process is modified as follows: after determining the third pixel point corresponding to the submaximal brightness value and the fourth pixel point corresponding to the maximum brightness value through a comparison, it is determined whether meanL is less than or equal to the submaximal brightness value; when meanL is greater than the submaximal brightness value, the fourth pixel point corresponding to the maximum brightness value and the mean point meanL are compared. minAs two fitting points to build a prediction model; when meanL is less than or equal to the second maximum brightness value, determine the first pixel corresponding to the minimum brightness value and the second pixel corresponding to the second minimum brightness value through a comparison; then determine whether meanL is greater than or equal to the second minimum brightness value; when meanL is less than the second minimum brightness value, compare the first pixel corresponding to the minimum brightness value and the mean point meanL. max As two fitting points to build a prediction model; when meanL is greater than or equal to the second minimum brightness value, the mean point mean min and mean max A prediction model is constructed as two fitting points; finally, the chrominance 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"; the two points here can be called fitting points. After obtaining four adjacent reference pixel points, the fitting points in different situations can be determined by calculating the average value of the four adjacent reference pixel points (which can be expressed as mean), and then using the mean value for the second comparison process.
[0202] Specifically, assuming that the image component to be predicted is a chrominance component, and the chrominance component is predicted by the luminance component, the following steps will be performed:
[0203] In the first step, assuming that the numbers of the four adjacent reference pixels obtained are 0, 1, 2, and 3 respectively, four comparisons are performed on the four adjacent reference pixels, and two adjacent reference pixels with larger brightness values (which may include the pixel with the largest brightness value and the pixel with the second largest brightness value) and two adjacent reference pixels with smaller brightness values (which may include the pixel with the smallest brightness value and the pixel with the second smallest brightness value) can be selected. Furthermore, two arrays, minIdx[2] and maxIdx[2], can be set to store two groups 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.
[0204] Init:minIdx[2]={0,2},maxIdx[2]={1,3}
[0205] In the second step, through four comparisons, minIdx[2] can store the two adjacent reference pixels with smaller brightness values, and maxIdx[2] can store the 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] In the third step, two adjacent reference pixels with smaller brightness values can be obtained, and their corresponding brightness values are expressed as luma. 0 min and luma 1 min Indicates that the corresponding chromaticity values are chroma 0 min and chroma 1 min At the same time, we can also get two adjacent reference pixels with larger brightness values, and their corresponding brightness values are represented by luma 0 max and luma 1 max Indicates that the corresponding chromaticity values are chroma 0 max and chroma 1 max Furthermore, by taking the average of two smaller adjacent reference pixels, we can get the mean point, which is represented by mean min Indicates that the mean point mean min The corresponding brightness value is luma min , the chromaticity value is chroma min ; For the two larger adjacent reference pixels, we can find the average value and use mean max Indicates that the mean point mean max The corresponding brightness value is luma max , the chromaticity 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 get two mean points mean min (luma min ,chroma min ) and mean max (luma max ,chroma max ) After that, you can continue to execute the following modules:
[0216] Ⅰ, calculate the brightness meanL of the four adjacent reference pixels numbered 0, 1, 2, and 3. It should be noted that the brightness meanL can be obtained by adding the brightness values corresponding to the four adjacent reference pixels and dividing by four, or by (luma min +luma max +1)>>1Get;
[0217] II. Comparison with luma 0 min and luma 1 min , determine the minimum point and the second minimum point (first comparison);
[0218] III. Compare the brightness meanL of the four adjacent reference pixels with the brightness value of the second minimum point (second comparison):
[0219] If meanL is greater than or equal to the brightness value of the next minimum point;
[0220] Jump to IV;
[0221] otherwise
[0222] Determine the first fitting point as the minimum point and the second fitting point as the mean max (lumamax ,chroma max ), and exit this module at the same time,
[0223] Skip to step 5;
[0224] IV. Compare luma 0 max and luma 1 max , determine the maximum point and the second maximum point (third comparison);
[0225] V. Compare the brightness meanL of the four adjacent reference pixels and the brightness value of the second largest point (the fourth comparison):
[0226] If meanL is less than or equal to the brightness value of the second maximum point;
[0227] Determine the first fitting point as mean min (luma min ,chroma min ), the second fitting point is mean max (luma max ,chroma max ),
[0228] At the same time, exit this module and jump to step 5;
[0229] otherwise
[0230] Determine the first fitting point as mean min (luma min ,chroma min ), the second fitting point is the maximum point, and exit this module and jump to step 5;
[0231] Step 5: The model parameters can be derived from these two fitting points using the “two points determine a straight line” method. Assume that the first fitting point (luma 1 ,chroma 1 ) and the second fitting point (luma 2 ,chroma 2 ), the model parameters α and β can be calculated by formula (6),
[0232]
[0233] In the sixth step, after the model parameters are derived, the chrominance value of the current coding block can be predicted through the prediction model.
[0234] That is, after deriving the two model parameters (α and β), the prediction model corresponding to the chrominance component can be obtained according to the model parameters, as shown in formula (1); then the chrominance component is predicted using the prediction model to obtain the prediction value corresponding to the chrominance component.
[0235] Before deriving two fitting points, compared with the traditional scheme, the embodiment of the present application adds an averaging operation and at least two and at most four comparison operations, so that the four adjacent reference pixels can be divided into three cases. For these three cases, two different fitting points are used to construct a prediction model, thereby improving the robustness of CCLM prediction.
[0236] In another embodiment of the present application, the preset number is 4, so there may be 3 situations for these 4 adjacent reference pixel points, such as the brightness meanL is between the brightness value of the sub-maximum point and the brightness value of the sub-minimum point, or the brightness meanL is less than the brightness value of the sub-minimum point, or the brightness meanL is greater than the brightness value of the sub-maximum point; that is, these 4 adjacent reference pixel points may show a uniform distribution trend or a non-uniform distribution trend, and these three situations will be described in detail below.
[0237] Optionally, in some embodiments, when the brightness meanL is between the brightness value of the second largest point and the brightness value of the second smallest point, the four adjacent reference pixels are evenly distributed. Fig.11 , which shows a schematic diagram of a comparison of the prediction model of the present application scheme and the traditional scheme provided in the embodiment of the present application. Fig.11 As shown, the four black dots are four adjacent reference pixels, and the two gray dots are the mean points corresponding to the two larger adjacent reference pixels and the mean points corresponding to the two smaller adjacent reference pixels among the four adjacent reference pixels (i.e., the two fitting points obtained by the traditional scheme), so the gray oblique line is the prediction model constructed according to the traditional scheme; the bold black dotted line is the brightness mean of the four adjacent reference pixels, and the two bold black circles are two fitting points, so the bold black oblique line is the prediction model constructed according to the scheme of the embodiment of the present application; the gray dotted line is the prediction model fitted by the LMS algorithm for the four adjacent reference pixels; Fig.11 It can be seen that the two fitting points are mean min (luma min ,chroma min ) and mean max (luma max ,chroma max), so that the gray oblique line and the bold black oblique line overlap and are relatively close to the gray dotted line, that is, the prediction model constructed by the solution of the embodiment of the present application and the traditional solution is the same, and both can accurately fit the distribution of the four adjacent reference pixels.
[0238] Optionally, in some embodiments, when the brightness meanL is less than the brightness value of the second minimum point, the four adjacent reference pixels are non-uniformly distributed. Fig.12 , which shows a schematic diagram comparing the prediction model of another solution provided by the present application and the traditional solution. Fig.12 As shown, the four black dots are four adjacent reference pixels, and the two gray dots are the mean points corresponding to the two larger adjacent reference pixels and the mean points corresponding to the two smaller adjacent reference pixels among the four adjacent reference pixels (i.e., the two fitting points obtained by the traditional scheme), so the gray oblique line is the prediction model constructed according to the traditional scheme; the bold black dotted line is the brightness mean of the four adjacent reference pixels, and the two bold black circles are two fitting points, so the bold black oblique line is the prediction model constructed according to the scheme of the embodiment of the present application; the gray dotted line is the prediction model fitted by the LMS algorithm for the four adjacent reference pixels; Fig.12 It can be seen that the two fitting points are the minimum point and mean max (luma max ,chroma max ), so that the bold black oblique line and the gray dotted line are closer, that is, the solution of the embodiment of the present application is more consistent with the distribution of these four adjacent reference pixels than the prediction model constructed by the traditional solution.
[0239] Optionally, in some embodiments, when the brightness meanL is greater than the brightness value of the second maximum point, the four adjacent reference pixels are non-uniformly distributed. Fig.13 , which shows a schematic diagram of a comparison between another prediction model of the present application scheme and the traditional scheme provided in the embodiment of the present application. Fig.13 As shown, the four black dots are four adjacent reference pixels, and the two gray dots are the mean points corresponding to the two larger adjacent reference pixels and the mean points corresponding to the two smaller adjacent reference pixels among the four adjacent reference pixels (i.e., the two fitting points obtained by the traditional scheme), so the gray oblique line is the prediction model constructed according to the traditional scheme; the bold black dotted line is the brightness mean of the four adjacent reference pixels, and the two bold black circles are two fitting points, so the bold black oblique line is the prediction model constructed according to the scheme of the embodiment of the present application; the gray dotted line is the prediction model fitted by the LMS algorithm for the four adjacent reference pixels; Fig.13 It can be seen that the two fitting points are mean min (luma min,chroma min ) and the maximum point, so that the bold black oblique line and the gray dotted line are closer, that is, the scheme of the embodiment of the present application is more consistent with the distribution of these four adjacent reference pixels than the prediction model constructed by the traditional scheme.
[0240] from Fig.12 or Fig.13 It can be seen that when the four adjacent reference pixels are unevenly distributed, the linear model constructed by the current traditional solution lacks robustness and cannot fit the four adjacent reference pixels well, resulting in inaccurate prediction performance. In the embodiment of the present application, by optimizing the fitting points used for model parameter derivation, CCLM prediction can be made more robust; specifically, the embodiment of the present application divides the distribution of the four adjacent reference points into three cases under the premise of increasing the complexity of one mean calculation, at least two comparisons and at most four comparisons, and uses different fitting points to construct prediction models for these three cases, thereby improving the robustness of CCLM prediction; and in the different distribution cases of the four adjacent reference pixels, different fitting points are used to derive model parameters, which can avoid the "divide by 3" operation, and other division operations, such as "divide by 2" and "divide by 4", can be completely replaced by shifting, thereby saving computational complexity. For example, based on VVC's latest reference software VTM5.0, under All intra conditions, the test sequence required by JVET is tested according to the general test conditions. In this way, 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 the present application brings a certain improvement in prediction performance with very little increase in complexity.
[0241] In another embodiment of the present application, after obtaining 4 adjacent reference pixels according to the latest VVC reference software VTM5.0, the 4 adjacent reference pixels can also be divided into two categories according to the brightness average of the 4 adjacent reference pixels, such as the left category represented by L and the right category represented by R. After classification, when the number of pixels in the L class or the R class is 3, the mean of the class will be calculated by "divide by 3". In the embodiment of the present application, the fitting point of the class may no longer be the mean point of 3 pixels, but the mean point of 2 pixels randomly selected from the 3 pixels. This operation can remove the "division" operation in the process of determining the fitting point (to be precise, the "divide by 3" operation can be avoided, and the "divide by 2" and "divide by 4" operations can be replaced by shifting), thereby saving computational complexity. Therefore, in some embodiments, after S701, the method may also include:
[0242] Grouping the preset number of adjacent reference pixel points by using the first mean point to obtain a third reference pixel subset and a fourth reference pixel subset;
[0243] Determine a first fitting point based on a third reference pixel subset; determine a second fitting point based on a 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 implement prediction processing of the image component to be predicted to obtain a prediction value corresponding to the image component to be predicted.
[0245] Further, the 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] Selecting some adjacent reference pixel points from the third reference pixel subset, performing mean calculation on the some adjacent reference pixel points, and using the mean point obtained by calculation as the first fitting point;
[0247] A portion of adjacent reference pixel points is selected from the fourth reference pixel subset, a mean value is calculated for the portion of adjacent reference pixel points, and the calculated mean value point is used as the second fitting point.
[0248] Further, the 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] Selecting one of the adjacent reference pixel points from the third reference pixel subset as the first fitting point;
[0250] One of the adjacent reference pixel points is selected from the fourth reference pixel subset as the second fitting point.
[0251] Further, assuming that the preset number is 4, the step 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 pixel points and the fourth reference pixel subset includes 1 adjacent reference pixel point, 2 adjacent reference pixel points are selected from the third reference pixel subset, a mean value is calculated for the selected 2 adjacent reference pixel points, the calculated mean value point is used as the first fitting point, and 1 adjacent reference pixel point in the fourth reference pixel subset is used as the second fitting point;
[0253] If the third reference pixel subset includes 1 adjacent reference pixel point and the fourth reference pixel subset includes 3 adjacent reference pixel points, 2 adjacent reference pixel points are selected from the fourth reference pixel subset, and the mean of the selected 2 adjacent reference pixel points is calculated, and the calculated mean point is used as the second fitting point, and 1 adjacent reference pixel point in the third reference pixel subset is used as the first fitting point.
[0254] It should be noted that some of the reference pixels selected here may be reference pixels of a power of 2. For example, after 4 adjacent reference pixels are divided into two categories (such as L and R) according to the brightness mean, if the number of pixels in the L or R category is 3, when arbitrarily selecting 2 pixels from the 3 pixels to calculate the mean value, if there are 3 pixels in the L category, then 2 pixels with smaller brightness values are selected; if there are 3 pixels in the R category, then 2 pixels with larger brightness values are selected.
[0255] In addition, after the four adjacent reference pixels are divided into two categories (such as L and R) according to the brightness mean, one pixel can be randomly selected from the L category as the first fitting point, and one pixel can be randomly selected from the R category as the second fitting point. In this way, the model parameters α and β can be constructed using these two fitting points; the first model parameter α can also be derived using these two fitting points, and the second model parameter β can be derived using the mean point of the four pixels; in this process, the operation of calculating the mean points of the L category and the R category can be omitted.
[0256] See also Fig.14 , which shows a schematic diagram of a structure for determining a fitting point provided by an embodiment of the present application. Fig.14 As shown, after obtaining all adjacent reference pixels, the brightness mean L of these adjacent reference pixels can be calculated. mean , and then use the L mean These adjacent reference pixels are divided into L and R categories, and the mean point (L Lmean , C Lmean ) and (L Rmean , C Rmean ) can be used as two fitting points, and the first model parameter α is derived based on these two fitting points. 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 up to 4 valid adjacent reference pixels in VTM5.0. For example, after obtaining 4 adjacent reference pixels through VTM5.0, first obtain the brightness mean of the 4 pixels, use the mean to divide the 4 pixels into two categories, and then use the mean points of the two categories as two fitting points to derive the model parameters α and β. When the 4 pixels cannot be divided into two categories according to the brightness mean, that is, the number of pixels in the L class is 0 or the number of pixels in the R class is 0, the chromaticity mean of the 4 pixels can be directly used as the chromaticity prediction value. In addition, the mean points of these two categories can be used as two fitting points to derive the first model parameter α, and the mean points of the 4 pixels can be used to derive the second model parameter β.
[0259] In another embodiment of the present application, on the basis of deriving the first model parameter α according to the two acquired fitting points, the second model parameter β can also be directly derived using the mean point of the two acquired mean points. Based on VTM5.0, the two mean points are rounded down to integers. At this time, the average of the two mean points is calculated again, and the result obtained by directly calculating the mean of the four adjacent reference pixels may be different, resulting in a slight difference in prediction performance.
[0260] See also Fig.15 , which shows a schematic diagram of the structure of a prediction model provided by an embodiment of the present application. Fig.15 As shown, the gray oblique line represents the slope calculated based on the two fitting points, that is, the first model parameter α; then the gray oblique line is translated, and the translation amount is the second model parameter β, and the resulting bold black oblique line is the final prediction model. Specifically, based on the JVET-N0524 proposal, on the basis of the CCLM technology in VTM4.0, the two points with the largest and smallest brightness values among all adjacent reference points corresponding to the coding block can be used as two fitting points to derive the first model parameter α, and the second model parameter β can be derived using the mean point of all adjacent reference pixels. In addition, the JVET-N0524 proposal can also be applied to the case of up to 4 valid adjacent reference pixels in VTM5.0. At this time, the mean point of the two larger points and the mean point of the two smaller points among the 4 pixel points can be used as two fitting points to derive the first model parameter α, and then the mean point of these 4 pixel points can be used to derive the second model parameter β.
[0261] This embodiment provides an image component prediction method. Through the technical solution of this embodiment, after the second comparison process, a preset number of adjacent reference pixels can be divided into three cases, and two different fitting points will be used to construct a prediction model for these three cases, thereby improving the robustness of CCLM prediction; that is, by optimizing the fitting points used for model parameter derivation, the constructed prediction model can be made more accurate, and the encoding and decoding prediction performance of the video image can also be improved. .
[0262] Based on the same inventive concept as the above embodiments, see Fig.16 , which shows a schematic diagram of the composition structure of an image component prediction device 160 provided in an embodiment of the present 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 pixel points corresponding to the image component to be predicted of the coding block in the video image; wherein the N adjacent reference pixel points are reference pixel points adjacent to the coding 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 corresponds to a preset number of first image component values, the first reference pixel subset includes: two adjacent reference pixels corresponding to a minimum first image component value and a second minimum first image component value among the preset number of first image component values, and the second reference pixel subset includes: two adjacent reference pixels corresponding to a maximum first image component value and a second maximum first image component value among the preset number of first image component values;
[0265] The calculation unit 1603 is configured to calculate the mean of the N adjacent reference pixel points to obtain a first mean 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 through 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 implement prediction processing of the image component to be predicted to obtain a prediction value corresponding to the image component to be predicted.
[0268] In the above scheme, see Fig.16, the image component prediction device 160 may further include a screening unit 1605,
[0269] The acquisition unit 1601 is further configured to acquire a first reference pixel set corresponding to a to-be-predicted image component of a coding block in a video image;
[0270] The screening unit 1605 is configured to perform screening processing on the first reference pixel set to obtain a second reference pixel set; wherein the second reference pixel set includes N adjacent reference pixel points.
[0271] In the above scheme, the acquisition unit 1601 is specifically configured to acquire reference pixel points adjacent to at least one edge of the coding block; wherein the at least one edge includes the left edge of the coding block and / or the upper edge of the coding block; and based on the reference pixel points, a first reference pixel set corresponding to the image component to be predicted is formed.
[0272] In the above scheme, the acquisition unit 1601 is specifically configured to acquire reference pixel points in a reference row or reference column adjacent to the coding block; wherein the reference row is composed of rows adjacent to the upper side and the upper right side of the coding block, and the reference column is composed of columns adjacent to the left side and the lower left side of the coding block; and based on the reference pixel points, a first reference pixel set corresponding to the image component to be predicted is formed.
[0273] In the above scheme, the screening 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 according to the determined position of the pixel to be selected, select adjacent reference pixels corresponding to the position of the pixel to be selected from the first reference pixel set, and form a second reference pixel set with the selected adjacent reference pixels; wherein the second reference pixel set includes N adjacent reference pixels.
[0274] In the above solution, 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 pixel points;
[0275] The comparison unit 1602 is specifically configured to compare a preset number of first image component values multiple times to obtain a first array consisting of a minimum first image component value and a second minimum first image component value and a second array consisting of a maximum first image component value and a second maximum first image component value; and put two adjacent reference pixel points corresponding to the first array into a first reference pixel subset to obtain the first reference pixel subset; and put two adjacent reference pixel points 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 also configured to obtain the first image component mean corresponding to the N first image components and the second image component mean 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 pixel points, and obtain the first mean point.
[0277] In the above scheme, the acquisition unit 1601 is also configured to obtain the first image component mean corresponding to multiple first image components in the first reference pixel subset and the second image component mean corresponding to multiple second image components based on the first image component value and the second image component value corresponding to each adjacent reference pixel point in the first reference pixel subset, so as to obtain a second mean point; and to obtain the first image component mean corresponding to multiple first image components in the second reference pixel subset and the second image component mean corresponding to multiple second image components 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, so as to obtain a third mean 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 solution, 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 determine the minimum first image component value and the second minimum first image component value of the two first image component values according to the comparison result, and use 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 pixel points in the second reference pixel subset; and determine the second largest first image component value and the maximum first image component value among the two first image component values based on the comparison result, and use the pixel point corresponding to the second largest first image component value as the third adjacent reference pixel point, and the pixel point corresponding to the maximum first image component value as the fourth adjacent reference pixel point.
[0281] In the above scheme, the comparison unit 1602 is further configured to use the first adjacent reference pixel point 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 use 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 also configured to obtain the first model parameters through a first preset factor calculation model based on the first fitting point and the second fitting point; and obtain the second model parameters through a second preset factor calculation model based on the first model parameters and the first fitting point.
[0284] In the above solution, the calculation unit 1603 is further configured to obtain the second model parameter through a second preset factor calculation model based on the first model parameter and the first mean point.
[0285] In the above scheme, see Fig.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 the first mean value 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 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 implement prediction processing of the image component to be predicted to obtain a prediction value corresponding to the image component to be predicted.
[0289] In the above scheme, the determination unit 1607 is specifically configured to select some adjacent reference pixel points from the third reference pixel subset, perform mean calculation on the some adjacent reference pixel points, and use the calculated mean point as the first fitting point; and select some adjacent reference pixel points from the fourth reference pixel subset, perform mean calculation on the some adjacent reference pixel points, and use the calculated mean point as the second fitting point.
[0290] In the above solution, the determining unit 1607 is specifically configured to select one of the adjacent reference pixel points from the third reference pixel subset as the first fitting point; and select one of the adjacent reference pixel points from the fourth reference pixel subset as the second fitting point.
[0291] In the above scheme, the value of N is 4; the determining unit 1607 is specifically configured to, if the third reference pixel subset includes 3 adjacent reference pixel points and the fourth reference pixel subset includes 1 adjacent reference pixel point, select 2 adjacent reference pixel points from the third reference pixel subset, perform mean calculation on the selected 2 adjacent reference pixel points, use the calculated mean point as the first fitting point, and use 1 adjacent reference pixel point in the fourth reference pixel subset as the second fitting point; and if the third reference pixel subset includes 1 adjacent reference pixel point and the fourth reference pixel subset includes 3 adjacent reference pixel points, select 2 adjacent reference pixel points from the fourth reference pixel subset, perform mean calculation on the selected 2 adjacent reference pixel points, use the calculated mean point as the second fitting point, and use 1 adjacent reference pixel point in the third reference pixel subset as the first fitting point.
[0292] In the above solution, the prediction unit 1604 is specifically configured to perform prediction processing on the image component to be predicted of each pixel in the coding block based on the prediction model to obtain a prediction value corresponding to the image component to be predicted of each pixel.
[0293] It can be understood that in this embodiment, a "unit" can be a part of a circuit, a part of a processor, a part of a program or software, etc., and of course it can also be a module, or it can be non-modular. Moreover, the components in this embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional module.
[0294] If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
[0295] Therefore, this embodiment provides a computer storage medium, which stores an image component prediction program. When the image component prediction program is executed by at least one processor, the method described in any one of the above embodiments is implemented.
[0296] Based on the composition of the above-mentioned image component prediction device 160 and the computer storage medium, see Fig.17 , which shows the specific hardware structure of the image component prediction device 160 provided in the embodiment of the present application, which may include: a network interface 1701, a memory 1702 and a processor 1703; each component is coupled together through a bus system 1704. It can be understood that the bus system 1704 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 1704 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, in Fig.19 Various buses are labeled as bus system 1704. Among them, the network interface 1701 is used to receive and send signals in the process of sending and receiving information between other external network elements;
[0297] A memory 1702, used for storing a computer program that can be run on the processor 1703;
[0298] The processor 1703 is configured to execute, when running the computer program:
[0299] Obtaining N adjacent reference pixel points corresponding to the image component to be predicted of the coding block in the video image; wherein the N adjacent reference pixel points are reference pixel points adjacent to the coding block, and N is a preset integer value;
[0300] Comparing the N first image component values corresponding to the N adjacent reference pixels, determining a first reference pixel subset and a second reference pixel subset; wherein a preset number of adjacent reference pixels corresponds to a preset number of first image component values, the first reference pixel subset includes: two adjacent reference pixels corresponding to a minimum first image component value and a second minimum first image component value among the preset number of first image component values, and the second reference pixel subset includes: two adjacent reference pixels corresponding to a maximum first image component value and a second maximum first image component value among the preset number of first image component values;
[0301] Calculate the mean of the N adjacent reference pixel points to obtain a first mean point;
[0302] Comparing the first image component values of the first reference pixel subset and / or the second reference pixel subset by using the first mean point to determine two fitting points;
[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 implement prediction processing of the image component to be predicted to obtain a prediction value corresponding to the image component to be predicted.
[0304] It can be understood that the memory 1702 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus random access memory (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 the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 1703. The above-mentioned processor 1703 can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor are combined and executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 1702, and the processor 1703 reads the information in the memory 1702 and completes the steps of the above method in combination with its hardware.
[0306] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in the present application, or a combination thereof.
[0307] For software implementation, the techniques described herein can be implemented by modules (e.g., procedures, functions, etc.) that perform the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0308] Optionally, as another embodiment, the processor 1703 is further configured to execute any one of the methods described in the foregoing embodiments when running the computer program.
[0309] See also Fig.18 , which shows a schematic diagram of the composition structure of an encoder provided in an embodiment of the present application. Fig.18 As shown, the encoder 180 may include at least the image component prediction device 160 described in any one of the aforementioned embodiments.
[0310] See also Fig.19 , which shows a schematic diagram of the structure of a decoder provided in an embodiment of the present application. Fig.19 As shown, the decoder 190 may at least include the image component prediction device 160 described in any one of the aforementioned embodiments.
[0311] It should be noted that, in this application, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0312] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0313] The methods disclosed in several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0314] The features disclosed in several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0315] The features disclosed in several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0316] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0317] Industrial Applicability
[0318] In an embodiment of the present application, first, for the image component to be predicted of the coding block in the video image, N adjacent reference pixel points are obtained, where the N adjacent reference pixel points are reference pixel points adjacent to the coding block, and N is a preset integer value; then, N first image component values corresponding to the N adjacent reference pixel points are compared to determine a first reference pixel subset and a second reference pixel subset, wherein the first reference pixel subset includes: two adjacent reference pixel points corresponding to the minimum first image component value and the second minimum first image component value among the preset number of first image component values, and the second reference pixel subset includes: two adjacent reference pixel points corresponding to the maximum first image component value and the second maximum first image component value among the preset number of first image component values; the N adjacent reference pixel points are calculated. The method comprises the following steps: obtaining a first mean point by calculating the mean of adjacent reference pixel points; comparing the first image component value of the first reference pixel subset and / or the second reference pixel subset through the first mean point to determine two fitting points; determining the model parameters based on the two fitting points, and obtaining the prediction model corresponding to the image component to be predicted according to the model parameters to obtain the prediction value corresponding to the image component to be predicted; in this way, after the second comparison processing, a preset number of adjacent reference pixel points can be divided into multiple situations, and two different fitting points are used to construct the prediction model for these multiple situations, so as to improve the robustness of CCLM prediction; that is, by optimizing the fitting points used for deriving the model parameters, the constructed prediction model is more accurate and the encoding and decoding prediction performance of the video image is improved.
Claims
1. A method for predicting image components, applied to a decoder, the method comprising: Determine a first reference pixel set corresponding to the to-be-predicted image component of the current block; Determine a second reference pixel set according to the first reference pixel set, wherein the second reference pixel set includes N adjacent reference pixel points; Comparing the first image component values corresponding to the N adjacent reference pixels for multiple times, obtaining a first reference pixel subset corresponding to the minimum first image component value and the second minimum first image component value, and a second reference pixel subset corresponding to the maximum first image component value and the second maximum first image component value; wherein the first reference pixel subset includes the minimum first image component value, the second minimum first image component value, the minimum second image component value, and the second minimum second image component value, and the second reference pixel subset includes the maximum first image component value, the second maximum first image component value, the maximum second image component value, and the second maximum second image component value; Determine a first mean value of the first image component according to the minimum first image component value and the second minimum first image component value, and determine a first mean value of the second image component according to the minimum second image component value and the second minimum second image component value; Determine a second mean value of the first image component according to the maximum first image component value and the second maximum first image component value, and determine a second mean value of the second image component according to the maximum second image component value and the second maximum second image component value; determining a model parameter of a prediction model according to a first mean of the first image component, a first mean of the second image component, a second mean of the first image component, and a second mean of the second image component; The predicted value of the image component to be predicted is determined according to 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 determining of a first reference pixel set corresponding to the to-be-predicted image component of the current block comprises: Acquire reference pixels in a reference row and / or reference column adjacent to the current block, wherein the reference row and / or reference column adjacent to the current block includes: The rows adjacent to the upper side and the upper right side of the current block; The columns adjacent to the left side and the lower left side of the current block; or The row adjacent to the upper side and the column adjacent to the left side of the current block; Based on the reference pixel points, a first reference pixel set corresponding to the to-be-predicted image component of the current block is determined.
3. The method according to claim 2, characterized in that The determining, according to the first reference pixel set, a second reference pixel set comprises: Determining the position of the pixel to be selected according to the pixel positions corresponding to the adjacent reference pixels in the first reference pixel set; According to the position of the pixel to be selected and the first reference pixel set, adjacent reference pixel points corresponding to the position of the pixel to be selected are determined to form a second reference pixel set.
4. The method according to claim 3, characterized in that The step of determining the position of a pixel to be selected according to the pixel positions of adjacent reference pixels in the first reference pixel set includes: If the pixel positions of the adjacent reference pixels in the first reference pixel set include the positions of the rows adjacent to the upper side and the upper right side of the current block, then four positions are determined from the positions of the rows adjacent to the upper side and the upper right side of the current block as the positions of the pixel points to be selected; If the pixel positions of the 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 points 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 upper side and the column adjacent to the left side of the current block, then two positions are determined in the positions of the row adjacent to the upper side of the current block, and two positions are determined in the positions of the column adjacent to the left side of the current block as the positions of the pixel points to be selected.
5. The method according to any one of claims 1 to 4, characterized in that The determining the model parameters of the prediction model according to the first mean of the first image component, the first mean of the second image component, the second mean of the first image component and the second mean of the second image component comprises: determining a first fitting point according to a first mean value of the first image component and a first mean value of the second image component; determining a second fitting point according to a second mean of the first image component and a second mean of the second image component; Model parameters of a prediction model are determined according to the first fitting point and the second fitting point.
6. A method for predicting image components, applied to an encoder, the method comprising: Determine a first reference pixel set corresponding to the to-be-predicted image component of the current block; Determine a second reference pixel set according to the first reference pixel set, wherein the second reference pixel set includes N adjacent reference pixel points; Comparing the first image component values corresponding to the N adjacent reference pixels for multiple times, obtaining a first reference pixel subset corresponding to the minimum first image component value and the second minimum first image component value, and a second reference pixel subset corresponding to the maximum first image component value and the second maximum first image component value; wherein the first reference pixel subset includes the minimum first image component value, the second minimum first image component value, the minimum second image component value, and the second minimum second image component value, and the second reference pixel subset includes the maximum first image component value, the second maximum first image component value, the maximum second image component value, and the second maximum second image component value; Determine a first mean value of the first image component according to the minimum first image component value and the second minimum first image component value, and determine a first mean value of the second image component according to the minimum second image component value and the second minimum second image component value; Determine a second mean value of the first image component according to the maximum first image component value and the second maximum first image component value, and determine a second mean value of the second image component according to the maximum second image component value and the second maximum second image component value; determining a model parameter of a prediction model according to a first mean of the first image component, a first mean of the second image component, a second mean of the first image component, and a second mean of the second image component; The predicted value of the image component to be predicted is determined according to 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 determining of a first reference pixel set corresponding to the to-be-predicted image component of the current block comprises: Acquire reference pixels in a reference row and / or reference column adjacent to the current block, wherein the reference row and / or reference column adjacent to the current block includes: The rows adjacent to the upper side and the upper right side of the current block; The columns adjacent to the left side and the lower left side of the current block; or The row adjacent to the upper side and the column adjacent to the left side of the current block; Based on the reference pixel points, a first reference pixel set corresponding to the to-be-predicted image component of the current block is determined.
8. The method according to claim 7, characterized in that The determining, according to the first reference pixel set, a second reference pixel set comprises: Determining the position of the pixel to be selected according to the pixel positions corresponding to the adjacent reference pixels in the first reference pixel set; According to the position of the pixel to be selected and the first reference pixel set, adjacent reference pixel points corresponding to the position of the pixel to be selected are determined to form a second reference pixel set.
9. The method according to claim 8, characterized in that The step of determining the position of a pixel to be selected according to the pixel positions of adjacent reference pixels in the first reference pixel set includes: If the pixel positions of the adjacent reference pixels in the first reference pixel set include the positions of the rows adjacent to the upper side and the upper right side of the current block, then four positions are determined from the positions of the rows adjacent to the upper side and the upper right side of the current block as the positions of the pixel points to be selected; If the pixel positions of the 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 points 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 upper side and the column adjacent to the left side of the current block, then two positions are determined in the positions of the row adjacent to the upper side of the current block, and two positions are determined in the positions of the column adjacent to the left side of the current block as the positions of the pixel points to be selected.
10. The method according to any one of claims 6 to 9, characterized in that The determining the model parameters of the prediction model according to the first mean of the first image component, the first mean of the second image component, the second mean of the first image component and the second mean of the second image component comprises: determining a first fitting point according to a first mean value of the first image component and a first mean value of the second image component; determining a second fitting point according to a second mean of the first image component and a second mean of the second image component; Model parameters of a prediction model are determined according to 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 a determination unit, a comparison unit and a prediction unit, wherein: The determining unit is configured to determine a first reference pixel set corresponding to the image component to be predicted of the current block; and determine a second reference pixel set according to the first reference pixel set, wherein the second reference pixel set includes N adjacent reference pixel points; The comparison unit is configured to compare the first image component values corresponding to the N adjacent reference pixels for multiple times to obtain a first reference pixel subset corresponding to the minimum first image component value and the second minimum first image component value, and a second reference pixel subset corresponding to the maximum first image component value and the second maximum first image component value; wherein the first reference pixel subset includes the minimum first image component value, the second minimum first image component value, the minimum second image component value, and the second minimum second image component value, and the second reference pixel subset includes the maximum first image component value, the second maximum first image component value, the maximum second image component value, and the second maximum second image component value; The determining unit is further configured to determine a first mean of the first image component according to the minimum first image component value and the second minimum first image component value, and determine a first mean of the second image component according to the minimum second image component value and the second minimum second image component value; determine a second mean of the first image component according to the maximum first image component value and the second maximum first image component value, and determine a second mean of the second image component according to the maximum second image component value and the second maximum second image component value; determine a model parameter of a prediction model according to the first mean of the first image component, the first mean of the second image component, the second mean of the first image component, and the second mean of the second image component; The prediction unit is configured to determine the model parameters of the prediction model based on the first mean of the first image component, the first mean of the second image component, the second mean of the first image component and the second mean of the second image component; and determine the prediction 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, comprising a memory and a processor, wherein: The memory is used to store a computer program that can be run on the processor; The processor is configured to execute the method according to 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 a determination unit, a comparison unit and a prediction unit, wherein: The determining unit is configured to determine a first reference pixel set corresponding to the image component to be predicted of the current block; and determine a second reference pixel set according to the first reference pixel set, wherein the second reference pixel set includes N adjacent reference pixel points; The comparison unit is configured to compare the first image component values corresponding to the N adjacent reference pixels for multiple times to obtain a first reference pixel subset corresponding to the minimum first image component value and the second minimum first image component value, and a second reference pixel subset corresponding to the maximum first image component value and the second maximum first image component value; wherein the first reference pixel subset includes the minimum first image component value, the second minimum first image component value, the minimum second image component value, and the second minimum second image component value, and the second reference pixel subset includes the maximum first image component value, the second maximum first image component value, the maximum second image component value, and the second maximum second image component value; The determining unit is further configured to determine a first mean value of the first image component according to the minimum first image component value and the second minimum first image component value, and determine a first mean value of the second image component according to the minimum second image component value and the second minimum second image component value; determine a second mean value of the first image component according to the maximum first image component value and the second maximum first image component value, and determine a second mean value of the second image component according to the maximum second image component value and the second maximum second image component value; The prediction unit is configured to determine the model parameters of the prediction model based on the first mean of the first image component, the first mean of the second image component, the second mean of the first image component and the second mean of the second image component; and determine the prediction 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 comprises a memory and a processor, wherein: The memory is used to store a computer program that can be run on the processor; The processor is configured to execute the method according to 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, the method according to any one of claims 1 to 5 is implemented, or the method according to any one of claims 6 to 10 is implemented.
16. A computer-readable storage medium having a code stream stored thereon, characterized in that: The code stream is generated by executing the steps of the method according to any one of claims 6 to 10.
Citation Information
Patent Citations
Linear model prediction-based image or video coding method
CN107580222A
Method and device for processing components of an image for encoding or decoding
US20130188883A1